Skip to content

Commit

Permalink
feat(smithy-client): codegen for aggregated clients
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhe committed Apr 17, 2023
1 parent 53224b2 commit 9495137
Show file tree
Hide file tree
Showing 355 changed files with 78,667 additions and 345,932 deletions.
780 changes: 164 additions & 616 deletions clients/client-accessanalyzer/src/AccessAnalyzer.ts

Large diffs are not rendered by default.

285 changes: 61 additions & 224 deletions clients/client-account/src/Account.ts

Large diffs are not rendered by default.

1,122 changes: 146 additions & 976 deletions clients/client-acm-pca/src/ACMPCA.ts

Large diffs are not rendered by default.

546 changes: 93 additions & 453 deletions clients/client-acm/src/ACM.ts

Large diffs are not rendered by default.

2,517 changes: 489 additions & 2,028 deletions clients/client-alexa-for-business/src/AlexaForBusiness.ts

Large diffs are not rendered by default.

561 changes: 121 additions & 440 deletions clients/client-amp/src/Amp.ts

Large diffs are not rendered by default.

1,011 changes: 206 additions & 805 deletions clients/client-amplify/src/Amplify.ts

Large diffs are not rendered by default.

835 changes: 171 additions & 664 deletions clients/client-amplifybackend/src/AmplifyBackend.ts

Large diffs are not rendered by default.

613 changes: 134 additions & 479 deletions clients/client-amplifyuibuilder/src/AmplifyUIBuilder.ts

Large diffs are not rendered by default.

3,168 changes: 617 additions & 2,551 deletions clients/client-api-gateway/src/APIGateway.ts

Large diffs are not rendered by default.

102 changes: 31 additions & 71 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,66 @@ 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 {
public constructor(config: ApiGatewayManagementApiClientConfig) {
super(config);
createAggregatedClient(commands, this);
}
}

0 comments on commit 9495137

Please sign in to comment.