Skip to content

Commit

Permalink
feat(smithy-client): factory for aggregated clients (#4639)
Browse files Browse the repository at this point in the history
* feat(smithy-client): factory for aggregated clients

* feat(smithy-client): codegen for aggregated clients
  • Loading branch information
kuhe committed Apr 19, 2023
1 parent 73f539d commit 852b99d
Show file tree
Hide file tree
Showing 356 changed files with 94,366 additions and 373,131 deletions.
778 changes: 161 additions & 617 deletions clients/client-accessanalyzer/src/AccessAnalyzer.ts

Large diffs are not rendered by default.

283 changes: 58 additions & 225 deletions clients/client-account/src/Account.ts

Large diffs are not rendered by default.

1,120 changes: 143 additions & 977 deletions clients/client-acm-pca/src/ACMPCA.ts

Large diffs are not rendered by default.

544 changes: 90 additions & 454 deletions clients/client-acm/src/ACM.ts

Large diffs are not rendered by default.

3,067 changes: 762 additions & 2,305 deletions clients/client-alexa-for-business/src/AlexaForBusiness.ts

Large diffs are not rendered by default.

559 changes: 118 additions & 441 deletions clients/client-amp/src/Amp.ts

Large diffs are not rendered by default.

1,009 changes: 203 additions & 806 deletions clients/client-amplify/src/Amplify.ts

Large diffs are not rendered by default.

833 changes: 168 additions & 665 deletions clients/client-amplifybackend/src/AmplifyBackend.ts

Large diffs are not rendered by default.

611 changes: 131 additions & 480 deletions clients/client-amplifyuibuilder/src/AmplifyUIBuilder.ts

Large diffs are not rendered by default.

3,166 changes: 614 additions & 2,552 deletions clients/client-api-gateway/src/APIGateway.ts

Large diffs are not rendered by default.

100 changes: 28 additions & 72 deletions clients/client-apigatewaymanagementapi/src/ApiGatewayManagementApi.ts
@@ -1,7 +1,8 @@
// smithy-typescript generated code
import { createAggregatedClient } from "@aws-sdk/smithy-client";
import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";

import { ApiGatewayManagementApiClient } from "./ApiGatewayManagementApiClient";
import { ApiGatewayManagementApiClient, ApiGatewayManagementApiClientConfig } from "./ApiGatewayManagementApiClient";
import {
DeleteConnectionCommand,
DeleteConnectionCommandInput,
Expand All @@ -18,107 +19,62 @@ import {
PostToConnectionCommandOutput,
} from "./commands/PostToConnectionCommand";

/**
* @public
* <p>The Amazon API Gateway Management API allows you to directly manage runtime aspects of your deployed APIs. To use it, you must explicitly set the SDK's endpoint to point to the endpoint of your deployed API. The endpoint will be of the form https://\{api-id\}.execute-api.\{region\}.amazonaws.com/\{stage\}, or will be the endpoint corresponding to your API's custom domain and base path, if applicable.</p>
*/
export class ApiGatewayManagementApi extends ApiGatewayManagementApiClient {
const commands = {
DeleteConnectionCommand,
GetConnectionCommand,
PostToConnectionCommand,
};

export interface ApiGatewayManagementApi {
/**
* @public
* <p>Delete the connection with the provided id.</p>
* @see {@link DeleteConnectionCommand}
*/
public deleteConnection(
deleteConnection(
args: DeleteConnectionCommandInput,
options?: __HttpHandlerOptions
): Promise<DeleteConnectionCommandOutput>;
public deleteConnection(
deleteConnection(
args: DeleteConnectionCommandInput,
cb: (err: any, data?: DeleteConnectionCommandOutput) => void
): void;
public deleteConnection(
deleteConnection(
args: DeleteConnectionCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DeleteConnectionCommandOutput) => void
): void;
public deleteConnection(
args: DeleteConnectionCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteConnectionCommandOutput) => void),
cb?: (err: any, data?: DeleteConnectionCommandOutput) => void
): Promise<DeleteConnectionCommandOutput> | void {
const command = new DeleteConnectionCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}

/**
* @public
* <p>Get information about the connection with the provided id.</p>
* @see {@link GetConnectionCommand}
*/
public getConnection(
args: GetConnectionCommandInput,
options?: __HttpHandlerOptions
): Promise<GetConnectionCommandOutput>;
public getConnection(
args: GetConnectionCommandInput,
cb: (err: any, data?: GetConnectionCommandOutput) => void
): void;
public getConnection(
getConnection(args: GetConnectionCommandInput, options?: __HttpHandlerOptions): Promise<GetConnectionCommandOutput>;
getConnection(args: GetConnectionCommandInput, cb: (err: any, data?: GetConnectionCommandOutput) => void): void;
getConnection(
args: GetConnectionCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: GetConnectionCommandOutput) => void
): void;
public getConnection(
args: GetConnectionCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetConnectionCommandOutput) => void),
cb?: (err: any, data?: GetConnectionCommandOutput) => void
): Promise<GetConnectionCommandOutput> | void {
const command = new GetConnectionCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}

/**
* @public
* <p>Sends the provided data to the specified connection.</p>
* @see {@link PostToConnectionCommand}
*/
public postToConnection(
postToConnection(
args: PostToConnectionCommandInput,
options?: __HttpHandlerOptions
): Promise<PostToConnectionCommandOutput>;
public postToConnection(
postToConnection(
args: PostToConnectionCommandInput,
cb: (err: any, data?: PostToConnectionCommandOutput) => void
): void;
public postToConnection(
postToConnection(
args: PostToConnectionCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: PostToConnectionCommandOutput) => void
): void;
public postToConnection(
args: PostToConnectionCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: PostToConnectionCommandOutput) => void),
cb?: (err: any, data?: PostToConnectionCommandOutput) => void
): Promise<PostToConnectionCommandOutput> | void {
const command = new PostToConnectionCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}
}

/**
* @public
* <p>The Amazon API Gateway Management API allows you to directly manage runtime aspects of your deployed APIs. To use it, you must explicitly set the SDK's endpoint to point to the endpoint of your deployed API. The endpoint will be of the form https://\{api-id\}.execute-api.\{region\}.amazonaws.com/\{stage\}, or will be the endpoint corresponding to your API's custom domain and base path, if applicable.</p>
*/
export class ApiGatewayManagementApi extends ApiGatewayManagementApiClient implements ApiGatewayManagementApi {}
createAggregatedClient(commands, ApiGatewayManagementApi);

0 comments on commit 852b99d

Please sign in to comment.