Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(smithy-client): factory for aggregated clients #4639

Merged
merged 2 commits into from Apr 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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.

@@ -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);