diff --git a/clients/client-api-gateway/.gitignore b/clients/client-api-gateway/.gitignore new file mode 100644 index 000000000000..b41c05b597c4 --- /dev/null +++ b/clients/client-api-gateway/.gitignore @@ -0,0 +1,14 @@ +/node_modules/ +/build/ +/coverage/ +/docs/ +/types/ +/dist/ +*.tsbuildinfo +*.tgz +*.log +package-lock.json + +*.d.ts +*.js +*.js.map diff --git a/clients/client-api-gateway/.npmignore b/clients/client-api-gateway/.npmignore new file mode 100644 index 000000000000..b7ff81137c4a --- /dev/null +++ b/clients/client-api-gateway/.npmignore @@ -0,0 +1,4 @@ +/coverage/ +/docs/ +tsconfig.test.json +*.tsbuildinfo diff --git a/clients/client-api-gateway/APIGateway.ts b/clients/client-api-gateway/APIGateway.ts new file mode 100644 index 000000000000..2a98f13927e2 --- /dev/null +++ b/clients/client-api-gateway/APIGateway.ts @@ -0,0 +1,5156 @@ +import { APIGatewayClient } from "./APIGatewayClient"; +import { + CreateApiKeyCommand, + CreateApiKeyCommandInput, + CreateApiKeyCommandOutput, +} from "./commands/CreateApiKeyCommand"; +import { + CreateAuthorizerCommand, + CreateAuthorizerCommandInput, + CreateAuthorizerCommandOutput, +} from "./commands/CreateAuthorizerCommand"; +import { + CreateBasePathMappingCommand, + CreateBasePathMappingCommandInput, + CreateBasePathMappingCommandOutput, +} from "./commands/CreateBasePathMappingCommand"; +import { + CreateDeploymentCommand, + CreateDeploymentCommandInput, + CreateDeploymentCommandOutput, +} from "./commands/CreateDeploymentCommand"; +import { + CreateDocumentationPartCommand, + CreateDocumentationPartCommandInput, + CreateDocumentationPartCommandOutput, +} from "./commands/CreateDocumentationPartCommand"; +import { + CreateDocumentationVersionCommand, + CreateDocumentationVersionCommandInput, + CreateDocumentationVersionCommandOutput, +} from "./commands/CreateDocumentationVersionCommand"; +import { + CreateDomainNameCommand, + CreateDomainNameCommandInput, + CreateDomainNameCommandOutput, +} from "./commands/CreateDomainNameCommand"; +import { + CreateModelCommand, + CreateModelCommandInput, + CreateModelCommandOutput, +} from "./commands/CreateModelCommand"; +import { + CreateRequestValidatorCommand, + CreateRequestValidatorCommandInput, + CreateRequestValidatorCommandOutput, +} from "./commands/CreateRequestValidatorCommand"; +import { + CreateResourceCommand, + CreateResourceCommandInput, + CreateResourceCommandOutput, +} from "./commands/CreateResourceCommand"; +import { + CreateRestApiCommand, + CreateRestApiCommandInput, + CreateRestApiCommandOutput, +} from "./commands/CreateRestApiCommand"; +import { + CreateStageCommand, + CreateStageCommandInput, + CreateStageCommandOutput, +} from "./commands/CreateStageCommand"; +import { + CreateUsagePlanCommand, + CreateUsagePlanCommandInput, + CreateUsagePlanCommandOutput, +} from "./commands/CreateUsagePlanCommand"; +import { + CreateUsagePlanKeyCommand, + CreateUsagePlanKeyCommandInput, + CreateUsagePlanKeyCommandOutput, +} from "./commands/CreateUsagePlanKeyCommand"; +import { + CreateVpcLinkCommand, + CreateVpcLinkCommandInput, + CreateVpcLinkCommandOutput, +} from "./commands/CreateVpcLinkCommand"; +import { + DeleteApiKeyCommand, + DeleteApiKeyCommandInput, + DeleteApiKeyCommandOutput, +} from "./commands/DeleteApiKeyCommand"; +import { + DeleteAuthorizerCommand, + DeleteAuthorizerCommandInput, + DeleteAuthorizerCommandOutput, +} from "./commands/DeleteAuthorizerCommand"; +import { + DeleteBasePathMappingCommand, + DeleteBasePathMappingCommandInput, + DeleteBasePathMappingCommandOutput, +} from "./commands/DeleteBasePathMappingCommand"; +import { + DeleteClientCertificateCommand, + DeleteClientCertificateCommandInput, + DeleteClientCertificateCommandOutput, +} from "./commands/DeleteClientCertificateCommand"; +import { + DeleteDeploymentCommand, + DeleteDeploymentCommandInput, + DeleteDeploymentCommandOutput, +} from "./commands/DeleteDeploymentCommand"; +import { + DeleteDocumentationPartCommand, + DeleteDocumentationPartCommandInput, + DeleteDocumentationPartCommandOutput, +} from "./commands/DeleteDocumentationPartCommand"; +import { + DeleteDocumentationVersionCommand, + DeleteDocumentationVersionCommandInput, + DeleteDocumentationVersionCommandOutput, +} from "./commands/DeleteDocumentationVersionCommand"; +import { + DeleteDomainNameCommand, + DeleteDomainNameCommandInput, + DeleteDomainNameCommandOutput, +} from "./commands/DeleteDomainNameCommand"; +import { + DeleteGatewayResponseCommand, + DeleteGatewayResponseCommandInput, + DeleteGatewayResponseCommandOutput, +} from "./commands/DeleteGatewayResponseCommand"; +import { + DeleteIntegrationCommand, + DeleteIntegrationCommandInput, + DeleteIntegrationCommandOutput, +} from "./commands/DeleteIntegrationCommand"; +import { + DeleteIntegrationResponseCommand, + DeleteIntegrationResponseCommandInput, + DeleteIntegrationResponseCommandOutput, +} from "./commands/DeleteIntegrationResponseCommand"; +import { + DeleteMethodCommand, + DeleteMethodCommandInput, + DeleteMethodCommandOutput, +} from "./commands/DeleteMethodCommand"; +import { + DeleteMethodResponseCommand, + DeleteMethodResponseCommandInput, + DeleteMethodResponseCommandOutput, +} from "./commands/DeleteMethodResponseCommand"; +import { + DeleteModelCommand, + DeleteModelCommandInput, + DeleteModelCommandOutput, +} from "./commands/DeleteModelCommand"; +import { + DeleteRequestValidatorCommand, + DeleteRequestValidatorCommandInput, + DeleteRequestValidatorCommandOutput, +} from "./commands/DeleteRequestValidatorCommand"; +import { + DeleteResourceCommand, + DeleteResourceCommandInput, + DeleteResourceCommandOutput, +} from "./commands/DeleteResourceCommand"; +import { + DeleteRestApiCommand, + DeleteRestApiCommandInput, + DeleteRestApiCommandOutput, +} from "./commands/DeleteRestApiCommand"; +import { + DeleteStageCommand, + DeleteStageCommandInput, + DeleteStageCommandOutput, +} from "./commands/DeleteStageCommand"; +import { + DeleteUsagePlanCommand, + DeleteUsagePlanCommandInput, + DeleteUsagePlanCommandOutput, +} from "./commands/DeleteUsagePlanCommand"; +import { + DeleteUsagePlanKeyCommand, + DeleteUsagePlanKeyCommandInput, + DeleteUsagePlanKeyCommandOutput, +} from "./commands/DeleteUsagePlanKeyCommand"; +import { + DeleteVpcLinkCommand, + DeleteVpcLinkCommandInput, + DeleteVpcLinkCommandOutput, +} from "./commands/DeleteVpcLinkCommand"; +import { + FlushStageAuthorizersCacheCommand, + FlushStageAuthorizersCacheCommandInput, + FlushStageAuthorizersCacheCommandOutput, +} from "./commands/FlushStageAuthorizersCacheCommand"; +import { + FlushStageCacheCommand, + FlushStageCacheCommandInput, + FlushStageCacheCommandOutput, +} from "./commands/FlushStageCacheCommand"; +import { + GenerateClientCertificateCommand, + GenerateClientCertificateCommandInput, + GenerateClientCertificateCommandOutput, +} from "./commands/GenerateClientCertificateCommand"; +import { + GetAccountCommand, + GetAccountCommandInput, + GetAccountCommandOutput, +} from "./commands/GetAccountCommand"; +import { + GetApiKeyCommand, + GetApiKeyCommandInput, + GetApiKeyCommandOutput, +} from "./commands/GetApiKeyCommand"; +import { + GetApiKeysCommand, + GetApiKeysCommandInput, + GetApiKeysCommandOutput, +} from "./commands/GetApiKeysCommand"; +import { + GetAuthorizerCommand, + GetAuthorizerCommandInput, + GetAuthorizerCommandOutput, +} from "./commands/GetAuthorizerCommand"; +import { + GetAuthorizersCommand, + GetAuthorizersCommandInput, + GetAuthorizersCommandOutput, +} from "./commands/GetAuthorizersCommand"; +import { + GetBasePathMappingCommand, + GetBasePathMappingCommandInput, + GetBasePathMappingCommandOutput, +} from "./commands/GetBasePathMappingCommand"; +import { + GetBasePathMappingsCommand, + GetBasePathMappingsCommandInput, + GetBasePathMappingsCommandOutput, +} from "./commands/GetBasePathMappingsCommand"; +import { + GetClientCertificateCommand, + GetClientCertificateCommandInput, + GetClientCertificateCommandOutput, +} from "./commands/GetClientCertificateCommand"; +import { + GetClientCertificatesCommand, + GetClientCertificatesCommandInput, + GetClientCertificatesCommandOutput, +} from "./commands/GetClientCertificatesCommand"; +import { + GetDeploymentCommand, + GetDeploymentCommandInput, + GetDeploymentCommandOutput, +} from "./commands/GetDeploymentCommand"; +import { + GetDeploymentsCommand, + GetDeploymentsCommandInput, + GetDeploymentsCommandOutput, +} from "./commands/GetDeploymentsCommand"; +import { + GetDocumentationPartCommand, + GetDocumentationPartCommandInput, + GetDocumentationPartCommandOutput, +} from "./commands/GetDocumentationPartCommand"; +import { + GetDocumentationPartsCommand, + GetDocumentationPartsCommandInput, + GetDocumentationPartsCommandOutput, +} from "./commands/GetDocumentationPartsCommand"; +import { + GetDocumentationVersionCommand, + GetDocumentationVersionCommandInput, + GetDocumentationVersionCommandOutput, +} from "./commands/GetDocumentationVersionCommand"; +import { + GetDocumentationVersionsCommand, + GetDocumentationVersionsCommandInput, + GetDocumentationVersionsCommandOutput, +} from "./commands/GetDocumentationVersionsCommand"; +import { + GetDomainNameCommand, + GetDomainNameCommandInput, + GetDomainNameCommandOutput, +} from "./commands/GetDomainNameCommand"; +import { + GetDomainNamesCommand, + GetDomainNamesCommandInput, + GetDomainNamesCommandOutput, +} from "./commands/GetDomainNamesCommand"; +import { + GetExportCommand, + GetExportCommandInput, + GetExportCommandOutput, +} from "./commands/GetExportCommand"; +import { + GetGatewayResponseCommand, + GetGatewayResponseCommandInput, + GetGatewayResponseCommandOutput, +} from "./commands/GetGatewayResponseCommand"; +import { + GetGatewayResponsesCommand, + GetGatewayResponsesCommandInput, + GetGatewayResponsesCommandOutput, +} from "./commands/GetGatewayResponsesCommand"; +import { + GetIntegrationCommand, + GetIntegrationCommandInput, + GetIntegrationCommandOutput, +} from "./commands/GetIntegrationCommand"; +import { + GetIntegrationResponseCommand, + GetIntegrationResponseCommandInput, + GetIntegrationResponseCommandOutput, +} from "./commands/GetIntegrationResponseCommand"; +import { + GetMethodCommand, + GetMethodCommandInput, + GetMethodCommandOutput, +} from "./commands/GetMethodCommand"; +import { + GetMethodResponseCommand, + GetMethodResponseCommandInput, + GetMethodResponseCommandOutput, +} from "./commands/GetMethodResponseCommand"; +import { + GetModelCommand, + GetModelCommandInput, + GetModelCommandOutput, +} from "./commands/GetModelCommand"; +import { + GetModelTemplateCommand, + GetModelTemplateCommandInput, + GetModelTemplateCommandOutput, +} from "./commands/GetModelTemplateCommand"; +import { + GetModelsCommand, + GetModelsCommandInput, + GetModelsCommandOutput, +} from "./commands/GetModelsCommand"; +import { + GetRequestValidatorCommand, + GetRequestValidatorCommandInput, + GetRequestValidatorCommandOutput, +} from "./commands/GetRequestValidatorCommand"; +import { + GetRequestValidatorsCommand, + GetRequestValidatorsCommandInput, + GetRequestValidatorsCommandOutput, +} from "./commands/GetRequestValidatorsCommand"; +import { + GetResourceCommand, + GetResourceCommandInput, + GetResourceCommandOutput, +} from "./commands/GetResourceCommand"; +import { + GetResourcesCommand, + GetResourcesCommandInput, + GetResourcesCommandOutput, +} from "./commands/GetResourcesCommand"; +import { + GetRestApiCommand, + GetRestApiCommandInput, + GetRestApiCommandOutput, +} from "./commands/GetRestApiCommand"; +import { + GetRestApisCommand, + GetRestApisCommandInput, + GetRestApisCommandOutput, +} from "./commands/GetRestApisCommand"; +import { + GetSdkCommand, + GetSdkCommandInput, + GetSdkCommandOutput, +} from "./commands/GetSdkCommand"; +import { + GetSdkTypeCommand, + GetSdkTypeCommandInput, + GetSdkTypeCommandOutput, +} from "./commands/GetSdkTypeCommand"; +import { + GetSdkTypesCommand, + GetSdkTypesCommandInput, + GetSdkTypesCommandOutput, +} from "./commands/GetSdkTypesCommand"; +import { + GetStageCommand, + GetStageCommandInput, + GetStageCommandOutput, +} from "./commands/GetStageCommand"; +import { + GetStagesCommand, + GetStagesCommandInput, + GetStagesCommandOutput, +} from "./commands/GetStagesCommand"; +import { + GetTagsCommand, + GetTagsCommandInput, + GetTagsCommandOutput, +} from "./commands/GetTagsCommand"; +import { + GetUsageCommand, + GetUsageCommandInput, + GetUsageCommandOutput, +} from "./commands/GetUsageCommand"; +import { + GetUsagePlanCommand, + GetUsagePlanCommandInput, + GetUsagePlanCommandOutput, +} from "./commands/GetUsagePlanCommand"; +import { + GetUsagePlanKeyCommand, + GetUsagePlanKeyCommandInput, + GetUsagePlanKeyCommandOutput, +} from "./commands/GetUsagePlanKeyCommand"; +import { + GetUsagePlanKeysCommand, + GetUsagePlanKeysCommandInput, + GetUsagePlanKeysCommandOutput, +} from "./commands/GetUsagePlanKeysCommand"; +import { + GetUsagePlansCommand, + GetUsagePlansCommandInput, + GetUsagePlansCommandOutput, +} from "./commands/GetUsagePlansCommand"; +import { + GetVpcLinkCommand, + GetVpcLinkCommandInput, + GetVpcLinkCommandOutput, +} from "./commands/GetVpcLinkCommand"; +import { + GetVpcLinksCommand, + GetVpcLinksCommandInput, + GetVpcLinksCommandOutput, +} from "./commands/GetVpcLinksCommand"; +import { + ImportApiKeysCommand, + ImportApiKeysCommandInput, + ImportApiKeysCommandOutput, +} from "./commands/ImportApiKeysCommand"; +import { + ImportDocumentationPartsCommand, + ImportDocumentationPartsCommandInput, + ImportDocumentationPartsCommandOutput, +} from "./commands/ImportDocumentationPartsCommand"; +import { + ImportRestApiCommand, + ImportRestApiCommandInput, + ImportRestApiCommandOutput, +} from "./commands/ImportRestApiCommand"; +import { + PutGatewayResponseCommand, + PutGatewayResponseCommandInput, + PutGatewayResponseCommandOutput, +} from "./commands/PutGatewayResponseCommand"; +import { + PutIntegrationCommand, + PutIntegrationCommandInput, + PutIntegrationCommandOutput, +} from "./commands/PutIntegrationCommand"; +import { + PutIntegrationResponseCommand, + PutIntegrationResponseCommandInput, + PutIntegrationResponseCommandOutput, +} from "./commands/PutIntegrationResponseCommand"; +import { + PutMethodCommand, + PutMethodCommandInput, + PutMethodCommandOutput, +} from "./commands/PutMethodCommand"; +import { + PutMethodResponseCommand, + PutMethodResponseCommandInput, + PutMethodResponseCommandOutput, +} from "./commands/PutMethodResponseCommand"; +import { + PutRestApiCommand, + PutRestApiCommandInput, + PutRestApiCommandOutput, +} from "./commands/PutRestApiCommand"; +import { + TagResourceCommand, + TagResourceCommandInput, + TagResourceCommandOutput, +} from "./commands/TagResourceCommand"; +import { + TestInvokeAuthorizerCommand, + TestInvokeAuthorizerCommandInput, + TestInvokeAuthorizerCommandOutput, +} from "./commands/TestInvokeAuthorizerCommand"; +import { + TestInvokeMethodCommand, + TestInvokeMethodCommandInput, + TestInvokeMethodCommandOutput, +} from "./commands/TestInvokeMethodCommand"; +import { + UntagResourceCommand, + UntagResourceCommandInput, + UntagResourceCommandOutput, +} from "./commands/UntagResourceCommand"; +import { + UpdateAccountCommand, + UpdateAccountCommandInput, + UpdateAccountCommandOutput, +} from "./commands/UpdateAccountCommand"; +import { + UpdateApiKeyCommand, + UpdateApiKeyCommandInput, + UpdateApiKeyCommandOutput, +} from "./commands/UpdateApiKeyCommand"; +import { + UpdateAuthorizerCommand, + UpdateAuthorizerCommandInput, + UpdateAuthorizerCommandOutput, +} from "./commands/UpdateAuthorizerCommand"; +import { + UpdateBasePathMappingCommand, + UpdateBasePathMappingCommandInput, + UpdateBasePathMappingCommandOutput, +} from "./commands/UpdateBasePathMappingCommand"; +import { + UpdateClientCertificateCommand, + UpdateClientCertificateCommandInput, + UpdateClientCertificateCommandOutput, +} from "./commands/UpdateClientCertificateCommand"; +import { + UpdateDeploymentCommand, + UpdateDeploymentCommandInput, + UpdateDeploymentCommandOutput, +} from "./commands/UpdateDeploymentCommand"; +import { + UpdateDocumentationPartCommand, + UpdateDocumentationPartCommandInput, + UpdateDocumentationPartCommandOutput, +} from "./commands/UpdateDocumentationPartCommand"; +import { + UpdateDocumentationVersionCommand, + UpdateDocumentationVersionCommandInput, + UpdateDocumentationVersionCommandOutput, +} from "./commands/UpdateDocumentationVersionCommand"; +import { + UpdateDomainNameCommand, + UpdateDomainNameCommandInput, + UpdateDomainNameCommandOutput, +} from "./commands/UpdateDomainNameCommand"; +import { + UpdateGatewayResponseCommand, + UpdateGatewayResponseCommandInput, + UpdateGatewayResponseCommandOutput, +} from "./commands/UpdateGatewayResponseCommand"; +import { + UpdateIntegrationCommand, + UpdateIntegrationCommandInput, + UpdateIntegrationCommandOutput, +} from "./commands/UpdateIntegrationCommand"; +import { + UpdateIntegrationResponseCommand, + UpdateIntegrationResponseCommandInput, + UpdateIntegrationResponseCommandOutput, +} from "./commands/UpdateIntegrationResponseCommand"; +import { + UpdateMethodCommand, + UpdateMethodCommandInput, + UpdateMethodCommandOutput, +} from "./commands/UpdateMethodCommand"; +import { + UpdateMethodResponseCommand, + UpdateMethodResponseCommandInput, + UpdateMethodResponseCommandOutput, +} from "./commands/UpdateMethodResponseCommand"; +import { + UpdateModelCommand, + UpdateModelCommandInput, + UpdateModelCommandOutput, +} from "./commands/UpdateModelCommand"; +import { + UpdateRequestValidatorCommand, + UpdateRequestValidatorCommandInput, + UpdateRequestValidatorCommandOutput, +} from "./commands/UpdateRequestValidatorCommand"; +import { + UpdateResourceCommand, + UpdateResourceCommandInput, + UpdateResourceCommandOutput, +} from "./commands/UpdateResourceCommand"; +import { + UpdateRestApiCommand, + UpdateRestApiCommandInput, + UpdateRestApiCommandOutput, +} from "./commands/UpdateRestApiCommand"; +import { + UpdateStageCommand, + UpdateStageCommandInput, + UpdateStageCommandOutput, +} from "./commands/UpdateStageCommand"; +import { + UpdateUsageCommand, + UpdateUsageCommandInput, + UpdateUsageCommandOutput, +} from "./commands/UpdateUsageCommand"; +import { + UpdateUsagePlanCommand, + UpdateUsagePlanCommandInput, + UpdateUsagePlanCommandOutput, +} from "./commands/UpdateUsagePlanCommand"; +import { + UpdateVpcLinkCommand, + UpdateVpcLinkCommandInput, + UpdateVpcLinkCommandOutput, +} from "./commands/UpdateVpcLinkCommand"; +import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types"; + +/** + * + * Amazon API Gateway + * + *

+ * Amazon API Gateway helps developers deliver robust, secure, and scalable mobile and web application back ends. API Gateway allows developers to securely connect mobile and web applications to APIs that run on AWS Lambda, Amazon EC2, or other publicly addressable web services that are hosted outside of AWS. + *

+ */ +export class APIGateway extends APIGatewayClient { + /** + *

+ * Deletes an existing + * + * Authorizer + * + * resource. + *

+ *
+ * + * AWS CLI + * + *
+ */ + public deleteAuthorizer( + args: DeleteAuthorizerCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public deleteAuthorizer( + args: DeleteAuthorizerCommandInput, + cb: (err: any, data?: DeleteAuthorizerCommandOutput) => void + ): void; + public deleteAuthorizer( + args: DeleteAuthorizerCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteAuthorizerCommandOutput) => void + ): void; + public deleteAuthorizer( + args: DeleteAuthorizerCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteAuthorizerCommandOutput) => void), + cb?: (err: any, data?: DeleteAuthorizerCommandOutput) => void + ): Promise | void { + const command = new DeleteAuthorizerCommand(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); + } + } + + /** + *

+ * Gets the + * + * Tags + * + * collection for a given resource. + *

+ */ + public getTags( + args: GetTagsCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getTags( + args: GetTagsCommandInput, + cb: (err: any, data?: GetTagsCommandOutput) => void + ): void; + public getTags( + args: GetTagsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetTagsCommandOutput) => void + ): void; + public getTags( + args: GetTagsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetTagsCommandOutput) => void), + cb?: (err: any, data?: GetTagsCommandOutput) => void + ): Promise | void { + const command = new GetTagsCommand(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); + } + } + + /** + *

+ * Creates a new + * + * Stage + * + * resource that references a pre-existing + * + * Deployment + * + * for the API. + *

+ * + */ + public createStage( + args: CreateStageCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public createStage( + args: CreateStageCommandInput, + cb: (err: any, data?: CreateStageCommandOutput) => void + ): void; + public createStage( + args: CreateStageCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateStageCommandOutput) => void + ): void; + public createStage( + args: CreateStageCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateStageCommandOutput) => void), + cb?: (err: any, data?: CreateStageCommandOutput) => void + ): Promise | void { + const command = new CreateStageCommand(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); + } + } + + /** + *

+ * Gets information about a + * + * Stage + * + * resource. + *

+ */ + public getStage( + args: GetStageCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getStage( + args: GetStageCommandInput, + cb: (err: any, data?: GetStageCommandOutput) => void + ): void; + public getStage( + args: GetStageCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetStageCommandOutput) => void + ): void; + public getStage( + args: GetStageCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetStageCommandOutput) => void), + cb?: (err: any, data?: GetStageCommandOutput) => void + ): Promise | void { + const command = new GetStageCommand(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); + } + } + + /** + *

+ * Gets the usage data of a usage plan in a specified time interval. + *

+ */ + public getUsage( + args: GetUsageCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getUsage( + args: GetUsageCommandInput, + cb: (err: any, data?: GetUsageCommandOutput) => void + ): void; + public getUsage( + args: GetUsageCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetUsageCommandOutput) => void + ): void; + public getUsage( + args: GetUsageCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetUsageCommandOutput) => void), + cb?: (err: any, data?: GetUsageCommandOutput) => void + ): Promise | void { + const command = new GetUsageCommand(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); + } + } + + /** + *

+ * Creates a + * + * ReqeustValidator + * + * of a given + * + * RestApi + * + * . + *

+ */ + public createRequestValidator( + args: CreateRequestValidatorCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public createRequestValidator( + args: CreateRequestValidatorCommandInput, + cb: (err: any, data?: CreateRequestValidatorCommandOutput) => void + ): void; + public createRequestValidator( + args: CreateRequestValidatorCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateRequestValidatorCommandOutput) => void + ): void; + public createRequestValidator( + args: CreateRequestValidatorCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateRequestValidatorCommandOutput) => void), + cb?: (err: any, data?: CreateRequestValidatorCommandOutput) => void + ): Promise | void { + const command = new CreateRequestValidatorCommand(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); + } + } + + /** + *

+ * Changes information about a + * + * Resource + * + * resource. + *

+ */ + public updateResource( + args: UpdateResourceCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public updateResource( + args: UpdateResourceCommandInput, + cb: (err: any, data?: UpdateResourceCommandOutput) => void + ): void; + public updateResource( + args: UpdateResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateResourceCommandOutput) => void + ): void; + public updateResource( + args: UpdateResourceCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateResourceCommandOutput) => void), + cb?: (err: any, data?: UpdateResourceCommandOutput) => void + ): Promise | void { + const command = new UpdateResourceCommand(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); + } + } + + /** + *

+ * Deletes a + * + * Resource + * + * resource. + *

+ */ + public deleteResource( + args: DeleteResourceCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public deleteResource( + args: DeleteResourceCommandInput, + cb: (err: any, data?: DeleteResourceCommandOutput) => void + ): void; + public deleteResource( + args: DeleteResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteResourceCommandOutput) => void + ): void; + public deleteResource( + args: DeleteResourceCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteResourceCommandOutput) => void), + cb?: (err: any, data?: DeleteResourceCommandOutput) => void + ): Promise | void { + const command = new DeleteResourceCommand(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); + } + } + + /** + *

+ * Deletes a + * + * Deployment + * + * resource. Deleting a deployment will only succeed if there are no + * + * Stage + * + * resources associated with it. + *

+ */ + public deleteDeployment( + args: DeleteDeploymentCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public deleteDeployment( + args: DeleteDeploymentCommandInput, + cb: (err: any, data?: DeleteDeploymentCommandOutput) => void + ): void; + public deleteDeployment( + args: DeleteDeploymentCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteDeploymentCommandOutput) => void + ): void; + public deleteDeployment( + args: DeleteDeploymentCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteDeploymentCommandOutput) => void), + cb?: (err: any, data?: DeleteDeploymentCommandOutput) => void + ): Promise | void { + const command = new DeleteDeploymentCommand(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 getSdkTypes( + args: GetSdkTypesCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getSdkTypes( + args: GetSdkTypesCommandInput, + cb: (err: any, data?: GetSdkTypesCommandOutput) => void + ): void; + public getSdkTypes( + args: GetSdkTypesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetSdkTypesCommandOutput) => void + ): void; + public getSdkTypes( + args: GetSdkTypesCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetSdkTypesCommandOutput) => void), + cb?: (err: any, data?: GetSdkTypesCommandOutput) => void + ): Promise | void { + const command = new GetSdkTypesCommand(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); + } + } + + /** + *

+ * Changes information about a model. + *

+ */ + public updateModel( + args: UpdateModelCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public updateModel( + args: UpdateModelCommandInput, + cb: (err: any, data?: UpdateModelCommandOutput) => void + ): void; + public updateModel( + args: UpdateModelCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateModelCommandOutput) => void + ): void; + public updateModel( + args: UpdateModelCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateModelCommandOutput) => void), + cb?: (err: any, data?: UpdateModelCommandOutput) => void + ): Promise | void { + const command = new UpdateModelCommand(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); + } + } + + /** + *

+ * Clears any customization of a + * + * GatewayResponse + * + * of a specified response type on the given + * + * RestApi + * + * and resets it with the default settings. + *

+ */ + public deleteGatewayResponse( + args: DeleteGatewayResponseCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public deleteGatewayResponse( + args: DeleteGatewayResponseCommandInput, + cb: (err: any, data?: DeleteGatewayResponseCommandOutput) => void + ): void; + public deleteGatewayResponse( + args: DeleteGatewayResponseCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteGatewayResponseCommandOutput) => void + ): void; + public deleteGatewayResponse( + args: DeleteGatewayResponseCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteGatewayResponseCommandOutput) => void), + cb?: (err: any, data?: DeleteGatewayResponseCommandOutput) => void + ): Promise | void { + const command = new DeleteGatewayResponseCommand(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); + } + } + + /** + *

+ * Create an + * + * ApiKey + * + * resource. + *

+ * + */ + public createApiKey( + args: CreateApiKeyCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public createApiKey( + args: CreateApiKeyCommandInput, + cb: (err: any, data?: CreateApiKeyCommandOutput) => void + ): void; + public createApiKey( + args: CreateApiKeyCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateApiKeyCommandOutput) => void + ): void; + public createApiKey( + args: CreateApiKeyCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateApiKeyCommandOutput) => void), + cb?: (err: any, data?: CreateApiKeyCommandOutput) => void + ): Promise | void { + const command = new CreateApiKeyCommand(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 deleteDocumentationVersion( + args: DeleteDocumentationVersionCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public deleteDocumentationVersion( + args: DeleteDocumentationVersionCommandInput, + cb: (err: any, data?: DeleteDocumentationVersionCommandOutput) => void + ): void; + public deleteDocumentationVersion( + args: DeleteDocumentationVersionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteDocumentationVersionCommandOutput) => void + ): void; + public deleteDocumentationVersion( + args: DeleteDocumentationVersionCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteDocumentationVersionCommandOutput) => void), + cb?: (err: any, data?: DeleteDocumentationVersionCommandOutput) => void + ): Promise | void { + const command = new DeleteDocumentationVersionCommand(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); + } + } + + /** + *

+ * Gets a collection of + * + * ClientCertificate + * + * resources. + *

+ */ + public getClientCertificates( + args: GetClientCertificatesCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getClientCertificates( + args: GetClientCertificatesCommandInput, + cb: (err: any, data?: GetClientCertificatesCommandOutput) => void + ): void; + public getClientCertificates( + args: GetClientCertificatesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetClientCertificatesCommandOutput) => void + ): void; + public getClientCertificates( + args: GetClientCertificatesCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetClientCertificatesCommandOutput) => void), + cb?: (err: any, data?: GetClientCertificatesCommandOutput) => void + ): Promise | void { + const command = new GetClientCertificatesCommand(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); + } + } + + /** + *

+ * Represents a get integration response. + *

+ */ + public getIntegrationResponse( + args: GetIntegrationResponseCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getIntegrationResponse( + args: GetIntegrationResponseCommandInput, + cb: (err: any, data?: GetIntegrationResponseCommandOutput) => void + ): void; + public getIntegrationResponse( + args: GetIntegrationResponseCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetIntegrationResponseCommandOutput) => void + ): void; + public getIntegrationResponse( + args: GetIntegrationResponseCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetIntegrationResponseCommandOutput) => void), + cb?: (err: any, data?: GetIntegrationResponseCommandOutput) => void + ): Promise | void { + const command = new GetIntegrationResponseCommand(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 deleteDocumentationPart( + args: DeleteDocumentationPartCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public deleteDocumentationPart( + args: DeleteDocumentationPartCommandInput, + cb: (err: any, data?: DeleteDocumentationPartCommandOutput) => void + ): void; + public deleteDocumentationPart( + args: DeleteDocumentationPartCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteDocumentationPartCommandOutput) => void + ): void; + public deleteDocumentationPart( + args: DeleteDocumentationPartCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteDocumentationPartCommandOutput) => void), + cb?: (err: any, data?: DeleteDocumentationPartCommandOutput) => void + ): Promise | void { + const command = new DeleteDocumentationPartCommand(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); + } + } + + /** + *

+ * Updates an existing + * + * Authorizer + * + * resource. + *

+ * + */ + public updateAuthorizer( + args: UpdateAuthorizerCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public updateAuthorizer( + args: UpdateAuthorizerCommandInput, + cb: (err: any, data?: UpdateAuthorizerCommandOutput) => void + ): void; + public updateAuthorizer( + args: UpdateAuthorizerCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateAuthorizerCommandOutput) => void + ): void; + public updateAuthorizer( + args: UpdateAuthorizerCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateAuthorizerCommandOutput) => void), + cb?: (err: any, data?: UpdateAuthorizerCommandOutput) => void + ): Promise | void { + const command = new UpdateAuthorizerCommand(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); + } + } + + /** + *

+ * Gets information about the current + * + * ClientCertificate + * + * resource. + *

+ */ + public getClientCertificate( + args: GetClientCertificateCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getClientCertificate( + args: GetClientCertificateCommandInput, + cb: (err: any, data?: GetClientCertificateCommandOutput) => void + ): void; + public getClientCertificate( + args: GetClientCertificateCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetClientCertificateCommandOutput) => void + ): void; + public getClientCertificate( + args: GetClientCertificateCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetClientCertificateCommandOutput) => void), + cb?: (err: any, data?: GetClientCertificateCommandOutput) => void + ): Promise | void { + const command = new GetClientCertificateCommand(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 getSdkType( + args: GetSdkTypeCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getSdkType( + args: GetSdkTypeCommandInput, + cb: (err: any, data?: GetSdkTypeCommandOutput) => void + ): void; + public getSdkType( + args: GetSdkTypeCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetSdkTypeCommandOutput) => void + ): void; + public getSdkType( + args: GetSdkTypeCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetSdkTypeCommandOutput) => void), + cb?: (err: any, data?: GetSdkTypeCommandOutput) => void + ): Promise | void { + const command = new GetSdkTypeCommand(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); + } + } + + /** + *

+ * Gets the + * + * RequestValidators + * + * collection of a given + * + * RestApi + * + * . + *

+ */ + public getRequestValidators( + args: GetRequestValidatorsCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getRequestValidators( + args: GetRequestValidatorsCommandInput, + cb: (err: any, data?: GetRequestValidatorsCommandOutput) => void + ): void; + public getRequestValidators( + args: GetRequestValidatorsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetRequestValidatorsCommandOutput) => void + ): void; + public getRequestValidators( + args: GetRequestValidatorsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetRequestValidatorsCommandOutput) => void), + cb?: (err: any, data?: GetRequestValidatorsCommandOutput) => void + ): Promise | void { + const command = new GetRequestValidatorsCommand(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); + } + } + + /** + *

+ * Represents a collection of + * + * DomainName + * + * resources. + *

+ */ + public getDomainNames( + args: GetDomainNamesCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getDomainNames( + args: GetDomainNamesCommandInput, + cb: (err: any, data?: GetDomainNamesCommandOutput) => void + ): void; + public getDomainNames( + args: GetDomainNamesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetDomainNamesCommandOutput) => void + ): void; + public getDomainNames( + args: GetDomainNamesCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetDomainNamesCommandOutput) => void), + cb?: (err: any, data?: GetDomainNamesCommandOutput) => void + ): Promise | void { + const command = new GetDomainNamesCommand(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); + } + } + + /** + *

+ * Creates a customization of a + * + * GatewayResponse + * + * of a specified response type and status code on the given + * + * RestApi + * + * . + *

+ */ + public putGatewayResponse( + args: PutGatewayResponseCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public putGatewayResponse( + args: PutGatewayResponseCommandInput, + cb: (err: any, data?: PutGatewayResponseCommandOutput) => void + ): void; + public putGatewayResponse( + args: PutGatewayResponseCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: PutGatewayResponseCommandOutput) => void + ): void; + public putGatewayResponse( + args: PutGatewayResponseCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: PutGatewayResponseCommandOutput) => void), + cb?: (err: any, data?: PutGatewayResponseCommandOutput) => void + ): Promise | void { + const command = new PutGatewayResponseCommand(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); + } + } + + /** + *

+ * Deletes the + * + * ClientCertificate + * + * resource. + *

+ */ + public deleteClientCertificate( + args: DeleteClientCertificateCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public deleteClientCertificate( + args: DeleteClientCertificateCommandInput, + cb: (err: any, data?: DeleteClientCertificateCommandOutput) => void + ): void; + public deleteClientCertificate( + args: DeleteClientCertificateCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteClientCertificateCommandOutput) => void + ): void; + public deleteClientCertificate( + args: DeleteClientCertificateCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteClientCertificateCommandOutput) => void), + cb?: (err: any, data?: DeleteClientCertificateCommandOutput) => void + ): Promise | void { + const command = new DeleteClientCertificateCommand(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); + } + } + + /** + *

+ * Represents a put integration. + *

+ */ + public putIntegrationResponse( + args: PutIntegrationResponseCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public putIntegrationResponse( + args: PutIntegrationResponseCommandInput, + cb: (err: any, data?: PutIntegrationResponseCommandOutput) => void + ): void; + public putIntegrationResponse( + args: PutIntegrationResponseCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: PutIntegrationResponseCommandOutput) => void + ): void; + public putIntegrationResponse( + args: PutIntegrationResponseCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: PutIntegrationResponseCommandOutput) => void), + cb?: (err: any, data?: PutIntegrationResponseCommandOutput) => void + ): Promise | void { + const command = new PutIntegrationResponseCommand(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); + } + } + + /** + *

+ * Deletes a model. + *

+ */ + public deleteModel( + args: DeleteModelCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public deleteModel( + args: DeleteModelCommandInput, + cb: (err: any, data?: DeleteModelCommandOutput) => void + ): void; + public deleteModel( + args: DeleteModelCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteModelCommandOutput) => void + ): void; + public deleteModel( + args: DeleteModelCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteModelCommandOutput) => void), + cb?: (err: any, data?: DeleteModelCommandOutput) => void + ): Promise | void { + const command = new DeleteModelCommand(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); + } + } + + /** + *

+ * Changes information about an + * + * ApiKey + * + * resource. + *

+ */ + public updateApiKey( + args: UpdateApiKeyCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public updateApiKey( + args: UpdateApiKeyCommandInput, + cb: (err: any, data?: UpdateApiKeyCommandOutput) => void + ): void; + public updateApiKey( + args: UpdateApiKeyCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateApiKeyCommandOutput) => void + ): void; + public updateApiKey( + args: UpdateApiKeyCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateApiKeyCommandOutput) => void), + cb?: (err: any, data?: UpdateApiKeyCommandOutput) => void + ): Promise | void { + const command = new UpdateApiKeyCommand(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); + } + } + + /** + *

+ * Gets information about one or more + * + * Stage + * + * resources. + *

+ */ + public getStages( + args: GetStagesCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getStages( + args: GetStagesCommandInput, + cb: (err: any, data?: GetStagesCommandOutput) => void + ): void; + public getStages( + args: GetStagesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetStagesCommandOutput) => void + ): void; + public getStages( + args: GetStagesCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetStagesCommandOutput) => void), + cb?: (err: any, data?: GetStagesCommandOutput) => void + ): Promise | void { + const command = new GetStagesCommand(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); + } + } + + /** + *

+ * Deletes an existing + * + * Method + * + * resource. + *

+ */ + public deleteMethod( + args: DeleteMethodCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public deleteMethod( + args: DeleteMethodCommandInput, + cb: (err: any, data?: DeleteMethodCommandOutput) => void + ): void; + public deleteMethod( + args: DeleteMethodCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteMethodCommandOutput) => void + ): void; + public deleteMethod( + args: DeleteMethodCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteMethodCommandOutput) => void), + cb?: (err: any, data?: DeleteMethodCommandOutput) => void + ): Promise | void { + const command = new DeleteMethodCommand(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); + } + } + + /** + *

+ * Creates a usage plan key for adding an existing API key to a usage plan. + *

+ */ + public createUsagePlanKey( + args: CreateUsagePlanKeyCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public createUsagePlanKey( + args: CreateUsagePlanKeyCommandInput, + cb: (err: any, data?: CreateUsagePlanKeyCommandOutput) => void + ): void; + public createUsagePlanKey( + args: CreateUsagePlanKeyCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateUsagePlanKeyCommandOutput) => void + ): void; + public createUsagePlanKey( + args: CreateUsagePlanKeyCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateUsagePlanKeyCommandOutput) => void), + cb?: (err: any, data?: CreateUsagePlanKeyCommandOutput) => void + ): Promise | void { + const command = new CreateUsagePlanKeyCommand(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); + } + } + + /** + *

+ * A feature of the API Gateway control service for updating an existing API with an input of external API definitions. + * The update can take the form of merging the supplied definition into the existing API or overwriting the existing API. + *

+ */ + public putRestApi( + args: PutRestApiCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public putRestApi( + args: PutRestApiCommandInput, + cb: (err: any, data?: PutRestApiCommandOutput) => void + ): void; + public putRestApi( + args: PutRestApiCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: PutRestApiCommandOutput) => void + ): void; + public putRestApi( + args: PutRestApiCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: PutRestApiCommandOutput) => void), + cb?: (err: any, data?: PutRestApiCommandOutput) => void + ): Promise | void { + const command = new PutRestApiCommand(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 getDocumentationVersions( + args: GetDocumentationVersionsCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getDocumentationVersions( + args: GetDocumentationVersionsCommandInput, + cb: (err: any, data?: GetDocumentationVersionsCommandOutput) => void + ): void; + public getDocumentationVersions( + args: GetDocumentationVersionsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetDocumentationVersionsCommandOutput) => void + ): void; + public getDocumentationVersions( + args: GetDocumentationVersionsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetDocumentationVersionsCommandOutput) => void), + cb?: (err: any, data?: GetDocumentationVersionsCommandOutput) => void + ): Promise | void { + const command = new GetDocumentationVersionsCommand(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); + } + } + + /** + *

+ * Represents an update integration. + *

+ */ + public updateIntegration( + args: UpdateIntegrationCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public updateIntegration( + args: UpdateIntegrationCommandInput, + cb: (err: any, data?: UpdateIntegrationCommandOutput) => void + ): void; + public updateIntegration( + args: UpdateIntegrationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateIntegrationCommandOutput) => void + ): void; + public updateIntegration( + args: UpdateIntegrationCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateIntegrationCommandOutput) => void), + cb?: (err: any, data?: UpdateIntegrationCommandOutput) => void + ): Promise | void { + const command = new UpdateIntegrationCommand(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); + } + } + + /** + *

+ * Adds a new + * + * Authorizer + * + * resource to an existing + * + * RestApi + * + * resource. + *

+ * + */ + public createAuthorizer( + args: CreateAuthorizerCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public createAuthorizer( + args: CreateAuthorizerCommandInput, + cb: (err: any, data?: CreateAuthorizerCommandOutput) => void + ): void; + public createAuthorizer( + args: CreateAuthorizerCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateAuthorizerCommandOutput) => void + ): void; + public createAuthorizer( + args: CreateAuthorizerCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateAuthorizerCommandOutput) => void), + cb?: (err: any, data?: CreateAuthorizerCommandOutput) => void + ): Promise | void { + const command = new CreateAuthorizerCommand(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 createDocumentationPart( + args: CreateDocumentationPartCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public createDocumentationPart( + args: CreateDocumentationPartCommandInput, + cb: (err: any, data?: CreateDocumentationPartCommandOutput) => void + ): void; + public createDocumentationPart( + args: CreateDocumentationPartCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateDocumentationPartCommandOutput) => void + ): void; + public createDocumentationPart( + args: CreateDocumentationPartCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateDocumentationPartCommandOutput) => void), + cb?: (err: any, data?: CreateDocumentationPartCommandOutput) => void + ): Promise | void { + const command = new CreateDocumentationPartCommand(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); + } + } + + /** + *

+ * Deletes the + * + * ApiKey + * + * resource. + *

+ */ + public deleteApiKey( + args: DeleteApiKeyCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public deleteApiKey( + args: DeleteApiKeyCommandInput, + cb: (err: any, data?: DeleteApiKeyCommandOutput) => void + ): void; + public deleteApiKey( + args: DeleteApiKeyCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteApiKeyCommandOutput) => void + ): void; + public deleteApiKey( + args: DeleteApiKeyCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteApiKeyCommandOutput) => void), + cb?: (err: any, data?: DeleteApiKeyCommandOutput) => void + ): Promise | void { + const command = new DeleteApiKeyCommand(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); + } + } + + /** + *

+ * Represents a delete integration. + *

+ */ + public deleteIntegration( + args: DeleteIntegrationCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public deleteIntegration( + args: DeleteIntegrationCommandInput, + cb: (err: any, data?: DeleteIntegrationCommandOutput) => void + ): void; + public deleteIntegration( + args: DeleteIntegrationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteIntegrationCommandOutput) => void + ): void; + public deleteIntegration( + args: DeleteIntegrationCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteIntegrationCommandOutput) => void), + cb?: (err: any, data?: DeleteIntegrationCommandOutput) => void + ): Promise | void { + const command = new DeleteIntegrationCommand(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); + } + } + + /** + *

+ * Describe an existing + * + * Method + * + * resource. + *

+ */ + public getMethod( + args: GetMethodCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getMethod( + args: GetMethodCommandInput, + cb: (err: any, data?: GetMethodCommandOutput) => void + ): void; + public getMethod( + args: GetMethodCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetMethodCommandOutput) => void + ): void; + public getMethod( + args: GetMethodCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetMethodCommandOutput) => void), + cb?: (err: any, data?: GetMethodCommandOutput) => void + ): Promise | void { + const command = new GetMethodCommand(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); + } + } + + /** + *

+ * Gets the + * + * VpcLinks + * + * collection under the caller's account in a selected region. + *

+ */ + public getVpcLinks( + args: GetVpcLinksCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getVpcLinks( + args: GetVpcLinksCommandInput, + cb: (err: any, data?: GetVpcLinksCommandOutput) => void + ): void; + public getVpcLinks( + args: GetVpcLinksCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetVpcLinksCommandOutput) => void + ): void; + public getVpcLinks( + args: GetVpcLinksCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetVpcLinksCommandOutput) => void), + cb?: (err: any, data?: GetVpcLinksCommandOutput) => void + ): Promise | void { + const command = new GetVpcLinksCommand(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); + } + } + + /** + *

+ * Changes information about the + * + * DomainName + * + * resource. + *

+ */ + public updateDomainName( + args: UpdateDomainNameCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public updateDomainName( + args: UpdateDomainNameCommandInput, + cb: (err: any, data?: UpdateDomainNameCommandOutput) => void + ): void; + public updateDomainName( + args: UpdateDomainNameCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateDomainNameCommandOutput) => void + ): void; + public updateDomainName( + args: UpdateDomainNameCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateDomainNameCommandOutput) => void), + cb?: (err: any, data?: UpdateDomainNameCommandOutput) => void + ): Promise | void { + const command = new UpdateDomainNameCommand(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); + } + } + + /** + *

+ * Import API keys from an external source, such as a CSV-formatted file. + *

+ */ + public importApiKeys( + args: ImportApiKeysCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public importApiKeys( + args: ImportApiKeysCommandInput, + cb: (err: any, data?: ImportApiKeysCommandOutput) => void + ): void; + public importApiKeys( + args: ImportApiKeysCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ImportApiKeysCommandOutput) => void + ): void; + public importApiKeys( + args: ImportApiKeysCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ImportApiKeysCommandOutput) => void), + cb?: (err: any, data?: ImportApiKeysCommandOutput) => void + ): Promise | void { + const command = new ImportApiKeysCommand(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); + } + } + + /** + *

+ * Gets all the usage plans of the caller's account. + *

+ */ + public getUsagePlans( + args: GetUsagePlansCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getUsagePlans( + args: GetUsagePlansCommandInput, + cb: (err: any, data?: GetUsagePlansCommandOutput) => void + ): void; + public getUsagePlans( + args: GetUsagePlansCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetUsagePlansCommandOutput) => void + ): void; + public getUsagePlans( + args: GetUsagePlansCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetUsagePlansCommandOutput) => void), + cb?: (err: any, data?: GetUsagePlansCommandOutput) => void + ): Promise | void { + const command = new GetUsagePlansCommand(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); + } + } + + /** + *

+ * Deletes the + * + * DomainName + * + * resource. + *

+ */ + public deleteDomainName( + args: DeleteDomainNameCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public deleteDomainName( + args: DeleteDomainNameCommandInput, + cb: (err: any, data?: DeleteDomainNameCommandOutput) => void + ): void; + public deleteDomainName( + args: DeleteDomainNameCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteDomainNameCommandOutput) => void + ): void; + public deleteDomainName( + args: DeleteDomainNameCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteDomainNameCommandOutput) => void), + cb?: (err: any, data?: DeleteDomainNameCommandOutput) => void + ): Promise | void { + const command = new DeleteDomainNameCommand(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 getDocumentationPart( + args: GetDocumentationPartCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getDocumentationPart( + args: GetDocumentationPartCommandInput, + cb: (err: any, data?: GetDocumentationPartCommandOutput) => void + ): void; + public getDocumentationPart( + args: GetDocumentationPartCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetDocumentationPartCommandOutput) => void + ): void; + public getDocumentationPart( + args: GetDocumentationPartCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetDocumentationPartCommandOutput) => void), + cb?: (err: any, data?: GetDocumentationPartCommandOutput) => void + ): Promise | void { + const command = new GetDocumentationPartCommand(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); + } + } + + /** + *

+ * Deletes a usage plan of a given plan Id. + *

+ */ + public deleteUsagePlan( + args: DeleteUsagePlanCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public deleteUsagePlan( + args: DeleteUsagePlanCommandInput, + cb: (err: any, data?: DeleteUsagePlanCommandOutput) => void + ): void; + public deleteUsagePlan( + args: DeleteUsagePlanCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteUsagePlanCommandOutput) => void + ): void; + public deleteUsagePlan( + args: DeleteUsagePlanCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteUsagePlanCommandOutput) => void), + cb?: (err: any, data?: DeleteUsagePlanCommandOutput) => void + ): Promise | void { + const command = new DeleteUsagePlanCommand(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); + } + } + + /** + *

+ * Gets information about the current + * + * ApiKey + * + * resource. + *

+ */ + public getApiKey( + args: GetApiKeyCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getApiKey( + args: GetApiKeyCommandInput, + cb: (err: any, data?: GetApiKeyCommandOutput) => void + ): void; + public getApiKey( + args: GetApiKeyCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetApiKeyCommandOutput) => void + ): void; + public getApiKey( + args: GetApiKeyCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetApiKeyCommandOutput) => void), + cb?: (err: any, data?: GetApiKeyCommandOutput) => void + ): Promise | void { + const command = new GetApiKeyCommand(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); + } + } + + /** + *

+ * Updates an existing + * + * Method + * + * resource. + *

+ */ + public updateMethod( + args: UpdateMethodCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public updateMethod( + args: UpdateMethodCommandInput, + cb: (err: any, data?: UpdateMethodCommandOutput) => void + ): void; + public updateMethod( + args: UpdateMethodCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateMethodCommandOutput) => void + ): void; + public updateMethod( + args: UpdateMethodCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateMethodCommandOutput) => void), + cb?: (err: any, data?: UpdateMethodCommandOutput) => void + ): Promise | void { + const command = new UpdateMethodCommand(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); + } + } + + /** + *

+ * Creates a new + * + * RestApi + * + * resource. + *

+ */ + public createRestApi( + args: CreateRestApiCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public createRestApi( + args: CreateRestApiCommandInput, + cb: (err: any, data?: CreateRestApiCommandOutput) => void + ): void; + public createRestApi( + args: CreateRestApiCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateRestApiCommandOutput) => void + ): void; + public createRestApi( + args: CreateRestApiCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateRestApiCommandOutput) => void), + cb?: (err: any, data?: CreateRestApiCommandOutput) => void + ): Promise | void { + const command = new CreateRestApiCommand(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); + } + } + + /** + *

+ * Deletes a + * + * RequestValidator + * + * of a given + * + * RestApi + * + * . + *

+ */ + public deleteRequestValidator( + args: DeleteRequestValidatorCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public deleteRequestValidator( + args: DeleteRequestValidatorCommandInput, + cb: (err: any, data?: DeleteRequestValidatorCommandOutput) => void + ): void; + public deleteRequestValidator( + args: DeleteRequestValidatorCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteRequestValidatorCommandOutput) => void + ): void; + public deleteRequestValidator( + args: DeleteRequestValidatorCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteRequestValidatorCommandOutput) => void), + cb?: (err: any, data?: DeleteRequestValidatorCommandOutput) => void + ): Promise | void { + const command = new DeleteRequestValidatorCommand(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); + } + } + + /** + *

+ * Creates a new domain name. + *

+ */ + public createDomainName( + args: CreateDomainNameCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public createDomainName( + args: CreateDomainNameCommandInput, + cb: (err: any, data?: CreateDomainNameCommandOutput) => void + ): void; + public createDomainName( + args: CreateDomainNameCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateDomainNameCommandOutput) => void + ): void; + public createDomainName( + args: CreateDomainNameCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateDomainNameCommandOutput) => void), + cb?: (err: any, data?: CreateDomainNameCommandOutput) => void + ): Promise | void { + const command = new CreateDomainNameCommand(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); + } + } + + /** + *

+ * Gets all the usage plan keys representing the API keys added to a specified usage plan. + *

+ */ + public getUsagePlanKeys( + args: GetUsagePlanKeysCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getUsagePlanKeys( + args: GetUsagePlanKeysCommandInput, + cb: (err: any, data?: GetUsagePlanKeysCommandOutput) => void + ): void; + public getUsagePlanKeys( + args: GetUsagePlanKeysCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetUsagePlanKeysCommandOutput) => void + ): void; + public getUsagePlanKeys( + args: GetUsagePlanKeysCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetUsagePlanKeysCommandOutput) => void), + cb?: (err: any, data?: GetUsagePlanKeysCommandOutput) => void + ): Promise | void { + const command = new GetUsagePlanKeysCommand(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); + } + } + + /** + *

+ * Lists information about a resource. + *

+ */ + public getResource( + args: GetResourceCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getResource( + args: GetResourceCommandInput, + cb: (err: any, data?: GetResourceCommandOutput) => void + ): void; + public getResource( + args: GetResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetResourceCommandOutput) => void + ): void; + public getResource( + args: GetResourceCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetResourceCommandOutput) => void), + cb?: (err: any, data?: GetResourceCommandOutput) => void + ): Promise | void { + const command = new GetResourceCommand(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); + } + } + + /** + *

+ * Flushes a stage's cache. + *

+ */ + public flushStageCache( + args: FlushStageCacheCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public flushStageCache( + args: FlushStageCacheCommandInput, + cb: (err: any, data?: FlushStageCacheCommandOutput) => void + ): void; + public flushStageCache( + args: FlushStageCacheCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: FlushStageCacheCommandOutput) => void + ): void; + public flushStageCache( + args: FlushStageCacheCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: FlushStageCacheCommandOutput) => void), + cb?: (err: any, data?: FlushStageCacheCommandOutput) => void + ): Promise | void { + const command = new FlushStageCacheCommand(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); + } + } + + /** + *

+ * Changes information about a + * + * Stage + * + * resource. + *

+ */ + public updateStage( + args: UpdateStageCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public updateStage( + args: UpdateStageCommandInput, + cb: (err: any, data?: UpdateStageCommandOutput) => void + ): void; + public updateStage( + args: UpdateStageCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateStageCommandOutput) => void + ): void; + public updateStage( + args: UpdateStageCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateStageCommandOutput) => void), + cb?: (err: any, data?: UpdateStageCommandOutput) => void + ): Promise | void { + const command = new UpdateStageCommand(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); + } + } + + /** + *

+ * Generates a + * + * ClientCertificate + * + * resource. + *

+ */ + public generateClientCertificate( + args: GenerateClientCertificateCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public generateClientCertificate( + args: GenerateClientCertificateCommandInput, + cb: (err: any, data?: GenerateClientCertificateCommandOutput) => void + ): void; + public generateClientCertificate( + args: GenerateClientCertificateCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GenerateClientCertificateCommandOutput) => void + ): void; + public generateClientCertificate( + args: GenerateClientCertificateCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GenerateClientCertificateCommandOutput) => void), + cb?: (err: any, data?: GenerateClientCertificateCommandOutput) => void + ): Promise | void { + const command = new GenerateClientCertificateCommand(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); + } + } + + /** + *

+ * Gets a + * + * RequestValidator + * + * of a given + * + * RestApi + * + * . + *

+ */ + public getRequestValidator( + args: GetRequestValidatorCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getRequestValidator( + args: GetRequestValidatorCommandInput, + cb: (err: any, data?: GetRequestValidatorCommandOutput) => void + ): void; + public getRequestValidator( + args: GetRequestValidatorCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetRequestValidatorCommandOutput) => void + ): void; + public getRequestValidator( + args: GetRequestValidatorCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetRequestValidatorCommandOutput) => void), + cb?: (err: any, data?: GetRequestValidatorCommandOutput) => void + ): Promise | void { + const command = new GetRequestValidatorCommand(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); + } + } + + /** + *

+ * Represents a collection of + * + * BasePathMapping + * + * resources. + *

+ */ + public getBasePathMappings( + args: GetBasePathMappingsCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getBasePathMappings( + args: GetBasePathMappingsCommandInput, + cb: (err: any, data?: GetBasePathMappingsCommandOutput) => void + ): void; + public getBasePathMappings( + args: GetBasePathMappingsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetBasePathMappingsCommandOutput) => void + ): void; + public getBasePathMappings( + args: GetBasePathMappingsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetBasePathMappingsCommandOutput) => void), + cb?: (err: any, data?: GetBasePathMappingsCommandOutput) => void + ): Promise | void { + const command = new GetBasePathMappingsCommand(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 createDocumentationVersion( + args: CreateDocumentationVersionCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public createDocumentationVersion( + args: CreateDocumentationVersionCommandInput, + cb: (err: any, data?: CreateDocumentationVersionCommandOutput) => void + ): void; + public createDocumentationVersion( + args: CreateDocumentationVersionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateDocumentationVersionCommandOutput) => void + ): void; + public createDocumentationVersion( + args: CreateDocumentationVersionCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateDocumentationVersionCommandOutput) => void), + cb?: (err: any, data?: CreateDocumentationVersionCommandOutput) => void + ): Promise | void { + const command = new CreateDocumentationVersionCommand(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); + } + } + + /** + *

+ * Generates a sample mapping template that can be used to transform a payload into the structure of a model. + *

+ */ + public getModelTemplate( + args: GetModelTemplateCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getModelTemplate( + args: GetModelTemplateCommandInput, + cb: (err: any, data?: GetModelTemplateCommandOutput) => void + ): void; + public getModelTemplate( + args: GetModelTemplateCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetModelTemplateCommandOutput) => void + ): void; + public getModelTemplate( + args: GetModelTemplateCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetModelTemplateCommandOutput) => void), + cb?: (err: any, data?: GetModelTemplateCommandOutput) => void + ): Promise | void { + const command = new GetModelTemplateCommand(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); + } + } + + /** + *

+ * Creates a new + * + * BasePathMapping + * + * resource. + *

+ */ + public createBasePathMapping( + args: CreateBasePathMappingCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public createBasePathMapping( + args: CreateBasePathMappingCommandInput, + cb: (err: any, data?: CreateBasePathMappingCommandOutput) => void + ): void; + public createBasePathMapping( + args: CreateBasePathMappingCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateBasePathMappingCommandOutput) => void + ): void; + public createBasePathMapping( + args: CreateBasePathMappingCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateBasePathMappingCommandOutput) => void), + cb?: (err: any, data?: CreateBasePathMappingCommandOutput) => void + ): Promise | void { + const command = new CreateBasePathMappingCommand(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); + } + } + + /** + *

+ * Describe an existing + * + * Authorizer + * + * resource. + *

+ * + */ + public getAuthorizer( + args: GetAuthorizerCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getAuthorizer( + args: GetAuthorizerCommandInput, + cb: (err: any, data?: GetAuthorizerCommandOutput) => void + ): void; + public getAuthorizer( + args: GetAuthorizerCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetAuthorizerCommandOutput) => void + ): void; + public getAuthorizer( + args: GetAuthorizerCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetAuthorizerCommandOutput) => void), + cb?: (err: any, data?: GetAuthorizerCommandOutput) => void + ): Promise | void { + const command = new GetAuthorizerCommand(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); + } + } + + /** + *

+ * Gets information about a + * + * Deployment + * + * resource. + *

+ */ + public getDeployment( + args: GetDeploymentCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getDeployment( + args: GetDeploymentCommandInput, + cb: (err: any, data?: GetDeploymentCommandOutput) => void + ): void; + public getDeployment( + args: GetDeploymentCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetDeploymentCommandOutput) => void + ): void; + public getDeployment( + args: GetDeploymentCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetDeploymentCommandOutput) => void), + cb?: (err: any, data?: GetDeploymentCommandOutput) => void + ): Promise | void { + const command = new GetDeploymentCommand(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); + } + } + + /** + *

+ * Describes an existing model defined for a + * + * RestApi + * + * resource. + *

+ */ + public getModel( + args: GetModelCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getModel( + args: GetModelCommandInput, + cb: (err: any, data?: GetModelCommandOutput) => void + ): void; + public getModel( + args: GetModelCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetModelCommandOutput) => void + ): void; + public getModel( + args: GetModelCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetModelCommandOutput) => void), + cb?: (err: any, data?: GetModelCommandOutput) => void + ): Promise | void { + const command = new GetModelCommand(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); + } + } + + /** + *

+ * Gets information about a + * + * Deployments + * + * collection. + *

+ */ + public getDeployments( + args: GetDeploymentsCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getDeployments( + args: GetDeploymentsCommandInput, + cb: (err: any, data?: GetDeploymentsCommandOutput) => void + ): void; + public getDeployments( + args: GetDeploymentsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetDeploymentsCommandOutput) => void + ): void; + public getDeployments( + args: GetDeploymentsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetDeploymentsCommandOutput) => void), + cb?: (err: any, data?: GetDeploymentsCommandOutput) => void + ): Promise | void { + const command = new GetDeploymentsCommand(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); + } + } + + /** + *

+ * Gets information about the current + * + * ApiKeys + * + * resource. + *

+ */ + public getApiKeys( + args: GetApiKeysCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getApiKeys( + args: GetApiKeysCommandInput, + cb: (err: any, data?: GetApiKeysCommandOutput) => void + ): void; + public getApiKeys( + args: GetApiKeysCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetApiKeysCommandOutput) => void + ): void; + public getApiKeys( + args: GetApiKeysCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetApiKeysCommandOutput) => void), + cb?: (err: any, data?: GetApiKeysCommandOutput) => void + ): Promise | void { + const command = new GetApiKeysCommand(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); + } + } + + /** + *

+ * Removes a tag from a given resource. + *

+ */ + public untagResource( + args: UntagResourceCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public untagResource( + args: UntagResourceCommandInput, + cb: (err: any, data?: UntagResourceCommandOutput) => void + ): void; + public untagResource( + args: UntagResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UntagResourceCommandOutput) => void + ): void; + public untagResource( + args: UntagResourceCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UntagResourceCommandOutput) => void), + cb?: (err: any, data?: UntagResourceCommandOutput) => void + ): Promise | void { + const command = new UntagResourceCommand(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); + } + } + + /** + *

+ * Represents a domain name that is contained in a simpler, more intuitive URL that can be called. + *

+ */ + public getDomainName( + args: GetDomainNameCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getDomainName( + args: GetDomainNameCommandInput, + cb: (err: any, data?: GetDomainNameCommandOutput) => void + ): void; + public getDomainName( + args: GetDomainNameCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetDomainNameCommandOutput) => void + ): void; + public getDomainName( + args: GetDomainNameCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetDomainNameCommandOutput) => void), + cb?: (err: any, data?: GetDomainNameCommandOutput) => void + ): Promise | void { + const command = new GetDomainNameCommand(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); + } + } + + /** + *

+ * Describes existing + * + * Models + * + * defined for a + * + * RestApi + * + * resource. + *

+ */ + public getModels( + args: GetModelsCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getModels( + args: GetModelsCommandInput, + cb: (err: any, data?: GetModelsCommandOutput) => void + ): void; + public getModels( + args: GetModelsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetModelsCommandOutput) => void + ): void; + public getModels( + args: GetModelsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetModelsCommandOutput) => void), + cb?: (err: any, data?: GetModelsCommandOutput) => void + ): Promise | void { + const command = new GetModelsCommand(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); + } + } + + /** + *

+ * Simulate the execution of an + * + * Authorizer + * + * in your + * + * RestApi + * + * with headers, parameters, and an incoming request body. + *

+ * + */ + public testInvokeAuthorizer( + args: TestInvokeAuthorizerCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public testInvokeAuthorizer( + args: TestInvokeAuthorizerCommandInput, + cb: (err: any, data?: TestInvokeAuthorizerCommandOutput) => void + ): void; + public testInvokeAuthorizer( + args: TestInvokeAuthorizerCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: TestInvokeAuthorizerCommandOutput) => void + ): void; + public testInvokeAuthorizer( + args: TestInvokeAuthorizerCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: TestInvokeAuthorizerCommandOutput) => void), + cb?: (err: any, data?: TestInvokeAuthorizerCommandOutput) => void + ): Promise | void { + const command = new TestInvokeAuthorizerCommand(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); + } + } + + /** + *

+ * Deletes the + * + * BasePathMapping + * + * resource. + *

+ */ + public deleteBasePathMapping( + args: DeleteBasePathMappingCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public deleteBasePathMapping( + args: DeleteBasePathMappingCommandInput, + cb: (err: any, data?: DeleteBasePathMappingCommandOutput) => void + ): void; + public deleteBasePathMapping( + args: DeleteBasePathMappingCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteBasePathMappingCommandOutput) => void + ): void; + public deleteBasePathMapping( + args: DeleteBasePathMappingCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteBasePathMappingCommandOutput) => void), + cb?: (err: any, data?: DeleteBasePathMappingCommandOutput) => void + ): Promise | void { + const command = new DeleteBasePathMappingCommand(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); + } + } + + /** + *

+ * Gets a usage plan key of a given key identifier. + *

+ */ + public getUsagePlanKey( + args: GetUsagePlanKeyCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getUsagePlanKey( + args: GetUsagePlanKeyCommandInput, + cb: (err: any, data?: GetUsagePlanKeyCommandOutput) => void + ): void; + public getUsagePlanKey( + args: GetUsagePlanKeyCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetUsagePlanKeyCommandOutput) => void + ): void; + public getUsagePlanKey( + args: GetUsagePlanKeyCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetUsagePlanKeyCommandOutput) => void), + cb?: (err: any, data?: GetUsagePlanKeyCommandOutput) => void + ): Promise | void { + const command = new GetUsagePlanKeyCommand(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); + } + } + + /** + *

+ * Lists information about a collection of + * + * Resource + * + * resources. + *

+ */ + public getResources( + args: GetResourcesCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getResources( + args: GetResourcesCommandInput, + cb: (err: any, data?: GetResourcesCommandOutput) => void + ): void; + public getResources( + args: GetResourcesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetResourcesCommandOutput) => void + ): void; + public getResources( + args: GetResourcesCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetResourcesCommandOutput) => void), + cb?: (err: any, data?: GetResourcesCommandOutput) => void + ): Promise | void { + const command = new GetResourcesCommand(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); + } + } + + /** + *

+ * Grants a temporary extension to the remaining quota of a usage plan associated with a specified API key. + *

+ */ + public updateUsage( + args: UpdateUsageCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public updateUsage( + args: UpdateUsageCommandInput, + cb: (err: any, data?: UpdateUsageCommandOutput) => void + ): void; + public updateUsage( + args: UpdateUsageCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateUsageCommandOutput) => void + ): void; + public updateUsage( + args: UpdateUsageCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateUsageCommandOutput) => void), + cb?: (err: any, data?: UpdateUsageCommandOutput) => void + ): Promise | void { + const command = new UpdateUsageCommand(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); + } + } + + /** + *

+ * Flushes all authorizer cache entries on a stage. + *

+ */ + public flushStageAuthorizersCache( + args: FlushStageAuthorizersCacheCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public flushStageAuthorizersCache( + args: FlushStageAuthorizersCacheCommandInput, + cb: (err: any, data?: FlushStageAuthorizersCacheCommandOutput) => void + ): void; + public flushStageAuthorizersCache( + args: FlushStageAuthorizersCacheCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: FlushStageAuthorizersCacheCommandOutput) => void + ): void; + public flushStageAuthorizersCache( + args: FlushStageAuthorizersCacheCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: FlushStageAuthorizersCacheCommandOutput) => void), + cb?: (err: any, data?: FlushStageAuthorizersCacheCommandOutput) => void + ): Promise | void { + const command = new FlushStageAuthorizersCacheCommand(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 updateDocumentationVersion( + args: UpdateDocumentationVersionCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public updateDocumentationVersion( + args: UpdateDocumentationVersionCommandInput, + cb: (err: any, data?: UpdateDocumentationVersionCommandOutput) => void + ): void; + public updateDocumentationVersion( + args: UpdateDocumentationVersionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateDocumentationVersionCommandOutput) => void + ): void; + public updateDocumentationVersion( + args: UpdateDocumentationVersionCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateDocumentationVersionCommandOutput) => void), + cb?: (err: any, data?: UpdateDocumentationVersionCommandOutput) => void + ): Promise | void { + const command = new UpdateDocumentationVersionCommand(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); + } + } + + /** + *

+ * Updates an existing + * + * MethodResponse + * + * resource. + *

+ */ + public updateMethodResponse( + args: UpdateMethodResponseCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public updateMethodResponse( + args: UpdateMethodResponseCommandInput, + cb: (err: any, data?: UpdateMethodResponseCommandOutput) => void + ): void; + public updateMethodResponse( + args: UpdateMethodResponseCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateMethodResponseCommandOutput) => void + ): void; + public updateMethodResponse( + args: UpdateMethodResponseCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateMethodResponseCommandOutput) => void), + cb?: (err: any, data?: UpdateMethodResponseCommandOutput) => void + ): Promise | void { + const command = new UpdateMethodResponseCommand(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); + } + } + + /** + *

+ * Deletes an existing + * + * MethodResponse + * + * resource. + *

+ */ + public deleteMethodResponse( + args: DeleteMethodResponseCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public deleteMethodResponse( + args: DeleteMethodResponseCommandInput, + cb: (err: any, data?: DeleteMethodResponseCommandOutput) => void + ): void; + public deleteMethodResponse( + args: DeleteMethodResponseCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteMethodResponseCommandOutput) => void + ): void; + public deleteMethodResponse( + args: DeleteMethodResponseCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteMethodResponseCommandOutput) => void), + cb?: (err: any, data?: DeleteMethodResponseCommandOutput) => void + ): Promise | void { + const command = new DeleteMethodResponseCommand(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 getDocumentationParts( + args: GetDocumentationPartsCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getDocumentationParts( + args: GetDocumentationPartsCommandInput, + cb: (err: any, data?: GetDocumentationPartsCommandOutput) => void + ): void; + public getDocumentationParts( + args: GetDocumentationPartsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetDocumentationPartsCommandOutput) => void + ): void; + public getDocumentationParts( + args: GetDocumentationPartsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetDocumentationPartsCommandOutput) => void), + cb?: (err: any, data?: GetDocumentationPartsCommandOutput) => void + ): Promise | void { + const command = new GetDocumentationPartsCommand(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); + } + } + + /** + *

+ * Creates a VPC link, under the caller's account in a selected region, in an asynchronous operation that typically takes 2-4 minutes to complete and become operational. The caller must have permissions to create and update VPC Endpoint services. + *

+ */ + public createVpcLink( + args: CreateVpcLinkCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public createVpcLink( + args: CreateVpcLinkCommandInput, + cb: (err: any, data?: CreateVpcLinkCommandOutput) => void + ): void; + public createVpcLink( + args: CreateVpcLinkCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateVpcLinkCommandOutput) => void + ): void; + public createVpcLink( + args: CreateVpcLinkCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateVpcLinkCommandOutput) => void), + cb?: (err: any, data?: CreateVpcLinkCommandOutput) => void + ): Promise | void { + const command = new CreateVpcLinkCommand(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); + } + } + + /** + *

+ * Creates a + * + * Resource + * + * resource. + *

+ */ + public createResource( + args: CreateResourceCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public createResource( + args: CreateResourceCommandInput, + cb: (err: any, data?: CreateResourceCommandOutput) => void + ): void; + public createResource( + args: CreateResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateResourceCommandOutput) => void + ): void; + public createResource( + args: CreateResourceCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateResourceCommandOutput) => void), + cb?: (err: any, data?: CreateResourceCommandOutput) => void + ): Promise | void { + const command = new CreateResourceCommand(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 importDocumentationParts( + args: ImportDocumentationPartsCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public importDocumentationParts( + args: ImportDocumentationPartsCommandInput, + cb: (err: any, data?: ImportDocumentationPartsCommandOutput) => void + ): void; + public importDocumentationParts( + args: ImportDocumentationPartsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ImportDocumentationPartsCommandOutput) => void + ): void; + public importDocumentationParts( + args: ImportDocumentationPartsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ImportDocumentationPartsCommandOutput) => void), + cb?: (err: any, data?: ImportDocumentationPartsCommandOutput) => void + ): Promise | void { + const command = new ImportDocumentationPartsCommand(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); + } + } + + /** + *

+ * Creates a + * + * Deployment + * + * resource, which makes a specified + * + * RestApi + * + * callable over the internet. + *

+ */ + public createDeployment( + args: CreateDeploymentCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public createDeployment( + args: CreateDeploymentCommandInput, + cb: (err: any, data?: CreateDeploymentCommandOutput) => void + ): void; + public createDeployment( + args: CreateDeploymentCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateDeploymentCommandOutput) => void + ): void; + public createDeployment( + args: CreateDeploymentCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateDeploymentCommandOutput) => void), + cb?: (err: any, data?: CreateDeploymentCommandOutput) => void + ): Promise | void { + const command = new CreateDeploymentCommand(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); + } + } + + /** + *

+ * Get the integration settings. + *

+ */ + public getIntegration( + args: GetIntegrationCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getIntegration( + args: GetIntegrationCommandInput, + cb: (err: any, data?: GetIntegrationCommandOutput) => void + ): void; + public getIntegration( + args: GetIntegrationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetIntegrationCommandOutput) => void + ): void; + public getIntegration( + args: GetIntegrationCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetIntegrationCommandOutput) => void), + cb?: (err: any, data?: GetIntegrationCommandOutput) => void + ): Promise | void { + const command = new GetIntegrationCommand(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); + } + } + + /** + *

+ * Gets a usage plan of a given plan identifier. + *

+ */ + public getUsagePlan( + args: GetUsagePlanCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getUsagePlan( + args: GetUsagePlanCommandInput, + cb: (err: any, data?: GetUsagePlanCommandOutput) => void + ): void; + public getUsagePlan( + args: GetUsagePlanCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetUsagePlanCommandOutput) => void + ): void; + public getUsagePlan( + args: GetUsagePlanCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetUsagePlanCommandOutput) => void), + cb?: (err: any, data?: GetUsagePlanCommandOutput) => void + ): Promise | void { + const command = new GetUsagePlanCommand(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); + } + } + + /** + *

+ * Deletes an existing + * + * VpcLink + * + * of a specified identifier. + *

+ */ + public deleteVpcLink( + args: DeleteVpcLinkCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public deleteVpcLink( + args: DeleteVpcLinkCommandInput, + cb: (err: any, data?: DeleteVpcLinkCommandOutput) => void + ): void; + public deleteVpcLink( + args: DeleteVpcLinkCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteVpcLinkCommandOutput) => void + ): void; + public deleteVpcLink( + args: DeleteVpcLinkCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteVpcLinkCommandOutput) => void), + cb?: (err: any, data?: DeleteVpcLinkCommandOutput) => void + ): Promise | void { + const command = new DeleteVpcLinkCommand(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); + } + } + + /** + *

+ * Represents a delete integration response. + *

+ */ + public deleteIntegrationResponse( + args: DeleteIntegrationResponseCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public deleteIntegrationResponse( + args: DeleteIntegrationResponseCommandInput, + cb: (err: any, data?: DeleteIntegrationResponseCommandOutput) => void + ): void; + public deleteIntegrationResponse( + args: DeleteIntegrationResponseCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteIntegrationResponseCommandOutput) => void + ): void; + public deleteIntegrationResponse( + args: DeleteIntegrationResponseCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteIntegrationResponseCommandOutput) => void), + cb?: (err: any, data?: DeleteIntegrationResponseCommandOutput) => void + ): Promise | void { + const command = new DeleteIntegrationResponseCommand(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); + } + } + + /** + *

+ * Updates a usage plan of a given plan Id. + *

+ */ + public updateUsagePlan( + args: UpdateUsagePlanCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public updateUsagePlan( + args: UpdateUsagePlanCommandInput, + cb: (err: any, data?: UpdateUsagePlanCommandOutput) => void + ): void; + public updateUsagePlan( + args: UpdateUsagePlanCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateUsagePlanCommandOutput) => void + ): void; + public updateUsagePlan( + args: UpdateUsagePlanCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateUsagePlanCommandOutput) => void), + cb?: (err: any, data?: UpdateUsagePlanCommandOutput) => void + ): Promise | void { + const command = new UpdateUsagePlanCommand(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); + } + } + + /** + *

+ * Gets a + * + * GatewayResponse + * + * of a specified response type on the given + * + * RestApi + * + * . + *

+ */ + public getGatewayResponse( + args: GetGatewayResponseCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getGatewayResponse( + args: GetGatewayResponseCommandInput, + cb: (err: any, data?: GetGatewayResponseCommandOutput) => void + ): void; + public getGatewayResponse( + args: GetGatewayResponseCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetGatewayResponseCommandOutput) => void + ): void; + public getGatewayResponse( + args: GetGatewayResponseCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetGatewayResponseCommandOutput) => void), + cb?: (err: any, data?: GetGatewayResponseCommandOutput) => void + ): Promise | void { + const command = new GetGatewayResponseCommand(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); + } + } + + /** + *

+ * Deletes a usage plan key and remove the underlying API key from the associated usage plan. + *

+ */ + public deleteUsagePlanKey( + args: DeleteUsagePlanKeyCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public deleteUsagePlanKey( + args: DeleteUsagePlanKeyCommandInput, + cb: (err: any, data?: DeleteUsagePlanKeyCommandOutput) => void + ): void; + public deleteUsagePlanKey( + args: DeleteUsagePlanKeyCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteUsagePlanKeyCommandOutput) => void + ): void; + public deleteUsagePlanKey( + args: DeleteUsagePlanKeyCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteUsagePlanKeyCommandOutput) => void), + cb?: (err: any, data?: DeleteUsagePlanKeyCommandOutput) => void + ): Promise | void { + const command = new DeleteUsagePlanKeyCommand(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); + } + } + + /** + *

+ * Represents an update integration response. + *

+ */ + public updateIntegrationResponse( + args: UpdateIntegrationResponseCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public updateIntegrationResponse( + args: UpdateIntegrationResponseCommandInput, + cb: (err: any, data?: UpdateIntegrationResponseCommandOutput) => void + ): void; + public updateIntegrationResponse( + args: UpdateIntegrationResponseCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateIntegrationResponseCommandOutput) => void + ): void; + public updateIntegrationResponse( + args: UpdateIntegrationResponseCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateIntegrationResponseCommandOutput) => void), + cb?: (err: any, data?: UpdateIntegrationResponseCommandOutput) => void + ): Promise | void { + const command = new UpdateIntegrationResponseCommand(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); + } + } + + /** + *

+ * Gets a specified VPC link under the caller's account in a region. + *

+ */ + public getVpcLink( + args: GetVpcLinkCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getVpcLink( + args: GetVpcLinkCommandInput, + cb: (err: any, data?: GetVpcLinkCommandOutput) => void + ): void; + public getVpcLink( + args: GetVpcLinkCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetVpcLinkCommandOutput) => void + ): void; + public getVpcLink( + args: GetVpcLinkCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetVpcLinkCommandOutput) => void), + cb?: (err: any, data?: GetVpcLinkCommandOutput) => void + ): Promise | void { + const command = new GetVpcLinkCommand(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 getDocumentationVersion( + args: GetDocumentationVersionCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getDocumentationVersion( + args: GetDocumentationVersionCommandInput, + cb: (err: any, data?: GetDocumentationVersionCommandOutput) => void + ): void; + public getDocumentationVersion( + args: GetDocumentationVersionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetDocumentationVersionCommandOutput) => void + ): void; + public getDocumentationVersion( + args: GetDocumentationVersionCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetDocumentationVersionCommandOutput) => void), + cb?: (err: any, data?: GetDocumentationVersionCommandOutput) => void + ): Promise | void { + const command = new GetDocumentationVersionCommand(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); + } + } + + /** + *

+ * Adds a + * + * MethodResponse + * + * to an existing + * + * Method + * + * resource. + *

+ */ + public putMethodResponse( + args: PutMethodResponseCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public putMethodResponse( + args: PutMethodResponseCommandInput, + cb: (err: any, data?: PutMethodResponseCommandOutput) => void + ): void; + public putMethodResponse( + args: PutMethodResponseCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: PutMethodResponseCommandOutput) => void + ): void; + public putMethodResponse( + args: PutMethodResponseCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: PutMethodResponseCommandOutput) => void), + cb?: (err: any, data?: PutMethodResponseCommandOutput) => void + ): Promise | void { + const command = new PutMethodResponseCommand(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); + } + } + + /** + *

+ * Changes information about the + * + * BasePathMapping + * + * resource. + *

+ */ + public updateBasePathMapping( + args: UpdateBasePathMappingCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public updateBasePathMapping( + args: UpdateBasePathMappingCommandInput, + cb: (err: any, data?: UpdateBasePathMappingCommandOutput) => void + ): void; + public updateBasePathMapping( + args: UpdateBasePathMappingCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateBasePathMappingCommandOutput) => void + ): void; + public updateBasePathMapping( + args: UpdateBasePathMappingCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateBasePathMappingCommandOutput) => void), + cb?: (err: any, data?: UpdateBasePathMappingCommandOutput) => void + ): Promise | void { + const command = new UpdateBasePathMappingCommand(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); + } + } + + /** + *

+ * Describe a + * + * BasePathMapping + * + * resource. + *

+ */ + public getBasePathMapping( + args: GetBasePathMappingCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getBasePathMapping( + args: GetBasePathMappingCommandInput, + cb: (err: any, data?: GetBasePathMappingCommandOutput) => void + ): void; + public getBasePathMapping( + args: GetBasePathMappingCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetBasePathMappingCommandOutput) => void + ): void; + public getBasePathMapping( + args: GetBasePathMappingCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetBasePathMappingCommandOutput) => void), + cb?: (err: any, data?: GetBasePathMappingCommandOutput) => void + ): Promise | void { + const command = new GetBasePathMappingCommand(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); + } + } + + /** + *

+ * Changes information about the specified API. + *

+ */ + public updateRestApi( + args: UpdateRestApiCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public updateRestApi( + args: UpdateRestApiCommandInput, + cb: (err: any, data?: UpdateRestApiCommandOutput) => void + ): void; + public updateRestApi( + args: UpdateRestApiCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateRestApiCommandOutput) => void + ): void; + public updateRestApi( + args: UpdateRestApiCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateRestApiCommandOutput) => void), + cb?: (err: any, data?: UpdateRestApiCommandOutput) => void + ): Promise | void { + const command = new UpdateRestApiCommand(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); + } + } + + /** + *

+ * Gets information about the current + * + * Account + * + * resource. + *

+ */ + public getAccount( + args: GetAccountCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getAccount( + args: GetAccountCommandInput, + cb: (err: any, data?: GetAccountCommandOutput) => void + ): void; + public getAccount( + args: GetAccountCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetAccountCommandOutput) => void + ): void; + public getAccount( + args: GetAccountCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetAccountCommandOutput) => void), + cb?: (err: any, data?: GetAccountCommandOutput) => void + ): Promise | void { + const command = new GetAccountCommand(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); + } + } + + /** + *

+ * Updates an existing + * + * VpcLink + * + * of a specified identifier. + *

+ */ + public updateVpcLink( + args: UpdateVpcLinkCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public updateVpcLink( + args: UpdateVpcLinkCommandInput, + cb: (err: any, data?: UpdateVpcLinkCommandOutput) => void + ): void; + public updateVpcLink( + args: UpdateVpcLinkCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateVpcLinkCommandOutput) => void + ): void; + public updateVpcLink( + args: UpdateVpcLinkCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateVpcLinkCommandOutput) => void), + cb?: (err: any, data?: UpdateVpcLinkCommandOutput) => void + ): Promise | void { + const command = new UpdateVpcLinkCommand(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); + } + } + + /** + *

+ * Deletes a + * + * Stage + * + * resource. + *

+ */ + public deleteStage( + args: DeleteStageCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public deleteStage( + args: DeleteStageCommandInput, + cb: (err: any, data?: DeleteStageCommandOutput) => void + ): void; + public deleteStage( + args: DeleteStageCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteStageCommandOutput) => void + ): void; + public deleteStage( + args: DeleteStageCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteStageCommandOutput) => void), + cb?: (err: any, data?: DeleteStageCommandOutput) => void + ): Promise | void { + const command = new DeleteStageCommand(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); + } + } + + /** + *

+ * Adds or updates a tag on a given resource. + *

+ */ + public tagResource( + args: TagResourceCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public tagResource( + args: TagResourceCommandInput, + cb: (err: any, data?: TagResourceCommandOutput) => void + ): void; + public tagResource( + args: TagResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: TagResourceCommandOutput) => void + ): void; + public tagResource( + args: TagResourceCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: TagResourceCommandOutput) => void), + cb?: (err: any, data?: TagResourceCommandOutput) => void + ): Promise | void { + const command = new TagResourceCommand(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); + } + } + + /** + *

+ * Describe an existing + * + * Authorizers + * + * resource. + *

+ * + */ + public getAuthorizers( + args: GetAuthorizersCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getAuthorizers( + args: GetAuthorizersCommandInput, + cb: (err: any, data?: GetAuthorizersCommandOutput) => void + ): void; + public getAuthorizers( + args: GetAuthorizersCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetAuthorizersCommandOutput) => void + ): void; + public getAuthorizers( + args: GetAuthorizersCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetAuthorizersCommandOutput) => void), + cb?: (err: any, data?: GetAuthorizersCommandOutput) => void + ): Promise | void { + const command = new GetAuthorizersCommand(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); + } + } + + /** + *

+ * Simulate the execution of a + * + * Method + * + * in your + * + * RestApi + * + * with headers, parameters, and an incoming request body. + *

+ */ + public testInvokeMethod( + args: TestInvokeMethodCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public testInvokeMethod( + args: TestInvokeMethodCommandInput, + cb: (err: any, data?: TestInvokeMethodCommandOutput) => void + ): void; + public testInvokeMethod( + args: TestInvokeMethodCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: TestInvokeMethodCommandOutput) => void + ): void; + public testInvokeMethod( + args: TestInvokeMethodCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: TestInvokeMethodCommandOutput) => void), + cb?: (err: any, data?: TestInvokeMethodCommandOutput) => void + ): Promise | void { + const command = new TestInvokeMethodCommand(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); + } + } + + /** + *

+ * Describes a + * + * MethodResponse + * + * resource. + *

+ */ + public getMethodResponse( + args: GetMethodResponseCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getMethodResponse( + args: GetMethodResponseCommandInput, + cb: (err: any, data?: GetMethodResponseCommandOutput) => void + ): void; + public getMethodResponse( + args: GetMethodResponseCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetMethodResponseCommandOutput) => void + ): void; + public getMethodResponse( + args: GetMethodResponseCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetMethodResponseCommandOutput) => void), + cb?: (err: any, data?: GetMethodResponseCommandOutput) => void + ): Promise | void { + const command = new GetMethodResponseCommand(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); + } + } + + /** + *

+ * Lists the + * + * RestApi + * + * resource in the collection. + *

+ */ + public getRestApi( + args: GetRestApiCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getRestApi( + args: GetRestApiCommandInput, + cb: (err: any, data?: GetRestApiCommandOutput) => void + ): void; + public getRestApi( + args: GetRestApiCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetRestApiCommandOutput) => void + ): void; + public getRestApi( + args: GetRestApiCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetRestApiCommandOutput) => void), + cb?: (err: any, data?: GetRestApiCommandOutput) => void + ): Promise | void { + const command = new GetRestApiCommand(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); + } + } + + /** + *

+ * Deletes the specified API. + *

+ */ + public deleteRestApi( + args: DeleteRestApiCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public deleteRestApi( + args: DeleteRestApiCommandInput, + cb: (err: any, data?: DeleteRestApiCommandOutput) => void + ): void; + public deleteRestApi( + args: DeleteRestApiCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteRestApiCommandOutput) => void + ): void; + public deleteRestApi( + args: DeleteRestApiCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteRestApiCommandOutput) => void), + cb?: (err: any, data?: DeleteRestApiCommandOutput) => void + ): Promise | void { + const command = new DeleteRestApiCommand(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); + } + } + + /** + *

+ * A feature of the API Gateway control service for creating a new API from an external API definition file. + *

+ */ + public importRestApi( + args: ImportRestApiCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public importRestApi( + args: ImportRestApiCommandInput, + cb: (err: any, data?: ImportRestApiCommandOutput) => void + ): void; + public importRestApi( + args: ImportRestApiCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ImportRestApiCommandOutput) => void + ): void; + public importRestApi( + args: ImportRestApiCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ImportRestApiCommandOutput) => void), + cb?: (err: any, data?: ImportRestApiCommandOutput) => void + ): Promise | void { + const command = new ImportRestApiCommand(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); + } + } + + /** + *

+ * Gets the + * + * GatewayResponses + * + * collection on the given + * + * RestApi + * + * . If an API developer has not added any definitions for gateway responses, the result will be the API Gateway-generated default + * + * GatewayResponses + * + * collection for the supported response types. + *

+ */ + public getGatewayResponses( + args: GetGatewayResponsesCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getGatewayResponses( + args: GetGatewayResponsesCommandInput, + cb: (err: any, data?: GetGatewayResponsesCommandOutput) => void + ): void; + public getGatewayResponses( + args: GetGatewayResponsesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetGatewayResponsesCommandOutput) => void + ): void; + public getGatewayResponses( + args: GetGatewayResponsesCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetGatewayResponsesCommandOutput) => void), + cb?: (err: any, data?: GetGatewayResponsesCommandOutput) => void + ): Promise | void { + const command = new GetGatewayResponsesCommand(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); + } + } + + /** + *

+ * Changes information about a + * + * Deployment + * + * resource. + *

+ */ + public updateDeployment( + args: UpdateDeploymentCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public updateDeployment( + args: UpdateDeploymentCommandInput, + cb: (err: any, data?: UpdateDeploymentCommandOutput) => void + ): void; + public updateDeployment( + args: UpdateDeploymentCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateDeploymentCommandOutput) => void + ): void; + public updateDeployment( + args: UpdateDeploymentCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateDeploymentCommandOutput) => void), + cb?: (err: any, data?: UpdateDeploymentCommandOutput) => void + ): Promise | void { + const command = new UpdateDeploymentCommand(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); + } + } + + /** + *

+ * Adds a new + * + * Model + * + * resource to an existing + * + * RestApi + * + * resource. + *

+ */ + public createModel( + args: CreateModelCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public createModel( + args: CreateModelCommandInput, + cb: (err: any, data?: CreateModelCommandOutput) => void + ): void; + public createModel( + args: CreateModelCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateModelCommandOutput) => void + ): void; + public createModel( + args: CreateModelCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateModelCommandOutput) => void), + cb?: (err: any, data?: CreateModelCommandOutput) => void + ): Promise | void { + const command = new CreateModelCommand(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); + } + } + + /** + *

+ * Generates a client SDK for a + * + * RestApi + * + * and + * + * Stage + * + * . + *

+ */ + public getSdk( + args: GetSdkCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getSdk( + args: GetSdkCommandInput, + cb: (err: any, data?: GetSdkCommandOutput) => void + ): void; + public getSdk( + args: GetSdkCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetSdkCommandOutput) => void + ): void; + public getSdk( + args: GetSdkCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetSdkCommandOutput) => void), + cb?: (err: any, data?: GetSdkCommandOutput) => void + ): Promise | void { + const command = new GetSdkCommand(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); + } + } + + /** + *

+ * Creates a usage plan with the throttle and quota limits, as well as the associated API stages, specified in the payload. + *

+ */ + public createUsagePlan( + args: CreateUsagePlanCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public createUsagePlan( + args: CreateUsagePlanCommandInput, + cb: (err: any, data?: CreateUsagePlanCommandOutput) => void + ): void; + public createUsagePlan( + args: CreateUsagePlanCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateUsagePlanCommandOutput) => void + ): void; + public createUsagePlan( + args: CreateUsagePlanCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateUsagePlanCommandOutput) => void), + cb?: (err: any, data?: CreateUsagePlanCommandOutput) => void + ): Promise | void { + const command = new CreateUsagePlanCommand(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); + } + } + + /** + *

+ * Exports a deployed version of a + * + * RestApi + * + * in a specified format. + *

+ */ + public getExport( + args: GetExportCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getExport( + args: GetExportCommandInput, + cb: (err: any, data?: GetExportCommandOutput) => void + ): void; + public getExport( + args: GetExportCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetExportCommandOutput) => void + ): void; + public getExport( + args: GetExportCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetExportCommandOutput) => void), + cb?: (err: any, data?: GetExportCommandOutput) => void + ): Promise | void { + const command = new GetExportCommand(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); + } + } + + /** + *

+ * Changes information about an + * + * ClientCertificate + * + * resource. + *

+ */ + public updateClientCertificate( + args: UpdateClientCertificateCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public updateClientCertificate( + args: UpdateClientCertificateCommandInput, + cb: (err: any, data?: UpdateClientCertificateCommandOutput) => void + ): void; + public updateClientCertificate( + args: UpdateClientCertificateCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateClientCertificateCommandOutput) => void + ): void; + public updateClientCertificate( + args: UpdateClientCertificateCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateClientCertificateCommandOutput) => void), + cb?: (err: any, data?: UpdateClientCertificateCommandOutput) => void + ): Promise | void { + const command = new UpdateClientCertificateCommand(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); + } + } + + /** + *

+ * Updates a + * + * RequestValidator + * + * of a given + * + * RestApi + * + * . + *

+ */ + public updateRequestValidator( + args: UpdateRequestValidatorCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public updateRequestValidator( + args: UpdateRequestValidatorCommandInput, + cb: (err: any, data?: UpdateRequestValidatorCommandOutput) => void + ): void; + public updateRequestValidator( + args: UpdateRequestValidatorCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateRequestValidatorCommandOutput) => void + ): void; + public updateRequestValidator( + args: UpdateRequestValidatorCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateRequestValidatorCommandOutput) => void), + cb?: (err: any, data?: UpdateRequestValidatorCommandOutput) => void + ): Promise | void { + const command = new UpdateRequestValidatorCommand(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); + } + } + + /** + *

+ * Sets up a method's integration. + *

+ */ + public putIntegration( + args: PutIntegrationCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public putIntegration( + args: PutIntegrationCommandInput, + cb: (err: any, data?: PutIntegrationCommandOutput) => void + ): void; + public putIntegration( + args: PutIntegrationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: PutIntegrationCommandOutput) => void + ): void; + public putIntegration( + args: PutIntegrationCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: PutIntegrationCommandOutput) => void), + cb?: (err: any, data?: PutIntegrationCommandOutput) => void + ): Promise | void { + const command = new PutIntegrationCommand(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 updateDocumentationPart( + args: UpdateDocumentationPartCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public updateDocumentationPart( + args: UpdateDocumentationPartCommandInput, + cb: (err: any, data?: UpdateDocumentationPartCommandOutput) => void + ): void; + public updateDocumentationPart( + args: UpdateDocumentationPartCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateDocumentationPartCommandOutput) => void + ): void; + public updateDocumentationPart( + args: UpdateDocumentationPartCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateDocumentationPartCommandOutput) => void), + cb?: (err: any, data?: UpdateDocumentationPartCommandOutput) => void + ): Promise | void { + const command = new UpdateDocumentationPartCommand(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); + } + } + + /** + *

+ * Lists the + * + * RestApis + * + * resources for your collection. + *

+ */ + public getRestApis( + args: GetRestApisCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public getRestApis( + args: GetRestApisCommandInput, + cb: (err: any, data?: GetRestApisCommandOutput) => void + ): void; + public getRestApis( + args: GetRestApisCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetRestApisCommandOutput) => void + ): void; + public getRestApis( + args: GetRestApisCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetRestApisCommandOutput) => void), + cb?: (err: any, data?: GetRestApisCommandOutput) => void + ): Promise | void { + const command = new GetRestApisCommand(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); + } + } + + /** + *

+ * Updates a + * + * GatewayResponse + * + * of a specified response type on the given + * + * RestApi + * + * . + *

+ */ + public updateGatewayResponse( + args: UpdateGatewayResponseCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public updateGatewayResponse( + args: UpdateGatewayResponseCommandInput, + cb: (err: any, data?: UpdateGatewayResponseCommandOutput) => void + ): void; + public updateGatewayResponse( + args: UpdateGatewayResponseCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateGatewayResponseCommandOutput) => void + ): void; + public updateGatewayResponse( + args: UpdateGatewayResponseCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateGatewayResponseCommandOutput) => void), + cb?: (err: any, data?: UpdateGatewayResponseCommandOutput) => void + ): Promise | void { + const command = new UpdateGatewayResponseCommand(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); + } + } + + /** + *

+ * Add a method to an existing + * + * Resource + * + * resource. + *

+ */ + public putMethod( + args: PutMethodCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public putMethod( + args: PutMethodCommandInput, + cb: (err: any, data?: PutMethodCommandOutput) => void + ): void; + public putMethod( + args: PutMethodCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: PutMethodCommandOutput) => void + ): void; + public putMethod( + args: PutMethodCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: PutMethodCommandOutput) => void), + cb?: (err: any, data?: PutMethodCommandOutput) => void + ): Promise | void { + const command = new PutMethodCommand(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); + } + } + + /** + *

+ * Changes information about the current + * + * Account + * + * resource. + *

+ */ + public updateAccount( + args: UpdateAccountCommandInput, + options?: __HttpHandlerOptions, + ): Promise; + public updateAccount( + args: UpdateAccountCommandInput, + cb: (err: any, data?: UpdateAccountCommandOutput) => void + ): void; + public updateAccount( + args: UpdateAccountCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateAccountCommandOutput) => void + ): void; + public updateAccount( + args: UpdateAccountCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateAccountCommandOutput) => void), + cb?: (err: any, data?: UpdateAccountCommandOutput) => void + ): Promise | void { + const command = new UpdateAccountCommand(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); + } + } + +} diff --git a/clients/client-api-gateway/APIGatewayClient.ts b/clients/client-api-gateway/APIGatewayClient.ts new file mode 100644 index 000000000000..309acc9e36e2 --- /dev/null +++ b/clients/client-api-gateway/APIGatewayClient.ts @@ -0,0 +1,583 @@ +import { + Account, + ApiKey, + ApiKeyIds, + ApiKeys, + Authorizer, + Authorizers, + BasePathMapping, + BasePathMappings, + ClientCertificate, + ClientCertificates, + CreateApiKeyRequest, + CreateAuthorizerRequest, + CreateBasePathMappingRequest, + CreateDeploymentRequest, + CreateDocumentationPartRequest, + CreateDocumentationVersionRequest, + CreateDomainNameRequest, + CreateModelRequest, + CreateRequestValidatorRequest, + CreateResourceRequest, + CreateRestApiRequest, + CreateStageRequest, + CreateUsagePlanKeyRequest, + CreateUsagePlanRequest, + CreateVpcLinkRequest, + DeleteApiKeyRequest, + DeleteAuthorizerRequest, + DeleteBasePathMappingRequest, + DeleteClientCertificateRequest, + DeleteDeploymentRequest, + DeleteDocumentationPartRequest, + DeleteDocumentationVersionRequest, + DeleteDomainNameRequest, + DeleteGatewayResponseRequest, + DeleteIntegrationRequest, + DeleteIntegrationResponseRequest, + DeleteMethodRequest, + DeleteMethodResponseRequest, + DeleteModelRequest, + DeleteRequestValidatorRequest, + DeleteResourceRequest, + DeleteRestApiRequest, + DeleteStageRequest, + DeleteUsagePlanKeyRequest, + DeleteUsagePlanRequest, + DeleteVpcLinkRequest, + Deployment, + Deployments, + DocumentationPart, + DocumentationPartIds, + DocumentationParts, + DocumentationVersion, + DocumentationVersions, + DomainName, + DomainNames, + ExportResponse, + FlushStageAuthorizersCacheRequest, + FlushStageCacheRequest, + GatewayResponse, + GatewayResponses, + GenerateClientCertificateRequest, + GetAccountRequest, + GetApiKeyRequest, + GetApiKeysRequest, + GetAuthorizerRequest, + GetAuthorizersRequest, + GetBasePathMappingRequest, + GetBasePathMappingsRequest, + GetClientCertificateRequest, + GetClientCertificatesRequest, + GetDeploymentRequest, + GetDeploymentsRequest, + GetDocumentationPartRequest, + GetDocumentationPartsRequest, + GetDocumentationVersionRequest, + GetDocumentationVersionsRequest, + GetDomainNameRequest, + GetDomainNamesRequest, + GetExportRequest, + GetGatewayResponseRequest, + GetGatewayResponsesRequest, + GetIntegrationRequest, + GetIntegrationResponseRequest, + GetMethodRequest, + GetMethodResponseRequest, + GetModelRequest, + GetModelTemplateRequest, + GetModelsRequest, + GetRequestValidatorRequest, + GetRequestValidatorsRequest, + GetResourceRequest, + GetResourcesRequest, + GetRestApiRequest, + GetRestApisRequest, + GetSdkRequest, + GetSdkTypeRequest, + GetSdkTypesRequest, + GetStageRequest, + GetStagesRequest, + GetTagsRequest, + GetUsagePlanKeyRequest, + GetUsagePlanKeysRequest, + GetUsagePlanRequest, + GetUsagePlansRequest, + GetUsageRequest, + GetVpcLinkRequest, + GetVpcLinksRequest, + ImportApiKeysRequest, + ImportDocumentationPartsRequest, + ImportRestApiRequest, + Integration, + IntegrationResponse, + Method, + MethodResponse, + Model, + Models, + PutGatewayResponseRequest, + PutIntegrationRequest, + PutIntegrationResponseRequest, + PutMethodRequest, + PutMethodResponseRequest, + PutRestApiRequest, + RequestValidator, + RequestValidators, + Resource, + Resources, + RestApi, + RestApis, + SdkResponse, + SdkType, + SdkTypes, + Stage, + Stages, + TagResourceRequest, + Tags, + Template, + TestInvokeAuthorizerRequest, + TestInvokeAuthorizerResponse, + TestInvokeMethodRequest, + TestInvokeMethodResponse, + UntagResourceRequest, + UpdateAccountRequest, + UpdateApiKeyRequest, + UpdateAuthorizerRequest, + UpdateBasePathMappingRequest, + UpdateClientCertificateRequest, + UpdateDeploymentRequest, + UpdateDocumentationPartRequest, + UpdateDocumentationVersionRequest, + UpdateDomainNameRequest, + UpdateGatewayResponseRequest, + UpdateIntegrationRequest, + UpdateIntegrationResponseRequest, + UpdateMethodRequest, + UpdateMethodResponseRequest, + UpdateModelRequest, + UpdateRequestValidatorRequest, + UpdateResourceRequest, + UpdateRestApiRequest, + UpdateStageRequest, + UpdateUsagePlanRequest, + UpdateUsageRequest, + UpdateVpcLinkRequest, + Usage, + UsagePlan, + UsagePlanKey, + UsagePlanKeys, + UsagePlans, + VpcLink, + VpcLinks, +} from "./models/index"; +import { ClientDefaultValues as __ClientDefaultValues } from "./runtimeConfig"; +import { + EndpointsInputConfig, + EndpointsResolvedConfig, + RegionInputConfig, + RegionResolvedConfig, + resolveEndpointsConfig, + resolveRegionConfig, +} from "@aws-sdk/config-resolver"; +import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length"; +import { + HostHeaderInputConfig, + HostHeaderResolvedConfig, + getHostHeaderPlugin, + resolveHostHeaderConfig, +} from "@aws-sdk/middleware-host-header"; +import { + RetryInputConfig, + RetryResolvedConfig, + getRetryPlugin, + resolveRetryConfig, +} from "@aws-sdk/middleware-retry"; +import { getAcceptsHeaderPlugin } from "@aws-sdk/middleware-sdk-api-gateway"; +import { + AwsAuthInputConfig, + AwsAuthResolvedConfig, + getAwsAuthPlugin, + resolveAwsAuthConfig, +} from "@aws-sdk/middleware-signing"; +import { + UserAgentInputConfig, + UserAgentResolvedConfig, + getUserAgentPlugin, + resolveUserAgentConfig, +} from "@aws-sdk/middleware-user-agent"; +import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http"; +import { + Client as __Client, + SmithyConfiguration as __SmithyConfiguration, + SmithyResolvedConfiguration as __SmithyResolvedConfiguration, +} from "@aws-sdk/smithy-client"; +import { + RegionInfoProvider, + Credentials as __Credentials, + Decoder as __Decoder, + Encoder as __Encoder, + HashConstructor as __HashConstructor, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + Provider as __Provider, + StreamCollector as __StreamCollector, + UrlParser as __UrlParser, +} from "@aws-sdk/types"; + +export type ServiceInputTypes = + | CreateApiKeyRequest + | CreateAuthorizerRequest + | CreateBasePathMappingRequest + | CreateDeploymentRequest + | CreateDocumentationPartRequest + | CreateDocumentationVersionRequest + | CreateDomainNameRequest + | CreateModelRequest + | CreateRequestValidatorRequest + | CreateResourceRequest + | CreateRestApiRequest + | CreateStageRequest + | CreateUsagePlanKeyRequest + | CreateUsagePlanRequest + | CreateVpcLinkRequest + | DeleteApiKeyRequest + | DeleteAuthorizerRequest + | DeleteBasePathMappingRequest + | DeleteClientCertificateRequest + | DeleteDeploymentRequest + | DeleteDocumentationPartRequest + | DeleteDocumentationVersionRequest + | DeleteDomainNameRequest + | DeleteGatewayResponseRequest + | DeleteIntegrationRequest + | DeleteIntegrationResponseRequest + | DeleteMethodRequest + | DeleteMethodResponseRequest + | DeleteModelRequest + | DeleteRequestValidatorRequest + | DeleteResourceRequest + | DeleteRestApiRequest + | DeleteStageRequest + | DeleteUsagePlanKeyRequest + | DeleteUsagePlanRequest + | DeleteVpcLinkRequest + | FlushStageAuthorizersCacheRequest + | FlushStageCacheRequest + | GenerateClientCertificateRequest + | GetAccountRequest + | GetApiKeyRequest + | GetApiKeysRequest + | GetAuthorizerRequest + | GetAuthorizersRequest + | GetBasePathMappingRequest + | GetBasePathMappingsRequest + | GetClientCertificateRequest + | GetClientCertificatesRequest + | GetDeploymentRequest + | GetDeploymentsRequest + | GetDocumentationPartRequest + | GetDocumentationPartsRequest + | GetDocumentationVersionRequest + | GetDocumentationVersionsRequest + | GetDomainNameRequest + | GetDomainNamesRequest + | GetExportRequest + | GetGatewayResponseRequest + | GetGatewayResponsesRequest + | GetIntegrationRequest + | GetIntegrationResponseRequest + | GetMethodRequest + | GetMethodResponseRequest + | GetModelRequest + | GetModelTemplateRequest + | GetModelsRequest + | GetRequestValidatorRequest + | GetRequestValidatorsRequest + | GetResourceRequest + | GetResourcesRequest + | GetRestApiRequest + | GetRestApisRequest + | GetSdkRequest + | GetSdkTypeRequest + | GetSdkTypesRequest + | GetStageRequest + | GetStagesRequest + | GetTagsRequest + | GetUsagePlanKeyRequest + | GetUsagePlanKeysRequest + | GetUsagePlanRequest + | GetUsagePlansRequest + | GetUsageRequest + | GetVpcLinkRequest + | GetVpcLinksRequest + | ImportApiKeysRequest + | ImportDocumentationPartsRequest + | ImportRestApiRequest + | PutGatewayResponseRequest + | PutIntegrationRequest + | PutIntegrationResponseRequest + | PutMethodRequest + | PutMethodResponseRequest + | PutRestApiRequest + | TagResourceRequest + | TestInvokeAuthorizerRequest + | TestInvokeMethodRequest + | UntagResourceRequest + | UpdateAccountRequest + | UpdateApiKeyRequest + | UpdateAuthorizerRequest + | UpdateBasePathMappingRequest + | UpdateClientCertificateRequest + | UpdateDeploymentRequest + | UpdateDocumentationPartRequest + | UpdateDocumentationVersionRequest + | UpdateDomainNameRequest + | UpdateGatewayResponseRequest + | UpdateIntegrationRequest + | UpdateIntegrationResponseRequest + | UpdateMethodRequest + | UpdateMethodResponseRequest + | UpdateModelRequest + | UpdateRequestValidatorRequest + | UpdateResourceRequest + | UpdateRestApiRequest + | UpdateStageRequest + | UpdateUsagePlanRequest + | UpdateUsageRequest + | UpdateVpcLinkRequest; + +export type ServiceOutputTypes = + | __MetadataBearer + | Account + | Account + | ApiKey + | ApiKey + | ApiKey + | ApiKeyIds + | ApiKeys + | Authorizer + | Authorizer + | Authorizer + | Authorizers + | BasePathMapping + | BasePathMapping + | BasePathMapping + | BasePathMappings + | ClientCertificate + | ClientCertificate + | ClientCertificate + | ClientCertificates + | Deployment + | Deployment + | Deployment + | Deployments + | DocumentationPart + | DocumentationPart + | DocumentationPart + | DocumentationPartIds + | DocumentationParts + | DocumentationVersion + | DocumentationVersion + | DocumentationVersion + | DocumentationVersions + | DomainName + | DomainName + | DomainName + | DomainNames + | ExportResponse + | GatewayResponse + | GatewayResponse + | GatewayResponse + | GatewayResponses + | Integration + | Integration + | Integration + | IntegrationResponse + | IntegrationResponse + | IntegrationResponse + | Method + | Method + | Method + | MethodResponse + | MethodResponse + | MethodResponse + | Model + | Model + | Model + | Models + | RequestValidator + | RequestValidator + | RequestValidator + | RequestValidators + | Resource + | Resource + | Resource + | Resources + | RestApi + | RestApi + | RestApi + | RestApi + | RestApi + | RestApis + | SdkResponse + | SdkType + | SdkTypes + | Stage + | Stage + | Stage + | Stages + | Tags + | Template + | TestInvokeAuthorizerResponse + | TestInvokeMethodResponse + | Usage + | Usage + | UsagePlan + | UsagePlan + | UsagePlan + | UsagePlanKey + | UsagePlanKey + | UsagePlanKeys + | UsagePlans + | VpcLink + | VpcLink + | VpcLink + | VpcLinks; + +export interface ClientDefaults + extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { + /** + * The HTTP handler to use. Fetch in browser and Https in Nodejs. + */ + requestHandler?: __HttpHandler; + + /** + * A constructor for a class implementing the @aws-sdk/types.Hash interface + * that computes the SHA-256 HMAC or checksum of a string or binary buffer. + */ + sha256?: __HashConstructor; + + /** + * The function that will be used to convert strings into HTTP endpoints. + */ + urlParser?: __UrlParser; + + /** + * A function that can calculate the length of a request body. + */ + bodyLengthChecker?: (body: any) => number | undefined; + + /** + * A function that converts a stream into an array of bytes. + */ + streamCollector?: __StreamCollector; + + /** + * The function that will be used to convert a base64-encoded string to a byte array + */ + base64Decoder?: __Decoder; + + /** + * The function that will be used to convert binary data to a base64-encoded string + */ + base64Encoder?: __Encoder; + + /** + * The function that will be used to convert a UTF8-encoded string to a byte array + */ + utf8Decoder?: __Decoder; + + /** + * The function that will be used to convert binary data to a UTF-8 encoded string + */ + utf8Encoder?: __Encoder; + + /** + * The string that will be used to populate default value in 'User-Agent' header + */ + defaultUserAgent?: string; + + /** + * The runtime environment + */ + runtime?: string; + + /** + * The service name with which to sign requests. + */ + signingName?: string; + + /** + * Default credentials provider; Not available in browser runtime + */ + credentialDefaultProvider?: (input: any) => __Provider<__Credentials>; + + /** + * Provider function that return promise of a region string + */ + regionDefaultProvider?: (input: any) => __Provider; + + /** + * Fetch related hostname, signing name or signing region with given region. + */ + regionInfoProvider?: RegionInfoProvider; +} + +export type APIGatewayClientConfig = Partial<__SmithyConfiguration<__HttpHandlerOptions>> + & ClientDefaults + & RegionInputConfig + & EndpointsInputConfig + & AwsAuthInputConfig + & RetryInputConfig + & UserAgentInputConfig + & HostHeaderInputConfig + +export type APIGatewayClientResolvedConfig = __SmithyResolvedConfiguration<__HttpHandlerOptions> + & Required + & RegionResolvedConfig + & EndpointsResolvedConfig + & AwsAuthResolvedConfig + & RetryResolvedConfig + & UserAgentResolvedConfig + & HostHeaderResolvedConfig + +/** + * + * Amazon API Gateway + * + *

+ * Amazon API Gateway helps developers deliver robust, secure, and scalable mobile and web application back ends. API Gateway allows developers to securely connect mobile and web applications to APIs that run on AWS Lambda, Amazon EC2, or other publicly addressable web services that are hosted outside of AWS. + *

+ */ +export class APIGatewayClient extends __Client< + __HttpHandlerOptions, + ServiceInputTypes, + ServiceOutputTypes, + APIGatewayClientResolvedConfig +> { + readonly config: APIGatewayClientResolvedConfig; + + constructor(configuration: APIGatewayClientConfig) { + let _config_0 = { + ...__ClientDefaultValues, + ...configuration + }; + let _config_1 = resolveRegionConfig(_config_0); + let _config_2 = resolveEndpointsConfig(_config_1); + let _config_3 = resolveAwsAuthConfig(_config_2); + let _config_4 = resolveRetryConfig(_config_3); + let _config_5 = resolveUserAgentConfig(_config_4); + let _config_6 = resolveHostHeaderConfig(_config_5); + super(_config_6); + this.config = _config_6; + this.middlewareStack.use(getAwsAuthPlugin(this.config)); + this.middlewareStack.use(getRetryPlugin(this.config)); + this.middlewareStack.use(getUserAgentPlugin(this.config)); + this.middlewareStack.use(getContentLengthPlugin(this.config)); + this.middlewareStack.use(getAcceptsHeaderPlugin(this.config)); + this.middlewareStack.use(getHostHeaderPlugin(this.config)); + } + + destroy(): void { + } +} diff --git a/clients/client-api-gateway/LICENSE b/clients/client-api-gateway/LICENSE new file mode 100644 index 000000000000..b7d2463d8cc0 --- /dev/null +++ b/clients/client-api-gateway/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/clients/client-api-gateway/README.md b/clients/client-api-gateway/README.md new file mode 100644 index 000000000000..cac5f7500293 --- /dev/null +++ b/clients/client-api-gateway/README.md @@ -0,0 +1,6 @@ +@aws-sdk/client-api-gateway + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-api-gateway/preview.svg)](https://www.npmjs.com/package/@aws-sdk/client-api-gateway) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-api-gateway.svg)](https://www.npmjs.com/package/@aws-sdk/client-api-gateway) + +For SDK usage, please step to [SDK reademe](https://github.com/aws/aws-sdk-js-v3). diff --git a/clients/client-api-gateway/commands/CreateApiKeyCommand.ts b/clients/client-api-gateway/commands/CreateApiKeyCommand.ts new file mode 100644 index 000000000000..85a86178d70a --- /dev/null +++ b/clients/client-api-gateway/commands/CreateApiKeyCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + ApiKey, + CreateApiKeyRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1CreateApiKeyCommand, + serializeAws_restJson1_1CreateApiKeyCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type CreateApiKeyCommandInput = CreateApiKeyRequest; +export type CreateApiKeyCommandOutput = ApiKey; + +export class CreateApiKeyCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateApiKeyCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateApiKeyCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1CreateApiKeyCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1CreateApiKeyCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/CreateAuthorizerCommand.ts b/clients/client-api-gateway/commands/CreateAuthorizerCommand.ts new file mode 100644 index 000000000000..5f0125f82187 --- /dev/null +++ b/clients/client-api-gateway/commands/CreateAuthorizerCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + Authorizer, + CreateAuthorizerRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1CreateAuthorizerCommand, + serializeAws_restJson1_1CreateAuthorizerCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type CreateAuthorizerCommandInput = CreateAuthorizerRequest; +export type CreateAuthorizerCommandOutput = Authorizer; + +export class CreateAuthorizerCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateAuthorizerCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateAuthorizerCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1CreateAuthorizerCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1CreateAuthorizerCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/CreateBasePathMappingCommand.ts b/clients/client-api-gateway/commands/CreateBasePathMappingCommand.ts new file mode 100644 index 000000000000..b7b8040c776f --- /dev/null +++ b/clients/client-api-gateway/commands/CreateBasePathMappingCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + BasePathMapping, + CreateBasePathMappingRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1CreateBasePathMappingCommand, + serializeAws_restJson1_1CreateBasePathMappingCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type CreateBasePathMappingCommandInput = CreateBasePathMappingRequest; +export type CreateBasePathMappingCommandOutput = BasePathMapping; + +export class CreateBasePathMappingCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateBasePathMappingCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateBasePathMappingCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1CreateBasePathMappingCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1CreateBasePathMappingCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/CreateDeploymentCommand.ts b/clients/client-api-gateway/commands/CreateDeploymentCommand.ts new file mode 100644 index 000000000000..a6939830229f --- /dev/null +++ b/clients/client-api-gateway/commands/CreateDeploymentCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + CreateDeploymentRequest, + Deployment, +} from "../models/index"; +import { + deserializeAws_restJson1_1CreateDeploymentCommand, + serializeAws_restJson1_1CreateDeploymentCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type CreateDeploymentCommandInput = CreateDeploymentRequest; +export type CreateDeploymentCommandOutput = Deployment; + +export class CreateDeploymentCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateDeploymentCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateDeploymentCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1CreateDeploymentCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1CreateDeploymentCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/CreateDocumentationPartCommand.ts b/clients/client-api-gateway/commands/CreateDocumentationPartCommand.ts new file mode 100644 index 000000000000..1dbe3bd4286a --- /dev/null +++ b/clients/client-api-gateway/commands/CreateDocumentationPartCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + CreateDocumentationPartRequest, + DocumentationPart, +} from "../models/index"; +import { + deserializeAws_restJson1_1CreateDocumentationPartCommand, + serializeAws_restJson1_1CreateDocumentationPartCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type CreateDocumentationPartCommandInput = CreateDocumentationPartRequest; +export type CreateDocumentationPartCommandOutput = DocumentationPart; + +export class CreateDocumentationPartCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateDocumentationPartCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateDocumentationPartCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1CreateDocumentationPartCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1CreateDocumentationPartCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/CreateDocumentationVersionCommand.ts b/clients/client-api-gateway/commands/CreateDocumentationVersionCommand.ts new file mode 100644 index 000000000000..22abec58c9c4 --- /dev/null +++ b/clients/client-api-gateway/commands/CreateDocumentationVersionCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + CreateDocumentationVersionRequest, + DocumentationVersion, +} from "../models/index"; +import { + deserializeAws_restJson1_1CreateDocumentationVersionCommand, + serializeAws_restJson1_1CreateDocumentationVersionCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type CreateDocumentationVersionCommandInput = CreateDocumentationVersionRequest; +export type CreateDocumentationVersionCommandOutput = DocumentationVersion; + +export class CreateDocumentationVersionCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateDocumentationVersionCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateDocumentationVersionCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1CreateDocumentationVersionCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1CreateDocumentationVersionCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/CreateDomainNameCommand.ts b/clients/client-api-gateway/commands/CreateDomainNameCommand.ts new file mode 100644 index 000000000000..bea8b61359c5 --- /dev/null +++ b/clients/client-api-gateway/commands/CreateDomainNameCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + CreateDomainNameRequest, + DomainName, +} from "../models/index"; +import { + deserializeAws_restJson1_1CreateDomainNameCommand, + serializeAws_restJson1_1CreateDomainNameCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type CreateDomainNameCommandInput = CreateDomainNameRequest; +export type CreateDomainNameCommandOutput = DomainName; + +export class CreateDomainNameCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateDomainNameCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateDomainNameCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1CreateDomainNameCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1CreateDomainNameCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/CreateModelCommand.ts b/clients/client-api-gateway/commands/CreateModelCommand.ts new file mode 100644 index 000000000000..668f59b916ac --- /dev/null +++ b/clients/client-api-gateway/commands/CreateModelCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + CreateModelRequest, + Model, +} from "../models/index"; +import { + deserializeAws_restJson1_1CreateModelCommand, + serializeAws_restJson1_1CreateModelCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type CreateModelCommandInput = CreateModelRequest; +export type CreateModelCommandOutput = Model; + +export class CreateModelCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateModelCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateModelCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1CreateModelCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1CreateModelCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/CreateRequestValidatorCommand.ts b/clients/client-api-gateway/commands/CreateRequestValidatorCommand.ts new file mode 100644 index 000000000000..9be782367420 --- /dev/null +++ b/clients/client-api-gateway/commands/CreateRequestValidatorCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + CreateRequestValidatorRequest, + RequestValidator, +} from "../models/index"; +import { + deserializeAws_restJson1_1CreateRequestValidatorCommand, + serializeAws_restJson1_1CreateRequestValidatorCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type CreateRequestValidatorCommandInput = CreateRequestValidatorRequest; +export type CreateRequestValidatorCommandOutput = RequestValidator; + +export class CreateRequestValidatorCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateRequestValidatorCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateRequestValidatorCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1CreateRequestValidatorCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1CreateRequestValidatorCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/CreateResourceCommand.ts b/clients/client-api-gateway/commands/CreateResourceCommand.ts new file mode 100644 index 000000000000..693d21e648b0 --- /dev/null +++ b/clients/client-api-gateway/commands/CreateResourceCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + CreateResourceRequest, + Resource, +} from "../models/index"; +import { + deserializeAws_restJson1_1CreateResourceCommand, + serializeAws_restJson1_1CreateResourceCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type CreateResourceCommandInput = CreateResourceRequest; +export type CreateResourceCommandOutput = Resource; + +export class CreateResourceCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateResourceCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1CreateResourceCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1CreateResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/CreateRestApiCommand.ts b/clients/client-api-gateway/commands/CreateRestApiCommand.ts new file mode 100644 index 000000000000..d142b3a4a198 --- /dev/null +++ b/clients/client-api-gateway/commands/CreateRestApiCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + CreateRestApiRequest, + RestApi, +} from "../models/index"; +import { + deserializeAws_restJson1_1CreateRestApiCommand, + serializeAws_restJson1_1CreateRestApiCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type CreateRestApiCommandInput = CreateRestApiRequest; +export type CreateRestApiCommandOutput = RestApi; + +export class CreateRestApiCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateRestApiCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateRestApiCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1CreateRestApiCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1CreateRestApiCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/CreateStageCommand.ts b/clients/client-api-gateway/commands/CreateStageCommand.ts new file mode 100644 index 000000000000..f8184e68e910 --- /dev/null +++ b/clients/client-api-gateway/commands/CreateStageCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + CreateStageRequest, + Stage, +} from "../models/index"; +import { + deserializeAws_restJson1_1CreateStageCommand, + serializeAws_restJson1_1CreateStageCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type CreateStageCommandInput = CreateStageRequest; +export type CreateStageCommandOutput = Stage; + +export class CreateStageCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateStageCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateStageCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1CreateStageCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1CreateStageCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/CreateUsagePlanCommand.ts b/clients/client-api-gateway/commands/CreateUsagePlanCommand.ts new file mode 100644 index 000000000000..3b4ab2c2dffe --- /dev/null +++ b/clients/client-api-gateway/commands/CreateUsagePlanCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + CreateUsagePlanRequest, + UsagePlan, +} from "../models/index"; +import { + deserializeAws_restJson1_1CreateUsagePlanCommand, + serializeAws_restJson1_1CreateUsagePlanCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type CreateUsagePlanCommandInput = CreateUsagePlanRequest; +export type CreateUsagePlanCommandOutput = UsagePlan; + +export class CreateUsagePlanCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateUsagePlanCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateUsagePlanCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1CreateUsagePlanCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1CreateUsagePlanCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/CreateUsagePlanKeyCommand.ts b/clients/client-api-gateway/commands/CreateUsagePlanKeyCommand.ts new file mode 100644 index 000000000000..2f655a5798fd --- /dev/null +++ b/clients/client-api-gateway/commands/CreateUsagePlanKeyCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + CreateUsagePlanKeyRequest, + UsagePlanKey, +} from "../models/index"; +import { + deserializeAws_restJson1_1CreateUsagePlanKeyCommand, + serializeAws_restJson1_1CreateUsagePlanKeyCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type CreateUsagePlanKeyCommandInput = CreateUsagePlanKeyRequest; +export type CreateUsagePlanKeyCommandOutput = UsagePlanKey; + +export class CreateUsagePlanKeyCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateUsagePlanKeyCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateUsagePlanKeyCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1CreateUsagePlanKeyCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1CreateUsagePlanKeyCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/CreateVpcLinkCommand.ts b/clients/client-api-gateway/commands/CreateVpcLinkCommand.ts new file mode 100644 index 000000000000..f612adce10ac --- /dev/null +++ b/clients/client-api-gateway/commands/CreateVpcLinkCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + CreateVpcLinkRequest, + VpcLink, +} from "../models/index"; +import { + deserializeAws_restJson1_1CreateVpcLinkCommand, + serializeAws_restJson1_1CreateVpcLinkCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type CreateVpcLinkCommandInput = CreateVpcLinkRequest; +export type CreateVpcLinkCommandOutput = VpcLink; + +export class CreateVpcLinkCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateVpcLinkCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateVpcLinkCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1CreateVpcLinkCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1CreateVpcLinkCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/DeleteApiKeyCommand.ts b/clients/client-api-gateway/commands/DeleteApiKeyCommand.ts new file mode 100644 index 000000000000..25cf78613e40 --- /dev/null +++ b/clients/client-api-gateway/commands/DeleteApiKeyCommand.ts @@ -0,0 +1,76 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { DeleteApiKeyRequest } from "../models/index"; +import { + deserializeAws_restJson1_1DeleteApiKeyCommand, + serializeAws_restJson1_1DeleteApiKeyCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, +} from "@aws-sdk/types"; + +export type DeleteApiKeyCommandInput = DeleteApiKeyRequest; +export type DeleteApiKeyCommandOutput = __MetadataBearer + +export class DeleteApiKeyCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteApiKeyCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteApiKeyCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1DeleteApiKeyCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1DeleteApiKeyCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/DeleteAuthorizerCommand.ts b/clients/client-api-gateway/commands/DeleteAuthorizerCommand.ts new file mode 100644 index 000000000000..de899a5d7e6b --- /dev/null +++ b/clients/client-api-gateway/commands/DeleteAuthorizerCommand.ts @@ -0,0 +1,76 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { DeleteAuthorizerRequest } from "../models/index"; +import { + deserializeAws_restJson1_1DeleteAuthorizerCommand, + serializeAws_restJson1_1DeleteAuthorizerCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, +} from "@aws-sdk/types"; + +export type DeleteAuthorizerCommandInput = DeleteAuthorizerRequest; +export type DeleteAuthorizerCommandOutput = __MetadataBearer + +export class DeleteAuthorizerCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteAuthorizerCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteAuthorizerCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1DeleteAuthorizerCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1DeleteAuthorizerCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/DeleteBasePathMappingCommand.ts b/clients/client-api-gateway/commands/DeleteBasePathMappingCommand.ts new file mode 100644 index 000000000000..7178466f4819 --- /dev/null +++ b/clients/client-api-gateway/commands/DeleteBasePathMappingCommand.ts @@ -0,0 +1,76 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { DeleteBasePathMappingRequest } from "../models/index"; +import { + deserializeAws_restJson1_1DeleteBasePathMappingCommand, + serializeAws_restJson1_1DeleteBasePathMappingCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, +} from "@aws-sdk/types"; + +export type DeleteBasePathMappingCommandInput = DeleteBasePathMappingRequest; +export type DeleteBasePathMappingCommandOutput = __MetadataBearer + +export class DeleteBasePathMappingCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteBasePathMappingCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteBasePathMappingCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1DeleteBasePathMappingCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1DeleteBasePathMappingCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/DeleteClientCertificateCommand.ts b/clients/client-api-gateway/commands/DeleteClientCertificateCommand.ts new file mode 100644 index 000000000000..98ad06a218a1 --- /dev/null +++ b/clients/client-api-gateway/commands/DeleteClientCertificateCommand.ts @@ -0,0 +1,76 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { DeleteClientCertificateRequest } from "../models/index"; +import { + deserializeAws_restJson1_1DeleteClientCertificateCommand, + serializeAws_restJson1_1DeleteClientCertificateCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, +} from "@aws-sdk/types"; + +export type DeleteClientCertificateCommandInput = DeleteClientCertificateRequest; +export type DeleteClientCertificateCommandOutput = __MetadataBearer + +export class DeleteClientCertificateCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteClientCertificateCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteClientCertificateCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1DeleteClientCertificateCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1DeleteClientCertificateCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/DeleteDeploymentCommand.ts b/clients/client-api-gateway/commands/DeleteDeploymentCommand.ts new file mode 100644 index 000000000000..5262653e9df3 --- /dev/null +++ b/clients/client-api-gateway/commands/DeleteDeploymentCommand.ts @@ -0,0 +1,76 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { DeleteDeploymentRequest } from "../models/index"; +import { + deserializeAws_restJson1_1DeleteDeploymentCommand, + serializeAws_restJson1_1DeleteDeploymentCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, +} from "@aws-sdk/types"; + +export type DeleteDeploymentCommandInput = DeleteDeploymentRequest; +export type DeleteDeploymentCommandOutput = __MetadataBearer + +export class DeleteDeploymentCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteDeploymentCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteDeploymentCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1DeleteDeploymentCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1DeleteDeploymentCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/DeleteDocumentationPartCommand.ts b/clients/client-api-gateway/commands/DeleteDocumentationPartCommand.ts new file mode 100644 index 000000000000..acad4e103d31 --- /dev/null +++ b/clients/client-api-gateway/commands/DeleteDocumentationPartCommand.ts @@ -0,0 +1,76 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { DeleteDocumentationPartRequest } from "../models/index"; +import { + deserializeAws_restJson1_1DeleteDocumentationPartCommand, + serializeAws_restJson1_1DeleteDocumentationPartCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, +} from "@aws-sdk/types"; + +export type DeleteDocumentationPartCommandInput = DeleteDocumentationPartRequest; +export type DeleteDocumentationPartCommandOutput = __MetadataBearer + +export class DeleteDocumentationPartCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteDocumentationPartCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteDocumentationPartCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1DeleteDocumentationPartCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1DeleteDocumentationPartCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/DeleteDocumentationVersionCommand.ts b/clients/client-api-gateway/commands/DeleteDocumentationVersionCommand.ts new file mode 100644 index 000000000000..0fa61189280c --- /dev/null +++ b/clients/client-api-gateway/commands/DeleteDocumentationVersionCommand.ts @@ -0,0 +1,76 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { DeleteDocumentationVersionRequest } from "../models/index"; +import { + deserializeAws_restJson1_1DeleteDocumentationVersionCommand, + serializeAws_restJson1_1DeleteDocumentationVersionCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, +} from "@aws-sdk/types"; + +export type DeleteDocumentationVersionCommandInput = DeleteDocumentationVersionRequest; +export type DeleteDocumentationVersionCommandOutput = __MetadataBearer + +export class DeleteDocumentationVersionCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteDocumentationVersionCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteDocumentationVersionCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1DeleteDocumentationVersionCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1DeleteDocumentationVersionCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/DeleteDomainNameCommand.ts b/clients/client-api-gateway/commands/DeleteDomainNameCommand.ts new file mode 100644 index 000000000000..7659fb9c517d --- /dev/null +++ b/clients/client-api-gateway/commands/DeleteDomainNameCommand.ts @@ -0,0 +1,76 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { DeleteDomainNameRequest } from "../models/index"; +import { + deserializeAws_restJson1_1DeleteDomainNameCommand, + serializeAws_restJson1_1DeleteDomainNameCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, +} from "@aws-sdk/types"; + +export type DeleteDomainNameCommandInput = DeleteDomainNameRequest; +export type DeleteDomainNameCommandOutput = __MetadataBearer + +export class DeleteDomainNameCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteDomainNameCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteDomainNameCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1DeleteDomainNameCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1DeleteDomainNameCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/DeleteGatewayResponseCommand.ts b/clients/client-api-gateway/commands/DeleteGatewayResponseCommand.ts new file mode 100644 index 000000000000..1d0ba7e4a742 --- /dev/null +++ b/clients/client-api-gateway/commands/DeleteGatewayResponseCommand.ts @@ -0,0 +1,76 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { DeleteGatewayResponseRequest } from "../models/index"; +import { + deserializeAws_restJson1_1DeleteGatewayResponseCommand, + serializeAws_restJson1_1DeleteGatewayResponseCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, +} from "@aws-sdk/types"; + +export type DeleteGatewayResponseCommandInput = DeleteGatewayResponseRequest; +export type DeleteGatewayResponseCommandOutput = __MetadataBearer + +export class DeleteGatewayResponseCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteGatewayResponseCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteGatewayResponseCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1DeleteGatewayResponseCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1DeleteGatewayResponseCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/DeleteIntegrationCommand.ts b/clients/client-api-gateway/commands/DeleteIntegrationCommand.ts new file mode 100644 index 000000000000..16748c427737 --- /dev/null +++ b/clients/client-api-gateway/commands/DeleteIntegrationCommand.ts @@ -0,0 +1,76 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { DeleteIntegrationRequest } from "../models/index"; +import { + deserializeAws_restJson1_1DeleteIntegrationCommand, + serializeAws_restJson1_1DeleteIntegrationCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, +} from "@aws-sdk/types"; + +export type DeleteIntegrationCommandInput = DeleteIntegrationRequest; +export type DeleteIntegrationCommandOutput = __MetadataBearer + +export class DeleteIntegrationCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteIntegrationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteIntegrationCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1DeleteIntegrationCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1DeleteIntegrationCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/DeleteIntegrationResponseCommand.ts b/clients/client-api-gateway/commands/DeleteIntegrationResponseCommand.ts new file mode 100644 index 000000000000..8b86e32f4434 --- /dev/null +++ b/clients/client-api-gateway/commands/DeleteIntegrationResponseCommand.ts @@ -0,0 +1,76 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { DeleteIntegrationResponseRequest } from "../models/index"; +import { + deserializeAws_restJson1_1DeleteIntegrationResponseCommand, + serializeAws_restJson1_1DeleteIntegrationResponseCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, +} from "@aws-sdk/types"; + +export type DeleteIntegrationResponseCommandInput = DeleteIntegrationResponseRequest; +export type DeleteIntegrationResponseCommandOutput = __MetadataBearer + +export class DeleteIntegrationResponseCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteIntegrationResponseCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteIntegrationResponseCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1DeleteIntegrationResponseCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1DeleteIntegrationResponseCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/DeleteMethodCommand.ts b/clients/client-api-gateway/commands/DeleteMethodCommand.ts new file mode 100644 index 000000000000..ed6b20fe0a5f --- /dev/null +++ b/clients/client-api-gateway/commands/DeleteMethodCommand.ts @@ -0,0 +1,76 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { DeleteMethodRequest } from "../models/index"; +import { + deserializeAws_restJson1_1DeleteMethodCommand, + serializeAws_restJson1_1DeleteMethodCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, +} from "@aws-sdk/types"; + +export type DeleteMethodCommandInput = DeleteMethodRequest; +export type DeleteMethodCommandOutput = __MetadataBearer + +export class DeleteMethodCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteMethodCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteMethodCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1DeleteMethodCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1DeleteMethodCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/DeleteMethodResponseCommand.ts b/clients/client-api-gateway/commands/DeleteMethodResponseCommand.ts new file mode 100644 index 000000000000..48f716d01717 --- /dev/null +++ b/clients/client-api-gateway/commands/DeleteMethodResponseCommand.ts @@ -0,0 +1,76 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { DeleteMethodResponseRequest } from "../models/index"; +import { + deserializeAws_restJson1_1DeleteMethodResponseCommand, + serializeAws_restJson1_1DeleteMethodResponseCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, +} from "@aws-sdk/types"; + +export type DeleteMethodResponseCommandInput = DeleteMethodResponseRequest; +export type DeleteMethodResponseCommandOutput = __MetadataBearer + +export class DeleteMethodResponseCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteMethodResponseCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteMethodResponseCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1DeleteMethodResponseCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1DeleteMethodResponseCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/DeleteModelCommand.ts b/clients/client-api-gateway/commands/DeleteModelCommand.ts new file mode 100644 index 000000000000..e94248c86e63 --- /dev/null +++ b/clients/client-api-gateway/commands/DeleteModelCommand.ts @@ -0,0 +1,76 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { DeleteModelRequest } from "../models/index"; +import { + deserializeAws_restJson1_1DeleteModelCommand, + serializeAws_restJson1_1DeleteModelCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, +} from "@aws-sdk/types"; + +export type DeleteModelCommandInput = DeleteModelRequest; +export type DeleteModelCommandOutput = __MetadataBearer + +export class DeleteModelCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteModelCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteModelCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1DeleteModelCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1DeleteModelCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/DeleteRequestValidatorCommand.ts b/clients/client-api-gateway/commands/DeleteRequestValidatorCommand.ts new file mode 100644 index 000000000000..f73ac4fbc43e --- /dev/null +++ b/clients/client-api-gateway/commands/DeleteRequestValidatorCommand.ts @@ -0,0 +1,76 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { DeleteRequestValidatorRequest } from "../models/index"; +import { + deserializeAws_restJson1_1DeleteRequestValidatorCommand, + serializeAws_restJson1_1DeleteRequestValidatorCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, +} from "@aws-sdk/types"; + +export type DeleteRequestValidatorCommandInput = DeleteRequestValidatorRequest; +export type DeleteRequestValidatorCommandOutput = __MetadataBearer + +export class DeleteRequestValidatorCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteRequestValidatorCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteRequestValidatorCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1DeleteRequestValidatorCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1DeleteRequestValidatorCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/DeleteResourceCommand.ts b/clients/client-api-gateway/commands/DeleteResourceCommand.ts new file mode 100644 index 000000000000..78899e74a568 --- /dev/null +++ b/clients/client-api-gateway/commands/DeleteResourceCommand.ts @@ -0,0 +1,76 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { DeleteResourceRequest } from "../models/index"; +import { + deserializeAws_restJson1_1DeleteResourceCommand, + serializeAws_restJson1_1DeleteResourceCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, +} from "@aws-sdk/types"; + +export type DeleteResourceCommandInput = DeleteResourceRequest; +export type DeleteResourceCommandOutput = __MetadataBearer + +export class DeleteResourceCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteResourceCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1DeleteResourceCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1DeleteResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/DeleteRestApiCommand.ts b/clients/client-api-gateway/commands/DeleteRestApiCommand.ts new file mode 100644 index 000000000000..75c3b15ad3af --- /dev/null +++ b/clients/client-api-gateway/commands/DeleteRestApiCommand.ts @@ -0,0 +1,76 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { DeleteRestApiRequest } from "../models/index"; +import { + deserializeAws_restJson1_1DeleteRestApiCommand, + serializeAws_restJson1_1DeleteRestApiCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, +} from "@aws-sdk/types"; + +export type DeleteRestApiCommandInput = DeleteRestApiRequest; +export type DeleteRestApiCommandOutput = __MetadataBearer + +export class DeleteRestApiCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteRestApiCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteRestApiCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1DeleteRestApiCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1DeleteRestApiCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/DeleteStageCommand.ts b/clients/client-api-gateway/commands/DeleteStageCommand.ts new file mode 100644 index 000000000000..3ac2a1c4cb8d --- /dev/null +++ b/clients/client-api-gateway/commands/DeleteStageCommand.ts @@ -0,0 +1,76 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { DeleteStageRequest } from "../models/index"; +import { + deserializeAws_restJson1_1DeleteStageCommand, + serializeAws_restJson1_1DeleteStageCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, +} from "@aws-sdk/types"; + +export type DeleteStageCommandInput = DeleteStageRequest; +export type DeleteStageCommandOutput = __MetadataBearer + +export class DeleteStageCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteStageCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteStageCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1DeleteStageCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1DeleteStageCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/DeleteUsagePlanCommand.ts b/clients/client-api-gateway/commands/DeleteUsagePlanCommand.ts new file mode 100644 index 000000000000..aae77132cee3 --- /dev/null +++ b/clients/client-api-gateway/commands/DeleteUsagePlanCommand.ts @@ -0,0 +1,76 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { DeleteUsagePlanRequest } from "../models/index"; +import { + deserializeAws_restJson1_1DeleteUsagePlanCommand, + serializeAws_restJson1_1DeleteUsagePlanCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, +} from "@aws-sdk/types"; + +export type DeleteUsagePlanCommandInput = DeleteUsagePlanRequest; +export type DeleteUsagePlanCommandOutput = __MetadataBearer + +export class DeleteUsagePlanCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteUsagePlanCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteUsagePlanCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1DeleteUsagePlanCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1DeleteUsagePlanCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/DeleteUsagePlanKeyCommand.ts b/clients/client-api-gateway/commands/DeleteUsagePlanKeyCommand.ts new file mode 100644 index 000000000000..05c5cc8713f2 --- /dev/null +++ b/clients/client-api-gateway/commands/DeleteUsagePlanKeyCommand.ts @@ -0,0 +1,76 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { DeleteUsagePlanKeyRequest } from "../models/index"; +import { + deserializeAws_restJson1_1DeleteUsagePlanKeyCommand, + serializeAws_restJson1_1DeleteUsagePlanKeyCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, +} from "@aws-sdk/types"; + +export type DeleteUsagePlanKeyCommandInput = DeleteUsagePlanKeyRequest; +export type DeleteUsagePlanKeyCommandOutput = __MetadataBearer + +export class DeleteUsagePlanKeyCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteUsagePlanKeyCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteUsagePlanKeyCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1DeleteUsagePlanKeyCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1DeleteUsagePlanKeyCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/DeleteVpcLinkCommand.ts b/clients/client-api-gateway/commands/DeleteVpcLinkCommand.ts new file mode 100644 index 000000000000..0303912750be --- /dev/null +++ b/clients/client-api-gateway/commands/DeleteVpcLinkCommand.ts @@ -0,0 +1,76 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { DeleteVpcLinkRequest } from "../models/index"; +import { + deserializeAws_restJson1_1DeleteVpcLinkCommand, + serializeAws_restJson1_1DeleteVpcLinkCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, +} from "@aws-sdk/types"; + +export type DeleteVpcLinkCommandInput = DeleteVpcLinkRequest; +export type DeleteVpcLinkCommandOutput = __MetadataBearer + +export class DeleteVpcLinkCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteVpcLinkCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteVpcLinkCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1DeleteVpcLinkCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1DeleteVpcLinkCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/FlushStageAuthorizersCacheCommand.ts b/clients/client-api-gateway/commands/FlushStageAuthorizersCacheCommand.ts new file mode 100644 index 000000000000..6ab2b01a07c5 --- /dev/null +++ b/clients/client-api-gateway/commands/FlushStageAuthorizersCacheCommand.ts @@ -0,0 +1,76 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { FlushStageAuthorizersCacheRequest } from "../models/index"; +import { + deserializeAws_restJson1_1FlushStageAuthorizersCacheCommand, + serializeAws_restJson1_1FlushStageAuthorizersCacheCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, +} from "@aws-sdk/types"; + +export type FlushStageAuthorizersCacheCommandInput = FlushStageAuthorizersCacheRequest; +export type FlushStageAuthorizersCacheCommandOutput = __MetadataBearer + +export class FlushStageAuthorizersCacheCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: FlushStageAuthorizersCacheCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: FlushStageAuthorizersCacheCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1FlushStageAuthorizersCacheCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1FlushStageAuthorizersCacheCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/FlushStageCacheCommand.ts b/clients/client-api-gateway/commands/FlushStageCacheCommand.ts new file mode 100644 index 000000000000..9059523448aa --- /dev/null +++ b/clients/client-api-gateway/commands/FlushStageCacheCommand.ts @@ -0,0 +1,76 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { FlushStageCacheRequest } from "../models/index"; +import { + deserializeAws_restJson1_1FlushStageCacheCommand, + serializeAws_restJson1_1FlushStageCacheCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, +} from "@aws-sdk/types"; + +export type FlushStageCacheCommandInput = FlushStageCacheRequest; +export type FlushStageCacheCommandOutput = __MetadataBearer + +export class FlushStageCacheCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: FlushStageCacheCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: FlushStageCacheCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1FlushStageCacheCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1FlushStageCacheCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GenerateClientCertificateCommand.ts b/clients/client-api-gateway/commands/GenerateClientCertificateCommand.ts new file mode 100644 index 000000000000..3bd0518900b7 --- /dev/null +++ b/clients/client-api-gateway/commands/GenerateClientCertificateCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + ClientCertificate, + GenerateClientCertificateRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1GenerateClientCertificateCommand, + serializeAws_restJson1_1GenerateClientCertificateCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GenerateClientCertificateCommandInput = GenerateClientCertificateRequest; +export type GenerateClientCertificateCommandOutput = ClientCertificate; + +export class GenerateClientCertificateCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GenerateClientCertificateCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GenerateClientCertificateCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GenerateClientCertificateCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GenerateClientCertificateCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetAccountCommand.ts b/clients/client-api-gateway/commands/GetAccountCommand.ts new file mode 100644 index 000000000000..159ae3b3e4cc --- /dev/null +++ b/clients/client-api-gateway/commands/GetAccountCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + Account, + GetAccountRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetAccountCommand, + serializeAws_restJson1_1GetAccountCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetAccountCommandInput = GetAccountRequest; +export type GetAccountCommandOutput = Account; + +export class GetAccountCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetAccountCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetAccountCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetAccountCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetAccountCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetApiKeyCommand.ts b/clients/client-api-gateway/commands/GetApiKeyCommand.ts new file mode 100644 index 000000000000..9542205fb26e --- /dev/null +++ b/clients/client-api-gateway/commands/GetApiKeyCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + ApiKey, + GetApiKeyRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetApiKeyCommand, + serializeAws_restJson1_1GetApiKeyCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetApiKeyCommandInput = GetApiKeyRequest; +export type GetApiKeyCommandOutput = ApiKey; + +export class GetApiKeyCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetApiKeyCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetApiKeyCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetApiKeyCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetApiKeyCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetApiKeysCommand.ts b/clients/client-api-gateway/commands/GetApiKeysCommand.ts new file mode 100644 index 000000000000..5446861547c9 --- /dev/null +++ b/clients/client-api-gateway/commands/GetApiKeysCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + ApiKeys, + GetApiKeysRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetApiKeysCommand, + serializeAws_restJson1_1GetApiKeysCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetApiKeysCommandInput = GetApiKeysRequest; +export type GetApiKeysCommandOutput = ApiKeys; + +export class GetApiKeysCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetApiKeysCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetApiKeysCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetApiKeysCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetApiKeysCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetAuthorizerCommand.ts b/clients/client-api-gateway/commands/GetAuthorizerCommand.ts new file mode 100644 index 000000000000..61c2e3e5e0a4 --- /dev/null +++ b/clients/client-api-gateway/commands/GetAuthorizerCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + Authorizer, + GetAuthorizerRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetAuthorizerCommand, + serializeAws_restJson1_1GetAuthorizerCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetAuthorizerCommandInput = GetAuthorizerRequest; +export type GetAuthorizerCommandOutput = Authorizer; + +export class GetAuthorizerCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetAuthorizerCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetAuthorizerCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetAuthorizerCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetAuthorizerCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetAuthorizersCommand.ts b/clients/client-api-gateway/commands/GetAuthorizersCommand.ts new file mode 100644 index 000000000000..c0f4b7dbf6bf --- /dev/null +++ b/clients/client-api-gateway/commands/GetAuthorizersCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + Authorizers, + GetAuthorizersRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetAuthorizersCommand, + serializeAws_restJson1_1GetAuthorizersCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetAuthorizersCommandInput = GetAuthorizersRequest; +export type GetAuthorizersCommandOutput = Authorizers; + +export class GetAuthorizersCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetAuthorizersCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetAuthorizersCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetAuthorizersCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetAuthorizersCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetBasePathMappingCommand.ts b/clients/client-api-gateway/commands/GetBasePathMappingCommand.ts new file mode 100644 index 000000000000..1be4f9f06ce8 --- /dev/null +++ b/clients/client-api-gateway/commands/GetBasePathMappingCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + BasePathMapping, + GetBasePathMappingRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetBasePathMappingCommand, + serializeAws_restJson1_1GetBasePathMappingCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetBasePathMappingCommandInput = GetBasePathMappingRequest; +export type GetBasePathMappingCommandOutput = BasePathMapping; + +export class GetBasePathMappingCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetBasePathMappingCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetBasePathMappingCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetBasePathMappingCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetBasePathMappingCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetBasePathMappingsCommand.ts b/clients/client-api-gateway/commands/GetBasePathMappingsCommand.ts new file mode 100644 index 000000000000..de710506319e --- /dev/null +++ b/clients/client-api-gateway/commands/GetBasePathMappingsCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + BasePathMappings, + GetBasePathMappingsRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetBasePathMappingsCommand, + serializeAws_restJson1_1GetBasePathMappingsCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetBasePathMappingsCommandInput = GetBasePathMappingsRequest; +export type GetBasePathMappingsCommandOutput = BasePathMappings; + +export class GetBasePathMappingsCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetBasePathMappingsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetBasePathMappingsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetBasePathMappingsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetBasePathMappingsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetClientCertificateCommand.ts b/clients/client-api-gateway/commands/GetClientCertificateCommand.ts new file mode 100644 index 000000000000..e4753baaca81 --- /dev/null +++ b/clients/client-api-gateway/commands/GetClientCertificateCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + ClientCertificate, + GetClientCertificateRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetClientCertificateCommand, + serializeAws_restJson1_1GetClientCertificateCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetClientCertificateCommandInput = GetClientCertificateRequest; +export type GetClientCertificateCommandOutput = ClientCertificate; + +export class GetClientCertificateCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetClientCertificateCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetClientCertificateCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetClientCertificateCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetClientCertificateCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetClientCertificatesCommand.ts b/clients/client-api-gateway/commands/GetClientCertificatesCommand.ts new file mode 100644 index 000000000000..9720df24fa79 --- /dev/null +++ b/clients/client-api-gateway/commands/GetClientCertificatesCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + ClientCertificates, + GetClientCertificatesRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetClientCertificatesCommand, + serializeAws_restJson1_1GetClientCertificatesCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetClientCertificatesCommandInput = GetClientCertificatesRequest; +export type GetClientCertificatesCommandOutput = ClientCertificates; + +export class GetClientCertificatesCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetClientCertificatesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetClientCertificatesCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetClientCertificatesCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetClientCertificatesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetDeploymentCommand.ts b/clients/client-api-gateway/commands/GetDeploymentCommand.ts new file mode 100644 index 000000000000..3b7288d62112 --- /dev/null +++ b/clients/client-api-gateway/commands/GetDeploymentCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + Deployment, + GetDeploymentRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetDeploymentCommand, + serializeAws_restJson1_1GetDeploymentCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetDeploymentCommandInput = GetDeploymentRequest; +export type GetDeploymentCommandOutput = Deployment; + +export class GetDeploymentCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetDeploymentCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetDeploymentCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetDeploymentCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetDeploymentCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetDeploymentsCommand.ts b/clients/client-api-gateway/commands/GetDeploymentsCommand.ts new file mode 100644 index 000000000000..d545fc7f2ff1 --- /dev/null +++ b/clients/client-api-gateway/commands/GetDeploymentsCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + Deployments, + GetDeploymentsRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetDeploymentsCommand, + serializeAws_restJson1_1GetDeploymentsCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetDeploymentsCommandInput = GetDeploymentsRequest; +export type GetDeploymentsCommandOutput = Deployments; + +export class GetDeploymentsCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetDeploymentsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetDeploymentsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetDeploymentsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetDeploymentsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetDocumentationPartCommand.ts b/clients/client-api-gateway/commands/GetDocumentationPartCommand.ts new file mode 100644 index 000000000000..b397f61f1845 --- /dev/null +++ b/clients/client-api-gateway/commands/GetDocumentationPartCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + DocumentationPart, + GetDocumentationPartRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetDocumentationPartCommand, + serializeAws_restJson1_1GetDocumentationPartCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetDocumentationPartCommandInput = GetDocumentationPartRequest; +export type GetDocumentationPartCommandOutput = DocumentationPart; + +export class GetDocumentationPartCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetDocumentationPartCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetDocumentationPartCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetDocumentationPartCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetDocumentationPartCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetDocumentationPartsCommand.ts b/clients/client-api-gateway/commands/GetDocumentationPartsCommand.ts new file mode 100644 index 000000000000..b2fc95652db2 --- /dev/null +++ b/clients/client-api-gateway/commands/GetDocumentationPartsCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + DocumentationParts, + GetDocumentationPartsRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetDocumentationPartsCommand, + serializeAws_restJson1_1GetDocumentationPartsCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetDocumentationPartsCommandInput = GetDocumentationPartsRequest; +export type GetDocumentationPartsCommandOutput = DocumentationParts; + +export class GetDocumentationPartsCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetDocumentationPartsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetDocumentationPartsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetDocumentationPartsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetDocumentationPartsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetDocumentationVersionCommand.ts b/clients/client-api-gateway/commands/GetDocumentationVersionCommand.ts new file mode 100644 index 000000000000..ccd784f9f878 --- /dev/null +++ b/clients/client-api-gateway/commands/GetDocumentationVersionCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + DocumentationVersion, + GetDocumentationVersionRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetDocumentationVersionCommand, + serializeAws_restJson1_1GetDocumentationVersionCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetDocumentationVersionCommandInput = GetDocumentationVersionRequest; +export type GetDocumentationVersionCommandOutput = DocumentationVersion; + +export class GetDocumentationVersionCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetDocumentationVersionCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetDocumentationVersionCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetDocumentationVersionCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetDocumentationVersionCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetDocumentationVersionsCommand.ts b/clients/client-api-gateway/commands/GetDocumentationVersionsCommand.ts new file mode 100644 index 000000000000..a15fe351869b --- /dev/null +++ b/clients/client-api-gateway/commands/GetDocumentationVersionsCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + DocumentationVersions, + GetDocumentationVersionsRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetDocumentationVersionsCommand, + serializeAws_restJson1_1GetDocumentationVersionsCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetDocumentationVersionsCommandInput = GetDocumentationVersionsRequest; +export type GetDocumentationVersionsCommandOutput = DocumentationVersions; + +export class GetDocumentationVersionsCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetDocumentationVersionsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetDocumentationVersionsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetDocumentationVersionsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetDocumentationVersionsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetDomainNameCommand.ts b/clients/client-api-gateway/commands/GetDomainNameCommand.ts new file mode 100644 index 000000000000..a2a3f1a0a900 --- /dev/null +++ b/clients/client-api-gateway/commands/GetDomainNameCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + DomainName, + GetDomainNameRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetDomainNameCommand, + serializeAws_restJson1_1GetDomainNameCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetDomainNameCommandInput = GetDomainNameRequest; +export type GetDomainNameCommandOutput = DomainName; + +export class GetDomainNameCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetDomainNameCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetDomainNameCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetDomainNameCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetDomainNameCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetDomainNamesCommand.ts b/clients/client-api-gateway/commands/GetDomainNamesCommand.ts new file mode 100644 index 000000000000..14c3f0c000ae --- /dev/null +++ b/clients/client-api-gateway/commands/GetDomainNamesCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + DomainNames, + GetDomainNamesRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetDomainNamesCommand, + serializeAws_restJson1_1GetDomainNamesCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetDomainNamesCommandInput = GetDomainNamesRequest; +export type GetDomainNamesCommandOutput = DomainNames; + +export class GetDomainNamesCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetDomainNamesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetDomainNamesCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetDomainNamesCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetDomainNamesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetExportCommand.ts b/clients/client-api-gateway/commands/GetExportCommand.ts new file mode 100644 index 000000000000..8153dcd93403 --- /dev/null +++ b/clients/client-api-gateway/commands/GetExportCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + ExportResponse, + GetExportRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetExportCommand, + serializeAws_restJson1_1GetExportCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetExportCommandInput = GetExportRequest; +export type GetExportCommandOutput = ExportResponse; + +export class GetExportCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetExportCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetExportCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetExportCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetExportCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetGatewayResponseCommand.ts b/clients/client-api-gateway/commands/GetGatewayResponseCommand.ts new file mode 100644 index 000000000000..f97f6f4c61e9 --- /dev/null +++ b/clients/client-api-gateway/commands/GetGatewayResponseCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + GatewayResponse, + GetGatewayResponseRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetGatewayResponseCommand, + serializeAws_restJson1_1GetGatewayResponseCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetGatewayResponseCommandInput = GetGatewayResponseRequest; +export type GetGatewayResponseCommandOutput = GatewayResponse; + +export class GetGatewayResponseCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetGatewayResponseCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetGatewayResponseCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetGatewayResponseCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetGatewayResponseCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetGatewayResponsesCommand.ts b/clients/client-api-gateway/commands/GetGatewayResponsesCommand.ts new file mode 100644 index 000000000000..6d9c2fbd23c9 --- /dev/null +++ b/clients/client-api-gateway/commands/GetGatewayResponsesCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + GatewayResponses, + GetGatewayResponsesRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetGatewayResponsesCommand, + serializeAws_restJson1_1GetGatewayResponsesCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetGatewayResponsesCommandInput = GetGatewayResponsesRequest; +export type GetGatewayResponsesCommandOutput = GatewayResponses; + +export class GetGatewayResponsesCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetGatewayResponsesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetGatewayResponsesCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetGatewayResponsesCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetGatewayResponsesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetIntegrationCommand.ts b/clients/client-api-gateway/commands/GetIntegrationCommand.ts new file mode 100644 index 000000000000..35dfb572d11c --- /dev/null +++ b/clients/client-api-gateway/commands/GetIntegrationCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + GetIntegrationRequest, + Integration, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetIntegrationCommand, + serializeAws_restJson1_1GetIntegrationCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetIntegrationCommandInput = GetIntegrationRequest; +export type GetIntegrationCommandOutput = Integration; + +export class GetIntegrationCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetIntegrationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetIntegrationCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetIntegrationCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetIntegrationCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetIntegrationResponseCommand.ts b/clients/client-api-gateway/commands/GetIntegrationResponseCommand.ts new file mode 100644 index 000000000000..7e0dab4d0075 --- /dev/null +++ b/clients/client-api-gateway/commands/GetIntegrationResponseCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + GetIntegrationResponseRequest, + IntegrationResponse, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetIntegrationResponseCommand, + serializeAws_restJson1_1GetIntegrationResponseCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetIntegrationResponseCommandInput = GetIntegrationResponseRequest; +export type GetIntegrationResponseCommandOutput = IntegrationResponse; + +export class GetIntegrationResponseCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetIntegrationResponseCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetIntegrationResponseCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetIntegrationResponseCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetIntegrationResponseCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetMethodCommand.ts b/clients/client-api-gateway/commands/GetMethodCommand.ts new file mode 100644 index 000000000000..1f85779fcde7 --- /dev/null +++ b/clients/client-api-gateway/commands/GetMethodCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + GetMethodRequest, + Method, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetMethodCommand, + serializeAws_restJson1_1GetMethodCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetMethodCommandInput = GetMethodRequest; +export type GetMethodCommandOutput = Method; + +export class GetMethodCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetMethodCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetMethodCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetMethodCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetMethodCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetMethodResponseCommand.ts b/clients/client-api-gateway/commands/GetMethodResponseCommand.ts new file mode 100644 index 000000000000..a3b6731cf7d8 --- /dev/null +++ b/clients/client-api-gateway/commands/GetMethodResponseCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + GetMethodResponseRequest, + MethodResponse, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetMethodResponseCommand, + serializeAws_restJson1_1GetMethodResponseCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetMethodResponseCommandInput = GetMethodResponseRequest; +export type GetMethodResponseCommandOutput = MethodResponse; + +export class GetMethodResponseCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetMethodResponseCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetMethodResponseCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetMethodResponseCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetMethodResponseCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetModelCommand.ts b/clients/client-api-gateway/commands/GetModelCommand.ts new file mode 100644 index 000000000000..f53f69b7110f --- /dev/null +++ b/clients/client-api-gateway/commands/GetModelCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + GetModelRequest, + Model, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetModelCommand, + serializeAws_restJson1_1GetModelCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetModelCommandInput = GetModelRequest; +export type GetModelCommandOutput = Model; + +export class GetModelCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetModelCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetModelCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetModelCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetModelCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetModelTemplateCommand.ts b/clients/client-api-gateway/commands/GetModelTemplateCommand.ts new file mode 100644 index 000000000000..04a459117bcf --- /dev/null +++ b/clients/client-api-gateway/commands/GetModelTemplateCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + GetModelTemplateRequest, + Template, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetModelTemplateCommand, + serializeAws_restJson1_1GetModelTemplateCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetModelTemplateCommandInput = GetModelTemplateRequest; +export type GetModelTemplateCommandOutput = Template; + +export class GetModelTemplateCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetModelTemplateCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetModelTemplateCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetModelTemplateCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetModelTemplateCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetModelsCommand.ts b/clients/client-api-gateway/commands/GetModelsCommand.ts new file mode 100644 index 000000000000..7601c082b3f8 --- /dev/null +++ b/clients/client-api-gateway/commands/GetModelsCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + GetModelsRequest, + Models, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetModelsCommand, + serializeAws_restJson1_1GetModelsCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetModelsCommandInput = GetModelsRequest; +export type GetModelsCommandOutput = Models; + +export class GetModelsCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetModelsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetModelsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetModelsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetModelsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetRequestValidatorCommand.ts b/clients/client-api-gateway/commands/GetRequestValidatorCommand.ts new file mode 100644 index 000000000000..fcaeb0a3ac53 --- /dev/null +++ b/clients/client-api-gateway/commands/GetRequestValidatorCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + GetRequestValidatorRequest, + RequestValidator, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetRequestValidatorCommand, + serializeAws_restJson1_1GetRequestValidatorCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetRequestValidatorCommandInput = GetRequestValidatorRequest; +export type GetRequestValidatorCommandOutput = RequestValidator; + +export class GetRequestValidatorCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetRequestValidatorCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetRequestValidatorCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetRequestValidatorCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetRequestValidatorCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetRequestValidatorsCommand.ts b/clients/client-api-gateway/commands/GetRequestValidatorsCommand.ts new file mode 100644 index 000000000000..5bf34019cd1f --- /dev/null +++ b/clients/client-api-gateway/commands/GetRequestValidatorsCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + GetRequestValidatorsRequest, + RequestValidators, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetRequestValidatorsCommand, + serializeAws_restJson1_1GetRequestValidatorsCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetRequestValidatorsCommandInput = GetRequestValidatorsRequest; +export type GetRequestValidatorsCommandOutput = RequestValidators; + +export class GetRequestValidatorsCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetRequestValidatorsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetRequestValidatorsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetRequestValidatorsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetRequestValidatorsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetResourceCommand.ts b/clients/client-api-gateway/commands/GetResourceCommand.ts new file mode 100644 index 000000000000..1a4c9508886d --- /dev/null +++ b/clients/client-api-gateway/commands/GetResourceCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + GetResourceRequest, + Resource, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetResourceCommand, + serializeAws_restJson1_1GetResourceCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetResourceCommandInput = GetResourceRequest; +export type GetResourceCommandOutput = Resource; + +export class GetResourceCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetResourceCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetResourceCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetResourcesCommand.ts b/clients/client-api-gateway/commands/GetResourcesCommand.ts new file mode 100644 index 000000000000..bca7fb28ab79 --- /dev/null +++ b/clients/client-api-gateway/commands/GetResourcesCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + GetResourcesRequest, + Resources, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetResourcesCommand, + serializeAws_restJson1_1GetResourcesCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetResourcesCommandInput = GetResourcesRequest; +export type GetResourcesCommandOutput = Resources; + +export class GetResourcesCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetResourcesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetResourcesCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetResourcesCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetResourcesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetRestApiCommand.ts b/clients/client-api-gateway/commands/GetRestApiCommand.ts new file mode 100644 index 000000000000..f0db74c3360c --- /dev/null +++ b/clients/client-api-gateway/commands/GetRestApiCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + GetRestApiRequest, + RestApi, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetRestApiCommand, + serializeAws_restJson1_1GetRestApiCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetRestApiCommandInput = GetRestApiRequest; +export type GetRestApiCommandOutput = RestApi; + +export class GetRestApiCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetRestApiCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetRestApiCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetRestApiCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetRestApiCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetRestApisCommand.ts b/clients/client-api-gateway/commands/GetRestApisCommand.ts new file mode 100644 index 000000000000..bd1e80a5e2fa --- /dev/null +++ b/clients/client-api-gateway/commands/GetRestApisCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + GetRestApisRequest, + RestApis, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetRestApisCommand, + serializeAws_restJson1_1GetRestApisCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetRestApisCommandInput = GetRestApisRequest; +export type GetRestApisCommandOutput = RestApis; + +export class GetRestApisCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetRestApisCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetRestApisCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetRestApisCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetRestApisCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetSdkCommand.ts b/clients/client-api-gateway/commands/GetSdkCommand.ts new file mode 100644 index 000000000000..43ab61ddab32 --- /dev/null +++ b/clients/client-api-gateway/commands/GetSdkCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + GetSdkRequest, + SdkResponse, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetSdkCommand, + serializeAws_restJson1_1GetSdkCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetSdkCommandInput = GetSdkRequest; +export type GetSdkCommandOutput = SdkResponse; + +export class GetSdkCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetSdkCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetSdkCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetSdkCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetSdkCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetSdkTypeCommand.ts b/clients/client-api-gateway/commands/GetSdkTypeCommand.ts new file mode 100644 index 000000000000..f2c8c456db50 --- /dev/null +++ b/clients/client-api-gateway/commands/GetSdkTypeCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + GetSdkTypeRequest, + SdkType, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetSdkTypeCommand, + serializeAws_restJson1_1GetSdkTypeCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetSdkTypeCommandInput = GetSdkTypeRequest; +export type GetSdkTypeCommandOutput = SdkType; + +export class GetSdkTypeCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetSdkTypeCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetSdkTypeCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetSdkTypeCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetSdkTypeCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetSdkTypesCommand.ts b/clients/client-api-gateway/commands/GetSdkTypesCommand.ts new file mode 100644 index 000000000000..2e171c1b94fd --- /dev/null +++ b/clients/client-api-gateway/commands/GetSdkTypesCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + GetSdkTypesRequest, + SdkTypes, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetSdkTypesCommand, + serializeAws_restJson1_1GetSdkTypesCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetSdkTypesCommandInput = GetSdkTypesRequest; +export type GetSdkTypesCommandOutput = SdkTypes; + +export class GetSdkTypesCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetSdkTypesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetSdkTypesCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetSdkTypesCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetSdkTypesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetStageCommand.ts b/clients/client-api-gateway/commands/GetStageCommand.ts new file mode 100644 index 000000000000..663226babb0a --- /dev/null +++ b/clients/client-api-gateway/commands/GetStageCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + GetStageRequest, + Stage, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetStageCommand, + serializeAws_restJson1_1GetStageCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetStageCommandInput = GetStageRequest; +export type GetStageCommandOutput = Stage; + +export class GetStageCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetStageCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetStageCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetStageCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetStageCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetStagesCommand.ts b/clients/client-api-gateway/commands/GetStagesCommand.ts new file mode 100644 index 000000000000..39669930990c --- /dev/null +++ b/clients/client-api-gateway/commands/GetStagesCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + GetStagesRequest, + Stages, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetStagesCommand, + serializeAws_restJson1_1GetStagesCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetStagesCommandInput = GetStagesRequest; +export type GetStagesCommandOutput = Stages; + +export class GetStagesCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetStagesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetStagesCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetStagesCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetStagesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetTagsCommand.ts b/clients/client-api-gateway/commands/GetTagsCommand.ts new file mode 100644 index 000000000000..7d71f7301cdd --- /dev/null +++ b/clients/client-api-gateway/commands/GetTagsCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + GetTagsRequest, + Tags, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetTagsCommand, + serializeAws_restJson1_1GetTagsCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetTagsCommandInput = GetTagsRequest; +export type GetTagsCommandOutput = Tags; + +export class GetTagsCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetTagsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetTagsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetTagsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetTagsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetUsageCommand.ts b/clients/client-api-gateway/commands/GetUsageCommand.ts new file mode 100644 index 000000000000..266a0329c4c2 --- /dev/null +++ b/clients/client-api-gateway/commands/GetUsageCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + GetUsageRequest, + Usage, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetUsageCommand, + serializeAws_restJson1_1GetUsageCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetUsageCommandInput = GetUsageRequest; +export type GetUsageCommandOutput = Usage; + +export class GetUsageCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetUsageCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetUsageCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetUsageCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetUsageCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetUsagePlanCommand.ts b/clients/client-api-gateway/commands/GetUsagePlanCommand.ts new file mode 100644 index 000000000000..cddf0bae9e9e --- /dev/null +++ b/clients/client-api-gateway/commands/GetUsagePlanCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + GetUsagePlanRequest, + UsagePlan, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetUsagePlanCommand, + serializeAws_restJson1_1GetUsagePlanCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetUsagePlanCommandInput = GetUsagePlanRequest; +export type GetUsagePlanCommandOutput = UsagePlan; + +export class GetUsagePlanCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetUsagePlanCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetUsagePlanCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetUsagePlanCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetUsagePlanCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetUsagePlanKeyCommand.ts b/clients/client-api-gateway/commands/GetUsagePlanKeyCommand.ts new file mode 100644 index 000000000000..13e6380e9c66 --- /dev/null +++ b/clients/client-api-gateway/commands/GetUsagePlanKeyCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + GetUsagePlanKeyRequest, + UsagePlanKey, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetUsagePlanKeyCommand, + serializeAws_restJson1_1GetUsagePlanKeyCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetUsagePlanKeyCommandInput = GetUsagePlanKeyRequest; +export type GetUsagePlanKeyCommandOutput = UsagePlanKey; + +export class GetUsagePlanKeyCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetUsagePlanKeyCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetUsagePlanKeyCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetUsagePlanKeyCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetUsagePlanKeyCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetUsagePlanKeysCommand.ts b/clients/client-api-gateway/commands/GetUsagePlanKeysCommand.ts new file mode 100644 index 000000000000..36f7c0ce5fee --- /dev/null +++ b/clients/client-api-gateway/commands/GetUsagePlanKeysCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + GetUsagePlanKeysRequest, + UsagePlanKeys, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetUsagePlanKeysCommand, + serializeAws_restJson1_1GetUsagePlanKeysCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetUsagePlanKeysCommandInput = GetUsagePlanKeysRequest; +export type GetUsagePlanKeysCommandOutput = UsagePlanKeys; + +export class GetUsagePlanKeysCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetUsagePlanKeysCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetUsagePlanKeysCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetUsagePlanKeysCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetUsagePlanKeysCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetUsagePlansCommand.ts b/clients/client-api-gateway/commands/GetUsagePlansCommand.ts new file mode 100644 index 000000000000..005ff2eadf28 --- /dev/null +++ b/clients/client-api-gateway/commands/GetUsagePlansCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + GetUsagePlansRequest, + UsagePlans, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetUsagePlansCommand, + serializeAws_restJson1_1GetUsagePlansCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetUsagePlansCommandInput = GetUsagePlansRequest; +export type GetUsagePlansCommandOutput = UsagePlans; + +export class GetUsagePlansCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetUsagePlansCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetUsagePlansCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetUsagePlansCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetUsagePlansCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetVpcLinkCommand.ts b/clients/client-api-gateway/commands/GetVpcLinkCommand.ts new file mode 100644 index 000000000000..893b1049459c --- /dev/null +++ b/clients/client-api-gateway/commands/GetVpcLinkCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + GetVpcLinkRequest, + VpcLink, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetVpcLinkCommand, + serializeAws_restJson1_1GetVpcLinkCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetVpcLinkCommandInput = GetVpcLinkRequest; +export type GetVpcLinkCommandOutput = VpcLink; + +export class GetVpcLinkCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetVpcLinkCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetVpcLinkCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetVpcLinkCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetVpcLinkCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/GetVpcLinksCommand.ts b/clients/client-api-gateway/commands/GetVpcLinksCommand.ts new file mode 100644 index 000000000000..8512370924de --- /dev/null +++ b/clients/client-api-gateway/commands/GetVpcLinksCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + GetVpcLinksRequest, + VpcLinks, +} from "../models/index"; +import { + deserializeAws_restJson1_1GetVpcLinksCommand, + serializeAws_restJson1_1GetVpcLinksCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type GetVpcLinksCommandInput = GetVpcLinksRequest; +export type GetVpcLinksCommandOutput = VpcLinks; + +export class GetVpcLinksCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetVpcLinksCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetVpcLinksCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetVpcLinksCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetVpcLinksCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/ImportApiKeysCommand.ts b/clients/client-api-gateway/commands/ImportApiKeysCommand.ts new file mode 100644 index 000000000000..8442092dbdb1 --- /dev/null +++ b/clients/client-api-gateway/commands/ImportApiKeysCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + ApiKeyIds, + ImportApiKeysRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1ImportApiKeysCommand, + serializeAws_restJson1_1ImportApiKeysCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type ImportApiKeysCommandInput = ImportApiKeysRequest; +export type ImportApiKeysCommandOutput = ApiKeyIds; + +export class ImportApiKeysCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ImportApiKeysCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: ImportApiKeysCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1ImportApiKeysCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1ImportApiKeysCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/ImportDocumentationPartsCommand.ts b/clients/client-api-gateway/commands/ImportDocumentationPartsCommand.ts new file mode 100644 index 000000000000..8b4caf11d38b --- /dev/null +++ b/clients/client-api-gateway/commands/ImportDocumentationPartsCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + DocumentationPartIds, + ImportDocumentationPartsRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1ImportDocumentationPartsCommand, + serializeAws_restJson1_1ImportDocumentationPartsCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type ImportDocumentationPartsCommandInput = ImportDocumentationPartsRequest; +export type ImportDocumentationPartsCommandOutput = DocumentationPartIds; + +export class ImportDocumentationPartsCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ImportDocumentationPartsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: ImportDocumentationPartsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1ImportDocumentationPartsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1ImportDocumentationPartsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/ImportRestApiCommand.ts b/clients/client-api-gateway/commands/ImportRestApiCommand.ts new file mode 100644 index 000000000000..6218f09f393f --- /dev/null +++ b/clients/client-api-gateway/commands/ImportRestApiCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + ImportRestApiRequest, + RestApi, +} from "../models/index"; +import { + deserializeAws_restJson1_1ImportRestApiCommand, + serializeAws_restJson1_1ImportRestApiCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type ImportRestApiCommandInput = ImportRestApiRequest; +export type ImportRestApiCommandOutput = RestApi; + +export class ImportRestApiCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ImportRestApiCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: ImportRestApiCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1ImportRestApiCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1ImportRestApiCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/PutGatewayResponseCommand.ts b/clients/client-api-gateway/commands/PutGatewayResponseCommand.ts new file mode 100644 index 000000000000..63ca9e90a307 --- /dev/null +++ b/clients/client-api-gateway/commands/PutGatewayResponseCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + GatewayResponse, + PutGatewayResponseRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1PutGatewayResponseCommand, + serializeAws_restJson1_1PutGatewayResponseCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type PutGatewayResponseCommandInput = PutGatewayResponseRequest; +export type PutGatewayResponseCommandOutput = GatewayResponse; + +export class PutGatewayResponseCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: PutGatewayResponseCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: PutGatewayResponseCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1PutGatewayResponseCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1PutGatewayResponseCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/PutIntegrationCommand.ts b/clients/client-api-gateway/commands/PutIntegrationCommand.ts new file mode 100644 index 000000000000..10f1433895a5 --- /dev/null +++ b/clients/client-api-gateway/commands/PutIntegrationCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + Integration, + PutIntegrationRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1PutIntegrationCommand, + serializeAws_restJson1_1PutIntegrationCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type PutIntegrationCommandInput = PutIntegrationRequest; +export type PutIntegrationCommandOutput = Integration; + +export class PutIntegrationCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: PutIntegrationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: PutIntegrationCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1PutIntegrationCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1PutIntegrationCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/PutIntegrationResponseCommand.ts b/clients/client-api-gateway/commands/PutIntegrationResponseCommand.ts new file mode 100644 index 000000000000..f06ab1d96784 --- /dev/null +++ b/clients/client-api-gateway/commands/PutIntegrationResponseCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + IntegrationResponse, + PutIntegrationResponseRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1PutIntegrationResponseCommand, + serializeAws_restJson1_1PutIntegrationResponseCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type PutIntegrationResponseCommandInput = PutIntegrationResponseRequest; +export type PutIntegrationResponseCommandOutput = IntegrationResponse; + +export class PutIntegrationResponseCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: PutIntegrationResponseCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: PutIntegrationResponseCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1PutIntegrationResponseCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1PutIntegrationResponseCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/PutMethodCommand.ts b/clients/client-api-gateway/commands/PutMethodCommand.ts new file mode 100644 index 000000000000..55fb4abd1418 --- /dev/null +++ b/clients/client-api-gateway/commands/PutMethodCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + Method, + PutMethodRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1PutMethodCommand, + serializeAws_restJson1_1PutMethodCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type PutMethodCommandInput = PutMethodRequest; +export type PutMethodCommandOutput = Method; + +export class PutMethodCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: PutMethodCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: PutMethodCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1PutMethodCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1PutMethodCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/PutMethodResponseCommand.ts b/clients/client-api-gateway/commands/PutMethodResponseCommand.ts new file mode 100644 index 000000000000..d441946b3a40 --- /dev/null +++ b/clients/client-api-gateway/commands/PutMethodResponseCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + MethodResponse, + PutMethodResponseRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1PutMethodResponseCommand, + serializeAws_restJson1_1PutMethodResponseCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type PutMethodResponseCommandInput = PutMethodResponseRequest; +export type PutMethodResponseCommandOutput = MethodResponse; + +export class PutMethodResponseCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: PutMethodResponseCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: PutMethodResponseCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1PutMethodResponseCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1PutMethodResponseCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/PutRestApiCommand.ts b/clients/client-api-gateway/commands/PutRestApiCommand.ts new file mode 100644 index 000000000000..90570573fd2e --- /dev/null +++ b/clients/client-api-gateway/commands/PutRestApiCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + PutRestApiRequest, + RestApi, +} from "../models/index"; +import { + deserializeAws_restJson1_1PutRestApiCommand, + serializeAws_restJson1_1PutRestApiCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type PutRestApiCommandInput = PutRestApiRequest; +export type PutRestApiCommandOutput = RestApi; + +export class PutRestApiCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: PutRestApiCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: PutRestApiCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1PutRestApiCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1PutRestApiCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/TagResourceCommand.ts b/clients/client-api-gateway/commands/TagResourceCommand.ts new file mode 100644 index 000000000000..b4a095370051 --- /dev/null +++ b/clients/client-api-gateway/commands/TagResourceCommand.ts @@ -0,0 +1,76 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { TagResourceRequest } from "../models/index"; +import { + deserializeAws_restJson1_1TagResourceCommand, + serializeAws_restJson1_1TagResourceCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, +} from "@aws-sdk/types"; + +export type TagResourceCommandInput = TagResourceRequest; +export type TagResourceCommandOutput = __MetadataBearer + +export class TagResourceCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: TagResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: TagResourceCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1TagResourceCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1TagResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/TestInvokeAuthorizerCommand.ts b/clients/client-api-gateway/commands/TestInvokeAuthorizerCommand.ts new file mode 100644 index 000000000000..82817950ce30 --- /dev/null +++ b/clients/client-api-gateway/commands/TestInvokeAuthorizerCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + TestInvokeAuthorizerRequest, + TestInvokeAuthorizerResponse, +} from "../models/index"; +import { + deserializeAws_restJson1_1TestInvokeAuthorizerCommand, + serializeAws_restJson1_1TestInvokeAuthorizerCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type TestInvokeAuthorizerCommandInput = TestInvokeAuthorizerRequest; +export type TestInvokeAuthorizerCommandOutput = TestInvokeAuthorizerResponse; + +export class TestInvokeAuthorizerCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: TestInvokeAuthorizerCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: TestInvokeAuthorizerCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1TestInvokeAuthorizerCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1TestInvokeAuthorizerCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/TestInvokeMethodCommand.ts b/clients/client-api-gateway/commands/TestInvokeMethodCommand.ts new file mode 100644 index 000000000000..59facccdce57 --- /dev/null +++ b/clients/client-api-gateway/commands/TestInvokeMethodCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + TestInvokeMethodRequest, + TestInvokeMethodResponse, +} from "../models/index"; +import { + deserializeAws_restJson1_1TestInvokeMethodCommand, + serializeAws_restJson1_1TestInvokeMethodCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type TestInvokeMethodCommandInput = TestInvokeMethodRequest; +export type TestInvokeMethodCommandOutput = TestInvokeMethodResponse; + +export class TestInvokeMethodCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: TestInvokeMethodCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: TestInvokeMethodCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1TestInvokeMethodCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1TestInvokeMethodCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/UntagResourceCommand.ts b/clients/client-api-gateway/commands/UntagResourceCommand.ts new file mode 100644 index 000000000000..e28a005d15df --- /dev/null +++ b/clients/client-api-gateway/commands/UntagResourceCommand.ts @@ -0,0 +1,76 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { UntagResourceRequest } from "../models/index"; +import { + deserializeAws_restJson1_1UntagResourceCommand, + serializeAws_restJson1_1UntagResourceCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, +} from "@aws-sdk/types"; + +export type UntagResourceCommandInput = UntagResourceRequest; +export type UntagResourceCommandOutput = __MetadataBearer + +export class UntagResourceCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UntagResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UntagResourceCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1UntagResourceCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1UntagResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/UpdateAccountCommand.ts b/clients/client-api-gateway/commands/UpdateAccountCommand.ts new file mode 100644 index 000000000000..29e26e0de894 --- /dev/null +++ b/clients/client-api-gateway/commands/UpdateAccountCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + Account, + UpdateAccountRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1UpdateAccountCommand, + serializeAws_restJson1_1UpdateAccountCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type UpdateAccountCommandInput = UpdateAccountRequest; +export type UpdateAccountCommandOutput = Account; + +export class UpdateAccountCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateAccountCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateAccountCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1UpdateAccountCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1UpdateAccountCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/UpdateApiKeyCommand.ts b/clients/client-api-gateway/commands/UpdateApiKeyCommand.ts new file mode 100644 index 000000000000..9d4fb47f1912 --- /dev/null +++ b/clients/client-api-gateway/commands/UpdateApiKeyCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + ApiKey, + UpdateApiKeyRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1UpdateApiKeyCommand, + serializeAws_restJson1_1UpdateApiKeyCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type UpdateApiKeyCommandInput = UpdateApiKeyRequest; +export type UpdateApiKeyCommandOutput = ApiKey; + +export class UpdateApiKeyCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateApiKeyCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateApiKeyCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1UpdateApiKeyCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1UpdateApiKeyCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/UpdateAuthorizerCommand.ts b/clients/client-api-gateway/commands/UpdateAuthorizerCommand.ts new file mode 100644 index 000000000000..6d61d75d572d --- /dev/null +++ b/clients/client-api-gateway/commands/UpdateAuthorizerCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + Authorizer, + UpdateAuthorizerRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1UpdateAuthorizerCommand, + serializeAws_restJson1_1UpdateAuthorizerCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type UpdateAuthorizerCommandInput = UpdateAuthorizerRequest; +export type UpdateAuthorizerCommandOutput = Authorizer; + +export class UpdateAuthorizerCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateAuthorizerCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateAuthorizerCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1UpdateAuthorizerCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1UpdateAuthorizerCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/UpdateBasePathMappingCommand.ts b/clients/client-api-gateway/commands/UpdateBasePathMappingCommand.ts new file mode 100644 index 000000000000..79b2e02f723c --- /dev/null +++ b/clients/client-api-gateway/commands/UpdateBasePathMappingCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + BasePathMapping, + UpdateBasePathMappingRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1UpdateBasePathMappingCommand, + serializeAws_restJson1_1UpdateBasePathMappingCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type UpdateBasePathMappingCommandInput = UpdateBasePathMappingRequest; +export type UpdateBasePathMappingCommandOutput = BasePathMapping; + +export class UpdateBasePathMappingCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateBasePathMappingCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateBasePathMappingCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1UpdateBasePathMappingCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1UpdateBasePathMappingCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/UpdateClientCertificateCommand.ts b/clients/client-api-gateway/commands/UpdateClientCertificateCommand.ts new file mode 100644 index 000000000000..7fcc14a60a9e --- /dev/null +++ b/clients/client-api-gateway/commands/UpdateClientCertificateCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + ClientCertificate, + UpdateClientCertificateRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1UpdateClientCertificateCommand, + serializeAws_restJson1_1UpdateClientCertificateCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type UpdateClientCertificateCommandInput = UpdateClientCertificateRequest; +export type UpdateClientCertificateCommandOutput = ClientCertificate; + +export class UpdateClientCertificateCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateClientCertificateCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateClientCertificateCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1UpdateClientCertificateCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1UpdateClientCertificateCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/UpdateDeploymentCommand.ts b/clients/client-api-gateway/commands/UpdateDeploymentCommand.ts new file mode 100644 index 000000000000..680370e1b298 --- /dev/null +++ b/clients/client-api-gateway/commands/UpdateDeploymentCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + Deployment, + UpdateDeploymentRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1UpdateDeploymentCommand, + serializeAws_restJson1_1UpdateDeploymentCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type UpdateDeploymentCommandInput = UpdateDeploymentRequest; +export type UpdateDeploymentCommandOutput = Deployment; + +export class UpdateDeploymentCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateDeploymentCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateDeploymentCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1UpdateDeploymentCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1UpdateDeploymentCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/UpdateDocumentationPartCommand.ts b/clients/client-api-gateway/commands/UpdateDocumentationPartCommand.ts new file mode 100644 index 000000000000..c03fec1b8b49 --- /dev/null +++ b/clients/client-api-gateway/commands/UpdateDocumentationPartCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + DocumentationPart, + UpdateDocumentationPartRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1UpdateDocumentationPartCommand, + serializeAws_restJson1_1UpdateDocumentationPartCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type UpdateDocumentationPartCommandInput = UpdateDocumentationPartRequest; +export type UpdateDocumentationPartCommandOutput = DocumentationPart; + +export class UpdateDocumentationPartCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateDocumentationPartCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateDocumentationPartCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1UpdateDocumentationPartCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1UpdateDocumentationPartCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/UpdateDocumentationVersionCommand.ts b/clients/client-api-gateway/commands/UpdateDocumentationVersionCommand.ts new file mode 100644 index 000000000000..f017804f3b23 --- /dev/null +++ b/clients/client-api-gateway/commands/UpdateDocumentationVersionCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + DocumentationVersion, + UpdateDocumentationVersionRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1UpdateDocumentationVersionCommand, + serializeAws_restJson1_1UpdateDocumentationVersionCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type UpdateDocumentationVersionCommandInput = UpdateDocumentationVersionRequest; +export type UpdateDocumentationVersionCommandOutput = DocumentationVersion; + +export class UpdateDocumentationVersionCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateDocumentationVersionCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateDocumentationVersionCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1UpdateDocumentationVersionCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1UpdateDocumentationVersionCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/UpdateDomainNameCommand.ts b/clients/client-api-gateway/commands/UpdateDomainNameCommand.ts new file mode 100644 index 000000000000..87d7078843e4 --- /dev/null +++ b/clients/client-api-gateway/commands/UpdateDomainNameCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + DomainName, + UpdateDomainNameRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1UpdateDomainNameCommand, + serializeAws_restJson1_1UpdateDomainNameCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type UpdateDomainNameCommandInput = UpdateDomainNameRequest; +export type UpdateDomainNameCommandOutput = DomainName; + +export class UpdateDomainNameCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateDomainNameCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateDomainNameCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1UpdateDomainNameCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1UpdateDomainNameCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/UpdateGatewayResponseCommand.ts b/clients/client-api-gateway/commands/UpdateGatewayResponseCommand.ts new file mode 100644 index 000000000000..2c09417d0165 --- /dev/null +++ b/clients/client-api-gateway/commands/UpdateGatewayResponseCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + GatewayResponse, + UpdateGatewayResponseRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1UpdateGatewayResponseCommand, + serializeAws_restJson1_1UpdateGatewayResponseCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type UpdateGatewayResponseCommandInput = UpdateGatewayResponseRequest; +export type UpdateGatewayResponseCommandOutput = GatewayResponse; + +export class UpdateGatewayResponseCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateGatewayResponseCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateGatewayResponseCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1UpdateGatewayResponseCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1UpdateGatewayResponseCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/UpdateIntegrationCommand.ts b/clients/client-api-gateway/commands/UpdateIntegrationCommand.ts new file mode 100644 index 000000000000..44c9eaaba156 --- /dev/null +++ b/clients/client-api-gateway/commands/UpdateIntegrationCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + Integration, + UpdateIntegrationRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1UpdateIntegrationCommand, + serializeAws_restJson1_1UpdateIntegrationCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type UpdateIntegrationCommandInput = UpdateIntegrationRequest; +export type UpdateIntegrationCommandOutput = Integration; + +export class UpdateIntegrationCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateIntegrationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateIntegrationCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1UpdateIntegrationCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1UpdateIntegrationCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/UpdateIntegrationResponseCommand.ts b/clients/client-api-gateway/commands/UpdateIntegrationResponseCommand.ts new file mode 100644 index 000000000000..08a0ca18e376 --- /dev/null +++ b/clients/client-api-gateway/commands/UpdateIntegrationResponseCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + IntegrationResponse, + UpdateIntegrationResponseRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1UpdateIntegrationResponseCommand, + serializeAws_restJson1_1UpdateIntegrationResponseCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type UpdateIntegrationResponseCommandInput = UpdateIntegrationResponseRequest; +export type UpdateIntegrationResponseCommandOutput = IntegrationResponse; + +export class UpdateIntegrationResponseCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateIntegrationResponseCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateIntegrationResponseCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1UpdateIntegrationResponseCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1UpdateIntegrationResponseCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/UpdateMethodCommand.ts b/clients/client-api-gateway/commands/UpdateMethodCommand.ts new file mode 100644 index 000000000000..a26e15f5bbb4 --- /dev/null +++ b/clients/client-api-gateway/commands/UpdateMethodCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + Method, + UpdateMethodRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1UpdateMethodCommand, + serializeAws_restJson1_1UpdateMethodCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type UpdateMethodCommandInput = UpdateMethodRequest; +export type UpdateMethodCommandOutput = Method; + +export class UpdateMethodCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateMethodCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateMethodCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1UpdateMethodCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1UpdateMethodCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/UpdateMethodResponseCommand.ts b/clients/client-api-gateway/commands/UpdateMethodResponseCommand.ts new file mode 100644 index 000000000000..0835144417ec --- /dev/null +++ b/clients/client-api-gateway/commands/UpdateMethodResponseCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + MethodResponse, + UpdateMethodResponseRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1UpdateMethodResponseCommand, + serializeAws_restJson1_1UpdateMethodResponseCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type UpdateMethodResponseCommandInput = UpdateMethodResponseRequest; +export type UpdateMethodResponseCommandOutput = MethodResponse; + +export class UpdateMethodResponseCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateMethodResponseCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateMethodResponseCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1UpdateMethodResponseCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1UpdateMethodResponseCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/UpdateModelCommand.ts b/clients/client-api-gateway/commands/UpdateModelCommand.ts new file mode 100644 index 000000000000..65dfae6d640b --- /dev/null +++ b/clients/client-api-gateway/commands/UpdateModelCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + Model, + UpdateModelRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1UpdateModelCommand, + serializeAws_restJson1_1UpdateModelCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type UpdateModelCommandInput = UpdateModelRequest; +export type UpdateModelCommandOutput = Model; + +export class UpdateModelCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateModelCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateModelCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1UpdateModelCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1UpdateModelCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/UpdateRequestValidatorCommand.ts b/clients/client-api-gateway/commands/UpdateRequestValidatorCommand.ts new file mode 100644 index 000000000000..305734324b90 --- /dev/null +++ b/clients/client-api-gateway/commands/UpdateRequestValidatorCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + RequestValidator, + UpdateRequestValidatorRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1UpdateRequestValidatorCommand, + serializeAws_restJson1_1UpdateRequestValidatorCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type UpdateRequestValidatorCommandInput = UpdateRequestValidatorRequest; +export type UpdateRequestValidatorCommandOutput = RequestValidator; + +export class UpdateRequestValidatorCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateRequestValidatorCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateRequestValidatorCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1UpdateRequestValidatorCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1UpdateRequestValidatorCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/UpdateResourceCommand.ts b/clients/client-api-gateway/commands/UpdateResourceCommand.ts new file mode 100644 index 000000000000..e06055cdb2c3 --- /dev/null +++ b/clients/client-api-gateway/commands/UpdateResourceCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + Resource, + UpdateResourceRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1UpdateResourceCommand, + serializeAws_restJson1_1UpdateResourceCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type UpdateResourceCommandInput = UpdateResourceRequest; +export type UpdateResourceCommandOutput = Resource; + +export class UpdateResourceCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateResourceCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1UpdateResourceCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1UpdateResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/UpdateRestApiCommand.ts b/clients/client-api-gateway/commands/UpdateRestApiCommand.ts new file mode 100644 index 000000000000..397236b2500d --- /dev/null +++ b/clients/client-api-gateway/commands/UpdateRestApiCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + RestApi, + UpdateRestApiRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1UpdateRestApiCommand, + serializeAws_restJson1_1UpdateRestApiCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type UpdateRestApiCommandInput = UpdateRestApiRequest; +export type UpdateRestApiCommandOutput = RestApi; + +export class UpdateRestApiCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateRestApiCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateRestApiCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1UpdateRestApiCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1UpdateRestApiCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/UpdateStageCommand.ts b/clients/client-api-gateway/commands/UpdateStageCommand.ts new file mode 100644 index 000000000000..049203abc47a --- /dev/null +++ b/clients/client-api-gateway/commands/UpdateStageCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + Stage, + UpdateStageRequest, +} from "../models/index"; +import { + deserializeAws_restJson1_1UpdateStageCommand, + serializeAws_restJson1_1UpdateStageCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type UpdateStageCommandInput = UpdateStageRequest; +export type UpdateStageCommandOutput = Stage; + +export class UpdateStageCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateStageCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateStageCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1UpdateStageCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1UpdateStageCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/UpdateUsageCommand.ts b/clients/client-api-gateway/commands/UpdateUsageCommand.ts new file mode 100644 index 000000000000..9090b40c7e23 --- /dev/null +++ b/clients/client-api-gateway/commands/UpdateUsageCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + UpdateUsageRequest, + Usage, +} from "../models/index"; +import { + deserializeAws_restJson1_1UpdateUsageCommand, + serializeAws_restJson1_1UpdateUsageCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type UpdateUsageCommandInput = UpdateUsageRequest; +export type UpdateUsageCommandOutput = Usage; + +export class UpdateUsageCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateUsageCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateUsageCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1UpdateUsageCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1UpdateUsageCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/UpdateUsagePlanCommand.ts b/clients/client-api-gateway/commands/UpdateUsagePlanCommand.ts new file mode 100644 index 000000000000..57ac38e6c8da --- /dev/null +++ b/clients/client-api-gateway/commands/UpdateUsagePlanCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + UpdateUsagePlanRequest, + UsagePlan, +} from "../models/index"; +import { + deserializeAws_restJson1_1UpdateUsagePlanCommand, + serializeAws_restJson1_1UpdateUsagePlanCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type UpdateUsagePlanCommandInput = UpdateUsagePlanRequest; +export type UpdateUsagePlanCommandOutput = UsagePlan; + +export class UpdateUsagePlanCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateUsagePlanCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateUsagePlanCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1UpdateUsagePlanCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1UpdateUsagePlanCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/commands/UpdateVpcLinkCommand.ts b/clients/client-api-gateway/commands/UpdateVpcLinkCommand.ts new file mode 100644 index 000000000000..d10604ee972f --- /dev/null +++ b/clients/client-api-gateway/commands/UpdateVpcLinkCommand.ts @@ -0,0 +1,78 @@ +import { + APIGatewayClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../APIGatewayClient"; +import { + UpdateVpcLinkRequest, + VpcLink, +} from "../models/index"; +import { + deserializeAws_restJson1_1UpdateVpcLinkCommand, + serializeAws_restJson1_1UpdateVpcLinkCommand, +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions, +} from "@aws-sdk/types"; + +export type UpdateVpcLinkCommandInput = UpdateVpcLinkRequest; +export type UpdateVpcLinkCommandOutput = VpcLink; + +export class UpdateVpcLinkCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateVpcLinkCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: APIGatewayClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any, + } + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateVpcLinkCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1UpdateVpcLinkCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1UpdateVpcLinkCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-api-gateway/endpoints.ts b/clients/client-api-gateway/endpoints.ts new file mode 100644 index 000000000000..340673a3a957 --- /dev/null +++ b/clients/client-api-gateway/endpoints.ts @@ -0,0 +1,206 @@ +import { + RegionInfo, + RegionInfoProvider, +} from "@aws-sdk/types"; + +// Partition default templates +const AWS_TEMPLATE = "apigateway.{region}.amazonaws.com"; +const AWS_CN_TEMPLATE = "apigateway.{region}.amazonaws.com.cn"; +const AWS_ISO_TEMPLATE = "apigateway.{region}.c2s.ic.gov"; +const AWS_ISO_B_TEMPLATE = "apigateway.{region}.sc2s.sgov.gov"; +const AWS_US_GOV_TEMPLATE = "apigateway.{region}.amazonaws.com"; + +// Partition regions +const AWS_REGIONS = new Set([ + "ap-south-1", + "eu-north-1", + "eu-west-3", + "eu-west-2", + "eu-west-1", + "ap-northeast-2", + "ap-northeast-1", + "me-south-1", + "ca-central-1", + "sa-east-1", + "ap-east-1", + "ap-southeast-1", + "ap-southeast-2", + "eu-central-1", + "us-east-1", + "us-east-2", + "us-west-1", + "us-west-2", +]); +const AWS_CN_REGIONS = new Set([ + "cn-north-1", + "cn-northwest-1", +]); +const AWS_ISO_REGIONS = new Set([ + "us-iso-east-1", +]); +const AWS_ISO_B_REGIONS = new Set([ + "us-isob-east-1", +]); +const AWS_US_GOV_REGIONS = new Set([ + "us-gov-west-1", + "us-gov-east-1", +]); + +export const defaultRegionInfoProvider: RegionInfoProvider = ( + region: string, + options?: any +) => { + let regionInfo: RegionInfo | undefined = undefined; + switch (region) { + // First, try to match exact region names. + case "ap-east-1": + regionInfo = { + hostname: "apigateway.ap-east-1.amazonaws.com", + }; + break; + case "ap-northeast-1": + regionInfo = { + hostname: "apigateway.ap-northeast-1.amazonaws.com", + }; + break; + case "ap-northeast-2": + regionInfo = { + hostname: "apigateway.ap-northeast-2.amazonaws.com", + }; + break; + case "ap-south-1": + regionInfo = { + hostname: "apigateway.ap-south-1.amazonaws.com", + }; + break; + case "ap-southeast-1": + regionInfo = { + hostname: "apigateway.ap-southeast-1.amazonaws.com", + }; + break; + case "ap-southeast-2": + regionInfo = { + hostname: "apigateway.ap-southeast-2.amazonaws.com", + }; + break; + case "ca-central-1": + regionInfo = { + hostname: "apigateway.ca-central-1.amazonaws.com", + }; + break; + case "cn-north-1": + regionInfo = { + hostname: "apigateway.cn-north-1.amazonaws.com.cn", + }; + break; + case "cn-northwest-1": + regionInfo = { + hostname: "apigateway.cn-northwest-1.amazonaws.com.cn", + }; + break; + case "eu-central-1": + regionInfo = { + hostname: "apigateway.eu-central-1.amazonaws.com", + }; + break; + case "eu-north-1": + regionInfo = { + hostname: "apigateway.eu-north-1.amazonaws.com", + }; + break; + case "eu-west-1": + regionInfo = { + hostname: "apigateway.eu-west-1.amazonaws.com", + }; + break; + case "eu-west-2": + regionInfo = { + hostname: "apigateway.eu-west-2.amazonaws.com", + }; + break; + case "eu-west-3": + regionInfo = { + hostname: "apigateway.eu-west-3.amazonaws.com", + }; + break; + case "me-south-1": + regionInfo = { + hostname: "apigateway.me-south-1.amazonaws.com", + }; + break; + case "sa-east-1": + regionInfo = { + hostname: "apigateway.sa-east-1.amazonaws.com", + }; + break; + case "us-east-1": + regionInfo = { + hostname: "apigateway.us-east-1.amazonaws.com", + }; + break; + case "us-east-2": + regionInfo = { + hostname: "apigateway.us-east-2.amazonaws.com", + }; + break; + case "us-gov-east-1": + regionInfo = { + hostname: "apigateway.us-gov-east-1.amazonaws.com", + }; + break; + case "us-gov-west-1": + regionInfo = { + hostname: "apigateway.us-gov-west-1.amazonaws.com", + }; + break; + case "us-iso-east-1": + regionInfo = { + hostname: "apigateway.us-iso-east-1.c2s.ic.gov", + }; + break; + case "us-west-1": + regionInfo = { + hostname: "apigateway.us-west-1.amazonaws.com", + }; + break; + case "us-west-2": + regionInfo = { + hostname: "apigateway.us-west-2.amazonaws.com", + }; + break; + // Next, try to match partition endpoints. + default: + if (AWS_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_TEMPLATE.replace("{region}", region), + }; + } + if (AWS_CN_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_CN_TEMPLATE.replace("{region}", region), + }; + } + if (AWS_ISO_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_ISO_TEMPLATE.replace("{region}", region), + }; + } + if (AWS_ISO_B_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_ISO_B_TEMPLATE.replace("{region}", region), + }; + } + if (AWS_US_GOV_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_US_GOV_TEMPLATE.replace("{region}", region), + }; + } + // Finally, assume it's an AWS partition endpoint. + if (regionInfo === undefined) { + regionInfo = { + hostname: AWS_TEMPLATE.replace("{region}", region), + }; + } + } + return Promise.resolve(regionInfo); +}; diff --git a/clients/client-api-gateway/index.ts b/clients/client-api-gateway/index.ts new file mode 100644 index 000000000000..cb62898d6496 --- /dev/null +++ b/clients/client-api-gateway/index.ts @@ -0,0 +1,122 @@ +export * from "./APIGatewayClient"; +export * from "./APIGateway"; +export * from "./commands/DeleteAuthorizerCommand"; +export * from "./commands/GetTagsCommand"; +export * from "./commands/CreateStageCommand"; +export * from "./commands/GetStageCommand"; +export * from "./commands/GetUsageCommand"; +export * from "./commands/CreateRequestValidatorCommand"; +export * from "./commands/UpdateResourceCommand"; +export * from "./commands/DeleteResourceCommand"; +export * from "./commands/DeleteDeploymentCommand"; +export * from "./commands/GetSdkTypesCommand"; +export * from "./commands/UpdateModelCommand"; +export * from "./commands/DeleteGatewayResponseCommand"; +export * from "./commands/CreateApiKeyCommand"; +export * from "./commands/DeleteDocumentationVersionCommand"; +export * from "./commands/GetClientCertificatesCommand"; +export * from "./commands/GetIntegrationResponseCommand"; +export * from "./commands/DeleteDocumentationPartCommand"; +export * from "./commands/UpdateAuthorizerCommand"; +export * from "./commands/GetClientCertificateCommand"; +export * from "./commands/GetSdkTypeCommand"; +export * from "./commands/GetRequestValidatorsCommand"; +export * from "./commands/GetDomainNamesCommand"; +export * from "./commands/PutGatewayResponseCommand"; +export * from "./commands/DeleteClientCertificateCommand"; +export * from "./commands/PutIntegrationResponseCommand"; +export * from "./commands/DeleteModelCommand"; +export * from "./commands/UpdateApiKeyCommand"; +export * from "./commands/GetStagesCommand"; +export * from "./commands/DeleteMethodCommand"; +export * from "./commands/CreateUsagePlanKeyCommand"; +export * from "./commands/PutRestApiCommand"; +export * from "./commands/GetDocumentationVersionsCommand"; +export * from "./commands/UpdateIntegrationCommand"; +export * from "./commands/CreateAuthorizerCommand"; +export * from "./commands/CreateDocumentationPartCommand"; +export * from "./commands/DeleteApiKeyCommand"; +export * from "./commands/DeleteIntegrationCommand"; +export * from "./commands/GetMethodCommand"; +export * from "./commands/GetVpcLinksCommand"; +export * from "./commands/UpdateDomainNameCommand"; +export * from "./commands/ImportApiKeysCommand"; +export * from "./commands/GetUsagePlansCommand"; +export * from "./commands/DeleteDomainNameCommand"; +export * from "./commands/GetDocumentationPartCommand"; +export * from "./commands/DeleteUsagePlanCommand"; +export * from "./commands/GetApiKeyCommand"; +export * from "./commands/UpdateMethodCommand"; +export * from "./commands/CreateRestApiCommand"; +export * from "./commands/DeleteRequestValidatorCommand"; +export * from "./commands/CreateDomainNameCommand"; +export * from "./commands/GetUsagePlanKeysCommand"; +export * from "./commands/GetResourceCommand"; +export * from "./commands/FlushStageCacheCommand"; +export * from "./commands/UpdateStageCommand"; +export * from "./commands/GenerateClientCertificateCommand"; +export * from "./commands/GetRequestValidatorCommand"; +export * from "./commands/GetBasePathMappingsCommand"; +export * from "./commands/CreateDocumentationVersionCommand"; +export * from "./commands/GetModelTemplateCommand"; +export * from "./commands/CreateBasePathMappingCommand"; +export * from "./commands/GetAuthorizerCommand"; +export * from "./commands/GetDeploymentCommand"; +export * from "./commands/GetModelCommand"; +export * from "./commands/GetDeploymentsCommand"; +export * from "./commands/GetApiKeysCommand"; +export * from "./commands/UntagResourceCommand"; +export * from "./commands/GetDomainNameCommand"; +export * from "./commands/GetModelsCommand"; +export * from "./commands/TestInvokeAuthorizerCommand"; +export * from "./commands/DeleteBasePathMappingCommand"; +export * from "./commands/GetUsagePlanKeyCommand"; +export * from "./commands/GetResourcesCommand"; +export * from "./commands/UpdateUsageCommand"; +export * from "./commands/FlushStageAuthorizersCacheCommand"; +export * from "./commands/UpdateDocumentationVersionCommand"; +export * from "./commands/UpdateMethodResponseCommand"; +export * from "./commands/DeleteMethodResponseCommand"; +export * from "./commands/GetDocumentationPartsCommand"; +export * from "./commands/CreateVpcLinkCommand"; +export * from "./commands/CreateResourceCommand"; +export * from "./commands/ImportDocumentationPartsCommand"; +export * from "./commands/CreateDeploymentCommand"; +export * from "./commands/GetIntegrationCommand"; +export * from "./commands/GetUsagePlanCommand"; +export * from "./commands/DeleteVpcLinkCommand"; +export * from "./commands/DeleteIntegrationResponseCommand"; +export * from "./commands/UpdateUsagePlanCommand"; +export * from "./commands/GetGatewayResponseCommand"; +export * from "./commands/DeleteUsagePlanKeyCommand"; +export * from "./commands/UpdateIntegrationResponseCommand"; +export * from "./commands/GetVpcLinkCommand"; +export * from "./commands/GetDocumentationVersionCommand"; +export * from "./commands/PutMethodResponseCommand"; +export * from "./commands/UpdateBasePathMappingCommand"; +export * from "./commands/GetBasePathMappingCommand"; +export * from "./commands/UpdateRestApiCommand"; +export * from "./commands/GetAccountCommand"; +export * from "./commands/UpdateVpcLinkCommand"; +export * from "./commands/DeleteStageCommand"; +export * from "./commands/TagResourceCommand"; +export * from "./commands/GetAuthorizersCommand"; +export * from "./commands/TestInvokeMethodCommand"; +export * from "./commands/GetMethodResponseCommand"; +export * from "./commands/GetRestApiCommand"; +export * from "./commands/DeleteRestApiCommand"; +export * from "./commands/ImportRestApiCommand"; +export * from "./commands/GetGatewayResponsesCommand"; +export * from "./commands/UpdateDeploymentCommand"; +export * from "./commands/CreateModelCommand"; +export * from "./commands/GetSdkCommand"; +export * from "./commands/CreateUsagePlanCommand"; +export * from "./commands/GetExportCommand"; +export * from "./commands/UpdateClientCertificateCommand"; +export * from "./commands/UpdateRequestValidatorCommand"; +export * from "./commands/PutIntegrationCommand"; +export * from "./commands/UpdateDocumentationPartCommand"; +export * from "./commands/GetRestApisCommand"; +export * from "./commands/UpdateGatewayResponseCommand"; +export * from "./commands/PutMethodCommand"; +export * from "./commands/UpdateAccountCommand"; diff --git a/clients/client-api-gateway/models/index.ts b/clients/client-api-gateway/models/index.ts new file mode 100644 index 000000000000..947411922a3f --- /dev/null +++ b/clients/client-api-gateway/models/index.ts @@ -0,0 +1,14344 @@ +import * as _smithy from "@aws-sdk/smithy-client"; +import { MetadataBearer as $MetadataBearer } from "@aws-sdk/types"; + +/** + *

+ * Access log settings, including the access log format and access log destination ARN. + *

+ */ +export interface AccessLogSettings { + __type?: "AccessLogSettings"; + /** + *

+ * The ARN of the CloudWatch Logs log group to receive access logs. + *

+ */ + destinationArn?: string; + + /** + *

+ * A single line format of the access logs of data, as specified by selected + * + * $context variables + * + * . The format must include at least + * + * $context.requestId + * + * . + *

+ */ + format?: string; +} + +export namespace AccessLogSettings { + export function isa(o: any): o is AccessLogSettings { + return _smithy.isa(o, "AccessLogSettings"); + } +} + +/** + *

+ * Represents an AWS account that is associated with API Gateway. + *

+ *
+ *

+ * To view the account info, call + * + * GET + * + * on this resource. + *

+ *

+ * Error Codes + *

+ *

+ * The following exception may be thrown when the request fails. + *

+ *
    + *
  • + * UnauthorizedException + *
  • + *
  • + * NotFoundException + *
  • + *
  • + * TooManyRequestsException + *
  • + *
+ *

+ * For detailed error code information, including the corresponding HTTP Status Codes, see + * + * API Gateway Error Codes + * + *

+ *

+ * Example: Get the information about an account. + *

+ *
+ * Request + *
+ *
GET /account HTTP/1.1
+ * Content-Type: application/json
+ * Host: apigateway.us-east-1.amazonaws.com
+ * X-Amz-Date: 20160531T184618Z
+ * Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
+ *             
+ *
+ * Response + *
+ *

+ * The successful response returns a + * + * 200 OK + * + * status code and a payload similar to the following: + *

+ *
{
+ *   "_links": {
+ *     "curies": {
+ *       "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/account-apigateway-{rel}.html",
+ *       "name": "account",
+ *       "templated": true
+ *     },
+ *     "self": {
+ *       "href": "/account"
+ *     },
+ *     "account:update": {
+ *       "href": "/account"
+ *     }
+ *   },
+ *   "cloudwatchRoleArn": "arn:aws:iam::123456789012:role/apigAwsProxyRole",
+ *   "throttleSettings": {
+ *     "rateLimit": 500,
+ *     "burstLimit": 1000
+ *   }
+ * }
+ *             
+ *

+ * In addition to making the REST API call directly, you can use the AWS CLI and an AWS SDK to access this resource. + *

+ *
+ * + */ +export interface Account extends $MetadataBearer { + __type?: "Account"; + /** + *

+ * The version of the API keys used for the account. + *

+ */ + apiKeyVersion?: string; + + /** + *

+ * The ARN of an Amazon CloudWatch role for the current + * + * Account + * + * . + *

+ */ + cloudwatchRoleArn?: string; + + /** + *

+ * A list of features supported for the account. When usage plans are enabled, the features list will include an entry of + * + * "UsagePlans" + * + * . + *

+ */ + features?: Array; + + /** + *

+ * Specifies the API request limits configured for the current + * + * Account + * + * . + *

+ */ + throttleSettings?: ThrottleSettings; +} + +export namespace Account { + export function isa(o: any): o is Account { + return _smithy.isa(o, "Account"); + } +} + +/** + *

+ * A resource that can be distributed to callers for executing + * + * Method + * + * resources that require an API key. API keys can be mapped to any + * + * Stage + * + * on any + * + * RestApi + * + * , which indicates that the callers with the API key can make requests to that stage. + *

+ * + */ +export interface ApiKey extends $MetadataBearer { + __type?: "ApiKey"; + /** + *

+ * The timestamp when the API Key was created. + *

+ */ + createdDate?: Date; + + /** + *

+ * An AWS Marketplace customer identifier , when integrating with the AWS SaaS Marketplace. + *

+ */ + customerId?: string; + + /** + *

+ * The description of the API Key. + *

+ */ + description?: string; + + /** + *

+ * Specifies whether the API Key can be used by callers. + *

+ */ + enabled?: boolean; + + /** + *

+ * The identifier of the API Key. + *

+ */ + id?: string; + + /** + *

+ * The timestamp when the API Key was last updated. + *

+ */ + lastUpdatedDate?: Date; + + /** + *

+ * The name of the API Key. + *

+ */ + name?: string; + + /** + *

+ * A list of + * + * Stage + * + * resources that are associated with the + * + * ApiKey + * + * resource. + *

+ */ + stageKeys?: Array; + + /** + *

+ * The collection of tags. Each tag element is associated with a given resource. + *

+ */ + tags?: { [key: string]: string }; + + /** + *

+ * The value of the API Key. + *

+ */ + value?: string; +} + +export namespace ApiKey { + export function isa(o: any): o is ApiKey { + return _smithy.isa(o, "ApiKey"); + } +} + +/** + *

+ * The identifier of an + * + * ApiKey + * + * used in a + * + * UsagePlan + * + * . + *

+ */ +export interface ApiKeyIds extends $MetadataBearer { + __type?: "ApiKeyIds"; + /** + *

+ * A list of all the + * + * ApiKey + * + * identifiers. + *

+ */ + ids?: Array; + + /** + *

+ * A list of warning messages. + *

+ */ + warnings?: Array; +} + +export namespace ApiKeyIds { + export function isa(o: any): o is ApiKeyIds { + return _smithy.isa(o, "ApiKeyIds"); + } +} + +export enum ApiKeySourceType { + AUTHORIZER = "AUTHORIZER", + HEADER = "HEADER", +} + +/** + *

+ * Represents a collection of API keys as represented by an + * + * ApiKeys + * + * resource. + *

+ * + */ +export interface ApiKeys extends $MetadataBearer { + __type?: "ApiKeys"; + /** + *

+ * The current page of elements from this collection. + *

+ */ + items?: Array; + + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; + + /** + *

+ * A list of warning messages logged during the import of API keys when the + * + * failOnWarnings + * + * option is set to true. + *

+ */ + warnings?: Array; +} + +export namespace ApiKeys { + export function isa(o: any): o is ApiKeys { + return _smithy.isa(o, "ApiKeys"); + } +} + +export enum ApiKeysFormat { + csv = "csv", +} + +/** + *

+ * API stage name of the associated API stage in a usage plan. + *

+ */ +export interface ApiStage { + __type?: "ApiStage"; + /** + *

+ * API Id of the associated API stage in a usage plan. + *

+ */ + apiId?: string; + + /** + *

+ * API stage name of the associated API stage in a usage plan. + *

+ */ + stage?: string; + + /** + *

+ * Map containing method level throttling information for API stage in a usage plan. + *

+ */ + throttle?: { [key: string]: ThrottleSettings }; +} + +export namespace ApiStage { + export function isa(o: any): o is ApiStage { + return _smithy.isa(o, "ApiStage"); + } +} + +/** + *

+ * Represents an authorization layer for methods. If enabled on a method, API Gateway will activate the authorizer when a client calls the method. + *

+ * + */ +export interface Authorizer extends $MetadataBearer { + __type?: "Authorizer"; + /** + *

+ * Optional customer-defined field, used in OpenAPI imports and exports without functional impact. + *

+ */ + authType?: string; + + /** + *

+ * Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. To specify an IAM role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null. + *

+ */ + authorizerCredentials?: string; + + /** + *

+ * The TTL in seconds of cached authorizer results. If it equals 0, authorization caching is disabled. If it is greater than 0, API Gateway will cache authorizer responses. If this field is not set, the default value is 300. The maximum value is 3600, or 1 hour. + *

+ */ + authorizerResultTtlInSeconds?: number; + + /** + *

+ * Specifies the authorizer's Uniform Resource Identifier (URI). For + * + * TOKEN + * + * or + * + * REQUEST + * + * authorizers, this must be a well-formed Lambda function URI, for example, + * + * arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:{account_id}:function:{lambda_function_name}/invocations + * + * . In general, the URI has this form + * + * arn:aws:apigateway:{region}:lambda:path/{service_api} + * + * , where + * + * {region} + * + * is the same as the region hosting the Lambda function, + * + * path + * + * indicates that the remaining substring in the URI should be treated as the path to the resource, including the initial + * + * / + * + * . For Lambda functions, this is usually of the form + * + * /2015-03-31/functions/[FunctionARN]/invocations + * + * . + *

+ */ + authorizerUri?: string; + + /** + *

+ * The identifier for the authorizer resource. + *

+ */ + id?: string; + + /** + *

+ * The identity source for which authorization is requested. + *

    + *
  • + * For a + * + * TOKEN + * + * or + * + * COGNITO_USER_POOLS + * + * authorizer, this is required and specifies the request header mapping expression for the custom header holding the authorization token submitted by the client. For example, if the token header name is + * + * Auth + * + * , the header mapping expression is + * + * method.request.header.Auth + * + * . + *
  • + *
  • + * For the + * + * REQUEST + * + * authorizer, this is required when authorization caching is enabled. The value is a comma-separated string of one or more mapping expressions of the specified request parameters. For example, if an + * + * Auth + * + * header, a + * + * Name + * + * query string parameter are defined as identity sources, this value is + * + * method.request.header.Auth, method.request.querystring.Name + * + * . These parameters will be used to derive the authorization caching key and to perform runtime validation of the + * + * REQUEST + * + * authorizer by verifying all of the identity-related request parameters are present, not null and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized response without calling the Lambda function. The valid value is a string of comma-separated mapping expressions of the specified request parameters. When the authorization caching is not enabled, this property is optional. + *
  • + *
+ *

+ */ + identitySource?: string; + + /** + *

+ * A validation expression for the incoming identity token. For + * + * TOKEN + * + * authorizers, this value is a regular expression. For + * + * COGNITO_USER_POOLS + * + * authorizers, API Gateway will match the + * + * aud + * + * field of the incoming token from the client against the specified regular expression. It will invoke the authorizer's Lambda function when there is a match. Otherwise, it will return a 401 Unauthorized response without calling the Lambda function. The validation expression does not apply to the + * + * REQUEST + * + * authorizer. + *

+ */ + identityValidationExpression?: string; + + /** + *

+ * [Required] The name of the authorizer. + *

+ */ + name?: string; + + /** + *

+ * A list of the Amazon Cognito user pool ARNs for the + * + * COGNITO_USER_POOLS + * + * authorizer. Each element is of this format: + * + * arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id} + * + * . For a + * + * TOKEN + * + * or + * + * REQUEST + * + * authorizer, this is not defined. + *

+ */ + providerARNs?: Array; + + /** + *

+ * The authorizer type. Valid values are + * + * TOKEN + * + * for a Lambda function using a single authorization token submitted in a custom header, + * + * REQUEST + * + * for a Lambda function using incoming request parameters, and + * + * COGNITO_USER_POOLS + * + * for using an Amazon Cognito user pool. + *

+ */ + type?: AuthorizerType | string; +} + +export namespace Authorizer { + export function isa(o: any): o is Authorizer { + return _smithy.isa(o, "Authorizer"); + } +} + +export enum AuthorizerType { + COGNITO_USER_POOLS = "COGNITO_USER_POOLS", + REQUEST = "REQUEST", + TOKEN = "TOKEN", +} + +/** + *

+ * Represents a collection of + * + * Authorizer + * + * resources. + *

+ * + */ +export interface Authorizers extends $MetadataBearer { + __type?: "Authorizers"; + /** + *

+ * The current page of elements from this collection. + *

+ */ + items?: Array; + + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; +} + +export namespace Authorizers { + export function isa(o: any): o is Authorizers { + return _smithy.isa(o, "Authorizers"); + } +} + +/** + *

+ * Represents the base path that callers of the API must provide as part of the URL after the domain name. + *

+ *
+ * A custom domain name plus a + * + * BasePathMapping + * + * specification identifies a deployed + * + * RestApi + * + * in a given stage of the owner + * + * Account + * + * . + *
+ * + */ +export interface BasePathMapping extends $MetadataBearer { + __type?: "BasePathMapping"; + /** + *

+ * The base path name that callers of the API must provide as part of the URL after the domain name. + *

+ */ + basePath?: string; + + /** + *

+ * The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId?: string; + + /** + *

+ * The name of the associated stage. + *

+ */ + stage?: string; +} + +export namespace BasePathMapping { + export function isa(o: any): o is BasePathMapping { + return _smithy.isa(o, "BasePathMapping"); + } +} + +/** + *

+ * Represents a collection of + * + * BasePathMapping + * + * resources. + *

+ * + */ +export interface BasePathMappings extends $MetadataBearer { + __type?: "BasePathMappings"; + /** + *

+ * The current page of elements from this collection. + *

+ */ + items?: Array; + + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; +} + +export namespace BasePathMappings { + export function isa(o: any): o is BasePathMappings { + return _smithy.isa(o, "BasePathMappings"); + } +} + +export enum CacheClusterSize { + SIZE_0_POINT_5_GB = "0.5", + SIZE_118_GB = "118", + SIZE_13_POINT_5_GB = "13.5", + SIZE_1_POINT_6_GB = "1.6", + SIZE_237_GB = "237", + SIZE_28_POINT_4_GB = "28.4", + SIZE_58_POINT_2_GB = "58.2", + SIZE_6_POINT_1_GB = "6.1", +} + +export enum CacheClusterStatus { + AVAILABLE = "AVAILABLE", + CREATE_IN_PROGRESS = "CREATE_IN_PROGRESS", + DELETE_IN_PROGRESS = "DELETE_IN_PROGRESS", + FLUSH_IN_PROGRESS = "FLUSH_IN_PROGRESS", + NOT_AVAILABLE = "NOT_AVAILABLE", +} + +/** + *

+ * Configuration settings of a canary deployment. + *

+ */ +export interface CanarySettings { + __type?: "CanarySettings"; + /** + *

+ * The ID of the canary deployment. + *

+ */ + deploymentId?: string; + + /** + *

+ * The percent (0-100) of traffic diverted to a canary deployment. + *

+ */ + percentTraffic?: number; + + /** + *

+ * Stage variables overridden for a canary release deployment, including new stage variables introduced in the canary. These stage variables are represented as a string-to-string map between stage variable names and their values. + *

+ */ + stageVariableOverrides?: { [key: string]: string }; + + /** + *

+ * A Boolean flag to indicate whether the canary deployment uses the stage cache or not. + *

+ */ + useStageCache?: boolean; +} + +export namespace CanarySettings { + export function isa(o: any): o is CanarySettings { + return _smithy.isa(o, "CanarySettings"); + } +} + +/** + *

+ * Represents a client certificate used to configure client-side SSL authentication while sending requests to the integration endpoint. + *

+ *
+ * Client certificates are used to authenticate an API by the backend server. To authenticate an API client (or user), use IAM roles and policies, a custom + * + * Authorizer + * + * or an Amazon Cognito user pool. + *
+ * + */ +export interface ClientCertificate extends $MetadataBearer { + __type?: "ClientCertificate"; + /** + *

+ * The identifier of the client certificate. + *

+ */ + clientCertificateId?: string; + + /** + *

+ * The timestamp when the client certificate was created. + *

+ */ + createdDate?: Date; + + /** + *

+ * The description of the client certificate. + *

+ */ + description?: string; + + /** + *

+ * The timestamp when the client certificate will expire. + *

+ */ + expirationDate?: Date; + + /** + *

+ * The PEM-encoded public key of the client certificate, which can be used to configure certificate authentication in the integration endpoint . + *

+ */ + pemEncodedCertificate?: string; + + /** + *

+ * The collection of tags. Each tag element is associated with a given resource. + *

+ */ + tags?: { [key: string]: string }; +} + +export namespace ClientCertificate { + export function isa(o: any): o is ClientCertificate { + return _smithy.isa(o, "ClientCertificate"); + } +} + +/** + *

+ * Represents a collection of + * + * ClientCertificate + * + * resources. + *

+ * + */ +export interface ClientCertificates extends $MetadataBearer { + __type?: "ClientCertificates"; + /** + *

+ * The current page of elements from this collection. + *

+ */ + items?: Array; + + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; +} + +export namespace ClientCertificates { + export function isa(o: any): o is ClientCertificates { + return _smithy.isa(o, "ClientCertificates"); + } +} + +export enum ConnectionType { + INTERNET = "INTERNET", + VPC_LINK = "VPC_LINK", +} + +export enum ContentHandlingStrategy { + CONVERT_TO_BINARY = "CONVERT_TO_BINARY", + CONVERT_TO_TEXT = "CONVERT_TO_TEXT", +} + +/** + *

+ * Request to create an + * + * ApiKey + * + * resource. + *

+ */ +export interface CreateApiKeyRequest { + __type?: "CreateApiKeyRequest"; + /** + *

+ * An AWS Marketplace customer identifier , when integrating with the AWS SaaS Marketplace. + *

+ */ + customerId?: string; + + /** + *

+ * The description of the + * + * ApiKey + * + * . + *

+ */ + description?: string; + + /** + *

+ * Specifies whether the + * + * ApiKey + * + * can be used by callers. + *

+ */ + enabled?: boolean; + + /** + *

+ * Specifies whether ( + * + * true + * + * ) or not ( + * + * false + * + * ) the key identifier is distinct from the created API key value. + *

+ */ + generateDistinctId?: boolean; + + /** + *

+ * The name of the + * + * ApiKey + * + * . + *

+ */ + name?: string; + + /** + *

+ * DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key. + *

+ */ + stageKeys?: Array; + + /** + *

+ * The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with + * + * aws: + * + * . The tag value can be up to 256 characters. + *

+ */ + tags?: { [key: string]: string }; + + template?: boolean; + templateSkipList?: Array; + title?: string; + /** + *

+ * Specifies a value of the API key. + *

+ * + */ + value?: string; +} + +export namespace CreateApiKeyRequest { + export function isa(o: any): o is CreateApiKeyRequest { + return _smithy.isa(o, "CreateApiKeyRequest"); + } +} + +/** + *

+ * Request to add a new + * + * Authorizer + * + * to an existing + * + * RestApi + * + * resource. + *

+ */ +export interface CreateAuthorizerRequest { + __type?: "CreateAuthorizerRequest"; + /** + *

+ * Optional customer-defined field, used in OpenAPI imports and exports without functional impact. + *

+ */ + authType?: string; + + /** + *

+ * Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. To specify an IAM role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null. + *

+ */ + authorizerCredentials?: string; + + /** + *

+ * The TTL in seconds of cached authorizer results. If it equals 0, authorization caching is disabled. If it is greater than 0, API Gateway will cache authorizer responses. If this field is not set, the default value is 300. The maximum value is 3600, or 1 hour. + *

+ */ + authorizerResultTtlInSeconds?: number; + + /** + *

+ * Specifies the authorizer's Uniform Resource Identifier (URI). For + * + * TOKEN + * + * or + * + * REQUEST + * + * authorizers, this must be a well-formed Lambda function URI, for example, + * + * arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:{account_id}:function:{lambda_function_name}/invocations + * + * . In general, the URI has this form + * + * arn:aws:apigateway:{region}:lambda:path/{service_api} + * + * , where + * + * {region} + * + * is the same as the region hosting the Lambda function, + * + * path + * + * indicates that the remaining substring in the URI should be treated as the path to the resource, including the initial + * + * / + * + * . For Lambda functions, this is usually of the form + * + * /2015-03-31/functions/[FunctionARN]/invocations + * + * . + *

+ */ + authorizerUri?: string; + + /** + *

+ * The identity source for which authorization is requested. + *

    + *
  • + * For a + * + * TOKEN + * + * or + * + * COGNITO_USER_POOLS + * + * authorizer, this is required and specifies the request header mapping expression for the custom header holding the authorization token submitted by the client. For example, if the token header name is + * + * Auth + * + * , the header mapping expression is + * + * method.request.header.Auth + * + * . + *
  • + *
  • + * For the + * + * REQUEST + * + * authorizer, this is required when authorization caching is enabled. The value is a comma-separated string of one or more mapping expressions of the specified request parameters. For example, if an + * + * Auth + * + * header, a + * + * Name + * + * query string parameter are defined as identity sources, this value is + * + * method.request.header.Auth, method.request.querystring.Name + * + * . These parameters will be used to derive the authorization caching key and to perform runtime validation of the + * + * REQUEST + * + * authorizer by verifying all of the identity-related request parameters are present, not null and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized response without calling the Lambda function. The valid value is a string of comma-separated mapping expressions of the specified request parameters. When the authorization caching is not enabled, this property is optional. + *
  • + *
+ *

+ */ + identitySource?: string; + + /** + *

+ * A validation expression for the incoming identity token. For + * + * TOKEN + * + * authorizers, this value is a regular expression. For + * + * COGNITO_USER_POOLS + * + * authorizers, API Gateway will match the + * + * aud + * + * field of the incoming token from the client against the specified regular expression. It will invoke the authorizer's Lambda function when there is a match. Otherwise, it will return a 401 Unauthorized response without calling the Lambda function. The validation expression does not apply to the + * + * REQUEST + * + * authorizer. + *

+ */ + identityValidationExpression?: string; + + /** + *

+ * [Required] The name of the authorizer. + *

+ */ + name: string | undefined; + + /** + *

+ * A list of the Amazon Cognito user pool ARNs for the + * + * COGNITO_USER_POOLS + * + * authorizer. Each element is of this format: + * + * arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id} + * + * . For a + * + * TOKEN + * + * or + * + * REQUEST + * + * authorizer, this is not defined. + *

+ */ + providerARNs?: Array; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; + /** + *

+ * [Required] The authorizer type. Valid values are + * + * TOKEN + * + * for a Lambda function using a single authorization token submitted in a custom header, + * + * REQUEST + * + * for a Lambda function using incoming request parameters, and + * + * COGNITO_USER_POOLS + * + * for using an Amazon Cognito user pool. + *

+ */ + type: AuthorizerType | string | undefined; +} + +export namespace CreateAuthorizerRequest { + export function isa(o: any): o is CreateAuthorizerRequest { + return _smithy.isa(o, "CreateAuthorizerRequest"); + } +} + +/** + *

+ * Requests API Gateway to create a new + * + * BasePathMapping + * + * resource. + *

+ */ +export interface CreateBasePathMappingRequest { + __type?: "CreateBasePathMappingRequest"; + /** + *

+ * The base path name that callers of the API must provide as part of the URL after the domain name. This value must be unique for all of the mappings across a single API. Specify '(none)' if you do not want callers to specify a base path name after the domain name. + *

+ */ + basePath?: string; + + /** + *

+ * [Required] The domain name of the + * + * BasePathMapping + * + * resource to create. + *

+ */ + domainName: string | undefined; + + name?: string; + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + /** + *

+ * The name of the API's stage that you want to use for this mapping. Specify '(none)' if you do not want callers to explicitly specify the stage name after any base path name. + *

+ */ + stage?: string; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace CreateBasePathMappingRequest { + export function isa(o: any): o is CreateBasePathMappingRequest { + return _smithy.isa(o, "CreateBasePathMappingRequest"); + } +} + +/** + *

+ * Requests API Gateway to create a + * + * Deployment + * + * resource. + *

+ */ +export interface CreateDeploymentRequest { + __type?: "CreateDeploymentRequest"; + /** + *

+ * Enables a cache cluster for the + * + * Stage + * + * resource specified in the input. + *

+ */ + cacheClusterEnabled?: boolean; + + /** + *

+ * Specifies the cache cluster size for the + * + * Stage + * + * resource specified in the input, if a cache cluster is enabled. + *

+ */ + cacheClusterSize?: CacheClusterSize | string; + + /** + *

+ * The input configuration for the canary deployment when the deployment is a canary release deployment. + *

+ */ + canarySettings?: DeploymentCanarySettings; + + /** + *

+ * The description for the + * + * Deployment + * + * resource to create. + *

+ */ + description?: string; + + name?: string; + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + /** + *

+ * The description of the + * + * Stage + * + * resource for the + * + * Deployment + * + * resource to create. + *

+ */ + stageDescription?: string; + + /** + *

+ * The name of the + * + * Stage + * + * resource for the + * + * Deployment + * + * resource to create. + *

+ */ + stageName?: string; + + template?: boolean; + templateSkipList?: Array; + title?: string; + /** + *

+ * Specifies whether active tracing with X-ray is enabled for the + * + * Stage + * + * . + *

+ */ + tracingEnabled?: boolean; + + /** + *

+ * A map that defines the stage variables for the + * + * Stage + * + * resource that is associated + * with the new deployment. Variable names can have alphanumeric and underscore characters, and the values + * must match + * + * [A-Za-z0-9-._~:/?#&=,]+ + * + * . + *

+ */ + variables?: { [key: string]: string }; +} + +export namespace CreateDeploymentRequest { + export function isa(o: any): o is CreateDeploymentRequest { + return _smithy.isa(o, "CreateDeploymentRequest"); + } +} + +/** + *

+ * Creates a new documentation part of a given API. + *

+ */ +export interface CreateDocumentationPartRequest { + __type?: "CreateDocumentationPartRequest"; + /** + *

+ * [Required] The location of the targeted API entity of the to-be-created documentation part. + *

+ */ + location: DocumentationPartLocation | undefined; + + name?: string; + /** + *

+ * [Required] The new documentation content map of the targeted API entity. Enclosed key-value pairs are API-specific, but only OpenAPI-compliant key-value pairs can be exported and, hence, published. + *

+ */ + properties: string | undefined; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace CreateDocumentationPartRequest { + export function isa(o: any): o is CreateDocumentationPartRequest { + return _smithy.isa(o, "CreateDocumentationPartRequest"); + } +} + +/** + *

+ * Creates a new documentation version of a given API. + *

+ */ +export interface CreateDocumentationVersionRequest { + __type?: "CreateDocumentationVersionRequest"; + /** + *

+ * A description about the new documentation snapshot. + *

+ */ + description?: string; + + /** + *

+ * [Required] The version identifier of the new snapshot. + *

+ */ + documentationVersion: string | undefined; + + name?: string; + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + /** + *

+ * The stage name to be associated with the new documentation snapshot. + *

+ */ + stageName?: string; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace CreateDocumentationVersionRequest { + export function isa(o: any): o is CreateDocumentationVersionRequest { + return _smithy.isa(o, "CreateDocumentationVersionRequest"); + } +} + +/** + *

+ * A request to create a new domain name. + *

+ */ +export interface CreateDomainNameRequest { + __type?: "CreateDomainNameRequest"; + /** + *

+ * The reference to an AWS-managed certificate that will be used by edge-optimized endpoint for this domain name. AWS Certificate Manager is the only supported source. + *

+ */ + certificateArn?: string; + + /** + *

+ * [Deprecated] The body of the server certificate that will be used by edge-optimized endpoint for this domain name provided by your certificate authority. + *

+ */ + certificateBody?: string; + + /** + *

+ * [Deprecated] The intermediate certificates and optionally the root certificate, one after the other without any blank lines, used by an edge-optimized endpoint for this domain name. If you include the root certificate, your certificate chain must start with intermediate certificates and end with the root certificate. Use the intermediate certificates that were provided by your certificate authority. Do not include any intermediaries that are not in the chain of trust path. + *

+ */ + certificateChain?: string; + + /** + *

+ * The user-friendly name of the certificate that will be used by edge-optimized endpoint for this domain name. + *

+ */ + certificateName?: string; + + /** + *

+ * [Deprecated] Your edge-optimized endpoint's domain name certificate's private key. + *

+ */ + certificatePrivateKey?: string; + + /** + *

+ * [Required] The name of the + * + * DomainName + * + * resource. + *

+ */ + domainName: string | undefined; + + /** + *

+ * The endpoint configuration of this + * + * DomainName + * + * showing the endpoint types of the domain name. + *

+ */ + endpointConfiguration?: EndpointConfiguration; + + name?: string; + /** + *

+ * The reference to an AWS-managed certificate that will be used by regional endpoint for this domain name. AWS Certificate Manager is the only supported source. + *

+ */ + regionalCertificateArn?: string; + + /** + *

+ * The user-friendly name of the certificate that will be used by regional endpoint for this domain name. + *

+ */ + regionalCertificateName?: string; + + /** + *

+ * The Transport Layer Security (TLS) version + cipher suite for this + * + * DomainName + * + * . The valid values are + * + * TLS_1_0 + * + * and + * + * TLS_1_2 + * + * . + *

+ */ + securityPolicy?: SecurityPolicy | string; + + /** + *

+ * The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with + * + * aws: + * + * . The tag value can be up to 256 characters. + *

+ */ + tags?: { [key: string]: string }; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace CreateDomainNameRequest { + export function isa(o: any): o is CreateDomainNameRequest { + return _smithy.isa(o, "CreateDomainNameRequest"); + } +} + +/** + *

+ * Request to add a new + * + * Model + * + * to an existing + * + * RestApi + * + * resource. + *

+ */ +export interface CreateModelRequest { + __type?: "CreateModelRequest"; + /** + *

+ * [Required] The content-type for the model. + *

+ */ + contentType: string | undefined; + + /** + *

+ * The description of the model. + *

+ */ + description?: string; + + /** + *

+ * [Required] The name of the model. Must be alphanumeric. + *

+ */ + name: string | undefined; + + /** + *

+ * [Required] The + * + * RestApi + * + * identifier under which the + * + * Model + * + * will be created. + *

+ */ + restApiId: string | undefined; + + /** + *

+ * The schema for the model. For + * + * application/json + * + * models, this should be + * + * JSON schema draft 4 + * + * model. + *

+ */ + schema?: string; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace CreateModelRequest { + export function isa(o: any): o is CreateModelRequest { + return _smithy.isa(o, "CreateModelRequest"); + } +} + +/** + *

+ * Creates a + * + * RequestValidator + * + * of a given + * + * RestApi + * + * . + *

+ */ +export interface CreateRequestValidatorRequest { + __type?: "CreateRequestValidatorRequest"; + /** + *

+ * The name of the to-be-created + * + * RequestValidator + * + * . + *

+ */ + name?: string; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; + /** + *

+ * A Boolean flag to indicate whether to validate request body according to the configured model schema for the method ( + * + * true + * + * ) or not ( + * + * false + * + * ). + *

+ */ + validateRequestBody?: boolean; + + /** + *

+ * A Boolean flag to indicate whether to validate request parameters, + * + * true + * + * , or not + * + * false + * + * . + *

+ */ + validateRequestParameters?: boolean; +} + +export namespace CreateRequestValidatorRequest { + export function isa(o: any): o is CreateRequestValidatorRequest { + return _smithy.isa(o, "CreateRequestValidatorRequest"); + } +} + +/** + *

+ * Requests API Gateway to create a + * + * Resource + * + * resource. + *

+ */ +export interface CreateResourceRequest { + __type?: "CreateResourceRequest"; + name?: string; + /** + *

+ * [Required] The parent resource's identifier. + *

+ */ + parentId: string | undefined; + + /** + *

+ * The last path segment for this resource. + *

+ */ + pathPart: string | undefined; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace CreateResourceRequest { + export function isa(o: any): o is CreateResourceRequest { + return _smithy.isa(o, "CreateResourceRequest"); + } +} + +/** + *

+ * The POST Request to add a new + * + * RestApi + * + * resource to your collection. + *

+ */ +export interface CreateRestApiRequest { + __type?: "CreateRestApiRequest"; + /** + *

+ * The source of the API key for metering requests according to a usage plan. Valid values are: + *

    + *
  • + * + * HEADER + * + * to read the API key from the + * + * X-API-Key + * + * header of a request. + *
  • + *
  • + * + * AUTHORIZER + * + * to read the API key from the + * + * UsageIdentifierKey + * + * from a custom authorizer. + *
  • + *
+ *

+ */ + apiKeySource?: ApiKeySourceType | string; + + /** + *

+ * The list of binary media types supported by the + * + * RestApi + * + * . By default, the + * + * RestApi + * + * supports only UTF-8-encoded text payloads. + *

+ */ + binaryMediaTypes?: Array; + + /** + *

+ * The ID of the + * + * RestApi + * + * that you want to clone from. + *

+ */ + cloneFrom?: string; + + /** + *

+ * The description of the + * + * RestApi + * + * . + *

+ */ + description?: string; + + /** + *

+ * The endpoint configuration of this + * + * RestApi + * + * showing the endpoint types of the API. + *

+ */ + endpointConfiguration?: EndpointConfiguration; + + /** + *

+ * A nullable integer that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (with a null value) on an API. When compression is enabled, compression or decompression is not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size. + *

+ */ + minimumCompressionSize?: number; + + /** + *

+ * [Required] The name of the + * + * RestApi + * + * . + *

+ */ + name: string | undefined; + + /** + * A stringified JSON policy document that applies to this RestApi regardless of the caller and + * + * Method + * + * configuration. + */ + policy?: string; + + /** + *

+ * The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with + * + * aws: + * + * . The tag value can be up to 256 characters. + *

+ */ + tags?: { [key: string]: string }; + + template?: boolean; + templateSkipList?: Array; + title?: string; + /** + *

+ * A version identifier for the API. + *

+ */ + version?: string; +} + +export namespace CreateRestApiRequest { + export function isa(o: any): o is CreateRestApiRequest { + return _smithy.isa(o, "CreateRestApiRequest"); + } +} + +/** + *

+ * Requests API Gateway to create a + * + * Stage + * + * resource. + *

+ */ +export interface CreateStageRequest { + __type?: "CreateStageRequest"; + /** + *

+ * Whether cache clustering is enabled for the stage. + *

+ */ + cacheClusterEnabled?: boolean; + + /** + *

+ * The stage's cache cluster size. + *

+ */ + cacheClusterSize?: CacheClusterSize | string; + + /** + *

+ * The canary deployment settings of this stage. + *

+ */ + canarySettings?: CanarySettings; + + /** + *

+ * [Required] The identifier of the + * + * Deployment + * + * resource for the + * + * Stage + * + * resource. + *

+ */ + deploymentId: string | undefined; + + /** + *

+ * The description of the + * + * Stage + * + * resource. + *

+ */ + description?: string; + + /** + *

+ * The version of the associated API documentation. + *

+ */ + documentationVersion?: string; + + name?: string; + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + /** + *

+ * [Required] The name for the + * + * Stage + * + * resource. Stage names can only contain alphanumeric characters, hyphens, and underscores. Maximum length is 128 characters. + *

+ */ + stageName: string | undefined; + + /** + *

+ * The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with + * + * aws: + * + * . The tag value can be up to 256 characters. + *

+ */ + tags?: { [key: string]: string }; + + template?: boolean; + templateSkipList?: Array; + title?: string; + /** + *

+ * Specifies whether active tracing with X-ray is enabled for the + * + * Stage + * + * . + *

+ */ + tracingEnabled?: boolean; + + /** + *

+ * A map that defines the stage variables for the new + * + * Stage + * + * resource. Variable names + * can have alphanumeric and underscore characters, and the values must match + * + * [A-Za-z0-9-._~:/?#&=,]+ + * + * . + *

+ */ + variables?: { [key: string]: string }; +} + +export namespace CreateStageRequest { + export function isa(o: any): o is CreateStageRequest { + return _smithy.isa(o, "CreateStageRequest"); + } +} + +/** + *

+ * The POST request to create a usage plan key for adding an existing API key to a usage plan. + *

+ */ +export interface CreateUsagePlanKeyRequest { + __type?: "CreateUsagePlanKeyRequest"; + /** + *

+ * [Required] The identifier of a + * + * UsagePlanKey + * + * resource for a plan customer. + *

+ */ + keyId: string | undefined; + + /** + *

+ * [Required] The type of a + * + * UsagePlanKey + * + * resource for a plan customer. + *

+ */ + keyType: string | undefined; + + name?: string; + template?: boolean; + templateSkipList?: Array; + title?: string; + /** + *

+ * [Required] The Id of the + * + * UsagePlan + * + * resource representing the usage plan containing the to-be-created + * + * UsagePlanKey + * + * resource representing a plan customer. + *

+ */ + usagePlanId: string | undefined; +} + +export namespace CreateUsagePlanKeyRequest { + export function isa(o: any): o is CreateUsagePlanKeyRequest { + return _smithy.isa(o, "CreateUsagePlanKeyRequest"); + } +} + +/** + *

+ * The POST request to create a usage plan with the name, description, throttle limits and quota limits, as well as the associated API stages, specified in the payload. + *

+ */ +export interface CreateUsagePlanRequest { + __type?: "CreateUsagePlanRequest"; + /** + *

+ * The associated API stages of the usage plan. + *

+ */ + apiStages?: Array; + + /** + *

+ * The description of the usage plan. + *

+ */ + description?: string; + + /** + *

+ * [Required] The name of the usage plan. + *

+ */ + name: string | undefined; + + /** + *

+ * The quota of the usage plan. + *

+ */ + quota?: QuotaSettings; + + /** + *

+ * The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with + * + * aws: + * + * . The tag value can be up to 256 characters. + *

+ */ + tags?: { [key: string]: string }; + + template?: boolean; + templateSkipList?: Array; + /** + *

+ * The throttling limits of the usage plan. + *

+ */ + throttle?: ThrottleSettings; + + title?: string; +} + +export namespace CreateUsagePlanRequest { + export function isa(o: any): o is CreateUsagePlanRequest { + return _smithy.isa(o, "CreateUsagePlanRequest"); + } +} + +/** + *

+ * Creates a VPC link, under the caller's account in a selected region, in an asynchronous operation that typically takes 2-4 minutes to complete and become operational. The caller must have permissions to create and update VPC Endpoint services. + *

+ */ +export interface CreateVpcLinkRequest { + __type?: "CreateVpcLinkRequest"; + /** + *

+ * The description of the VPC link. + *

+ */ + description?: string; + + /** + *

+ * [Required] The name used to label and identify the VPC link. + *

+ */ + name: string | undefined; + + /** + *

+ * The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with + * + * aws: + * + * . The tag value can be up to 256 characters. + *

+ */ + tags?: { [key: string]: string }; + + /** + *

+ * [Required] The ARNs of network load balancers of the VPC targeted by the VPC link. The network load balancers must be owned by the same AWS account of the API owner. + *

+ */ + targetArns: Array | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace CreateVpcLinkRequest { + export function isa(o: any): o is CreateVpcLinkRequest { + return _smithy.isa(o, "CreateVpcLinkRequest"); + } +} + +/** + *

+ * A request to delete the + * + * ApiKey + * + * resource. + *

+ */ +export interface DeleteApiKeyRequest { + __type?: "DeleteApiKeyRequest"; + /** + *

+ * [Required] The identifier of the + * + * ApiKey + * + * resource to be deleted. + *

+ */ + apiKey: string | undefined; + + name?: string; + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace DeleteApiKeyRequest { + export function isa(o: any): o is DeleteApiKeyRequest { + return _smithy.isa(o, "DeleteApiKeyRequest"); + } +} + +/** + *

+ * Request to delete an existing + * + * Authorizer + * + * resource. + *

+ */ +export interface DeleteAuthorizerRequest { + __type?: "DeleteAuthorizerRequest"; + /** + *

+ * [Required] The identifier of the + * + * Authorizer + * + * resource. + *

+ */ + authorizerId: string | undefined; + + name?: string; + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace DeleteAuthorizerRequest { + export function isa(o: any): o is DeleteAuthorizerRequest { + return _smithy.isa(o, "DeleteAuthorizerRequest"); + } +} + +/** + *

+ * A request to delete the + * + * BasePathMapping + * + * resource. + *

+ */ +export interface DeleteBasePathMappingRequest { + __type?: "DeleteBasePathMappingRequest"; + /** + *

+ * [Required] The base path name of the + * + * BasePathMapping + * + * resource to delete. + *

+ *

+ * To specify an empty base path, set this parameter to + * + * '(none)' + * + * . + *

+ */ + basePath: string | undefined; + + /** + *

+ * [Required] The domain name of the + * + * BasePathMapping + * + * resource to delete. + *

+ */ + domainName: string | undefined; + + name?: string; + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace DeleteBasePathMappingRequest { + export function isa(o: any): o is DeleteBasePathMappingRequest { + return _smithy.isa(o, "DeleteBasePathMappingRequest"); + } +} + +/** + *

+ * A request to delete the + * + * ClientCertificate + * + * resource. + *

+ */ +export interface DeleteClientCertificateRequest { + __type?: "DeleteClientCertificateRequest"; + /** + *

+ * [Required] The identifier of the + * + * ClientCertificate + * + * resource to be deleted. + *

+ */ + clientCertificateId: string | undefined; + + name?: string; + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace DeleteClientCertificateRequest { + export function isa(o: any): o is DeleteClientCertificateRequest { + return _smithy.isa(o, "DeleteClientCertificateRequest"); + } +} + +/** + *

+ * Requests API Gateway to delete a + * + * Deployment + * + * resource. + *

+ */ +export interface DeleteDeploymentRequest { + __type?: "DeleteDeploymentRequest"; + /** + *

+ * [Required] The identifier of the + * + * Deployment + * + * resource to delete. + *

+ */ + deploymentId: string | undefined; + + name?: string; + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace DeleteDeploymentRequest { + export function isa(o: any): o is DeleteDeploymentRequest { + return _smithy.isa(o, "DeleteDeploymentRequest"); + } +} + +/** + *

+ * Deletes an existing documentation part of an API. + *

+ */ +export interface DeleteDocumentationPartRequest { + __type?: "DeleteDocumentationPartRequest"; + /** + *

+ * [Required] The identifier of the to-be-deleted documentation part. + *

+ */ + documentationPartId: string | undefined; + + name?: string; + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace DeleteDocumentationPartRequest { + export function isa(o: any): o is DeleteDocumentationPartRequest { + return _smithy.isa(o, "DeleteDocumentationPartRequest"); + } +} + +/** + *

+ * Deletes an existing documentation version of an API. + *

+ */ +export interface DeleteDocumentationVersionRequest { + __type?: "DeleteDocumentationVersionRequest"; + /** + *

+ * [Required] The version identifier of a to-be-deleted documentation snapshot. + *

+ */ + documentationVersion: string | undefined; + + name?: string; + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace DeleteDocumentationVersionRequest { + export function isa(o: any): o is DeleteDocumentationVersionRequest { + return _smithy.isa(o, "DeleteDocumentationVersionRequest"); + } +} + +/** + *

+ * A request to delete the + * + * DomainName + * + * resource. + *

+ */ +export interface DeleteDomainNameRequest { + __type?: "DeleteDomainNameRequest"; + /** + *

+ * [Required] The name of the + * + * DomainName + * + * resource to be deleted. + *

+ */ + domainName: string | undefined; + + name?: string; + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace DeleteDomainNameRequest { + export function isa(o: any): o is DeleteDomainNameRequest { + return _smithy.isa(o, "DeleteDomainNameRequest"); + } +} + +/** + *

+ * Clears any customization of a + * + * GatewayResponse + * + * of a specified response type on the given + * + * RestApi + * + * and resets it with the default settings. + *

+ */ +export interface DeleteGatewayResponseRequest { + __type?: "DeleteGatewayResponseRequest"; + name?: string; + /** + *

+ * [Required] + *

+ * The response type of the associated + * + * GatewayResponse + * + * . Valid values are + *

    + *
  • + * ACCESS_DENIED + *
  • + *
  • + * API_CONFIGURATION_ERROR + *
  • + *
  • + * AUTHORIZER_FAILURE + *
  • + *
  • + * AUTHORIZER_CONFIGURATION_ERROR + *
  • + *
  • + * BAD_REQUEST_PARAMETERS + *
  • + *
  • + * BAD_REQUEST_BODY + *
  • + *
  • + * DEFAULT_4XX + *
  • + *
  • + * DEFAULT_5XX + *
  • + *
  • + * EXPIRED_TOKEN + *
  • + *
  • + * INVALID_SIGNATURE + *
  • + *
  • + * INTEGRATION_FAILURE + *
  • + *
  • + * INTEGRATION_TIMEOUT + *
  • + *
  • + * INVALID_API_KEY + *
  • + *
  • + * MISSING_AUTHENTICATION_TOKEN + *
  • + *
  • + * QUOTA_EXCEEDED + *
  • + *
  • + * REQUEST_TOO_LARGE + *
  • + *
  • + * RESOURCE_NOT_FOUND + *
  • + *
  • + * THROTTLED + *
  • + *
  • + * UNAUTHORIZED + *
  • + *
  • + * UNSUPPORTED_MEDIA_TYPE + *
  • + *
+ *

+ *

+ */ + responseType: GatewayResponseType | string | undefined; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace DeleteGatewayResponseRequest { + export function isa(o: any): o is DeleteGatewayResponseRequest { + return _smithy.isa(o, "DeleteGatewayResponseRequest"); + } +} + +/** + *

+ * Represents a delete integration request. + *

+ */ +export interface DeleteIntegrationRequest { + __type?: "DeleteIntegrationRequest"; + /** + *

+ * [Required] Specifies a delete integration request's HTTP method. + *

+ */ + httpMethod: string | undefined; + + name?: string; + /** + *

+ * [Required] Specifies a delete integration request's resource identifier. + *

+ */ + resourceId: string | undefined; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace DeleteIntegrationRequest { + export function isa(o: any): o is DeleteIntegrationRequest { + return _smithy.isa(o, "DeleteIntegrationRequest"); + } +} + +/** + *

+ * Represents a delete integration response request. + *

+ */ +export interface DeleteIntegrationResponseRequest { + __type?: "DeleteIntegrationResponseRequest"; + /** + *

+ * [Required] Specifies a delete integration response request's HTTP method. + *

+ */ + httpMethod: string | undefined; + + name?: string; + /** + *

+ * [Required] Specifies a delete integration response request's resource identifier. + *

+ */ + resourceId: string | undefined; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + /** + *

+ * [Required] Specifies a delete integration response request's status code. + *

+ */ + statusCode: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace DeleteIntegrationResponseRequest { + export function isa(o: any): o is DeleteIntegrationResponseRequest { + return _smithy.isa(o, "DeleteIntegrationResponseRequest"); + } +} + +/** + *

+ * Request to delete an existing + * + * Method + * + * resource. + *

+ */ +export interface DeleteMethodRequest { + __type?: "DeleteMethodRequest"; + /** + *

+ * [Required] The HTTP verb of the + * + * Method + * + * resource. + *

+ */ + httpMethod: string | undefined; + + name?: string; + /** + *

+ * [Required] The + * + * Resource + * + * identifier for the + * + * Method + * + * resource. + *

+ */ + resourceId: string | undefined; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace DeleteMethodRequest { + export function isa(o: any): o is DeleteMethodRequest { + return _smithy.isa(o, "DeleteMethodRequest"); + } +} + +/** + *

+ * A request to delete an existing + * + * MethodResponse + * + * resource. + *

+ */ +export interface DeleteMethodResponseRequest { + __type?: "DeleteMethodResponseRequest"; + /** + *

+ * [Required] The HTTP verb of the + * + * Method + * + * resource. + *

+ */ + httpMethod: string | undefined; + + name?: string; + /** + *

+ * [Required] The + * + * Resource + * + * identifier for the + * + * MethodResponse + * + * resource. + *

+ */ + resourceId: string | undefined; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + /** + *

+ * [Required] The status code identifier for the + * + * MethodResponse + * + * resource. + *

+ */ + statusCode: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace DeleteMethodResponseRequest { + export function isa(o: any): o is DeleteMethodResponseRequest { + return _smithy.isa(o, "DeleteMethodResponseRequest"); + } +} + +/** + *

+ * Request to delete an existing model in an existing + * + * RestApi + * + * resource. + *

+ */ +export interface DeleteModelRequest { + __type?: "DeleteModelRequest"; + /** + *

+ * [Required] The name of the model to delete. + *

+ */ + modelName: string | undefined; + + name?: string; + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace DeleteModelRequest { + export function isa(o: any): o is DeleteModelRequest { + return _smithy.isa(o, "DeleteModelRequest"); + } +} + +/** + *

+ * Deletes a specified + * + * RequestValidator + * + * of a given + * + * RestApi + * + * . + *

+ */ +export interface DeleteRequestValidatorRequest { + __type?: "DeleteRequestValidatorRequest"; + name?: string; + /** + *

+ * [Required] The identifier of the + * + * RequestValidator + * + * to be deleted. + *

+ */ + requestValidatorId: string | undefined; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace DeleteRequestValidatorRequest { + export function isa(o: any): o is DeleteRequestValidatorRequest { + return _smithy.isa(o, "DeleteRequestValidatorRequest"); + } +} + +/** + *

+ * Request to delete a + * + * Resource + * + * . + *

+ */ +export interface DeleteResourceRequest { + __type?: "DeleteResourceRequest"; + name?: string; + /** + *

+ * [Required] The identifier of the + * + * Resource + * + * resource. + *

+ */ + resourceId: string | undefined; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace DeleteResourceRequest { + export function isa(o: any): o is DeleteResourceRequest { + return _smithy.isa(o, "DeleteResourceRequest"); + } +} + +/** + *

+ * Request to delete the specified API from your collection. + *

+ */ +export interface DeleteRestApiRequest { + __type?: "DeleteRestApiRequest"; + name?: string; + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace DeleteRestApiRequest { + export function isa(o: any): o is DeleteRestApiRequest { + return _smithy.isa(o, "DeleteRestApiRequest"); + } +} + +/** + *

+ * Requests API Gateway to delete a + * + * Stage + * + * resource. + *

+ */ +export interface DeleteStageRequest { + __type?: "DeleteStageRequest"; + name?: string; + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + /** + *

+ * [Required] The name of the + * + * Stage + * + * resource to delete. + *

+ */ + stageName: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace DeleteStageRequest { + export function isa(o: any): o is DeleteStageRequest { + return _smithy.isa(o, "DeleteStageRequest"); + } +} + +/** + *

+ * The DELETE request to delete a usage plan key and remove the underlying API key from the associated usage plan. + *

+ */ +export interface DeleteUsagePlanKeyRequest { + __type?: "DeleteUsagePlanKeyRequest"; + /** + *

+ * [Required] The Id of the + * + * UsagePlanKey + * + * resource to be deleted. + *

+ */ + keyId: string | undefined; + + name?: string; + template?: boolean; + templateSkipList?: Array; + title?: string; + /** + *

+ * [Required] The Id of the + * + * UsagePlan + * + * resource representing the usage plan containing the to-be-deleted + * + * UsagePlanKey + * + * resource representing a plan customer. + *

+ */ + usagePlanId: string | undefined; +} + +export namespace DeleteUsagePlanKeyRequest { + export function isa(o: any): o is DeleteUsagePlanKeyRequest { + return _smithy.isa(o, "DeleteUsagePlanKeyRequest"); + } +} + +/** + *

+ * The DELETE request to delete a usage plan of a given plan Id. + *

+ */ +export interface DeleteUsagePlanRequest { + __type?: "DeleteUsagePlanRequest"; + name?: string; + template?: boolean; + templateSkipList?: Array; + title?: string; + /** + *

+ * [Required] The Id of the to-be-deleted usage plan. + *

+ */ + usagePlanId: string | undefined; +} + +export namespace DeleteUsagePlanRequest { + export function isa(o: any): o is DeleteUsagePlanRequest { + return _smithy.isa(o, "DeleteUsagePlanRequest"); + } +} + +/** + *

+ * Deletes an existing + * + * VpcLink + * + * of a specified identifier. + *

+ */ +export interface DeleteVpcLinkRequest { + __type?: "DeleteVpcLinkRequest"; + name?: string; + template?: boolean; + templateSkipList?: Array; + title?: string; + /** + *

+ * [Required] The identifier of the + * + * VpcLink + * + * . It is used in an + * + * Integration + * + * to reference this + * + * VpcLink + * + * . + *

+ */ + vpcLinkId: string | undefined; +} + +export namespace DeleteVpcLinkRequest { + export function isa(o: any): o is DeleteVpcLinkRequest { + return _smithy.isa(o, "DeleteVpcLinkRequest"); + } +} + +/** + *

+ * An immutable representation of a + * + * RestApi + * + * resource that can be called by users using + * + * Stages + * + * . A deployment must be associated with a + * + * Stage + * + * for it to be callable over the Internet. + *

+ *
+ * To create a deployment, call + * + * POST + * + * on the + * + * Deployments + * + * resource of a + * + * RestApi + * + * . + * To view, update, or delete a deployment, call + * + * GET + * + * , + * + * PATCH + * + * , or + * + * DELETE + * + * on the specified deployment resource ( + * + * /restapis/{restapi_id}/deployments/{deployment_id} + * + * ). + *
+ * + */ +export interface Deployment extends $MetadataBearer { + __type?: "Deployment"; + /** + *

+ * A summary of the + * + * RestApi + * + * at the date and time that the deployment resource was created. + *

+ */ + apiSummary?: { [key: string]: { [key: string]: MethodSnapshot } }; + + /** + *

+ * The date and time that the deployment resource was created. + *

+ */ + createdDate?: Date; + + /** + *

+ * The description for the deployment resource. + *

+ */ + description?: string; + + /** + *

+ * The identifier for the deployment resource. + *

+ */ + id?: string; +} + +export namespace Deployment { + export function isa(o: any): o is Deployment { + return _smithy.isa(o, "Deployment"); + } +} + +/** + *

+ * The input configuration for a canary deployment. + *

+ */ +export interface DeploymentCanarySettings { + __type?: "DeploymentCanarySettings"; + /** + *

+ * The percentage (0.0-100.0) of traffic routed to the canary deployment. + *

+ */ + percentTraffic?: number; + + /** + *

+ * A stage variable overrides used for the canary release deployment. They can override existing stage variables or add new stage variables for the canary release deployment. These stage variables are represented as a string-to-string map between stage variable names and their values. + *

+ */ + stageVariableOverrides?: { [key: string]: string }; + + /** + *

+ * A Boolean flag to indicate whether the canary release deployment uses the stage cache or not. + *

+ */ + useStageCache?: boolean; +} + +export namespace DeploymentCanarySettings { + export function isa(o: any): o is DeploymentCanarySettings { + return _smithy.isa(o, "DeploymentCanarySettings"); + } +} + +/** + *

+ * Represents a collection resource that contains zero or more references to your existing deployments, and links that guide you on how to interact with your collection. The collection offers a paginated view of the contained deployments. + *

+ *
+ * To create a new deployment of a + * + * RestApi + * + * , make a + * + * POST + * + * request against this resource. To view, update, or delete an existing + * deployment, make a + * + * GET + * + * , + * + * PATCH + * + * , or + * + * DELETE + * + * request, respectively, on a specified + * + * Deployment + * + * resource. + *
+ * + */ +export interface Deployments extends $MetadataBearer { + __type?: "Deployments"; + /** + *

+ * The current page of elements from this collection. + *

+ */ + items?: Array; + + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; +} + +export namespace Deployments { + export function isa(o: any): o is Deployments { + return _smithy.isa(o, "Deployments"); + } +} + +/** + *

+ * A documentation part for a targeted API entity. + *

+ *
+ *

+ * A documentation part consists of a content map ( + * + * properties + * + * ) and a target ( + * + * location + * + * ). The target specifies an API entity to which the documentation content applies. The supported API entity types are + * + * API + * + * , + * + * AUTHORIZER + * + * , + * + * MODEL + * + * , + * + * RESOURCE + * + * , + * + * METHOD + * + * , + * + * PATH_PARAMETER + * + * , + * + * QUERY_PARAMETER + * + * , + * + * REQUEST_HEADER + * + * , + * + * REQUEST_BODY + * + * , + * + * RESPONSE + * + * , + * + * RESPONSE_HEADER + * + * , and + * + * RESPONSE_BODY + * + * . Valid + * + * location + * + * fields depend on the API entity type. All valid fields are not required. + *

+ *

+ * The content map is a JSON string of API-specific key-value pairs. Although an API can use any shape for the content map, only the OpenAPI-compliant documentation fields will be injected into the associated API entity definition in the exported OpenAPI definition file. + *

+ *
+ * + */ +export interface DocumentationPart extends $MetadataBearer { + __type?: "DocumentationPart"; + /** + *

+ * The + * + * DocumentationPart + * + * identifier, generated by API Gateway when the + * + * DocumentationPart + * + * is created. + *

+ */ + id?: string; + + /** + *

+ * The location of the API entity to which the documentation applies. Valid fields depend on the targeted API entity type. All the valid location fields are not required. If not explicitly specified, a valid location field is treated as a wildcard and associated documentation content may be inherited by matching entities, unless overridden. + *

+ */ + location?: DocumentationPartLocation; + + /** + *

+ * A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded as a JSON string, e.g., + * + * "{ \"description\": \"The API does ...\" }" + * + * . Only OpenAPI-compliant documentation-related fields from the + * + * properties + * + * map are exported and, hence, published as part of the API entity definitions, while the original documentation parts are exported in a OpenAPI extension of + * + * x-amazon-apigateway-documentation + * + * . + *

+ */ + properties?: string; +} + +export namespace DocumentationPart { + export function isa(o: any): o is DocumentationPart { + return _smithy.isa(o, "DocumentationPart"); + } +} + +/** + *

+ * A collection of the imported + * + * DocumentationPart + * + * identifiers. + *

+ *
+ * This is used to return the result when documentation parts in an external (e.g., OpenAPI) file are imported into API Gateway + *
+ * + */ +export interface DocumentationPartIds extends $MetadataBearer { + __type?: "DocumentationPartIds"; + /** + *

+ * A list of the returned documentation part identifiers. + *

+ */ + ids?: Array; + + /** + *

+ * A list of warning messages reported during import of documentation parts. + *

+ */ + warnings?: Array; +} + +export namespace DocumentationPartIds { + export function isa(o: any): o is DocumentationPartIds { + return _smithy.isa(o, "DocumentationPartIds"); + } +} + +/** + *

+ * Specifies the target API entity to which the documentation applies. + *

+ */ +export interface DocumentationPartLocation { + __type?: "DocumentationPartLocation"; + /** + *

+ * The HTTP verb of a method. It is a valid field for the API entity types of + * + * METHOD + * + * , + * + * PATH_PARAMETER + * + * , + * + * QUERY_PARAMETER + * + * , + * + * REQUEST_HEADER + * + * , + * + * REQUEST_BODY + * + * , + * + * RESPONSE + * + * , + * + * RESPONSE_HEADER + * + * , and + * + * RESPONSE_BODY + * + * . The default value is + * + * * + * + * for any method. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other + * + * location + * + * attributes, the child entity's + * + * method + * + * attribute must match that of the parent entity exactly. + *

+ */ + method?: string; + + /** + *

+ * The name of the targeted API entity. It is a valid and required field for the API entity types of + * + * AUTHORIZER + * + * , + * + * MODEL + * + * , + * + * PATH_PARAMETER + * + * , + * + * QUERY_PARAMETER + * + * , + * + * REQUEST_HEADER + * + * , + * + * REQUEST_BODY + * + * and + * + * RESPONSE_HEADER + * + * . It is an invalid field for any other entity type. + *

+ */ + name?: string; + + /** + *

+ * The URL path of the target. It is a valid field for the API entity types of + * + * RESOURCE + * + * , + * + * METHOD + * + * , + * + * PATH_PARAMETER + * + * , + * + * QUERY_PARAMETER + * + * , + * + * REQUEST_HEADER + * + * , + * + * REQUEST_BODY + * + * , + * + * RESPONSE + * + * , + * + * RESPONSE_HEADER + * + * , and + * + * RESPONSE_BODY + * + * . The default value is + * + * / + * + * for the root resource. When an applicable child entity inherits the content of another entity of the same type with more general specifications of the other + * + * location + * + * attributes, the child entity's + * + * path + * + * attribute must match that of the parent entity as a prefix. + *

+ */ + path?: string; + + /** + *

+ * The HTTP status code of a response. It is a valid field for the API entity types of + * + * RESPONSE + * + * , + * + * RESPONSE_HEADER + * + * , and + * + * RESPONSE_BODY + * + * . The default value is + * + * * + * + * for any status code. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other + * + * location + * + * attributes, the child entity's + * + * statusCode + * + * attribute must match that of the parent entity exactly. + *

+ */ + statusCode?: string; + + /** + *

+ * [Required] The type of API entity to which the documentation content applies. Valid values are + * + * API + * + * , + * + * AUTHORIZER + * + * , + * + * MODEL + * + * , + * + * RESOURCE + * + * , + * + * METHOD + * + * , + * + * PATH_PARAMETER + * + * , + * + * QUERY_PARAMETER + * + * , + * + * REQUEST_HEADER + * + * , + * + * REQUEST_BODY + * + * , + * + * RESPONSE + * + * , + * + * RESPONSE_HEADER + * + * , and + * + * RESPONSE_BODY + * + * . Content inheritance does not apply to any entity of the + * + * API + * + * , + * + * AUTHORIZER + * + * , + * + * METHOD + * + * , + * + * MODEL + * + * , + * + * REQUEST_BODY + * + * , or + * + * RESOURCE + * + * type. + *

+ */ + type: DocumentationPartType | string | undefined; +} + +export namespace DocumentationPartLocation { + export function isa(o: any): o is DocumentationPartLocation { + return _smithy.isa(o, "DocumentationPartLocation"); + } +} + +export enum DocumentationPartType { + API = "API", + AUTHORIZER = "AUTHORIZER", + METHOD = "METHOD", + MODEL = "MODEL", + PATH_PARAMETER = "PATH_PARAMETER", + QUERY_PARAMETER = "QUERY_PARAMETER", + REQUEST_BODY = "REQUEST_BODY", + REQUEST_HEADER = "REQUEST_HEADER", + RESOURCE = "RESOURCE", + RESPONSE = "RESPONSE", + RESPONSE_BODY = "RESPONSE_BODY", + RESPONSE_HEADER = "RESPONSE_HEADER", +} + +/** + *

+ * The collection of documentation parts of an API. + *

+ *
+ *
+ * + */ +export interface DocumentationParts extends $MetadataBearer { + __type?: "DocumentationParts"; + /** + *

+ * The current page of elements from this collection. + *

+ */ + items?: Array; + + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; +} + +export namespace DocumentationParts { + export function isa(o: any): o is DocumentationParts { + return _smithy.isa(o, "DocumentationParts"); + } +} + +/** + *

+ * A snapshot of the documentation of an API. + *

+ *
+ *

+ * Publishing API documentation involves creating a documentation version associated with an API stage and exporting the versioned documentation to an external (e.g., OpenAPI) file. + *

+ *
+ * + */ +export interface DocumentationVersion extends $MetadataBearer { + __type?: "DocumentationVersion"; + /** + *

+ * The date when the API documentation snapshot is created. + *

+ */ + createdDate?: Date; + + /** + *

+ * The description of the API documentation snapshot. + *

+ */ + description?: string; + + /** + *

+ * The version identifier of the API documentation snapshot. + *

+ */ + version?: string; +} + +export namespace DocumentationVersion { + export function isa(o: any): o is DocumentationVersion { + return _smithy.isa(o, "DocumentationVersion"); + } +} + +/** + *

+ * The collection of documentation snapshots of an API. + *

+ *
+ *

+ * Use the + * + * DocumentationVersions + * + * to manage documentation snapshots associated with various API stages. + *

+ *
+ * + */ +export interface DocumentationVersions extends $MetadataBearer { + __type?: "DocumentationVersions"; + /** + *

+ * The current page of elements from this collection. + *

+ */ + items?: Array; + + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; +} + +export namespace DocumentationVersions { + export function isa(o: any): o is DocumentationVersions { + return _smithy.isa(o, "DocumentationVersions"); + } +} + +/** + *

+ * Represents a custom domain name as a user-friendly host name of an API ( + * + * RestApi + * + * ). + *

+ *
+ *

+ * When you deploy an API, API Gateway creates a default host name for the API. This default API host name is of the + * + * {restapi-id}.execute-api.{region}.amazonaws.com + * + * format. With the default host name, you can access the API's root resource with the URL of + * + * https://{restapi-id}.execute-api.{region}.amazonaws.com/{stage}/ + * + * . When you set up a custom domain name of + * + * apis.example.com + * + * for this API, you can then access the same resource using the URL of the + * + * https://apis.examples.com/myApi + * + * , where + * + * myApi + * + * is the base path mapping ( + * + * BasePathMapping + * + * ) of your API under the custom domain name. + *

+ *
+ * + */ +export interface DomainName extends $MetadataBearer { + __type?: "DomainName"; + /** + *

+ * The reference to an AWS-managed certificate that will be used by edge-optimized endpoint for this domain name. AWS Certificate Manager is the only supported source. + *

+ */ + certificateArn?: string; + + /** + *

+ * The name of the certificate that will be used by edge-optimized endpoint for this domain name. + *

+ */ + certificateName?: string; + + /** + *

+ * The timestamp when the certificate that was used by edge-optimized endpoint for this domain name was uploaded. + *

+ */ + certificateUploadDate?: Date; + + /** + *

+ * The domain name of the Amazon CloudFront distribution associated with this custom domain name for an edge-optimized endpoint. You set up this association when adding a DNS record pointing the custom domain name to this distribution name. For more information about CloudFront distributions, see the + * + * Amazon CloudFront documentation + * + * . + *

+ */ + distributionDomainName?: string; + + /** + *

+ * The region-agnostic Amazon Route 53 Hosted Zone ID of the edge-optimized endpoint. The valid value is + * + * Z2FDTNDATAQYW2 + * + * for all the regions. For more information, see + * + * Set up a Regional Custom Domain Name + * + * and + * + * AWS Regions and Endpoints for API Gateway + * + * . + *

+ */ + distributionHostedZoneId?: string; + + /** + *

+ * The custom domain name as an API host name, for example, + * + * my-api.example.com + * + * . + *

+ */ + domainName?: string; + + /** + *

+ * The status of the + * + * DomainName + * + * migration. The valid values are + * + * AVAILABLE + * + * and + * + * UPDATING + * + * . If the status is + * + * UPDATING + * + * , the domain cannot be modified further until the existing operation is complete. If it is + * + * AVAILABLE + * + * , the domain can be updated. + *

+ */ + domainNameStatus?: DomainNameStatus | string; + + /** + *

+ * An optional text message containing detailed information about status of the + * + * DomainName + * + * migration. + *

+ */ + domainNameStatusMessage?: string; + + /** + *

+ * The endpoint configuration of this + * + * DomainName + * + * showing the endpoint types of the domain name. + *

+ */ + endpointConfiguration?: EndpointConfiguration; + + /** + *

+ * The reference to an AWS-managed certificate that will be used for validating the regional domain name. AWS Certificate Manager is the only supported source. + *

+ */ + regionalCertificateArn?: string; + + /** + *

+ * The name of the certificate that will be used for validating the regional domain name. + *

+ */ + regionalCertificateName?: string; + + /** + *

+ * The domain name associated with the regional endpoint for this custom domain name. You set up this association by adding a DNS record that points the custom domain name to this regional domain name. The regional domain name is returned by API Gateway when you create a regional endpoint. + *

+ */ + regionalDomainName?: string; + + /** + *

+ * The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint. For more information, see + * + * Set up a Regional Custom Domain Name + * + * and + * + * AWS Regions and Endpoints for API Gateway + * + * . + *

+ */ + regionalHostedZoneId?: string; + + /** + *

+ * The Transport Layer Security (TLS) version + cipher suite for this + * + * DomainName + * + * . The valid values are + * + * TLS_1_0 + * + * and + * + * TLS_1_2 + * + * . + *

+ */ + securityPolicy?: SecurityPolicy | string; + + /** + *

+ * The collection of tags. Each tag element is associated with a given resource. + *

+ */ + tags?: { [key: string]: string }; +} + +export namespace DomainName { + export function isa(o: any): o is DomainName { + return _smithy.isa(o, "DomainName"); + } +} + +export enum DomainNameStatus { + AVAILABLE = "AVAILABLE", + PENDING = "PENDING", + UPDATING = "UPDATING", +} + +/** + *

+ * Represents a collection of + * + * DomainName + * + * resources. + *

+ * + */ +export interface DomainNames extends $MetadataBearer { + __type?: "DomainNames"; + /** + *

+ * The current page of elements from this collection. + *

+ */ + items?: Array; + + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; +} + +export namespace DomainNames { + export function isa(o: any): o is DomainNames { + return _smithy.isa(o, "DomainNames"); + } +} + +/** + *

+ * The endpoint configuration to indicate the types of endpoints an API ( + * + * RestApi + * + * ) or its custom domain name ( + * + * DomainName + * + * ) has. + *

+ */ +export interface EndpointConfiguration { + __type?: "EndpointConfiguration"; + /** + *

+ * A list of endpoint types of an API ( + * + * RestApi + * + * ) or its custom domain name ( + * + * DomainName + * + * ). For an edge-optimized API and its custom domain name, the endpoint type is + * + * "EDGE" + * + * . For a regional API and its custom domain name, the endpoint type is + * + * REGIONAL + * + * . For a private API, the endpoint type is + * + * PRIVATE + * + * . + *

+ */ + types?: Array; + + /** + *

+ * A list of VpcEndpointIds of an API ( + * + * RestApi + * + * ) against which to create Route53 ALIASes. It is only supported for + * + * PRIVATE + * + * endpoint type. + *

+ */ + vpcEndpointIds?: Array; +} + +export namespace EndpointConfiguration { + export function isa(o: any): o is EndpointConfiguration { + return _smithy.isa(o, "EndpointConfiguration"); + } +} + +export type EndpointType = "EDGE" | "PRIVATE" | "REGIONAL" + +/** + *

+ * The binary blob response to + * + * GetExport + * + * , which contains the generated SDK. + *

+ */ +export interface ExportResponse extends $MetadataBearer { + __type?: "ExportResponse"; + /** + *

+ * The binary blob response to + * + * GetExport + * + * , which contains the export. + *

+ */ + body?: Uint8Array; + + /** + *

+ * The content-disposition header value in the HTTP response. + *

+ */ + contentDisposition?: string; + + /** + *

+ * The content-type header value in the HTTP response. This will correspond to a valid 'accept' type in the request. + *

+ */ + contentType?: string; +} + +export namespace ExportResponse { + export function isa(o: any): o is ExportResponse { + return _smithy.isa(o, "ExportResponse"); + } +} + +/** + *

+ * Request to flush authorizer cache entries on a specified stage. + *

+ */ +export interface FlushStageAuthorizersCacheRequest { + __type?: "FlushStageAuthorizersCacheRequest"; + name?: string; + /** + *

+ * The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + /** + *

+ * The name of the stage to flush. + *

+ */ + stageName: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace FlushStageAuthorizersCacheRequest { + export function isa(o: any): o is FlushStageAuthorizersCacheRequest { + return _smithy.isa(o, "FlushStageAuthorizersCacheRequest"); + } +} + +/** + *

+ * Requests API Gateway to flush a stage's cache. + *

+ */ +export interface FlushStageCacheRequest { + __type?: "FlushStageCacheRequest"; + name?: string; + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + /** + *

+ * [Required] The name of the stage to flush its cache. + *

+ */ + stageName: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace FlushStageCacheRequest { + export function isa(o: any): o is FlushStageCacheRequest { + return _smithy.isa(o, "FlushStageCacheRequest"); + } +} + +/** + *

+ * A gateway response of a given response type and status code, with optional response parameters and mapping templates. + *

+ *
+ * For more information about valid gateway response types, see + * + * Gateway Response Types Supported by API Gateway + * + *
+ *

+ * Example: Get a Gateway Response of a given response type + *

+ *
+ * Request + *
+ *

+ * This example shows how to get a gateway response of the + * + * MISSING_AUTHENTICATION_TOKEN + * + * type. + *

+ *
GET /restapis/o81lxisefl/gatewayresponses/MISSING_AUTHENTICATION_TOKEN HTTP/1.1
+ * Host: beta-apigateway.us-east-1.amazonaws.com
+ * Content-Type: application/json
+ * X-Amz-Date: 20170503T202516Z
+ * Authorization: AWS4-HMAC-SHA256 Credential={access-key-id}/20170503/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=1b52460e3159c1a26cff29093855d50ea141c1c5b937528fecaf60f51129697a
+ * Cache-Control: no-cache
+ * Postman-Token: 3b2a1ce9-c848-2e26-2e2f-9c2caefbed45
+ * 
+ *

+ * The response type is specified as a URL path. + *

+ *
+ * Response + *
+ *

+ * The successful operation returns the + * + * 200 OK + * + * status code and a payload similar to the following: + *

+ *
{
+ *   "_links": {
+ *     "curies": {
+ *       "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-gatewayresponse-{rel}.html",
+ *       "name": "gatewayresponse",
+ *       "templated": true
+ *     },
+ *     "self": {
+ *       "href": "/restapis/o81lxisefl/gatewayresponses/MISSING_AUTHENTICATION_TOKEN"
+ *     },
+ *     "gatewayresponse:delete": {
+ *       "href": "/restapis/o81lxisefl/gatewayresponses/MISSING_AUTHENTICATION_TOKEN"
+ *     },
+ *     "gatewayresponse:put": {
+ *       "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}",
+ *       "templated": true
+ *     },
+ *     "gatewayresponse:update": {
+ *       "href": "/restapis/o81lxisefl/gatewayresponses/MISSING_AUTHENTICATION_TOKEN"
+ *     }
+ *   },
+ *   "defaultResponse": false,
+ *   "responseParameters": {
+ *     "gatewayresponse.header.x-request-path": "method.request.path.petId",
+ *     "gatewayresponse.header.Access-Control-Allow-Origin": "'a.b.c'",
+ *     "gatewayresponse.header.x-request-query": "method.request.querystring.q",
+ *     "gatewayresponse.header.x-request-header": "method.request.header.Accept"
+ *   },
+ *   "responseTemplates": {
+ *     "application/json": "{\n     \"message\": $context.error.messageString,\n     \"type\":  \"$context.error.responseType\",\n     \"stage\":  \"$context.stage\",\n     \"resourcePath\":  \"$context.resourcePath\",\n     \"stageVariables.a\":  \"$stageVariables.a\",\n     \"statusCode\": \"'404'\"\n}"
+ *   },
+ *   "responseType": "MISSING_AUTHENTICATION_TOKEN",
+ *   "statusCode": "404"
+ * }
+ *

+ *

+ *
+ *
+ * + */ +export interface GatewayResponse extends $MetadataBearer { + __type?: "GatewayResponse"; + /** + *

+ * A Boolean flag to indicate whether this + * + * GatewayResponse + * + * is the default gateway response ( + * + * true + * + * ) or not ( + * + * false + * + * ). A default gateway response is one generated by API Gateway without any customization by an API developer. + *

+ */ + defaultResponse?: boolean; + + /** + *

+ * Response parameters (paths, query strings and headers) of the + * + * GatewayResponse + * + * as a string-to-string map of key-value pairs. + *

+ */ + responseParameters?: { [key: string]: string }; + + /** + *

+ * Response templates of the + * + * GatewayResponse + * + * as a string-to-string map of key-value pairs. + *

+ */ + responseTemplates?: { [key: string]: string }; + + /** + *

+ * The response type of the associated + * + * GatewayResponse + * + * . Valid values are + *

    + *
  • + * ACCESS_DENIED + *
  • + *
  • + * API_CONFIGURATION_ERROR + *
  • + *
  • + * AUTHORIZER_FAILURE + *
  • + *
  • + * AUTHORIZER_CONFIGURATION_ERROR + *
  • + *
  • + * BAD_REQUEST_PARAMETERS + *
  • + *
  • + * BAD_REQUEST_BODY + *
  • + *
  • + * DEFAULT_4XX + *
  • + *
  • + * DEFAULT_5XX + *
  • + *
  • + * EXPIRED_TOKEN + *
  • + *
  • + * INVALID_SIGNATURE + *
  • + *
  • + * INTEGRATION_FAILURE + *
  • + *
  • + * INTEGRATION_TIMEOUT + *
  • + *
  • + * INVALID_API_KEY + *
  • + *
  • + * MISSING_AUTHENTICATION_TOKEN + *
  • + *
  • + * QUOTA_EXCEEDED + *
  • + *
  • + * REQUEST_TOO_LARGE + *
  • + *
  • + * RESOURCE_NOT_FOUND + *
  • + *
  • + * THROTTLED + *
  • + *
  • + * UNAUTHORIZED + *
  • + *
  • + * UNSUPPORTED_MEDIA_TYPE + *
  • + *
+ *

+ */ + responseType?: GatewayResponseType | string; + + /** + *

+ * The HTTP status code for this + * + * GatewayResponse + * + * . + *

+ */ + statusCode?: string; +} + +export namespace GatewayResponse { + export function isa(o: any): o is GatewayResponse { + return _smithy.isa(o, "GatewayResponse"); + } +} + +export enum GatewayResponseType { + ACCESS_DENIED = "ACCESS_DENIED", + API_CONFIGURATION_ERROR = "API_CONFIGURATION_ERROR", + AUTHORIZER_CONFIGURATION_ERROR = "AUTHORIZER_CONFIGURATION_ERROR", + AUTHORIZER_FAILURE = "AUTHORIZER_FAILURE", + BAD_REQUEST_BODY = "BAD_REQUEST_BODY", + BAD_REQUEST_PARAMETERS = "BAD_REQUEST_PARAMETERS", + DEFAULT_4XX = "DEFAULT_4XX", + DEFAULT_5XX = "DEFAULT_5XX", + EXPIRED_TOKEN = "EXPIRED_TOKEN", + INTEGRATION_FAILURE = "INTEGRATION_FAILURE", + INTEGRATION_TIMEOUT = "INTEGRATION_TIMEOUT", + INVALID_API_KEY = "INVALID_API_KEY", + INVALID_SIGNATURE = "INVALID_SIGNATURE", + MISSING_AUTHENTICATION_TOKEN = "MISSING_AUTHENTICATION_TOKEN", + QUOTA_EXCEEDED = "QUOTA_EXCEEDED", + REQUEST_TOO_LARGE = "REQUEST_TOO_LARGE", + RESOURCE_NOT_FOUND = "RESOURCE_NOT_FOUND", + THROTTLED = "THROTTLED", + UNAUTHORIZED = "UNAUTHORIZED", + UNSUPPORTED_MEDIA_TYPE = "UNSUPPORTED_MEDIA_TYPE", +} + +/** + *

+ * The collection of the + * + * GatewayResponse + * + * instances of a + * + * RestApi + * + * as a + * + * responseType + * + * -to- + * + * GatewayResponse + * + * object map of key-value pairs. As such, pagination is not supported for querying this collection. + *

+ *
+ * For more information about valid gateway response types, see + * + * Gateway Response Types Supported by API Gateway + * + *
+ *

+ * Example: Get the collection of gateway responses of an API + *

+ *
+ * Request + *
+ *

+ * This example request shows how to retrieve the + * + * GatewayResponses + * + * collection from an API. + *

+ *
GET /restapis/o81lxisefl/gatewayresponses HTTP/1.1
+ * Host: beta-apigateway.us-east-1.amazonaws.com
+ * Content-Type: application/json
+ * X-Amz-Date: 20170503T220604Z
+ * Authorization: AWS4-HMAC-SHA256 Credential={access-key-id}/20170503/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=59b42fe54a76a5de8adf2c67baa6d39206f8e9ad49a1d77ccc6a5da3103a398a
+ * Cache-Control: no-cache
+ * Postman-Token: 5637af27-dc29-fc5c-9dfe-0645d52cb515
+ * 
+ *

+ *

+ *
+ * Response + *
+ *

+ * The successful operation returns the + * + * 200 OK + * + * status code and a payload similar to the following: + *

+ *
{
+ *   "_links": {
+ *     "curies": {
+ *       "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-gatewayresponse-{rel}.html",
+ *       "name": "gatewayresponse",
+ *       "templated": true
+ *     },
+ *     "self": {
+ *       "href": "/restapis/o81lxisefl/gatewayresponses"
+ *     },
+ *     "first": {
+ *       "href": "/restapis/o81lxisefl/gatewayresponses"
+ *     },
+ *     "gatewayresponse:by-type": {
+ *       "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}",
+ *       "templated": true
+ *     },
+ *     "item": [
+ *       {
+ *         "href": "/restapis/o81lxisefl/gatewayresponses/INTEGRATION_FAILURE"
+ *       },
+ *       {
+ *         "href": "/restapis/o81lxisefl/gatewayresponses/RESOURCE_NOT_FOUND"
+ *       },
+ *       {
+ *         "href": "/restapis/o81lxisefl/gatewayresponses/REQUEST_TOO_LARGE"
+ *       },
+ *       {
+ *         "href": "/restapis/o81lxisefl/gatewayresponses/THROTTLED"
+ *       },
+ *       {
+ *         "href": "/restapis/o81lxisefl/gatewayresponses/UNSUPPORTED_MEDIA_TYPE"
+ *       },
+ *       {
+ *         "href": "/restapis/o81lxisefl/gatewayresponses/AUTHORIZER_CONFIGURATION_ERROR"
+ *       },
+ *       {
+ *         "href": "/restapis/o81lxisefl/gatewayresponses/DEFAULT_5XX"
+ *       },
+ *       {
+ *         "href": "/restapis/o81lxisefl/gatewayresponses/DEFAULT_4XX"
+ *       },
+ *       {
+ *         "href": "/restapis/o81lxisefl/gatewayresponses/BAD_REQUEST_PARAMETERS"
+ *       },
+ *       {
+ *         "href": "/restapis/o81lxisefl/gatewayresponses/BAD_REQUEST_BODY"
+ *       },
+ *       {
+ *         "href": "/restapis/o81lxisefl/gatewayresponses/EXPIRED_TOKEN"
+ *       },
+ *       {
+ *         "href": "/restapis/o81lxisefl/gatewayresponses/ACCESS_DENIED"
+ *       },
+ *       {
+ *         "href": "/restapis/o81lxisefl/gatewayresponses/INVALID_API_KEY"
+ *       },
+ *       {
+ *         "href": "/restapis/o81lxisefl/gatewayresponses/UNAUTHORIZED"
+ *       },
+ *       {
+ *         "href": "/restapis/o81lxisefl/gatewayresponses/API_CONFIGURATION_ERROR"
+ *       },
+ *       {
+ *         "href": "/restapis/o81lxisefl/gatewayresponses/QUOTA_EXCEEDED"
+ *       },
+ *       {
+ *         "href": "/restapis/o81lxisefl/gatewayresponses/INTEGRATION_TIMEOUT"
+ *       },
+ *       {
+ *         "href": "/restapis/o81lxisefl/gatewayresponses/MISSING_AUTHENTICATION_TOKEN"
+ *       },
+ *       {
+ *         "href": "/restapis/o81lxisefl/gatewayresponses/INVALID_SIGNATURE"
+ *       },
+ *       {
+ *         "href": "/restapis/o81lxisefl/gatewayresponses/AUTHORIZER_FAILURE"
+ *       }
+ *     ]
+ *   },
+ *   "_embedded": {
+ *     "item": [
+ *       {
+ *         "_links": {
+ *           "self": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/INTEGRATION_FAILURE"
+ *           },
+ *           "gatewayresponse:put": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}",
+ *             "templated": true
+ *           },
+ *           "gatewayresponse:update": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/INTEGRATION_FAILURE"
+ *           }
+ *         },
+ *         "defaultResponse": true,
+ *         "responseParameters": {},
+ *         "responseTemplates": {
+ *           "application/json": "{\"message\":$context.error.messageString}"
+ *         },
+ *         "responseType": "INTEGRATION_FAILURE",
+ *         "statusCode": "504"
+ *       },
+ *       {
+ *         "_links": {
+ *           "self": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/RESOURCE_NOT_FOUND"
+ *           },
+ *           "gatewayresponse:put": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}",
+ *             "templated": true
+ *           },
+ *           "gatewayresponse:update": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/RESOURCE_NOT_FOUND"
+ *           }
+ *         },
+ *         "defaultResponse": true,
+ *         "responseParameters": {},
+ *         "responseTemplates": {
+ *           "application/json": "{\"message\":$context.error.messageString}"
+ *         },
+ *         "responseType": "RESOURCE_NOT_FOUND",
+ *         "statusCode": "404"
+ *       },
+ *       {
+ *         "_links": {
+ *           "self": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/REQUEST_TOO_LARGE"
+ *           },
+ *           "gatewayresponse:put": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}",
+ *             "templated": true
+ *           },
+ *           "gatewayresponse:update": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/REQUEST_TOO_LARGE"
+ *           }
+ *         },
+ *         "defaultResponse": true,
+ *         "responseParameters": {},
+ *         "responseTemplates": {
+ *           "application/json": "{\"message\":$context.error.messageString}"
+ *         },
+ *         "responseType": "REQUEST_TOO_LARGE",
+ *         "statusCode": "413"
+ *       },
+ *       {
+ *         "_links": {
+ *           "self": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/THROTTLED"
+ *           },
+ *           "gatewayresponse:put": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}",
+ *             "templated": true
+ *           },
+ *           "gatewayresponse:update": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/THROTTLED"
+ *           }
+ *         },
+ *         "defaultResponse": true,
+ *         "responseParameters": {},
+ *         "responseTemplates": {
+ *           "application/json": "{\"message\":$context.error.messageString}"
+ *         },
+ *         "responseType": "THROTTLED",
+ *         "statusCode": "429"
+ *       },
+ *       {
+ *         "_links": {
+ *           "self": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/UNSUPPORTED_MEDIA_TYPE"
+ *           },
+ *           "gatewayresponse:put": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}",
+ *             "templated": true
+ *           },
+ *           "gatewayresponse:update": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/UNSUPPORTED_MEDIA_TYPE"
+ *           }
+ *         },
+ *         "defaultResponse": true,
+ *         "responseParameters": {},
+ *         "responseTemplates": {
+ *           "application/json": "{\"message\":$context.error.messageString}"
+ *         },
+ *         "responseType": "UNSUPPORTED_MEDIA_TYPE",
+ *         "statusCode": "415"
+ *       },
+ *       {
+ *         "_links": {
+ *           "self": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/AUTHORIZER_CONFIGURATION_ERROR"
+ *           },
+ *           "gatewayresponse:put": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}",
+ *             "templated": true
+ *           },
+ *           "gatewayresponse:update": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/AUTHORIZER_CONFIGURATION_ERROR"
+ *           }
+ *         },
+ *         "defaultResponse": true,
+ *         "responseParameters": {},
+ *         "responseTemplates": {
+ *           "application/json": "{\"message\":$context.error.messageString}"
+ *         },
+ *         "responseType": "AUTHORIZER_CONFIGURATION_ERROR",
+ *         "statusCode": "500"
+ *       },
+ *       {
+ *         "_links": {
+ *           "self": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/DEFAULT_5XX"
+ *           },
+ *           "gatewayresponse:put": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}",
+ *             "templated": true
+ *           },
+ *           "gatewayresponse:update": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/DEFAULT_5XX"
+ *           }
+ *         },
+ *         "defaultResponse": true,
+ *         "responseParameters": {},
+ *         "responseTemplates": {
+ *           "application/json": "{\"message\":$context.error.messageString}"
+ *         },
+ *         "responseType": "DEFAULT_5XX"
+ *       },
+ *       {
+ *         "_links": {
+ *           "self": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/DEFAULT_4XX"
+ *           },
+ *           "gatewayresponse:put": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}",
+ *             "templated": true
+ *           },
+ *           "gatewayresponse:update": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/DEFAULT_4XX"
+ *           }
+ *         },
+ *         "defaultResponse": true,
+ *         "responseParameters": {},
+ *         "responseTemplates": {
+ *           "application/json": "{\"message\":$context.error.messageString}"
+ *         },
+ *         "responseType": "DEFAULT_4XX"
+ *       },
+ *       {
+ *         "_links": {
+ *           "self": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/BAD_REQUEST_PARAMETERS"
+ *           },
+ *           "gatewayresponse:put": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}",
+ *             "templated": true
+ *           },
+ *           "gatewayresponse:update": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/BAD_REQUEST_PARAMETERS"
+ *           }
+ *         },
+ *         "defaultResponse": true,
+ *         "responseParameters": {},
+ *         "responseTemplates": {
+ *           "application/json": "{\"message\":$context.error.messageString}"
+ *         },
+ *         "responseType": "BAD_REQUEST_PARAMETERS",
+ *         "statusCode": "400"
+ *       },
+ *       {
+ *         "_links": {
+ *           "self": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/BAD_REQUEST_BODY"
+ *           },
+ *           "gatewayresponse:put": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}",
+ *             "templated": true
+ *           },
+ *           "gatewayresponse:update": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/BAD_REQUEST_BODY"
+ *           }
+ *         },
+ *         "defaultResponse": true,
+ *         "responseParameters": {},
+ *         "responseTemplates": {
+ *           "application/json": "{\"message\":$context.error.messageString}"
+ *         },
+ *         "responseType": "BAD_REQUEST_BODY",
+ *         "statusCode": "400"
+ *       },
+ *       {
+ *         "_links": {
+ *           "self": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/EXPIRED_TOKEN"
+ *           },
+ *           "gatewayresponse:put": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}",
+ *             "templated": true
+ *           },
+ *           "gatewayresponse:update": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/EXPIRED_TOKEN"
+ *           }
+ *         },
+ *         "defaultResponse": true,
+ *         "responseParameters": {},
+ *         "responseTemplates": {
+ *           "application/json": "{\"message\":$context.error.messageString}"
+ *         },
+ *         "responseType": "EXPIRED_TOKEN",
+ *         "statusCode": "403"
+ *       },
+ *       {
+ *         "_links": {
+ *           "self": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/ACCESS_DENIED"
+ *           },
+ *           "gatewayresponse:put": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}",
+ *             "templated": true
+ *           },
+ *           "gatewayresponse:update": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/ACCESS_DENIED"
+ *           }
+ *         },
+ *         "defaultResponse": true,
+ *         "responseParameters": {},
+ *         "responseTemplates": {
+ *           "application/json": "{\"message\":$context.error.messageString}"
+ *         },
+ *         "responseType": "ACCESS_DENIED",
+ *         "statusCode": "403"
+ *       },
+ *       {
+ *         "_links": {
+ *           "self": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/INVALID_API_KEY"
+ *           },
+ *           "gatewayresponse:put": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}",
+ *             "templated": true
+ *           },
+ *           "gatewayresponse:update": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/INVALID_API_KEY"
+ *           }
+ *         },
+ *         "defaultResponse": true,
+ *         "responseParameters": {},
+ *         "responseTemplates": {
+ *           "application/json": "{\"message\":$context.error.messageString}"
+ *         },
+ *         "responseType": "INVALID_API_KEY",
+ *         "statusCode": "403"
+ *       },
+ *       {
+ *         "_links": {
+ *           "self": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/UNAUTHORIZED"
+ *           },
+ *           "gatewayresponse:put": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}",
+ *             "templated": true
+ *           },
+ *           "gatewayresponse:update": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/UNAUTHORIZED"
+ *           }
+ *         },
+ *         "defaultResponse": true,
+ *         "responseParameters": {},
+ *         "responseTemplates": {
+ *           "application/json": "{\"message\":$context.error.messageString}"
+ *         },
+ *         "responseType": "UNAUTHORIZED",
+ *         "statusCode": "401"
+ *       },
+ *       {
+ *         "_links": {
+ *           "self": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/API_CONFIGURATION_ERROR"
+ *           },
+ *           "gatewayresponse:put": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}",
+ *             "templated": true
+ *           },
+ *           "gatewayresponse:update": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/API_CONFIGURATION_ERROR"
+ *           }
+ *         },
+ *         "defaultResponse": true,
+ *         "responseParameters": {},
+ *         "responseTemplates": {
+ *           "application/json": "{\"message\":$context.error.messageString}"
+ *         },
+ *         "responseType": "API_CONFIGURATION_ERROR",
+ *         "statusCode": "500"
+ *       },
+ *       {
+ *         "_links": {
+ *           "self": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/QUOTA_EXCEEDED"
+ *           },
+ *           "gatewayresponse:put": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}",
+ *             "templated": true
+ *           },
+ *           "gatewayresponse:update": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/QUOTA_EXCEEDED"
+ *           }
+ *         },
+ *         "defaultResponse": true,
+ *         "responseParameters": {},
+ *         "responseTemplates": {
+ *           "application/json": "{\"message\":$context.error.messageString}"
+ *         },
+ *         "responseType": "QUOTA_EXCEEDED",
+ *         "statusCode": "429"
+ *       },
+ *       {
+ *         "_links": {
+ *           "self": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/INTEGRATION_TIMEOUT"
+ *           },
+ *           "gatewayresponse:put": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}",
+ *             "templated": true
+ *           },
+ *           "gatewayresponse:update": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/INTEGRATION_TIMEOUT"
+ *           }
+ *         },
+ *         "defaultResponse": true,
+ *         "responseParameters": {},
+ *         "responseTemplates": {
+ *           "application/json": "{\"message\":$context.error.messageString}"
+ *         },
+ *         "responseType": "INTEGRATION_TIMEOUT",
+ *         "statusCode": "504"
+ *       },
+ *       {
+ *         "_links": {
+ *           "self": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/MISSING_AUTHENTICATION_TOKEN"
+ *           },
+ *           "gatewayresponse:put": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}",
+ *             "templated": true
+ *           },
+ *           "gatewayresponse:update": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/MISSING_AUTHENTICATION_TOKEN"
+ *           }
+ *         },
+ *         "defaultResponse": true,
+ *         "responseParameters": {},
+ *         "responseTemplates": {
+ *           "application/json": "{\"message\":$context.error.messageString}"
+ *         },
+ *         "responseType": "MISSING_AUTHENTICATION_TOKEN",
+ *         "statusCode": "403"
+ *       },
+ *       {
+ *         "_links": {
+ *           "self": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/INVALID_SIGNATURE"
+ *           },
+ *           "gatewayresponse:put": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}",
+ *             "templated": true
+ *           },
+ *           "gatewayresponse:update": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/INVALID_SIGNATURE"
+ *           }
+ *         },
+ *         "defaultResponse": true,
+ *         "responseParameters": {},
+ *         "responseTemplates": {
+ *           "application/json": "{\"message\":$context.error.messageString}"
+ *         },
+ *         "responseType": "INVALID_SIGNATURE",
+ *         "statusCode": "403"
+ *       },
+ *       {
+ *         "_links": {
+ *           "self": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/AUTHORIZER_FAILURE"
+ *           },
+ *           "gatewayresponse:put": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}",
+ *             "templated": true
+ *           },
+ *           "gatewayresponse:update": {
+ *             "href": "/restapis/o81lxisefl/gatewayresponses/AUTHORIZER_FAILURE"
+ *           }
+ *         },
+ *         "defaultResponse": true,
+ *         "responseParameters": {},
+ *         "responseTemplates": {
+ *           "application/json": "{\"message\":$context.error.messageString}"
+ *         },
+ *         "responseType": "AUTHORIZER_FAILURE",
+ *         "statusCode": "500"
+ *       }
+ *     ]
+ *   }
+ * }
+ *

+ *

+ *
+ *
+ * + */ +export interface GatewayResponses extends $MetadataBearer { + __type?: "GatewayResponses"; + /** + *

+ * Returns the entire collection, because of no pagination support. + *

+ */ + items?: Array; + + /** + *

+ * The current pagination position in the paged result set. The + * + * GatewayResponse + * + * collection does not support pagination and the position does not apply here. + *

+ */ + position?: string; +} + +export namespace GatewayResponses { + export function isa(o: any): o is GatewayResponses { + return _smithy.isa(o, "GatewayResponses"); + } +} + +/** + *

+ * A request to generate a + * + * ClientCertificate + * + * resource. + *

+ */ +export interface GenerateClientCertificateRequest { + __type?: "GenerateClientCertificateRequest"; + /** + *

+ * The description of the + * + * ClientCertificate + * + * . + *

+ */ + description?: string; + + name?: string; + /** + *

+ * The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with + * + * aws: + * + * . The tag value can be up to 256 characters. + *

+ */ + tags?: { [key: string]: string }; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GenerateClientCertificateRequest { + export function isa(o: any): o is GenerateClientCertificateRequest { + return _smithy.isa(o, "GenerateClientCertificateRequest"); + } +} + +/** + *

+ * Requests API Gateway to get information about the current + * + * Account + * + * resource. + *

+ */ +export interface GetAccountRequest { + __type?: "GetAccountRequest"; + name?: string; + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetAccountRequest { + export function isa(o: any): o is GetAccountRequest { + return _smithy.isa(o, "GetAccountRequest"); + } +} + +/** + *

+ * A request to get information about the current + * + * ApiKey + * + * resource. + *

+ */ +export interface GetApiKeyRequest { + __type?: "GetApiKeyRequest"; + /** + *

+ * [Required] The identifier of the + * + * ApiKey + * + * resource. + *

+ */ + apiKey: string | undefined; + + /** + *

+ * A boolean flag to specify whether ( + * + * true + * + * ) or not ( + * + * false + * + * ) the result contains the key value. + *

+ */ + includeValue?: boolean; + + name?: string; + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetApiKeyRequest { + export function isa(o: any): o is GetApiKeyRequest { + return _smithy.isa(o, "GetApiKeyRequest"); + } +} + +/** + *

+ * A request to get information about the current + * + * ApiKeys + * + * resource. + *

+ */ +export interface GetApiKeysRequest { + __type?: "GetApiKeysRequest"; + /** + *

+ * The identifier of a customer in AWS Marketplace or an external system, such as a developer portal. + *

+ */ + customerId?: string; + + /** + *

+ * A boolean flag to specify whether ( + * + * true + * + * ) or not ( + * + * false + * + * ) the result contains key values. + *

+ */ + includeValues?: boolean; + + /** + *

+ * The maximum number of returned results per page. The default value is 25 and the maximum value is 500. + *

+ */ + limit?: number; + + name?: string; + /** + *

+ * The name of queried API keys. + *

+ */ + nameQuery?: string; + + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetApiKeysRequest { + export function isa(o: any): o is GetApiKeysRequest { + return _smithy.isa(o, "GetApiKeysRequest"); + } +} + +/** + *

+ * Request to describe an existing + * + * Authorizer + * + * resource. + *

+ */ +export interface GetAuthorizerRequest { + __type?: "GetAuthorizerRequest"; + /** + *

+ * [Required] The identifier of the + * + * Authorizer + * + * resource. + *

+ */ + authorizerId: string | undefined; + + name?: string; + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetAuthorizerRequest { + export function isa(o: any): o is GetAuthorizerRequest { + return _smithy.isa(o, "GetAuthorizerRequest"); + } +} + +/** + *

+ * Request to describe an existing + * + * Authorizers + * + * resource. + *

+ */ +export interface GetAuthorizersRequest { + __type?: "GetAuthorizersRequest"; + /** + *

+ * The maximum number of returned results per page. The default value is 25 and the maximum value is 500. + *

+ */ + limit?: number; + + name?: string; + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetAuthorizersRequest { + export function isa(o: any): o is GetAuthorizersRequest { + return _smithy.isa(o, "GetAuthorizersRequest"); + } +} + +/** + *

+ * Request to describe a + * + * BasePathMapping + * + * resource. + *

+ */ +export interface GetBasePathMappingRequest { + __type?: "GetBasePathMappingRequest"; + /** + *

+ * [Required] The base path name that callers of the API must provide as part of the URL after the domain name. This value must be unique for all of the mappings across a single API. Specify '(none)' if you do not want callers to specify any base path name after the domain name. + *

+ */ + basePath: string | undefined; + + /** + *

+ * [Required] The domain name of the + * + * BasePathMapping + * + * resource to be described. + *

+ */ + domainName: string | undefined; + + name?: string; + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetBasePathMappingRequest { + export function isa(o: any): o is GetBasePathMappingRequest { + return _smithy.isa(o, "GetBasePathMappingRequest"); + } +} + +/** + *

+ * A request to get information about a collection of + * + * BasePathMapping + * + * resources. + *

+ */ +export interface GetBasePathMappingsRequest { + __type?: "GetBasePathMappingsRequest"; + /** + *

+ * [Required] The domain name of a + * + * BasePathMapping + * + * resource. + *

+ */ + domainName: string | undefined; + + /** + *

+ * The maximum number of returned results per page. The default value is 25 and the maximum value is 500. + *

+ */ + limit?: number; + + name?: string; + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetBasePathMappingsRequest { + export function isa(o: any): o is GetBasePathMappingsRequest { + return _smithy.isa(o, "GetBasePathMappingsRequest"); + } +} + +/** + *

+ * A request to get information about the current + * + * ClientCertificate + * + * resource. + *

+ */ +export interface GetClientCertificateRequest { + __type?: "GetClientCertificateRequest"; + /** + *

+ * [Required] The identifier of the + * + * ClientCertificate + * + * resource to be described. + *

+ */ + clientCertificateId: string | undefined; + + name?: string; + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetClientCertificateRequest { + export function isa(o: any): o is GetClientCertificateRequest { + return _smithy.isa(o, "GetClientCertificateRequest"); + } +} + +/** + *

+ * A request to get information about a collection of + * + * ClientCertificate + * + * resources. + *

+ */ +export interface GetClientCertificatesRequest { + __type?: "GetClientCertificatesRequest"; + /** + *

+ * The maximum number of returned results per page. The default value is 25 and the maximum value is 500. + *

+ */ + limit?: number; + + name?: string; + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetClientCertificatesRequest { + export function isa(o: any): o is GetClientCertificatesRequest { + return _smithy.isa(o, "GetClientCertificatesRequest"); + } +} + +/** + *

+ * Requests API Gateway to get information about a + * + * Deployment + * + * resource. + *

+ */ +export interface GetDeploymentRequest { + __type?: "GetDeploymentRequest"; + /** + *

+ * [Required] The identifier of the + * + * Deployment + * + * resource to get information about. + *

+ */ + deploymentId: string | undefined; + + /** + *

+ * A query parameter to retrieve the specified embedded resources of the returned + * + * Deployment + * + * resource in the response. In a REST API call, this + * + * embed + * + * parameter value is a list of comma-separated strings, as in + * + * GET /restapis/{restapi_id}/deployments/{deployment_id}?embed=var1,var2 + * + * . The SDK and other platform-dependent libraries might use a different format for the list. Currently, this request supports only retrieval of the embedded API summary this way. Hence, the parameter value must be a single-valued list containing only the + * + * "apisummary" + * + * string. For example, + * + * GET /restapis/{restapi_id}/deployments/{deployment_id}?embed=apisummary + * + * . + *

+ */ + embed?: Array; + + name?: string; + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetDeploymentRequest { + export function isa(o: any): o is GetDeploymentRequest { + return _smithy.isa(o, "GetDeploymentRequest"); + } +} + +/** + *

+ * Requests API Gateway to get information about a + * + * Deployments + * + * collection. + *

+ */ +export interface GetDeploymentsRequest { + __type?: "GetDeploymentsRequest"; + /** + *

+ * The maximum number of returned results per page. The default value is 25 and the maximum value is 500. + *

+ */ + limit?: number; + + name?: string; + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetDeploymentsRequest { + export function isa(o: any): o is GetDeploymentsRequest { + return _smithy.isa(o, "GetDeploymentsRequest"); + } +} + +/** + *

+ * Gets a specified documentation part of a given API. + *

+ */ +export interface GetDocumentationPartRequest { + __type?: "GetDocumentationPartRequest"; + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + documentationPartId: string | undefined; + + name?: string; + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetDocumentationPartRequest { + export function isa(o: any): o is GetDocumentationPartRequest { + return _smithy.isa(o, "GetDocumentationPartRequest"); + } +} + +/** + *

+ * Gets the documentation parts of an API. The result may be filtered by the type, name, or path of API entities (targets). + *

+ */ +export interface GetDocumentationPartsRequest { + __type?: "GetDocumentationPartsRequest"; + /** + *

+ * The maximum number of returned results per page. The default value is 25 and the maximum value is 500. + *

+ */ + limit?: number; + + /** + *

+ * The status of the API documentation parts to retrieve. Valid values are + * + * DOCUMENTED + * + * for retrieving + * + * DocumentationPart + * + * resources with content and + * + * UNDOCUMENTED + * + * for + * + * DocumentationPart + * + * resources without content. + *

+ */ + locationStatus?: LocationStatusType | string; + + name?: string; + /** + *

+ * The name of API entities of the to-be-retrieved documentation parts. + *

+ */ + nameQuery?: string; + + /** + *

+ * The path of API entities of the to-be-retrieved documentation parts. + *

+ */ + path?: string; + + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; + /** + *

+ * The type of API entities of the to-be-retrieved documentation parts. + *

+ */ + type?: DocumentationPartType | string; +} + +export namespace GetDocumentationPartsRequest { + export function isa(o: any): o is GetDocumentationPartsRequest { + return _smithy.isa(o, "GetDocumentationPartsRequest"); + } +} + +/** + *

+ * Gets a documentation snapshot of an API. + *

+ */ +export interface GetDocumentationVersionRequest { + __type?: "GetDocumentationVersionRequest"; + /** + *

+ * [Required] The version identifier of the to-be-retrieved documentation snapshot. + *

+ */ + documentationVersion: string | undefined; + + name?: string; + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetDocumentationVersionRequest { + export function isa(o: any): o is GetDocumentationVersionRequest { + return _smithy.isa(o, "GetDocumentationVersionRequest"); + } +} + +/** + *

+ * Gets the documentation versions of an API. + *

+ */ +export interface GetDocumentationVersionsRequest { + __type?: "GetDocumentationVersionsRequest"; + /** + *

+ * The maximum number of returned results per page. The default value is 25 and the maximum value is 500. + *

+ */ + limit?: number; + + name?: string; + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetDocumentationVersionsRequest { + export function isa(o: any): o is GetDocumentationVersionsRequest { + return _smithy.isa(o, "GetDocumentationVersionsRequest"); + } +} + +/** + *

+ * Request to get the name of a + * + * DomainName + * + * resource. + *

+ */ +export interface GetDomainNameRequest { + __type?: "GetDomainNameRequest"; + /** + *

+ * [Required] The name of the + * + * DomainName + * + * resource. + *

+ */ + domainName: string | undefined; + + name?: string; + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetDomainNameRequest { + export function isa(o: any): o is GetDomainNameRequest { + return _smithy.isa(o, "GetDomainNameRequest"); + } +} + +/** + *

+ * Request to describe a collection of + * + * DomainName + * + * resources. + *

+ */ +export interface GetDomainNamesRequest { + __type?: "GetDomainNamesRequest"; + /** + *

+ * The maximum number of returned results per page. The default value is 25 and the maximum value is 500. + *

+ */ + limit?: number; + + name?: string; + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetDomainNamesRequest { + export function isa(o: any): o is GetDomainNamesRequest { + return _smithy.isa(o, "GetDomainNamesRequest"); + } +} + +/** + *

+ * Request a new export of a + * + * RestApi + * + * for a particular + * + * Stage + * + * . + *

+ */ +export interface GetExportRequest { + __type?: "GetExportRequest"; + /** + *

+ * The content-type of the export, for example + * + * application/json + * + * . Currently + * + * application/json + * + * and + * + * application/yaml + * + * are supported for + * + * exportType + * + * of + * + * oas30 + * + * and + * + * swagger + * + * . This should be specified in the + * + * Accept + * + * header for direct API requests. + *

+ */ + accepts?: string; + + /** + *

+ * [Required] The type of export. Acceptable values are 'oas30' for OpenAPI 3.0.x and 'swagger' for Swagger/OpenAPI 2.0. + *

+ */ + exportType: string | undefined; + + /** + *

+ * A key-value map of query string parameters that specify properties of the export, depending on the requested + * + * exportType + * + * . For + * + * exportType + * + * + * oas30 + * + * and + * + * swagger + * + * , any combination of the following parameters are supported: + * + * extensions='integrations' + * + * or + * + * extensions='apigateway' + * + * will export the API with x-amazon-apigateway-integration extensions. + * + * extensions='authorizers' + * + * will export the API with x-amazon-apigateway-authorizer extensions. + * + * postman + * + * will export the API with Postman extensions, allowing for import to the Postman tool + *

+ */ + parameters?: { [key: string]: string }; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + /** + *

+ * [Required] The name of the + * + * Stage + * + * that will be exported. + *

+ */ + stageName: string | undefined; +} + +export namespace GetExportRequest { + export function isa(o: any): o is GetExportRequest { + return _smithy.isa(o, "GetExportRequest"); + } +} + +/** + *

+ * Gets a + * + * GatewayResponse + * + * of a specified response type on the given + * + * RestApi + * + * . + *

+ */ +export interface GetGatewayResponseRequest { + __type?: "GetGatewayResponseRequest"; + name?: string; + /** + *

+ * [Required] + *

+ * The response type of the associated + * + * GatewayResponse + * + * . Valid values are + *

    + *
  • + * ACCESS_DENIED + *
  • + *
  • + * API_CONFIGURATION_ERROR + *
  • + *
  • + * AUTHORIZER_FAILURE + *
  • + *
  • + * AUTHORIZER_CONFIGURATION_ERROR + *
  • + *
  • + * BAD_REQUEST_PARAMETERS + *
  • + *
  • + * BAD_REQUEST_BODY + *
  • + *
  • + * DEFAULT_4XX + *
  • + *
  • + * DEFAULT_5XX + *
  • + *
  • + * EXPIRED_TOKEN + *
  • + *
  • + * INVALID_SIGNATURE + *
  • + *
  • + * INTEGRATION_FAILURE + *
  • + *
  • + * INTEGRATION_TIMEOUT + *
  • + *
  • + * INVALID_API_KEY + *
  • + *
  • + * MISSING_AUTHENTICATION_TOKEN + *
  • + *
  • + * QUOTA_EXCEEDED + *
  • + *
  • + * REQUEST_TOO_LARGE + *
  • + *
  • + * RESOURCE_NOT_FOUND + *
  • + *
  • + * THROTTLED + *
  • + *
  • + * UNAUTHORIZED + *
  • + *
  • + * UNSUPPORTED_MEDIA_TYPE + *
  • + *
+ *

+ *

+ */ + responseType: GatewayResponseType | string | undefined; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetGatewayResponseRequest { + export function isa(o: any): o is GetGatewayResponseRequest { + return _smithy.isa(o, "GetGatewayResponseRequest"); + } +} + +/** + *

+ * Gets the + * + * GatewayResponses + * + * collection on the given + * + * RestApi + * + * . If an API developer has not added any definitions for gateway responses, the result will be the API Gateway-generated default + * + * GatewayResponses + * + * collection for the supported response types. + *

+ */ +export interface GetGatewayResponsesRequest { + __type?: "GetGatewayResponsesRequest"; + /** + *

+ * The maximum number of returned results per page. The default value is 25 and the maximum value is 500. The + * + * GatewayResponses + * + * collection does not support pagination and the limit does not apply here. + *

+ */ + limit?: number; + + name?: string; + /** + *

+ * The current pagination position in the paged result set. The + * + * GatewayResponse + * + * collection does not support pagination and the position does not apply here. + *

+ */ + position?: string; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetGatewayResponsesRequest { + export function isa(o: any): o is GetGatewayResponsesRequest { + return _smithy.isa(o, "GetGatewayResponsesRequest"); + } +} + +/** + *

+ * Represents a request to get the integration configuration. + *

+ */ +export interface GetIntegrationRequest { + __type?: "GetIntegrationRequest"; + /** + *

+ * [Required] Specifies a get integration request's HTTP method. + *

+ */ + httpMethod: string | undefined; + + name?: string; + /** + *

+ * [Required] Specifies a get integration request's resource identifier + *

+ */ + resourceId: string | undefined; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetIntegrationRequest { + export function isa(o: any): o is GetIntegrationRequest { + return _smithy.isa(o, "GetIntegrationRequest"); + } +} + +/** + *

+ * Represents a get integration response request. + *

+ */ +export interface GetIntegrationResponseRequest { + __type?: "GetIntegrationResponseRequest"; + /** + *

+ * [Required] Specifies a get integration response request's HTTP method. + *

+ */ + httpMethod: string | undefined; + + name?: string; + /** + *

+ * [Required] Specifies a get integration response request's resource identifier. + *

+ */ + resourceId: string | undefined; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + /** + *

+ * [Required] Specifies a get integration response request's status code. + *

+ */ + statusCode: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetIntegrationResponseRequest { + export function isa(o: any): o is GetIntegrationResponseRequest { + return _smithy.isa(o, "GetIntegrationResponseRequest"); + } +} + +/** + *

+ * Request to describe an existing + * + * Method + * + * resource. + *

+ */ +export interface GetMethodRequest { + __type?: "GetMethodRequest"; + /** + *

+ * [Required] Specifies the method request's HTTP method type. + *

+ */ + httpMethod: string | undefined; + + name?: string; + /** + *

+ * [Required] The + * + * Resource + * + * identifier for the + * + * Method + * + * resource. + *

+ */ + resourceId: string | undefined; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetMethodRequest { + export function isa(o: any): o is GetMethodRequest { + return _smithy.isa(o, "GetMethodRequest"); + } +} + +/** + *

+ * Request to describe a + * + * MethodResponse + * + * resource. + *

+ */ +export interface GetMethodResponseRequest { + __type?: "GetMethodResponseRequest"; + /** + *

+ * [Required] The HTTP verb of the + * + * Method + * + * resource. + *

+ */ + httpMethod: string | undefined; + + name?: string; + /** + *

+ * [Required] The + * + * Resource + * + * identifier for the + * + * MethodResponse + * + * resource. + *

+ */ + resourceId: string | undefined; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + /** + *

+ * [Required] The status code for the + * + * MethodResponse + * + * resource. + *

+ */ + statusCode: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetMethodResponseRequest { + export function isa(o: any): o is GetMethodResponseRequest { + return _smithy.isa(o, "GetMethodResponseRequest"); + } +} + +/** + *

+ * Request to list information about a model in an existing + * + * RestApi + * + * resource. + *

+ */ +export interface GetModelRequest { + __type?: "GetModelRequest"; + /** + *

+ * A query parameter of a Boolean value to resolve ( + * + * true + * + * ) all external model references and returns a flattened model schema or not ( + * + * false + * + * ) The default is + * + * false + * + * . + *

+ */ + flatten?: boolean; + + /** + *

+ * [Required] The name of the model as an identifier. + *

+ */ + modelName: string | undefined; + + name?: string; + /** + *

+ * [Required] The + * + * RestApi + * + * identifier under which the + * + * Model + * + * exists. + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetModelRequest { + export function isa(o: any): o is GetModelRequest { + return _smithy.isa(o, "GetModelRequest"); + } +} + +/** + *

+ * Request to generate a sample mapping template used to transform the payload. + *

+ */ +export interface GetModelTemplateRequest { + __type?: "GetModelTemplateRequest"; + /** + *

+ * [Required] The name of the model for which to generate a template. + *

+ */ + modelName: string | undefined; + + name?: string; + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetModelTemplateRequest { + export function isa(o: any): o is GetModelTemplateRequest { + return _smithy.isa(o, "GetModelTemplateRequest"); + } +} + +/** + *

+ * Request to list existing + * + * Models + * + * defined for a + * + * RestApi + * + * resource. + *

+ */ +export interface GetModelsRequest { + __type?: "GetModelsRequest"; + /** + *

+ * The maximum number of returned results per page. The default value is 25 and the maximum value is 500. + *

+ */ + limit?: number; + + name?: string; + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetModelsRequest { + export function isa(o: any): o is GetModelsRequest { + return _smithy.isa(o, "GetModelsRequest"); + } +} + +/** + *

+ * Gets a + * + * RequestValidator + * + * of a given + * + * RestApi + * + * . + *

+ */ +export interface GetRequestValidatorRequest { + __type?: "GetRequestValidatorRequest"; + name?: string; + /** + *

+ * [Required] The identifier of the + * + * RequestValidator + * + * to be retrieved. + *

+ */ + requestValidatorId: string | undefined; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetRequestValidatorRequest { + export function isa(o: any): o is GetRequestValidatorRequest { + return _smithy.isa(o, "GetRequestValidatorRequest"); + } +} + +/** + *

+ * Gets the + * + * RequestValidators + * + * collection of a given + * + * RestApi + * + * . + *

+ */ +export interface GetRequestValidatorsRequest { + __type?: "GetRequestValidatorsRequest"; + /** + *

+ * The maximum number of returned results per page. The default value is 25 and the maximum value is 500. + *

+ */ + limit?: number; + + name?: string; + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetRequestValidatorsRequest { + export function isa(o: any): o is GetRequestValidatorsRequest { + return _smithy.isa(o, "GetRequestValidatorsRequest"); + } +} + +/** + *

+ * Request to list information about a resource. + *

+ */ +export interface GetResourceRequest { + __type?: "GetResourceRequest"; + /** + *

+ * A query parameter to retrieve the specified resources embedded in the returned + * + * Resource + * + * representation in the response. This + * + * embed + * + * parameter value is a list of comma-separated strings. Currently, the request supports only retrieval of the embedded + * + * Method + * + * resources this way. The query parameter value must be a single-valued list and contain the + * + * "methods" + * + * string. For example, + * + * GET /restapis/{restapi_id}/resources/{resource_id}?embed=methods + * + * . + *

+ */ + embed?: Array; + + name?: string; + /** + *

+ * [Required] The identifier for the + * + * Resource + * + * resource. + *

+ */ + resourceId: string | undefined; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetResourceRequest { + export function isa(o: any): o is GetResourceRequest { + return _smithy.isa(o, "GetResourceRequest"); + } +} + +/** + *

+ * Request to list information about a collection of resources. + *

+ */ +export interface GetResourcesRequest { + __type?: "GetResourcesRequest"; + /** + *

+ * A query parameter used to retrieve the specified resources embedded in the returned + * + * Resources + * + * resource in the response. This + * + * embed + * + * parameter value is a list of comma-separated strings. Currently, the request supports only retrieval of the embedded + * + * Method + * + * resources this way. The query parameter value must be a single-valued list and contain the + * + * "methods" + * + * string. For example, + * + * GET /restapis/{restapi_id}/resources?embed=methods + * + * . + *

+ */ + embed?: Array; + + /** + *

+ * The maximum number of returned results per page. The default value is 25 and the maximum value is 500. + *

+ */ + limit?: number; + + name?: string; + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetResourcesRequest { + export function isa(o: any): o is GetResourcesRequest { + return _smithy.isa(o, "GetResourcesRequest"); + } +} + +/** + *

+ * The GET request to list an existing + * + * RestApi + * + * defined for your collection. + *

+ */ +export interface GetRestApiRequest { + __type?: "GetRestApiRequest"; + name?: string; + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetRestApiRequest { + export function isa(o: any): o is GetRestApiRequest { + return _smithy.isa(o, "GetRestApiRequest"); + } +} + +/** + *

+ * The GET request to list existing + * + * RestApis + * + * defined for your collection. + *

+ */ +export interface GetRestApisRequest { + __type?: "GetRestApisRequest"; + /** + *

+ * The maximum number of returned results per page. The default value is 25 and the maximum value is 500. + *

+ */ + limit?: number; + + name?: string; + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetRestApisRequest { + export function isa(o: any): o is GetRestApisRequest { + return _smithy.isa(o, "GetRestApisRequest"); + } +} + +/** + *

+ * Request a new generated client SDK for a + * + * RestApi + * + * and + * + * Stage + * + * . + *

+ */ +export interface GetSdkRequest { + __type?: "GetSdkRequest"; + /** + *

+ * A string-to-string key-value map of query parameters + * + * sdkType + * + * -dependent properties of the SDK. For + * + * sdkType + * + * of + * + * objectivec + * + * or + * + * swift + * + * , a parameter named + * + * classPrefix + * + * is required. For + * + * sdkType + * + * of + * + * android + * + * , parameters named + * + * groupId + * + * , + * + * artifactId + * + * , + * + * artifactVersion + * + * , and + * + * invokerPackage + * + * are required. For + * + * sdkType + * + * of + * + * java + * + * , parameters named + * + * serviceName + * + * and + * + * javaPackageName + * + * are required. + *

+ */ + parameters?: { [key: string]: string }; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + /** + *

+ * [Required] The language for the generated SDK. Currently + * + * java + * + * , + * + * javascript + * + * , + * + * android + * + * , + * + * objectivec + * + * (for iOS), + * + * swift + * + * (for iOS), and + * + * ruby + * + * are supported. + *

+ */ + sdkType: string | undefined; + + /** + *

+ * [Required] The name of the + * + * Stage + * + * that the SDK will use. + *

+ */ + stageName: string | undefined; +} + +export namespace GetSdkRequest { + export function isa(o: any): o is GetSdkRequest { + return _smithy.isa(o, "GetSdkRequest"); + } +} + +/** + *

+ * Get an + * + * SdkType + * + * instance. + *

+ */ +export interface GetSdkTypeRequest { + __type?: "GetSdkTypeRequest"; + /** + *

+ * [Required] The identifier of the queried + * + * SdkType + * + * instance. + *

+ */ + id: string | undefined; + + name?: string; + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetSdkTypeRequest { + export function isa(o: any): o is GetSdkTypeRequest { + return _smithy.isa(o, "GetSdkTypeRequest"); + } +} + +/** + *

+ * Get the + * + * SdkTypes + * + * collection. + *

+ */ +export interface GetSdkTypesRequest { + __type?: "GetSdkTypesRequest"; + /** + *

+ * The maximum number of returned results per page. The default value is 25 and the maximum value is 500. + *

+ */ + limit?: number; + + name?: string; + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetSdkTypesRequest { + export function isa(o: any): o is GetSdkTypesRequest { + return _smithy.isa(o, "GetSdkTypesRequest"); + } +} + +/** + *

+ * Requests API Gateway to get information about a + * + * Stage + * + * resource. + *

+ */ +export interface GetStageRequest { + __type?: "GetStageRequest"; + name?: string; + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + /** + *

+ * [Required] The name of the + * + * Stage + * + * resource to get information about. + *

+ */ + stageName: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetStageRequest { + export function isa(o: any): o is GetStageRequest { + return _smithy.isa(o, "GetStageRequest"); + } +} + +/** + *

+ * Requests API Gateway to get information about one or more + * + * Stage + * + * resources. + *

+ */ +export interface GetStagesRequest { + __type?: "GetStagesRequest"; + /** + *

+ * The stages' deployment identifiers. + *

+ */ + deploymentId?: string; + + name?: string; + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetStagesRequest { + export function isa(o: any): o is GetStagesRequest { + return _smithy.isa(o, "GetStagesRequest"); + } +} + +/** + *

+ * Gets the + * + * Tags + * + * collection for a given resource. + *

+ */ +export interface GetTagsRequest { + __type?: "GetTagsRequest"; + /** + *

+ * (Not currently supported) The maximum number of returned results per page. The default value is 25 and the maximum value is 500. + *

+ */ + limit?: number; + + name?: string; + /** + *

+ * (Not currently supported) The current pagination position in the paged result set. + *

+ */ + position?: string; + + /** + *

+ * [Required] The ARN of a resource that can be tagged. The resource ARN must be URL-encoded. + *

+ */ + resourceArn: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetTagsRequest { + export function isa(o: any): o is GetTagsRequest { + return _smithy.isa(o, "GetTagsRequest"); + } +} + +/** + *

+ * The GET request to get a usage plan key of a given key identifier. + *

+ */ +export interface GetUsagePlanKeyRequest { + __type?: "GetUsagePlanKeyRequest"; + /** + *

+ * [Required] The key Id of the to-be-retrieved + * + * UsagePlanKey + * + * resource representing a plan customer. + *

+ */ + keyId: string | undefined; + + name?: string; + template?: boolean; + templateSkipList?: Array; + title?: string; + /** + *

+ * [Required] The Id of the + * + * UsagePlan + * + * resource representing the usage plan containing the to-be-retrieved + * + * UsagePlanKey + * + * resource representing a plan customer. + *

+ */ + usagePlanId: string | undefined; +} + +export namespace GetUsagePlanKeyRequest { + export function isa(o: any): o is GetUsagePlanKeyRequest { + return _smithy.isa(o, "GetUsagePlanKeyRequest"); + } +} + +/** + *

+ * The GET request to get all the usage plan keys representing the API keys added to a specified usage plan. + *

+ */ +export interface GetUsagePlanKeysRequest { + __type?: "GetUsagePlanKeysRequest"; + /** + *

+ * The maximum number of returned results per page. The default value is 25 and the maximum value is 500. + *

+ */ + limit?: number; + + name?: string; + /** + *

+ * A query parameter specifying the name of the to-be-returned usage plan keys. + *

+ */ + nameQuery?: string; + + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; + + template?: boolean; + templateSkipList?: Array; + title?: string; + /** + *

+ * [Required] The Id of the + * + * UsagePlan + * + * resource representing the usage plan containing the to-be-retrieved + * + * UsagePlanKey + * + * resource representing a plan customer. + *

+ */ + usagePlanId: string | undefined; +} + +export namespace GetUsagePlanKeysRequest { + export function isa(o: any): o is GetUsagePlanKeysRequest { + return _smithy.isa(o, "GetUsagePlanKeysRequest"); + } +} + +/** + *

+ * The GET request to get a usage plan of a given plan identifier. + *

+ */ +export interface GetUsagePlanRequest { + __type?: "GetUsagePlanRequest"; + name?: string; + template?: boolean; + templateSkipList?: Array; + title?: string; + /** + *

+ * [Required] The identifier of the + * + * UsagePlan + * + * resource to be retrieved. + *

+ */ + usagePlanId: string | undefined; +} + +export namespace GetUsagePlanRequest { + export function isa(o: any): o is GetUsagePlanRequest { + return _smithy.isa(o, "GetUsagePlanRequest"); + } +} + +/** + *

+ * The GET request to get all the usage plans of the caller's account. + *

+ */ +export interface GetUsagePlansRequest { + __type?: "GetUsagePlansRequest"; + /** + *

+ * The identifier of the API key associated with the usage plans. + *

+ */ + keyId?: string; + + /** + *

+ * The maximum number of returned results per page. The default value is 25 and the maximum value is 500. + *

+ */ + limit?: number; + + name?: string; + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetUsagePlansRequest { + export function isa(o: any): o is GetUsagePlansRequest { + return _smithy.isa(o, "GetUsagePlansRequest"); + } +} + +/** + *

+ * The GET request to get the usage data of a usage plan in a specified time interval. + *

+ */ +export interface GetUsageRequest { + __type?: "GetUsageRequest"; + /** + *

+ * [Required] The ending date (e.g., 2016-12-31) of the usage data. + *

+ */ + endDate: string | undefined; + + /** + *

+ * The Id of the API key associated with the resultant usage data. + *

+ */ + keyId?: string; + + /** + *

+ * The maximum number of returned results per page. The default value is 25 and the maximum value is 500. + *

+ */ + limit?: number; + + name?: string; + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; + + /** + *

+ * [Required] The starting date (e.g., 2016-01-01) of the usage data. + *

+ */ + startDate: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; + /** + *

+ * [Required] The Id of the usage plan associated with the usage data. + *

+ */ + usagePlanId: string | undefined; +} + +export namespace GetUsageRequest { + export function isa(o: any): o is GetUsageRequest { + return _smithy.isa(o, "GetUsageRequest"); + } +} + +/** + *

+ * Gets a specified VPC link under the caller's account in a region. + *

+ */ +export interface GetVpcLinkRequest { + __type?: "GetVpcLinkRequest"; + name?: string; + template?: boolean; + templateSkipList?: Array; + title?: string; + /** + *

+ * [Required] The identifier of the + * + * VpcLink + * + * . It is used in an + * + * Integration + * + * to reference this + * + * VpcLink + * + * . + *

+ */ + vpcLinkId: string | undefined; +} + +export namespace GetVpcLinkRequest { + export function isa(o: any): o is GetVpcLinkRequest { + return _smithy.isa(o, "GetVpcLinkRequest"); + } +} + +/** + *

+ * Gets the + * + * VpcLinks + * + * collection under the caller's account in a selected region. + *

+ */ +export interface GetVpcLinksRequest { + __type?: "GetVpcLinksRequest"; + /** + *

+ * The maximum number of returned results per page. The default value is 25 and the maximum value is 500. + *

+ */ + limit?: number; + + name?: string; + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace GetVpcLinksRequest { + export function isa(o: any): o is GetVpcLinksRequest { + return _smithy.isa(o, "GetVpcLinksRequest"); + } +} + +/** + *

+ * The POST request to import API keys from an external source, such as a CSV-formatted file. + *

+ */ +export interface ImportApiKeysRequest { + __type?: "ImportApiKeysRequest"; + /** + *

+ * A query parameter to indicate whether to rollback + * + * ApiKey + * + * importation ( + * + * true + * + * ) or not ( + * + * false + * + * ) when error is encountered. + *

+ */ + failOnWarnings?: boolean; + + /** + *

+ * A query parameter to specify the input format to imported API keys. Currently, only the + * + * csv + * + * format is supported. + *

+ */ + format: ApiKeysFormat | string | undefined; + + name?: string; + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace ImportApiKeysRequest { + export function isa(o: any): o is ImportApiKeysRequest { + return _smithy.isa(o, "ImportApiKeysRequest"); + } +} + +/** + *

+ * Import documentation parts from an external (e.g., OpenAPI) definition file. + *

+ */ +export interface ImportDocumentationPartsRequest { + __type?: "ImportDocumentationPartsRequest"; + /** + *

+ * A query parameter to specify whether to rollback the documentation importation ( + * + * true + * + * ) or not ( + * + * false + * + * ) when a warning is encountered. The default value is + * + * false + * + * . + *

+ */ + failOnWarnings?: boolean; + + /** + *

+ * A query parameter to indicate whether to overwrite ( + * + * OVERWRITE + * + * ) any existing + * + * DocumentationParts + * + * definition or to merge ( + * + * MERGE + * + * ) the new definition into the existing one. The default value is + * + * MERGE + * + * . + *

+ */ + mode?: PutMode | string; + + name?: string; + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace ImportDocumentationPartsRequest { + export function isa(o: any): o is ImportDocumentationPartsRequest { + return _smithy.isa(o, "ImportDocumentationPartsRequest"); + } +} + +/** + *

+ * A POST request to import an API to API Gateway using an input of an API definition file. + *

+ */ +export interface ImportRestApiRequest { + __type?: "ImportRestApiRequest"; + /** + *

+ * A query parameter to indicate whether to rollback the API creation ( + * + * true + * + * ) or not ( + * + * false + * + * ) + * when a warning is encountered. The default value is + * + * false + * + * . + *

+ */ + failOnWarnings?: boolean; + + name?: string; + /** + *

+ * A key-value map of context-specific query string parameters specifying the behavior of different API importing operations. The following shows operation-specific parameters and their supported values. + *

+ *

+ * To exclude + * + * DocumentationParts + * + * from the import, set + * + * parameters + * + * as + * + * ignore=documentation + * + * . + *

+ *

+ * To configure the endpoint type, set + * + * parameters + * + * as + * + * endpointConfigurationTypes=EDGE + * + * , + * + * endpointConfigurationTypes=REGIONAL + * + * , or + * + * endpointConfigurationTypes=PRIVATE + * + * . The default endpoint type is + * + * EDGE + * + * . + *

+ *

+ * To handle imported + * + * basepath + * + * , set + * + * parameters + * + * as + * + * basepath=ignore + * + * , + * + * basepath=prepend + * + * or + * + * basepath=split + * + * . + *

+ *

+ * For example, the AWS CLI command to exclude documentation from the imported API is: + *

+ *
aws apigateway import-rest-api --parameters ignore=documentation --body 'file:///path/to/imported-api-body.json'
+ *

+ * The AWS CLI command to set the regional endpoint on the imported API is: + *

+ *
aws apigateway import-rest-api --parameters endpointConfigurationTypes=REGIONAL --body 'file:///path/to/imported-api-body.json'
+ */ + parameters?: { [key: string]: string }; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace ImportRestApiRequest { + export function isa(o: any): o is ImportRestApiRequest { + return _smithy.isa(o, "ImportRestApiRequest"); + } +} + +/** + *

+ * Represents an HTTP, HTTP_PROXY, AWS, AWS_PROXY, or Mock integration. + *

+ *
+ * In the API Gateway console, the built-in Lambda integration is an AWS integration. + *
+ * + */ +export interface Integration extends $MetadataBearer { + __type?: "Integration"; + /** + *

+ * A list of request parameters whose values API Gateway caches. To be valid values for + * + * cacheKeyParameters + * + * , these parameters must also be specified for + * + * Method + * + * + * requestParameters + * + * . + *

+ */ + cacheKeyParameters?: Array; + + /** + *

+ * An API-specific tag group of related cached parameters. To be valid values for + * + * cacheKeyParameters + * + * , these parameters must also be specified for + * + * Method + * + * + * requestParameters + * + * . + *

+ */ + cacheNamespace?: string; + + /** + *

+ * The ( + * + * + * id + * + * + * ) of the + * + * VpcLink + * + * used for the integration when + * + * connectionType=VPC_LINK + * + * and undefined, otherwise. + *

+ */ + connectionId?: string; + + /** + *

+ * The type of the network connection to the integration endpoint. The valid value is + * + * INTERNET + * + * for connections through the public routable internet or + * + * VPC_LINK + * + * for private connections between API Gateway and a network load balancer in a VPC. The default value is + * + * INTERNET + * + * . + *

+ */ + connectionType?: ConnectionType | string; + + /** + *

+ * Specifies how to handle request payload content type conversions. Supported values are + * + * CONVERT_TO_BINARY + * + * and + * + * CONVERT_TO_TEXT + * + * , with the following behaviors: + *

+ *
    + *
  • + *

    + * + * CONVERT_TO_BINARY + * + * : Converts a request payload from a Base64-encoded string to the corresponding binary blob. + *

    + *
  • + *
  • + *

    + * + * CONVERT_TO_TEXT + * + * : Converts a request payload from a binary blob to a Base64-encoded string. + *

    + *
  • + *
+ *

+ * If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the + * + * passthroughBehavior + * + * is configured to support payload pass-through. + *

+ */ + contentHandling?: ContentHandlingStrategy | string; + + /** + *

+ * Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string + * + * arn:aws:iam::\*:user/\* + * + * . To use resource-based permissions on supported AWS services, specify null. + *

+ */ + credentials?: string; + + /** + *

+ * Specifies the integration's HTTP method type. + *

+ */ + httpMethod?: string; + + /** + *

+ * Specifies the integration's responses. + *

+ *
+ *

+ *

+ *

+ * Example: Get integration responses of a method + *

+ *
+ * Request + *
+ *

+ *

+ *
GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200 HTTP/1.1
+   * Content-Type: application/json
+   * Host: apigateway.us-east-1.amazonaws.com
+   * X-Amz-Date: 20160607T191449Z
+   * Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160607/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
+   * 
+ *
+ * Response + *
+ *

+ * The successful response returns + * + * 200 OK + * + * status and a payload as follows: + *

+ *
{
+   *   "_links": {
+   *     "curies": {
+   *       "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html",
+   *       "name": "integrationresponse",
+   *       "templated": true
+   *     },
+   *     "self": {
+   *       "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200",
+   *       "title": "200"
+   *     },
+   *     "integrationresponse:delete": {
+   *       "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200"
+   *     },
+   *     "integrationresponse:update": {
+   *       "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200"
+   *     }
+   *   },
+   *   "responseParameters": {
+   *     "method.response.header.Content-Type": "'application/xml'"
+   *   },
+   *   "responseTemplates": {
+   *     "application/json": "$util.urlDecode(\"%3CkinesisStreams%3E#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n"
+   *   },
+   *   "statusCode": "200"
+   * }
+ *

+ *

+ *
+ * + */ + integrationResponses?: { [key: string]: IntegrationResponse }; + + /** + *
+ *

+ * Specifies how the method request body of an unmapped content type will be passed through the integration request + * to the back end without transformation. A content type is unmapped if no mapping template is defined in the integration + * or the content type does not match any of the mapped content types, as specified in + * + * requestTemplates + * + * . + * The valid value is one of the following: + *

+ *
    + *
  • + * + * WHEN_NO_MATCH + * + * : passes the method request body through the integration request to the back end without transformation + * when the method request content type does not match any content type associated with the mapping templates defined in the integration request. + *
  • + *
  • + * + * WHEN_NO_TEMPLATES + * + * : passes the method request body through the integration request to the back end without transformation + * when no mapping template is defined in the integration request. If a template is defined when this option is selected, the method request + * of an unmapped content-type will be rejected with an HTTP + * + * 415 Unsupported Media Type + * + * response. + *
  • + *
  • + * + * NEVER + * + * : rejects the method request with an HTTP + * + * 415 Unsupported Media Type + * + * response when either the method + * request content type does not match any content type associated with the mapping templates defined in the integration request or + * no mapping template is defined in the integration request. + *
  • + *
+ *
+ */ + passthroughBehavior?: string; + + /** + *

+ * A key-value map specifying request parameters that are passed from the method request to the back end. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the back end. The method request parameter value must match the pattern of + * + * method.request.{location}.{name} + * + * , where + * + * location + * + * is + * + * querystring + * + * , + * + * path + * + * , or + * + * header + * + * and + * + * name + * + * must be a valid and unique method request parameter name. + *

+ */ + requestParameters?: { [key: string]: string }; + + /** + *

+ * Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value. + *

+ */ + requestTemplates?: { [key: string]: string }; + + /** + *

+ * Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds. + *

+ */ + timeoutInMillis?: number; + + /** + *

+ * Specifies an API method integration type. The valid value is one of the following: + *

+ *
    + *
  • + * + * AWS + * + * : for integrating the API method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration. + *
  • + *
  • + * + * AWS_PROXY + * + * : for integrating the API method request with the Lambda function-invoking action with the client request passed through as-is. This integration is also referred to as the Lambda proxy integration. + *
  • + *
  • + * + * HTTP + * + * : for integrating the API method request with an HTTP endpoint, including a private HTTP endpoint within a VPC. This integration is also referred to as the HTTP custom integration. + *
  • + *
  • + * + * HTTP_PROXY + * + * : for integrating the API method request with an HTTP endpoint, including a private HTTP endpoint within a VPC, with the client request passed through as-is. This is also referred to as the HTTP proxy integration. + *
  • + *
  • + * + * MOCK + * + * : for integrating the API method request with API Gateway as a "loop-back" endpoint without invoking any backend. + *
  • + *
+ *

+ * For the HTTP and HTTP proxy integrations, each integration can specify a protocol ( + * + * http/https + * + * ), port and path. Standard 80 and 443 ports are supported as well as custom ports above 1024. An HTTP or HTTP proxy integration with a + * + * connectionType + * + * of + * + * VPC_LINK + * + * is referred to as a private integration and uses a + * + * VpcLink + * + * to connect API Gateway to a network load balancer of a VPC. + *

+ */ + type?: IntegrationType | string; + + /** + *

+ * Specifies Uniform Resource Identifier (URI) of the integration endpoint. + *

+ *
    + *
  • + *

    + * For + * + * HTTP + * + * or + * + * HTTP_PROXY + * + * integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the + * + * RFC-3986 specification + * + * , for either standard integration, where + * + * connectionType + * + * is not + * + * VPC_LINK + * + * , or private integration, where + * + * connectionType + * + * is + * + * VPC_LINK + * + * . For a private HTTP integration, the URI is not used for routing. + *

    + *
  • + *
  • + *

    + * For + * + * AWS + * + * or + * + * AWS_PROXY + * + * integrations, the URI is of the form + * + * arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api} + * + * . Here, + * + * {Region} + * + * is the API Gateway region (e.g., + * + * us-east-1 + * + * ); + * + * {service} + * + * is the name of the integrated AWS service (e.g., + * + * s3 + * + * ); and + * + * {subdomain} + * + * is a designated subdomain supported by certain AWS service for fast host-name lookup. + * + * action + * + * can be used for an AWS service action-based API, using an + * + * Action={name}&{p1}={v1}&p2={v2}... + * + * query string. The ensuing + * + * {service_api} + * + * refers to a supported action + * + * {name} + * + * plus any required input parameters. Alternatively, + * + * path + * + * can be used for an AWS service path-based API. The ensuing + * + * service_api + * + * refers to the path to an AWS service resource, including the region of the integrated AWS service, if applicable. For example, for integration with the S3 API of + * + * + * GetObject + * + * + * , the + * + * uri + * + * can be either + * + * arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key} + * + * or + * + * arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key} + * + *

    + *
  • + *
+ */ + uri?: string; +} + +export namespace Integration { + export function isa(o: any): o is Integration { + return _smithy.isa(o, "Integration"); + } +} + +/** + *

+ * Represents an integration response. The status code must map to an existing + * + * MethodResponse + * + * , and parameters and templates can be used to transform the back-end response. + *

+ * + */ +export interface IntegrationResponse extends $MetadataBearer { + __type?: "IntegrationResponse"; + /** + *

+ * Specifies how to handle response payload content type conversions. Supported values are + * + * CONVERT_TO_BINARY + * + * and + * + * CONVERT_TO_TEXT + * + * , with the following behaviors: + *

+ *
    + *
  • + *

    + * + * CONVERT_TO_BINARY + * + * : Converts a response payload from a Base64-encoded string to the corresponding binary blob. + *

    + *
  • + *
  • + *

    + * + * CONVERT_TO_TEXT + * + * : Converts a response payload from a binary blob to a Base64-encoded string. + *

    + *
  • + *
+ *

+ * If this property is not defined, the response payload will be passed through from the integration response to the method response without modification. + *

+ */ + contentHandling?: ContentHandlingStrategy | string; + + /** + *

+ * A key-value map specifying response parameters that are passed to the method response from the back end. + * The key is a method response header parameter name and the mapped value is an integration response header value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The mapping key must match the pattern of + * + * method.response.header.{name} + * + * , where + * + * name + * + * is a valid and unique header name. The mapped non-static value must match the pattern of + * + * integration.response.header.{name} + * + * or + * + * integration.response.body.{JSON-expression} + * + * , where + * + * name + * + * is a valid and unique response header name and + * + * JSON-expression + * + * is a valid JSON expression without the + * + * $ + * + * prefix. + *

+ */ + responseParameters?: { [key: string]: string }; + + /** + *

+ * Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value. + *

+ */ + responseTemplates?: { [key: string]: string }; + + /** + *

+ * Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the back end. For example, if the success response returns nothing and the error response returns some string, you could use the + * + * .+ + * + * regex to match error response. However, make sure that the error response does not contain any newline ( + * + * \n + * + * ) character in such cases. If the back end is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS back ends, the HTTP status code is matched. + *

+ */ + selectionPattern?: string; + + /** + *

+ * Specifies the status code that is used to map the integration response to an existing + * + * MethodResponse + * + * . + *

+ */ + statusCode?: string; +} + +export namespace IntegrationResponse { + export function isa(o: any): o is IntegrationResponse { + return _smithy.isa(o, "IntegrationResponse"); + } +} + +export enum IntegrationType { + AWS = "AWS", + AWS_PROXY = "AWS_PROXY", + HTTP = "HTTP", + HTTP_PROXY = "HTTP_PROXY", + MOCK = "MOCK", +} + +export enum LocationStatusType { + DOCUMENTED = "DOCUMENTED", + UNDOCUMENTED = "UNDOCUMENTED", +} + +/** + *

+ * Represents a client-facing interface by which the client calls the API to access back-end resources. A + * + * Method + * + * resource is + * integrated with an + * + * Integration + * + * resource. Both consist of a request and one or more responses. The method request takes + * the client input that is passed to the back end through the integration request. A method response returns the output from + * the back end to the client through an integration response. A method request is embodied in a + * + * Method + * + * resource, whereas + * an integration request is embodied in an + * + * Integration + * + * resource. On the other hand, a method response is represented + * by a + * + * MethodResponse + * + * resource, whereas an integration response is represented by an + * + * IntegrationResponse + * + * resource. + *

+ *
+ *

+ *

+ *

+ * Example: Retrive the GET method on a specified resource + *

+ *
+ * Request + *
+ *

+ * The following example request retrieves the information about the GET method on an API resource ( + * + * 3kzxbg5sa2 + * + * ) of an API ( + * + * fugvjdxtri + * + * ). + *

+ *
GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET HTTP/1.1
+ * Content-Type: application/json
+ * Host: apigateway.us-east-1.amazonaws.com
+ * X-Amz-Date: 20160603T210259Z
+ * Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160603/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
+ *
+ * Response + *
+ *

+ * The successful response returns a + * + * 200 OK + * + * status code and a payload similar to the following: + *

+ *
{
+ *   "_links": {
+ *     "curies": [
+ *       {
+ *         "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html",
+ *         "name": "integration",
+ *         "templated": true
+ *       },
+ *       {
+ *         "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html",
+ *         "name": "integrationresponse",
+ *         "templated": true
+ *       },
+ *       {
+ *         "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-{rel}.html",
+ *         "name": "method",
+ *         "templated": true
+ *       },
+ *       {
+ *         "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html",
+ *         "name": "methodresponse",
+ *         "templated": true
+ *       }
+ *     ],
+ *     "self": {
+ *       "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET",
+ *       "name": "GET",
+ *       "title": "GET"
+ *     },
+ *     "integration:put": {
+ *       "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration"
+ *     },
+ *     "method:delete": {
+ *       "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET"
+ *     },
+ *     "method:integration": {
+ *       "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration"
+ *     },
+ *     "method:responses": {
+ *       "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200",
+ *       "name": "200",
+ *       "title": "200"
+ *     },
+ *     "method:update": {
+ *       "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET"
+ *     },
+ *     "methodresponse:put": {
+ *       "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/{status_code}",
+ *       "templated": true
+ *     }
+ *   },
+ *   "apiKeyRequired": true,
+ *   "authorizationType": "NONE",
+ *   "httpMethod": "GET",
+ *   "_embedded": {
+ *     "method:integration": {
+ *       "_links": {
+ *         "self": {
+ *           "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration"
+ *         },
+ *         "integration:delete": {
+ *           "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration"
+ *         },
+ *         "integration:responses": {
+ *           "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200",
+ *           "name": "200",
+ *           "title": "200"
+ *         },
+ *         "integration:update": {
+ *           "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration"
+ *         },
+ *         "integrationresponse:put": {
+ *           "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/{status_code}",
+ *           "templated": true
+ *         }
+ *       },
+ *       "cacheKeyParameters": [],
+ *       "cacheNamespace": "3kzxbg5sa2",
+ *       "credentials": "arn:aws:iam::123456789012:role/apigAwsProxyRole",
+ *       "httpMethod": "POST",
+ *       "passthroughBehavior": "WHEN_NO_MATCH",
+ *       "requestParameters": {
+ *         "integration.request.header.Content-Type": "'application/x-amz-json-1.1'"
+ *       },
+ *       "requestTemplates": {
+ *         "application/json": "{\n}"
+ *       },
+ *       "type": "AWS",
+ *       "uri": "arn:aws:apigateway:us-east-1:kinesis:action/ListStreams",
+ *       "_embedded": {
+ *         "integration:responses": {
+ *           "_links": {
+ *             "self": {
+ *               "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200",
+ *               "name": "200",
+ *               "title": "200"
+ *             },
+ *             "integrationresponse:delete": {
+ *               "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200"
+ *             },
+ *             "integrationresponse:update": {
+ *               "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200"
+ *             }
+ *           },
+ *           "responseParameters": {
+ *             "method.response.header.Content-Type": "'application/xml'"
+ *           },
+ *           "responseTemplates": {
+ *             "application/json": "$util.urlDecode(\"%3CkinesisStreams%3E%23foreach(%24stream%20in%20%24input.path(%27%24.StreamNames%27))%3Cstream%3E%3Cname%3E%24stream%3C%2Fname%3E%3C%2Fstream%3E%23end%3C%2FkinesisStreams%3E\")"
+ *           },
+ *           "statusCode": "200"
+ *         }
+ *       }
+ *     },
+ *     "method:responses": {
+ *       "_links": {
+ *         "self": {
+ *           "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200",
+ *           "name": "200",
+ *           "title": "200"
+ *         },
+ *         "methodresponse:delete": {
+ *           "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200"
+ *         },
+ *         "methodresponse:update": {
+ *           "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200"
+ *         }
+ *       },
+ *       "responseModels": {
+ *         "application/json": "Empty"
+ *       },
+ *       "responseParameters": {
+ *         "method.response.header.Content-Type": false
+ *       },
+ *       "statusCode": "200"
+ *     }
+ *   }
+ * }
+ *

+ * In the example above, the response template for the + * + * 200 OK + * + * response maps the JSON output from the + * + * ListStreams + * + * action in the back end to an XML output. The mapping template is URL-encoded as + * + * %3CkinesisStreams%3E%23foreach(%24stream%20in%20%24input.path(%27%24.StreamNames%27))%3Cstream%3E%3Cname%3E%24stream%3C%2Fname%3E%3C%2Fstream%3E%23end%3C%2FkinesisStreams%3E + * + * and the output is decoded using the + * + * $util.urlDecode() + * + * helper function. + *

+ *
+ * + */ +export interface Method extends $MetadataBearer { + __type?: "Method"; + /** + *

+ * A boolean flag specifying whether a valid + * + * ApiKey + * + * is required to invoke this method. + *

+ */ + apiKeyRequired?: boolean; + + /** + *

+ * A list of authorization scopes configured on the method. The scopes are used with a + * + * COGNITO_USER_POOLS + * + * authorizer to authorize the method invocation. The authorization works by matching the method scopes against the scopes parsed from the access token in the incoming request. The method invocation is authorized if any method scopes matches a claimed scope in the access token. Otherwise, the invocation is not authorized. When the method scope is configured, the client must provide an access token instead of an identity token for authorization purposes. + *

+ */ + authorizationScopes?: Array; + + /** + *

+ * The method's authorization type. Valid values are + * + * NONE + * + * for open access, + * + * AWS_IAM + * + * for using AWS IAM permissions, + * + * CUSTOM + * + * for using a custom authorizer, or + * + * COGNITO_USER_POOLS + * + * for using a Cognito user pool. + *

+ */ + authorizationType?: string; + + /** + *

+ * The identifier of an + * + * Authorizer + * + * to use on this method. The + * + * authorizationType + * + * must be + * + * CUSTOM + * + * . + *

+ */ + authorizerId?: string; + + /** + *

+ * The method's HTTP verb. + *

+ */ + httpMethod?: string; + + /** + *

+ * Gets the method's integration responsible for passing the client-submitted request to the back end and performing necessary transformations to make the request compliant with the back end. + *

+ *
+ *

+ *

+ *

+ * Example: + *

+ *
+ * Request + *
+ *

+ *

+ *
GET /restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration HTTP/1.1
+   * Content-Type: application/json
+   * Host: apigateway.us-east-1.amazonaws.com
+   * Content-Length: 117
+   * X-Amz-Date: 20160613T213210Z
+   * Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160613/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
+ *
+ * Response + *
+ *

+ * The successful response returns a + * + * 200 OK + * + * status code and a payload similar to the following: + *

+ *
{
+   *   "_links": {
+   *     "curies": [
+   *       {
+   *         "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html",
+   *         "name": "integration",
+   *         "templated": true
+   *       },
+   *       {
+   *         "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html",
+   *         "name": "integrationresponse",
+   *         "templated": true
+   *       }
+   *     ],
+   *     "self": {
+   *       "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration"
+   *     },
+   *     "integration:delete": {
+   *       "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration"
+   *     },
+   *     "integration:responses": {
+   *       "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200",
+   *       "name": "200",
+   *       "title": "200"
+   *     },
+   *     "integration:update": {
+   *       "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration"
+   *     },
+   *     "integrationresponse:put": {
+   *       "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/{status_code}",
+   *       "templated": true
+   *     }
+   *   },
+   *   "cacheKeyParameters": [],
+   *   "cacheNamespace": "0cjtch",
+   *   "credentials": "arn:aws:iam::123456789012:role/apigAwsProxyRole",
+   *   "httpMethod": "POST",
+   *   "passthroughBehavior": "WHEN_NO_MATCH",
+   *   "requestTemplates": {
+   *     "application/json": "{\n    \"a\":  \"$input.params('operand1')\",\n    \"b\":  \"$input.params('operand2')\", \n    \"op\": \"$input.params('operator')\"   \n}"
+   *   },
+   *   "type": "AWS",
+   *   "uri": "arn:aws:apigateway:us-west-2:lambda:path//2015-03-31/functions/arn:aws:lambda:us-west-2:123456789012:function:Calc/invocations",
+   *   "_embedded": {
+   *     "integration:responses": {
+   *       "_links": {
+   *         "self": {
+   *           "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200",
+   *           "name": "200",
+   *           "title": "200"
+   *         },
+   *         "integrationresponse:delete": {
+   *           "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200"
+   *         },
+   *         "integrationresponse:update": {
+   *           "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200"
+   *         }
+   *       },
+   *       "responseParameters": {
+   *         "method.response.header.operator": "integration.response.body.op",
+   *         "method.response.header.operand_2": "integration.response.body.b",
+   *         "method.response.header.operand_1": "integration.response.body.a"
+   *       },
+   *       "responseTemplates": {
+   *         "application/json": "#set($res = $input.path('$'))\n{\n    \"result\": \"$res.a, $res.b, $res.op => $res.c\",\n  \"a\" : \"$res.a\",\n  \"b\" : \"$res.b\",\n  \"op\" : \"$res.op\",\n  \"c\" : \"$res.c\"\n}"
+   *       },
+   *       "selectionPattern": "",
+   *       "statusCode": "200"
+   *     }
+   *   }
+   * }
+ *

+ *

+ *
+ * + */ + methodIntegration?: Integration; + + /** + *

+ * Gets a method response associated with a given HTTP status code. + *

+ *
+ *

+ * The collection of method responses are encapsulated in a key-value map, where the key is a response's HTTP status code and the value is a + * + * MethodResponse + * + * resource that specifies the response returned to the caller from the back end through the integration response. + *

+ *

+ * Example: Get a 200 OK response of a GET method + *

+ *
+ * Request + *
+ *

+ *

+ *
GET /restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200 HTTP/1.1
+   * Content-Type: application/json
+   * Host: apigateway.us-east-1.amazonaws.com
+   * Content-Length: 117
+   * X-Amz-Date: 20160613T215008Z
+   * Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160613/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
+ *
+ * Response + *
+ *

+ * The successful response returns a + * + * 200 OK + * + * status code and a payload similar to the following: + *

+ *
{
+   *   "_links": {
+   *     "curies": {
+   *       "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html",
+   *       "name": "methodresponse",
+   *       "templated": true
+   *     },
+   *     "self": {
+   *       "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200",
+   *       "title": "200"
+   *     },
+   *     "methodresponse:delete": {
+   *       "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200"
+   *     },
+   *     "methodresponse:update": {
+   *       "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200"
+   *     }
+   *   },
+   *   "responseModels": {
+   *     "application/json": "Empty"
+   *   },
+   *   "responseParameters": {
+   *     "method.response.header.operator": false,
+   *     "method.response.header.operand_2": false,
+   *     "method.response.header.operand_1": false
+   *   },
+   *   "statusCode": "200"
+   * }
+ *

+ *

+ *
+ * + */ + methodResponses?: { [key: string]: MethodResponse }; + + /** + *

+ * A human-friendly operation identifier for the method. For example, you can assign the + * + * operationName + * + * of + * + * ListPets + * + * for the + * + * GET /pets + * + * method in the + * + * PetStore + * + * example. + *

+ */ + operationName?: string; + + /** + *

+ * A key-value map specifying data schemas, represented by + * + * Model + * + * resources, (as the mapped value) of the request payloads of given content types (as the mapping key). + *

+ */ + requestModels?: { [key: string]: string }; + + /** + *

+ * A key-value map defining required or optional method request parameters that can be accepted by API Gateway. A key is a method request parameter name matching the pattern of + * + * method.request.{location}.{name} + * + * , where + * + * location + * + * is + * + * querystring + * + * , + * + * path + * + * , or + * + * header + * + * and + * + * name + * + * is a valid and unique parameter name. The value associated with the key is a Boolean flag indicating whether the parameter is required ( + * + * true + * + * ) or optional ( + * + * false + * + * ). The method request parameter names defined here are available in + * + * Integration + * + * to be mapped to integration request parameters or templates. + *

+ */ + requestParameters?: { [key: string]: boolean }; + + /** + *

+ * The identifier of a + * + * RequestValidator + * + * for request validation. + *

+ */ + requestValidatorId?: string; +} + +export namespace Method { + export function isa(o: any): o is Method { + return _smithy.isa(o, "Method"); + } +} + +/** + *

+ * Represents a method response of a given HTTP status code returned to the client. The method response is passed from the back end through the associated integration response that can be transformed using a mapping template. + * + *

+ *
+ *

+ *

+ *

+ * Example: A + * + * MethodResponse + * + * instance of an API + *

+ *
+ * Request + *
+ *

+ * The example request retrieves a + * + * MethodResponse + * + * of the 200 status code. + *

+ *
GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200 HTTP/1.1
+ * Content-Type: application/json
+ * Host: apigateway.us-east-1.amazonaws.com
+ * X-Amz-Date: 20160603T222952Z
+ * Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160603/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
+ *
+ * Response + *
+ *

+ * The successful response returns + * + * 200 OK + * + * status and a payload as follows: + *

+ *
{
+ *   "_links": {
+ *     "curies": {
+ *       "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html",
+ *       "name": "methodresponse",
+ *       "templated": true
+ *     },
+ *     "self": {
+ *       "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200",
+ *       "title": "200"
+ *     },
+ *     "methodresponse:delete": {
+ *       "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200"
+ *     },
+ *     "methodresponse:update": {
+ *       "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200"
+ *     }
+ *   },
+ *   "responseModels": {
+ *     "application/json": "Empty"
+ *   },
+ *   "responseParameters": {
+ *     "method.response.header.Content-Type": false
+ *   },
+ *   "statusCode": "200"
+ * }
+ *

+ *

+ *
+ * + */ +export interface MethodResponse extends $MetadataBearer { + __type?: "MethodResponse"; + /** + *

+ * Specifies the + * + * Model + * + * resources used for the response's content-type. Response models are represented as a key/value map, with a content-type as the key and a + * + * Model + * + * name as the value. + *

+ */ + responseModels?: { [key: string]: string }; + + /** + *

+ * A key-value map specifying required or optional response parameters that API Gateway can send back to the caller. A key defines a method response header and the value specifies whether the associated method response header is required or not. The expression of the key must match the pattern + * + * method.response.header.{name} + * + * , where + * + * name + * + * is a valid and unique header name. API Gateway passes certain integration response data to the method response headers specified here according to the mapping you prescribe in the API's + * + * IntegrationResponse + * + * . The integration response data that can be mapped include an integration response header expressed in + * + * integration.response.header.{name} + * + * , a static value enclosed within a pair of single quotes (e.g., + * + * 'application/json' + * + * ), or a JSON expression from the back-end response payload in the form of + * + * integration.response.body.{JSON-expression} + * + * , where + * + * JSON-expression + * + * is a valid JSON expression without the + * + * $ + * + * prefix.) + *

+ */ + responseParameters?: { [key: string]: boolean }; + + /** + *

+ * The method response's status code. + *

+ */ + statusCode?: string; +} + +export namespace MethodResponse { + export function isa(o: any): o is MethodResponse { + return _smithy.isa(o, "MethodResponse"); + } +} + +/** + *

+ * Specifies the method setting properties. + *

+ */ +export interface MethodSetting { + __type?: "MethodSetting"; + /** + *

+ * Specifies whether the cached responses are encrypted. The PATCH path for this setting is + * + * /{method_setting_key}/caching/dataEncrypted + * + * , and the value is a Boolean. + *

+ */ + cacheDataEncrypted?: boolean; + + /** + *

+ * Specifies the time to live (TTL), in seconds, for cached responses. The higher the TTL, the longer the response will be cached. The PATCH path for this setting is + * + * /{method_setting_key}/caching/ttlInSeconds + * + * , and the value is an integer. + *

+ */ + cacheTtlInSeconds?: number; + + /** + *

+ * Specifies whether responses should be cached and returned for requests. A cache cluster must be enabled on the stage for responses to be cached. The PATCH path for this setting is + * + * /{method_setting_key}/caching/enabled + * + * , and the value is a Boolean. + *

+ */ + cachingEnabled?: boolean; + + /** + *

+ * Specifies whether data trace logging is enabled for this method, which affects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this setting is + * + * /{method_setting_key}/logging/dataTrace + * + * , and the value is a Boolean. + *

+ */ + dataTraceEnabled?: boolean; + + /** + *

+ * Specifies the logging level for this method, which affects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this setting is + * + * /{method_setting_key}/logging/loglevel + * + * , and the available levels are + * + * OFF + * + * , + * + * ERROR + * + * , and + * + * INFO + * + * . + *

+ */ + loggingLevel?: string; + + /** + *

+ * Specifies whether Amazon CloudWatch metrics are enabled for this method. The PATCH path for this setting is + * + * /{method_setting_key}/metrics/enabled + * + * , and the value is a Boolean. + *

+ */ + metricsEnabled?: boolean; + + /** + *

+ * Specifies whether authorization is required for a cache invalidation request. The PATCH path for this setting is + * + * /{method_setting_key}/caching/requireAuthorizationForCacheControl + * + * , and the value is a Boolean. + *

+ */ + requireAuthorizationForCacheControl?: boolean; + + /** + *

+ * Specifies the throttling burst limit. The PATCH path for this setting is + * + * /{method_setting_key}/throttling/burstLimit + * + * , and the value is an integer. + *

+ */ + throttlingBurstLimit?: number; + + /** + *

+ * Specifies the throttling rate limit. The PATCH path for this setting is + * + * /{method_setting_key}/throttling/rateLimit + * + * , and the value is a double. + *

+ */ + throttlingRateLimit?: number; + + /** + *

+ * Specifies how to handle unauthorized requests for cache invalidation. The PATCH path for this setting is + * + * /{method_setting_key}/caching/unauthorizedCacheControlHeaderStrategy + * + * , and the available values are + * + * FAIL_WITH_403 + * + * , + * + * SUCCEED_WITH_RESPONSE_HEADER + * + * , + * + * SUCCEED_WITHOUT_RESPONSE_HEADER + * + * . + *

+ */ + unauthorizedCacheControlHeaderStrategy?: UnauthorizedCacheControlHeaderStrategy | string; +} + +export namespace MethodSetting { + export function isa(o: any): o is MethodSetting { + return _smithy.isa(o, "MethodSetting"); + } +} + +/** + *

+ * Represents a summary of a + * + * Method + * + * resource, given a particular date and time. + *

+ */ +export interface MethodSnapshot { + __type?: "MethodSnapshot"; + /** + *

+ * Specifies whether the method requires a valid + * + * ApiKey + * + * . + *

+ */ + apiKeyRequired?: boolean; + + /** + *

+ * The method's authorization type. Valid values are + * + * NONE + * + * for open access, + * + * AWS_IAM + * + * for using AWS IAM permissions, + * + * CUSTOM + * + * for using a custom authorizer, or + * + * COGNITO_USER_POOLS + * + * for using a Cognito user pool. + *

+ */ + authorizationType?: string; +} + +export namespace MethodSnapshot { + export function isa(o: any): o is MethodSnapshot { + return _smithy.isa(o, "MethodSnapshot"); + } +} + +/** + *

+ * Represents the data structure of a method's request or response payload. + *

+ *
+ *

+ * A request model defines the data structure of the client-supplied request payload. A response model defines the data structure of the response payload returned by the back end. Although not required, models are useful for mapping payloads between the front end and back end. + *

+ *

+ * A model is used for generating an API's SDK, validating the input request body, and creating a skeletal mapping template. + *

+ *
+ * + */ +export interface Model extends $MetadataBearer { + __type?: "Model"; + /** + *

+ * The content-type for the model. + *

+ */ + contentType?: string; + + /** + *

+ * The description of the model. + *

+ */ + description?: string; + + /** + *

+ * The identifier for the model resource. + *

+ */ + id?: string; + + /** + *

+ * The name of the model. Must be an alphanumeric string. + *

+ */ + name?: string; + + /** + *

+ * The schema for the model. For + * + * application/json + * + * models, this should be + * + * JSON schema draft 4 + * + * model. Do not include "\*/" characters in the description of any properties because such "\*/" characters may be interpreted as the closing marker for comments in some languages, such as Java or JavaScript, causing the installation of your API's SDK generated by API Gateway to fail. + *

+ */ + schema?: string; +} + +export namespace Model { + export function isa(o: any): o is Model { + return _smithy.isa(o, "Model"); + } +} + +/** + *

+ * Represents a collection of + * + * Model + * + * resources. + *

+ * + */ +export interface Models extends $MetadataBearer { + __type?: "Models"; + /** + *

+ * The current page of elements from this collection. + *

+ */ + items?: Array; + + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; +} + +export namespace Models { + export function isa(o: any): o is Models { + return _smithy.isa(o, "Models"); + } +} + +/** + *

+ * Creates a customization of a + * + * GatewayResponse + * + * of a specified response type and status code on the given + * + * RestApi + * + * . + *

+ */ +export interface PutGatewayResponseRequest { + __type?: "PutGatewayResponseRequest"; + name?: string; + /** + *

+ *

+ * Response parameters (paths, query strings and headers) of the + * + * GatewayResponse + * + * as a string-to-string map of key-value pairs. + *

+ *

+ */ + responseParameters?: { [key: string]: string }; + + /** + *

+ *

+ * Response templates of the + * + * GatewayResponse + * + * as a string-to-string map of key-value pairs. + *

+ *

+ */ + responseTemplates?: { [key: string]: string }; + + /** + *

+ * [Required] + *

+ * The response type of the associated + * + * GatewayResponse + * + * . Valid values are + *

    + *
  • + * ACCESS_DENIED + *
  • + *
  • + * API_CONFIGURATION_ERROR + *
  • + *
  • + * AUTHORIZER_FAILURE + *
  • + *
  • + * AUTHORIZER_CONFIGURATION_ERROR + *
  • + *
  • + * BAD_REQUEST_PARAMETERS + *
  • + *
  • + * BAD_REQUEST_BODY + *
  • + *
  • + * DEFAULT_4XX + *
  • + *
  • + * DEFAULT_5XX + *
  • + *
  • + * EXPIRED_TOKEN + *
  • + *
  • + * INVALID_SIGNATURE + *
  • + *
  • + * INTEGRATION_FAILURE + *
  • + *
  • + * INTEGRATION_TIMEOUT + *
  • + *
  • + * INVALID_API_KEY + *
  • + *
  • + * MISSING_AUTHENTICATION_TOKEN + *
  • + *
  • + * QUOTA_EXCEEDED + *
  • + *
  • + * REQUEST_TOO_LARGE + *
  • + *
  • + * RESOURCE_NOT_FOUND + *
  • + *
  • + * THROTTLED + *
  • + *
  • + * UNAUTHORIZED + *
  • + *
  • + * UNSUPPORTED_MEDIA_TYPE + *
  • + *
+ *

+ *

+ */ + responseType: GatewayResponseType | string | undefined; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + /** + * The HTTP status code of the + * + * GatewayResponse + * + * . + */ + statusCode?: string; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace PutGatewayResponseRequest { + export function isa(o: any): o is PutGatewayResponseRequest { + return _smithy.isa(o, "PutGatewayResponseRequest"); + } +} + +/** + *

+ * Sets up a method's integration. + *

+ */ +export interface PutIntegrationRequest { + __type?: "PutIntegrationRequest"; + /** + *

+ * An API-specific tag group of related cached parameters. + *

+ */ + cacheKeyParameters?: Array; + + /** + *

+ * A list of request parameters whose values are to be cached. + *

+ */ + cacheNamespace?: string; + + /** + *

+ * The ( + * + * + * id + * + * + * ) of the + * + * VpcLink + * + * used for the integration when + * + * connectionType=VPC_LINK + * + * and undefined, otherwise. + *

+ */ + connectionId?: string; + + /** + *

+ * The type of the network connection to the integration endpoint. The valid value is + * + * INTERNET + * + * for connections through the public routable internet or + * + * VPC_LINK + * + * for private connections between API Gateway and a network load balancer in a VPC. The default value is + * + * INTERNET + * + * . + *

+ */ + connectionType?: ConnectionType | string; + + /** + *

+ * Specifies how to handle request payload content type conversions. Supported values are + * + * CONVERT_TO_BINARY + * + * and + * + * CONVERT_TO_TEXT + * + * , with the following behaviors: + *

+ *
    + *
  • + *

    + * + * CONVERT_TO_BINARY + * + * : Converts a request payload from a Base64-encoded string to the corresponding binary blob. + *

    + *
  • + *
  • + *

    + * + * CONVERT_TO_TEXT + * + * : Converts a request payload from a binary blob to a Base64-encoded string. + *

    + *
  • + *
+ *

+ * If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the + * + * passthroughBehavior + * + * is configured to support payload pass-through. + *

+ */ + contentHandling?: ContentHandlingStrategy | string; + + /** + *

+ * Specifies whether credentials are required for a put integration. + *

+ */ + credentials?: string; + + /** + *

+ * [Required] Specifies a put integration request's HTTP method. + *

+ */ + httpMethod: string | undefined; + + /** + *

+ * Specifies a put integration HTTP method. When the integration type is HTTP or AWS, this field is required. + *

+ */ + integrationHttpMethod?: string; + + name?: string; + /** + *

+ * Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the + * + * requestTemplates + * + * property on the Integration resource. There are three valid values: + * + * WHEN_NO_MATCH + * + * , + * + * WHEN_NO_TEMPLATES + * + * , and + * + * NEVER + * + * . + *

+ *
    + *
  • + *

    + * + * WHEN_NO_MATCH + * + * passes the request body for unmapped content types through to the integration back end without transformation. + *

    + *
  • + *
  • + *

    + * + * NEVER + * + * rejects unmapped content types with an HTTP 415 'Unsupported Media Type' response. + *

    + *
  • + *
  • + *

    + * + * WHEN_NO_TEMPLATES + * + * allows pass-through when the integration has NO content types mapped to templates. However if there is at least one content type defined, unmapped content types will be rejected with the same 415 response. + *

    + *
  • + *
+ */ + passthroughBehavior?: string; + + /** + *

+ * A key-value map specifying request parameters that are passed from the method request to the back end. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the back end. The method request parameter value must match the pattern of + * + * method.request.{location}.{name} + * + * , where + * + * location + * + * is + * + * querystring + * + * , + * + * path + * + * , or + * + * header + * + * and + * + * name + * + * must be a valid and unique method request parameter name. + *

+ */ + requestParameters?: { [key: string]: string }; + + /** + *

+ * Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value. + *

+ */ + requestTemplates?: { [key: string]: string }; + + /** + *

+ * [Required] Specifies a put integration request's resource ID. + *

+ */ + resourceId: string | undefined; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + /** + *

+ * Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds. + *

+ */ + timeoutInMillis?: number; + + title?: string; + /** + *

+ * [Required] Specifies a put integration input's type. + *

+ */ + type: IntegrationType | string | undefined; + + /** + *

+ * Specifies Uniform Resource Identifier (URI) of the integration endpoint. + *

+ *
    + *
  • + *

    + * For + * + * HTTP + * + * or + * + * HTTP_PROXY + * + * integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the + * + * RFC-3986 specification + * + * , for either standard integration, where + * + * connectionType + * + * is not + * + * VPC_LINK + * + * , or private integration, where + * + * connectionType + * + * is + * + * VPC_LINK + * + * . For a private HTTP integration, the URI is not used for routing. + *

    + *
  • + *
  • + *

    + * For + * + * AWS + * + * or + * + * AWS_PROXY + * + * integrations, the URI is of the form + * + * arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api} + * + * . Here, + * + * {Region} + * + * is the API Gateway region (e.g., + * + * us-east-1 + * + * ); + * + * {service} + * + * is the name of the integrated AWS service (e.g., + * + * s3 + * + * ); and + * + * {subdomain} + * + * is a designated subdomain supported by certain AWS service for fast host-name lookup. + * + * action + * + * can be used for an AWS service action-based API, using an + * + * Action={name}&{p1}={v1}&p2={v2}... + * + * query string. The ensuing + * + * {service_api} + * + * refers to a supported action + * + * {name} + * + * plus any required input parameters. Alternatively, + * + * path + * + * can be used for an AWS service path-based API. The ensuing + * + * service_api + * + * refers to the path to an AWS service resource, including the region of the integrated AWS service, if applicable. For example, for integration with the S3 API of + * + * + * GetObject + * + * + * , the + * + * uri + * + * can be either + * + * arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key} + * + * or + * + * arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key} + * + *

    + *
  • + *
+ */ + uri?: string; +} + +export namespace PutIntegrationRequest { + export function isa(o: any): o is PutIntegrationRequest { + return _smithy.isa(o, "PutIntegrationRequest"); + } +} + +/** + *

+ * Represents a put integration response request. + *

+ */ +export interface PutIntegrationResponseRequest { + __type?: "PutIntegrationResponseRequest"; + /** + *

+ * Specifies how to handle response payload content type conversions. Supported values are + * + * CONVERT_TO_BINARY + * + * and + * + * CONVERT_TO_TEXT + * + * , with the following behaviors: + *

+ *
    + *
  • + *

    + * + * CONVERT_TO_BINARY + * + * : Converts a response payload from a Base64-encoded string to the corresponding binary blob. + *

    + *
  • + *
  • + *

    + * + * CONVERT_TO_TEXT + * + * : Converts a response payload from a binary blob to a Base64-encoded string. + *

    + *
  • + *
+ *

+ * If this property is not defined, the response payload will be passed through from the integration response to the method response without modification. + *

+ */ + contentHandling?: ContentHandlingStrategy | string; + + /** + *

+ * [Required] Specifies a put integration response request's HTTP method. + *

+ */ + httpMethod: string | undefined; + + name?: string; + /** + *

+ * [Required] Specifies a put integration response request's resource identifier. + *

+ */ + resourceId: string | undefined; + + /** + *

+ * A key-value map specifying response parameters that are passed to the method response from the back end. + * The key is a method response header parameter name and the mapped value is an integration response header value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The mapping key must match the pattern of + * + * method.response.header.{name} + * + * , where + * + * name + * + * is a valid and unique header name. The mapped non-static value must match the pattern of + * + * integration.response.header.{name} + * + * or + * + * integration.response.body.{JSON-expression} + * + * , where + * + * name + * + * must be a valid and unique response header name and + * + * JSON-expression + * + * a valid JSON expression without the + * + * $ + * + * prefix. + *

+ */ + responseParameters?: { [key: string]: string }; + + /** + *

+ * Specifies a put integration response's templates. + *

+ */ + responseTemplates?: { [key: string]: string }; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + /** + *

+ * Specifies the selection pattern of a put integration response. + *

+ */ + selectionPattern?: string; + + /** + *

+ * [Required] Specifies the status code that is used to map the integration response to an existing + * + * MethodResponse + * + * . + *

+ */ + statusCode: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace PutIntegrationResponseRequest { + export function isa(o: any): o is PutIntegrationResponseRequest { + return _smithy.isa(o, "PutIntegrationResponseRequest"); + } +} + +/** + *

+ * Request to add a method to an existing + * + * Resource + * + * resource. + *

+ */ +export interface PutMethodRequest { + __type?: "PutMethodRequest"; + /** + *

+ * Specifies whether the method required a valid + * + * ApiKey + * + * . + *

+ */ + apiKeyRequired?: boolean; + + /** + *

+ * A list of authorization scopes configured on the method. The scopes are used with a + * + * COGNITO_USER_POOLS + * + * authorizer to authorize the method invocation. The authorization works by matching the method scopes against the scopes parsed from the access token in the incoming request. The method invocation is authorized if any method scopes matches a claimed scope in the access token. Otherwise, the invocation is not authorized. When the method scope is configured, the client must provide an access token instead of an identity token for authorization purposes. + *

+ */ + authorizationScopes?: Array; + + /** + *

+ * [Required] The method's authorization type. Valid values are + * + * NONE + * + * for open access, + * + * AWS_IAM + * + * for using AWS IAM permissions, + * + * CUSTOM + * + * for using a custom authorizer, or + * + * COGNITO_USER_POOLS + * + * for using a Cognito user pool. + *

+ */ + authorizationType: string | undefined; + + /** + *

+ * Specifies the identifier of an + * + * Authorizer + * + * to use on this Method, if the type is CUSTOM or COGNITO_USER_POOLS. The authorizer identifier is generated by API Gateway when you created the authorizer. + *

+ */ + authorizerId?: string; + + /** + *

+ * [Required] Specifies the method request's HTTP method type. + *

+ */ + httpMethod: string | undefined; + + name?: string; + /** + *

+ * A human-friendly operation identifier for the method. For example, you can assign the + * + * operationName + * + * of + * + * ListPets + * + * for the + * + * GET /pets + * + * method in the + * + * PetStore + * + * example. + *

+ */ + operationName?: string; + + /** + *

+ * Specifies the + * + * Model + * + * resources used for the request's content type. Request models are represented as a key/value map, with a content type as the key and a + * + * Model + * + * name as the value. + *

+ */ + requestModels?: { [key: string]: string }; + + /** + *

+ * A key-value map defining required or optional method request parameters that can be accepted by API Gateway. A key defines a method request parameter name matching the pattern of + * + * method.request.{location}.{name} + * + * , where + * + * location + * + * is + * + * querystring + * + * , + * + * path + * + * , or + * + * header + * + * and + * + * name + * + * is a valid and unique parameter name. The value associated with the key is a Boolean flag indicating whether the parameter is required ( + * + * true + * + * ) or optional ( + * + * false + * + * ). The method request parameter names defined here are available in + * + * Integration + * + * to be mapped to integration request parameters or body-mapping templates. + *

+ */ + requestParameters?: { [key: string]: boolean }; + + /** + *

+ * The identifier of a + * + * RequestValidator + * + * for validating the method request. + *

+ */ + requestValidatorId?: string; + + /** + *

+ * [Required] The + * + * Resource + * + * identifier for the new + * + * Method + * + * resource. + *

+ */ + resourceId: string | undefined; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace PutMethodRequest { + export function isa(o: any): o is PutMethodRequest { + return _smithy.isa(o, "PutMethodRequest"); + } +} + +/** + *

+ * Request to add a + * + * MethodResponse + * + * to an existing + * + * Method + * + * resource. + *

+ */ +export interface PutMethodResponseRequest { + __type?: "PutMethodResponseRequest"; + /** + *

+ * [Required] The HTTP verb of the + * + * Method + * + * resource. + *

+ */ + httpMethod: string | undefined; + + name?: string; + /** + *

+ * [Required] The + * + * Resource + * + * identifier for the + * + * Method + * + * resource. + *

+ */ + resourceId: string | undefined; + + /** + *

+ * Specifies the + * + * Model + * + * resources used for the response's content type. Response models are represented as a key/value map, with a content type as the key and a + * + * Model + * + * name as the value. + *

+ */ + responseModels?: { [key: string]: string }; + + /** + *

+ * A key-value map specifying required or optional response parameters that API Gateway can send back to the caller. A key defines a method response header name and the associated value is a Boolean flag indicating whether the method response parameter is required or not. The method response header names must match the pattern of + * + * method.response.header.{name} + * + * , where + * + * name + * + * is a valid and unique header name. The response parameter names defined here are available in the integration response to be mapped from an integration response header expressed in + * + * integration.response.header.{name} + * + * , a static value enclosed within a pair of single quotes (e.g., + * + * 'application/json' + * + * ), or a JSON expression from the back-end response payload in the form of + * + * integration.response.body.{JSON-expression} + * + * , where + * + * JSON-expression + * + * is a valid JSON expression without the + * + * $ + * + * prefix.) + *

+ */ + responseParameters?: { [key: string]: boolean }; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + /** + *

+ * [Required] The method response's status code. + *

+ */ + statusCode: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace PutMethodResponseRequest { + export function isa(o: any): o is PutMethodResponseRequest { + return _smithy.isa(o, "PutMethodResponseRequest"); + } +} + +export enum PutMode { + Merge = "merge", + Overwrite = "overwrite", +} + +/** + *

+ * A PUT request to update an existing API, with external API definitions specified as the request body. + *

+ */ +export interface PutRestApiRequest { + __type?: "PutRestApiRequest"; + /** + *

+ * A query parameter to indicate whether to rollback the API update ( + * + * true + * + * ) or not ( + * + * false + * + * ) + * when a warning is encountered. The default value is + * + * false + * + * . + *

+ */ + failOnWarnings?: boolean; + + /** + *

+ * The + * + * mode + * + * query parameter to specify the update mode. Valid values are "merge" and "overwrite". By default, + * the update mode is "merge". + *

+ */ + mode?: PutMode | string; + + name?: string; + /** + *

+ * Custom header parameters as part of the request. For example, to exclude + * + * DocumentationParts + * + * from an imported API, set + * + * ignore=documentation + * + * as a + * + * parameters + * + * value, as in the AWS CLI command of + * + * aws apigateway import-rest-api --parameters ignore=documentation --body 'file:///path/to/imported-api-body.json' + * + * . + *

+ */ + parameters?: { [key: string]: string }; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace PutRestApiRequest { + export function isa(o: any): o is PutRestApiRequest { + return _smithy.isa(o, "PutRestApiRequest"); + } +} + +export enum QuotaPeriodType { + DAY = "DAY", + MONTH = "MONTH", + WEEK = "WEEK", +} + +/** + *

+ * Quotas configured for a usage plan. + *

+ */ +export interface QuotaSettings { + __type?: "QuotaSettings"; + /** + *

+ * The maximum number of requests that can be made in a given time period. + *

+ */ + limit?: number; + + /** + *

+ * The number of requests subtracted from the given limit in the initial time period. + *

+ */ + offset?: number; + + /** + *

+ * The time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH". + *

+ */ + period?: QuotaPeriodType | string; +} + +export namespace QuotaSettings { + export function isa(o: any): o is QuotaSettings { + return _smithy.isa(o, "QuotaSettings"); + } +} + +/** + *

+ * A set of validation rules for incoming + * + * Method + * + * requests. + *

+ *
+ *

+ * In OpenAPI, a + * + * RequestValidator + * + * of an API is defined by the + * + * x-amazon-apigateway-request-validators.requestValidator + * + * object. It the referenced using the + * + * x-amazon-apigateway-request-validator + * + * property. + *

+ *
+ * + */ +export interface RequestValidator extends $MetadataBearer { + __type?: "RequestValidator"; + /** + *

+ * The identifier of this + * + * RequestValidator + * + * . + *

+ */ + id?: string; + + /** + *

+ * The name of this + * + * RequestValidator + * + *

+ */ + name?: string; + + /** + *

+ * A Boolean flag to indicate whether to validate a request body according to the configured + * + * Model + * + * schema. + *

+ */ + validateRequestBody?: boolean; + + /** + *

+ * A Boolean flag to indicate whether to validate request parameters ( + * + * true + * + * ) or not ( + * + * false + * + * ). + *

+ */ + validateRequestParameters?: boolean; +} + +export namespace RequestValidator { + export function isa(o: any): o is RequestValidator { + return _smithy.isa(o, "RequestValidator"); + } +} + +/** + *

+ * A collection of + * + * RequestValidator + * + * resources of a given + * + * RestApi + * + * . + *

+ *
+ *

+ * In OpenAPI, the + * + * RequestValidators + * + * of an API is defined by the + * + * x-amazon-apigateway-request-validators + * + * extension. + *

+ *
+ * + */ +export interface RequestValidators extends $MetadataBearer { + __type?: "RequestValidators"; + /** + *

+ * The current page of elements from this collection. + *

+ */ + items?: Array; + + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; +} + +export namespace RequestValidators { + export function isa(o: any): o is RequestValidators { + return _smithy.isa(o, "RequestValidators"); + } +} + +/** + *

+ * Represents an API resource. + *

+ * + */ +export interface Resource extends $MetadataBearer { + __type?: "Resource"; + /** + *

+ * The resource's identifier. + *

+ */ + id?: string; + + /** + *

+ * The parent resource's identifier. + *

+ */ + parentId?: string; + + /** + *

+ * The full path for this resource. + *

+ */ + path?: string; + + /** + *

+ * The last path segment for this resource. + *

+ */ + pathPart?: string; + + /** + *

+ * Gets an API resource's method of a given HTTP verb. + *

+ *
+ *

+ * The resource methods are a map of methods indexed by methods' HTTP verbs enabled on the resource. This method map is included in the + * + * 200 OK + * + * response of the + * + * GET /restapis/{restapi_id}/resources/{resource_id} + * + * or + * + * GET /restapis/{restapi_id}/resources/{resource_id}?embed=methods + * + * request. + *

+ *

+ * Example: Get the GET method of an API resource + *

+ *
+ * Request + *
+ *
GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET HTTP/1.1
+   * Content-Type: application/json
+   * Host: apigateway.us-east-1.amazonaws.com
+   * X-Amz-Date: 20170223T031827Z
+   * Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20170223/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
+ *
+ * Response + *
+ *
{
+   *   "_links": {
+   *     "curies": [
+   *       {
+   *         "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html",
+   *         "name": "integration",
+   *         "templated": true
+   *       },
+   *       {
+   *         "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html",
+   *         "name": "integrationresponse",
+   *         "templated": true
+   *       },
+   *       {
+   *         "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-{rel}.html",
+   *         "name": "method",
+   *         "templated": true
+   *       },
+   *       {
+   *         "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html",
+   *         "name": "methodresponse",
+   *         "templated": true
+   *       }
+   *     ],
+   *     "self": {
+   *       "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET",
+   *       "name": "GET",
+   *       "title": "GET"
+   *     },
+   *     "integration:put": {
+   *       "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration"
+   *     },
+   *     "method:delete": {
+   *       "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET"
+   *     },
+   *     "method:integration": {
+   *       "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration"
+   *     },
+   *     "method:responses": {
+   *       "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200",
+   *       "name": "200",
+   *       "title": "200"
+   *     },
+   *     "method:update": {
+   *       "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET"
+   *     },
+   *     "methodresponse:put": {
+   *       "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/{status_code}",
+   *       "templated": true
+   *     }
+   *   },
+   *   "apiKeyRequired": false,
+   *   "authorizationType": "NONE",
+   *   "httpMethod": "GET",
+   *   "_embedded": {
+   *     "method:integration": {
+   *       "_links": {
+   *         "self": {
+   *           "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration"
+   *         },
+   *         "integration:delete": {
+   *           "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration"
+   *         },
+   *         "integration:responses": {
+   *           "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200",
+   *           "name": "200",
+   *           "title": "200"
+   *         },
+   *         "integration:update": {
+   *           "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration"
+   *         },
+   *         "integrationresponse:put": {
+   *           "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/{status_code}",
+   *           "templated": true
+   *         }
+   *       },
+   *       "cacheKeyParameters": [],
+   *       "cacheNamespace": "3kzxbg5sa2",
+   *       "credentials": "arn:aws:iam::123456789012:role/apigAwsProxyRole",
+   *       "httpMethod": "POST",
+   *       "passthroughBehavior": "WHEN_NO_MATCH",
+   *       "requestParameters": {
+   *         "integration.request.header.Content-Type": "'application/x-amz-json-1.1'"
+   *       },
+   *       "requestTemplates": {
+   *         "application/json": "{\n}"
+   *       },
+   *       "type": "AWS",
+   *       "uri": "arn:aws:apigateway:us-east-1:kinesis:action/ListStreams",
+   *       "_embedded": {
+   *         "integration:responses": {
+   *           "_links": {
+   *             "self": {
+   *               "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200",
+   *               "name": "200",
+   *               "title": "200"
+   *             },
+   *             "integrationresponse:delete": {
+   *               "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200"
+   *             },
+   *             "integrationresponse:update": {
+   *               "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200"
+   *             }
+   *           },
+   *           "responseParameters": {
+   *             "method.response.header.Content-Type": "'application/xml'"
+   *           },
+   *           "responseTemplates": {
+   *             "application/json": "$util.urlDecode(\"%3CkinesisStreams%3E#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n"
+   *           },
+   *           "statusCode": "200"
+   *         }
+   *       }
+   *     },
+   *     "method:responses": {
+   *       "_links": {
+   *         "self": {
+   *           "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200",
+   *           "name": "200",
+   *           "title": "200"
+   *         },
+   *         "methodresponse:delete": {
+   *           "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200"
+   *         },
+   *         "methodresponse:update": {
+   *           "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200"
+   *         }
+   *       },
+   *       "responseModels": {
+   *         "application/json": "Empty"
+   *       },
+   *       "responseParameters": {
+   *         "method.response.header.Content-Type": false
+   *       },
+   *       "statusCode": "200"
+   *     }
+   *   }
+   * }
+ *

+ * If the + * + * OPTIONS + * + * is enabled on the resource, you can follow the example here to get that method. Just replace the + * + * GET + * + * of the last path segment in the request URL with + * + * OPTIONS + * + * . + *

+ *
+ *
+ *
+ */ + resourceMethods?: { [key: string]: Method }; +} + +export namespace Resource { + export function isa(o: any): o is Resource { + return _smithy.isa(o, "Resource"); + } +} + +/** + *

+ * Represents a collection of + * + * Resource + * + * resources. + *

+ * + */ +export interface Resources extends $MetadataBearer { + __type?: "Resources"; + /** + *

+ * The current page of elements from this collection. + *

+ */ + items?: Array; + + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; +} + +export namespace Resources { + export function isa(o: any): o is Resources { + return _smithy.isa(o, "Resources"); + } +} + +/** + *

+ * Represents a REST API. + *

+ * + */ +export interface RestApi extends $MetadataBearer { + __type?: "RestApi"; + /** + *

+ * The source of the API key for metering requests according to a usage plan. Valid values are: + *

    + *
  • + * + * HEADER + * + * to read the API key from the + * + * X-API-Key + * + * header of a request. + *
  • + *
  • + * + * AUTHORIZER + * + * to read the API key from the + * + * UsageIdentifierKey + * + * from a custom authorizer. + *
  • + *
+ *

+ */ + apiKeySource?: ApiKeySourceType | string; + + /** + *

+ * The list of binary media types supported by the + * + * RestApi + * + * . By default, the + * + * RestApi + * + * supports only UTF-8-encoded text payloads. + *

+ */ + binaryMediaTypes?: Array; + + /** + *

+ * The timestamp when the API was created. + *

+ */ + createdDate?: Date; + + /** + *

+ * The API's description. + *

+ */ + description?: string; + + /** + *

+ * The endpoint configuration of this + * + * RestApi + * + * showing the endpoint types of the API. + *

+ */ + endpointConfiguration?: EndpointConfiguration; + + /** + *

+ * The API's identifier. This identifier is unique across all of your APIs in API Gateway. + *

+ */ + id?: string; + + /** + *

+ * A nullable integer that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (with a null value) on an API. When compression is enabled, compression or decompression is not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size. + *

+ */ + minimumCompressionSize?: number; + + /** + *

+ * The API's name. + *

+ */ + name?: string; + + /** + * A stringified JSON policy document that applies to this RestApi regardless of the caller and + * + * Method + * + * configuration. + */ + policy?: string; + + /** + *

+ * The collection of tags. Each tag element is associated with a given resource. + *

+ */ + tags?: { [key: string]: string }; + + /** + *

+ * A version identifier for the API. + *

+ */ + version?: string; + + /** + *

+ * The warning messages reported when + * + * failonwarnings + * + * is turned on during API import. + *

+ */ + warnings?: Array; +} + +export namespace RestApi { + export function isa(o: any): o is RestApi { + return _smithy.isa(o, "RestApi"); + } +} + +/** + *

+ * Contains references to your APIs and links that guide you in how to interact with your collection. A collection offers a paginated view of your APIs. + *

+ * + */ +export interface RestApis extends $MetadataBearer { + __type?: "RestApis"; + /** + *

+ * The current page of elements from this collection. + *

+ */ + items?: Array; + + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; +} + +export namespace RestApis { + export function isa(o: any): o is RestApis { + return _smithy.isa(o, "RestApis"); + } +} + +/** + *

+ * A configuration property of an SDK type. + *

+ */ +export interface SdkConfigurationProperty { + __type?: "SdkConfigurationProperty"; + /** + *

+ * The default value of an + * + * SdkType + * + * configuration property. + *

+ */ + defaultValue?: string; + + /** + *

+ * The description of an + * + * SdkType + * + * configuration property. + *

+ */ + description?: string; + + /** + *

+ * The user-friendly name of an + * + * SdkType + * + * configuration property. + *

+ */ + friendlyName?: string; + + /** + *

+ * The name of a an + * + * SdkType + * + * configuration property. + *

+ */ + name?: string; + + /** + *

+ * A boolean flag of an + * + * SdkType + * + * configuration property to indicate if the associated SDK configuration property is required ( + * + * true + * + * ) or not ( + * + * false + * + * ). + *

+ */ + required?: boolean; +} + +export namespace SdkConfigurationProperty { + export function isa(o: any): o is SdkConfigurationProperty { + return _smithy.isa(o, "SdkConfigurationProperty"); + } +} + +/** + *

+ * The binary blob response to + * + * GetSdk + * + * , which contains the generated SDK. + *

+ */ +export interface SdkResponse extends $MetadataBearer { + __type?: "SdkResponse"; + /** + *

+ * The binary blob response to + * + * GetSdk + * + * , which contains the generated SDK. + *

+ */ + body?: Uint8Array; + + /** + *

+ * The content-disposition header value in the HTTP response. + *

+ */ + contentDisposition?: string; + + /** + *

+ * The content-type header value in the HTTP response. + *

+ */ + contentType?: string; +} + +export namespace SdkResponse { + export function isa(o: any): o is SdkResponse { + return _smithy.isa(o, "SdkResponse"); + } +} + +/** + *

+ * A type of SDK that API Gateway can generate. + *

+ */ +export interface SdkType extends $MetadataBearer { + __type?: "SdkType"; + /** + *

+ * A list of configuration properties of an + * + * SdkType + * + * . + *

+ */ + configurationProperties?: Array; + + /** + *

+ * The description of an + * + * SdkType + * + * . + *

+ */ + description?: string; + + /** + *

+ * The user-friendly name of an + * + * SdkType + * + * instance. + *

+ */ + friendlyName?: string; + + /** + *

+ * The identifier of an + * + * SdkType + * + * instance. + *

+ */ + id?: string; +} + +export namespace SdkType { + export function isa(o: any): o is SdkType { + return _smithy.isa(o, "SdkType"); + } +} + +/** + *

+ * The collection of + * + * SdkType + * + * instances. + *

+ */ +export interface SdkTypes extends $MetadataBearer { + __type?: "SdkTypes"; + /** + *

+ * The current page of elements from this collection. + *

+ */ + items?: Array; +} + +export namespace SdkTypes { + export function isa(o: any): o is SdkTypes { + return _smithy.isa(o, "SdkTypes"); + } +} + +export type SecurityPolicy = "TLS_1_0" | "TLS_1_2" + +/** + *

+ * Represents a unique identifier for a version of a deployed + * + * RestApi + * + * that is callable by users. + *

+ * + */ +export interface Stage extends $MetadataBearer { + __type?: "Stage"; + /** + *

+ * Settings for logging access in this stage. + *

+ */ + accessLogSettings?: AccessLogSettings; + + /** + *

+ * Specifies whether a cache cluster is enabled for the stage. + *

+ */ + cacheClusterEnabled?: boolean; + + /** + *

+ * The size of the cache cluster for the stage, if enabled. + *

+ */ + cacheClusterSize?: CacheClusterSize | string; + + /** + *

+ * The status of the cache cluster for the stage, if enabled. + *

+ */ + cacheClusterStatus?: CacheClusterStatus | string; + + /** + *

+ * Settings for the canary deployment in this stage. + *

+ */ + canarySettings?: CanarySettings; + + /** + *

+ * The identifier of a client certificate for an API stage. + *

+ */ + clientCertificateId?: string; + + /** + *

+ * The timestamp when the stage was created. + *

+ */ + createdDate?: Date; + + /** + *

+ * The identifier of the + * + * Deployment + * + * that the stage points to. + *

+ */ + deploymentId?: string; + + /** + *

+ * The stage's description. + *

+ */ + description?: string; + + /** + *

+ * The version of the associated API documentation. + *

+ */ + documentationVersion?: string; + + /** + *

+ * The timestamp when the stage last updated. + *

+ */ + lastUpdatedDate?: Date; + + /** + *

+ * A map that defines the method settings for a + * + * Stage + * + * resource. Keys (designated as + * + * /{method_setting_key + * + * below) are method paths defined as + * + * {resource_path}/{http_method} + * + * for an individual method override, or + * + * /\*/\* + * + * for overriding all methods in the stage. + * + *

+ */ + methodSettings?: { [key: string]: MethodSetting }; + + /** + *

+ * The name of the stage is the first path segment in the Uniform Resource Identifier (URI) of a call to API Gateway. Stage names can only contain alphanumeric characters, hyphens, and underscores. Maximum length is 128 characters. + *

+ */ + stageName?: string; + + /** + *

+ * The collection of tags. Each tag element is associated with a given resource. + *

+ */ + tags?: { [key: string]: string }; + + /** + *

+ * Specifies whether active tracing with X-ray is enabled for the + * + * Stage + * + * . + *

+ */ + tracingEnabled?: boolean; + + /** + *

+ * A map that defines the stage variables for a + * + * Stage + * + * resource. Variable names can + * have alphanumeric and underscore characters, and the values must match + * + * [A-Za-z0-9-._~:/?#&=,]+ + * + * . + *

+ */ + variables?: { [key: string]: string }; + + /** + *

+ * The ARN of the WebAcl associated with the + * + * Stage + * + * . + *

+ */ + webAclArn?: string; +} + +export namespace Stage { + export function isa(o: any): o is Stage { + return _smithy.isa(o, "Stage"); + } +} + +/** + *

+ * A reference to a unique stage identified in the format + * + * {restApiId}/{stage} + * + * . + *

+ */ +export interface StageKey { + __type?: "StageKey"; + /** + *

+ * The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId?: string; + + /** + *

+ * The stage name associated with the stage key. + *

+ */ + stageName?: string; +} + +export namespace StageKey { + export function isa(o: any): o is StageKey { + return _smithy.isa(o, "StageKey"); + } +} + +/** + *

+ * A list of + * + * Stage + * + * resources that are associated with the + * + * ApiKey + * + * resource. + *

+ * + */ +export interface Stages extends $MetadataBearer { + __type?: "Stages"; + /** + *

+ * The current page of elements from this collection. + *

+ */ + item?: Array; +} + +export namespace Stages { + export function isa(o: any): o is Stages { + return _smithy.isa(o, "Stages"); + } +} + +/** + *

+ * Adds or updates a tag on a given resource. + *

+ */ +export interface TagResourceRequest { + __type?: "TagResourceRequest"; + name?: string; + /** + *

+ * [Required] The ARN of a resource that can be tagged. The resource ARN must be URL-encoded. + *

+ */ + resourceArn: string | undefined; + + /** + *

+ * [Required] The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with + * + * aws: + * + * . The tag value can be up to 256 characters. + *

+ */ + tags: { [key: string]: string } | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace TagResourceRequest { + export function isa(o: any): o is TagResourceRequest { + return _smithy.isa(o, "TagResourceRequest"); + } +} + +/** + *

+ * The collection of tags. Each tag element is associated with a given resource. + *

+ */ +export interface Tags extends $MetadataBearer { + __type?: "Tags"; + /** + *

+ * The collection of tags. Each tag element is associated with a given resource. + *

+ */ + tags?: { [key: string]: string }; +} + +export namespace Tags { + export function isa(o: any): o is Tags { + return _smithy.isa(o, "Tags"); + } +} + +/** + *

+ * Represents a mapping template used to transform a payload. + *

+ * + */ +export interface Template extends $MetadataBearer { + __type?: "Template"; + /** + *

+ * The Apache + * + * Velocity Template Language (VTL) + * + * template content used for the template resource. + *

+ */ + value?: string; +} + +export namespace Template { + export function isa(o: any): o is Template { + return _smithy.isa(o, "Template"); + } +} + +/** + *

+ * Make a request to simulate the execution of an + * + * Authorizer + * + * . + *

+ */ +export interface TestInvokeAuthorizerRequest { + __type?: "TestInvokeAuthorizerRequest"; + /** + *

+ * [Optional] A key-value map of additional context variables. + *

+ */ + additionalContext?: { [key: string]: string }; + + /** + *

+ * [Required] Specifies a test invoke authorizer request's + * + * Authorizer + * + * ID. + *

+ */ + authorizerId: string | undefined; + + /** + *

+ * [Optional] The simulated request body of an incoming invocation request. + *

+ */ + body?: string; + + /** + *

+ * [Required] A key-value map of headers to simulate an incoming invocation request. This is where the incoming authorization token, or identity source, should be specified. + *

+ */ + headers?: { [key: string]: string }; + + /** + *

+ * [Optional] The headers as a map from string to list of values to simulate an incoming invocation request. This is where the incoming authorization token, or identity source, may be specified. + *

+ */ + multiValueHeaders?: { [key: string]: Array }; + + /** + *

+ * [Optional] The URI path, including query string, of the simulated invocation request. Use this to specify path parameters and query string parameters. + *

+ */ + pathWithQueryString?: string; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + /** + *

+ * A key-value map of stage variables to simulate an invocation on a deployed + * + * Stage + * + * . + *

+ */ + stageVariables?: { [key: string]: string }; +} + +export namespace TestInvokeAuthorizerRequest { + export function isa(o: any): o is TestInvokeAuthorizerRequest { + return _smithy.isa(o, "TestInvokeAuthorizerRequest"); + } +} + +/** + *

+ * Represents the response of the test invoke request for a custom + * + * Authorizer + * + *

+ */ +export interface TestInvokeAuthorizerResponse extends $MetadataBearer { + __type?: "TestInvokeAuthorizerResponse"; + authorization?: { [key: string]: Array }; + /** + *

+ * The + * + * open identity claims + * + * , with any supported custom attributes, returned from the Cognito Your User Pool configured for the API. + *

+ */ + claims?: { [key: string]: string }; + + /** + *

+ * The HTTP status code that the client would have received. Value is 0 if the authorizer succeeded. + *

+ */ + clientStatus?: number; + + /** + *

+ * The execution latency of the test authorizer request. + *

+ */ + latency?: number; + + /** + *

+ * The API Gateway execution log for the test authorizer request. + *

+ */ + log?: string; + + /** + *

+ * The JSON policy document returned by the + * + * Authorizer + * + *

+ */ + policy?: string; + + /** + *

+ * The principal identity returned by the + * + * Authorizer + * + *

+ */ + principalId?: string; +} + +export namespace TestInvokeAuthorizerResponse { + export function isa(o: any): o is TestInvokeAuthorizerResponse { + return _smithy.isa(o, "TestInvokeAuthorizerResponse"); + } +} + +/** + *

+ * Make a request to simulate the execution of a + * + * Method + * + * . + *

+ */ +export interface TestInvokeMethodRequest { + __type?: "TestInvokeMethodRequest"; + /** + *

+ * The simulated request body of an incoming invocation request. + *

+ */ + body?: string; + + /** + *

+ * A + * + * ClientCertificate + * + * identifier to use in the test invocation. API Gateway will use the certificate when making the HTTPS request to the defined back-end endpoint. + *

+ */ + clientCertificateId?: string; + + /** + *

+ * A key-value map of headers to simulate an incoming invocation request. + *

+ */ + headers?: { [key: string]: string }; + + /** + *

+ * [Required] Specifies a test invoke method request's HTTP method. + *

+ */ + httpMethod: string | undefined; + + /** + *

+ * The headers as a map from string to list of values to simulate an incoming invocation request. + *

+ */ + multiValueHeaders?: { [key: string]: Array }; + + /** + *

+ * The URI path, including query string, of the simulated invocation request. Use this to specify path parameters and query string parameters. + *

+ */ + pathWithQueryString?: string; + + /** + *

+ * [Required] Specifies a test invoke method request's resource ID. + *

+ */ + resourceId: string | undefined; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + /** + *

+ * A key-value map of stage variables to simulate an invocation on a deployed + * + * Stage + * + * . + *

+ */ + stageVariables?: { [key: string]: string }; +} + +export namespace TestInvokeMethodRequest { + export function isa(o: any): o is TestInvokeMethodRequest { + return _smithy.isa(o, "TestInvokeMethodRequest"); + } +} + +/** + *

+ * Represents the response of the test invoke request in the HTTP method. + *

+ * + */ +export interface TestInvokeMethodResponse extends $MetadataBearer { + __type?: "TestInvokeMethodResponse"; + /** + *

+ * The body of the HTTP response. + *

+ */ + body?: string; + + /** + *

+ * The headers of the HTTP response. + *

+ */ + headers?: { [key: string]: string }; + + /** + *

+ * The execution latency of the test invoke request. + *

+ */ + latency?: number; + + /** + *

+ * The API Gateway execution log for the test invoke request. + *

+ */ + log?: string; + + /** + *

+ * The headers of the HTTP response as a map from string to list of values. + *

+ */ + multiValueHeaders?: { [key: string]: Array }; + + /** + *

+ * The HTTP status code. + *

+ */ + status?: number; +} + +export namespace TestInvokeMethodResponse { + export function isa(o: any): o is TestInvokeMethodResponse { + return _smithy.isa(o, "TestInvokeMethodResponse"); + } +} + +/** + *

+ * The API request rate limits. + *

+ */ +export interface ThrottleSettings { + __type?: "ThrottleSettings"; + /** + *

+ * The API request burst limit, the maximum rate limit over a time ranging from one to a few seconds, depending upon whether the underlying token bucket is at its full capacity. + *

+ */ + burstLimit?: number; + + /** + *

+ * The API request steady-state rate limit. + *

+ */ + rateLimit?: number; +} + +export namespace ThrottleSettings { + export function isa(o: any): o is ThrottleSettings { + return _smithy.isa(o, "ThrottleSettings"); + } +} + +export enum UnauthorizedCacheControlHeaderStrategy { + FAIL_WITH_403 = "FAIL_WITH_403", + SUCCEED_WITHOUT_RESPONSE_HEADER = "SUCCEED_WITHOUT_RESPONSE_HEADER", + SUCCEED_WITH_RESPONSE_HEADER = "SUCCEED_WITH_RESPONSE_HEADER", +} + +/** + *

+ * Removes a tag from a given resource. + *

+ */ +export interface UntagResourceRequest { + __type?: "UntagResourceRequest"; + name?: string; + /** + *

+ * [Required] The ARN of a resource that can be tagged. The resource ARN must be URL-encoded. + *

+ */ + resourceArn: string | undefined; + + /** + *

+ * [Required] The Tag keys to delete. + *

+ */ + tagKeys: Array | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace UntagResourceRequest { + export function isa(o: any): o is UntagResourceRequest { + return _smithy.isa(o, "UntagResourceRequest"); + } +} + +/** + *

+ * Requests API Gateway to change information about the current + * + * Account + * + * resource. + *

+ */ +export interface UpdateAccountRequest { + __type?: "UpdateAccountRequest"; + name?: string; + /** + *

+ * A list of update operations to be applied to the specified resource and in the order specified in this list. + *

+ */ + patchOperations?: Array; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace UpdateAccountRequest { + export function isa(o: any): o is UpdateAccountRequest { + return _smithy.isa(o, "UpdateAccountRequest"); + } +} + +/** + *

+ * A request to change information about an + * + * ApiKey + * + * resource. + *

+ */ +export interface UpdateApiKeyRequest { + __type?: "UpdateApiKeyRequest"; + /** + *

+ * [Required] The identifier of the + * + * ApiKey + * + * resource to be updated. + *

+ */ + apiKey: string | undefined; + + name?: string; + /** + *

+ * A list of update operations to be applied to the specified resource and in the order specified in this list. + *

+ */ + patchOperations?: Array; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace UpdateApiKeyRequest { + export function isa(o: any): o is UpdateApiKeyRequest { + return _smithy.isa(o, "UpdateApiKeyRequest"); + } +} + +/** + *

+ * Request to update an existing + * + * Authorizer + * + * resource. + *

+ */ +export interface UpdateAuthorizerRequest { + __type?: "UpdateAuthorizerRequest"; + /** + *

+ * [Required] The identifier of the + * + * Authorizer + * + * resource. + *

+ */ + authorizerId: string | undefined; + + name?: string; + /** + *

+ * A list of update operations to be applied to the specified resource and in the order specified in this list. + *

+ */ + patchOperations?: Array; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace UpdateAuthorizerRequest { + export function isa(o: any): o is UpdateAuthorizerRequest { + return _smithy.isa(o, "UpdateAuthorizerRequest"); + } +} + +/** + *

+ * A request to change information about the + * + * BasePathMapping + * + * resource. + *

+ */ +export interface UpdateBasePathMappingRequest { + __type?: "UpdateBasePathMappingRequest"; + /** + *

+ * [Required] The base path of the + * + * BasePathMapping + * + * resource to change. + *

+ *

+ * To specify an empty base path, set this parameter to + * + * '(none)' + * + * . + *

+ */ + basePath: string | undefined; + + /** + *

+ * [Required] The domain name of the + * + * BasePathMapping + * + * resource to change. + *

+ */ + domainName: string | undefined; + + name?: string; + /** + *

+ * A list of update operations to be applied to the specified resource and in the order specified in this list. + *

+ */ + patchOperations?: Array; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace UpdateBasePathMappingRequest { + export function isa(o: any): o is UpdateBasePathMappingRequest { + return _smithy.isa(o, "UpdateBasePathMappingRequest"); + } +} + +/** + *

+ * A request to change information about an + * + * ClientCertificate + * + * resource. + *

+ */ +export interface UpdateClientCertificateRequest { + __type?: "UpdateClientCertificateRequest"; + /** + *

+ * [Required] The identifier of the + * + * ClientCertificate + * + * resource to be updated. + *

+ */ + clientCertificateId: string | undefined; + + name?: string; + /** + *

+ * A list of update operations to be applied to the specified resource and in the order specified in this list. + *

+ */ + patchOperations?: Array; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace UpdateClientCertificateRequest { + export function isa(o: any): o is UpdateClientCertificateRequest { + return _smithy.isa(o, "UpdateClientCertificateRequest"); + } +} + +/** + *

+ * Requests API Gateway to change information about a + * + * Deployment + * + * resource. + *

+ */ +export interface UpdateDeploymentRequest { + __type?: "UpdateDeploymentRequest"; + /** + *

+ * The replacement identifier for the + * + * Deployment + * + * resource to change information about. + *

+ */ + deploymentId: string | undefined; + + name?: string; + /** + *

+ * A list of update operations to be applied to the specified resource and in the order specified in this list. + *

+ */ + patchOperations?: Array; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace UpdateDeploymentRequest { + export function isa(o: any): o is UpdateDeploymentRequest { + return _smithy.isa(o, "UpdateDeploymentRequest"); + } +} + +/** + *

+ * Updates an existing documentation part of a given API. + *

+ */ +export interface UpdateDocumentationPartRequest { + __type?: "UpdateDocumentationPartRequest"; + /** + *

+ * [Required] The identifier of the to-be-updated documentation part. + *

+ */ + documentationPartId: string | undefined; + + name?: string; + /** + *

+ * A list of update operations to be applied to the specified resource and in the order specified in this list. + *

+ */ + patchOperations?: Array; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace UpdateDocumentationPartRequest { + export function isa(o: any): o is UpdateDocumentationPartRequest { + return _smithy.isa(o, "UpdateDocumentationPartRequest"); + } +} + +/** + *

+ * Updates an existing documentation version of an API. + *

+ */ +export interface UpdateDocumentationVersionRequest { + __type?: "UpdateDocumentationVersionRequest"; + /** + *

+ * [Required] The version identifier of the to-be-updated documentation version. + *

+ */ + documentationVersion: string | undefined; + + name?: string; + /** + *

+ * A list of update operations to be applied to the specified resource and in the order specified in this list. + *

+ */ + patchOperations?: Array; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * .. + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace UpdateDocumentationVersionRequest { + export function isa(o: any): o is UpdateDocumentationVersionRequest { + return _smithy.isa(o, "UpdateDocumentationVersionRequest"); + } +} + +/** + *

+ * A request to change information about the + * + * DomainName + * + * resource. + *

+ */ +export interface UpdateDomainNameRequest { + __type?: "UpdateDomainNameRequest"; + /** + *

+ * [Required] The name of the + * + * DomainName + * + * resource to be changed. + *

+ */ + domainName: string | undefined; + + name?: string; + /** + *

+ * A list of update operations to be applied to the specified resource and in the order specified in this list. + *

+ */ + patchOperations?: Array; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace UpdateDomainNameRequest { + export function isa(o: any): o is UpdateDomainNameRequest { + return _smithy.isa(o, "UpdateDomainNameRequest"); + } +} + +/** + *

+ * Updates a + * + * GatewayResponse + * + * of a specified response type on the given + * + * RestApi + * + * . + *

+ */ +export interface UpdateGatewayResponseRequest { + __type?: "UpdateGatewayResponseRequest"; + name?: string; + /** + *

+ * A list of update operations to be applied to the specified resource and in the order specified in this list. + *

+ */ + patchOperations?: Array; + + /** + *

+ * [Required] + *

+ * The response type of the associated + * + * GatewayResponse + * + * . Valid values are + *

    + *
  • + * ACCESS_DENIED + *
  • + *
  • + * API_CONFIGURATION_ERROR + *
  • + *
  • + * AUTHORIZER_FAILURE + *
  • + *
  • + * AUTHORIZER_CONFIGURATION_ERROR + *
  • + *
  • + * BAD_REQUEST_PARAMETERS + *
  • + *
  • + * BAD_REQUEST_BODY + *
  • + *
  • + * DEFAULT_4XX + *
  • + *
  • + * DEFAULT_5XX + *
  • + *
  • + * EXPIRED_TOKEN + *
  • + *
  • + * INVALID_SIGNATURE + *
  • + *
  • + * INTEGRATION_FAILURE + *
  • + *
  • + * INTEGRATION_TIMEOUT + *
  • + *
  • + * INVALID_API_KEY + *
  • + *
  • + * MISSING_AUTHENTICATION_TOKEN + *
  • + *
  • + * QUOTA_EXCEEDED + *
  • + *
  • + * REQUEST_TOO_LARGE + *
  • + *
  • + * RESOURCE_NOT_FOUND + *
  • + *
  • + * THROTTLED + *
  • + *
  • + * UNAUTHORIZED + *
  • + *
  • + * UNSUPPORTED_MEDIA_TYPE + *
  • + *
+ *

+ *

+ */ + responseType: GatewayResponseType | string | undefined; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace UpdateGatewayResponseRequest { + export function isa(o: any): o is UpdateGatewayResponseRequest { + return _smithy.isa(o, "UpdateGatewayResponseRequest"); + } +} + +/** + *

+ * Represents an update integration request. + *

+ */ +export interface UpdateIntegrationRequest { + __type?: "UpdateIntegrationRequest"; + /** + *

+ * [Required] Represents an update integration request's HTTP method. + *

+ */ + httpMethod: string | undefined; + + name?: string; + /** + *

+ * A list of update operations to be applied to the specified resource and in the order specified in this list. + *

+ */ + patchOperations?: Array; + + /** + *

+ * [Required] Represents an update integration request's resource identifier. + *

+ */ + resourceId: string | undefined; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace UpdateIntegrationRequest { + export function isa(o: any): o is UpdateIntegrationRequest { + return _smithy.isa(o, "UpdateIntegrationRequest"); + } +} + +/** + *

+ * Represents an update integration response request. + *

+ */ +export interface UpdateIntegrationResponseRequest { + __type?: "UpdateIntegrationResponseRequest"; + /** + *

+ * [Required] Specifies an update integration response request's HTTP method. + *

+ */ + httpMethod: string | undefined; + + name?: string; + /** + *

+ * A list of update operations to be applied to the specified resource and in the order specified in this list. + *

+ */ + patchOperations?: Array; + + /** + *

+ * [Required] Specifies an update integration response request's resource identifier. + *

+ */ + resourceId: string | undefined; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + /** + *

+ * [Required] Specifies an update integration response request's status code. + *

+ */ + statusCode: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace UpdateIntegrationResponseRequest { + export function isa(o: any): o is UpdateIntegrationResponseRequest { + return _smithy.isa(o, "UpdateIntegrationResponseRequest"); + } +} + +/** + *

+ * Request to update an existing + * + * Method + * + * resource. + *

+ */ +export interface UpdateMethodRequest { + __type?: "UpdateMethodRequest"; + /** + *

+ * [Required] The HTTP verb of the + * + * Method + * + * resource. + *

+ */ + httpMethod: string | undefined; + + name?: string; + /** + *

+ * A list of update operations to be applied to the specified resource and in the order specified in this list. + *

+ */ + patchOperations?: Array; + + /** + *

+ * [Required] The + * + * Resource + * + * identifier for the + * + * Method + * + * resource. + *

+ */ + resourceId: string | undefined; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace UpdateMethodRequest { + export function isa(o: any): o is UpdateMethodRequest { + return _smithy.isa(o, "UpdateMethodRequest"); + } +} + +/** + *

+ * A request to update an existing + * + * MethodResponse + * + * resource. + *

+ */ +export interface UpdateMethodResponseRequest { + __type?: "UpdateMethodResponseRequest"; + /** + *

+ * [Required] The HTTP verb of the + * + * Method + * + * resource. + *

+ */ + httpMethod: string | undefined; + + name?: string; + /** + *

+ * A list of update operations to be applied to the specified resource and in the order specified in this list. + *

+ */ + patchOperations?: Array; + + /** + *

+ * [Required] The + * + * Resource + * + * identifier for the + * + * MethodResponse + * + * resource. + *

+ */ + resourceId: string | undefined; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + /** + *

+ * [Required] The status code for the + * + * MethodResponse + * + * resource. + *

+ */ + statusCode: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace UpdateMethodResponseRequest { + export function isa(o: any): o is UpdateMethodResponseRequest { + return _smithy.isa(o, "UpdateMethodResponseRequest"); + } +} + +/** + *

+ * Request to update an existing model in an existing + * + * RestApi + * + * resource. + *

+ */ +export interface UpdateModelRequest { + __type?: "UpdateModelRequest"; + /** + *

+ * [Required] The name of the model to update. + *

+ */ + modelName: string | undefined; + + name?: string; + /** + *

+ * A list of update operations to be applied to the specified resource and in the order specified in this list. + *

+ */ + patchOperations?: Array; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace UpdateModelRequest { + export function isa(o: any): o is UpdateModelRequest { + return _smithy.isa(o, "UpdateModelRequest"); + } +} + +/** + *

+ * Updates a + * + * RequestValidator + * + * of a given + * + * RestApi + * + * . + *

+ */ +export interface UpdateRequestValidatorRequest { + __type?: "UpdateRequestValidatorRequest"; + name?: string; + /** + *

+ * A list of update operations to be applied to the specified resource and in the order specified in this list. + *

+ */ + patchOperations?: Array; + + /** + *

+ * [Required] The identifier of + * + * RequestValidator + * + * to be updated. + *

+ */ + requestValidatorId: string | undefined; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace UpdateRequestValidatorRequest { + export function isa(o: any): o is UpdateRequestValidatorRequest { + return _smithy.isa(o, "UpdateRequestValidatorRequest"); + } +} + +/** + *

+ * Request to change information about a + * + * Resource + * + * resource. + *

+ */ +export interface UpdateResourceRequest { + __type?: "UpdateResourceRequest"; + name?: string; + /** + *

+ * A list of update operations to be applied to the specified resource and in the order specified in this list. + *

+ */ + patchOperations?: Array; + + /** + *

+ * [Required] The identifier of the + * + * Resource + * + * resource. + *

+ */ + resourceId: string | undefined; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace UpdateResourceRequest { + export function isa(o: any): o is UpdateResourceRequest { + return _smithy.isa(o, "UpdateResourceRequest"); + } +} + +/** + *

+ * Request to update an existing + * + * RestApi + * + * resource in your collection. + *

+ */ +export interface UpdateRestApiRequest { + __type?: "UpdateRestApiRequest"; + name?: string; + /** + *

+ * A list of update operations to be applied to the specified resource and in the order specified in this list. + *

+ */ + patchOperations?: Array; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace UpdateRestApiRequest { + export function isa(o: any): o is UpdateRestApiRequest { + return _smithy.isa(o, "UpdateRestApiRequest"); + } +} + +/** + *

+ * Requests API Gateway to change information about a + * + * Stage + * + * resource. + *

+ */ +export interface UpdateStageRequest { + __type?: "UpdateStageRequest"; + name?: string; + /** + *

+ * A list of update operations to be applied to the specified resource and in the order specified in this list. + *

+ */ + patchOperations?: Array; + + /** + *

+ * [Required] The string identifier of the associated + * + * RestApi + * + * . + *

+ */ + restApiId: string | undefined; + + /** + *

+ * [Required] The name of the + * + * Stage + * + * resource to change information about. + *

+ */ + stageName: string | undefined; + + template?: boolean; + templateSkipList?: Array; + title?: string; +} + +export namespace UpdateStageRequest { + export function isa(o: any): o is UpdateStageRequest { + return _smithy.isa(o, "UpdateStageRequest"); + } +} + +/** + *

+ * The PATCH request to update a usage plan of a given plan Id. + *

+ */ +export interface UpdateUsagePlanRequest { + __type?: "UpdateUsagePlanRequest"; + name?: string; + /** + *

+ * A list of update operations to be applied to the specified resource and in the order specified in this list. + *

+ */ + patchOperations?: Array; + + template?: boolean; + templateSkipList?: Array; + title?: string; + /** + *

+ * [Required] The Id of the to-be-updated usage plan. + *

+ */ + usagePlanId: string | undefined; +} + +export namespace UpdateUsagePlanRequest { + export function isa(o: any): o is UpdateUsagePlanRequest { + return _smithy.isa(o, "UpdateUsagePlanRequest"); + } +} + +/** + *

+ * The PATCH request to grant a temporary extension to the remaining quota of a usage plan associated with a specified API key. + *

+ */ +export interface UpdateUsageRequest { + __type?: "UpdateUsageRequest"; + /** + *

+ * [Required] The identifier of the API key associated with the usage plan in which a temporary extension is granted to the remaining quota. + *

+ */ + keyId: string | undefined; + + name?: string; + /** + *

+ * A list of update operations to be applied to the specified resource and in the order specified in this list. + *

+ */ + patchOperations?: Array; + + template?: boolean; + templateSkipList?: Array; + title?: string; + /** + *

+ * [Required] The Id of the usage plan associated with the usage data. + *

+ */ + usagePlanId: string | undefined; +} + +export namespace UpdateUsageRequest { + export function isa(o: any): o is UpdateUsageRequest { + return _smithy.isa(o, "UpdateUsageRequest"); + } +} + +/** + *

+ * Updates an existing + * + * VpcLink + * + * of a specified identifier. + *

+ */ +export interface UpdateVpcLinkRequest { + __type?: "UpdateVpcLinkRequest"; + name?: string; + /** + *

+ * A list of update operations to be applied to the specified resource and in the order specified in this list. + *

+ */ + patchOperations?: Array; + + template?: boolean; + templateSkipList?: Array; + title?: string; + /** + *

+ * [Required] The identifier of the + * + * VpcLink + * + * . It is used in an + * + * Integration + * + * to reference this + * + * VpcLink + * + * . + *

+ */ + vpcLinkId: string | undefined; +} + +export namespace UpdateVpcLinkRequest { + export function isa(o: any): o is UpdateVpcLinkRequest { + return _smithy.isa(o, "UpdateVpcLinkRequest"); + } +} + +/** + *

+ * Represents the usage data of a usage plan. + *

+ *
+ *
+ * + */ +export interface Usage extends $MetadataBearer { + __type?: "Usage"; + /** + *

+ * The ending date of the usage data. + *

+ */ + endDate?: string; + + /** + *

+ * The usage data, as daily logs of used and remaining quotas, over the specified time interval indexed over the API keys in a usage plan. For example, + * + * {..., "values" : { "{api_key}" : [ [0, 100], [10, 90], [100, 10]]} + * + * , where + * + * {api_key} + * + * stands for an API key value and the daily log entry is of the format + * + * [used quota, remaining quota] + * + * . + *

+ */ + items?: { [key: string]: Array> }; + + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; + + /** + *

+ * The starting date of the usage data. + *

+ */ + startDate?: string; + + /** + *

+ * The plan Id associated with this usage data. + *

+ */ + usagePlanId?: string; +} + +export namespace Usage { + export function isa(o: any): o is Usage { + return _smithy.isa(o, "Usage"); + } +} + +/** + *

+ * Represents a usage plan than can specify who can assess associated API stages with specified request limits and quotas. + *

+ *
+ *

+ * In a usage plan, you associate an API by specifying the API's Id and a stage name of the specified API. You add plan customers by adding API keys to the plan. + *

+ *
+ * + */ +export interface UsagePlan extends $MetadataBearer { + __type?: "UsagePlan"; + /** + *

+ * The associated API stages of a usage plan. + *

+ */ + apiStages?: Array; + + /** + *

+ * The description of a usage plan. + *

+ */ + description?: string; + + /** + *

+ * The identifier of a + * + * UsagePlan + * + * resource. + *

+ */ + id?: string; + + /** + *

+ * The name of a usage plan. + *

+ */ + name?: string; + + /** + *

+ * The AWS Markeplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace. + *

+ */ + productCode?: string; + + /** + *

+ * The maximum number of permitted requests per a given unit time interval. + *

+ */ + quota?: QuotaSettings; + + /** + *

+ * The collection of tags. Each tag element is associated with a given resource. + *

+ */ + tags?: { [key: string]: string }; + + /** + *

+ * The request throttle limits of a usage plan. + *

+ */ + throttle?: ThrottleSettings; +} + +export namespace UsagePlan { + export function isa(o: any): o is UsagePlan { + return _smithy.isa(o, "UsagePlan"); + } +} + +/** + *

+ * Represents a usage plan key to identify a plan customer. + *

+ *
+ *

+ * To associate an API stage with a selected API key in a usage plan, you must create a UsagePlanKey resource to represent the selected + * + * ApiKey + * + * . + *

+ *
+ * " + * + */ +export interface UsagePlanKey extends $MetadataBearer { + __type?: "UsagePlanKey"; + /** + *

+ * The Id of a usage plan key. + *

+ */ + id?: string; + + /** + *

+ * The name of a usage plan key. + *

+ */ + name?: string; + + /** + *

+ * The type of a usage plan key. Currently, the valid key type is + * + * API_KEY + * + * . + *

+ */ + type?: string; + + /** + *

+ * The value of a usage plan key. + *

+ */ + value?: string; +} + +export namespace UsagePlanKey { + export function isa(o: any): o is UsagePlanKey { + return _smithy.isa(o, "UsagePlanKey"); + } +} + +/** + *

+ * Represents the collection of usage plan keys added to usage plans for the associated API keys and, possibly, other types of keys. + *

+ * + */ +export interface UsagePlanKeys extends $MetadataBearer { + __type?: "UsagePlanKeys"; + /** + *

+ * The current page of elements from this collection. + *

+ */ + items?: Array; + + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; +} + +export namespace UsagePlanKeys { + export function isa(o: any): o is UsagePlanKeys { + return _smithy.isa(o, "UsagePlanKeys"); + } +} + +/** + *

+ * Represents a collection of usage plans for an AWS account. + *

+ * + */ +export interface UsagePlans extends $MetadataBearer { + __type?: "UsagePlans"; + /** + *

+ * The current page of elements from this collection. + *

+ */ + items?: Array; + + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; +} + +export namespace UsagePlans { + export function isa(o: any): o is UsagePlans { + return _smithy.isa(o, "UsagePlans"); + } +} + +/** + *

+ * A API Gateway VPC link for a + * + * RestApi + * + * to access resources in an Amazon Virtual Private Cloud (VPC). + *

+ *
+ *

+ *

+ * To enable access to a resource in an Amazon Virtual Private Cloud through Amazon API Gateway, you, as an API developer, create a + * + * VpcLink + * + * resource targeted for one or more network load balancers of the VPC and then integrate an API method with a private integration that uses the + * + * VpcLink + * + * . The private integration has an integration type of + * + * HTTP + * + * or + * + * HTTP_PROXY + * + * and has a connection type of + * + * VPC_LINK + * + * . The integration uses the + * + * connectionId + * + * property to identify the + * + * VpcLink + * + * used. + *

+ *

+ *
+ */ +export interface VpcLink extends $MetadataBearer { + __type?: "VpcLink"; + /** + *

+ * The description of the VPC link. + *

+ */ + description?: string; + + /** + *

+ * The identifier of the + * + * VpcLink + * + * . It is used in an + * + * Integration + * + * to reference this + * + * VpcLink + * + * . + *

+ */ + id?: string; + + /** + *

+ * The name used to label and identify the VPC link. + *

+ */ + name?: string; + + /** + *

+ * The status of the VPC link. The valid values are + * + * AVAILABLE + * + * , + * + * PENDING + * + * , + * + * DELETING + * + * , or + * + * FAILED + * + * . Deploying an API will wait if the status is + * + * PENDING + * + * and will fail if the status is + * + * DELETING + * + * . + *

+ */ + status?: VpcLinkStatus | string; + + /** + *

+ * A description about the VPC link status. + *

+ */ + statusMessage?: string; + + /** + *

+ * The collection of tags. Each tag element is associated with a given resource. + *

+ */ + tags?: { [key: string]: string }; + + /** + *

+ * The ARNs of network load balancers of the VPC targeted by the VPC link. The network load balancers must be owned by the same AWS account of the API owner. + *

+ */ + targetArns?: Array; +} + +export namespace VpcLink { + export function isa(o: any): o is VpcLink { + return _smithy.isa(o, "VpcLink"); + } +} + +export enum VpcLinkStatus { + AVAILABLE = "AVAILABLE", + DELETING = "DELETING", + FAILED = "FAILED", + PENDING = "PENDING", +} + +/** + *

+ * The collection of VPC links under the caller's account in a region. + *

+ * + */ +export interface VpcLinks extends $MetadataBearer { + __type?: "VpcLinks"; + /** + *

+ * The current page of elements from this collection. + *

+ */ + items?: Array; + + /** + *

+ * The current pagination position in the paged result set. + *

+ */ + position?: string; +} + +export namespace VpcLinks { + export function isa(o: any): o is VpcLinks { + return _smithy.isa(o, "VpcLinks"); + } +} + +export type Op = "add" | "copy" | "move" | "remove" | "replace" | "test" + +/** + * A single patch operation to apply to the specified resource. Please refer to + * http://tools.ietf.org/html/rfc6902#section-4 for an explanation of how each operation is used. + */ +export interface PatchOperation { + __type?: "PatchOperation"; + /** + *

+ * The + * + * copy + * + * update operation's source as identified by a + * + * JSON-Pointer + * + * value referencing the location within the targeted resource to copy the value from. For example, to promote a canary deployment, you copy the canary deployment ID to the affiliated deployment ID by calling a PATCH request on a + * + * Stage + * + * resource with + * + * "op":"copy" + * + * , + * + * "from":"/canarySettings/deploymentId" + * + * and + * + * "path":"/deploymentId" + * + * . + *

+ */ + from?: string; + + /** + *

+ * An update operation to be performed with this PATCH request. The valid value can be + * + * add + * + * , + * + * remove + * + * , + * + * replace + * + * or + * + * copy + * + * . Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message. + *

+ */ + op?: Op | string; + + /** + *

+ * The + * + * op + * + * operation's target, as identified by a + * + * JSON Pointer + * + * value that references a location within the targeted resource. For example, if the target resource has an updateable property of + * + * {"name":"value"} + * + * , the path for this property is + * + * /name + * + * . If the + * + * name + * + * property value is a JSON object (e.g., + * + * {"name": {"child/name": "child-value"}} + * + * ), the path for the + * + * child/name + * + * property will be + * + * /name/child~1name + * + * . Any slash ("/") character appearing in path names must be escaped with "~1", as shown in the example above. Each + * + * op + * + * operation can have only one + * + * path + * + * associated with it. + *

+ */ + path?: string; + + /** + *

+ * The new target value of the update operation. It is applicable for the + * + * add + * + * or + * + * replace + * + * operation. When using AWS CLI to update a property of a JSON value, enclose the JSON object with a pair of single quotes in a Linux shell, e.g., '{"a": ...}'. In a Windows shell, see + * + * Using JSON for Parameters + * + * . + *

+ */ + value?: string; +} + +export namespace PatchOperation { + export function isa(o: any): o is PatchOperation { + return _smithy.isa(o, "PatchOperation"); + } +} + +/** + *

+ * The submitted request is not valid, for example, the input is incomplete or incorrect. See the accompanying error message for details. + *

+ */ +export interface BadRequestException extends _smithy.SmithyException, $MetadataBearer { + __type: "BadRequestException"; + $fault: "client"; + message?: string; +} + +export namespace BadRequestException { + export function isa(o: any): o is BadRequestException { + return _smithy.isa(o, "BadRequestException"); + } +} + +/** + *

+ * The request configuration has conflicts. For details, see the accompanying error message. + *

+ */ +export interface ConflictException extends _smithy.SmithyException, $MetadataBearer { + __type: "ConflictException"; + $fault: "client"; + message?: string; +} + +export namespace ConflictException { + export function isa(o: any): o is ConflictException { + return _smithy.isa(o, "ConflictException"); + } +} + +/** + *

+ * The request exceeded the rate limit. Retry after the specified time period. + *

+ */ +export interface LimitExceededException extends _smithy.SmithyException, $MetadataBearer { + __type: "LimitExceededException"; + $fault: "client"; + message?: string; + retryAfterSeconds?: string; +} + +export namespace LimitExceededException { + export function isa(o: any): o is LimitExceededException { + return _smithy.isa(o, "LimitExceededException"); + } +} + +/** + *

+ * The requested resource is not found. Make sure that the request URI is correct. + *

+ */ +export interface NotFoundException extends _smithy.SmithyException, $MetadataBearer { + __type: "NotFoundException"; + $fault: "client"; + message?: string; +} + +export namespace NotFoundException { + export function isa(o: any): o is NotFoundException { + return _smithy.isa(o, "NotFoundException"); + } +} + +/** + *

+ * The requested service is not available. For details see the accompanying error message. Retry after the specified time period. + *

+ */ +export interface ServiceUnavailableException extends _smithy.SmithyException, $MetadataBearer { + __type: "ServiceUnavailableException"; + $fault: "server"; + message?: string; + retryAfterSeconds?: string; +} + +export namespace ServiceUnavailableException { + export function isa(o: any): o is ServiceUnavailableException { + return _smithy.isa(o, "ServiceUnavailableException"); + } +} + +/** + *

+ * The request has reached its throttling limit. Retry after the specified time period. + *

+ */ +export interface TooManyRequestsException extends _smithy.SmithyException, $MetadataBearer { + __type: "TooManyRequestsException"; + $fault: "client"; + message?: string; + retryAfterSeconds?: string; +} + +export namespace TooManyRequestsException { + export function isa(o: any): o is TooManyRequestsException { + return _smithy.isa(o, "TooManyRequestsException"); + } +} + +/** + *

+ * The request is denied because the caller has insufficient permissions. + *

+ */ +export interface UnauthorizedException extends _smithy.SmithyException, $MetadataBearer { + __type: "UnauthorizedException"; + $fault: "client"; + message?: string; +} + +export namespace UnauthorizedException { + export function isa(o: any): o is UnauthorizedException { + return _smithy.isa(o, "UnauthorizedException"); + } +} diff --git a/clients/client-api-gateway/package.json b/clients/client-api-gateway/package.json new file mode 100644 index 000000000000..7b0b6ca2255d --- /dev/null +++ b/clients/client-api-gateway/package.json @@ -0,0 +1,76 @@ +{ + "name": "@aws-sdk/client-api-gateway", + "description": "@aws-sdk/client-api-gateway client", + "version": "1.0.0", + "scripts": { + "clean": "npm run remove-definitions && npm run remove-dist && npm run remove-js && npm run remove-maps", + "build-documentation": "npm run clean && typedoc ./", + "prepublishOnly": "yarn build", + "pretest": "tsc", + "remove-definitions": "rimraf ./types", + "remove-dist": "rimraf ./dist", + "remove-documentation": "rimraf ./docs", + "remove-js": "rimraf *.js && rimraf ./commands/*.js && rimraf ./models/*.js && rimraf ./protocols/*.js", + "remove-maps": "rimraf *.js.map && rimraf ./commands/*.js.map && rimraf ./models/*.js.map && rimraf ./protocols/*.js.map", + "test": "exit 0", + "smoke-test": "npm run pretest && node ./test/smoke/index.spec.js", + "build:es": "tsc -p tsconfig.es.json", + "build": "yarn pretest && yarn build:es" + }, + "main": "./dist/cjs/index.js", + "types": "./types/index.d.ts", + "module": "./dist/es/index.js", + "browser": { + "./runtimeConfig": "./runtimeConfig.browser" + }, + "sideEffects": false, + "dependencies": { + "tslib": "^1.8.0", + "@aws-crypto/sha256-browser": "^0.1.0-preview.1", + "@aws-sdk/config-resolver": "^0.1.0-preview.5", + "@aws-sdk/credential-provider-node": "^0.1.0-preview.7", + "@aws-sdk/fetch-http-handler": "^0.1.0-preview.5", + "@aws-sdk/hash-node": "^0.1.0-preview.5", + "@aws-sdk/invalid-dependency": "^0.1.0-preview.1", + "@aws-sdk/middleware-content-length": "^0.1.0-preview.5", + "@aws-sdk/middleware-host-header": "^0.1.0-preview.1", + "@aws-sdk/middleware-retry": "^0.1.0-preview.5", + "@aws-sdk/middleware-sdk-api-gateway": "^0.1.0-preview.5", + "@aws-sdk/middleware-serde": "^0.1.0-preview.1", + "@aws-sdk/middleware-signing": "^0.1.0-preview.7", + "@aws-sdk/middleware-stack": "^0.1.0-preview.6", + "@aws-sdk/middleware-user-agent": "^0.1.0-preview.1", + "@aws-sdk/node-http-handler": "^0.1.0-preview.6", + "@aws-sdk/protocol-http": "^0.1.0-preview.1", + "@aws-sdk/region-provider": "^0.1.0-preview.5", + "@aws-sdk/smithy-client": "^0.1.0-preview.1", + "@aws-sdk/stream-collector-browser": "^0.1.0-preview.5", + "@aws-sdk/stream-collector-node": "^0.1.0-preview.6", + "@aws-sdk/types": "^0.1.0-preview.5", + "@aws-sdk/url-parser-browser": "^0.1.0-preview.5", + "@aws-sdk/url-parser-node": "^0.1.0-preview.5", + "@aws-sdk/util-base64-browser": "^0.1.0-preview.3", + "@aws-sdk/util-base64-node": "^0.1.0-preview.3", + "@aws-sdk/util-body-length-browser": "^0.1.0-preview.3", + "@aws-sdk/util-body-length-node": "^0.1.0-preview.4", + "@aws-sdk/util-user-agent-browser": "^0.1.0-preview.6", + "@aws-sdk/util-user-agent-node": "^0.1.0-preview.6", + "@aws-sdk/util-utf8-browser": "^0.1.0-preview.3", + "@aws-sdk/util-utf8-node": "^0.1.0-preview.3" + }, + "devDependencies": { + "rimraf": "^3.0.0", + "typedoc": "^0.15.0", + "typescript": "^3.6.3", + "@types/node": "^12.7.5", + "tslib": "^1.8.0" + }, + "engines": { + "node": ">=8.0.0" + }, + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0" +} \ No newline at end of file diff --git a/clients/client-api-gateway/protocols/Aws_restJson1_1.ts b/clients/client-api-gateway/protocols/Aws_restJson1_1.ts new file mode 100644 index 000000000000..89eb022dd269 --- /dev/null +++ b/clients/client-api-gateway/protocols/Aws_restJson1_1.ts @@ -0,0 +1,17534 @@ +import { + CreateApiKeyCommandInput, + CreateApiKeyCommandOutput, +} from "../commands/CreateApiKeyCommand"; +import { + CreateAuthorizerCommandInput, + CreateAuthorizerCommandOutput, +} from "../commands/CreateAuthorizerCommand"; +import { + CreateBasePathMappingCommandInput, + CreateBasePathMappingCommandOutput, +} from "../commands/CreateBasePathMappingCommand"; +import { + CreateDeploymentCommandInput, + CreateDeploymentCommandOutput, +} from "../commands/CreateDeploymentCommand"; +import { + CreateDocumentationPartCommandInput, + CreateDocumentationPartCommandOutput, +} from "../commands/CreateDocumentationPartCommand"; +import { + CreateDocumentationVersionCommandInput, + CreateDocumentationVersionCommandOutput, +} from "../commands/CreateDocumentationVersionCommand"; +import { + CreateDomainNameCommandInput, + CreateDomainNameCommandOutput, +} from "../commands/CreateDomainNameCommand"; +import { + CreateModelCommandInput, + CreateModelCommandOutput, +} from "../commands/CreateModelCommand"; +import { + CreateRequestValidatorCommandInput, + CreateRequestValidatorCommandOutput, +} from "../commands/CreateRequestValidatorCommand"; +import { + CreateResourceCommandInput, + CreateResourceCommandOutput, +} from "../commands/CreateResourceCommand"; +import { + CreateRestApiCommandInput, + CreateRestApiCommandOutput, +} from "../commands/CreateRestApiCommand"; +import { + CreateStageCommandInput, + CreateStageCommandOutput, +} from "../commands/CreateStageCommand"; +import { + CreateUsagePlanCommandInput, + CreateUsagePlanCommandOutput, +} from "../commands/CreateUsagePlanCommand"; +import { + CreateUsagePlanKeyCommandInput, + CreateUsagePlanKeyCommandOutput, +} from "../commands/CreateUsagePlanKeyCommand"; +import { + CreateVpcLinkCommandInput, + CreateVpcLinkCommandOutput, +} from "../commands/CreateVpcLinkCommand"; +import { + DeleteApiKeyCommandInput, + DeleteApiKeyCommandOutput, +} from "../commands/DeleteApiKeyCommand"; +import { + DeleteAuthorizerCommandInput, + DeleteAuthorizerCommandOutput, +} from "../commands/DeleteAuthorizerCommand"; +import { + DeleteBasePathMappingCommandInput, + DeleteBasePathMappingCommandOutput, +} from "../commands/DeleteBasePathMappingCommand"; +import { + DeleteClientCertificateCommandInput, + DeleteClientCertificateCommandOutput, +} from "../commands/DeleteClientCertificateCommand"; +import { + DeleteDeploymentCommandInput, + DeleteDeploymentCommandOutput, +} from "../commands/DeleteDeploymentCommand"; +import { + DeleteDocumentationPartCommandInput, + DeleteDocumentationPartCommandOutput, +} from "../commands/DeleteDocumentationPartCommand"; +import { + DeleteDocumentationVersionCommandInput, + DeleteDocumentationVersionCommandOutput, +} from "../commands/DeleteDocumentationVersionCommand"; +import { + DeleteDomainNameCommandInput, + DeleteDomainNameCommandOutput, +} from "../commands/DeleteDomainNameCommand"; +import { + DeleteGatewayResponseCommandInput, + DeleteGatewayResponseCommandOutput, +} from "../commands/DeleteGatewayResponseCommand"; +import { + DeleteIntegrationCommandInput, + DeleteIntegrationCommandOutput, +} from "../commands/DeleteIntegrationCommand"; +import { + DeleteIntegrationResponseCommandInput, + DeleteIntegrationResponseCommandOutput, +} from "../commands/DeleteIntegrationResponseCommand"; +import { + DeleteMethodCommandInput, + DeleteMethodCommandOutput, +} from "../commands/DeleteMethodCommand"; +import { + DeleteMethodResponseCommandInput, + DeleteMethodResponseCommandOutput, +} from "../commands/DeleteMethodResponseCommand"; +import { + DeleteModelCommandInput, + DeleteModelCommandOutput, +} from "../commands/DeleteModelCommand"; +import { + DeleteRequestValidatorCommandInput, + DeleteRequestValidatorCommandOutput, +} from "../commands/DeleteRequestValidatorCommand"; +import { + DeleteResourceCommandInput, + DeleteResourceCommandOutput, +} from "../commands/DeleteResourceCommand"; +import { + DeleteRestApiCommandInput, + DeleteRestApiCommandOutput, +} from "../commands/DeleteRestApiCommand"; +import { + DeleteStageCommandInput, + DeleteStageCommandOutput, +} from "../commands/DeleteStageCommand"; +import { + DeleteUsagePlanCommandInput, + DeleteUsagePlanCommandOutput, +} from "../commands/DeleteUsagePlanCommand"; +import { + DeleteUsagePlanKeyCommandInput, + DeleteUsagePlanKeyCommandOutput, +} from "../commands/DeleteUsagePlanKeyCommand"; +import { + DeleteVpcLinkCommandInput, + DeleteVpcLinkCommandOutput, +} from "../commands/DeleteVpcLinkCommand"; +import { + FlushStageAuthorizersCacheCommandInput, + FlushStageAuthorizersCacheCommandOutput, +} from "../commands/FlushStageAuthorizersCacheCommand"; +import { + FlushStageCacheCommandInput, + FlushStageCacheCommandOutput, +} from "../commands/FlushStageCacheCommand"; +import { + GenerateClientCertificateCommandInput, + GenerateClientCertificateCommandOutput, +} from "../commands/GenerateClientCertificateCommand"; +import { + GetAccountCommandInput, + GetAccountCommandOutput, +} from "../commands/GetAccountCommand"; +import { + GetApiKeyCommandInput, + GetApiKeyCommandOutput, +} from "../commands/GetApiKeyCommand"; +import { + GetApiKeysCommandInput, + GetApiKeysCommandOutput, +} from "../commands/GetApiKeysCommand"; +import { + GetAuthorizerCommandInput, + GetAuthorizerCommandOutput, +} from "../commands/GetAuthorizerCommand"; +import { + GetAuthorizersCommandInput, + GetAuthorizersCommandOutput, +} from "../commands/GetAuthorizersCommand"; +import { + GetBasePathMappingCommandInput, + GetBasePathMappingCommandOutput, +} from "../commands/GetBasePathMappingCommand"; +import { + GetBasePathMappingsCommandInput, + GetBasePathMappingsCommandOutput, +} from "../commands/GetBasePathMappingsCommand"; +import { + GetClientCertificateCommandInput, + GetClientCertificateCommandOutput, +} from "../commands/GetClientCertificateCommand"; +import { + GetClientCertificatesCommandInput, + GetClientCertificatesCommandOutput, +} from "../commands/GetClientCertificatesCommand"; +import { + GetDeploymentCommandInput, + GetDeploymentCommandOutput, +} from "../commands/GetDeploymentCommand"; +import { + GetDeploymentsCommandInput, + GetDeploymentsCommandOutput, +} from "../commands/GetDeploymentsCommand"; +import { + GetDocumentationPartCommandInput, + GetDocumentationPartCommandOutput, +} from "../commands/GetDocumentationPartCommand"; +import { + GetDocumentationPartsCommandInput, + GetDocumentationPartsCommandOutput, +} from "../commands/GetDocumentationPartsCommand"; +import { + GetDocumentationVersionCommandInput, + GetDocumentationVersionCommandOutput, +} from "../commands/GetDocumentationVersionCommand"; +import { + GetDocumentationVersionsCommandInput, + GetDocumentationVersionsCommandOutput, +} from "../commands/GetDocumentationVersionsCommand"; +import { + GetDomainNameCommandInput, + GetDomainNameCommandOutput, +} from "../commands/GetDomainNameCommand"; +import { + GetDomainNamesCommandInput, + GetDomainNamesCommandOutput, +} from "../commands/GetDomainNamesCommand"; +import { + GetExportCommandInput, + GetExportCommandOutput, +} from "../commands/GetExportCommand"; +import { + GetGatewayResponseCommandInput, + GetGatewayResponseCommandOutput, +} from "../commands/GetGatewayResponseCommand"; +import { + GetGatewayResponsesCommandInput, + GetGatewayResponsesCommandOutput, +} from "../commands/GetGatewayResponsesCommand"; +import { + GetIntegrationCommandInput, + GetIntegrationCommandOutput, +} from "../commands/GetIntegrationCommand"; +import { + GetIntegrationResponseCommandInput, + GetIntegrationResponseCommandOutput, +} from "../commands/GetIntegrationResponseCommand"; +import { + GetMethodCommandInput, + GetMethodCommandOutput, +} from "../commands/GetMethodCommand"; +import { + GetMethodResponseCommandInput, + GetMethodResponseCommandOutput, +} from "../commands/GetMethodResponseCommand"; +import { + GetModelCommandInput, + GetModelCommandOutput, +} from "../commands/GetModelCommand"; +import { + GetModelTemplateCommandInput, + GetModelTemplateCommandOutput, +} from "../commands/GetModelTemplateCommand"; +import { + GetModelsCommandInput, + GetModelsCommandOutput, +} from "../commands/GetModelsCommand"; +import { + GetRequestValidatorCommandInput, + GetRequestValidatorCommandOutput, +} from "../commands/GetRequestValidatorCommand"; +import { + GetRequestValidatorsCommandInput, + GetRequestValidatorsCommandOutput, +} from "../commands/GetRequestValidatorsCommand"; +import { + GetResourceCommandInput, + GetResourceCommandOutput, +} from "../commands/GetResourceCommand"; +import { + GetResourcesCommandInput, + GetResourcesCommandOutput, +} from "../commands/GetResourcesCommand"; +import { + GetRestApiCommandInput, + GetRestApiCommandOutput, +} from "../commands/GetRestApiCommand"; +import { + GetRestApisCommandInput, + GetRestApisCommandOutput, +} from "../commands/GetRestApisCommand"; +import { + GetSdkCommandInput, + GetSdkCommandOutput, +} from "../commands/GetSdkCommand"; +import { + GetSdkTypeCommandInput, + GetSdkTypeCommandOutput, +} from "../commands/GetSdkTypeCommand"; +import { + GetSdkTypesCommandInput, + GetSdkTypesCommandOutput, +} from "../commands/GetSdkTypesCommand"; +import { + GetStageCommandInput, + GetStageCommandOutput, +} from "../commands/GetStageCommand"; +import { + GetStagesCommandInput, + GetStagesCommandOutput, +} from "../commands/GetStagesCommand"; +import { + GetTagsCommandInput, + GetTagsCommandOutput, +} from "../commands/GetTagsCommand"; +import { + GetUsageCommandInput, + GetUsageCommandOutput, +} from "../commands/GetUsageCommand"; +import { + GetUsagePlanCommandInput, + GetUsagePlanCommandOutput, +} from "../commands/GetUsagePlanCommand"; +import { + GetUsagePlanKeyCommandInput, + GetUsagePlanKeyCommandOutput, +} from "../commands/GetUsagePlanKeyCommand"; +import { + GetUsagePlanKeysCommandInput, + GetUsagePlanKeysCommandOutput, +} from "../commands/GetUsagePlanKeysCommand"; +import { + GetUsagePlansCommandInput, + GetUsagePlansCommandOutput, +} from "../commands/GetUsagePlansCommand"; +import { + GetVpcLinkCommandInput, + GetVpcLinkCommandOutput, +} from "../commands/GetVpcLinkCommand"; +import { + GetVpcLinksCommandInput, + GetVpcLinksCommandOutput, +} from "../commands/GetVpcLinksCommand"; +import { + ImportApiKeysCommandInput, + ImportApiKeysCommandOutput, +} from "../commands/ImportApiKeysCommand"; +import { + ImportDocumentationPartsCommandInput, + ImportDocumentationPartsCommandOutput, +} from "../commands/ImportDocumentationPartsCommand"; +import { + ImportRestApiCommandInput, + ImportRestApiCommandOutput, +} from "../commands/ImportRestApiCommand"; +import { + PutGatewayResponseCommandInput, + PutGatewayResponseCommandOutput, +} from "../commands/PutGatewayResponseCommand"; +import { + PutIntegrationCommandInput, + PutIntegrationCommandOutput, +} from "../commands/PutIntegrationCommand"; +import { + PutIntegrationResponseCommandInput, + PutIntegrationResponseCommandOutput, +} from "../commands/PutIntegrationResponseCommand"; +import { + PutMethodCommandInput, + PutMethodCommandOutput, +} from "../commands/PutMethodCommand"; +import { + PutMethodResponseCommandInput, + PutMethodResponseCommandOutput, +} from "../commands/PutMethodResponseCommand"; +import { + PutRestApiCommandInput, + PutRestApiCommandOutput, +} from "../commands/PutRestApiCommand"; +import { + TagResourceCommandInput, + TagResourceCommandOutput, +} from "../commands/TagResourceCommand"; +import { + TestInvokeAuthorizerCommandInput, + TestInvokeAuthorizerCommandOutput, +} from "../commands/TestInvokeAuthorizerCommand"; +import { + TestInvokeMethodCommandInput, + TestInvokeMethodCommandOutput, +} from "../commands/TestInvokeMethodCommand"; +import { + UntagResourceCommandInput, + UntagResourceCommandOutput, +} from "../commands/UntagResourceCommand"; +import { + UpdateAccountCommandInput, + UpdateAccountCommandOutput, +} from "../commands/UpdateAccountCommand"; +import { + UpdateApiKeyCommandInput, + UpdateApiKeyCommandOutput, +} from "../commands/UpdateApiKeyCommand"; +import { + UpdateAuthorizerCommandInput, + UpdateAuthorizerCommandOutput, +} from "../commands/UpdateAuthorizerCommand"; +import { + UpdateBasePathMappingCommandInput, + UpdateBasePathMappingCommandOutput, +} from "../commands/UpdateBasePathMappingCommand"; +import { + UpdateClientCertificateCommandInput, + UpdateClientCertificateCommandOutput, +} from "../commands/UpdateClientCertificateCommand"; +import { + UpdateDeploymentCommandInput, + UpdateDeploymentCommandOutput, +} from "../commands/UpdateDeploymentCommand"; +import { + UpdateDocumentationPartCommandInput, + UpdateDocumentationPartCommandOutput, +} from "../commands/UpdateDocumentationPartCommand"; +import { + UpdateDocumentationVersionCommandInput, + UpdateDocumentationVersionCommandOutput, +} from "../commands/UpdateDocumentationVersionCommand"; +import { + UpdateDomainNameCommandInput, + UpdateDomainNameCommandOutput, +} from "../commands/UpdateDomainNameCommand"; +import { + UpdateGatewayResponseCommandInput, + UpdateGatewayResponseCommandOutput, +} from "../commands/UpdateGatewayResponseCommand"; +import { + UpdateIntegrationCommandInput, + UpdateIntegrationCommandOutput, +} from "../commands/UpdateIntegrationCommand"; +import { + UpdateIntegrationResponseCommandInput, + UpdateIntegrationResponseCommandOutput, +} from "../commands/UpdateIntegrationResponseCommand"; +import { + UpdateMethodCommandInput, + UpdateMethodCommandOutput, +} from "../commands/UpdateMethodCommand"; +import { + UpdateMethodResponseCommandInput, + UpdateMethodResponseCommandOutput, +} from "../commands/UpdateMethodResponseCommand"; +import { + UpdateModelCommandInput, + UpdateModelCommandOutput, +} from "../commands/UpdateModelCommand"; +import { + UpdateRequestValidatorCommandInput, + UpdateRequestValidatorCommandOutput, +} from "../commands/UpdateRequestValidatorCommand"; +import { + UpdateResourceCommandInput, + UpdateResourceCommandOutput, +} from "../commands/UpdateResourceCommand"; +import { + UpdateRestApiCommandInput, + UpdateRestApiCommandOutput, +} from "../commands/UpdateRestApiCommand"; +import { + UpdateStageCommandInput, + UpdateStageCommandOutput, +} from "../commands/UpdateStageCommand"; +import { + UpdateUsageCommandInput, + UpdateUsageCommandOutput, +} from "../commands/UpdateUsageCommand"; +import { + UpdateUsagePlanCommandInput, + UpdateUsagePlanCommandOutput, +} from "../commands/UpdateUsagePlanCommand"; +import { + UpdateVpcLinkCommandInput, + UpdateVpcLinkCommandOutput, +} from "../commands/UpdateVpcLinkCommand"; +import { + AccessLogSettings, + ApiKey, + ApiStage, + Authorizer, + BadRequestException, + BasePathMapping, + CanarySettings, + ClientCertificate, + ConflictException, + Deployment, + DeploymentCanarySettings, + DocumentationPart, + DocumentationPartLocation, + DocumentationVersion, + DomainName, + EndpointConfiguration, + EndpointType, + GatewayResponse, + Integration, + IntegrationResponse, + LimitExceededException, + Method, + MethodResponse, + MethodSetting, + MethodSnapshot, + Model, + NotFoundException, + PatchOperation, + QuotaSettings, + RequestValidator, + Resource, + RestApi, + SdkConfigurationProperty, + SdkType, + ServiceUnavailableException, + Stage, + StageKey, + ThrottleSettings, + TooManyRequestsException, + UnauthorizedException, + UsagePlan, + UsagePlanKey, + VpcLink, +} from "../models/index"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@aws-sdk/protocol-http"; +import { SmithyException as __SmithyException } from "@aws-sdk/smithy-client"; +import { + Endpoint as __Endpoint, + MetadataBearer as __MetadataBearer, + ResponseMetadata as __ResponseMetadata, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +export async function serializeAws_restJson1_1CreateApiKeyCommand( + input: CreateApiKeyCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/apikeys"; + let body: any = {}; + const bodyParams: any = {}; + if (input.customerId !== undefined) { + bodyParams['customerId'] = input.customerId; + } + if (input.description !== undefined) { + bodyParams['description'] = input.description; + } + if (input.enabled !== undefined) { + bodyParams['enabled'] = input.enabled; + } + if (input.generateDistinctId !== undefined) { + bodyParams['generateDistinctId'] = input.generateDistinctId; + } + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.stageKeys !== undefined) { + bodyParams['stageKeys'] = serializeAws_restJson1_1ListOfStageKeys(input.stageKeys, context); + } + if (input.tags !== undefined) { + bodyParams['tags'] = serializeAws_restJson1_1MapOfStringToString(input.tags, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + if (input.value !== undefined) { + bodyParams['value'] = input.value; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1CreateAuthorizerCommand( + input: CreateAuthorizerCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/authorizers"; + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.authType !== undefined) { + bodyParams['authType'] = input.authType; + } + if (input.authorizerCredentials !== undefined) { + bodyParams['authorizerCredentials'] = input.authorizerCredentials; + } + if (input.authorizerResultTtlInSeconds !== undefined) { + bodyParams['authorizerResultTtlInSeconds'] = input.authorizerResultTtlInSeconds; + } + if (input.authorizerUri !== undefined) { + bodyParams['authorizerUri'] = input.authorizerUri; + } + if (input.identitySource !== undefined) { + bodyParams['identitySource'] = input.identitySource; + } + if (input.identityValidationExpression !== undefined) { + bodyParams['identityValidationExpression'] = input.identityValidationExpression; + } + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.providerARNs !== undefined) { + bodyParams['providerARNs'] = serializeAws_restJson1_1ListOfARNs(input.providerARNs, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + if (input.type !== undefined) { + bodyParams['type'] = input.type; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1CreateBasePathMappingCommand( + input: CreateBasePathMappingCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/domainnames/{domainName}/basepathmappings"; + if (input.domainName !== undefined) { + const labelValue: any = input.domainName.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: domainName.'); + } + resolvedPath = resolvedPath.replace('{domainName}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: domainName.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.basePath !== undefined) { + bodyParams['basePath'] = input.basePath; + } + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.restApiId !== undefined) { + bodyParams['restApiId'] = input.restApiId; + } + if (input.stage !== undefined) { + bodyParams['stage'] = input.stage; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1CreateDeploymentCommand( + input: CreateDeploymentCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/deployments"; + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.cacheClusterEnabled !== undefined) { + bodyParams['cacheClusterEnabled'] = input.cacheClusterEnabled; + } + if (input.cacheClusterSize !== undefined) { + bodyParams['cacheClusterSize'] = input.cacheClusterSize; + } + if (input.canarySettings !== undefined) { + bodyParams['canarySettings'] = serializeAws_restJson1_1DeploymentCanarySettings(input.canarySettings, context); + } + if (input.description !== undefined) { + bodyParams['description'] = input.description; + } + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.stageDescription !== undefined) { + bodyParams['stageDescription'] = input.stageDescription; + } + if (input.stageName !== undefined) { + bodyParams['stageName'] = input.stageName; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + if (input.tracingEnabled !== undefined) { + bodyParams['tracingEnabled'] = input.tracingEnabled; + } + if (input.variables !== undefined) { + bodyParams['variables'] = serializeAws_restJson1_1MapOfStringToString(input.variables, context); + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1CreateDocumentationPartCommand( + input: CreateDocumentationPartCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/documentation/parts"; + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.location !== undefined) { + bodyParams['location'] = serializeAws_restJson1_1DocumentationPartLocation(input.location, context); + } + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.properties !== undefined) { + bodyParams['properties'] = input.properties; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1CreateDocumentationVersionCommand( + input: CreateDocumentationVersionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/documentation/versions"; + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.description !== undefined) { + bodyParams['description'] = input.description; + } + if (input.documentationVersion !== undefined) { + bodyParams['documentationVersion'] = input.documentationVersion; + } + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.stageName !== undefined) { + bodyParams['stageName'] = input.stageName; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1CreateDomainNameCommand( + input: CreateDomainNameCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/domainnames"; + let body: any = {}; + const bodyParams: any = {}; + if (input.certificateArn !== undefined) { + bodyParams['certificateArn'] = input.certificateArn; + } + if (input.certificateBody !== undefined) { + bodyParams['certificateBody'] = input.certificateBody; + } + if (input.certificateChain !== undefined) { + bodyParams['certificateChain'] = input.certificateChain; + } + if (input.certificateName !== undefined) { + bodyParams['certificateName'] = input.certificateName; + } + if (input.certificatePrivateKey !== undefined) { + bodyParams['certificatePrivateKey'] = input.certificatePrivateKey; + } + if (input.domainName !== undefined) { + bodyParams['domainName'] = input.domainName; + } + if (input.endpointConfiguration !== undefined) { + bodyParams['endpointConfiguration'] = serializeAws_restJson1_1EndpointConfiguration(input.endpointConfiguration, context); + } + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.regionalCertificateArn !== undefined) { + bodyParams['regionalCertificateArn'] = input.regionalCertificateArn; + } + if (input.regionalCertificateName !== undefined) { + bodyParams['regionalCertificateName'] = input.regionalCertificateName; + } + if (input.securityPolicy !== undefined) { + bodyParams['securityPolicy'] = input.securityPolicy; + } + if (input.tags !== undefined) { + bodyParams['tags'] = serializeAws_restJson1_1MapOfStringToString(input.tags, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1CreateModelCommand( + input: CreateModelCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/models"; + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.contentType !== undefined) { + bodyParams['contentType'] = input.contentType; + } + if (input.description !== undefined) { + bodyParams['description'] = input.description; + } + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.schema !== undefined) { + bodyParams['schema'] = input.schema; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1CreateRequestValidatorCommand( + input: CreateRequestValidatorCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/requestvalidators"; + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + if (input.validateRequestBody !== undefined) { + bodyParams['validateRequestBody'] = input.validateRequestBody; + } + if (input.validateRequestParameters !== undefined) { + bodyParams['validateRequestParameters'] = input.validateRequestParameters; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1CreateResourceCommand( + input: CreateResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/resources/{parentId}"; + if (input.parentId !== undefined) { + const labelValue: any = input.parentId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: parentId.'); + } + resolvedPath = resolvedPath.replace('{parentId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: parentId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.pathPart !== undefined) { + bodyParams['pathPart'] = input.pathPart; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1CreateRestApiCommand( + input: CreateRestApiCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis"; + let body: any = {}; + const bodyParams: any = {}; + if (input.apiKeySource !== undefined) { + bodyParams['apiKeySource'] = input.apiKeySource; + } + if (input.binaryMediaTypes !== undefined) { + bodyParams['binaryMediaTypes'] = serializeAws_restJson1_1ListOfString(input.binaryMediaTypes, context); + } + if (input.cloneFrom !== undefined) { + bodyParams['cloneFrom'] = input.cloneFrom; + } + if (input.description !== undefined) { + bodyParams['description'] = input.description; + } + if (input.endpointConfiguration !== undefined) { + bodyParams['endpointConfiguration'] = serializeAws_restJson1_1EndpointConfiguration(input.endpointConfiguration, context); + } + if (input.minimumCompressionSize !== undefined) { + bodyParams['minimumCompressionSize'] = input.minimumCompressionSize; + } + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.policy !== undefined) { + bodyParams['policy'] = input.policy; + } + if (input.tags !== undefined) { + bodyParams['tags'] = serializeAws_restJson1_1MapOfStringToString(input.tags, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + if (input.version !== undefined) { + bodyParams['version'] = input.version; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1CreateStageCommand( + input: CreateStageCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/stages"; + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.cacheClusterEnabled !== undefined) { + bodyParams['cacheClusterEnabled'] = input.cacheClusterEnabled; + } + if (input.cacheClusterSize !== undefined) { + bodyParams['cacheClusterSize'] = input.cacheClusterSize; + } + if (input.canarySettings !== undefined) { + bodyParams['canarySettings'] = serializeAws_restJson1_1CanarySettings(input.canarySettings, context); + } + if (input.deploymentId !== undefined) { + bodyParams['deploymentId'] = input.deploymentId; + } + if (input.description !== undefined) { + bodyParams['description'] = input.description; + } + if (input.documentationVersion !== undefined) { + bodyParams['documentationVersion'] = input.documentationVersion; + } + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.stageName !== undefined) { + bodyParams['stageName'] = input.stageName; + } + if (input.tags !== undefined) { + bodyParams['tags'] = serializeAws_restJson1_1MapOfStringToString(input.tags, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + if (input.tracingEnabled !== undefined) { + bodyParams['tracingEnabled'] = input.tracingEnabled; + } + if (input.variables !== undefined) { + bodyParams['variables'] = serializeAws_restJson1_1MapOfStringToString(input.variables, context); + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1CreateUsagePlanCommand( + input: CreateUsagePlanCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/usageplans"; + let body: any = {}; + const bodyParams: any = {}; + if (input.apiStages !== undefined) { + bodyParams['apiStages'] = serializeAws_restJson1_1ListOfApiStage(input.apiStages, context); + } + if (input.description !== undefined) { + bodyParams['description'] = input.description; + } + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.quota !== undefined) { + bodyParams['quota'] = serializeAws_restJson1_1QuotaSettings(input.quota, context); + } + if (input.tags !== undefined) { + bodyParams['tags'] = serializeAws_restJson1_1MapOfStringToString(input.tags, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.throttle !== undefined) { + bodyParams['throttle'] = serializeAws_restJson1_1ThrottleSettings(input.throttle, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1CreateUsagePlanKeyCommand( + input: CreateUsagePlanKeyCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/usageplans/{usagePlanId}/keys"; + if (input.usagePlanId !== undefined) { + const labelValue: any = input.usagePlanId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: usagePlanId.'); + } + resolvedPath = resolvedPath.replace('{usagePlanId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: usagePlanId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.keyId !== undefined) { + bodyParams['keyId'] = input.keyId; + } + if (input.keyType !== undefined) { + bodyParams['keyType'] = input.keyType; + } + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1CreateVpcLinkCommand( + input: CreateVpcLinkCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/vpclinks"; + let body: any = {}; + const bodyParams: any = {}; + if (input.description !== undefined) { + bodyParams['description'] = input.description; + } + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.tags !== undefined) { + bodyParams['tags'] = serializeAws_restJson1_1MapOfStringToString(input.tags, context); + } + if (input.targetArns !== undefined) { + bodyParams['targetArns'] = serializeAws_restJson1_1ListOfString(input.targetArns, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1DeleteApiKeyCommand( + input: DeleteApiKeyCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/apikeys/{apiKey}"; + if (input.apiKey !== undefined) { + const labelValue: any = input.apiKey.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: apiKey.'); + } + resolvedPath = resolvedPath.replace('{apiKey}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: apiKey.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "DELETE", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1DeleteAuthorizerCommand( + input: DeleteAuthorizerCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/authorizers/{authorizerId}"; + if (input.authorizerId !== undefined) { + const labelValue: any = input.authorizerId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: authorizerId.'); + } + resolvedPath = resolvedPath.replace('{authorizerId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: authorizerId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "DELETE", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1DeleteBasePathMappingCommand( + input: DeleteBasePathMappingCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/domainnames/{domainName}/basepathmappings/{basePath}"; + if (input.basePath !== undefined) { + const labelValue: any = input.basePath.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: basePath.'); + } + resolvedPath = resolvedPath.replace('{basePath}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: basePath.'); + } + if (input.domainName !== undefined) { + const labelValue: any = input.domainName.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: domainName.'); + } + resolvedPath = resolvedPath.replace('{domainName}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: domainName.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "DELETE", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1DeleteClientCertificateCommand( + input: DeleteClientCertificateCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/clientcertificates/{clientCertificateId}"; + if (input.clientCertificateId !== undefined) { + const labelValue: any = input.clientCertificateId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: clientCertificateId.'); + } + resolvedPath = resolvedPath.replace('{clientCertificateId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: clientCertificateId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "DELETE", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1DeleteDeploymentCommand( + input: DeleteDeploymentCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/deployments/{deploymentId}"; + if (input.deploymentId !== undefined) { + const labelValue: any = input.deploymentId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: deploymentId.'); + } + resolvedPath = resolvedPath.replace('{deploymentId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: deploymentId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "DELETE", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1DeleteDocumentationPartCommand( + input: DeleteDocumentationPartCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/documentation/parts/{documentationPartId}"; + if (input.documentationPartId !== undefined) { + const labelValue: any = input.documentationPartId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: documentationPartId.'); + } + resolvedPath = resolvedPath.replace('{documentationPartId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: documentationPartId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "DELETE", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1DeleteDocumentationVersionCommand( + input: DeleteDocumentationVersionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/documentation/versions/{documentationVersion}"; + if (input.documentationVersion !== undefined) { + const labelValue: any = input.documentationVersion.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: documentationVersion.'); + } + resolvedPath = resolvedPath.replace('{documentationVersion}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: documentationVersion.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "DELETE", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1DeleteDomainNameCommand( + input: DeleteDomainNameCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/domainnames/{domainName}"; + if (input.domainName !== undefined) { + const labelValue: any = input.domainName.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: domainName.'); + } + resolvedPath = resolvedPath.replace('{domainName}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: domainName.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "DELETE", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1DeleteGatewayResponseCommand( + input: DeleteGatewayResponseCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/gatewayresponses/{responseType}"; + if (input.responseType !== undefined) { + const labelValue: any = input.responseType.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: responseType.'); + } + resolvedPath = resolvedPath.replace('{responseType}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: responseType.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "DELETE", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1DeleteIntegrationCommand( + input: DeleteIntegrationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/integration"; + if (input.httpMethod !== undefined) { + const labelValue: any = input.httpMethod.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: httpMethod.'); + } + resolvedPath = resolvedPath.replace('{httpMethod}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: httpMethod.'); + } + if (input.resourceId !== undefined) { + const labelValue: any = input.resourceId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: resourceId.'); + } + resolvedPath = resolvedPath.replace('{resourceId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: resourceId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "DELETE", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1DeleteIntegrationResponseCommand( + input: DeleteIntegrationResponseCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/integration/responses/{statusCode}"; + if (input.httpMethod !== undefined) { + const labelValue: any = input.httpMethod.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: httpMethod.'); + } + resolvedPath = resolvedPath.replace('{httpMethod}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: httpMethod.'); + } + if (input.resourceId !== undefined) { + const labelValue: any = input.resourceId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: resourceId.'); + } + resolvedPath = resolvedPath.replace('{resourceId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: resourceId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + if (input.statusCode !== undefined) { + const labelValue: any = input.statusCode.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: statusCode.'); + } + resolvedPath = resolvedPath.replace('{statusCode}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: statusCode.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "DELETE", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1DeleteMethodCommand( + input: DeleteMethodCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}"; + if (input.httpMethod !== undefined) { + const labelValue: any = input.httpMethod.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: httpMethod.'); + } + resolvedPath = resolvedPath.replace('{httpMethod}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: httpMethod.'); + } + if (input.resourceId !== undefined) { + const labelValue: any = input.resourceId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: resourceId.'); + } + resolvedPath = resolvedPath.replace('{resourceId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: resourceId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "DELETE", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1DeleteMethodResponseCommand( + input: DeleteMethodResponseCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/responses/{statusCode}"; + if (input.httpMethod !== undefined) { + const labelValue: any = input.httpMethod.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: httpMethod.'); + } + resolvedPath = resolvedPath.replace('{httpMethod}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: httpMethod.'); + } + if (input.resourceId !== undefined) { + const labelValue: any = input.resourceId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: resourceId.'); + } + resolvedPath = resolvedPath.replace('{resourceId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: resourceId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + if (input.statusCode !== undefined) { + const labelValue: any = input.statusCode.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: statusCode.'); + } + resolvedPath = resolvedPath.replace('{statusCode}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: statusCode.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "DELETE", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1DeleteModelCommand( + input: DeleteModelCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/models/{modelName}"; + if (input.modelName !== undefined) { + const labelValue: any = input.modelName.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: modelName.'); + } + resolvedPath = resolvedPath.replace('{modelName}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: modelName.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "DELETE", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1DeleteRequestValidatorCommand( + input: DeleteRequestValidatorCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/requestvalidators/{requestValidatorId}"; + if (input.requestValidatorId !== undefined) { + const labelValue: any = input.requestValidatorId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: requestValidatorId.'); + } + resolvedPath = resolvedPath.replace('{requestValidatorId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: requestValidatorId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "DELETE", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1DeleteResourceCommand( + input: DeleteResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/resources/{resourceId}"; + if (input.resourceId !== undefined) { + const labelValue: any = input.resourceId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: resourceId.'); + } + resolvedPath = resolvedPath.replace('{resourceId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: resourceId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "DELETE", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1DeleteRestApiCommand( + input: DeleteRestApiCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}"; + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "DELETE", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1DeleteStageCommand( + input: DeleteStageCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/stages/{stageName}"; + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + if (input.stageName !== undefined) { + const labelValue: any = input.stageName.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: stageName.'); + } + resolvedPath = resolvedPath.replace('{stageName}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: stageName.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "DELETE", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1DeleteUsagePlanCommand( + input: DeleteUsagePlanCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/usageplans/{usagePlanId}"; + if (input.usagePlanId !== undefined) { + const labelValue: any = input.usagePlanId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: usagePlanId.'); + } + resolvedPath = resolvedPath.replace('{usagePlanId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: usagePlanId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "DELETE", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1DeleteUsagePlanKeyCommand( + input: DeleteUsagePlanKeyCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/usageplans/{usagePlanId}/keys/{keyId}"; + if (input.keyId !== undefined) { + const labelValue: any = input.keyId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: keyId.'); + } + resolvedPath = resolvedPath.replace('{keyId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: keyId.'); + } + if (input.usagePlanId !== undefined) { + const labelValue: any = input.usagePlanId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: usagePlanId.'); + } + resolvedPath = resolvedPath.replace('{usagePlanId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: usagePlanId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "DELETE", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1DeleteVpcLinkCommand( + input: DeleteVpcLinkCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/vpclinks/{vpcLinkId}"; + if (input.vpcLinkId !== undefined) { + const labelValue: any = input.vpcLinkId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: vpcLinkId.'); + } + resolvedPath = resolvedPath.replace('{vpcLinkId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: vpcLinkId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "DELETE", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1FlushStageAuthorizersCacheCommand( + input: FlushStageAuthorizersCacheCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/stages/{stageName}/cache/authorizers"; + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + if (input.stageName !== undefined) { + const labelValue: any = input.stageName.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: stageName.'); + } + resolvedPath = resolvedPath.replace('{stageName}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: stageName.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "DELETE", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1FlushStageCacheCommand( + input: FlushStageCacheCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/stages/{stageName}/cache/data"; + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + if (input.stageName !== undefined) { + const labelValue: any = input.stageName.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: stageName.'); + } + resolvedPath = resolvedPath.replace('{stageName}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: stageName.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "DELETE", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1GenerateClientCertificateCommand( + input: GenerateClientCertificateCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/clientcertificates"; + let body: any = {}; + const bodyParams: any = {}; + if (input.description !== undefined) { + bodyParams['description'] = input.description; + } + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.tags !== undefined) { + bodyParams['tags'] = serializeAws_restJson1_1MapOfStringToString(input.tags, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetAccountCommand( + input: GetAccountCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/account"; + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetApiKeyCommand( + input: GetApiKeyCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/apikeys/{apiKey}"; + if (input.apiKey !== undefined) { + const labelValue: any = input.apiKey.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: apiKey.'); + } + resolvedPath = resolvedPath.replace('{apiKey}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: apiKey.'); + } + const query: any = {}; + if (input.includeValue !== undefined) { + query['includeValue'] = input.includeValue.toString(); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetApiKeysCommand( + input: GetApiKeysCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/apikeys"; + const query: any = {}; + if (input.customerId !== undefined) { + query['customerId'] = input.customerId.toString(); + } + if (input.includeValues !== undefined) { + query['includeValues'] = input.includeValues.toString(); + } + if (input.limit !== undefined) { + query['limit'] = input.limit.toString(); + } + if (input.nameQuery !== undefined) { + query['name'] = input.nameQuery.toString(); + } + if (input.position !== undefined) { + query['position'] = input.position.toString(); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetAuthorizerCommand( + input: GetAuthorizerCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/authorizers/{authorizerId}"; + if (input.authorizerId !== undefined) { + const labelValue: any = input.authorizerId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: authorizerId.'); + } + resolvedPath = resolvedPath.replace('{authorizerId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: authorizerId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetAuthorizersCommand( + input: GetAuthorizersCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/authorizers"; + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + const query: any = {}; + if (input.limit !== undefined) { + query['limit'] = input.limit.toString(); + } + if (input.position !== undefined) { + query['position'] = input.position.toString(); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetBasePathMappingCommand( + input: GetBasePathMappingCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/domainnames/{domainName}/basepathmappings/{basePath}"; + if (input.basePath !== undefined) { + const labelValue: any = input.basePath.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: basePath.'); + } + resolvedPath = resolvedPath.replace('{basePath}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: basePath.'); + } + if (input.domainName !== undefined) { + const labelValue: any = input.domainName.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: domainName.'); + } + resolvedPath = resolvedPath.replace('{domainName}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: domainName.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetBasePathMappingsCommand( + input: GetBasePathMappingsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/domainnames/{domainName}/basepathmappings"; + if (input.domainName !== undefined) { + const labelValue: any = input.domainName.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: domainName.'); + } + resolvedPath = resolvedPath.replace('{domainName}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: domainName.'); + } + const query: any = {}; + if (input.limit !== undefined) { + query['limit'] = input.limit.toString(); + } + if (input.position !== undefined) { + query['position'] = input.position.toString(); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetClientCertificateCommand( + input: GetClientCertificateCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/clientcertificates/{clientCertificateId}"; + if (input.clientCertificateId !== undefined) { + const labelValue: any = input.clientCertificateId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: clientCertificateId.'); + } + resolvedPath = resolvedPath.replace('{clientCertificateId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: clientCertificateId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetClientCertificatesCommand( + input: GetClientCertificatesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/clientcertificates"; + const query: any = {}; + if (input.limit !== undefined) { + query['limit'] = input.limit.toString(); + } + if (input.position !== undefined) { + query['position'] = input.position.toString(); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetDeploymentCommand( + input: GetDeploymentCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/deployments/{deploymentId}"; + if (input.deploymentId !== undefined) { + const labelValue: any = input.deploymentId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: deploymentId.'); + } + resolvedPath = resolvedPath.replace('{deploymentId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: deploymentId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + const query: any = {}; + if (input.embed !== undefined) { + query['embed'] = input.embed; + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetDeploymentsCommand( + input: GetDeploymentsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/deployments"; + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + const query: any = {}; + if (input.limit !== undefined) { + query['limit'] = input.limit.toString(); + } + if (input.position !== undefined) { + query['position'] = input.position.toString(); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetDocumentationPartCommand( + input: GetDocumentationPartCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/documentation/parts/{documentationPartId}"; + if (input.documentationPartId !== undefined) { + const labelValue: any = input.documentationPartId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: documentationPartId.'); + } + resolvedPath = resolvedPath.replace('{documentationPartId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: documentationPartId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetDocumentationPartsCommand( + input: GetDocumentationPartsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/documentation/parts"; + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + const query: any = {}; + if (input.limit !== undefined) { + query['limit'] = input.limit.toString(); + } + if (input.locationStatus !== undefined) { + query['locationStatus'] = input.locationStatus.toString(); + } + if (input.nameQuery !== undefined) { + query['name'] = input.nameQuery.toString(); + } + if (input.path !== undefined) { + query['path'] = input.path.toString(); + } + if (input.position !== undefined) { + query['position'] = input.position.toString(); + } + if (input.type !== undefined) { + query['type'] = input.type.toString(); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetDocumentationVersionCommand( + input: GetDocumentationVersionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/documentation/versions/{documentationVersion}"; + if (input.documentationVersion !== undefined) { + const labelValue: any = input.documentationVersion.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: documentationVersion.'); + } + resolvedPath = resolvedPath.replace('{documentationVersion}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: documentationVersion.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetDocumentationVersionsCommand( + input: GetDocumentationVersionsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/documentation/versions"; + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + const query: any = {}; + if (input.limit !== undefined) { + query['limit'] = input.limit.toString(); + } + if (input.position !== undefined) { + query['position'] = input.position.toString(); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetDomainNameCommand( + input: GetDomainNameCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/domainnames/{domainName}"; + if (input.domainName !== undefined) { + const labelValue: any = input.domainName.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: domainName.'); + } + resolvedPath = resolvedPath.replace('{domainName}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: domainName.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetDomainNamesCommand( + input: GetDomainNamesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/domainnames"; + const query: any = {}; + if (input.limit !== undefined) { + query['limit'] = input.limit.toString(); + } + if (input.position !== undefined) { + query['position'] = input.position.toString(); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetExportCommand( + input: GetExportCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + if (input.accepts !== undefined) { + headers["Accept"] = input.accepts.toString(); + } + let resolvedPath = "/restapis/{restApiId}/stages/{stageName}/exports/{exportType}"; + if (input.exportType !== undefined) { + const labelValue: any = input.exportType.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: exportType.'); + } + resolvedPath = resolvedPath.replace('{exportType}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: exportType.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + if (input.stageName !== undefined) { + const labelValue: any = input.stageName.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: stageName.'); + } + resolvedPath = resolvedPath.replace('{stageName}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: stageName.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.parameters !== undefined) { + bodyParams['parameters'] = serializeAws_restJson1_1MapOfStringToString(input.parameters, context); + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetGatewayResponseCommand( + input: GetGatewayResponseCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/gatewayresponses/{responseType}"; + if (input.responseType !== undefined) { + const labelValue: any = input.responseType.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: responseType.'); + } + resolvedPath = resolvedPath.replace('{responseType}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: responseType.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetGatewayResponsesCommand( + input: GetGatewayResponsesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/gatewayresponses"; + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + const query: any = {}; + if (input.limit !== undefined) { + query['limit'] = input.limit.toString(); + } + if (input.position !== undefined) { + query['position'] = input.position.toString(); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetIntegrationCommand( + input: GetIntegrationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/integration"; + if (input.httpMethod !== undefined) { + const labelValue: any = input.httpMethod.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: httpMethod.'); + } + resolvedPath = resolvedPath.replace('{httpMethod}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: httpMethod.'); + } + if (input.resourceId !== undefined) { + const labelValue: any = input.resourceId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: resourceId.'); + } + resolvedPath = resolvedPath.replace('{resourceId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: resourceId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetIntegrationResponseCommand( + input: GetIntegrationResponseCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/integration/responses/{statusCode}"; + if (input.httpMethod !== undefined) { + const labelValue: any = input.httpMethod.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: httpMethod.'); + } + resolvedPath = resolvedPath.replace('{httpMethod}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: httpMethod.'); + } + if (input.resourceId !== undefined) { + const labelValue: any = input.resourceId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: resourceId.'); + } + resolvedPath = resolvedPath.replace('{resourceId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: resourceId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + if (input.statusCode !== undefined) { + const labelValue: any = input.statusCode.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: statusCode.'); + } + resolvedPath = resolvedPath.replace('{statusCode}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: statusCode.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetMethodCommand( + input: GetMethodCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}"; + if (input.httpMethod !== undefined) { + const labelValue: any = input.httpMethod.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: httpMethod.'); + } + resolvedPath = resolvedPath.replace('{httpMethod}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: httpMethod.'); + } + if (input.resourceId !== undefined) { + const labelValue: any = input.resourceId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: resourceId.'); + } + resolvedPath = resolvedPath.replace('{resourceId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: resourceId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetMethodResponseCommand( + input: GetMethodResponseCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/responses/{statusCode}"; + if (input.httpMethod !== undefined) { + const labelValue: any = input.httpMethod.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: httpMethod.'); + } + resolvedPath = resolvedPath.replace('{httpMethod}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: httpMethod.'); + } + if (input.resourceId !== undefined) { + const labelValue: any = input.resourceId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: resourceId.'); + } + resolvedPath = resolvedPath.replace('{resourceId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: resourceId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + if (input.statusCode !== undefined) { + const labelValue: any = input.statusCode.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: statusCode.'); + } + resolvedPath = resolvedPath.replace('{statusCode}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: statusCode.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetModelCommand( + input: GetModelCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/models/{modelName}"; + if (input.modelName !== undefined) { + const labelValue: any = input.modelName.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: modelName.'); + } + resolvedPath = resolvedPath.replace('{modelName}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: modelName.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + const query: any = {}; + if (input.flatten !== undefined) { + query['flatten'] = input.flatten.toString(); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetModelTemplateCommand( + input: GetModelTemplateCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/models/{modelName}/default_template"; + if (input.modelName !== undefined) { + const labelValue: any = input.modelName.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: modelName.'); + } + resolvedPath = resolvedPath.replace('{modelName}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: modelName.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetModelsCommand( + input: GetModelsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/models"; + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + const query: any = {}; + if (input.limit !== undefined) { + query['limit'] = input.limit.toString(); + } + if (input.position !== undefined) { + query['position'] = input.position.toString(); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetRequestValidatorCommand( + input: GetRequestValidatorCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/requestvalidators/{requestValidatorId}"; + if (input.requestValidatorId !== undefined) { + const labelValue: any = input.requestValidatorId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: requestValidatorId.'); + } + resolvedPath = resolvedPath.replace('{requestValidatorId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: requestValidatorId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetRequestValidatorsCommand( + input: GetRequestValidatorsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/requestvalidators"; + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + const query: any = {}; + if (input.limit !== undefined) { + query['limit'] = input.limit.toString(); + } + if (input.position !== undefined) { + query['position'] = input.position.toString(); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetResourceCommand( + input: GetResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/resources/{resourceId}"; + if (input.resourceId !== undefined) { + const labelValue: any = input.resourceId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: resourceId.'); + } + resolvedPath = resolvedPath.replace('{resourceId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: resourceId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + const query: any = {}; + if (input.embed !== undefined) { + query['embed'] = input.embed; + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetResourcesCommand( + input: GetResourcesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/resources"; + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + const query: any = {}; + if (input.embed !== undefined) { + query['embed'] = input.embed; + } + if (input.limit !== undefined) { + query['limit'] = input.limit.toString(); + } + if (input.position !== undefined) { + query['position'] = input.position.toString(); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetRestApiCommand( + input: GetRestApiCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}"; + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetRestApisCommand( + input: GetRestApisCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis"; + const query: any = {}; + if (input.limit !== undefined) { + query['limit'] = input.limit.toString(); + } + if (input.position !== undefined) { + query['position'] = input.position.toString(); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetSdkCommand( + input: GetSdkCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/stages/{stageName}/sdks/{sdkType}"; + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + if (input.sdkType !== undefined) { + const labelValue: any = input.sdkType.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: sdkType.'); + } + resolvedPath = resolvedPath.replace('{sdkType}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: sdkType.'); + } + if (input.stageName !== undefined) { + const labelValue: any = input.stageName.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: stageName.'); + } + resolvedPath = resolvedPath.replace('{stageName}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: stageName.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.parameters !== undefined) { + bodyParams['parameters'] = serializeAws_restJson1_1MapOfStringToString(input.parameters, context); + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetSdkTypeCommand( + input: GetSdkTypeCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/sdktypes/{id}"; + if (input.id !== undefined) { + const labelValue: any = input.id.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: id.'); + } + resolvedPath = resolvedPath.replace('{id}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: id.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetSdkTypesCommand( + input: GetSdkTypesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/sdktypes"; + const query: any = {}; + if (input.limit !== undefined) { + query['limit'] = input.limit.toString(); + } + if (input.position !== undefined) { + query['position'] = input.position.toString(); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetStageCommand( + input: GetStageCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/stages/{stageName}"; + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + if (input.stageName !== undefined) { + const labelValue: any = input.stageName.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: stageName.'); + } + resolvedPath = resolvedPath.replace('{stageName}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: stageName.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetStagesCommand( + input: GetStagesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/stages"; + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + const query: any = {}; + if (input.deploymentId !== undefined) { + query['deploymentId'] = input.deploymentId.toString(); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetTagsCommand( + input: GetTagsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/tags/{resourceArn}"; + if (input.resourceArn !== undefined) { + const labelValue: any = input.resourceArn.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: resourceArn.'); + } + resolvedPath = resolvedPath.replace('{resourceArn}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: resourceArn.'); + } + const query: any = {}; + if (input.limit !== undefined) { + query['limit'] = input.limit.toString(); + } + if (input.position !== undefined) { + query['position'] = input.position.toString(); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetUsageCommand( + input: GetUsageCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/usageplans/{usagePlanId}/usage"; + if (input.usagePlanId !== undefined) { + const labelValue: any = input.usagePlanId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: usagePlanId.'); + } + resolvedPath = resolvedPath.replace('{usagePlanId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: usagePlanId.'); + } + const query: any = {}; + if (input.endDate !== undefined) { + query['endDate'] = input.endDate.toString(); + } + if (input.keyId !== undefined) { + query['keyId'] = input.keyId.toString(); + } + if (input.limit !== undefined) { + query['limit'] = input.limit.toString(); + } + if (input.position !== undefined) { + query['position'] = input.position.toString(); + } + if (input.startDate !== undefined) { + query['startDate'] = input.startDate.toString(); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetUsagePlanCommand( + input: GetUsagePlanCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/usageplans/{usagePlanId}"; + if (input.usagePlanId !== undefined) { + const labelValue: any = input.usagePlanId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: usagePlanId.'); + } + resolvedPath = resolvedPath.replace('{usagePlanId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: usagePlanId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetUsagePlanKeyCommand( + input: GetUsagePlanKeyCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/usageplans/{usagePlanId}/keys/{keyId}"; + if (input.keyId !== undefined) { + const labelValue: any = input.keyId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: keyId.'); + } + resolvedPath = resolvedPath.replace('{keyId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: keyId.'); + } + if (input.usagePlanId !== undefined) { + const labelValue: any = input.usagePlanId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: usagePlanId.'); + } + resolvedPath = resolvedPath.replace('{usagePlanId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: usagePlanId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetUsagePlanKeysCommand( + input: GetUsagePlanKeysCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/usageplans/{usagePlanId}/keys"; + if (input.usagePlanId !== undefined) { + const labelValue: any = input.usagePlanId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: usagePlanId.'); + } + resolvedPath = resolvedPath.replace('{usagePlanId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: usagePlanId.'); + } + const query: any = {}; + if (input.limit !== undefined) { + query['limit'] = input.limit.toString(); + } + if (input.nameQuery !== undefined) { + query['name'] = input.nameQuery.toString(); + } + if (input.position !== undefined) { + query['position'] = input.position.toString(); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetUsagePlansCommand( + input: GetUsagePlansCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/usageplans"; + const query: any = {}; + if (input.keyId !== undefined) { + query['keyId'] = input.keyId.toString(); + } + if (input.limit !== undefined) { + query['limit'] = input.limit.toString(); + } + if (input.position !== undefined) { + query['position'] = input.position.toString(); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetVpcLinkCommand( + input: GetVpcLinkCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/vpclinks/{vpcLinkId}"; + if (input.vpcLinkId !== undefined) { + const labelValue: any = input.vpcLinkId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: vpcLinkId.'); + } + resolvedPath = resolvedPath.replace('{vpcLinkId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: vpcLinkId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1GetVpcLinksCommand( + input: GetVpcLinksCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/vpclinks"; + const query: any = {}; + if (input.limit !== undefined) { + query['limit'] = input.limit.toString(); + } + if (input.position !== undefined) { + query['position'] = input.position.toString(); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query, + body: body, + }); +} + +export async function serializeAws_restJson1_1ImportApiKeysCommand( + input: ImportApiKeysCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/apikeys"; + const query: any = { + "mode": "import", + }; + if (input.failOnWarnings !== undefined) { + query['failonwarnings'] = input.failOnWarnings.toString(); + } + if (input.format !== undefined) { + query['format'] = input.format.toString(); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + headers: headers, + path: resolvedPath, + query: query, + body: body, + }); +} + +export async function serializeAws_restJson1_1ImportDocumentationPartsCommand( + input: ImportDocumentationPartsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/documentation/parts"; + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + const query: any = {}; + if (input.failOnWarnings !== undefined) { + query['failonwarnings'] = input.failOnWarnings.toString(); + } + if (input.mode !== undefined) { + query['mode'] = input.mode.toString(); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PUT", + headers: headers, + path: resolvedPath, + query: query, + body: body, + }); +} + +export async function serializeAws_restJson1_1ImportRestApiCommand( + input: ImportRestApiCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis"; + const query: any = { + "mode": "import", + }; + if (input.failOnWarnings !== undefined) { + query['failonwarnings'] = input.failOnWarnings.toString(); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.parameters !== undefined) { + bodyParams['parameters'] = serializeAws_restJson1_1MapOfStringToString(input.parameters, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + headers: headers, + path: resolvedPath, + query: query, + body: body, + }); +} + +export async function serializeAws_restJson1_1PutGatewayResponseCommand( + input: PutGatewayResponseCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/gatewayresponses/{responseType}"; + if (input.responseType !== undefined) { + const labelValue: any = input.responseType.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: responseType.'); + } + resolvedPath = resolvedPath.replace('{responseType}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: responseType.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.responseParameters !== undefined) { + bodyParams['responseParameters'] = serializeAws_restJson1_1MapOfStringToString(input.responseParameters, context); + } + if (input.responseTemplates !== undefined) { + bodyParams['responseTemplates'] = serializeAws_restJson1_1MapOfStringToString(input.responseTemplates, context); + } + if (input.statusCode !== undefined) { + bodyParams['statusCode'] = input.statusCode; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PUT", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1PutIntegrationCommand( + input: PutIntegrationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/integration"; + if (input.httpMethod !== undefined) { + const labelValue: any = input.httpMethod.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: httpMethod.'); + } + resolvedPath = resolvedPath.replace('{httpMethod}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: httpMethod.'); + } + if (input.resourceId !== undefined) { + const labelValue: any = input.resourceId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: resourceId.'); + } + resolvedPath = resolvedPath.replace('{resourceId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: resourceId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.cacheKeyParameters !== undefined) { + bodyParams['cacheKeyParameters'] = serializeAws_restJson1_1ListOfString(input.cacheKeyParameters, context); + } + if (input.cacheNamespace !== undefined) { + bodyParams['cacheNamespace'] = input.cacheNamespace; + } + if (input.connectionId !== undefined) { + bodyParams['connectionId'] = input.connectionId; + } + if (input.connectionType !== undefined) { + bodyParams['connectionType'] = input.connectionType; + } + if (input.contentHandling !== undefined) { + bodyParams['contentHandling'] = input.contentHandling; + } + if (input.credentials !== undefined) { + bodyParams['credentials'] = input.credentials; + } + if (input.integrationHttpMethod !== undefined) { + bodyParams['httpMethod'] = input.integrationHttpMethod; + } + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.passthroughBehavior !== undefined) { + bodyParams['passthroughBehavior'] = input.passthroughBehavior; + } + if (input.requestParameters !== undefined) { + bodyParams['requestParameters'] = serializeAws_restJson1_1MapOfStringToString(input.requestParameters, context); + } + if (input.requestTemplates !== undefined) { + bodyParams['requestTemplates'] = serializeAws_restJson1_1MapOfStringToString(input.requestTemplates, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.timeoutInMillis !== undefined) { + bodyParams['timeoutInMillis'] = input.timeoutInMillis; + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + if (input.type !== undefined) { + bodyParams['type'] = input.type; + } + if (input.uri !== undefined) { + bodyParams['uri'] = input.uri; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PUT", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1PutIntegrationResponseCommand( + input: PutIntegrationResponseCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/integration/responses/{statusCode}"; + if (input.httpMethod !== undefined) { + const labelValue: any = input.httpMethod.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: httpMethod.'); + } + resolvedPath = resolvedPath.replace('{httpMethod}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: httpMethod.'); + } + if (input.resourceId !== undefined) { + const labelValue: any = input.resourceId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: resourceId.'); + } + resolvedPath = resolvedPath.replace('{resourceId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: resourceId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + if (input.statusCode !== undefined) { + const labelValue: any = input.statusCode.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: statusCode.'); + } + resolvedPath = resolvedPath.replace('{statusCode}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: statusCode.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.contentHandling !== undefined) { + bodyParams['contentHandling'] = input.contentHandling; + } + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.responseParameters !== undefined) { + bodyParams['responseParameters'] = serializeAws_restJson1_1MapOfStringToString(input.responseParameters, context); + } + if (input.responseTemplates !== undefined) { + bodyParams['responseTemplates'] = serializeAws_restJson1_1MapOfStringToString(input.responseTemplates, context); + } + if (input.selectionPattern !== undefined) { + bodyParams['selectionPattern'] = input.selectionPattern; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PUT", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1PutMethodCommand( + input: PutMethodCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}"; + if (input.httpMethod !== undefined) { + const labelValue: any = input.httpMethod.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: httpMethod.'); + } + resolvedPath = resolvedPath.replace('{httpMethod}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: httpMethod.'); + } + if (input.resourceId !== undefined) { + const labelValue: any = input.resourceId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: resourceId.'); + } + resolvedPath = resolvedPath.replace('{resourceId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: resourceId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.apiKeyRequired !== undefined) { + bodyParams['apiKeyRequired'] = input.apiKeyRequired; + } + if (input.authorizationScopes !== undefined) { + bodyParams['authorizationScopes'] = serializeAws_restJson1_1ListOfString(input.authorizationScopes, context); + } + if (input.authorizationType !== undefined) { + bodyParams['authorizationType'] = input.authorizationType; + } + if (input.authorizerId !== undefined) { + bodyParams['authorizerId'] = input.authorizerId; + } + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.operationName !== undefined) { + bodyParams['operationName'] = input.operationName; + } + if (input.requestModels !== undefined) { + bodyParams['requestModels'] = serializeAws_restJson1_1MapOfStringToString(input.requestModels, context); + } + if (input.requestParameters !== undefined) { + bodyParams['requestParameters'] = serializeAws_restJson1_1MapOfStringToBoolean(input.requestParameters, context); + } + if (input.requestValidatorId !== undefined) { + bodyParams['requestValidatorId'] = input.requestValidatorId; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PUT", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1PutMethodResponseCommand( + input: PutMethodResponseCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/responses/{statusCode}"; + if (input.httpMethod !== undefined) { + const labelValue: any = input.httpMethod.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: httpMethod.'); + } + resolvedPath = resolvedPath.replace('{httpMethod}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: httpMethod.'); + } + if (input.resourceId !== undefined) { + const labelValue: any = input.resourceId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: resourceId.'); + } + resolvedPath = resolvedPath.replace('{resourceId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: resourceId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + if (input.statusCode !== undefined) { + const labelValue: any = input.statusCode.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: statusCode.'); + } + resolvedPath = resolvedPath.replace('{statusCode}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: statusCode.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.responseModels !== undefined) { + bodyParams['responseModels'] = serializeAws_restJson1_1MapOfStringToString(input.responseModels, context); + } + if (input.responseParameters !== undefined) { + bodyParams['responseParameters'] = serializeAws_restJson1_1MapOfStringToBoolean(input.responseParameters, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PUT", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1PutRestApiCommand( + input: PutRestApiCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}"; + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + const query: any = {}; + if (input.failOnWarnings !== undefined) { + query['failonwarnings'] = input.failOnWarnings.toString(); + } + if (input.mode !== undefined) { + query['mode'] = input.mode.toString(); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.parameters !== undefined) { + bodyParams['parameters'] = serializeAws_restJson1_1MapOfStringToString(input.parameters, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PUT", + headers: headers, + path: resolvedPath, + query: query, + body: body, + }); +} + +export async function serializeAws_restJson1_1TagResourceCommand( + input: TagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/tags/{resourceArn}"; + if (input.resourceArn !== undefined) { + const labelValue: any = input.resourceArn.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: resourceArn.'); + } + resolvedPath = resolvedPath.replace('{resourceArn}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: resourceArn.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.tags !== undefined) { + bodyParams['tags'] = serializeAws_restJson1_1MapOfStringToString(input.tags, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PUT", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1TestInvokeAuthorizerCommand( + input: TestInvokeAuthorizerCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/authorizers/{authorizerId}"; + if (input.authorizerId !== undefined) { + const labelValue: any = input.authorizerId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: authorizerId.'); + } + resolvedPath = resolvedPath.replace('{authorizerId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: authorizerId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.additionalContext !== undefined) { + bodyParams['additionalContext'] = serializeAws_restJson1_1MapOfStringToString(input.additionalContext, context); + } + if (input.body !== undefined) { + bodyParams['body'] = input.body; + } + if (input.headers !== undefined) { + bodyParams['headers'] = serializeAws_restJson1_1MapOfStringToString(input.headers, context); + } + if (input.multiValueHeaders !== undefined) { + bodyParams['multiValueHeaders'] = serializeAws_restJson1_1MapOfStringToList(input.multiValueHeaders, context); + } + if (input.pathWithQueryString !== undefined) { + bodyParams['pathWithQueryString'] = input.pathWithQueryString; + } + if (input.stageVariables !== undefined) { + bodyParams['stageVariables'] = serializeAws_restJson1_1MapOfStringToString(input.stageVariables, context); + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1TestInvokeMethodCommand( + input: TestInvokeMethodCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}"; + if (input.httpMethod !== undefined) { + const labelValue: any = input.httpMethod.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: httpMethod.'); + } + resolvedPath = resolvedPath.replace('{httpMethod}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: httpMethod.'); + } + if (input.resourceId !== undefined) { + const labelValue: any = input.resourceId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: resourceId.'); + } + resolvedPath = resolvedPath.replace('{resourceId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: resourceId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.body !== undefined) { + bodyParams['body'] = input.body; + } + if (input.clientCertificateId !== undefined) { + bodyParams['clientCertificateId'] = input.clientCertificateId; + } + if (input.headers !== undefined) { + bodyParams['headers'] = serializeAws_restJson1_1MapOfStringToString(input.headers, context); + } + if (input.multiValueHeaders !== undefined) { + bodyParams['multiValueHeaders'] = serializeAws_restJson1_1MapOfStringToList(input.multiValueHeaders, context); + } + if (input.pathWithQueryString !== undefined) { + bodyParams['pathWithQueryString'] = input.pathWithQueryString; + } + if (input.stageVariables !== undefined) { + bodyParams['stageVariables'] = serializeAws_restJson1_1MapOfStringToString(input.stageVariables, context); + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1UntagResourceCommand( + input: UntagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/tags/{resourceArn}"; + if (input.resourceArn !== undefined) { + const labelValue: any = input.resourceArn.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: resourceArn.'); + } + resolvedPath = resolvedPath.replace('{resourceArn}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: resourceArn.'); + } + const query: any = {}; + if (input.tagKeys !== undefined) { + query['tagKeys'] = input.tagKeys; + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "DELETE", + headers: headers, + path: resolvedPath, + query: query, + body: body, + }); +} + +export async function serializeAws_restJson1_1UpdateAccountCommand( + input: UpdateAccountCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/account"; + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.patchOperations !== undefined) { + bodyParams['patchOperations'] = serializeAws_restJson1_1ListOfPatchOperation(input.patchOperations, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PATCH", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1UpdateApiKeyCommand( + input: UpdateApiKeyCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/apikeys/{apiKey}"; + if (input.apiKey !== undefined) { + const labelValue: any = input.apiKey.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: apiKey.'); + } + resolvedPath = resolvedPath.replace('{apiKey}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: apiKey.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.patchOperations !== undefined) { + bodyParams['patchOperations'] = serializeAws_restJson1_1ListOfPatchOperation(input.patchOperations, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PATCH", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1UpdateAuthorizerCommand( + input: UpdateAuthorizerCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/authorizers/{authorizerId}"; + if (input.authorizerId !== undefined) { + const labelValue: any = input.authorizerId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: authorizerId.'); + } + resolvedPath = resolvedPath.replace('{authorizerId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: authorizerId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.patchOperations !== undefined) { + bodyParams['patchOperations'] = serializeAws_restJson1_1ListOfPatchOperation(input.patchOperations, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PATCH", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1UpdateBasePathMappingCommand( + input: UpdateBasePathMappingCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/domainnames/{domainName}/basepathmappings/{basePath}"; + if (input.basePath !== undefined) { + const labelValue: any = input.basePath.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: basePath.'); + } + resolvedPath = resolvedPath.replace('{basePath}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: basePath.'); + } + if (input.domainName !== undefined) { + const labelValue: any = input.domainName.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: domainName.'); + } + resolvedPath = resolvedPath.replace('{domainName}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: domainName.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.patchOperations !== undefined) { + bodyParams['patchOperations'] = serializeAws_restJson1_1ListOfPatchOperation(input.patchOperations, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PATCH", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1UpdateClientCertificateCommand( + input: UpdateClientCertificateCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/clientcertificates/{clientCertificateId}"; + if (input.clientCertificateId !== undefined) { + const labelValue: any = input.clientCertificateId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: clientCertificateId.'); + } + resolvedPath = resolvedPath.replace('{clientCertificateId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: clientCertificateId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.patchOperations !== undefined) { + bodyParams['patchOperations'] = serializeAws_restJson1_1ListOfPatchOperation(input.patchOperations, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PATCH", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1UpdateDeploymentCommand( + input: UpdateDeploymentCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/deployments/{deploymentId}"; + if (input.deploymentId !== undefined) { + const labelValue: any = input.deploymentId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: deploymentId.'); + } + resolvedPath = resolvedPath.replace('{deploymentId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: deploymentId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.patchOperations !== undefined) { + bodyParams['patchOperations'] = serializeAws_restJson1_1ListOfPatchOperation(input.patchOperations, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PATCH", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1UpdateDocumentationPartCommand( + input: UpdateDocumentationPartCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/documentation/parts/{documentationPartId}"; + if (input.documentationPartId !== undefined) { + const labelValue: any = input.documentationPartId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: documentationPartId.'); + } + resolvedPath = resolvedPath.replace('{documentationPartId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: documentationPartId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.patchOperations !== undefined) { + bodyParams['patchOperations'] = serializeAws_restJson1_1ListOfPatchOperation(input.patchOperations, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PATCH", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1UpdateDocumentationVersionCommand( + input: UpdateDocumentationVersionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/documentation/versions/{documentationVersion}"; + if (input.documentationVersion !== undefined) { + const labelValue: any = input.documentationVersion.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: documentationVersion.'); + } + resolvedPath = resolvedPath.replace('{documentationVersion}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: documentationVersion.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.patchOperations !== undefined) { + bodyParams['patchOperations'] = serializeAws_restJson1_1ListOfPatchOperation(input.patchOperations, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PATCH", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1UpdateDomainNameCommand( + input: UpdateDomainNameCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/domainnames/{domainName}"; + if (input.domainName !== undefined) { + const labelValue: any = input.domainName.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: domainName.'); + } + resolvedPath = resolvedPath.replace('{domainName}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: domainName.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.patchOperations !== undefined) { + bodyParams['patchOperations'] = serializeAws_restJson1_1ListOfPatchOperation(input.patchOperations, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PATCH", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1UpdateGatewayResponseCommand( + input: UpdateGatewayResponseCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/gatewayresponses/{responseType}"; + if (input.responseType !== undefined) { + const labelValue: any = input.responseType.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: responseType.'); + } + resolvedPath = resolvedPath.replace('{responseType}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: responseType.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.patchOperations !== undefined) { + bodyParams['patchOperations'] = serializeAws_restJson1_1ListOfPatchOperation(input.patchOperations, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PATCH", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1UpdateIntegrationCommand( + input: UpdateIntegrationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/integration"; + if (input.httpMethod !== undefined) { + const labelValue: any = input.httpMethod.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: httpMethod.'); + } + resolvedPath = resolvedPath.replace('{httpMethod}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: httpMethod.'); + } + if (input.resourceId !== undefined) { + const labelValue: any = input.resourceId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: resourceId.'); + } + resolvedPath = resolvedPath.replace('{resourceId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: resourceId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.patchOperations !== undefined) { + bodyParams['patchOperations'] = serializeAws_restJson1_1ListOfPatchOperation(input.patchOperations, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PATCH", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1UpdateIntegrationResponseCommand( + input: UpdateIntegrationResponseCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/integration/responses/{statusCode}"; + if (input.httpMethod !== undefined) { + const labelValue: any = input.httpMethod.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: httpMethod.'); + } + resolvedPath = resolvedPath.replace('{httpMethod}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: httpMethod.'); + } + if (input.resourceId !== undefined) { + const labelValue: any = input.resourceId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: resourceId.'); + } + resolvedPath = resolvedPath.replace('{resourceId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: resourceId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + if (input.statusCode !== undefined) { + const labelValue: any = input.statusCode.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: statusCode.'); + } + resolvedPath = resolvedPath.replace('{statusCode}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: statusCode.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.patchOperations !== undefined) { + bodyParams['patchOperations'] = serializeAws_restJson1_1ListOfPatchOperation(input.patchOperations, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PATCH", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1UpdateMethodCommand( + input: UpdateMethodCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}"; + if (input.httpMethod !== undefined) { + const labelValue: any = input.httpMethod.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: httpMethod.'); + } + resolvedPath = resolvedPath.replace('{httpMethod}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: httpMethod.'); + } + if (input.resourceId !== undefined) { + const labelValue: any = input.resourceId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: resourceId.'); + } + resolvedPath = resolvedPath.replace('{resourceId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: resourceId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.patchOperations !== undefined) { + bodyParams['patchOperations'] = serializeAws_restJson1_1ListOfPatchOperation(input.patchOperations, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PATCH", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1UpdateMethodResponseCommand( + input: UpdateMethodResponseCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/responses/{statusCode}"; + if (input.httpMethod !== undefined) { + const labelValue: any = input.httpMethod.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: httpMethod.'); + } + resolvedPath = resolvedPath.replace('{httpMethod}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: httpMethod.'); + } + if (input.resourceId !== undefined) { + const labelValue: any = input.resourceId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: resourceId.'); + } + resolvedPath = resolvedPath.replace('{resourceId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: resourceId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + if (input.statusCode !== undefined) { + const labelValue: any = input.statusCode.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: statusCode.'); + } + resolvedPath = resolvedPath.replace('{statusCode}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: statusCode.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.patchOperations !== undefined) { + bodyParams['patchOperations'] = serializeAws_restJson1_1ListOfPatchOperation(input.patchOperations, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PATCH", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1UpdateModelCommand( + input: UpdateModelCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/models/{modelName}"; + if (input.modelName !== undefined) { + const labelValue: any = input.modelName.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: modelName.'); + } + resolvedPath = resolvedPath.replace('{modelName}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: modelName.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.patchOperations !== undefined) { + bodyParams['patchOperations'] = serializeAws_restJson1_1ListOfPatchOperation(input.patchOperations, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PATCH", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1UpdateRequestValidatorCommand( + input: UpdateRequestValidatorCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/requestvalidators/{requestValidatorId}"; + if (input.requestValidatorId !== undefined) { + const labelValue: any = input.requestValidatorId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: requestValidatorId.'); + } + resolvedPath = resolvedPath.replace('{requestValidatorId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: requestValidatorId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.patchOperations !== undefined) { + bodyParams['patchOperations'] = serializeAws_restJson1_1ListOfPatchOperation(input.patchOperations, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PATCH", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1UpdateResourceCommand( + input: UpdateResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/resources/{resourceId}"; + if (input.resourceId !== undefined) { + const labelValue: any = input.resourceId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: resourceId.'); + } + resolvedPath = resolvedPath.replace('{resourceId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: resourceId.'); + } + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.patchOperations !== undefined) { + bodyParams['patchOperations'] = serializeAws_restJson1_1ListOfPatchOperation(input.patchOperations, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PATCH", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1UpdateRestApiCommand( + input: UpdateRestApiCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}"; + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.patchOperations !== undefined) { + bodyParams['patchOperations'] = serializeAws_restJson1_1ListOfPatchOperation(input.patchOperations, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PATCH", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1UpdateStageCommand( + input: UpdateStageCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/restapis/{restApiId}/stages/{stageName}"; + if (input.restApiId !== undefined) { + const labelValue: any = input.restApiId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: restApiId.'); + } + resolvedPath = resolvedPath.replace('{restApiId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: restApiId.'); + } + if (input.stageName !== undefined) { + const labelValue: any = input.stageName.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: stageName.'); + } + resolvedPath = resolvedPath.replace('{stageName}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: stageName.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.patchOperations !== undefined) { + bodyParams['patchOperations'] = serializeAws_restJson1_1ListOfPatchOperation(input.patchOperations, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PATCH", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1UpdateUsageCommand( + input: UpdateUsageCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/usageplans/{usagePlanId}/keys/{keyId}/usage"; + if (input.keyId !== undefined) { + const labelValue: any = input.keyId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: keyId.'); + } + resolvedPath = resolvedPath.replace('{keyId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: keyId.'); + } + if (input.usagePlanId !== undefined) { + const labelValue: any = input.usagePlanId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: usagePlanId.'); + } + resolvedPath = resolvedPath.replace('{usagePlanId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: usagePlanId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.patchOperations !== undefined) { + bodyParams['patchOperations'] = serializeAws_restJson1_1ListOfPatchOperation(input.patchOperations, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PATCH", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1UpdateUsagePlanCommand( + input: UpdateUsagePlanCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/usageplans/{usagePlanId}"; + if (input.usagePlanId !== undefined) { + const labelValue: any = input.usagePlanId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: usagePlanId.'); + } + resolvedPath = resolvedPath.replace('{usagePlanId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: usagePlanId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.patchOperations !== undefined) { + bodyParams['patchOperations'] = serializeAws_restJson1_1ListOfPatchOperation(input.patchOperations, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PATCH", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function serializeAws_restJson1_1UpdateVpcLinkCommand( + input: UpdateVpcLinkCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers['Content-Type'] = "application/json"; + let resolvedPath = "/vpclinks/{vpcLinkId}"; + if (input.vpcLinkId !== undefined) { + const labelValue: any = input.vpcLinkId.toString(); + if (labelValue.length <= 0) { + throw new Error('Empty value provided for input HTTP label: vpcLinkId.'); + } + resolvedPath = resolvedPath.replace('{vpcLinkId}', labelValue); + } else { + throw new Error('No value provided for input HTTP label: vpcLinkId.'); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.patchOperations !== undefined) { + bodyParams['patchOperations'] = serializeAws_restJson1_1ListOfPatchOperation(input.patchOperations, context); + } + if (input.template !== undefined) { + bodyParams['template'] = input.template; + } + if (input.templateSkipList !== undefined) { + bodyParams['templateSkipList'] = serializeAws_restJson1_1ListOfString(input.templateSkipList, context); + } + if (input.title !== undefined) { + bodyParams['title'] = input.title; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PATCH", + headers: headers, + path: resolvedPath, + body: body, + }); +} + +export async function deserializeAws_restJson1_1CreateApiKeyCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 201) { + return deserializeAws_restJson1_1CreateApiKeyCommandError(output, context); + } + const contents: CreateApiKeyCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ApiKey", + createdDate: undefined, + customerId: undefined, + description: undefined, + enabled: undefined, + id: undefined, + lastUpdatedDate: undefined, + name: undefined, + stageKeys: undefined, + tags: undefined, + value: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.createdDate !== undefined) { + contents.createdDate = new Date(data.createdDate % 1 != 0 ? Math.round(data.createdDate * 1000) : data.createdDate); + } + if (data.customerId !== undefined) { + contents.customerId = data.customerId; + } + if (data.description !== undefined) { + contents.description = data.description; + } + if (data.enabled !== undefined) { + contents.enabled = data.enabled; + } + if (data.id !== undefined) { + contents.id = data.id; + } + if (data.lastUpdatedDate !== undefined) { + contents.lastUpdatedDate = new Date(data.lastUpdatedDate % 1 != 0 ? Math.round(data.lastUpdatedDate * 1000) : data.lastUpdatedDate); + } + if (data.name !== undefined) { + contents.name = data.name; + } + if (data.stageKeys !== undefined) { + contents.stageKeys = deserializeAws_restJson1_1ListOfString(data.stageKeys, context); + } + if (data.tags !== undefined) { + contents.tags = deserializeAws_restJson1_1MapOfStringToString(data.tags, context); + } + if (data.value !== undefined) { + contents.value = data.value; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1CreateApiKeyCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "LimitExceededException": + case "com.amazonaws.commonapi.exceptions#LimitExceededException": + response = await deserializeAws_restJson1_1LimitExceededExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1CreateAuthorizerCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 201) { + return deserializeAws_restJson1_1CreateAuthorizerCommandError(output, context); + } + const contents: CreateAuthorizerCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "Authorizer", + authType: undefined, + authorizerCredentials: undefined, + authorizerResultTtlInSeconds: undefined, + authorizerUri: undefined, + id: undefined, + identitySource: undefined, + identityValidationExpression: undefined, + name: undefined, + providerARNs: undefined, + type: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.authType !== undefined) { + contents.authType = data.authType; + } + if (data.authorizerCredentials !== undefined) { + contents.authorizerCredentials = data.authorizerCredentials; + } + if (data.authorizerResultTtlInSeconds !== undefined) { + contents.authorizerResultTtlInSeconds = data.authorizerResultTtlInSeconds; + } + if (data.authorizerUri !== undefined) { + contents.authorizerUri = data.authorizerUri; + } + if (data.id !== undefined) { + contents.id = data.id; + } + if (data.identitySource !== undefined) { + contents.identitySource = data.identitySource; + } + if (data.identityValidationExpression !== undefined) { + contents.identityValidationExpression = data.identityValidationExpression; + } + if (data.name !== undefined) { + contents.name = data.name; + } + if (data.providerARNs !== undefined) { + contents.providerARNs = deserializeAws_restJson1_1ListOfARNs(data.providerARNs, context); + } + if (data.type !== undefined) { + contents.type = data.type; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1CreateAuthorizerCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "LimitExceededException": + case "com.amazonaws.commonapi.exceptions#LimitExceededException": + response = await deserializeAws_restJson1_1LimitExceededExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1CreateBasePathMappingCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 201) { + return deserializeAws_restJson1_1CreateBasePathMappingCommandError(output, context); + } + const contents: CreateBasePathMappingCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "BasePathMapping", + basePath: undefined, + restApiId: undefined, + stage: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.basePath !== undefined) { + contents.basePath = data.basePath; + } + if (data.restApiId !== undefined) { + contents.restApiId = data.restApiId; + } + if (data.stage !== undefined) { + contents.stage = data.stage; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1CreateBasePathMappingCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1CreateDeploymentCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 201) { + return deserializeAws_restJson1_1CreateDeploymentCommandError(output, context); + } + const contents: CreateDeploymentCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "Deployment", + apiSummary: undefined, + createdDate: undefined, + description: undefined, + id: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.apiSummary !== undefined) { + contents.apiSummary = deserializeAws_restJson1_1PathToMapOfMethodSnapshot(data.apiSummary, context); + } + if (data.createdDate !== undefined) { + contents.createdDate = new Date(data.createdDate % 1 != 0 ? Math.round(data.createdDate * 1000) : data.createdDate); + } + if (data.description !== undefined) { + contents.description = data.description; + } + if (data.id !== undefined) { + contents.id = data.id; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1CreateDeploymentCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "LimitExceededException": + case "com.amazonaws.commonapi.exceptions#LimitExceededException": + response = await deserializeAws_restJson1_1LimitExceededExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "ServiceUnavailableException": + case "com.amazonaws.commonapi.exceptions#ServiceUnavailableException": + response = await deserializeAws_restJson1_1ServiceUnavailableExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1CreateDocumentationPartCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 201) { + return deserializeAws_restJson1_1CreateDocumentationPartCommandError(output, context); + } + const contents: CreateDocumentationPartCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DocumentationPart", + id: undefined, + location: undefined, + properties: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.id !== undefined) { + contents.id = data.id; + } + if (data.location !== undefined) { + contents.location = deserializeAws_restJson1_1DocumentationPartLocation(data.location, context); + } + if (data.properties !== undefined) { + contents.properties = data.properties; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1CreateDocumentationPartCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "LimitExceededException": + case "com.amazonaws.commonapi.exceptions#LimitExceededException": + response = await deserializeAws_restJson1_1LimitExceededExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1CreateDocumentationVersionCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 201) { + return deserializeAws_restJson1_1CreateDocumentationVersionCommandError(output, context); + } + const contents: CreateDocumentationVersionCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DocumentationVersion", + createdDate: undefined, + description: undefined, + version: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.createdDate !== undefined) { + contents.createdDate = new Date(data.createdDate % 1 != 0 ? Math.round(data.createdDate * 1000) : data.createdDate); + } + if (data.description !== undefined) { + contents.description = data.description; + } + if (data.version !== undefined) { + contents.version = data.version; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1CreateDocumentationVersionCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "LimitExceededException": + case "com.amazonaws.commonapi.exceptions#LimitExceededException": + response = await deserializeAws_restJson1_1LimitExceededExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1CreateDomainNameCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 201) { + return deserializeAws_restJson1_1CreateDomainNameCommandError(output, context); + } + const contents: CreateDomainNameCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DomainName", + certificateArn: undefined, + certificateName: undefined, + certificateUploadDate: undefined, + distributionDomainName: undefined, + distributionHostedZoneId: undefined, + domainName: undefined, + domainNameStatus: undefined, + domainNameStatusMessage: undefined, + endpointConfiguration: undefined, + regionalCertificateArn: undefined, + regionalCertificateName: undefined, + regionalDomainName: undefined, + regionalHostedZoneId: undefined, + securityPolicy: undefined, + tags: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.certificateArn !== undefined) { + contents.certificateArn = data.certificateArn; + } + if (data.certificateName !== undefined) { + contents.certificateName = data.certificateName; + } + if (data.certificateUploadDate !== undefined) { + contents.certificateUploadDate = new Date(data.certificateUploadDate % 1 != 0 ? Math.round(data.certificateUploadDate * 1000) : data.certificateUploadDate); + } + if (data.distributionDomainName !== undefined) { + contents.distributionDomainName = data.distributionDomainName; + } + if (data.distributionHostedZoneId !== undefined) { + contents.distributionHostedZoneId = data.distributionHostedZoneId; + } + if (data.domainName !== undefined) { + contents.domainName = data.domainName; + } + if (data.domainNameStatus !== undefined) { + contents.domainNameStatus = data.domainNameStatus; + } + if (data.domainNameStatusMessage !== undefined) { + contents.domainNameStatusMessage = data.domainNameStatusMessage; + } + if (data.endpointConfiguration !== undefined) { + contents.endpointConfiguration = deserializeAws_restJson1_1EndpointConfiguration(data.endpointConfiguration, context); + } + if (data.regionalCertificateArn !== undefined) { + contents.regionalCertificateArn = data.regionalCertificateArn; + } + if (data.regionalCertificateName !== undefined) { + contents.regionalCertificateName = data.regionalCertificateName; + } + if (data.regionalDomainName !== undefined) { + contents.regionalDomainName = data.regionalDomainName; + } + if (data.regionalHostedZoneId !== undefined) { + contents.regionalHostedZoneId = data.regionalHostedZoneId; + } + if (data.securityPolicy !== undefined) { + contents.securityPolicy = data.securityPolicy; + } + if (data.tags !== undefined) { + contents.tags = deserializeAws_restJson1_1MapOfStringToString(data.tags, context); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1CreateDomainNameCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1CreateModelCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 201) { + return deserializeAws_restJson1_1CreateModelCommandError(output, context); + } + const contents: CreateModelCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "Model", + contentType: undefined, + description: undefined, + id: undefined, + name: undefined, + schema: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.contentType !== undefined) { + contents.contentType = data.contentType; + } + if (data.description !== undefined) { + contents.description = data.description; + } + if (data.id !== undefined) { + contents.id = data.id; + } + if (data.name !== undefined) { + contents.name = data.name; + } + if (data.schema !== undefined) { + contents.schema = data.schema; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1CreateModelCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "LimitExceededException": + case "com.amazonaws.commonapi.exceptions#LimitExceededException": + response = await deserializeAws_restJson1_1LimitExceededExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1CreateRequestValidatorCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 201) { + return deserializeAws_restJson1_1CreateRequestValidatorCommandError(output, context); + } + const contents: CreateRequestValidatorCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "RequestValidator", + id: undefined, + name: undefined, + validateRequestBody: undefined, + validateRequestParameters: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.id !== undefined) { + contents.id = data.id; + } + if (data.name !== undefined) { + contents.name = data.name; + } + if (data.validateRequestBody !== undefined) { + contents.validateRequestBody = data.validateRequestBody; + } + if (data.validateRequestParameters !== undefined) { + contents.validateRequestParameters = data.validateRequestParameters; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1CreateRequestValidatorCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "LimitExceededException": + case "com.amazonaws.commonapi.exceptions#LimitExceededException": + response = await deserializeAws_restJson1_1LimitExceededExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1CreateResourceCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 201) { + return deserializeAws_restJson1_1CreateResourceCommandError(output, context); + } + const contents: CreateResourceCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "Resource", + id: undefined, + parentId: undefined, + path: undefined, + pathPart: undefined, + resourceMethods: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.id !== undefined) { + contents.id = data.id; + } + if (data.parentId !== undefined) { + contents.parentId = data.parentId; + } + if (data.path !== undefined) { + contents.path = data.path; + } + if (data.pathPart !== undefined) { + contents.pathPart = data.pathPart; + } + if (data.resourceMethods !== undefined) { + contents.resourceMethods = deserializeAws_restJson1_1MapOfMethod(data.resourceMethods, context); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1CreateResourceCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "LimitExceededException": + case "com.amazonaws.commonapi.exceptions#LimitExceededException": + response = await deserializeAws_restJson1_1LimitExceededExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1CreateRestApiCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 201) { + return deserializeAws_restJson1_1CreateRestApiCommandError(output, context); + } + const contents: CreateRestApiCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "RestApi", + apiKeySource: undefined, + binaryMediaTypes: undefined, + createdDate: undefined, + description: undefined, + endpointConfiguration: undefined, + id: undefined, + minimumCompressionSize: undefined, + name: undefined, + policy: undefined, + tags: undefined, + version: undefined, + warnings: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.apiKeySource !== undefined) { + contents.apiKeySource = data.apiKeySource; + } + if (data.binaryMediaTypes !== undefined) { + contents.binaryMediaTypes = deserializeAws_restJson1_1ListOfString(data.binaryMediaTypes, context); + } + if (data.createdDate !== undefined) { + contents.createdDate = new Date(data.createdDate % 1 != 0 ? Math.round(data.createdDate * 1000) : data.createdDate); + } + if (data.description !== undefined) { + contents.description = data.description; + } + if (data.endpointConfiguration !== undefined) { + contents.endpointConfiguration = deserializeAws_restJson1_1EndpointConfiguration(data.endpointConfiguration, context); + } + if (data.id !== undefined) { + contents.id = data.id; + } + if (data.minimumCompressionSize !== undefined) { + contents.minimumCompressionSize = data.minimumCompressionSize; + } + if (data.name !== undefined) { + contents.name = data.name; + } + if (data.policy !== undefined) { + contents.policy = data.policy; + } + if (data.tags !== undefined) { + contents.tags = deserializeAws_restJson1_1MapOfStringToString(data.tags, context); + } + if (data.version !== undefined) { + contents.version = data.version; + } + if (data.warnings !== undefined) { + contents.warnings = deserializeAws_restJson1_1ListOfString(data.warnings, context); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1CreateRestApiCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "LimitExceededException": + case "com.amazonaws.commonapi.exceptions#LimitExceededException": + response = await deserializeAws_restJson1_1LimitExceededExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1CreateStageCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 201) { + return deserializeAws_restJson1_1CreateStageCommandError(output, context); + } + const contents: CreateStageCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "Stage", + accessLogSettings: undefined, + cacheClusterEnabled: undefined, + cacheClusterSize: undefined, + cacheClusterStatus: undefined, + canarySettings: undefined, + clientCertificateId: undefined, + createdDate: undefined, + deploymentId: undefined, + description: undefined, + documentationVersion: undefined, + lastUpdatedDate: undefined, + methodSettings: undefined, + stageName: undefined, + tags: undefined, + tracingEnabled: undefined, + variables: undefined, + webAclArn: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.accessLogSettings !== undefined) { + contents.accessLogSettings = deserializeAws_restJson1_1AccessLogSettings(data.accessLogSettings, context); + } + if (data.cacheClusterEnabled !== undefined) { + contents.cacheClusterEnabled = data.cacheClusterEnabled; + } + if (data.cacheClusterSize !== undefined) { + contents.cacheClusterSize = data.cacheClusterSize; + } + if (data.cacheClusterStatus !== undefined) { + contents.cacheClusterStatus = data.cacheClusterStatus; + } + if (data.canarySettings !== undefined) { + contents.canarySettings = deserializeAws_restJson1_1CanarySettings(data.canarySettings, context); + } + if (data.clientCertificateId !== undefined) { + contents.clientCertificateId = data.clientCertificateId; + } + if (data.createdDate !== undefined) { + contents.createdDate = new Date(data.createdDate % 1 != 0 ? Math.round(data.createdDate * 1000) : data.createdDate); + } + if (data.deploymentId !== undefined) { + contents.deploymentId = data.deploymentId; + } + if (data.description !== undefined) { + contents.description = data.description; + } + if (data.documentationVersion !== undefined) { + contents.documentationVersion = data.documentationVersion; + } + if (data.lastUpdatedDate !== undefined) { + contents.lastUpdatedDate = new Date(data.lastUpdatedDate % 1 != 0 ? Math.round(data.lastUpdatedDate * 1000) : data.lastUpdatedDate); + } + if (data.methodSettings !== undefined) { + contents.methodSettings = deserializeAws_restJson1_1MapOfMethodSettings(data.methodSettings, context); + } + if (data.stageName !== undefined) { + contents.stageName = data.stageName; + } + if (data.tags !== undefined) { + contents.tags = deserializeAws_restJson1_1MapOfStringToString(data.tags, context); + } + if (data.tracingEnabled !== undefined) { + contents.tracingEnabled = data.tracingEnabled; + } + if (data.variables !== undefined) { + contents.variables = deserializeAws_restJson1_1MapOfStringToString(data.variables, context); + } + if (data.webAclArn !== undefined) { + contents.webAclArn = data.webAclArn; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1CreateStageCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "LimitExceededException": + case "com.amazonaws.commonapi.exceptions#LimitExceededException": + response = await deserializeAws_restJson1_1LimitExceededExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1CreateUsagePlanCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 201) { + return deserializeAws_restJson1_1CreateUsagePlanCommandError(output, context); + } + const contents: CreateUsagePlanCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "UsagePlan", + apiStages: undefined, + description: undefined, + id: undefined, + name: undefined, + productCode: undefined, + quota: undefined, + tags: undefined, + throttle: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.apiStages !== undefined) { + contents.apiStages = deserializeAws_restJson1_1ListOfApiStage(data.apiStages, context); + } + if (data.description !== undefined) { + contents.description = data.description; + } + if (data.id !== undefined) { + contents.id = data.id; + } + if (data.name !== undefined) { + contents.name = data.name; + } + if (data.productCode !== undefined) { + contents.productCode = data.productCode; + } + if (data.quota !== undefined) { + contents.quota = deserializeAws_restJson1_1QuotaSettings(data.quota, context); + } + if (data.tags !== undefined) { + contents.tags = deserializeAws_restJson1_1MapOfStringToString(data.tags, context); + } + if (data.throttle !== undefined) { + contents.throttle = deserializeAws_restJson1_1ThrottleSettings(data.throttle, context); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1CreateUsagePlanCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "LimitExceededException": + case "com.amazonaws.commonapi.exceptions#LimitExceededException": + response = await deserializeAws_restJson1_1LimitExceededExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1CreateUsagePlanKeyCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 201) { + return deserializeAws_restJson1_1CreateUsagePlanKeyCommandError(output, context); + } + const contents: CreateUsagePlanKeyCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "UsagePlanKey", + id: undefined, + name: undefined, + type: undefined, + value: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.id !== undefined) { + contents.id = data.id; + } + if (data.name !== undefined) { + contents.name = data.name; + } + if (data.type !== undefined) { + contents.type = data.type; + } + if (data.value !== undefined) { + contents.value = data.value; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1CreateUsagePlanKeyCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1CreateVpcLinkCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 202) { + return deserializeAws_restJson1_1CreateVpcLinkCommandError(output, context); + } + const contents: CreateVpcLinkCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "VpcLink", + description: undefined, + id: undefined, + name: undefined, + status: undefined, + statusMessage: undefined, + tags: undefined, + targetArns: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.description !== undefined) { + contents.description = data.description; + } + if (data.id !== undefined) { + contents.id = data.id; + } + if (data.name !== undefined) { + contents.name = data.name; + } + if (data.status !== undefined) { + contents.status = data.status; + } + if (data.statusMessage !== undefined) { + contents.statusMessage = data.statusMessage; + } + if (data.tags !== undefined) { + contents.tags = deserializeAws_restJson1_1MapOfStringToString(data.tags, context); + } + if (data.targetArns !== undefined) { + contents.targetArns = deserializeAws_restJson1_1ListOfString(data.targetArns, context); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1CreateVpcLinkCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1DeleteApiKeyCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 202) { + return deserializeAws_restJson1_1DeleteApiKeyCommandError(output, context); + } + const contents: DeleteApiKeyCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1DeleteApiKeyCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1DeleteAuthorizerCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 202) { + return deserializeAws_restJson1_1DeleteAuthorizerCommandError(output, context); + } + const contents: DeleteAuthorizerCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1DeleteAuthorizerCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1DeleteBasePathMappingCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 202) { + return deserializeAws_restJson1_1DeleteBasePathMappingCommandError(output, context); + } + const contents: DeleteBasePathMappingCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1DeleteBasePathMappingCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1DeleteClientCertificateCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 202) { + return deserializeAws_restJson1_1DeleteClientCertificateCommandError(output, context); + } + const contents: DeleteClientCertificateCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1DeleteClientCertificateCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1DeleteDeploymentCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 202) { + return deserializeAws_restJson1_1DeleteDeploymentCommandError(output, context); + } + const contents: DeleteDeploymentCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1DeleteDeploymentCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1DeleteDocumentationPartCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 202) { + return deserializeAws_restJson1_1DeleteDocumentationPartCommandError(output, context); + } + const contents: DeleteDocumentationPartCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1DeleteDocumentationPartCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1DeleteDocumentationVersionCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 202) { + return deserializeAws_restJson1_1DeleteDocumentationVersionCommandError(output, context); + } + const contents: DeleteDocumentationVersionCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1DeleteDocumentationVersionCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1DeleteDomainNameCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 202) { + return deserializeAws_restJson1_1DeleteDomainNameCommandError(output, context); + } + const contents: DeleteDomainNameCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1DeleteDomainNameCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1DeleteGatewayResponseCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 202) { + return deserializeAws_restJson1_1DeleteGatewayResponseCommandError(output, context); + } + const contents: DeleteGatewayResponseCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1DeleteGatewayResponseCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1DeleteIntegrationCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 204) { + return deserializeAws_restJson1_1DeleteIntegrationCommandError(output, context); + } + const contents: DeleteIntegrationCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1DeleteIntegrationCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1DeleteIntegrationResponseCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 204) { + return deserializeAws_restJson1_1DeleteIntegrationResponseCommandError(output, context); + } + const contents: DeleteIntegrationResponseCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1DeleteIntegrationResponseCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1DeleteMethodCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 204) { + return deserializeAws_restJson1_1DeleteMethodCommandError(output, context); + } + const contents: DeleteMethodCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1DeleteMethodCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1DeleteMethodResponseCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 204) { + return deserializeAws_restJson1_1DeleteMethodResponseCommandError(output, context); + } + const contents: DeleteMethodResponseCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1DeleteMethodResponseCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1DeleteModelCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 202) { + return deserializeAws_restJson1_1DeleteModelCommandError(output, context); + } + const contents: DeleteModelCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1DeleteModelCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1DeleteRequestValidatorCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 202) { + return deserializeAws_restJson1_1DeleteRequestValidatorCommandError(output, context); + } + const contents: DeleteRequestValidatorCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1DeleteRequestValidatorCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1DeleteResourceCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 202) { + return deserializeAws_restJson1_1DeleteResourceCommandError(output, context); + } + const contents: DeleteResourceCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1DeleteResourceCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1DeleteRestApiCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 202) { + return deserializeAws_restJson1_1DeleteRestApiCommandError(output, context); + } + const contents: DeleteRestApiCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1DeleteRestApiCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1DeleteStageCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 202) { + return deserializeAws_restJson1_1DeleteStageCommandError(output, context); + } + const contents: DeleteStageCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1DeleteStageCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1DeleteUsagePlanCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 202) { + return deserializeAws_restJson1_1DeleteUsagePlanCommandError(output, context); + } + const contents: DeleteUsagePlanCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1DeleteUsagePlanCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1DeleteUsagePlanKeyCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 202) { + return deserializeAws_restJson1_1DeleteUsagePlanKeyCommandError(output, context); + } + const contents: DeleteUsagePlanKeyCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1DeleteUsagePlanKeyCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1DeleteVpcLinkCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 202) { + return deserializeAws_restJson1_1DeleteVpcLinkCommandError(output, context); + } + const contents: DeleteVpcLinkCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1DeleteVpcLinkCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1FlushStageAuthorizersCacheCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 202) { + return deserializeAws_restJson1_1FlushStageAuthorizersCacheCommandError(output, context); + } + const contents: FlushStageAuthorizersCacheCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1FlushStageAuthorizersCacheCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1FlushStageCacheCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 202) { + return deserializeAws_restJson1_1FlushStageCacheCommandError(output, context); + } + const contents: FlushStageCacheCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1FlushStageCacheCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GenerateClientCertificateCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 201) { + return deserializeAws_restJson1_1GenerateClientCertificateCommandError(output, context); + } + const contents: GenerateClientCertificateCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ClientCertificate", + clientCertificateId: undefined, + createdDate: undefined, + description: undefined, + expirationDate: undefined, + pemEncodedCertificate: undefined, + tags: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.clientCertificateId !== undefined) { + contents.clientCertificateId = data.clientCertificateId; + } + if (data.createdDate !== undefined) { + contents.createdDate = new Date(data.createdDate % 1 != 0 ? Math.round(data.createdDate * 1000) : data.createdDate); + } + if (data.description !== undefined) { + contents.description = data.description; + } + if (data.expirationDate !== undefined) { + contents.expirationDate = new Date(data.expirationDate % 1 != 0 ? Math.round(data.expirationDate * 1000) : data.expirationDate); + } + if (data.pemEncodedCertificate !== undefined) { + contents.pemEncodedCertificate = data.pemEncodedCertificate; + } + if (data.tags !== undefined) { + contents.tags = deserializeAws_restJson1_1MapOfStringToString(data.tags, context); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GenerateClientCertificateCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "LimitExceededException": + case "com.amazonaws.commonapi.exceptions#LimitExceededException": + response = await deserializeAws_restJson1_1LimitExceededExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetAccountCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetAccountCommandError(output, context); + } + const contents: GetAccountCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "Account", + apiKeyVersion: undefined, + cloudwatchRoleArn: undefined, + features: undefined, + throttleSettings: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.apiKeyVersion !== undefined) { + contents.apiKeyVersion = data.apiKeyVersion; + } + if (data.cloudwatchRoleArn !== undefined) { + contents.cloudwatchRoleArn = data.cloudwatchRoleArn; + } + if (data.features !== undefined) { + contents.features = deserializeAws_restJson1_1ListOfString(data.features, context); + } + if (data.throttleSettings !== undefined) { + contents.throttleSettings = deserializeAws_restJson1_1ThrottleSettings(data.throttleSettings, context); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetAccountCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetApiKeyCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetApiKeyCommandError(output, context); + } + const contents: GetApiKeyCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ApiKey", + createdDate: undefined, + customerId: undefined, + description: undefined, + enabled: undefined, + id: undefined, + lastUpdatedDate: undefined, + name: undefined, + stageKeys: undefined, + tags: undefined, + value: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.createdDate !== undefined) { + contents.createdDate = new Date(data.createdDate % 1 != 0 ? Math.round(data.createdDate * 1000) : data.createdDate); + } + if (data.customerId !== undefined) { + contents.customerId = data.customerId; + } + if (data.description !== undefined) { + contents.description = data.description; + } + if (data.enabled !== undefined) { + contents.enabled = data.enabled; + } + if (data.id !== undefined) { + contents.id = data.id; + } + if (data.lastUpdatedDate !== undefined) { + contents.lastUpdatedDate = new Date(data.lastUpdatedDate % 1 != 0 ? Math.round(data.lastUpdatedDate * 1000) : data.lastUpdatedDate); + } + if (data.name !== undefined) { + contents.name = data.name; + } + if (data.stageKeys !== undefined) { + contents.stageKeys = deserializeAws_restJson1_1ListOfString(data.stageKeys, context); + } + if (data.tags !== undefined) { + contents.tags = deserializeAws_restJson1_1MapOfStringToString(data.tags, context); + } + if (data.value !== undefined) { + contents.value = data.value; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetApiKeyCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetApiKeysCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetApiKeysCommandError(output, context); + } + const contents: GetApiKeysCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ApiKeys", + items: undefined, + position: undefined, + warnings: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.item !== undefined) { + contents.items = deserializeAws_restJson1_1ListOfApiKey(data.item, context); + } + if (data.position !== undefined) { + contents.position = data.position; + } + if (data.warnings !== undefined) { + contents.warnings = deserializeAws_restJson1_1ListOfString(data.warnings, context); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetApiKeysCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetAuthorizerCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetAuthorizerCommandError(output, context); + } + const contents: GetAuthorizerCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "Authorizer", + authType: undefined, + authorizerCredentials: undefined, + authorizerResultTtlInSeconds: undefined, + authorizerUri: undefined, + id: undefined, + identitySource: undefined, + identityValidationExpression: undefined, + name: undefined, + providerARNs: undefined, + type: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.authType !== undefined) { + contents.authType = data.authType; + } + if (data.authorizerCredentials !== undefined) { + contents.authorizerCredentials = data.authorizerCredentials; + } + if (data.authorizerResultTtlInSeconds !== undefined) { + contents.authorizerResultTtlInSeconds = data.authorizerResultTtlInSeconds; + } + if (data.authorizerUri !== undefined) { + contents.authorizerUri = data.authorizerUri; + } + if (data.id !== undefined) { + contents.id = data.id; + } + if (data.identitySource !== undefined) { + contents.identitySource = data.identitySource; + } + if (data.identityValidationExpression !== undefined) { + contents.identityValidationExpression = data.identityValidationExpression; + } + if (data.name !== undefined) { + contents.name = data.name; + } + if (data.providerARNs !== undefined) { + contents.providerARNs = deserializeAws_restJson1_1ListOfARNs(data.providerARNs, context); + } + if (data.type !== undefined) { + contents.type = data.type; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetAuthorizerCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetAuthorizersCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetAuthorizersCommandError(output, context); + } + const contents: GetAuthorizersCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "Authorizers", + items: undefined, + position: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.item !== undefined) { + contents.items = deserializeAws_restJson1_1ListOfAuthorizer(data.item, context); + } + if (data.position !== undefined) { + contents.position = data.position; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetAuthorizersCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetBasePathMappingCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetBasePathMappingCommandError(output, context); + } + const contents: GetBasePathMappingCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "BasePathMapping", + basePath: undefined, + restApiId: undefined, + stage: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.basePath !== undefined) { + contents.basePath = data.basePath; + } + if (data.restApiId !== undefined) { + contents.restApiId = data.restApiId; + } + if (data.stage !== undefined) { + contents.stage = data.stage; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetBasePathMappingCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetBasePathMappingsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetBasePathMappingsCommandError(output, context); + } + const contents: GetBasePathMappingsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "BasePathMappings", + items: undefined, + position: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.item !== undefined) { + contents.items = deserializeAws_restJson1_1ListOfBasePathMapping(data.item, context); + } + if (data.position !== undefined) { + contents.position = data.position; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetBasePathMappingsCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetClientCertificateCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetClientCertificateCommandError(output, context); + } + const contents: GetClientCertificateCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ClientCertificate", + clientCertificateId: undefined, + createdDate: undefined, + description: undefined, + expirationDate: undefined, + pemEncodedCertificate: undefined, + tags: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.clientCertificateId !== undefined) { + contents.clientCertificateId = data.clientCertificateId; + } + if (data.createdDate !== undefined) { + contents.createdDate = new Date(data.createdDate % 1 != 0 ? Math.round(data.createdDate * 1000) : data.createdDate); + } + if (data.description !== undefined) { + contents.description = data.description; + } + if (data.expirationDate !== undefined) { + contents.expirationDate = new Date(data.expirationDate % 1 != 0 ? Math.round(data.expirationDate * 1000) : data.expirationDate); + } + if (data.pemEncodedCertificate !== undefined) { + contents.pemEncodedCertificate = data.pemEncodedCertificate; + } + if (data.tags !== undefined) { + contents.tags = deserializeAws_restJson1_1MapOfStringToString(data.tags, context); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetClientCertificateCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetClientCertificatesCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetClientCertificatesCommandError(output, context); + } + const contents: GetClientCertificatesCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ClientCertificates", + items: undefined, + position: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.item !== undefined) { + contents.items = deserializeAws_restJson1_1ListOfClientCertificate(data.item, context); + } + if (data.position !== undefined) { + contents.position = data.position; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetClientCertificatesCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetDeploymentCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetDeploymentCommandError(output, context); + } + const contents: GetDeploymentCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "Deployment", + apiSummary: undefined, + createdDate: undefined, + description: undefined, + id: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.apiSummary !== undefined) { + contents.apiSummary = deserializeAws_restJson1_1PathToMapOfMethodSnapshot(data.apiSummary, context); + } + if (data.createdDate !== undefined) { + contents.createdDate = new Date(data.createdDate % 1 != 0 ? Math.round(data.createdDate * 1000) : data.createdDate); + } + if (data.description !== undefined) { + contents.description = data.description; + } + if (data.id !== undefined) { + contents.id = data.id; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetDeploymentCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "ServiceUnavailableException": + case "com.amazonaws.commonapi.exceptions#ServiceUnavailableException": + response = await deserializeAws_restJson1_1ServiceUnavailableExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetDeploymentsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetDeploymentsCommandError(output, context); + } + const contents: GetDeploymentsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "Deployments", + items: undefined, + position: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.item !== undefined) { + contents.items = deserializeAws_restJson1_1ListOfDeployment(data.item, context); + } + if (data.position !== undefined) { + contents.position = data.position; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetDeploymentsCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ServiceUnavailableException": + case "com.amazonaws.commonapi.exceptions#ServiceUnavailableException": + response = await deserializeAws_restJson1_1ServiceUnavailableExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetDocumentationPartCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetDocumentationPartCommandError(output, context); + } + const contents: GetDocumentationPartCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DocumentationPart", + id: undefined, + location: undefined, + properties: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.id !== undefined) { + contents.id = data.id; + } + if (data.location !== undefined) { + contents.location = deserializeAws_restJson1_1DocumentationPartLocation(data.location, context); + } + if (data.properties !== undefined) { + contents.properties = data.properties; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetDocumentationPartCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetDocumentationPartsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetDocumentationPartsCommandError(output, context); + } + const contents: GetDocumentationPartsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DocumentationParts", + items: undefined, + position: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.item !== undefined) { + contents.items = deserializeAws_restJson1_1ListOfDocumentationPart(data.item, context); + } + if (data.position !== undefined) { + contents.position = data.position; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetDocumentationPartsCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetDocumentationVersionCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetDocumentationVersionCommandError(output, context); + } + const contents: GetDocumentationVersionCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DocumentationVersion", + createdDate: undefined, + description: undefined, + version: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.createdDate !== undefined) { + contents.createdDate = new Date(data.createdDate % 1 != 0 ? Math.round(data.createdDate * 1000) : data.createdDate); + } + if (data.description !== undefined) { + contents.description = data.description; + } + if (data.version !== undefined) { + contents.version = data.version; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetDocumentationVersionCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetDocumentationVersionsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetDocumentationVersionsCommandError(output, context); + } + const contents: GetDocumentationVersionsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DocumentationVersions", + items: undefined, + position: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.item !== undefined) { + contents.items = deserializeAws_restJson1_1ListOfDocumentationVersion(data.item, context); + } + if (data.position !== undefined) { + contents.position = data.position; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetDocumentationVersionsCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetDomainNameCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetDomainNameCommandError(output, context); + } + const contents: GetDomainNameCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DomainName", + certificateArn: undefined, + certificateName: undefined, + certificateUploadDate: undefined, + distributionDomainName: undefined, + distributionHostedZoneId: undefined, + domainName: undefined, + domainNameStatus: undefined, + domainNameStatusMessage: undefined, + endpointConfiguration: undefined, + regionalCertificateArn: undefined, + regionalCertificateName: undefined, + regionalDomainName: undefined, + regionalHostedZoneId: undefined, + securityPolicy: undefined, + tags: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.certificateArn !== undefined) { + contents.certificateArn = data.certificateArn; + } + if (data.certificateName !== undefined) { + contents.certificateName = data.certificateName; + } + if (data.certificateUploadDate !== undefined) { + contents.certificateUploadDate = new Date(data.certificateUploadDate % 1 != 0 ? Math.round(data.certificateUploadDate * 1000) : data.certificateUploadDate); + } + if (data.distributionDomainName !== undefined) { + contents.distributionDomainName = data.distributionDomainName; + } + if (data.distributionHostedZoneId !== undefined) { + contents.distributionHostedZoneId = data.distributionHostedZoneId; + } + if (data.domainName !== undefined) { + contents.domainName = data.domainName; + } + if (data.domainNameStatus !== undefined) { + contents.domainNameStatus = data.domainNameStatus; + } + if (data.domainNameStatusMessage !== undefined) { + contents.domainNameStatusMessage = data.domainNameStatusMessage; + } + if (data.endpointConfiguration !== undefined) { + contents.endpointConfiguration = deserializeAws_restJson1_1EndpointConfiguration(data.endpointConfiguration, context); + } + if (data.regionalCertificateArn !== undefined) { + contents.regionalCertificateArn = data.regionalCertificateArn; + } + if (data.regionalCertificateName !== undefined) { + contents.regionalCertificateName = data.regionalCertificateName; + } + if (data.regionalDomainName !== undefined) { + contents.regionalDomainName = data.regionalDomainName; + } + if (data.regionalHostedZoneId !== undefined) { + contents.regionalHostedZoneId = data.regionalHostedZoneId; + } + if (data.securityPolicy !== undefined) { + contents.securityPolicy = data.securityPolicy; + } + if (data.tags !== undefined) { + contents.tags = deserializeAws_restJson1_1MapOfStringToString(data.tags, context); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetDomainNameCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "ServiceUnavailableException": + case "com.amazonaws.commonapi.exceptions#ServiceUnavailableException": + response = await deserializeAws_restJson1_1ServiceUnavailableExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetDomainNamesCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetDomainNamesCommandError(output, context); + } + const contents: GetDomainNamesCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DomainNames", + items: undefined, + position: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.item !== undefined) { + contents.items = deserializeAws_restJson1_1ListOfDomainName(data.item, context); + } + if (data.position !== undefined) { + contents.position = data.position; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetDomainNamesCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetExportCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetExportCommandError(output, context); + } + const contents: GetExportCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ExportResponse", + body: undefined, + contentDisposition: undefined, + contentType: undefined, + }; + if (output.headers["Content-Disposition"] !== undefined) { + contents.contentDisposition = output.headers['Content-Disposition']; + } + if (output.headers["Content-Type"] !== undefined) { + contents.contentType = output.headers['Content-Type']; + } + const data: any = await parseBody(output.body, context); + contents.body = data; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetExportCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetGatewayResponseCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetGatewayResponseCommandError(output, context); + } + const contents: GetGatewayResponseCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GatewayResponse", + defaultResponse: undefined, + responseParameters: undefined, + responseTemplates: undefined, + responseType: undefined, + statusCode: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.defaultResponse !== undefined) { + contents.defaultResponse = data.defaultResponse; + } + if (data.responseParameters !== undefined) { + contents.responseParameters = deserializeAws_restJson1_1MapOfStringToString(data.responseParameters, context); + } + if (data.responseTemplates !== undefined) { + contents.responseTemplates = deserializeAws_restJson1_1MapOfStringToString(data.responseTemplates, context); + } + if (data.responseType !== undefined) { + contents.responseType = data.responseType; + } + if (data.statusCode !== undefined) { + contents.statusCode = data.statusCode; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetGatewayResponseCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetGatewayResponsesCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetGatewayResponsesCommandError(output, context); + } + const contents: GetGatewayResponsesCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GatewayResponses", + items: undefined, + position: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.item !== undefined) { + contents.items = deserializeAws_restJson1_1ListOfGatewayResponse(data.item, context); + } + if (data.position !== undefined) { + contents.position = data.position; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetGatewayResponsesCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetIntegrationCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetIntegrationCommandError(output, context); + } + const contents: GetIntegrationCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "Integration", + cacheKeyParameters: undefined, + cacheNamespace: undefined, + connectionId: undefined, + connectionType: undefined, + contentHandling: undefined, + credentials: undefined, + httpMethod: undefined, + integrationResponses: undefined, + passthroughBehavior: undefined, + requestParameters: undefined, + requestTemplates: undefined, + timeoutInMillis: undefined, + type: undefined, + uri: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.cacheKeyParameters !== undefined) { + contents.cacheKeyParameters = deserializeAws_restJson1_1ListOfString(data.cacheKeyParameters, context); + } + if (data.cacheNamespace !== undefined) { + contents.cacheNamespace = data.cacheNamespace; + } + if (data.connectionId !== undefined) { + contents.connectionId = data.connectionId; + } + if (data.connectionType !== undefined) { + contents.connectionType = data.connectionType; + } + if (data.contentHandling !== undefined) { + contents.contentHandling = data.contentHandling; + } + if (data.credentials !== undefined) { + contents.credentials = data.credentials; + } + if (data.httpMethod !== undefined) { + contents.httpMethod = data.httpMethod; + } + if (data.integrationResponses !== undefined) { + contents.integrationResponses = deserializeAws_restJson1_1MapOfIntegrationResponse(data.integrationResponses, context); + } + if (data.passthroughBehavior !== undefined) { + contents.passthroughBehavior = data.passthroughBehavior; + } + if (data.requestParameters !== undefined) { + contents.requestParameters = deserializeAws_restJson1_1MapOfStringToString(data.requestParameters, context); + } + if (data.requestTemplates !== undefined) { + contents.requestTemplates = deserializeAws_restJson1_1MapOfStringToString(data.requestTemplates, context); + } + if (data.timeoutInMillis !== undefined) { + contents.timeoutInMillis = data.timeoutInMillis; + } + if (data.type !== undefined) { + contents.type = data.type; + } + if (data.uri !== undefined) { + contents.uri = data.uri; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetIntegrationCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetIntegrationResponseCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetIntegrationResponseCommandError(output, context); + } + const contents: GetIntegrationResponseCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "IntegrationResponse", + contentHandling: undefined, + responseParameters: undefined, + responseTemplates: undefined, + selectionPattern: undefined, + statusCode: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.contentHandling !== undefined) { + contents.contentHandling = data.contentHandling; + } + if (data.responseParameters !== undefined) { + contents.responseParameters = deserializeAws_restJson1_1MapOfStringToString(data.responseParameters, context); + } + if (data.responseTemplates !== undefined) { + contents.responseTemplates = deserializeAws_restJson1_1MapOfStringToString(data.responseTemplates, context); + } + if (data.selectionPattern !== undefined) { + contents.selectionPattern = data.selectionPattern; + } + if (data.statusCode !== undefined) { + contents.statusCode = data.statusCode; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetIntegrationResponseCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetMethodCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetMethodCommandError(output, context); + } + const contents: GetMethodCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "Method", + apiKeyRequired: undefined, + authorizationScopes: undefined, + authorizationType: undefined, + authorizerId: undefined, + httpMethod: undefined, + methodIntegration: undefined, + methodResponses: undefined, + operationName: undefined, + requestModels: undefined, + requestParameters: undefined, + requestValidatorId: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.apiKeyRequired !== undefined) { + contents.apiKeyRequired = data.apiKeyRequired; + } + if (data.authorizationScopes !== undefined) { + contents.authorizationScopes = deserializeAws_restJson1_1ListOfString(data.authorizationScopes, context); + } + if (data.authorizationType !== undefined) { + contents.authorizationType = data.authorizationType; + } + if (data.authorizerId !== undefined) { + contents.authorizerId = data.authorizerId; + } + if (data.httpMethod !== undefined) { + contents.httpMethod = data.httpMethod; + } + if (data.methodIntegration !== undefined) { + contents.methodIntegration = deserializeAws_restJson1_1Integration(data.methodIntegration, context); + } + if (data.methodResponses !== undefined) { + contents.methodResponses = deserializeAws_restJson1_1MapOfMethodResponse(data.methodResponses, context); + } + if (data.operationName !== undefined) { + contents.operationName = data.operationName; + } + if (data.requestModels !== undefined) { + contents.requestModels = deserializeAws_restJson1_1MapOfStringToString(data.requestModels, context); + } + if (data.requestParameters !== undefined) { + contents.requestParameters = deserializeAws_restJson1_1MapOfStringToBoolean(data.requestParameters, context); + } + if (data.requestValidatorId !== undefined) { + contents.requestValidatorId = data.requestValidatorId; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetMethodCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetMethodResponseCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetMethodResponseCommandError(output, context); + } + const contents: GetMethodResponseCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "MethodResponse", + responseModels: undefined, + responseParameters: undefined, + statusCode: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.responseModels !== undefined) { + contents.responseModels = deserializeAws_restJson1_1MapOfStringToString(data.responseModels, context); + } + if (data.responseParameters !== undefined) { + contents.responseParameters = deserializeAws_restJson1_1MapOfStringToBoolean(data.responseParameters, context); + } + if (data.statusCode !== undefined) { + contents.statusCode = data.statusCode; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetMethodResponseCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetModelCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetModelCommandError(output, context); + } + const contents: GetModelCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "Model", + contentType: undefined, + description: undefined, + id: undefined, + name: undefined, + schema: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.contentType !== undefined) { + contents.contentType = data.contentType; + } + if (data.description !== undefined) { + contents.description = data.description; + } + if (data.id !== undefined) { + contents.id = data.id; + } + if (data.name !== undefined) { + contents.name = data.name; + } + if (data.schema !== undefined) { + contents.schema = data.schema; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetModelCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetModelTemplateCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetModelTemplateCommandError(output, context); + } + const contents: GetModelTemplateCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "Template", + value: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.value !== undefined) { + contents.value = data.value; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetModelTemplateCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetModelsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetModelsCommandError(output, context); + } + const contents: GetModelsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "Models", + items: undefined, + position: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.item !== undefined) { + contents.items = deserializeAws_restJson1_1ListOfModel(data.item, context); + } + if (data.position !== undefined) { + contents.position = data.position; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetModelsCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetRequestValidatorCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetRequestValidatorCommandError(output, context); + } + const contents: GetRequestValidatorCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "RequestValidator", + id: undefined, + name: undefined, + validateRequestBody: undefined, + validateRequestParameters: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.id !== undefined) { + contents.id = data.id; + } + if (data.name !== undefined) { + contents.name = data.name; + } + if (data.validateRequestBody !== undefined) { + contents.validateRequestBody = data.validateRequestBody; + } + if (data.validateRequestParameters !== undefined) { + contents.validateRequestParameters = data.validateRequestParameters; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetRequestValidatorCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetRequestValidatorsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetRequestValidatorsCommandError(output, context); + } + const contents: GetRequestValidatorsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "RequestValidators", + items: undefined, + position: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.item !== undefined) { + contents.items = deserializeAws_restJson1_1ListOfRequestValidator(data.item, context); + } + if (data.position !== undefined) { + contents.position = data.position; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetRequestValidatorsCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetResourceCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetResourceCommandError(output, context); + } + const contents: GetResourceCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "Resource", + id: undefined, + parentId: undefined, + path: undefined, + pathPart: undefined, + resourceMethods: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.id !== undefined) { + contents.id = data.id; + } + if (data.parentId !== undefined) { + contents.parentId = data.parentId; + } + if (data.path !== undefined) { + contents.path = data.path; + } + if (data.pathPart !== undefined) { + contents.pathPart = data.pathPart; + } + if (data.resourceMethods !== undefined) { + contents.resourceMethods = deserializeAws_restJson1_1MapOfMethod(data.resourceMethods, context); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetResourceCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetResourcesCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetResourcesCommandError(output, context); + } + const contents: GetResourcesCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "Resources", + items: undefined, + position: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.item !== undefined) { + contents.items = deserializeAws_restJson1_1ListOfResource(data.item, context); + } + if (data.position !== undefined) { + contents.position = data.position; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetResourcesCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetRestApiCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetRestApiCommandError(output, context); + } + const contents: GetRestApiCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "RestApi", + apiKeySource: undefined, + binaryMediaTypes: undefined, + createdDate: undefined, + description: undefined, + endpointConfiguration: undefined, + id: undefined, + minimumCompressionSize: undefined, + name: undefined, + policy: undefined, + tags: undefined, + version: undefined, + warnings: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.apiKeySource !== undefined) { + contents.apiKeySource = data.apiKeySource; + } + if (data.binaryMediaTypes !== undefined) { + contents.binaryMediaTypes = deserializeAws_restJson1_1ListOfString(data.binaryMediaTypes, context); + } + if (data.createdDate !== undefined) { + contents.createdDate = new Date(data.createdDate % 1 != 0 ? Math.round(data.createdDate * 1000) : data.createdDate); + } + if (data.description !== undefined) { + contents.description = data.description; + } + if (data.endpointConfiguration !== undefined) { + contents.endpointConfiguration = deserializeAws_restJson1_1EndpointConfiguration(data.endpointConfiguration, context); + } + if (data.id !== undefined) { + contents.id = data.id; + } + if (data.minimumCompressionSize !== undefined) { + contents.minimumCompressionSize = data.minimumCompressionSize; + } + if (data.name !== undefined) { + contents.name = data.name; + } + if (data.policy !== undefined) { + contents.policy = data.policy; + } + if (data.tags !== undefined) { + contents.tags = deserializeAws_restJson1_1MapOfStringToString(data.tags, context); + } + if (data.version !== undefined) { + contents.version = data.version; + } + if (data.warnings !== undefined) { + contents.warnings = deserializeAws_restJson1_1ListOfString(data.warnings, context); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetRestApiCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetRestApisCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetRestApisCommandError(output, context); + } + const contents: GetRestApisCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "RestApis", + items: undefined, + position: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.item !== undefined) { + contents.items = deserializeAws_restJson1_1ListOfRestApi(data.item, context); + } + if (data.position !== undefined) { + contents.position = data.position; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetRestApisCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetSdkCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetSdkCommandError(output, context); + } + const contents: GetSdkCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "SdkResponse", + body: undefined, + contentDisposition: undefined, + contentType: undefined, + }; + if (output.headers["Content-Disposition"] !== undefined) { + contents.contentDisposition = output.headers['Content-Disposition']; + } + if (output.headers["Content-Type"] !== undefined) { + contents.contentType = output.headers['Content-Type']; + } + const data: any = await parseBody(output.body, context); + contents.body = data; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetSdkCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetSdkTypeCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetSdkTypeCommandError(output, context); + } + const contents: GetSdkTypeCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "SdkType", + configurationProperties: undefined, + description: undefined, + friendlyName: undefined, + id: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.configurationProperties !== undefined) { + contents.configurationProperties = deserializeAws_restJson1_1ListOfSdkConfigurationProperty(data.configurationProperties, context); + } + if (data.description !== undefined) { + contents.description = data.description; + } + if (data.friendlyName !== undefined) { + contents.friendlyName = data.friendlyName; + } + if (data.id !== undefined) { + contents.id = data.id; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetSdkTypeCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetSdkTypesCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetSdkTypesCommandError(output, context); + } + const contents: GetSdkTypesCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "SdkTypes", + items: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.item !== undefined) { + contents.items = deserializeAws_restJson1_1ListOfSdkType(data.item, context); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetSdkTypesCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetStageCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetStageCommandError(output, context); + } + const contents: GetStageCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "Stage", + accessLogSettings: undefined, + cacheClusterEnabled: undefined, + cacheClusterSize: undefined, + cacheClusterStatus: undefined, + canarySettings: undefined, + clientCertificateId: undefined, + createdDate: undefined, + deploymentId: undefined, + description: undefined, + documentationVersion: undefined, + lastUpdatedDate: undefined, + methodSettings: undefined, + stageName: undefined, + tags: undefined, + tracingEnabled: undefined, + variables: undefined, + webAclArn: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.accessLogSettings !== undefined) { + contents.accessLogSettings = deserializeAws_restJson1_1AccessLogSettings(data.accessLogSettings, context); + } + if (data.cacheClusterEnabled !== undefined) { + contents.cacheClusterEnabled = data.cacheClusterEnabled; + } + if (data.cacheClusterSize !== undefined) { + contents.cacheClusterSize = data.cacheClusterSize; + } + if (data.cacheClusterStatus !== undefined) { + contents.cacheClusterStatus = data.cacheClusterStatus; + } + if (data.canarySettings !== undefined) { + contents.canarySettings = deserializeAws_restJson1_1CanarySettings(data.canarySettings, context); + } + if (data.clientCertificateId !== undefined) { + contents.clientCertificateId = data.clientCertificateId; + } + if (data.createdDate !== undefined) { + contents.createdDate = new Date(data.createdDate % 1 != 0 ? Math.round(data.createdDate * 1000) : data.createdDate); + } + if (data.deploymentId !== undefined) { + contents.deploymentId = data.deploymentId; + } + if (data.description !== undefined) { + contents.description = data.description; + } + if (data.documentationVersion !== undefined) { + contents.documentationVersion = data.documentationVersion; + } + if (data.lastUpdatedDate !== undefined) { + contents.lastUpdatedDate = new Date(data.lastUpdatedDate % 1 != 0 ? Math.round(data.lastUpdatedDate * 1000) : data.lastUpdatedDate); + } + if (data.methodSettings !== undefined) { + contents.methodSettings = deserializeAws_restJson1_1MapOfMethodSettings(data.methodSettings, context); + } + if (data.stageName !== undefined) { + contents.stageName = data.stageName; + } + if (data.tags !== undefined) { + contents.tags = deserializeAws_restJson1_1MapOfStringToString(data.tags, context); + } + if (data.tracingEnabled !== undefined) { + contents.tracingEnabled = data.tracingEnabled; + } + if (data.variables !== undefined) { + contents.variables = deserializeAws_restJson1_1MapOfStringToString(data.variables, context); + } + if (data.webAclArn !== undefined) { + contents.webAclArn = data.webAclArn; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetStageCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetStagesCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetStagesCommandError(output, context); + } + const contents: GetStagesCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "Stages", + item: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.item !== undefined) { + contents.item = deserializeAws_restJson1_1ListOfStage(data.item, context); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetStagesCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetTagsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetTagsCommandError(output, context); + } + const contents: GetTagsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "Tags", + tags: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.tags !== undefined) { + contents.tags = deserializeAws_restJson1_1MapOfStringToString(data.tags, context); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetTagsCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "LimitExceededException": + case "com.amazonaws.commonapi.exceptions#LimitExceededException": + response = await deserializeAws_restJson1_1LimitExceededExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetUsageCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetUsageCommandError(output, context); + } + const contents: GetUsageCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "Usage", + endDate: undefined, + items: undefined, + position: undefined, + startDate: undefined, + usagePlanId: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.endDate !== undefined) { + contents.endDate = data.endDate; + } + if (data.values !== undefined) { + contents.items = deserializeAws_restJson1_1MapOfKeyUsages(data.values, context); + } + if (data.position !== undefined) { + contents.position = data.position; + } + if (data.startDate !== undefined) { + contents.startDate = data.startDate; + } + if (data.usagePlanId !== undefined) { + contents.usagePlanId = data.usagePlanId; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetUsageCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetUsagePlanCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetUsagePlanCommandError(output, context); + } + const contents: GetUsagePlanCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "UsagePlan", + apiStages: undefined, + description: undefined, + id: undefined, + name: undefined, + productCode: undefined, + quota: undefined, + tags: undefined, + throttle: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.apiStages !== undefined) { + contents.apiStages = deserializeAws_restJson1_1ListOfApiStage(data.apiStages, context); + } + if (data.description !== undefined) { + contents.description = data.description; + } + if (data.id !== undefined) { + contents.id = data.id; + } + if (data.name !== undefined) { + contents.name = data.name; + } + if (data.productCode !== undefined) { + contents.productCode = data.productCode; + } + if (data.quota !== undefined) { + contents.quota = deserializeAws_restJson1_1QuotaSettings(data.quota, context); + } + if (data.tags !== undefined) { + contents.tags = deserializeAws_restJson1_1MapOfStringToString(data.tags, context); + } + if (data.throttle !== undefined) { + contents.throttle = deserializeAws_restJson1_1ThrottleSettings(data.throttle, context); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetUsagePlanCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetUsagePlanKeyCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetUsagePlanKeyCommandError(output, context); + } + const contents: GetUsagePlanKeyCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "UsagePlanKey", + id: undefined, + name: undefined, + type: undefined, + value: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.id !== undefined) { + contents.id = data.id; + } + if (data.name !== undefined) { + contents.name = data.name; + } + if (data.type !== undefined) { + contents.type = data.type; + } + if (data.value !== undefined) { + contents.value = data.value; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetUsagePlanKeyCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetUsagePlanKeysCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetUsagePlanKeysCommandError(output, context); + } + const contents: GetUsagePlanKeysCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "UsagePlanKeys", + items: undefined, + position: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.item !== undefined) { + contents.items = deserializeAws_restJson1_1ListOfUsagePlanKey(data.item, context); + } + if (data.position !== undefined) { + contents.position = data.position; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetUsagePlanKeysCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetUsagePlansCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetUsagePlansCommandError(output, context); + } + const contents: GetUsagePlansCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "UsagePlans", + items: undefined, + position: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.item !== undefined) { + contents.items = deserializeAws_restJson1_1ListOfUsagePlan(data.item, context); + } + if (data.position !== undefined) { + contents.position = data.position; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetUsagePlansCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetVpcLinkCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetVpcLinkCommandError(output, context); + } + const contents: GetVpcLinkCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "VpcLink", + description: undefined, + id: undefined, + name: undefined, + status: undefined, + statusMessage: undefined, + tags: undefined, + targetArns: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.description !== undefined) { + contents.description = data.description; + } + if (data.id !== undefined) { + contents.id = data.id; + } + if (data.name !== undefined) { + contents.name = data.name; + } + if (data.status !== undefined) { + contents.status = data.status; + } + if (data.statusMessage !== undefined) { + contents.statusMessage = data.statusMessage; + } + if (data.tags !== undefined) { + contents.tags = deserializeAws_restJson1_1MapOfStringToString(data.tags, context); + } + if (data.targetArns !== undefined) { + contents.targetArns = deserializeAws_restJson1_1ListOfString(data.targetArns, context); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetVpcLinkCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetVpcLinksCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetVpcLinksCommandError(output, context); + } + const contents: GetVpcLinksCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "VpcLinks", + items: undefined, + position: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.item !== undefined) { + contents.items = deserializeAws_restJson1_1ListOfVpcLink(data.item, context); + } + if (data.position !== undefined) { + contents.position = data.position; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetVpcLinksCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1ImportApiKeysCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 201) { + return deserializeAws_restJson1_1ImportApiKeysCommandError(output, context); + } + const contents: ImportApiKeysCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ApiKeyIds", + ids: undefined, + warnings: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.ids !== undefined) { + contents.ids = deserializeAws_restJson1_1ListOfString(data.ids, context); + } + if (data.warnings !== undefined) { + contents.warnings = deserializeAws_restJson1_1ListOfString(data.warnings, context); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1ImportApiKeysCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "LimitExceededException": + case "com.amazonaws.commonapi.exceptions#LimitExceededException": + response = await deserializeAws_restJson1_1LimitExceededExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1ImportDocumentationPartsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1ImportDocumentationPartsCommandError(output, context); + } + const contents: ImportDocumentationPartsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DocumentationPartIds", + ids: undefined, + warnings: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.ids !== undefined) { + contents.ids = deserializeAws_restJson1_1ListOfString(data.ids, context); + } + if (data.warnings !== undefined) { + contents.warnings = deserializeAws_restJson1_1ListOfString(data.warnings, context); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1ImportDocumentationPartsCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "LimitExceededException": + case "com.amazonaws.commonapi.exceptions#LimitExceededException": + response = await deserializeAws_restJson1_1LimitExceededExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1ImportRestApiCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 201) { + return deserializeAws_restJson1_1ImportRestApiCommandError(output, context); + } + const contents: ImportRestApiCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "RestApi", + apiKeySource: undefined, + binaryMediaTypes: undefined, + createdDate: undefined, + description: undefined, + endpointConfiguration: undefined, + id: undefined, + minimumCompressionSize: undefined, + name: undefined, + policy: undefined, + tags: undefined, + version: undefined, + warnings: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.apiKeySource !== undefined) { + contents.apiKeySource = data.apiKeySource; + } + if (data.binaryMediaTypes !== undefined) { + contents.binaryMediaTypes = deserializeAws_restJson1_1ListOfString(data.binaryMediaTypes, context); + } + if (data.createdDate !== undefined) { + contents.createdDate = new Date(data.createdDate % 1 != 0 ? Math.round(data.createdDate * 1000) : data.createdDate); + } + if (data.description !== undefined) { + contents.description = data.description; + } + if (data.endpointConfiguration !== undefined) { + contents.endpointConfiguration = deserializeAws_restJson1_1EndpointConfiguration(data.endpointConfiguration, context); + } + if (data.id !== undefined) { + contents.id = data.id; + } + if (data.minimumCompressionSize !== undefined) { + contents.minimumCompressionSize = data.minimumCompressionSize; + } + if (data.name !== undefined) { + contents.name = data.name; + } + if (data.policy !== undefined) { + contents.policy = data.policy; + } + if (data.tags !== undefined) { + contents.tags = deserializeAws_restJson1_1MapOfStringToString(data.tags, context); + } + if (data.version !== undefined) { + contents.version = data.version; + } + if (data.warnings !== undefined) { + contents.warnings = deserializeAws_restJson1_1ListOfString(data.warnings, context); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1ImportRestApiCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "LimitExceededException": + case "com.amazonaws.commonapi.exceptions#LimitExceededException": + response = await deserializeAws_restJson1_1LimitExceededExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1PutGatewayResponseCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 201) { + return deserializeAws_restJson1_1PutGatewayResponseCommandError(output, context); + } + const contents: PutGatewayResponseCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GatewayResponse", + defaultResponse: undefined, + responseParameters: undefined, + responseTemplates: undefined, + responseType: undefined, + statusCode: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.defaultResponse !== undefined) { + contents.defaultResponse = data.defaultResponse; + } + if (data.responseParameters !== undefined) { + contents.responseParameters = deserializeAws_restJson1_1MapOfStringToString(data.responseParameters, context); + } + if (data.responseTemplates !== undefined) { + contents.responseTemplates = deserializeAws_restJson1_1MapOfStringToString(data.responseTemplates, context); + } + if (data.responseType !== undefined) { + contents.responseType = data.responseType; + } + if (data.statusCode !== undefined) { + contents.statusCode = data.statusCode; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1PutGatewayResponseCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "LimitExceededException": + case "com.amazonaws.commonapi.exceptions#LimitExceededException": + response = await deserializeAws_restJson1_1LimitExceededExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1PutIntegrationCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 201) { + return deserializeAws_restJson1_1PutIntegrationCommandError(output, context); + } + const contents: PutIntegrationCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "Integration", + cacheKeyParameters: undefined, + cacheNamespace: undefined, + connectionId: undefined, + connectionType: undefined, + contentHandling: undefined, + credentials: undefined, + httpMethod: undefined, + integrationResponses: undefined, + passthroughBehavior: undefined, + requestParameters: undefined, + requestTemplates: undefined, + timeoutInMillis: undefined, + type: undefined, + uri: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.cacheKeyParameters !== undefined) { + contents.cacheKeyParameters = deserializeAws_restJson1_1ListOfString(data.cacheKeyParameters, context); + } + if (data.cacheNamespace !== undefined) { + contents.cacheNamespace = data.cacheNamespace; + } + if (data.connectionId !== undefined) { + contents.connectionId = data.connectionId; + } + if (data.connectionType !== undefined) { + contents.connectionType = data.connectionType; + } + if (data.contentHandling !== undefined) { + contents.contentHandling = data.contentHandling; + } + if (data.credentials !== undefined) { + contents.credentials = data.credentials; + } + if (data.httpMethod !== undefined) { + contents.httpMethod = data.httpMethod; + } + if (data.integrationResponses !== undefined) { + contents.integrationResponses = deserializeAws_restJson1_1MapOfIntegrationResponse(data.integrationResponses, context); + } + if (data.passthroughBehavior !== undefined) { + contents.passthroughBehavior = data.passthroughBehavior; + } + if (data.requestParameters !== undefined) { + contents.requestParameters = deserializeAws_restJson1_1MapOfStringToString(data.requestParameters, context); + } + if (data.requestTemplates !== undefined) { + contents.requestTemplates = deserializeAws_restJson1_1MapOfStringToString(data.requestTemplates, context); + } + if (data.timeoutInMillis !== undefined) { + contents.timeoutInMillis = data.timeoutInMillis; + } + if (data.type !== undefined) { + contents.type = data.type; + } + if (data.uri !== undefined) { + contents.uri = data.uri; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1PutIntegrationCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1PutIntegrationResponseCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 201) { + return deserializeAws_restJson1_1PutIntegrationResponseCommandError(output, context); + } + const contents: PutIntegrationResponseCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "IntegrationResponse", + contentHandling: undefined, + responseParameters: undefined, + responseTemplates: undefined, + selectionPattern: undefined, + statusCode: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.contentHandling !== undefined) { + contents.contentHandling = data.contentHandling; + } + if (data.responseParameters !== undefined) { + contents.responseParameters = deserializeAws_restJson1_1MapOfStringToString(data.responseParameters, context); + } + if (data.responseTemplates !== undefined) { + contents.responseTemplates = deserializeAws_restJson1_1MapOfStringToString(data.responseTemplates, context); + } + if (data.selectionPattern !== undefined) { + contents.selectionPattern = data.selectionPattern; + } + if (data.statusCode !== undefined) { + contents.statusCode = data.statusCode; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1PutIntegrationResponseCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "LimitExceededException": + case "com.amazonaws.commonapi.exceptions#LimitExceededException": + response = await deserializeAws_restJson1_1LimitExceededExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1PutMethodCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 201) { + return deserializeAws_restJson1_1PutMethodCommandError(output, context); + } + const contents: PutMethodCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "Method", + apiKeyRequired: undefined, + authorizationScopes: undefined, + authorizationType: undefined, + authorizerId: undefined, + httpMethod: undefined, + methodIntegration: undefined, + methodResponses: undefined, + operationName: undefined, + requestModels: undefined, + requestParameters: undefined, + requestValidatorId: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.apiKeyRequired !== undefined) { + contents.apiKeyRequired = data.apiKeyRequired; + } + if (data.authorizationScopes !== undefined) { + contents.authorizationScopes = deserializeAws_restJson1_1ListOfString(data.authorizationScopes, context); + } + if (data.authorizationType !== undefined) { + contents.authorizationType = data.authorizationType; + } + if (data.authorizerId !== undefined) { + contents.authorizerId = data.authorizerId; + } + if (data.httpMethod !== undefined) { + contents.httpMethod = data.httpMethod; + } + if (data.methodIntegration !== undefined) { + contents.methodIntegration = deserializeAws_restJson1_1Integration(data.methodIntegration, context); + } + if (data.methodResponses !== undefined) { + contents.methodResponses = deserializeAws_restJson1_1MapOfMethodResponse(data.methodResponses, context); + } + if (data.operationName !== undefined) { + contents.operationName = data.operationName; + } + if (data.requestModels !== undefined) { + contents.requestModels = deserializeAws_restJson1_1MapOfStringToString(data.requestModels, context); + } + if (data.requestParameters !== undefined) { + contents.requestParameters = deserializeAws_restJson1_1MapOfStringToBoolean(data.requestParameters, context); + } + if (data.requestValidatorId !== undefined) { + contents.requestValidatorId = data.requestValidatorId; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1PutMethodCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "LimitExceededException": + case "com.amazonaws.commonapi.exceptions#LimitExceededException": + response = await deserializeAws_restJson1_1LimitExceededExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1PutMethodResponseCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 201) { + return deserializeAws_restJson1_1PutMethodResponseCommandError(output, context); + } + const contents: PutMethodResponseCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "MethodResponse", + responseModels: undefined, + responseParameters: undefined, + statusCode: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.responseModels !== undefined) { + contents.responseModels = deserializeAws_restJson1_1MapOfStringToString(data.responseModels, context); + } + if (data.responseParameters !== undefined) { + contents.responseParameters = deserializeAws_restJson1_1MapOfStringToBoolean(data.responseParameters, context); + } + if (data.statusCode !== undefined) { + contents.statusCode = data.statusCode; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1PutMethodResponseCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "LimitExceededException": + case "com.amazonaws.commonapi.exceptions#LimitExceededException": + response = await deserializeAws_restJson1_1LimitExceededExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1PutRestApiCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1PutRestApiCommandError(output, context); + } + const contents: PutRestApiCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "RestApi", + apiKeySource: undefined, + binaryMediaTypes: undefined, + createdDate: undefined, + description: undefined, + endpointConfiguration: undefined, + id: undefined, + minimumCompressionSize: undefined, + name: undefined, + policy: undefined, + tags: undefined, + version: undefined, + warnings: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.apiKeySource !== undefined) { + contents.apiKeySource = data.apiKeySource; + } + if (data.binaryMediaTypes !== undefined) { + contents.binaryMediaTypes = deserializeAws_restJson1_1ListOfString(data.binaryMediaTypes, context); + } + if (data.createdDate !== undefined) { + contents.createdDate = new Date(data.createdDate % 1 != 0 ? Math.round(data.createdDate * 1000) : data.createdDate); + } + if (data.description !== undefined) { + contents.description = data.description; + } + if (data.endpointConfiguration !== undefined) { + contents.endpointConfiguration = deserializeAws_restJson1_1EndpointConfiguration(data.endpointConfiguration, context); + } + if (data.id !== undefined) { + contents.id = data.id; + } + if (data.minimumCompressionSize !== undefined) { + contents.minimumCompressionSize = data.minimumCompressionSize; + } + if (data.name !== undefined) { + contents.name = data.name; + } + if (data.policy !== undefined) { + contents.policy = data.policy; + } + if (data.tags !== undefined) { + contents.tags = deserializeAws_restJson1_1MapOfStringToString(data.tags, context); + } + if (data.version !== undefined) { + contents.version = data.version; + } + if (data.warnings !== undefined) { + contents.warnings = deserializeAws_restJson1_1ListOfString(data.warnings, context); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1PutRestApiCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "LimitExceededException": + case "com.amazonaws.commonapi.exceptions#LimitExceededException": + response = await deserializeAws_restJson1_1LimitExceededExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1TagResourceCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 204) { + return deserializeAws_restJson1_1TagResourceCommandError(output, context); + } + const contents: TagResourceCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1TagResourceCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "LimitExceededException": + case "com.amazonaws.commonapi.exceptions#LimitExceededException": + response = await deserializeAws_restJson1_1LimitExceededExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1TestInvokeAuthorizerCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1TestInvokeAuthorizerCommandError(output, context); + } + const contents: TestInvokeAuthorizerCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "TestInvokeAuthorizerResponse", + authorization: undefined, + claims: undefined, + clientStatus: undefined, + latency: undefined, + log: undefined, + policy: undefined, + principalId: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.authorization !== undefined) { + contents.authorization = deserializeAws_restJson1_1MapOfStringToList(data.authorization, context); + } + if (data.claims !== undefined) { + contents.claims = deserializeAws_restJson1_1MapOfStringToString(data.claims, context); + } + if (data.clientStatus !== undefined) { + contents.clientStatus = data.clientStatus; + } + if (data.latency !== undefined) { + contents.latency = data.latency; + } + if (data.log !== undefined) { + contents.log = data.log; + } + if (data.policy !== undefined) { + contents.policy = data.policy; + } + if (data.principalId !== undefined) { + contents.principalId = data.principalId; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1TestInvokeAuthorizerCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1TestInvokeMethodCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1TestInvokeMethodCommandError(output, context); + } + const contents: TestInvokeMethodCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "TestInvokeMethodResponse", + body: undefined, + headers: undefined, + latency: undefined, + log: undefined, + multiValueHeaders: undefined, + status: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.body !== undefined) { + contents.body = data.body; + } + if (data.headers !== undefined) { + contents.headers = deserializeAws_restJson1_1MapOfStringToString(data.headers, context); + } + if (data.latency !== undefined) { + contents.latency = data.latency; + } + if (data.log !== undefined) { + contents.log = data.log; + } + if (data.multiValueHeaders !== undefined) { + contents.multiValueHeaders = deserializeAws_restJson1_1MapOfStringToList(data.multiValueHeaders, context); + } + if (data.status !== undefined) { + contents.status = data.status; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1TestInvokeMethodCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1UntagResourceCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 204) { + return deserializeAws_restJson1_1UntagResourceCommandError(output, context); + } + const contents: UntagResourceCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1UntagResourceCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1UpdateAccountCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1UpdateAccountCommandError(output, context); + } + const contents: UpdateAccountCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "Account", + apiKeyVersion: undefined, + cloudwatchRoleArn: undefined, + features: undefined, + throttleSettings: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.apiKeyVersion !== undefined) { + contents.apiKeyVersion = data.apiKeyVersion; + } + if (data.cloudwatchRoleArn !== undefined) { + contents.cloudwatchRoleArn = data.cloudwatchRoleArn; + } + if (data.features !== undefined) { + contents.features = deserializeAws_restJson1_1ListOfString(data.features, context); + } + if (data.throttleSettings !== undefined) { + contents.throttleSettings = deserializeAws_restJson1_1ThrottleSettings(data.throttleSettings, context); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1UpdateAccountCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1UpdateApiKeyCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1UpdateApiKeyCommandError(output, context); + } + const contents: UpdateApiKeyCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ApiKey", + createdDate: undefined, + customerId: undefined, + description: undefined, + enabled: undefined, + id: undefined, + lastUpdatedDate: undefined, + name: undefined, + stageKeys: undefined, + tags: undefined, + value: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.createdDate !== undefined) { + contents.createdDate = new Date(data.createdDate % 1 != 0 ? Math.round(data.createdDate * 1000) : data.createdDate); + } + if (data.customerId !== undefined) { + contents.customerId = data.customerId; + } + if (data.description !== undefined) { + contents.description = data.description; + } + if (data.enabled !== undefined) { + contents.enabled = data.enabled; + } + if (data.id !== undefined) { + contents.id = data.id; + } + if (data.lastUpdatedDate !== undefined) { + contents.lastUpdatedDate = new Date(data.lastUpdatedDate % 1 != 0 ? Math.round(data.lastUpdatedDate * 1000) : data.lastUpdatedDate); + } + if (data.name !== undefined) { + contents.name = data.name; + } + if (data.stageKeys !== undefined) { + contents.stageKeys = deserializeAws_restJson1_1ListOfString(data.stageKeys, context); + } + if (data.tags !== undefined) { + contents.tags = deserializeAws_restJson1_1MapOfStringToString(data.tags, context); + } + if (data.value !== undefined) { + contents.value = data.value; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1UpdateApiKeyCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1UpdateAuthorizerCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1UpdateAuthorizerCommandError(output, context); + } + const contents: UpdateAuthorizerCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "Authorizer", + authType: undefined, + authorizerCredentials: undefined, + authorizerResultTtlInSeconds: undefined, + authorizerUri: undefined, + id: undefined, + identitySource: undefined, + identityValidationExpression: undefined, + name: undefined, + providerARNs: undefined, + type: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.authType !== undefined) { + contents.authType = data.authType; + } + if (data.authorizerCredentials !== undefined) { + contents.authorizerCredentials = data.authorizerCredentials; + } + if (data.authorizerResultTtlInSeconds !== undefined) { + contents.authorizerResultTtlInSeconds = data.authorizerResultTtlInSeconds; + } + if (data.authorizerUri !== undefined) { + contents.authorizerUri = data.authorizerUri; + } + if (data.id !== undefined) { + contents.id = data.id; + } + if (data.identitySource !== undefined) { + contents.identitySource = data.identitySource; + } + if (data.identityValidationExpression !== undefined) { + contents.identityValidationExpression = data.identityValidationExpression; + } + if (data.name !== undefined) { + contents.name = data.name; + } + if (data.providerARNs !== undefined) { + contents.providerARNs = deserializeAws_restJson1_1ListOfARNs(data.providerARNs, context); + } + if (data.type !== undefined) { + contents.type = data.type; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1UpdateAuthorizerCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1UpdateBasePathMappingCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1UpdateBasePathMappingCommandError(output, context); + } + const contents: UpdateBasePathMappingCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "BasePathMapping", + basePath: undefined, + restApiId: undefined, + stage: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.basePath !== undefined) { + contents.basePath = data.basePath; + } + if (data.restApiId !== undefined) { + contents.restApiId = data.restApiId; + } + if (data.stage !== undefined) { + contents.stage = data.stage; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1UpdateBasePathMappingCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1UpdateClientCertificateCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1UpdateClientCertificateCommandError(output, context); + } + const contents: UpdateClientCertificateCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ClientCertificate", + clientCertificateId: undefined, + createdDate: undefined, + description: undefined, + expirationDate: undefined, + pemEncodedCertificate: undefined, + tags: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.clientCertificateId !== undefined) { + contents.clientCertificateId = data.clientCertificateId; + } + if (data.createdDate !== undefined) { + contents.createdDate = new Date(data.createdDate % 1 != 0 ? Math.round(data.createdDate * 1000) : data.createdDate); + } + if (data.description !== undefined) { + contents.description = data.description; + } + if (data.expirationDate !== undefined) { + contents.expirationDate = new Date(data.expirationDate % 1 != 0 ? Math.round(data.expirationDate * 1000) : data.expirationDate); + } + if (data.pemEncodedCertificate !== undefined) { + contents.pemEncodedCertificate = data.pemEncodedCertificate; + } + if (data.tags !== undefined) { + contents.tags = deserializeAws_restJson1_1MapOfStringToString(data.tags, context); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1UpdateClientCertificateCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1UpdateDeploymentCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1UpdateDeploymentCommandError(output, context); + } + const contents: UpdateDeploymentCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "Deployment", + apiSummary: undefined, + createdDate: undefined, + description: undefined, + id: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.apiSummary !== undefined) { + contents.apiSummary = deserializeAws_restJson1_1PathToMapOfMethodSnapshot(data.apiSummary, context); + } + if (data.createdDate !== undefined) { + contents.createdDate = new Date(data.createdDate % 1 != 0 ? Math.round(data.createdDate * 1000) : data.createdDate); + } + if (data.description !== undefined) { + contents.description = data.description; + } + if (data.id !== undefined) { + contents.id = data.id; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1UpdateDeploymentCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "ServiceUnavailableException": + case "com.amazonaws.commonapi.exceptions#ServiceUnavailableException": + response = await deserializeAws_restJson1_1ServiceUnavailableExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1UpdateDocumentationPartCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1UpdateDocumentationPartCommandError(output, context); + } + const contents: UpdateDocumentationPartCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DocumentationPart", + id: undefined, + location: undefined, + properties: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.id !== undefined) { + contents.id = data.id; + } + if (data.location !== undefined) { + contents.location = deserializeAws_restJson1_1DocumentationPartLocation(data.location, context); + } + if (data.properties !== undefined) { + contents.properties = data.properties; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1UpdateDocumentationPartCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "LimitExceededException": + case "com.amazonaws.commonapi.exceptions#LimitExceededException": + response = await deserializeAws_restJson1_1LimitExceededExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1UpdateDocumentationVersionCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1UpdateDocumentationVersionCommandError(output, context); + } + const contents: UpdateDocumentationVersionCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DocumentationVersion", + createdDate: undefined, + description: undefined, + version: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.createdDate !== undefined) { + contents.createdDate = new Date(data.createdDate % 1 != 0 ? Math.round(data.createdDate * 1000) : data.createdDate); + } + if (data.description !== undefined) { + contents.description = data.description; + } + if (data.version !== undefined) { + contents.version = data.version; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1UpdateDocumentationVersionCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1UpdateDomainNameCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1UpdateDomainNameCommandError(output, context); + } + const contents: UpdateDomainNameCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DomainName", + certificateArn: undefined, + certificateName: undefined, + certificateUploadDate: undefined, + distributionDomainName: undefined, + distributionHostedZoneId: undefined, + domainName: undefined, + domainNameStatus: undefined, + domainNameStatusMessage: undefined, + endpointConfiguration: undefined, + regionalCertificateArn: undefined, + regionalCertificateName: undefined, + regionalDomainName: undefined, + regionalHostedZoneId: undefined, + securityPolicy: undefined, + tags: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.certificateArn !== undefined) { + contents.certificateArn = data.certificateArn; + } + if (data.certificateName !== undefined) { + contents.certificateName = data.certificateName; + } + if (data.certificateUploadDate !== undefined) { + contents.certificateUploadDate = new Date(data.certificateUploadDate % 1 != 0 ? Math.round(data.certificateUploadDate * 1000) : data.certificateUploadDate); + } + if (data.distributionDomainName !== undefined) { + contents.distributionDomainName = data.distributionDomainName; + } + if (data.distributionHostedZoneId !== undefined) { + contents.distributionHostedZoneId = data.distributionHostedZoneId; + } + if (data.domainName !== undefined) { + contents.domainName = data.domainName; + } + if (data.domainNameStatus !== undefined) { + contents.domainNameStatus = data.domainNameStatus; + } + if (data.domainNameStatusMessage !== undefined) { + contents.domainNameStatusMessage = data.domainNameStatusMessage; + } + if (data.endpointConfiguration !== undefined) { + contents.endpointConfiguration = deserializeAws_restJson1_1EndpointConfiguration(data.endpointConfiguration, context); + } + if (data.regionalCertificateArn !== undefined) { + contents.regionalCertificateArn = data.regionalCertificateArn; + } + if (data.regionalCertificateName !== undefined) { + contents.regionalCertificateName = data.regionalCertificateName; + } + if (data.regionalDomainName !== undefined) { + contents.regionalDomainName = data.regionalDomainName; + } + if (data.regionalHostedZoneId !== undefined) { + contents.regionalHostedZoneId = data.regionalHostedZoneId; + } + if (data.securityPolicy !== undefined) { + contents.securityPolicy = data.securityPolicy; + } + if (data.tags !== undefined) { + contents.tags = deserializeAws_restJson1_1MapOfStringToString(data.tags, context); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1UpdateDomainNameCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1UpdateGatewayResponseCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1UpdateGatewayResponseCommandError(output, context); + } + const contents: UpdateGatewayResponseCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GatewayResponse", + defaultResponse: undefined, + responseParameters: undefined, + responseTemplates: undefined, + responseType: undefined, + statusCode: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.defaultResponse !== undefined) { + contents.defaultResponse = data.defaultResponse; + } + if (data.responseParameters !== undefined) { + contents.responseParameters = deserializeAws_restJson1_1MapOfStringToString(data.responseParameters, context); + } + if (data.responseTemplates !== undefined) { + contents.responseTemplates = deserializeAws_restJson1_1MapOfStringToString(data.responseTemplates, context); + } + if (data.responseType !== undefined) { + contents.responseType = data.responseType; + } + if (data.statusCode !== undefined) { + contents.statusCode = data.statusCode; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1UpdateGatewayResponseCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1UpdateIntegrationCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1UpdateIntegrationCommandError(output, context); + } + const contents: UpdateIntegrationCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "Integration", + cacheKeyParameters: undefined, + cacheNamespace: undefined, + connectionId: undefined, + connectionType: undefined, + contentHandling: undefined, + credentials: undefined, + httpMethod: undefined, + integrationResponses: undefined, + passthroughBehavior: undefined, + requestParameters: undefined, + requestTemplates: undefined, + timeoutInMillis: undefined, + type: undefined, + uri: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.cacheKeyParameters !== undefined) { + contents.cacheKeyParameters = deserializeAws_restJson1_1ListOfString(data.cacheKeyParameters, context); + } + if (data.cacheNamespace !== undefined) { + contents.cacheNamespace = data.cacheNamespace; + } + if (data.connectionId !== undefined) { + contents.connectionId = data.connectionId; + } + if (data.connectionType !== undefined) { + contents.connectionType = data.connectionType; + } + if (data.contentHandling !== undefined) { + contents.contentHandling = data.contentHandling; + } + if (data.credentials !== undefined) { + contents.credentials = data.credentials; + } + if (data.httpMethod !== undefined) { + contents.httpMethod = data.httpMethod; + } + if (data.integrationResponses !== undefined) { + contents.integrationResponses = deserializeAws_restJson1_1MapOfIntegrationResponse(data.integrationResponses, context); + } + if (data.passthroughBehavior !== undefined) { + contents.passthroughBehavior = data.passthroughBehavior; + } + if (data.requestParameters !== undefined) { + contents.requestParameters = deserializeAws_restJson1_1MapOfStringToString(data.requestParameters, context); + } + if (data.requestTemplates !== undefined) { + contents.requestTemplates = deserializeAws_restJson1_1MapOfStringToString(data.requestTemplates, context); + } + if (data.timeoutInMillis !== undefined) { + contents.timeoutInMillis = data.timeoutInMillis; + } + if (data.type !== undefined) { + contents.type = data.type; + } + if (data.uri !== undefined) { + contents.uri = data.uri; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1UpdateIntegrationCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1UpdateIntegrationResponseCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1UpdateIntegrationResponseCommandError(output, context); + } + const contents: UpdateIntegrationResponseCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "IntegrationResponse", + contentHandling: undefined, + responseParameters: undefined, + responseTemplates: undefined, + selectionPattern: undefined, + statusCode: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.contentHandling !== undefined) { + contents.contentHandling = data.contentHandling; + } + if (data.responseParameters !== undefined) { + contents.responseParameters = deserializeAws_restJson1_1MapOfStringToString(data.responseParameters, context); + } + if (data.responseTemplates !== undefined) { + contents.responseTemplates = deserializeAws_restJson1_1MapOfStringToString(data.responseTemplates, context); + } + if (data.selectionPattern !== undefined) { + contents.selectionPattern = data.selectionPattern; + } + if (data.statusCode !== undefined) { + contents.statusCode = data.statusCode; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1UpdateIntegrationResponseCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1UpdateMethodCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1UpdateMethodCommandError(output, context); + } + const contents: UpdateMethodCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "Method", + apiKeyRequired: undefined, + authorizationScopes: undefined, + authorizationType: undefined, + authorizerId: undefined, + httpMethod: undefined, + methodIntegration: undefined, + methodResponses: undefined, + operationName: undefined, + requestModels: undefined, + requestParameters: undefined, + requestValidatorId: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.apiKeyRequired !== undefined) { + contents.apiKeyRequired = data.apiKeyRequired; + } + if (data.authorizationScopes !== undefined) { + contents.authorizationScopes = deserializeAws_restJson1_1ListOfString(data.authorizationScopes, context); + } + if (data.authorizationType !== undefined) { + contents.authorizationType = data.authorizationType; + } + if (data.authorizerId !== undefined) { + contents.authorizerId = data.authorizerId; + } + if (data.httpMethod !== undefined) { + contents.httpMethod = data.httpMethod; + } + if (data.methodIntegration !== undefined) { + contents.methodIntegration = deserializeAws_restJson1_1Integration(data.methodIntegration, context); + } + if (data.methodResponses !== undefined) { + contents.methodResponses = deserializeAws_restJson1_1MapOfMethodResponse(data.methodResponses, context); + } + if (data.operationName !== undefined) { + contents.operationName = data.operationName; + } + if (data.requestModels !== undefined) { + contents.requestModels = deserializeAws_restJson1_1MapOfStringToString(data.requestModels, context); + } + if (data.requestParameters !== undefined) { + contents.requestParameters = deserializeAws_restJson1_1MapOfStringToBoolean(data.requestParameters, context); + } + if (data.requestValidatorId !== undefined) { + contents.requestValidatorId = data.requestValidatorId; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1UpdateMethodCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1UpdateMethodResponseCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 201) { + return deserializeAws_restJson1_1UpdateMethodResponseCommandError(output, context); + } + const contents: UpdateMethodResponseCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "MethodResponse", + responseModels: undefined, + responseParameters: undefined, + statusCode: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.responseModels !== undefined) { + contents.responseModels = deserializeAws_restJson1_1MapOfStringToString(data.responseModels, context); + } + if (data.responseParameters !== undefined) { + contents.responseParameters = deserializeAws_restJson1_1MapOfStringToBoolean(data.responseParameters, context); + } + if (data.statusCode !== undefined) { + contents.statusCode = data.statusCode; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1UpdateMethodResponseCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "LimitExceededException": + case "com.amazonaws.commonapi.exceptions#LimitExceededException": + response = await deserializeAws_restJson1_1LimitExceededExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1UpdateModelCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1UpdateModelCommandError(output, context); + } + const contents: UpdateModelCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "Model", + contentType: undefined, + description: undefined, + id: undefined, + name: undefined, + schema: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.contentType !== undefined) { + contents.contentType = data.contentType; + } + if (data.description !== undefined) { + contents.description = data.description; + } + if (data.id !== undefined) { + contents.id = data.id; + } + if (data.name !== undefined) { + contents.name = data.name; + } + if (data.schema !== undefined) { + contents.schema = data.schema; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1UpdateModelCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1UpdateRequestValidatorCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1UpdateRequestValidatorCommandError(output, context); + } + const contents: UpdateRequestValidatorCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "RequestValidator", + id: undefined, + name: undefined, + validateRequestBody: undefined, + validateRequestParameters: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.id !== undefined) { + contents.id = data.id; + } + if (data.name !== undefined) { + contents.name = data.name; + } + if (data.validateRequestBody !== undefined) { + contents.validateRequestBody = data.validateRequestBody; + } + if (data.validateRequestParameters !== undefined) { + contents.validateRequestParameters = data.validateRequestParameters; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1UpdateRequestValidatorCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1UpdateResourceCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1UpdateResourceCommandError(output, context); + } + const contents: UpdateResourceCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "Resource", + id: undefined, + parentId: undefined, + path: undefined, + pathPart: undefined, + resourceMethods: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.id !== undefined) { + contents.id = data.id; + } + if (data.parentId !== undefined) { + contents.parentId = data.parentId; + } + if (data.path !== undefined) { + contents.path = data.path; + } + if (data.pathPart !== undefined) { + contents.pathPart = data.pathPart; + } + if (data.resourceMethods !== undefined) { + contents.resourceMethods = deserializeAws_restJson1_1MapOfMethod(data.resourceMethods, context); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1UpdateResourceCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1UpdateRestApiCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1UpdateRestApiCommandError(output, context); + } + const contents: UpdateRestApiCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "RestApi", + apiKeySource: undefined, + binaryMediaTypes: undefined, + createdDate: undefined, + description: undefined, + endpointConfiguration: undefined, + id: undefined, + minimumCompressionSize: undefined, + name: undefined, + policy: undefined, + tags: undefined, + version: undefined, + warnings: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.apiKeySource !== undefined) { + contents.apiKeySource = data.apiKeySource; + } + if (data.binaryMediaTypes !== undefined) { + contents.binaryMediaTypes = deserializeAws_restJson1_1ListOfString(data.binaryMediaTypes, context); + } + if (data.createdDate !== undefined) { + contents.createdDate = new Date(data.createdDate % 1 != 0 ? Math.round(data.createdDate * 1000) : data.createdDate); + } + if (data.description !== undefined) { + contents.description = data.description; + } + if (data.endpointConfiguration !== undefined) { + contents.endpointConfiguration = deserializeAws_restJson1_1EndpointConfiguration(data.endpointConfiguration, context); + } + if (data.id !== undefined) { + contents.id = data.id; + } + if (data.minimumCompressionSize !== undefined) { + contents.minimumCompressionSize = data.minimumCompressionSize; + } + if (data.name !== undefined) { + contents.name = data.name; + } + if (data.policy !== undefined) { + contents.policy = data.policy; + } + if (data.tags !== undefined) { + contents.tags = deserializeAws_restJson1_1MapOfStringToString(data.tags, context); + } + if (data.version !== undefined) { + contents.version = data.version; + } + if (data.warnings !== undefined) { + contents.warnings = deserializeAws_restJson1_1ListOfString(data.warnings, context); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1UpdateRestApiCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1UpdateStageCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1UpdateStageCommandError(output, context); + } + const contents: UpdateStageCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "Stage", + accessLogSettings: undefined, + cacheClusterEnabled: undefined, + cacheClusterSize: undefined, + cacheClusterStatus: undefined, + canarySettings: undefined, + clientCertificateId: undefined, + createdDate: undefined, + deploymentId: undefined, + description: undefined, + documentationVersion: undefined, + lastUpdatedDate: undefined, + methodSettings: undefined, + stageName: undefined, + tags: undefined, + tracingEnabled: undefined, + variables: undefined, + webAclArn: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.accessLogSettings !== undefined) { + contents.accessLogSettings = deserializeAws_restJson1_1AccessLogSettings(data.accessLogSettings, context); + } + if (data.cacheClusterEnabled !== undefined) { + contents.cacheClusterEnabled = data.cacheClusterEnabled; + } + if (data.cacheClusterSize !== undefined) { + contents.cacheClusterSize = data.cacheClusterSize; + } + if (data.cacheClusterStatus !== undefined) { + contents.cacheClusterStatus = data.cacheClusterStatus; + } + if (data.canarySettings !== undefined) { + contents.canarySettings = deserializeAws_restJson1_1CanarySettings(data.canarySettings, context); + } + if (data.clientCertificateId !== undefined) { + contents.clientCertificateId = data.clientCertificateId; + } + if (data.createdDate !== undefined) { + contents.createdDate = new Date(data.createdDate % 1 != 0 ? Math.round(data.createdDate * 1000) : data.createdDate); + } + if (data.deploymentId !== undefined) { + contents.deploymentId = data.deploymentId; + } + if (data.description !== undefined) { + contents.description = data.description; + } + if (data.documentationVersion !== undefined) { + contents.documentationVersion = data.documentationVersion; + } + if (data.lastUpdatedDate !== undefined) { + contents.lastUpdatedDate = new Date(data.lastUpdatedDate % 1 != 0 ? Math.round(data.lastUpdatedDate * 1000) : data.lastUpdatedDate); + } + if (data.methodSettings !== undefined) { + contents.methodSettings = deserializeAws_restJson1_1MapOfMethodSettings(data.methodSettings, context); + } + if (data.stageName !== undefined) { + contents.stageName = data.stageName; + } + if (data.tags !== undefined) { + contents.tags = deserializeAws_restJson1_1MapOfStringToString(data.tags, context); + } + if (data.tracingEnabled !== undefined) { + contents.tracingEnabled = data.tracingEnabled; + } + if (data.variables !== undefined) { + contents.variables = deserializeAws_restJson1_1MapOfStringToString(data.variables, context); + } + if (data.webAclArn !== undefined) { + contents.webAclArn = data.webAclArn; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1UpdateStageCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1UpdateUsageCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1UpdateUsageCommandError(output, context); + } + const contents: UpdateUsageCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "Usage", + endDate: undefined, + items: undefined, + position: undefined, + startDate: undefined, + usagePlanId: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.endDate !== undefined) { + contents.endDate = data.endDate; + } + if (data.values !== undefined) { + contents.items = deserializeAws_restJson1_1MapOfKeyUsages(data.values, context); + } + if (data.position !== undefined) { + contents.position = data.position; + } + if (data.startDate !== undefined) { + contents.startDate = data.startDate; + } + if (data.usagePlanId !== undefined) { + contents.usagePlanId = data.usagePlanId; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1UpdateUsageCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1UpdateUsagePlanCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1UpdateUsagePlanCommandError(output, context); + } + const contents: UpdateUsagePlanCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "UsagePlan", + apiStages: undefined, + description: undefined, + id: undefined, + name: undefined, + productCode: undefined, + quota: undefined, + tags: undefined, + throttle: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.apiStages !== undefined) { + contents.apiStages = deserializeAws_restJson1_1ListOfApiStage(data.apiStages, context); + } + if (data.description !== undefined) { + contents.description = data.description; + } + if (data.id !== undefined) { + contents.id = data.id; + } + if (data.name !== undefined) { + contents.name = data.name; + } + if (data.productCode !== undefined) { + contents.productCode = data.productCode; + } + if (data.quota !== undefined) { + contents.quota = deserializeAws_restJson1_1QuotaSettings(data.quota, context); + } + if (data.tags !== undefined) { + contents.tags = deserializeAws_restJson1_1MapOfStringToString(data.tags, context); + } + if (data.throttle !== undefined) { + contents.throttle = deserializeAws_restJson1_1ThrottleSettings(data.throttle, context); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1UpdateUsagePlanCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1UpdateVpcLinkCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1UpdateVpcLinkCommandError(output, context); + } + const contents: UpdateVpcLinkCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "VpcLink", + description: undefined, + id: undefined, + name: undefined, + status: undefined, + statusMessage: undefined, + tags: undefined, + targetArns: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.description !== undefined) { + contents.description = data.description; + } + if (data.id !== undefined) { + contents.id = data.id; + } + if (data.name !== undefined) { + contents.name = data.name; + } + if (data.status !== undefined) { + contents.status = data.status; + } + if (data.statusMessage !== undefined) { + contents.statusMessage = data.statusMessage; + } + if (data.tags !== undefined) { + contents.tags = deserializeAws_restJson1_1MapOfStringToString(data.tags, context); + } + if (data.targetArns !== undefined) { + contents.targetArns = deserializeAws_restJson1_1ListOfString(data.targetArns, context); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1UpdateVpcLinkCommandError( + output: __HttpResponse, + context: __SerdeContext, +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data, + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(':')[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.commonapi.exceptions#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse(parsedOutput, context); + break; + case "ConflictException": + case "com.amazonaws.commonapi.exceptions#ConflictException": + response = await deserializeAws_restJson1_1ConflictExceptionResponse(parsedOutput, context); + break; + case "NotFoundException": + case "com.amazonaws.commonapi.exceptions#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse(parsedOutput, context); + break; + case "TooManyRequestsException": + case "com.amazonaws.commonapi.exceptions#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse(parsedOutput, context); + break; + case "UnauthorizedException": + case "com.amazonaws.commonapi.exceptions#UnauthorizedException": + response = await deserializeAws_restJson1_1UnauthorizedExceptionResponse(parsedOutput, context); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.backplane.controlplane#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +const deserializeAws_restJson1_1BadRequestExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const contents: BadRequestException = { + __type: "BadRequestException", + $fault: "client", + $metadata: deserializeMetadata(output), + message: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.message !== undefined) { + contents.message = data.message; + } + return contents; +}; + +const deserializeAws_restJson1_1ConflictExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const contents: ConflictException = { + __type: "ConflictException", + $fault: "client", + $metadata: deserializeMetadata(output), + message: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.message !== undefined) { + contents.message = data.message; + } + return contents; +}; + +const deserializeAws_restJson1_1LimitExceededExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const contents: LimitExceededException = { + __type: "LimitExceededException", + $fault: "client", + $metadata: deserializeMetadata(output), + message: undefined, + retryAfterSeconds: undefined, + }; + if (output.headers["Retry-After"] !== undefined) { + contents.retryAfterSeconds = output.headers['Retry-After']; + } + const data: any = await parseBody(output.body, context); + if (data.message !== undefined) { + contents.message = data.message; + } + return contents; +}; + +const deserializeAws_restJson1_1NotFoundExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const contents: NotFoundException = { + __type: "NotFoundException", + $fault: "client", + $metadata: deserializeMetadata(output), + message: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.message !== undefined) { + contents.message = data.message; + } + return contents; +}; + +const deserializeAws_restJson1_1ServiceUnavailableExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const contents: ServiceUnavailableException = { + __type: "ServiceUnavailableException", + $fault: "server", + $metadata: deserializeMetadata(output), + message: undefined, + retryAfterSeconds: undefined, + }; + if (output.headers["Retry-After"] !== undefined) { + contents.retryAfterSeconds = output.headers['Retry-After']; + } + const data: any = await parseBody(output.body, context); + if (data.message !== undefined) { + contents.message = data.message; + } + return contents; +}; + +const deserializeAws_restJson1_1TooManyRequestsExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const contents: TooManyRequestsException = { + __type: "TooManyRequestsException", + $fault: "client", + $metadata: deserializeMetadata(output), + message: undefined, + retryAfterSeconds: undefined, + }; + if (output.headers["Retry-After"] !== undefined) { + contents.retryAfterSeconds = output.headers['Retry-After']; + } + const data: any = await parseBody(output.body, context); + if (data.message !== undefined) { + contents.message = data.message; + } + return contents; +}; + +const deserializeAws_restJson1_1UnauthorizedExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const contents: UnauthorizedException = { + __type: "UnauthorizedException", + $fault: "client", + $metadata: deserializeMetadata(output), + message: undefined, + }; + const data: any = await parseBody(output.body, context); + if (data.message !== undefined) { + contents.message = data.message; + } + return contents; +}; + +const serializeAws_restJson1_1ApiStage = ( + input: ApiStage, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.apiId !== undefined) { + bodyParams['apiId'] = input.apiId; + } + if (input.stage !== undefined) { + bodyParams['stage'] = input.stage; + } + if (input.throttle !== undefined) { + bodyParams['throttle'] = serializeAws_restJson1_1MapOfApiStageThrottleSettings(input.throttle, context); + } + return bodyParams; +} + +const serializeAws_restJson1_1CanarySettings = ( + input: CanarySettings, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.deploymentId !== undefined) { + bodyParams['deploymentId'] = input.deploymentId; + } + if (input.percentTraffic !== undefined) { + bodyParams['percentTraffic'] = input.percentTraffic; + } + if (input.stageVariableOverrides !== undefined) { + bodyParams['stageVariableOverrides'] = serializeAws_restJson1_1MapOfStringToString(input.stageVariableOverrides, context); + } + if (input.useStageCache !== undefined) { + bodyParams['useStageCache'] = input.useStageCache; + } + return bodyParams; +} + +const serializeAws_restJson1_1DeploymentCanarySettings = ( + input: DeploymentCanarySettings, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.percentTraffic !== undefined) { + bodyParams['percentTraffic'] = input.percentTraffic; + } + if (input.stageVariableOverrides !== undefined) { + bodyParams['stageVariableOverrides'] = serializeAws_restJson1_1MapOfStringToString(input.stageVariableOverrides, context); + } + if (input.useStageCache !== undefined) { + bodyParams['useStageCache'] = input.useStageCache; + } + return bodyParams; +} + +const serializeAws_restJson1_1DocumentationPartLocation = ( + input: DocumentationPartLocation, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.method !== undefined) { + bodyParams['method'] = input.method; + } + if (input.name !== undefined) { + bodyParams['name'] = input.name; + } + if (input.path !== undefined) { + bodyParams['path'] = input.path; + } + if (input.statusCode !== undefined) { + bodyParams['statusCode'] = input.statusCode; + } + if (input.type !== undefined) { + bodyParams['type'] = input.type; + } + return bodyParams; +} + +const serializeAws_restJson1_1EndpointConfiguration = ( + input: EndpointConfiguration, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.types !== undefined) { + bodyParams['types'] = serializeAws_restJson1_1ListOfEndpointType(input.types, context); + } + if (input.vpcEndpointIds !== undefined) { + bodyParams['vpcEndpointIds'] = serializeAws_restJson1_1ListOfString(input.vpcEndpointIds, context); + } + return bodyParams; +} + +const serializeAws_restJson1_1ListOfARNs = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => + entry + ); +} + +const serializeAws_restJson1_1ListOfApiStage = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => + serializeAws_restJson1_1ApiStage(entry, context) + ); +} + +const serializeAws_restJson1_1ListOfEndpointType = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => + entry + ); +} + +const serializeAws_restJson1_1ListOfStageKeys = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => + serializeAws_restJson1_1StageKey(entry, context) + ); +} + +const serializeAws_restJson1_1MapOfApiStageThrottleSettings = ( + input: { [key: string]: ThrottleSettings }, + context: __SerdeContext +): any => { + let mapParams: any = {}; + Object.keys(input).forEach(key => { + mapParams[key] = serializeAws_restJson1_1ThrottleSettings(input[key], context); + }); + return mapParams; +} + +const serializeAws_restJson1_1MapOfStringToBoolean = ( + input: { [key: string]: boolean }, + context: __SerdeContext +): any => { + let mapParams: any = {}; + Object.keys(input).forEach(key => { + mapParams[key] = input[key]; + }); + return mapParams; +} + +const serializeAws_restJson1_1MapOfStringToList = ( + input: { [key: string]: Array }, + context: __SerdeContext +): any => { + let mapParams: any = {}; + Object.keys(input).forEach(key => { + mapParams[key] = serializeAws_restJson1_1ListOfString(input[key], context); + }); + return mapParams; +} + +const serializeAws_restJson1_1MapOfStringToString = ( + input: { [key: string]: string }, + context: __SerdeContext +): any => { + let mapParams: any = {}; + Object.keys(input).forEach(key => { + mapParams[key] = input[key]; + }); + return mapParams; +} + +const serializeAws_restJson1_1QuotaSettings = ( + input: QuotaSettings, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.limit !== undefined) { + bodyParams['limit'] = input.limit; + } + if (input.offset !== undefined) { + bodyParams['offset'] = input.offset; + } + if (input.period !== undefined) { + bodyParams['period'] = input.period; + } + return bodyParams; +} + +const serializeAws_restJson1_1StageKey = ( + input: StageKey, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.restApiId !== undefined) { + bodyParams['restApiId'] = input.restApiId; + } + if (input.stageName !== undefined) { + bodyParams['stageName'] = input.stageName; + } + return bodyParams; +} + +const serializeAws_restJson1_1ThrottleSettings = ( + input: ThrottleSettings, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.burstLimit !== undefined) { + bodyParams['burstLimit'] = input.burstLimit; + } + if (input.rateLimit !== undefined) { + bodyParams['rateLimit'] = input.rateLimit; + } + return bodyParams; +} + +const serializeAws_restJson1_1ListOfPatchOperation = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => + serializeAws_restJson1_1PatchOperation(entry, context) + ); +} + +const serializeAws_restJson1_1ListOfString = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => + entry + ); +} + +const serializeAws_restJson1_1PatchOperation = ( + input: PatchOperation, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.from !== undefined) { + bodyParams['from'] = input.from; + } + if (input.op !== undefined) { + bodyParams['op'] = input.op; + } + if (input.path !== undefined) { + bodyParams['path'] = input.path; + } + if (input.value !== undefined) { + bodyParams['value'] = input.value; + } + return bodyParams; +} + +const deserializeAws_restJson1_1AccessLogSettings = ( + output: any, + context: __SerdeContext +): AccessLogSettings => { + let contents: any = { + __type: "AccessLogSettings", + destinationArn: undefined, + format: undefined, + }; + if (output.destinationArn !== undefined) { + contents.destinationArn = output.destinationArn; + } + if (output.format !== undefined) { + contents.format = output.format; + } + return contents; +} + +const deserializeAws_restJson1_1ApiKey = ( + output: any, + context: __SerdeContext +): ApiKey => { + let contents: any = { + __type: "ApiKey", + createdDate: undefined, + customerId: undefined, + description: undefined, + enabled: undefined, + id: undefined, + lastUpdatedDate: undefined, + name: undefined, + stageKeys: undefined, + tags: undefined, + value: undefined, + }; + if (output.createdDate !== undefined) { + contents.createdDate = new Date(output.createdDate % 1 != 0 ? Math.round(output.createdDate * 1000) : output.createdDate); + } + if (output.customerId !== undefined) { + contents.customerId = output.customerId; + } + if (output.description !== undefined) { + contents.description = output.description; + } + if (output.enabled !== undefined) { + contents.enabled = output.enabled; + } + if (output.id !== undefined) { + contents.id = output.id; + } + if (output.lastUpdatedDate !== undefined) { + contents.lastUpdatedDate = new Date(output.lastUpdatedDate % 1 != 0 ? Math.round(output.lastUpdatedDate * 1000) : output.lastUpdatedDate); + } + if (output.name !== undefined) { + contents.name = output.name; + } + if (output.stageKeys !== undefined) { + contents.stageKeys = deserializeAws_restJson1_1ListOfString(output.stageKeys, context); + } + if (output.tags !== undefined) { + contents.tags = deserializeAws_restJson1_1MapOfStringToString(output.tags, context); + } + if (output.value !== undefined) { + contents.value = output.value; + } + return contents; +} + +const deserializeAws_restJson1_1ApiStage = ( + output: any, + context: __SerdeContext +): ApiStage => { + let contents: any = { + __type: "ApiStage", + apiId: undefined, + stage: undefined, + throttle: undefined, + }; + if (output.apiId !== undefined) { + contents.apiId = output.apiId; + } + if (output.stage !== undefined) { + contents.stage = output.stage; + } + if (output.throttle !== undefined) { + contents.throttle = deserializeAws_restJson1_1MapOfApiStageThrottleSettings(output.throttle, context); + } + return contents; +} + +const deserializeAws_restJson1_1Authorizer = ( + output: any, + context: __SerdeContext +): Authorizer => { + let contents: any = { + __type: "Authorizer", + authType: undefined, + authorizerCredentials: undefined, + authorizerResultTtlInSeconds: undefined, + authorizerUri: undefined, + id: undefined, + identitySource: undefined, + identityValidationExpression: undefined, + name: undefined, + providerARNs: undefined, + type: undefined, + }; + if (output.authType !== undefined) { + contents.authType = output.authType; + } + if (output.authorizerCredentials !== undefined) { + contents.authorizerCredentials = output.authorizerCredentials; + } + if (output.authorizerResultTtlInSeconds !== undefined) { + contents.authorizerResultTtlInSeconds = output.authorizerResultTtlInSeconds; + } + if (output.authorizerUri !== undefined) { + contents.authorizerUri = output.authorizerUri; + } + if (output.id !== undefined) { + contents.id = output.id; + } + if (output.identitySource !== undefined) { + contents.identitySource = output.identitySource; + } + if (output.identityValidationExpression !== undefined) { + contents.identityValidationExpression = output.identityValidationExpression; + } + if (output.name !== undefined) { + contents.name = output.name; + } + if (output.providerARNs !== undefined) { + contents.providerARNs = deserializeAws_restJson1_1ListOfARNs(output.providerARNs, context); + } + if (output.type !== undefined) { + contents.type = output.type; + } + return contents; +} + +const deserializeAws_restJson1_1BasePathMapping = ( + output: any, + context: __SerdeContext +): BasePathMapping => { + let contents: any = { + __type: "BasePathMapping", + basePath: undefined, + restApiId: undefined, + stage: undefined, + }; + if (output.basePath !== undefined) { + contents.basePath = output.basePath; + } + if (output.restApiId !== undefined) { + contents.restApiId = output.restApiId; + } + if (output.stage !== undefined) { + contents.stage = output.stage; + } + return contents; +} + +const deserializeAws_restJson1_1CanarySettings = ( + output: any, + context: __SerdeContext +): CanarySettings => { + let contents: any = { + __type: "CanarySettings", + deploymentId: undefined, + percentTraffic: undefined, + stageVariableOverrides: undefined, + useStageCache: undefined, + }; + if (output.deploymentId !== undefined) { + contents.deploymentId = output.deploymentId; + } + if (output.percentTraffic !== undefined) { + contents.percentTraffic = output.percentTraffic; + } + if (output.stageVariableOverrides !== undefined) { + contents.stageVariableOverrides = deserializeAws_restJson1_1MapOfStringToString(output.stageVariableOverrides, context); + } + if (output.useStageCache !== undefined) { + contents.useStageCache = output.useStageCache; + } + return contents; +} + +const deserializeAws_restJson1_1ClientCertificate = ( + output: any, + context: __SerdeContext +): ClientCertificate => { + let contents: any = { + __type: "ClientCertificate", + clientCertificateId: undefined, + createdDate: undefined, + description: undefined, + expirationDate: undefined, + pemEncodedCertificate: undefined, + tags: undefined, + }; + if (output.clientCertificateId !== undefined) { + contents.clientCertificateId = output.clientCertificateId; + } + if (output.createdDate !== undefined) { + contents.createdDate = new Date(output.createdDate % 1 != 0 ? Math.round(output.createdDate * 1000) : output.createdDate); + } + if (output.description !== undefined) { + contents.description = output.description; + } + if (output.expirationDate !== undefined) { + contents.expirationDate = new Date(output.expirationDate % 1 != 0 ? Math.round(output.expirationDate * 1000) : output.expirationDate); + } + if (output.pemEncodedCertificate !== undefined) { + contents.pemEncodedCertificate = output.pemEncodedCertificate; + } + if (output.tags !== undefined) { + contents.tags = deserializeAws_restJson1_1MapOfStringToString(output.tags, context); + } + return contents; +} + +const deserializeAws_restJson1_1Deployment = ( + output: any, + context: __SerdeContext +): Deployment => { + let contents: any = { + __type: "Deployment", + apiSummary: undefined, + createdDate: undefined, + description: undefined, + id: undefined, + }; + if (output.apiSummary !== undefined) { + contents.apiSummary = deserializeAws_restJson1_1PathToMapOfMethodSnapshot(output.apiSummary, context); + } + if (output.createdDate !== undefined) { + contents.createdDate = new Date(output.createdDate % 1 != 0 ? Math.round(output.createdDate * 1000) : output.createdDate); + } + if (output.description !== undefined) { + contents.description = output.description; + } + if (output.id !== undefined) { + contents.id = output.id; + } + return contents; +} + +const deserializeAws_restJson1_1DocumentationPart = ( + output: any, + context: __SerdeContext +): DocumentationPart => { + let contents: any = { + __type: "DocumentationPart", + id: undefined, + location: undefined, + properties: undefined, + }; + if (output.id !== undefined) { + contents.id = output.id; + } + if (output.location !== undefined) { + contents.location = deserializeAws_restJson1_1DocumentationPartLocation(output.location, context); + } + if (output.properties !== undefined) { + contents.properties = output.properties; + } + return contents; +} + +const deserializeAws_restJson1_1DocumentationPartLocation = ( + output: any, + context: __SerdeContext +): DocumentationPartLocation => { + let contents: any = { + __type: "DocumentationPartLocation", + method: undefined, + name: undefined, + path: undefined, + statusCode: undefined, + type: undefined, + }; + if (output.method !== undefined) { + contents.method = output.method; + } + if (output.name !== undefined) { + contents.name = output.name; + } + if (output.path !== undefined) { + contents.path = output.path; + } + if (output.statusCode !== undefined) { + contents.statusCode = output.statusCode; + } + if (output.type !== undefined) { + contents.type = output.type; + } + return contents; +} + +const deserializeAws_restJson1_1DocumentationVersion = ( + output: any, + context: __SerdeContext +): DocumentationVersion => { + let contents: any = { + __type: "DocumentationVersion", + createdDate: undefined, + description: undefined, + version: undefined, + }; + if (output.createdDate !== undefined) { + contents.createdDate = new Date(output.createdDate % 1 != 0 ? Math.round(output.createdDate * 1000) : output.createdDate); + } + if (output.description !== undefined) { + contents.description = output.description; + } + if (output.version !== undefined) { + contents.version = output.version; + } + return contents; +} + +const deserializeAws_restJson1_1DomainName = ( + output: any, + context: __SerdeContext +): DomainName => { + let contents: any = { + __type: "DomainName", + certificateArn: undefined, + certificateName: undefined, + certificateUploadDate: undefined, + distributionDomainName: undefined, + distributionHostedZoneId: undefined, + domainName: undefined, + domainNameStatus: undefined, + domainNameStatusMessage: undefined, + endpointConfiguration: undefined, + regionalCertificateArn: undefined, + regionalCertificateName: undefined, + regionalDomainName: undefined, + regionalHostedZoneId: undefined, + securityPolicy: undefined, + tags: undefined, + }; + if (output.certificateArn !== undefined) { + contents.certificateArn = output.certificateArn; + } + if (output.certificateName !== undefined) { + contents.certificateName = output.certificateName; + } + if (output.certificateUploadDate !== undefined) { + contents.certificateUploadDate = new Date(output.certificateUploadDate % 1 != 0 ? Math.round(output.certificateUploadDate * 1000) : output.certificateUploadDate); + } + if (output.distributionDomainName !== undefined) { + contents.distributionDomainName = output.distributionDomainName; + } + if (output.distributionHostedZoneId !== undefined) { + contents.distributionHostedZoneId = output.distributionHostedZoneId; + } + if (output.domainName !== undefined) { + contents.domainName = output.domainName; + } + if (output.domainNameStatus !== undefined) { + contents.domainNameStatus = output.domainNameStatus; + } + if (output.domainNameStatusMessage !== undefined) { + contents.domainNameStatusMessage = output.domainNameStatusMessage; + } + if (output.endpointConfiguration !== undefined) { + contents.endpointConfiguration = deserializeAws_restJson1_1EndpointConfiguration(output.endpointConfiguration, context); + } + if (output.regionalCertificateArn !== undefined) { + contents.regionalCertificateArn = output.regionalCertificateArn; + } + if (output.regionalCertificateName !== undefined) { + contents.regionalCertificateName = output.regionalCertificateName; + } + if (output.regionalDomainName !== undefined) { + contents.regionalDomainName = output.regionalDomainName; + } + if (output.regionalHostedZoneId !== undefined) { + contents.regionalHostedZoneId = output.regionalHostedZoneId; + } + if (output.securityPolicy !== undefined) { + contents.securityPolicy = output.securityPolicy; + } + if (output.tags !== undefined) { + contents.tags = deserializeAws_restJson1_1MapOfStringToString(output.tags, context); + } + return contents; +} + +const deserializeAws_restJson1_1EndpointConfiguration = ( + output: any, + context: __SerdeContext +): EndpointConfiguration => { + let contents: any = { + __type: "EndpointConfiguration", + types: undefined, + vpcEndpointIds: undefined, + }; + if (output.types !== undefined) { + contents.types = deserializeAws_restJson1_1ListOfEndpointType(output.types, context); + } + if (output.vpcEndpointIds !== undefined) { + contents.vpcEndpointIds = deserializeAws_restJson1_1ListOfString(output.vpcEndpointIds, context); + } + return contents; +} + +const deserializeAws_restJson1_1GatewayResponse = ( + output: any, + context: __SerdeContext +): GatewayResponse => { + let contents: any = { + __type: "GatewayResponse", + defaultResponse: undefined, + responseParameters: undefined, + responseTemplates: undefined, + responseType: undefined, + statusCode: undefined, + }; + if (output.defaultResponse !== undefined) { + contents.defaultResponse = output.defaultResponse; + } + if (output.responseParameters !== undefined) { + contents.responseParameters = deserializeAws_restJson1_1MapOfStringToString(output.responseParameters, context); + } + if (output.responseTemplates !== undefined) { + contents.responseTemplates = deserializeAws_restJson1_1MapOfStringToString(output.responseTemplates, context); + } + if (output.responseType !== undefined) { + contents.responseType = output.responseType; + } + if (output.statusCode !== undefined) { + contents.statusCode = output.statusCode; + } + return contents; +} + +const deserializeAws_restJson1_1Integration = ( + output: any, + context: __SerdeContext +): Integration => { + let contents: any = { + __type: "Integration", + cacheKeyParameters: undefined, + cacheNamespace: undefined, + connectionId: undefined, + connectionType: undefined, + contentHandling: undefined, + credentials: undefined, + httpMethod: undefined, + integrationResponses: undefined, + passthroughBehavior: undefined, + requestParameters: undefined, + requestTemplates: undefined, + timeoutInMillis: undefined, + type: undefined, + uri: undefined, + }; + if (output.cacheKeyParameters !== undefined) { + contents.cacheKeyParameters = deserializeAws_restJson1_1ListOfString(output.cacheKeyParameters, context); + } + if (output.cacheNamespace !== undefined) { + contents.cacheNamespace = output.cacheNamespace; + } + if (output.connectionId !== undefined) { + contents.connectionId = output.connectionId; + } + if (output.connectionType !== undefined) { + contents.connectionType = output.connectionType; + } + if (output.contentHandling !== undefined) { + contents.contentHandling = output.contentHandling; + } + if (output.credentials !== undefined) { + contents.credentials = output.credentials; + } + if (output.httpMethod !== undefined) { + contents.httpMethod = output.httpMethod; + } + if (output.integrationResponses !== undefined) { + contents.integrationResponses = deserializeAws_restJson1_1MapOfIntegrationResponse(output.integrationResponses, context); + } + if (output.passthroughBehavior !== undefined) { + contents.passthroughBehavior = output.passthroughBehavior; + } + if (output.requestParameters !== undefined) { + contents.requestParameters = deserializeAws_restJson1_1MapOfStringToString(output.requestParameters, context); + } + if (output.requestTemplates !== undefined) { + contents.requestTemplates = deserializeAws_restJson1_1MapOfStringToString(output.requestTemplates, context); + } + if (output.timeoutInMillis !== undefined) { + contents.timeoutInMillis = output.timeoutInMillis; + } + if (output.type !== undefined) { + contents.type = output.type; + } + if (output.uri !== undefined) { + contents.uri = output.uri; + } + return contents; +} + +const deserializeAws_restJson1_1IntegrationResponse = ( + output: any, + context: __SerdeContext +): IntegrationResponse => { + let contents: any = { + __type: "IntegrationResponse", + contentHandling: undefined, + responseParameters: undefined, + responseTemplates: undefined, + selectionPattern: undefined, + statusCode: undefined, + }; + if (output.contentHandling !== undefined) { + contents.contentHandling = output.contentHandling; + } + if (output.responseParameters !== undefined) { + contents.responseParameters = deserializeAws_restJson1_1MapOfStringToString(output.responseParameters, context); + } + if (output.responseTemplates !== undefined) { + contents.responseTemplates = deserializeAws_restJson1_1MapOfStringToString(output.responseTemplates, context); + } + if (output.selectionPattern !== undefined) { + contents.selectionPattern = output.selectionPattern; + } + if (output.statusCode !== undefined) { + contents.statusCode = output.statusCode; + } + return contents; +} + +const deserializeAws_restJson1_1ListOfARNs = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + entry + ); +} + +const deserializeAws_restJson1_1ListOfApiKey = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1ApiKey(entry, context) + ); +} + +const deserializeAws_restJson1_1ListOfApiStage = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1ApiStage(entry, context) + ); +} + +const deserializeAws_restJson1_1ListOfAuthorizer = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1Authorizer(entry, context) + ); +} + +const deserializeAws_restJson1_1ListOfBasePathMapping = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1BasePathMapping(entry, context) + ); +} + +const deserializeAws_restJson1_1ListOfClientCertificate = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1ClientCertificate(entry, context) + ); +} + +const deserializeAws_restJson1_1ListOfDeployment = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1Deployment(entry, context) + ); +} + +const deserializeAws_restJson1_1ListOfDocumentationPart = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1DocumentationPart(entry, context) + ); +} + +const deserializeAws_restJson1_1ListOfDocumentationVersion = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1DocumentationVersion(entry, context) + ); +} + +const deserializeAws_restJson1_1ListOfDomainName = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1DomainName(entry, context) + ); +} + +const deserializeAws_restJson1_1ListOfEndpointType = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + entry + ); +} + +const deserializeAws_restJson1_1ListOfGatewayResponse = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1GatewayResponse(entry, context) + ); +} + +const deserializeAws_restJson1_1ListOfLong = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + entry + ); +} + +const deserializeAws_restJson1_1ListOfModel = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1Model(entry, context) + ); +} + +const deserializeAws_restJson1_1ListOfRequestValidator = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1RequestValidator(entry, context) + ); +} + +const deserializeAws_restJson1_1ListOfResource = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1Resource(entry, context) + ); +} + +const deserializeAws_restJson1_1ListOfRestApi = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1RestApi(entry, context) + ); +} + +const deserializeAws_restJson1_1ListOfSdkConfigurationProperty = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1SdkConfigurationProperty(entry, context) + ); +} + +const deserializeAws_restJson1_1ListOfSdkType = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1SdkType(entry, context) + ); +} + +const deserializeAws_restJson1_1ListOfStage = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1Stage(entry, context) + ); +} + +const deserializeAws_restJson1_1ListOfUsage = ( + output: any, + context: __SerdeContext +): Array> => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1ListOfLong(entry, context) + ); +} + +const deserializeAws_restJson1_1ListOfUsagePlan = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1UsagePlan(entry, context) + ); +} + +const deserializeAws_restJson1_1ListOfUsagePlanKey = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1UsagePlanKey(entry, context) + ); +} + +const deserializeAws_restJson1_1ListOfVpcLink = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1VpcLink(entry, context) + ); +} + +const deserializeAws_restJson1_1MapOfApiStageThrottleSettings = ( + output: any, + context: __SerdeContext +): { [key: string]: ThrottleSettings } => { + let mapParams: any = {}; + Object.keys(output).forEach(key => { + mapParams[key] = deserializeAws_restJson1_1ThrottleSettings(output[key], context); + }); + return mapParams; +} + +const deserializeAws_restJson1_1MapOfIntegrationResponse = ( + output: any, + context: __SerdeContext +): { [key: string]: IntegrationResponse } => { + let mapParams: any = {}; + Object.keys(output).forEach(key => { + mapParams[key] = deserializeAws_restJson1_1IntegrationResponse(output[key], context); + }); + return mapParams; +} + +const deserializeAws_restJson1_1MapOfKeyUsages = ( + output: any, + context: __SerdeContext +): { [key: string]: Array> } => { + let mapParams: any = {}; + Object.keys(output).forEach(key => { + mapParams[key] = deserializeAws_restJson1_1ListOfUsage(output[key], context); + }); + return mapParams; +} + +const deserializeAws_restJson1_1MapOfMethod = ( + output: any, + context: __SerdeContext +): { [key: string]: Method } => { + let mapParams: any = {}; + Object.keys(output).forEach(key => { + mapParams[key] = deserializeAws_restJson1_1Method(output[key], context); + }); + return mapParams; +} + +const deserializeAws_restJson1_1MapOfMethodResponse = ( + output: any, + context: __SerdeContext +): { [key: string]: MethodResponse } => { + let mapParams: any = {}; + Object.keys(output).forEach(key => { + mapParams[key] = deserializeAws_restJson1_1MethodResponse(output[key], context); + }); + return mapParams; +} + +const deserializeAws_restJson1_1MapOfMethodSettings = ( + output: any, + context: __SerdeContext +): { [key: string]: MethodSetting } => { + let mapParams: any = {}; + Object.keys(output).forEach(key => { + mapParams[key] = deserializeAws_restJson1_1MethodSetting(output[key], context); + }); + return mapParams; +} + +const deserializeAws_restJson1_1MapOfMethodSnapshot = ( + output: any, + context: __SerdeContext +): { [key: string]: MethodSnapshot } => { + let mapParams: any = {}; + Object.keys(output).forEach(key => { + mapParams[key] = deserializeAws_restJson1_1MethodSnapshot(output[key], context); + }); + return mapParams; +} + +const deserializeAws_restJson1_1MapOfStringToBoolean = ( + output: any, + context: __SerdeContext +): { [key: string]: boolean } => { + let mapParams: any = {}; + Object.keys(output).forEach(key => { + mapParams[key] = output[key]; + }); + return mapParams; +} + +const deserializeAws_restJson1_1MapOfStringToList = ( + output: any, + context: __SerdeContext +): { [key: string]: Array } => { + let mapParams: any = {}; + Object.keys(output).forEach(key => { + mapParams[key] = deserializeAws_restJson1_1ListOfString(output[key], context); + }); + return mapParams; +} + +const deserializeAws_restJson1_1MapOfStringToString = ( + output: any, + context: __SerdeContext +): { [key: string]: string } => { + let mapParams: any = {}; + Object.keys(output).forEach(key => { + mapParams[key] = output[key]; + }); + return mapParams; +} + +const deserializeAws_restJson1_1Method = ( + output: any, + context: __SerdeContext +): Method => { + let contents: any = { + __type: "Method", + apiKeyRequired: undefined, + authorizationScopes: undefined, + authorizationType: undefined, + authorizerId: undefined, + httpMethod: undefined, + methodIntegration: undefined, + methodResponses: undefined, + operationName: undefined, + requestModels: undefined, + requestParameters: undefined, + requestValidatorId: undefined, + }; + if (output.apiKeyRequired !== undefined) { + contents.apiKeyRequired = output.apiKeyRequired; + } + if (output.authorizationScopes !== undefined) { + contents.authorizationScopes = deserializeAws_restJson1_1ListOfString(output.authorizationScopes, context); + } + if (output.authorizationType !== undefined) { + contents.authorizationType = output.authorizationType; + } + if (output.authorizerId !== undefined) { + contents.authorizerId = output.authorizerId; + } + if (output.httpMethod !== undefined) { + contents.httpMethod = output.httpMethod; + } + if (output.methodIntegration !== undefined) { + contents.methodIntegration = deserializeAws_restJson1_1Integration(output.methodIntegration, context); + } + if (output.methodResponses !== undefined) { + contents.methodResponses = deserializeAws_restJson1_1MapOfMethodResponse(output.methodResponses, context); + } + if (output.operationName !== undefined) { + contents.operationName = output.operationName; + } + if (output.requestModels !== undefined) { + contents.requestModels = deserializeAws_restJson1_1MapOfStringToString(output.requestModels, context); + } + if (output.requestParameters !== undefined) { + contents.requestParameters = deserializeAws_restJson1_1MapOfStringToBoolean(output.requestParameters, context); + } + if (output.requestValidatorId !== undefined) { + contents.requestValidatorId = output.requestValidatorId; + } + return contents; +} + +const deserializeAws_restJson1_1MethodResponse = ( + output: any, + context: __SerdeContext +): MethodResponse => { + let contents: any = { + __type: "MethodResponse", + responseModels: undefined, + responseParameters: undefined, + statusCode: undefined, + }; + if (output.responseModels !== undefined) { + contents.responseModels = deserializeAws_restJson1_1MapOfStringToString(output.responseModels, context); + } + if (output.responseParameters !== undefined) { + contents.responseParameters = deserializeAws_restJson1_1MapOfStringToBoolean(output.responseParameters, context); + } + if (output.statusCode !== undefined) { + contents.statusCode = output.statusCode; + } + return contents; +} + +const deserializeAws_restJson1_1MethodSetting = ( + output: any, + context: __SerdeContext +): MethodSetting => { + let contents: any = { + __type: "MethodSetting", + cacheDataEncrypted: undefined, + cacheTtlInSeconds: undefined, + cachingEnabled: undefined, + dataTraceEnabled: undefined, + loggingLevel: undefined, + metricsEnabled: undefined, + requireAuthorizationForCacheControl: undefined, + throttlingBurstLimit: undefined, + throttlingRateLimit: undefined, + unauthorizedCacheControlHeaderStrategy: undefined, + }; + if (output.cacheDataEncrypted !== undefined) { + contents.cacheDataEncrypted = output.cacheDataEncrypted; + } + if (output.cacheTtlInSeconds !== undefined) { + contents.cacheTtlInSeconds = output.cacheTtlInSeconds; + } + if (output.cachingEnabled !== undefined) { + contents.cachingEnabled = output.cachingEnabled; + } + if (output.dataTraceEnabled !== undefined) { + contents.dataTraceEnabled = output.dataTraceEnabled; + } + if (output.loggingLevel !== undefined) { + contents.loggingLevel = output.loggingLevel; + } + if (output.metricsEnabled !== undefined) { + contents.metricsEnabled = output.metricsEnabled; + } + if (output.requireAuthorizationForCacheControl !== undefined) { + contents.requireAuthorizationForCacheControl = output.requireAuthorizationForCacheControl; + } + if (output.throttlingBurstLimit !== undefined) { + contents.throttlingBurstLimit = output.throttlingBurstLimit; + } + if (output.throttlingRateLimit !== undefined) { + contents.throttlingRateLimit = output.throttlingRateLimit; + } + if (output.unauthorizedCacheControlHeaderStrategy !== undefined) { + contents.unauthorizedCacheControlHeaderStrategy = output.unauthorizedCacheControlHeaderStrategy; + } + return contents; +} + +const deserializeAws_restJson1_1MethodSnapshot = ( + output: any, + context: __SerdeContext +): MethodSnapshot => { + let contents: any = { + __type: "MethodSnapshot", + apiKeyRequired: undefined, + authorizationType: undefined, + }; + if (output.apiKeyRequired !== undefined) { + contents.apiKeyRequired = output.apiKeyRequired; + } + if (output.authorizationType !== undefined) { + contents.authorizationType = output.authorizationType; + } + return contents; +} + +const deserializeAws_restJson1_1Model = ( + output: any, + context: __SerdeContext +): Model => { + let contents: any = { + __type: "Model", + contentType: undefined, + description: undefined, + id: undefined, + name: undefined, + schema: undefined, + }; + if (output.contentType !== undefined) { + contents.contentType = output.contentType; + } + if (output.description !== undefined) { + contents.description = output.description; + } + if (output.id !== undefined) { + contents.id = output.id; + } + if (output.name !== undefined) { + contents.name = output.name; + } + if (output.schema !== undefined) { + contents.schema = output.schema; + } + return contents; +} + +const deserializeAws_restJson1_1PathToMapOfMethodSnapshot = ( + output: any, + context: __SerdeContext +): { [key: string]: { [key: string]: MethodSnapshot } } => { + let mapParams: any = {}; + Object.keys(output).forEach(key => { + mapParams[key] = deserializeAws_restJson1_1MapOfMethodSnapshot(output[key], context); + }); + return mapParams; +} + +const deserializeAws_restJson1_1QuotaSettings = ( + output: any, + context: __SerdeContext +): QuotaSettings => { + let contents: any = { + __type: "QuotaSettings", + limit: undefined, + offset: undefined, + period: undefined, + }; + if (output.limit !== undefined) { + contents.limit = output.limit; + } + if (output.offset !== undefined) { + contents.offset = output.offset; + } + if (output.period !== undefined) { + contents.period = output.period; + } + return contents; +} + +const deserializeAws_restJson1_1RequestValidator = ( + output: any, + context: __SerdeContext +): RequestValidator => { + let contents: any = { + __type: "RequestValidator", + id: undefined, + name: undefined, + validateRequestBody: undefined, + validateRequestParameters: undefined, + }; + if (output.id !== undefined) { + contents.id = output.id; + } + if (output.name !== undefined) { + contents.name = output.name; + } + if (output.validateRequestBody !== undefined) { + contents.validateRequestBody = output.validateRequestBody; + } + if (output.validateRequestParameters !== undefined) { + contents.validateRequestParameters = output.validateRequestParameters; + } + return contents; +} + +const deserializeAws_restJson1_1Resource = ( + output: any, + context: __SerdeContext +): Resource => { + let contents: any = { + __type: "Resource", + id: undefined, + parentId: undefined, + path: undefined, + pathPart: undefined, + resourceMethods: undefined, + }; + if (output.id !== undefined) { + contents.id = output.id; + } + if (output.parentId !== undefined) { + contents.parentId = output.parentId; + } + if (output.path !== undefined) { + contents.path = output.path; + } + if (output.pathPart !== undefined) { + contents.pathPart = output.pathPart; + } + if (output.resourceMethods !== undefined) { + contents.resourceMethods = deserializeAws_restJson1_1MapOfMethod(output.resourceMethods, context); + } + return contents; +} + +const deserializeAws_restJson1_1RestApi = ( + output: any, + context: __SerdeContext +): RestApi => { + let contents: any = { + __type: "RestApi", + apiKeySource: undefined, + binaryMediaTypes: undefined, + createdDate: undefined, + description: undefined, + endpointConfiguration: undefined, + id: undefined, + minimumCompressionSize: undefined, + name: undefined, + policy: undefined, + tags: undefined, + version: undefined, + warnings: undefined, + }; + if (output.apiKeySource !== undefined) { + contents.apiKeySource = output.apiKeySource; + } + if (output.binaryMediaTypes !== undefined) { + contents.binaryMediaTypes = deserializeAws_restJson1_1ListOfString(output.binaryMediaTypes, context); + } + if (output.createdDate !== undefined) { + contents.createdDate = new Date(output.createdDate % 1 != 0 ? Math.round(output.createdDate * 1000) : output.createdDate); + } + if (output.description !== undefined) { + contents.description = output.description; + } + if (output.endpointConfiguration !== undefined) { + contents.endpointConfiguration = deserializeAws_restJson1_1EndpointConfiguration(output.endpointConfiguration, context); + } + if (output.id !== undefined) { + contents.id = output.id; + } + if (output.minimumCompressionSize !== undefined) { + contents.minimumCompressionSize = output.minimumCompressionSize; + } + if (output.name !== undefined) { + contents.name = output.name; + } + if (output.policy !== undefined) { + contents.policy = output.policy; + } + if (output.tags !== undefined) { + contents.tags = deserializeAws_restJson1_1MapOfStringToString(output.tags, context); + } + if (output.version !== undefined) { + contents.version = output.version; + } + if (output.warnings !== undefined) { + contents.warnings = deserializeAws_restJson1_1ListOfString(output.warnings, context); + } + return contents; +} + +const deserializeAws_restJson1_1SdkConfigurationProperty = ( + output: any, + context: __SerdeContext +): SdkConfigurationProperty => { + let contents: any = { + __type: "SdkConfigurationProperty", + defaultValue: undefined, + description: undefined, + friendlyName: undefined, + name: undefined, + required: undefined, + }; + if (output.defaultValue !== undefined) { + contents.defaultValue = output.defaultValue; + } + if (output.description !== undefined) { + contents.description = output.description; + } + if (output.friendlyName !== undefined) { + contents.friendlyName = output.friendlyName; + } + if (output.name !== undefined) { + contents.name = output.name; + } + if (output.required !== undefined) { + contents.required = output.required; + } + return contents; +} + +const deserializeAws_restJson1_1SdkType = ( + output: any, + context: __SerdeContext +): SdkType => { + let contents: any = { + __type: "SdkType", + configurationProperties: undefined, + description: undefined, + friendlyName: undefined, + id: undefined, + }; + if (output.configurationProperties !== undefined) { + contents.configurationProperties = deserializeAws_restJson1_1ListOfSdkConfigurationProperty(output.configurationProperties, context); + } + if (output.description !== undefined) { + contents.description = output.description; + } + if (output.friendlyName !== undefined) { + contents.friendlyName = output.friendlyName; + } + if (output.id !== undefined) { + contents.id = output.id; + } + return contents; +} + +const deserializeAws_restJson1_1Stage = ( + output: any, + context: __SerdeContext +): Stage => { + let contents: any = { + __type: "Stage", + accessLogSettings: undefined, + cacheClusterEnabled: undefined, + cacheClusterSize: undefined, + cacheClusterStatus: undefined, + canarySettings: undefined, + clientCertificateId: undefined, + createdDate: undefined, + deploymentId: undefined, + description: undefined, + documentationVersion: undefined, + lastUpdatedDate: undefined, + methodSettings: undefined, + stageName: undefined, + tags: undefined, + tracingEnabled: undefined, + variables: undefined, + webAclArn: undefined, + }; + if (output.accessLogSettings !== undefined) { + contents.accessLogSettings = deserializeAws_restJson1_1AccessLogSettings(output.accessLogSettings, context); + } + if (output.cacheClusterEnabled !== undefined) { + contents.cacheClusterEnabled = output.cacheClusterEnabled; + } + if (output.cacheClusterSize !== undefined) { + contents.cacheClusterSize = output.cacheClusterSize; + } + if (output.cacheClusterStatus !== undefined) { + contents.cacheClusterStatus = output.cacheClusterStatus; + } + if (output.canarySettings !== undefined) { + contents.canarySettings = deserializeAws_restJson1_1CanarySettings(output.canarySettings, context); + } + if (output.clientCertificateId !== undefined) { + contents.clientCertificateId = output.clientCertificateId; + } + if (output.createdDate !== undefined) { + contents.createdDate = new Date(output.createdDate % 1 != 0 ? Math.round(output.createdDate * 1000) : output.createdDate); + } + if (output.deploymentId !== undefined) { + contents.deploymentId = output.deploymentId; + } + if (output.description !== undefined) { + contents.description = output.description; + } + if (output.documentationVersion !== undefined) { + contents.documentationVersion = output.documentationVersion; + } + if (output.lastUpdatedDate !== undefined) { + contents.lastUpdatedDate = new Date(output.lastUpdatedDate % 1 != 0 ? Math.round(output.lastUpdatedDate * 1000) : output.lastUpdatedDate); + } + if (output.methodSettings !== undefined) { + contents.methodSettings = deserializeAws_restJson1_1MapOfMethodSettings(output.methodSettings, context); + } + if (output.stageName !== undefined) { + contents.stageName = output.stageName; + } + if (output.tags !== undefined) { + contents.tags = deserializeAws_restJson1_1MapOfStringToString(output.tags, context); + } + if (output.tracingEnabled !== undefined) { + contents.tracingEnabled = output.tracingEnabled; + } + if (output.variables !== undefined) { + contents.variables = deserializeAws_restJson1_1MapOfStringToString(output.variables, context); + } + if (output.webAclArn !== undefined) { + contents.webAclArn = output.webAclArn; + } + return contents; +} + +const deserializeAws_restJson1_1ThrottleSettings = ( + output: any, + context: __SerdeContext +): ThrottleSettings => { + let contents: any = { + __type: "ThrottleSettings", + burstLimit: undefined, + rateLimit: undefined, + }; + if (output.burstLimit !== undefined) { + contents.burstLimit = output.burstLimit; + } + if (output.rateLimit !== undefined) { + contents.rateLimit = output.rateLimit; + } + return contents; +} + +const deserializeAws_restJson1_1UsagePlan = ( + output: any, + context: __SerdeContext +): UsagePlan => { + let contents: any = { + __type: "UsagePlan", + apiStages: undefined, + description: undefined, + id: undefined, + name: undefined, + productCode: undefined, + quota: undefined, + tags: undefined, + throttle: undefined, + }; + if (output.apiStages !== undefined) { + contents.apiStages = deserializeAws_restJson1_1ListOfApiStage(output.apiStages, context); + } + if (output.description !== undefined) { + contents.description = output.description; + } + if (output.id !== undefined) { + contents.id = output.id; + } + if (output.name !== undefined) { + contents.name = output.name; + } + if (output.productCode !== undefined) { + contents.productCode = output.productCode; + } + if (output.quota !== undefined) { + contents.quota = deserializeAws_restJson1_1QuotaSettings(output.quota, context); + } + if (output.tags !== undefined) { + contents.tags = deserializeAws_restJson1_1MapOfStringToString(output.tags, context); + } + if (output.throttle !== undefined) { + contents.throttle = deserializeAws_restJson1_1ThrottleSettings(output.throttle, context); + } + return contents; +} + +const deserializeAws_restJson1_1UsagePlanKey = ( + output: any, + context: __SerdeContext +): UsagePlanKey => { + let contents: any = { + __type: "UsagePlanKey", + id: undefined, + name: undefined, + type: undefined, + value: undefined, + }; + if (output.id !== undefined) { + contents.id = output.id; + } + if (output.name !== undefined) { + contents.name = output.name; + } + if (output.type !== undefined) { + contents.type = output.type; + } + if (output.value !== undefined) { + contents.value = output.value; + } + return contents; +} + +const deserializeAws_restJson1_1VpcLink = ( + output: any, + context: __SerdeContext +): VpcLink => { + let contents: any = { + __type: "VpcLink", + description: undefined, + id: undefined, + name: undefined, + status: undefined, + statusMessage: undefined, + tags: undefined, + targetArns: undefined, + }; + if (output.description !== undefined) { + contents.description = output.description; + } + if (output.id !== undefined) { + contents.id = output.id; + } + if (output.name !== undefined) { + contents.name = output.name; + } + if (output.status !== undefined) { + contents.status = output.status; + } + if (output.statusMessage !== undefined) { + contents.statusMessage = output.statusMessage; + } + if (output.tags !== undefined) { + contents.tags = deserializeAws_restJson1_1MapOfStringToString(output.tags, context); + } + if (output.targetArns !== undefined) { + contents.targetArns = deserializeAws_restJson1_1ListOfString(output.targetArns, context); + } + return contents; +} + +const deserializeAws_restJson1_1ListOfString = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + entry + ); +} + +const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ + httpStatusCode: output.statusCode, + httpHeaders: output.headers, + requestId: output.headers["x-amzn-requestid"] +}); + +const parseBody = (streamBody: any, context: __SerdeContext): any => { + return context.streamCollector(streamBody).then((body: any) => { + const encoded = context.utf8Encoder(body); + if (encoded.length) { + return JSON.parse(encoded); + } + return {}; + }); +}; diff --git a/clients/client-api-gateway/runtimeConfig.browser.ts b/clients/client-api-gateway/runtimeConfig.browser.ts new file mode 100644 index 000000000000..cff7099a3868 --- /dev/null +++ b/clients/client-api-gateway/runtimeConfig.browser.ts @@ -0,0 +1,30 @@ +import { invalidFunction } from "@aws-sdk/invalid-dependency"; +import { Sha256 } from "@aws-crypto/sha256-browser"; +import { FetchHttpHandler } from "@aws-sdk/fetch-http-handler"; +import { parseUrl } from "@aws-sdk/url-parser-browser"; +import { calculateBodyLength } from "@aws-sdk/util-body-length-browser"; +import { streamCollector } from "@aws-sdk/stream-collector-browser"; +import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser"; +import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser"; +import { name, version } from "./package.json"; +import { ClientDefaults } from "./APIGatewayClient"; +import { ClientSharedValues } from "./runtimeConfig.shared"; + +export const ClientDefaultValues: Required = { + ...ClientSharedValues, + requestHandler: new FetchHttpHandler(), + sha256: Sha256, + urlParser: parseUrl, + bodyLengthChecker: calculateBodyLength, + streamCollector, + base64Decoder: fromBase64, + base64Encoder: toBase64, + utf8Decoder: fromUtf8, + utf8Encoder: toUtf8, + defaultUserAgent: defaultUserAgent(name, version), + runtime: "browser", + signingName: "apigateway", + credentialDefaultProvider: invalidFunction("Credential is missing") as any, + regionDefaultProvider: invalidFunction("Region is missing") as any, +}; diff --git a/clients/client-api-gateway/runtimeConfig.shared.ts b/clients/client-api-gateway/runtimeConfig.shared.ts new file mode 100644 index 000000000000..98eb59c236be --- /dev/null +++ b/clients/client-api-gateway/runtimeConfig.shared.ts @@ -0,0 +1,7 @@ +import { defaultRegionInfoProvider } from "./endpoints"; + +export const ClientSharedValues = { + apiVersion: "2015-07-09", + signingName: "apigateway", + regionInfoProvider: defaultRegionInfoProvider +}; diff --git a/clients/client-api-gateway/runtimeConfig.ts b/clients/client-api-gateway/runtimeConfig.ts new file mode 100644 index 000000000000..00ed203b7033 --- /dev/null +++ b/clients/client-api-gateway/runtimeConfig.ts @@ -0,0 +1,31 @@ +import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; +import { defaultProvider as regionDefaultProvider } from "@aws-sdk/region-provider"; +import { Hash } from "@aws-sdk/hash-node"; +import { NodeHttpHandler } from "@aws-sdk/node-http-handler"; +import { parseUrl } from "@aws-sdk/url-parser-node"; +import { calculateBodyLength } from "@aws-sdk/util-body-length-node"; +import { streamCollector } from "@aws-sdk/stream-collector-node"; +import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node"; +import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-node"; +import { name, version } from "./package.json"; +import { ClientDefaults } from "./APIGatewayClient"; +import { ClientSharedValues } from "./runtimeConfig.shared"; + +export const ClientDefaultValues: Required = { + ...ClientSharedValues, + requestHandler: new NodeHttpHandler(), + sha256: Hash.bind(null, "sha256"), + urlParser: parseUrl, + bodyLengthChecker: calculateBodyLength, + streamCollector, + base64Decoder: fromBase64, + base64Encoder: toBase64, + utf8Decoder: fromUtf8, + utf8Encoder: toUtf8, + defaultUserAgent: defaultUserAgent(name, version), + runtime: "node", + signingName: "apigateway", + credentialDefaultProvider, + regionDefaultProvider, +}; diff --git a/clients/client-api-gateway/tsconfig.es.json b/clients/client-api-gateway/tsconfig.es.json new file mode 100644 index 000000000000..9add6a7c2445 --- /dev/null +++ b/clients/client-api-gateway/tsconfig.es.json @@ -0,0 +1,19 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "target": "es5", + "module": "esnext", + "moduleResolution": "node", + "declaration": false, + "declarationDir": null, + "lib": [ + "dom", + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "outDir": "dist/es" + } +} diff --git a/clients/client-api-gateway/tsconfig.json b/clients/client-api-gateway/tsconfig.json new file mode 100644 index 000000000000..ca2fadc08187 --- /dev/null +++ b/clients/client-api-gateway/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "alwaysStrict": true, + "target": "es2017", + "module": "commonjs", + "declaration": true, + "strict": true, + "sourceMap": true, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "incremental": true, + "resolveJsonModule": true, + "declarationDir": "./types", + "outDir": "dist/cjs" + }, + "typedocOptions": { + "exclude": "**/node_modules/**", + "excludedNotExported": true, + "excludePrivate": true, + "hideGenerator": true, + "ignoreCompilerErrors": true, + "mode": "file", + "out": "./docs", + "plugin": "@aws-sdk/client-documentation-generator" + } +} diff --git a/yarn.lock b/yarn.lock index b999a6d3a49e..4a28ab43da75 100644 --- a/yarn.lock +++ b/yarn.lock @@ -64,6 +64,14 @@ "@aws-sdk/types" "^0.1.0-preview.7" tslib "^1.8.0" +"@aws-sdk/bucket-endpoint-middleware@^0.1.0-preview.5": + version "0.1.0-preview.7" + resolved "https://registry.yarnpkg.com/@aws-sdk/bucket-endpoint-middleware/-/bucket-endpoint-middleware-0.1.0-preview.7.tgz#5322caabfcef9c8416b026bfc000c3a46b8b7e55" + integrity sha512-XUrR/fKADNTXgW5wfp0U2K2WD+4NiY/njne7rR0YTNZHE0eWD0q0YvRx4LXj6HFraAUqZ8liPG2k/BjzdT8M0Q== + dependencies: + "@aws-sdk/types" "^0.1.0-preview.7" + tslib "^1.8.0" + "@aws-sdk/client-cognito-identity-browser@^0.1.0-preview.7": version "0.1.0-preview.7" resolved "https://registry.yarnpkg.com/@aws-sdk/client-cognito-identity-browser/-/client-cognito-identity-browser-0.1.0-preview.7.tgz#05ef31ec3e8fa0e57c27032a320ead2cdd8db32b"