diff --git a/clients/client-directory-service/.gitignore b/clients/client-directory-service/.gitignore new file mode 100644 index 000000000000..b41c05b597c4 --- /dev/null +++ b/clients/client-directory-service/.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-directory-service/.npmignore b/clients/client-directory-service/.npmignore new file mode 100644 index 000000000000..b7ff81137c4a --- /dev/null +++ b/clients/client-directory-service/.npmignore @@ -0,0 +1,4 @@ +/coverage/ +/docs/ +tsconfig.test.json +*.tsbuildinfo diff --git a/clients/client-directory-service/DirectoryService.ts b/clients/client-directory-service/DirectoryService.ts new file mode 100644 index 000000000000..c268f1107b7b --- /dev/null +++ b/clients/client-directory-service/DirectoryService.ts @@ -0,0 +1,2518 @@ +import { DirectoryServiceClient } from "./DirectoryServiceClient"; +import { + AcceptSharedDirectoryCommand, + AcceptSharedDirectoryCommandInput, + AcceptSharedDirectoryCommandOutput +} from "./commands/AcceptSharedDirectoryCommand"; +import { + AddIpRoutesCommand, + AddIpRoutesCommandInput, + AddIpRoutesCommandOutput +} from "./commands/AddIpRoutesCommand"; +import { + AddTagsToResourceCommand, + AddTagsToResourceCommandInput, + AddTagsToResourceCommandOutput +} from "./commands/AddTagsToResourceCommand"; +import { + CancelSchemaExtensionCommand, + CancelSchemaExtensionCommandInput, + CancelSchemaExtensionCommandOutput +} from "./commands/CancelSchemaExtensionCommand"; +import { + ConnectDirectoryCommand, + ConnectDirectoryCommandInput, + ConnectDirectoryCommandOutput +} from "./commands/ConnectDirectoryCommand"; +import { + CreateAliasCommand, + CreateAliasCommandInput, + CreateAliasCommandOutput +} from "./commands/CreateAliasCommand"; +import { + CreateComputerCommand, + CreateComputerCommandInput, + CreateComputerCommandOutput +} from "./commands/CreateComputerCommand"; +import { + CreateConditionalForwarderCommand, + CreateConditionalForwarderCommandInput, + CreateConditionalForwarderCommandOutput +} from "./commands/CreateConditionalForwarderCommand"; +import { + CreateDirectoryCommand, + CreateDirectoryCommandInput, + CreateDirectoryCommandOutput +} from "./commands/CreateDirectoryCommand"; +import { + CreateLogSubscriptionCommand, + CreateLogSubscriptionCommandInput, + CreateLogSubscriptionCommandOutput +} from "./commands/CreateLogSubscriptionCommand"; +import { + CreateMicrosoftADCommand, + CreateMicrosoftADCommandInput, + CreateMicrosoftADCommandOutput +} from "./commands/CreateMicrosoftADCommand"; +import { + CreateSnapshotCommand, + CreateSnapshotCommandInput, + CreateSnapshotCommandOutput +} from "./commands/CreateSnapshotCommand"; +import { + CreateTrustCommand, + CreateTrustCommandInput, + CreateTrustCommandOutput +} from "./commands/CreateTrustCommand"; +import { + DeleteConditionalForwarderCommand, + DeleteConditionalForwarderCommandInput, + DeleteConditionalForwarderCommandOutput +} from "./commands/DeleteConditionalForwarderCommand"; +import { + DeleteDirectoryCommand, + DeleteDirectoryCommandInput, + DeleteDirectoryCommandOutput +} from "./commands/DeleteDirectoryCommand"; +import { + DeleteLogSubscriptionCommand, + DeleteLogSubscriptionCommandInput, + DeleteLogSubscriptionCommandOutput +} from "./commands/DeleteLogSubscriptionCommand"; +import { + DeleteSnapshotCommand, + DeleteSnapshotCommandInput, + DeleteSnapshotCommandOutput +} from "./commands/DeleteSnapshotCommand"; +import { + DeleteTrustCommand, + DeleteTrustCommandInput, + DeleteTrustCommandOutput +} from "./commands/DeleteTrustCommand"; +import { + DeregisterCertificateCommand, + DeregisterCertificateCommandInput, + DeregisterCertificateCommandOutput +} from "./commands/DeregisterCertificateCommand"; +import { + DeregisterEventTopicCommand, + DeregisterEventTopicCommandInput, + DeregisterEventTopicCommandOutput +} from "./commands/DeregisterEventTopicCommand"; +import { + DescribeCertificateCommand, + DescribeCertificateCommandInput, + DescribeCertificateCommandOutput +} from "./commands/DescribeCertificateCommand"; +import { + DescribeConditionalForwardersCommand, + DescribeConditionalForwardersCommandInput, + DescribeConditionalForwardersCommandOutput +} from "./commands/DescribeConditionalForwardersCommand"; +import { + DescribeDirectoriesCommand, + DescribeDirectoriesCommandInput, + DescribeDirectoriesCommandOutput +} from "./commands/DescribeDirectoriesCommand"; +import { + DescribeDomainControllersCommand, + DescribeDomainControllersCommandInput, + DescribeDomainControllersCommandOutput +} from "./commands/DescribeDomainControllersCommand"; +import { + DescribeEventTopicsCommand, + DescribeEventTopicsCommandInput, + DescribeEventTopicsCommandOutput +} from "./commands/DescribeEventTopicsCommand"; +import { + DescribeLDAPSSettingsCommand, + DescribeLDAPSSettingsCommandInput, + DescribeLDAPSSettingsCommandOutput +} from "./commands/DescribeLDAPSSettingsCommand"; +import { + DescribeSharedDirectoriesCommand, + DescribeSharedDirectoriesCommandInput, + DescribeSharedDirectoriesCommandOutput +} from "./commands/DescribeSharedDirectoriesCommand"; +import { + DescribeSnapshotsCommand, + DescribeSnapshotsCommandInput, + DescribeSnapshotsCommandOutput +} from "./commands/DescribeSnapshotsCommand"; +import { + DescribeTrustsCommand, + DescribeTrustsCommandInput, + DescribeTrustsCommandOutput +} from "./commands/DescribeTrustsCommand"; +import { + DisableLDAPSCommand, + DisableLDAPSCommandInput, + DisableLDAPSCommandOutput +} from "./commands/DisableLDAPSCommand"; +import { + DisableRadiusCommand, + DisableRadiusCommandInput, + DisableRadiusCommandOutput +} from "./commands/DisableRadiusCommand"; +import { + DisableSsoCommand, + DisableSsoCommandInput, + DisableSsoCommandOutput +} from "./commands/DisableSsoCommand"; +import { + EnableLDAPSCommand, + EnableLDAPSCommandInput, + EnableLDAPSCommandOutput +} from "./commands/EnableLDAPSCommand"; +import { + EnableRadiusCommand, + EnableRadiusCommandInput, + EnableRadiusCommandOutput +} from "./commands/EnableRadiusCommand"; +import { + EnableSsoCommand, + EnableSsoCommandInput, + EnableSsoCommandOutput +} from "./commands/EnableSsoCommand"; +import { + GetDirectoryLimitsCommand, + GetDirectoryLimitsCommandInput, + GetDirectoryLimitsCommandOutput +} from "./commands/GetDirectoryLimitsCommand"; +import { + GetSnapshotLimitsCommand, + GetSnapshotLimitsCommandInput, + GetSnapshotLimitsCommandOutput +} from "./commands/GetSnapshotLimitsCommand"; +import { + ListCertificatesCommand, + ListCertificatesCommandInput, + ListCertificatesCommandOutput +} from "./commands/ListCertificatesCommand"; +import { + ListIpRoutesCommand, + ListIpRoutesCommandInput, + ListIpRoutesCommandOutput +} from "./commands/ListIpRoutesCommand"; +import { + ListLogSubscriptionsCommand, + ListLogSubscriptionsCommandInput, + ListLogSubscriptionsCommandOutput +} from "./commands/ListLogSubscriptionsCommand"; +import { + ListSchemaExtensionsCommand, + ListSchemaExtensionsCommandInput, + ListSchemaExtensionsCommandOutput +} from "./commands/ListSchemaExtensionsCommand"; +import { + ListTagsForResourceCommand, + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput +} from "./commands/ListTagsForResourceCommand"; +import { + RegisterCertificateCommand, + RegisterCertificateCommandInput, + RegisterCertificateCommandOutput +} from "./commands/RegisterCertificateCommand"; +import { + RegisterEventTopicCommand, + RegisterEventTopicCommandInput, + RegisterEventTopicCommandOutput +} from "./commands/RegisterEventTopicCommand"; +import { + RejectSharedDirectoryCommand, + RejectSharedDirectoryCommandInput, + RejectSharedDirectoryCommandOutput +} from "./commands/RejectSharedDirectoryCommand"; +import { + RemoveIpRoutesCommand, + RemoveIpRoutesCommandInput, + RemoveIpRoutesCommandOutput +} from "./commands/RemoveIpRoutesCommand"; +import { + RemoveTagsFromResourceCommand, + RemoveTagsFromResourceCommandInput, + RemoveTagsFromResourceCommandOutput +} from "./commands/RemoveTagsFromResourceCommand"; +import { + ResetUserPasswordCommand, + ResetUserPasswordCommandInput, + ResetUserPasswordCommandOutput +} from "./commands/ResetUserPasswordCommand"; +import { + RestoreFromSnapshotCommand, + RestoreFromSnapshotCommandInput, + RestoreFromSnapshotCommandOutput +} from "./commands/RestoreFromSnapshotCommand"; +import { + ShareDirectoryCommand, + ShareDirectoryCommandInput, + ShareDirectoryCommandOutput +} from "./commands/ShareDirectoryCommand"; +import { + StartSchemaExtensionCommand, + StartSchemaExtensionCommandInput, + StartSchemaExtensionCommandOutput +} from "./commands/StartSchemaExtensionCommand"; +import { + UnshareDirectoryCommand, + UnshareDirectoryCommandInput, + UnshareDirectoryCommandOutput +} from "./commands/UnshareDirectoryCommand"; +import { + UpdateConditionalForwarderCommand, + UpdateConditionalForwarderCommandInput, + UpdateConditionalForwarderCommandOutput +} from "./commands/UpdateConditionalForwarderCommand"; +import { + UpdateNumberOfDomainControllersCommand, + UpdateNumberOfDomainControllersCommandInput, + UpdateNumberOfDomainControllersCommandOutput +} from "./commands/UpdateNumberOfDomainControllersCommand"; +import { + UpdateRadiusCommand, + UpdateRadiusCommandInput, + UpdateRadiusCommandOutput +} from "./commands/UpdateRadiusCommand"; +import { + UpdateTrustCommand, + UpdateTrustCommandInput, + UpdateTrustCommandOutput +} from "./commands/UpdateTrustCommand"; +import { + VerifyTrustCommand, + VerifyTrustCommandInput, + VerifyTrustCommandOutput +} from "./commands/VerifyTrustCommand"; +import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types"; + +/** + * + * AWS Directory Service + *

AWS Directory Service is a web service that makes it easy for you to setup and run directories in the AWS cloud, or connect your AWS resources with an existing on-premises Microsoft Active Directory. This guide provides detailed information about AWS Directory Service operations, data types, parameters, and errors. For information about AWS Directory Services features, see AWS Directory Service and the AWS Directory Service Administration Guide.

+ * + *

AWS provides SDKs that consist of libraries and sample code for various programming languages and platforms (Java, Ruby, .Net, iOS, Android, etc.). The SDKs provide a convenient way to create programmatic access to AWS Directory Service and other AWS services. For more information about the AWS SDKs, including how to download and install them, see Tools for Amazon Web + * Services.

+ *
+ * + */ +export class DirectoryService extends DirectoryServiceClient { + /** + * + *

Accepts a directory sharing request that was sent from the directory owner account.

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

If the DNS server for your on-premises domain uses a publicly addressable IP address, you must add a CIDR address block to correctly route traffic to and from your Microsoft AD on Amazon Web Services. AddIpRoutes adds this address block. You can also use AddIpRoutes to facilitate routing traffic that uses public IP ranges from your Microsoft AD on AWS to a peer VPC.

+ *

Before you call AddIpRoutes, ensure that all of the required permissions have been explicitly granted through a policy. For details about what permissions are required to run the AddIpRoutes operation, see AWS Directory Service API Permissions: Actions, Resources, and Conditions Reference.

+ * + * + */ + public addIpRoutes( + args: AddIpRoutesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public addIpRoutes( + args: AddIpRoutesCommandInput, + cb: (err: any, data?: AddIpRoutesCommandOutput) => void + ): void; + public addIpRoutes( + args: AddIpRoutesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: AddIpRoutesCommandOutput) => void + ): void; + public addIpRoutes( + args: AddIpRoutesCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: AddIpRoutesCommandOutput) => void), + cb?: (err: any, data?: AddIpRoutesCommandOutput) => void + ): Promise | void { + const command = new AddIpRoutesCommand(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 overwrites one or more tags for the specified directory. Each directory can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique to each resource.

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

Cancels an in-progress schema extension to a Microsoft AD directory. Once a schema extension has started replicating to all domain controllers, the task can no longer be canceled. A schema extension can be canceled during any of the following states; Initializing, CreatingSnapshot, and UpdatingSchema.

+ * + * + */ + public cancelSchemaExtension( + args: CancelSchemaExtensionCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public cancelSchemaExtension( + args: CancelSchemaExtensionCommandInput, + cb: (err: any, data?: CancelSchemaExtensionCommandOutput) => void + ): void; + public cancelSchemaExtension( + args: CancelSchemaExtensionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CancelSchemaExtensionCommandOutput) => void + ): void; + public cancelSchemaExtension( + args: CancelSchemaExtensionCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: CancelSchemaExtensionCommandOutput) => void), + cb?: (err: any, data?: CancelSchemaExtensionCommandOutput) => void + ): Promise | void { + const command = new CancelSchemaExtensionCommand(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 an AD Connector to connect to an on-premises directory.

+ *

Before you call ConnectDirectory, ensure that all of the required permissions have been explicitly granted through a policy. For details about what permissions are required to run the ConnectDirectory operation, see AWS Directory Service API Permissions: Actions, Resources, and Conditions Reference.

+ * + * + */ + public connectDirectory( + args: ConnectDirectoryCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public connectDirectory( + args: ConnectDirectoryCommandInput, + cb: (err: any, data?: ConnectDirectoryCommandOutput) => void + ): void; + public connectDirectory( + args: ConnectDirectoryCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ConnectDirectoryCommandOutput) => void + ): void; + public connectDirectory( + args: ConnectDirectoryCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: ConnectDirectoryCommandOutput) => void), + cb?: (err: any, data?: ConnectDirectoryCommandOutput) => void + ): Promise | void { + const command = new ConnectDirectoryCommand(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 an alias for a directory and assigns the alias to the directory. The alias is used + * to construct the access URL for the directory, such as + * http://.awsapps.com.

+ * + *

After an alias has been created, it cannot be deleted or reused, so this operation should only be used when absolutely necessary.

+ *
+ * + * + */ + public createAlias( + args: CreateAliasCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createAlias( + args: CreateAliasCommandInput, + cb: (err: any, data?: CreateAliasCommandOutput) => void + ): void; + public createAlias( + args: CreateAliasCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateAliasCommandOutput) => void + ): void; + public createAlias( + args: CreateAliasCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: CreateAliasCommandOutput) => void), + cb?: (err: any, data?: CreateAliasCommandOutput) => void + ): Promise | void { + const command = new CreateAliasCommand(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 computer account in the specified directory, and joins the computer to the directory.

+ * + * + */ + public createComputer( + args: CreateComputerCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createComputer( + args: CreateComputerCommandInput, + cb: (err: any, data?: CreateComputerCommandOutput) => void + ): void; + public createComputer( + args: CreateComputerCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateComputerCommandOutput) => void + ): void; + public createComputer( + args: CreateComputerCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: CreateComputerCommandOutput) => void), + cb?: (err: any, data?: CreateComputerCommandOutput) => void + ): Promise | void { + const command = new CreateComputerCommand(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 conditional forwarder associated with your AWS directory. Conditional forwarders are required in order to set up a trust relationship with another domain. The conditional forwarder points to the trusted domain.

+ * + * + */ + public createConditionalForwarder( + args: CreateConditionalForwarderCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createConditionalForwarder( + args: CreateConditionalForwarderCommandInput, + cb: (err: any, data?: CreateConditionalForwarderCommandOutput) => void + ): void; + public createConditionalForwarder( + args: CreateConditionalForwarderCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateConditionalForwarderCommandOutput) => void + ): void; + public createConditionalForwarder( + args: CreateConditionalForwarderCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: CreateConditionalForwarderCommandOutput) => void), + cb?: (err: any, data?: CreateConditionalForwarderCommandOutput) => void + ): Promise | void { + const command = new CreateConditionalForwarderCommand(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 Simple AD directory. For more information, see Simple Active Directory in the AWS Directory Service Admin Guide.

+ *

Before you call CreateDirectory, ensure that all of the required permissions have been explicitly granted through a policy. For details about what permissions are required to run the CreateDirectory operation, see AWS Directory Service API Permissions: Actions, Resources, and Conditions Reference.

+ * + * + */ + public createDirectory( + args: CreateDirectoryCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createDirectory( + args: CreateDirectoryCommandInput, + cb: (err: any, data?: CreateDirectoryCommandOutput) => void + ): void; + public createDirectory( + args: CreateDirectoryCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateDirectoryCommandOutput) => void + ): void; + public createDirectory( + args: CreateDirectoryCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: CreateDirectoryCommandOutput) => void), + cb?: (err: any, data?: CreateDirectoryCommandOutput) => void + ): Promise | void { + const command = new CreateDirectoryCommand(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 subscription to forward real-time Directory Service domain controller + * security logs to the specified Amazon CloudWatch log group in your AWS account.

+ * + */ + public createLogSubscription( + args: CreateLogSubscriptionCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createLogSubscription( + args: CreateLogSubscriptionCommandInput, + cb: (err: any, data?: CreateLogSubscriptionCommandOutput) => void + ): void; + public createLogSubscription( + args: CreateLogSubscriptionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateLogSubscriptionCommandOutput) => void + ): void; + public createLogSubscription( + args: CreateLogSubscriptionCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: CreateLogSubscriptionCommandOutput) => void), + cb?: (err: any, data?: CreateLogSubscriptionCommandOutput) => void + ): Promise | void { + const command = new CreateLogSubscriptionCommand(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 Microsoft AD directory in the AWS Cloud. For more information, see AWS Managed Microsoft AD in the AWS Directory Service Admin Guide.

+ *

Before you call CreateMicrosoftAD, ensure that all of the required permissions have been explicitly granted through a policy. For details about what permissions are required to run the CreateMicrosoftAD operation, see AWS Directory Service API Permissions: Actions, Resources, and Conditions Reference.

+ * + * + */ + public createMicrosoftAD( + args: CreateMicrosoftADCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createMicrosoftAD( + args: CreateMicrosoftADCommandInput, + cb: (err: any, data?: CreateMicrosoftADCommandOutput) => void + ): void; + public createMicrosoftAD( + args: CreateMicrosoftADCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateMicrosoftADCommandOutput) => void + ): void; + public createMicrosoftAD( + args: CreateMicrosoftADCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: CreateMicrosoftADCommandOutput) => void), + cb?: (err: any, data?: CreateMicrosoftADCommandOutput) => void + ): Promise | void { + const command = new CreateMicrosoftADCommand(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 snapshot of a Simple AD or Microsoft AD directory in the AWS cloud.

+ * + *

You cannot take snapshots of AD Connector directories.

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

AWS Directory Service for Microsoft Active Directory allows you to configure trust relationships. For example, you can establish a trust between your AWS Managed Microsoft AD directory, and your existing on-premises Microsoft Active Directory. This would allow you to provide users and groups access to resources in either domain, with a single set of credentials.

+ *

This action initiates the creation of the AWS side of a trust relationship between an AWS Managed Microsoft AD directory and an external domain. You can create either a forest trust or an external trust.

+ * + * + */ + public createTrust( + args: CreateTrustCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createTrust( + args: CreateTrustCommandInput, + cb: (err: any, data?: CreateTrustCommandOutput) => void + ): void; + public createTrust( + args: CreateTrustCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateTrustCommandOutput) => void + ): void; + public createTrust( + args: CreateTrustCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: CreateTrustCommandOutput) => void), + cb?: (err: any, data?: CreateTrustCommandOutput) => void + ): Promise | void { + const command = new CreateTrustCommand(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 conditional forwarder that has been set up for your AWS directory.

+ * + * + */ + public deleteConditionalForwarder( + args: DeleteConditionalForwarderCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteConditionalForwarder( + args: DeleteConditionalForwarderCommandInput, + cb: (err: any, data?: DeleteConditionalForwarderCommandOutput) => void + ): void; + public deleteConditionalForwarder( + args: DeleteConditionalForwarderCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteConditionalForwarderCommandOutput) => void + ): void; + public deleteConditionalForwarder( + args: DeleteConditionalForwarderCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: DeleteConditionalForwarderCommandOutput) => void), + cb?: (err: any, data?: DeleteConditionalForwarderCommandOutput) => void + ): Promise | void { + const command = new DeleteConditionalForwarderCommand(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 AWS Directory Service directory.

+ *

Before you call DeleteDirectory, ensure that all of the required permissions have been explicitly granted through a policy. For details about what permissions are required to run the DeleteDirectory operation, see AWS Directory Service API Permissions: Actions, Resources, and Conditions Reference.

+ * + * + */ + public deleteDirectory( + args: DeleteDirectoryCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteDirectory( + args: DeleteDirectoryCommandInput, + cb: (err: any, data?: DeleteDirectoryCommandOutput) => void + ): void; + public deleteDirectory( + args: DeleteDirectoryCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteDirectoryCommandOutput) => void + ): void; + public deleteDirectory( + args: DeleteDirectoryCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: DeleteDirectoryCommandOutput) => void), + cb?: (err: any, data?: DeleteDirectoryCommandOutput) => void + ): Promise | void { + const command = new DeleteDirectoryCommand(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 log subscription.

+ * + */ + public deleteLogSubscription( + args: DeleteLogSubscriptionCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteLogSubscription( + args: DeleteLogSubscriptionCommandInput, + cb: (err: any, data?: DeleteLogSubscriptionCommandOutput) => void + ): void; + public deleteLogSubscription( + args: DeleteLogSubscriptionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteLogSubscriptionCommandOutput) => void + ): void; + public deleteLogSubscription( + args: DeleteLogSubscriptionCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: DeleteLogSubscriptionCommandOutput) => void), + cb?: (err: any, data?: DeleteLogSubscriptionCommandOutput) => void + ): Promise | void { + const command = new DeleteLogSubscriptionCommand(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 directory snapshot.

+ * + * + */ + public deleteSnapshot( + args: DeleteSnapshotCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteSnapshot( + args: DeleteSnapshotCommandInput, + cb: (err: any, data?: DeleteSnapshotCommandOutput) => void + ): void; + public deleteSnapshot( + args: DeleteSnapshotCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteSnapshotCommandOutput) => void + ): void; + public deleteSnapshot( + args: DeleteSnapshotCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: DeleteSnapshotCommandOutput) => void), + cb?: (err: any, data?: DeleteSnapshotCommandOutput) => void + ): Promise | void { + const command = new DeleteSnapshotCommand(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 trust relationship between your AWS Managed Microsoft AD directory and an external domain.

+ * + * + */ + public deleteTrust( + args: DeleteTrustCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteTrust( + args: DeleteTrustCommandInput, + cb: (err: any, data?: DeleteTrustCommandOutput) => void + ): void; + public deleteTrust( + args: DeleteTrustCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteTrustCommandOutput) => void + ): void; + public deleteTrust( + args: DeleteTrustCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: DeleteTrustCommandOutput) => void), + cb?: (err: any, data?: DeleteTrustCommandOutput) => void + ): Promise | void { + const command = new DeleteTrustCommand(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 from the system the certificate that was registered for a secured LDAP + * connection.

+ * + */ + public deregisterCertificate( + args: DeregisterCertificateCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deregisterCertificate( + args: DeregisterCertificateCommandInput, + cb: (err: any, data?: DeregisterCertificateCommandOutput) => void + ): void; + public deregisterCertificate( + args: DeregisterCertificateCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeregisterCertificateCommandOutput) => void + ): void; + public deregisterCertificate( + args: DeregisterCertificateCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: DeregisterCertificateCommandOutput) => void), + cb?: (err: any, data?: DeregisterCertificateCommandOutput) => void + ): Promise | void { + const command = new DeregisterCertificateCommand(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 the specified directory as a publisher to the specified SNS topic.

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

Displays information about the certificate registered for a secured LDAP connection.

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

Obtains information about the conditional forwarders for this account.

+ *

If no input parameters are provided for RemoteDomainNames, this request describes all conditional forwarders for the specified directory ID.

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

Obtains information about the directories that belong to this account.

+ *

You can retrieve information about specific directories by passing the directory + * identifiers in the DirectoryIds parameter. Otherwise, all directories that belong to + * the current account are returned.

+ *

This operation supports pagination with the use of the NextToken request and + * response parameters. If more results are available, the + * DescribeDirectoriesResult.NextToken member contains a token that you pass in the + * next call to DescribeDirectories to retrieve the next set of items.

+ *

You can also specify a maximum number of return results with the Limit + * parameter.

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

Provides information about any domain controllers in your directory.

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

Obtains information about which SNS topics receive status messages from the specified directory.

+ *

If no input parameters are provided, such as DirectoryId or TopicName, this request describes all of the associations in the account.

+ * + * + */ + public describeEventTopics( + args: DescribeEventTopicsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public describeEventTopics( + args: DescribeEventTopicsCommandInput, + cb: (err: any, data?: DescribeEventTopicsCommandOutput) => void + ): void; + public describeEventTopics( + args: DescribeEventTopicsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DescribeEventTopicsCommandOutput) => void + ): void; + public describeEventTopics( + args: DescribeEventTopicsCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: DescribeEventTopicsCommandOutput) => void), + cb?: (err: any, data?: DescribeEventTopicsCommandOutput) => void + ): Promise | void { + const command = new DescribeEventTopicsCommand(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 the status of LDAP security for the specified directory.

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

Returns the shared directories in your account.

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

Obtains information about the directory snapshots that belong to this account.

+ *

This operation supports pagination with the use of the NextToken request and + * response parameters. If more results are available, the DescribeSnapshots.NextToken + * member contains a token that you pass in the next call to DescribeSnapshots to + * retrieve the next set of items.

+ *

You can also specify a maximum number of return results with the Limit + * parameter.

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

Obtains information about the trust relationships for this account.

+ *

If no input parameters are provided, such as DirectoryId or TrustIds, this request describes all the trust relationships belonging to the account.

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

Deactivates LDAP secure calls for the specified directory.

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

Disables multi-factor authentication (MFA) with the Remote Authentication Dial In User Service (RADIUS) server for an AD Connector or Microsoft AD directory.

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

Disables single-sign on for a directory.

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

Activates the switch for the specific directory to always use LDAP secure calls.

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

Enables multi-factor authentication (MFA) with the Remote Authentication Dial In User Service (RADIUS) server for an AD Connector or Microsoft AD directory.

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

Enables single sign-on for a directory. Single sign-on allows users in your directory to access certain AWS services from a computer joined to the directory without having to enter their credentials separately.

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

Obtains directory limit information for the current Region.

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

Obtains the manual snapshot limits for a directory.

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

For the specified directory, lists all the certificates registered for a secured LDAP connection.

+ * + */ + public listCertificates( + args: ListCertificatesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listCertificates( + args: ListCertificatesCommandInput, + cb: (err: any, data?: ListCertificatesCommandOutput) => void + ): void; + public listCertificates( + args: ListCertificatesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListCertificatesCommandOutput) => void + ): void; + public listCertificates( + args: ListCertificatesCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: ListCertificatesCommandOutput) => void), + cb?: (err: any, data?: ListCertificatesCommandOutput) => void + ): Promise | void { + const command = new ListCertificatesCommand(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 address blocks that you have added to a directory.

+ * + * + */ + public listIpRoutes( + args: ListIpRoutesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listIpRoutes( + args: ListIpRoutesCommandInput, + cb: (err: any, data?: ListIpRoutesCommandOutput) => void + ): void; + public listIpRoutes( + args: ListIpRoutesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListIpRoutesCommandOutput) => void + ): void; + public listIpRoutes( + args: ListIpRoutesCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: ListIpRoutesCommandOutput) => void), + cb?: (err: any, data?: ListIpRoutesCommandOutput) => void + ): Promise | void { + const command = new ListIpRoutesCommand(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 active log subscriptions for the AWS account.

+ * + */ + public listLogSubscriptions( + args: ListLogSubscriptionsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listLogSubscriptions( + args: ListLogSubscriptionsCommandInput, + cb: (err: any, data?: ListLogSubscriptionsCommandOutput) => void + ): void; + public listLogSubscriptions( + args: ListLogSubscriptionsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListLogSubscriptionsCommandOutput) => void + ): void; + public listLogSubscriptions( + args: ListLogSubscriptionsCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: ListLogSubscriptionsCommandOutput) => void), + cb?: (err: any, data?: ListLogSubscriptionsCommandOutput) => void + ): Promise | void { + const command = new ListLogSubscriptionsCommand(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 all schema extensions applied to a Microsoft AD Directory.

+ * + * + */ + public listSchemaExtensions( + args: ListSchemaExtensionsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listSchemaExtensions( + args: ListSchemaExtensionsCommandInput, + cb: (err: any, data?: ListSchemaExtensionsCommandOutput) => void + ): void; + public listSchemaExtensions( + args: ListSchemaExtensionsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListSchemaExtensionsCommandOutput) => void + ): void; + public listSchemaExtensions( + args: ListSchemaExtensionsCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: ListSchemaExtensionsCommandOutput) => void), + cb?: (err: any, data?: ListSchemaExtensionsCommandOutput) => void + ): Promise | void { + const command = new ListSchemaExtensionsCommand(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 all tags on a directory.

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

Registers a certificate for secured LDAP connection.

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

Associates a directory with an SNS topic. This establishes the directory as a publisher to the specified SNS topic. You can then receive email or text (SMS) messages when the status of your directory changes. You get notified if your directory goes from an Active status to an Impaired or Inoperable status. You also receive a notification when the directory returns to an Active status.

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

Rejects a directory sharing request that was sent from the directory owner account.

+ * + */ + public rejectSharedDirectory( + args: RejectSharedDirectoryCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public rejectSharedDirectory( + args: RejectSharedDirectoryCommandInput, + cb: (err: any, data?: RejectSharedDirectoryCommandOutput) => void + ): void; + public rejectSharedDirectory( + args: RejectSharedDirectoryCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: RejectSharedDirectoryCommandOutput) => void + ): void; + public rejectSharedDirectory( + args: RejectSharedDirectoryCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: RejectSharedDirectoryCommandOutput) => void), + cb?: (err: any, data?: RejectSharedDirectoryCommandOutput) => void + ): Promise | void { + const command = new RejectSharedDirectoryCommand(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 IP address blocks from a directory.

+ * + * + */ + public removeIpRoutes( + args: RemoveIpRoutesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public removeIpRoutes( + args: RemoveIpRoutesCommandInput, + cb: (err: any, data?: RemoveIpRoutesCommandOutput) => void + ): void; + public removeIpRoutes( + args: RemoveIpRoutesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: RemoveIpRoutesCommandOutput) => void + ): void; + public removeIpRoutes( + args: RemoveIpRoutesCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: RemoveIpRoutesCommandOutput) => void), + cb?: (err: any, data?: RemoveIpRoutesCommandOutput) => void + ): Promise | void { + const command = new RemoveIpRoutesCommand(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 tags from a directory.

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

Resets the password for any user in your AWS Managed Microsoft AD or Simple AD directory.

+ *

You can reset the password for any user in your directory with the following exceptions:

+ *
    + *
  • + *

    For Simple AD, you cannot reset the password for any user that is a member of either the + * Domain Admins or Enterprise + * Admins group except for the administrator user.

    + *
  • + *
  • + *

    For AWS Managed Microsoft AD, you can only reset the password for a user that is in an OU + * based off of the NetBIOS name that you typed when you created your directory. For example, + * you cannot reset the password for a user in the AWS + * Reserved OU. For more information about the OU structure for an AWS Managed + * Microsoft AD directory, see What Gets Created in the AWS Directory Service Administration + * Guide.

    + *
  • + *
+ * + */ + public resetUserPassword( + args: ResetUserPasswordCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public resetUserPassword( + args: ResetUserPasswordCommandInput, + cb: (err: any, data?: ResetUserPasswordCommandOutput) => void + ): void; + public resetUserPassword( + args: ResetUserPasswordCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ResetUserPasswordCommandOutput) => void + ): void; + public resetUserPassword( + args: ResetUserPasswordCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: ResetUserPasswordCommandOutput) => void), + cb?: (err: any, data?: ResetUserPasswordCommandOutput) => void + ): Promise | void { + const command = new ResetUserPasswordCommand(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); + } + } + + /** + * + *

Restores a directory using an existing directory snapshot.

+ *

When you restore a directory from a snapshot, any changes made to the directory after the snapshot date are overwritten.

+ *

This action returns as soon as the restore operation is initiated. You can monitor the + * progress of the restore operation by calling the DescribeDirectories operation with + * the directory identifier. When the DirectoryDescription.Stage value changes to + * Active, the restore operation is complete.

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

Shares a specified directory (DirectoryId) in your AWS account (directory + * owner) with another AWS account (directory consumer). With this operation you can use your + * directory from any AWS account and from any Amazon VPC within an AWS Region.

+ *

When you share your AWS Managed Microsoft AD directory, AWS Directory Service creates a + * shared directory in the directory consumer account. This shared directory contains the + * metadata to provide access to the directory within the directory owner account. The shared + * directory is visible in all VPCs in the directory consumer account.

+ *

The ShareMethod parameter determines whether the specified directory can be + * shared between AWS accounts inside the same AWS organization (ORGANIZATIONS). It + * also determines whether you can share the directory with any other AWS account either inside + * or outside of the organization (HANDSHAKE).

+ *

The ShareNotes parameter is only used when HANDSHAKE is called, + * which sends a directory sharing request to the directory consumer.

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

Applies a schema extension to a Microsoft AD directory.

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

Stops the directory sharing between the directory owner and consumer accounts.

+ * + */ + public unshareDirectory( + args: UnshareDirectoryCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public unshareDirectory( + args: UnshareDirectoryCommandInput, + cb: (err: any, data?: UnshareDirectoryCommandOutput) => void + ): void; + public unshareDirectory( + args: UnshareDirectoryCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UnshareDirectoryCommandOutput) => void + ): void; + public unshareDirectory( + args: UnshareDirectoryCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: UnshareDirectoryCommandOutput) => void), + cb?: (err: any, data?: UnshareDirectoryCommandOutput) => void + ): Promise | void { + const command = new UnshareDirectoryCommand(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 conditional forwarder that has been set up for your AWS directory.

+ * + * + */ + public updateConditionalForwarder( + args: UpdateConditionalForwarderCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateConditionalForwarder( + args: UpdateConditionalForwarderCommandInput, + cb: (err: any, data?: UpdateConditionalForwarderCommandOutput) => void + ): void; + public updateConditionalForwarder( + args: UpdateConditionalForwarderCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateConditionalForwarderCommandOutput) => void + ): void; + public updateConditionalForwarder( + args: UpdateConditionalForwarderCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: UpdateConditionalForwarderCommandOutput) => void), + cb?: (err: any, data?: UpdateConditionalForwarderCommandOutput) => void + ): Promise | void { + const command = new UpdateConditionalForwarderCommand(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 removes domain controllers to or from the directory. Based on the difference between current value and new value (provided through this API call), domain controllers will be added or removed. It may take up to 45 minutes for any new domain controllers to become fully active once the requested number of domain controllers is updated. During this time, you cannot make another update request.

+ * + */ + public updateNumberOfDomainControllers( + args: UpdateNumberOfDomainControllersCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateNumberOfDomainControllers( + args: UpdateNumberOfDomainControllersCommandInput, + cb: (err: any, data?: UpdateNumberOfDomainControllersCommandOutput) => void + ): void; + public updateNumberOfDomainControllers( + args: UpdateNumberOfDomainControllersCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateNumberOfDomainControllersCommandOutput) => void + ): void; + public updateNumberOfDomainControllers( + args: UpdateNumberOfDomainControllersCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | (( + err: any, + data?: UpdateNumberOfDomainControllersCommandOutput + ) => void), + cb?: (err: any, data?: UpdateNumberOfDomainControllersCommandOutput) => void + ): Promise | void { + const command = new UpdateNumberOfDomainControllersCommand(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 the Remote Authentication Dial In User Service (RADIUS) server information for an AD Connector or Microsoft AD directory.

+ * + * + */ + public updateRadius( + args: UpdateRadiusCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateRadius( + args: UpdateRadiusCommandInput, + cb: (err: any, data?: UpdateRadiusCommandOutput) => void + ): void; + public updateRadius( + args: UpdateRadiusCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateRadiusCommandOutput) => void + ): void; + public updateRadius( + args: UpdateRadiusCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: UpdateRadiusCommandOutput) => void), + cb?: (err: any, data?: UpdateRadiusCommandOutput) => void + ): Promise | void { + const command = new UpdateRadiusCommand(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 the trust that has been set up between your AWS Managed Microsoft AD directory and an on-premises Active Directory.

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

AWS Directory Service for Microsoft Active Directory allows you to configure and verify trust relationships.

+ *

This action verifies a trust relationship between your AWS Managed Microsoft AD directory and an external domain.

+ * + * + */ + public verifyTrust( + args: VerifyTrustCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public verifyTrust( + args: VerifyTrustCommandInput, + cb: (err: any, data?: VerifyTrustCommandOutput) => void + ): void; + public verifyTrust( + args: VerifyTrustCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: VerifyTrustCommandOutput) => void + ): void; + public verifyTrust( + args: VerifyTrustCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: VerifyTrustCommandOutput) => void), + cb?: (err: any, data?: VerifyTrustCommandOutput) => void + ): Promise | void { + const command = new VerifyTrustCommand(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-directory-service/DirectoryServiceClient.ts b/clients/client-directory-service/DirectoryServiceClient.ts new file mode 100644 index 000000000000..71a2340a54b8 --- /dev/null +++ b/clients/client-directory-service/DirectoryServiceClient.ts @@ -0,0 +1,427 @@ +import { + AcceptSharedDirectoryRequest, + AcceptSharedDirectoryResult, + AddIpRoutesRequest, + AddIpRoutesResult, + AddTagsToResourceRequest, + AddTagsToResourceResult, + CancelSchemaExtensionRequest, + CancelSchemaExtensionResult, + ConnectDirectoryRequest, + ConnectDirectoryResult, + CreateAliasRequest, + CreateAliasResult, + CreateComputerRequest, + CreateComputerResult, + CreateConditionalForwarderRequest, + CreateConditionalForwarderResult, + CreateDirectoryRequest, + CreateDirectoryResult, + CreateLogSubscriptionRequest, + CreateLogSubscriptionResult, + CreateMicrosoftADRequest, + CreateMicrosoftADResult, + CreateSnapshotRequest, + CreateSnapshotResult, + CreateTrustRequest, + CreateTrustResult, + DeleteConditionalForwarderRequest, + DeleteConditionalForwarderResult, + DeleteDirectoryRequest, + DeleteDirectoryResult, + DeleteLogSubscriptionRequest, + DeleteLogSubscriptionResult, + DeleteSnapshotRequest, + DeleteSnapshotResult, + DeleteTrustRequest, + DeleteTrustResult, + DeregisterCertificateRequest, + DeregisterCertificateResult, + DeregisterEventTopicRequest, + DeregisterEventTopicResult, + DescribeCertificateRequest, + DescribeCertificateResult, + DescribeConditionalForwardersRequest, + DescribeConditionalForwardersResult, + DescribeDirectoriesRequest, + DescribeDirectoriesResult, + DescribeDomainControllersRequest, + DescribeDomainControllersResult, + DescribeEventTopicsRequest, + DescribeEventTopicsResult, + DescribeLDAPSSettingsRequest, + DescribeLDAPSSettingsResult, + DescribeSharedDirectoriesRequest, + DescribeSharedDirectoriesResult, + DescribeSnapshotsRequest, + DescribeSnapshotsResult, + DescribeTrustsRequest, + DescribeTrustsResult, + DisableLDAPSRequest, + DisableLDAPSResult, + DisableRadiusRequest, + DisableRadiusResult, + DisableSsoRequest, + DisableSsoResult, + EnableLDAPSRequest, + EnableLDAPSResult, + EnableRadiusRequest, + EnableRadiusResult, + EnableSsoRequest, + EnableSsoResult, + GetDirectoryLimitsRequest, + GetDirectoryLimitsResult, + GetSnapshotLimitsRequest, + GetSnapshotLimitsResult, + ListCertificatesRequest, + ListCertificatesResult, + ListIpRoutesRequest, + ListIpRoutesResult, + ListLogSubscriptionsRequest, + ListLogSubscriptionsResult, + ListSchemaExtensionsRequest, + ListSchemaExtensionsResult, + ListTagsForResourceRequest, + ListTagsForResourceResult, + RegisterCertificateRequest, + RegisterCertificateResult, + RegisterEventTopicRequest, + RegisterEventTopicResult, + RejectSharedDirectoryRequest, + RejectSharedDirectoryResult, + RemoveIpRoutesRequest, + RemoveIpRoutesResult, + RemoveTagsFromResourceRequest, + RemoveTagsFromResourceResult, + ResetUserPasswordRequest, + ResetUserPasswordResult, + RestoreFromSnapshotRequest, + RestoreFromSnapshotResult, + ShareDirectoryRequest, + ShareDirectoryResult, + StartSchemaExtensionRequest, + StartSchemaExtensionResult, + UnshareDirectoryRequest, + UnshareDirectoryResult, + UpdateConditionalForwarderRequest, + UpdateConditionalForwarderResult, + UpdateNumberOfDomainControllersRequest, + UpdateNumberOfDomainControllersResult, + UpdateRadiusRequest, + UpdateRadiusResult, + UpdateTrustRequest, + UpdateTrustResult, + VerifyTrustRequest, + VerifyTrustResult +} 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 { + 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, + Provider as __Provider, + StreamCollector as __StreamCollector, + UrlParser as __UrlParser +} from "@aws-sdk/types"; + +export type ServiceInputTypes = + | AcceptSharedDirectoryRequest + | AddIpRoutesRequest + | AddTagsToResourceRequest + | CancelSchemaExtensionRequest + | ConnectDirectoryRequest + | CreateAliasRequest + | CreateComputerRequest + | CreateConditionalForwarderRequest + | CreateDirectoryRequest + | CreateLogSubscriptionRequest + | CreateMicrosoftADRequest + | CreateSnapshotRequest + | CreateTrustRequest + | DeleteConditionalForwarderRequest + | DeleteDirectoryRequest + | DeleteLogSubscriptionRequest + | DeleteSnapshotRequest + | DeleteTrustRequest + | DeregisterCertificateRequest + | DeregisterEventTopicRequest + | DescribeCertificateRequest + | DescribeConditionalForwardersRequest + | DescribeDirectoriesRequest + | DescribeDomainControllersRequest + | DescribeEventTopicsRequest + | DescribeLDAPSSettingsRequest + | DescribeSharedDirectoriesRequest + | DescribeSnapshotsRequest + | DescribeTrustsRequest + | DisableLDAPSRequest + | DisableRadiusRequest + | DisableSsoRequest + | EnableLDAPSRequest + | EnableRadiusRequest + | EnableSsoRequest + | GetDirectoryLimitsRequest + | GetSnapshotLimitsRequest + | ListCertificatesRequest + | ListIpRoutesRequest + | ListLogSubscriptionsRequest + | ListSchemaExtensionsRequest + | ListTagsForResourceRequest + | RegisterCertificateRequest + | RegisterEventTopicRequest + | RejectSharedDirectoryRequest + | RemoveIpRoutesRequest + | RemoveTagsFromResourceRequest + | ResetUserPasswordRequest + | RestoreFromSnapshotRequest + | ShareDirectoryRequest + | StartSchemaExtensionRequest + | UnshareDirectoryRequest + | UpdateConditionalForwarderRequest + | UpdateNumberOfDomainControllersRequest + | UpdateRadiusRequest + | UpdateTrustRequest + | VerifyTrustRequest; + +export type ServiceOutputTypes = + | AcceptSharedDirectoryResult + | AddIpRoutesResult + | AddTagsToResourceResult + | CancelSchemaExtensionResult + | ConnectDirectoryResult + | CreateAliasResult + | CreateComputerResult + | CreateConditionalForwarderResult + | CreateDirectoryResult + | CreateLogSubscriptionResult + | CreateMicrosoftADResult + | CreateSnapshotResult + | CreateTrustResult + | DeleteConditionalForwarderResult + | DeleteDirectoryResult + | DeleteLogSubscriptionResult + | DeleteSnapshotResult + | DeleteTrustResult + | DeregisterCertificateResult + | DeregisterEventTopicResult + | DescribeCertificateResult + | DescribeConditionalForwardersResult + | DescribeDirectoriesResult + | DescribeDomainControllersResult + | DescribeEventTopicsResult + | DescribeLDAPSSettingsResult + | DescribeSharedDirectoriesResult + | DescribeSnapshotsResult + | DescribeTrustsResult + | DisableLDAPSResult + | DisableRadiusResult + | DisableSsoResult + | EnableLDAPSResult + | EnableRadiusResult + | EnableSsoResult + | GetDirectoryLimitsResult + | GetSnapshotLimitsResult + | ListCertificatesResult + | ListIpRoutesResult + | ListLogSubscriptionsResult + | ListSchemaExtensionsResult + | ListTagsForResourceResult + | RegisterCertificateResult + | RegisterEventTopicResult + | RejectSharedDirectoryResult + | RemoveIpRoutesResult + | RemoveTagsFromResourceResult + | ResetUserPasswordResult + | RestoreFromSnapshotResult + | ShareDirectoryResult + | StartSchemaExtensionResult + | UnshareDirectoryResult + | UpdateConditionalForwarderResult + | UpdateNumberOfDomainControllersResult + | UpdateRadiusResult + | UpdateTrustResult + | VerifyTrustResult; + +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 DirectoryServiceClientConfig = Partial< + __SmithyConfiguration<__HttpHandlerOptions> +> & + ClientDefaults & + RegionInputConfig & + EndpointsInputConfig & + AwsAuthInputConfig & + RetryInputConfig & + UserAgentInputConfig & + HostHeaderInputConfig; + +export type DirectoryServiceClientResolvedConfig = __SmithyResolvedConfiguration< + __HttpHandlerOptions +> & + Required & + RegionResolvedConfig & + EndpointsResolvedConfig & + AwsAuthResolvedConfig & + RetryResolvedConfig & + UserAgentResolvedConfig & + HostHeaderResolvedConfig; + +/** + * + * AWS Directory Service + *

AWS Directory Service is a web service that makes it easy for you to setup and run directories in the AWS cloud, or connect your AWS resources with an existing on-premises Microsoft Active Directory. This guide provides detailed information about AWS Directory Service operations, data types, parameters, and errors. For information about AWS Directory Services features, see AWS Directory Service and the AWS Directory Service Administration Guide.

+ * + *

AWS provides SDKs that consist of libraries and sample code for various programming languages and platforms (Java, Ruby, .Net, iOS, Android, etc.). The SDKs provide a convenient way to create programmatic access to AWS Directory Service and other AWS services. For more information about the AWS SDKs, including how to download and install them, see Tools for Amazon Web + * Services.

+ *
+ * + */ +export class DirectoryServiceClient extends __Client< + __HttpHandlerOptions, + ServiceInputTypes, + ServiceOutputTypes, + DirectoryServiceClientResolvedConfig +> { + readonly config: DirectoryServiceClientResolvedConfig; + + constructor(configuration: DirectoryServiceClientConfig) { + 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(getHostHeaderPlugin(this.config)); + } + + destroy(): void {} +} diff --git a/clients/client-directory-service/LICENSE b/clients/client-directory-service/LICENSE new file mode 100644 index 000000000000..b7d2463d8cc0 --- /dev/null +++ b/clients/client-directory-service/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-directory-service/README.md b/clients/client-directory-service/README.md new file mode 100644 index 000000000000..83e7ba464354 --- /dev/null +++ b/clients/client-directory-service/README.md @@ -0,0 +1,6 @@ +@aws-sdk/client-directory-service + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-directory-service/preview.svg)](https://www.npmjs.com/package/@aws-sdk/client-directory-service) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-directory-service.svg)](https://www.npmjs.com/package/@aws-sdk/client-directory-service) + +For SDK usage, please step to [SDK reademe](https://github.com/aws/aws-sdk-js-v3). diff --git a/clients/client-directory-service/commands/AcceptSharedDirectoryCommand.ts b/clients/client-directory-service/commands/AcceptSharedDirectoryCommand.ts new file mode 100644 index 000000000000..386a6caf891a --- /dev/null +++ b/clients/client-directory-service/commands/AcceptSharedDirectoryCommand.ts @@ -0,0 +1,87 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + AcceptSharedDirectoryRequest, + AcceptSharedDirectoryResult +} from "../models/index"; +import { + deserializeAws_json1_1AcceptSharedDirectoryCommand, + serializeAws_json1_1AcceptSharedDirectoryCommand +} from "../protocols/Aws_json1_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 AcceptSharedDirectoryCommandInput = AcceptSharedDirectoryRequest; +export type AcceptSharedDirectoryCommandOutput = AcceptSharedDirectoryResult; + +export class AcceptSharedDirectoryCommand extends $Command< + AcceptSharedDirectoryCommandInput, + AcceptSharedDirectoryCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: AcceptSharedDirectoryCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + AcceptSharedDirectoryCommandInput, + AcceptSharedDirectoryCommandOutput + > { + 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: AcceptSharedDirectoryCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1AcceptSharedDirectoryCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1AcceptSharedDirectoryCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/AddIpRoutesCommand.ts b/clients/client-directory-service/commands/AddIpRoutesCommand.ts new file mode 100644 index 000000000000..820c3618c29f --- /dev/null +++ b/clients/client-directory-service/commands/AddIpRoutesCommand.ts @@ -0,0 +1,81 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { AddIpRoutesRequest, AddIpRoutesResult } from "../models/index"; +import { + deserializeAws_json1_1AddIpRoutesCommand, + serializeAws_json1_1AddIpRoutesCommand +} from "../protocols/Aws_json1_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 AddIpRoutesCommandInput = AddIpRoutesRequest; +export type AddIpRoutesCommandOutput = AddIpRoutesResult; + +export class AddIpRoutesCommand extends $Command< + AddIpRoutesCommandInput, + AddIpRoutesCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: AddIpRoutesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + 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: AddIpRoutesCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1AddIpRoutesCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1AddIpRoutesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/AddTagsToResourceCommand.ts b/clients/client-directory-service/commands/AddTagsToResourceCommand.ts new file mode 100644 index 000000000000..7591153a3bcf --- /dev/null +++ b/clients/client-directory-service/commands/AddTagsToResourceCommand.ts @@ -0,0 +1,84 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + AddTagsToResourceRequest, + AddTagsToResourceResult +} from "../models/index"; +import { + deserializeAws_json1_1AddTagsToResourceCommand, + serializeAws_json1_1AddTagsToResourceCommand +} from "../protocols/Aws_json1_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 AddTagsToResourceCommandInput = AddTagsToResourceRequest; +export type AddTagsToResourceCommandOutput = AddTagsToResourceResult; + +export class AddTagsToResourceCommand extends $Command< + AddTagsToResourceCommandInput, + AddTagsToResourceCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: AddTagsToResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + 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: AddTagsToResourceCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1AddTagsToResourceCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1AddTagsToResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/CancelSchemaExtensionCommand.ts b/clients/client-directory-service/commands/CancelSchemaExtensionCommand.ts new file mode 100644 index 000000000000..a93603b76e55 --- /dev/null +++ b/clients/client-directory-service/commands/CancelSchemaExtensionCommand.ts @@ -0,0 +1,87 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + CancelSchemaExtensionRequest, + CancelSchemaExtensionResult +} from "../models/index"; +import { + deserializeAws_json1_1CancelSchemaExtensionCommand, + serializeAws_json1_1CancelSchemaExtensionCommand +} from "../protocols/Aws_json1_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 CancelSchemaExtensionCommandInput = CancelSchemaExtensionRequest; +export type CancelSchemaExtensionCommandOutput = CancelSchemaExtensionResult; + +export class CancelSchemaExtensionCommand extends $Command< + CancelSchemaExtensionCommandInput, + CancelSchemaExtensionCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CancelSchemaExtensionCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + CancelSchemaExtensionCommandInput, + CancelSchemaExtensionCommandOutput + > { + 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: CancelSchemaExtensionCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1CancelSchemaExtensionCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1CancelSchemaExtensionCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/ConnectDirectoryCommand.ts b/clients/client-directory-service/commands/ConnectDirectoryCommand.ts new file mode 100644 index 000000000000..515639fb820d --- /dev/null +++ b/clients/client-directory-service/commands/ConnectDirectoryCommand.ts @@ -0,0 +1,84 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + ConnectDirectoryRequest, + ConnectDirectoryResult +} from "../models/index"; +import { + deserializeAws_json1_1ConnectDirectoryCommand, + serializeAws_json1_1ConnectDirectoryCommand +} from "../protocols/Aws_json1_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 ConnectDirectoryCommandInput = ConnectDirectoryRequest; +export type ConnectDirectoryCommandOutput = ConnectDirectoryResult; + +export class ConnectDirectoryCommand extends $Command< + ConnectDirectoryCommandInput, + ConnectDirectoryCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ConnectDirectoryCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + 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: ConnectDirectoryCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1ConnectDirectoryCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1ConnectDirectoryCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/CreateAliasCommand.ts b/clients/client-directory-service/commands/CreateAliasCommand.ts new file mode 100644 index 000000000000..1ff1cef94578 --- /dev/null +++ b/clients/client-directory-service/commands/CreateAliasCommand.ts @@ -0,0 +1,81 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { CreateAliasRequest, CreateAliasResult } from "../models/index"; +import { + deserializeAws_json1_1CreateAliasCommand, + serializeAws_json1_1CreateAliasCommand +} from "../protocols/Aws_json1_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 CreateAliasCommandInput = CreateAliasRequest; +export type CreateAliasCommandOutput = CreateAliasResult; + +export class CreateAliasCommand extends $Command< + CreateAliasCommandInput, + CreateAliasCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateAliasCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + 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: CreateAliasCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1CreateAliasCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1CreateAliasCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/CreateComputerCommand.ts b/clients/client-directory-service/commands/CreateComputerCommand.ts new file mode 100644 index 000000000000..2c47096f440e --- /dev/null +++ b/clients/client-directory-service/commands/CreateComputerCommand.ts @@ -0,0 +1,81 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { CreateComputerRequest, CreateComputerResult } from "../models/index"; +import { + deserializeAws_json1_1CreateComputerCommand, + serializeAws_json1_1CreateComputerCommand +} from "../protocols/Aws_json1_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 CreateComputerCommandInput = CreateComputerRequest; +export type CreateComputerCommandOutput = CreateComputerResult; + +export class CreateComputerCommand extends $Command< + CreateComputerCommandInput, + CreateComputerCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateComputerCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + 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: CreateComputerCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1CreateComputerCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1CreateComputerCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/CreateConditionalForwarderCommand.ts b/clients/client-directory-service/commands/CreateConditionalForwarderCommand.ts new file mode 100644 index 000000000000..8c5e0578a940 --- /dev/null +++ b/clients/client-directory-service/commands/CreateConditionalForwarderCommand.ts @@ -0,0 +1,93 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + CreateConditionalForwarderRequest, + CreateConditionalForwarderResult +} from "../models/index"; +import { + deserializeAws_json1_1CreateConditionalForwarderCommand, + serializeAws_json1_1CreateConditionalForwarderCommand +} from "../protocols/Aws_json1_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 CreateConditionalForwarderCommandInput = CreateConditionalForwarderRequest; +export type CreateConditionalForwarderCommandOutput = CreateConditionalForwarderResult; + +export class CreateConditionalForwarderCommand extends $Command< + CreateConditionalForwarderCommandInput, + CreateConditionalForwarderCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateConditionalForwarderCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + CreateConditionalForwarderCommandInput, + CreateConditionalForwarderCommandOutput + > { + 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: CreateConditionalForwarderCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1CreateConditionalForwarderCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1CreateConditionalForwarderCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/CreateDirectoryCommand.ts b/clients/client-directory-service/commands/CreateDirectoryCommand.ts new file mode 100644 index 000000000000..98e34c989e0c --- /dev/null +++ b/clients/client-directory-service/commands/CreateDirectoryCommand.ts @@ -0,0 +1,81 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { CreateDirectoryRequest, CreateDirectoryResult } from "../models/index"; +import { + deserializeAws_json1_1CreateDirectoryCommand, + serializeAws_json1_1CreateDirectoryCommand +} from "../protocols/Aws_json1_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 CreateDirectoryCommandInput = CreateDirectoryRequest; +export type CreateDirectoryCommandOutput = CreateDirectoryResult; + +export class CreateDirectoryCommand extends $Command< + CreateDirectoryCommandInput, + CreateDirectoryCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateDirectoryCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + 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: CreateDirectoryCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1CreateDirectoryCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1CreateDirectoryCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/CreateLogSubscriptionCommand.ts b/clients/client-directory-service/commands/CreateLogSubscriptionCommand.ts new file mode 100644 index 000000000000..6c0bba9a40a8 --- /dev/null +++ b/clients/client-directory-service/commands/CreateLogSubscriptionCommand.ts @@ -0,0 +1,87 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + CreateLogSubscriptionRequest, + CreateLogSubscriptionResult +} from "../models/index"; +import { + deserializeAws_json1_1CreateLogSubscriptionCommand, + serializeAws_json1_1CreateLogSubscriptionCommand +} from "../protocols/Aws_json1_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 CreateLogSubscriptionCommandInput = CreateLogSubscriptionRequest; +export type CreateLogSubscriptionCommandOutput = CreateLogSubscriptionResult; + +export class CreateLogSubscriptionCommand extends $Command< + CreateLogSubscriptionCommandInput, + CreateLogSubscriptionCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateLogSubscriptionCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + CreateLogSubscriptionCommandInput, + CreateLogSubscriptionCommandOutput + > { + 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: CreateLogSubscriptionCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1CreateLogSubscriptionCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1CreateLogSubscriptionCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/CreateMicrosoftADCommand.ts b/clients/client-directory-service/commands/CreateMicrosoftADCommand.ts new file mode 100644 index 000000000000..3acaff43b36a --- /dev/null +++ b/clients/client-directory-service/commands/CreateMicrosoftADCommand.ts @@ -0,0 +1,84 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + CreateMicrosoftADRequest, + CreateMicrosoftADResult +} from "../models/index"; +import { + deserializeAws_json1_1CreateMicrosoftADCommand, + serializeAws_json1_1CreateMicrosoftADCommand +} from "../protocols/Aws_json1_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 CreateMicrosoftADCommandInput = CreateMicrosoftADRequest; +export type CreateMicrosoftADCommandOutput = CreateMicrosoftADResult; + +export class CreateMicrosoftADCommand extends $Command< + CreateMicrosoftADCommandInput, + CreateMicrosoftADCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateMicrosoftADCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + 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: CreateMicrosoftADCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1CreateMicrosoftADCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1CreateMicrosoftADCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/CreateSnapshotCommand.ts b/clients/client-directory-service/commands/CreateSnapshotCommand.ts new file mode 100644 index 000000000000..bc1121e191b3 --- /dev/null +++ b/clients/client-directory-service/commands/CreateSnapshotCommand.ts @@ -0,0 +1,81 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { CreateSnapshotRequest, CreateSnapshotResult } from "../models/index"; +import { + deserializeAws_json1_1CreateSnapshotCommand, + serializeAws_json1_1CreateSnapshotCommand +} from "../protocols/Aws_json1_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 CreateSnapshotCommandInput = CreateSnapshotRequest; +export type CreateSnapshotCommandOutput = CreateSnapshotResult; + +export class CreateSnapshotCommand extends $Command< + CreateSnapshotCommandInput, + CreateSnapshotCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateSnapshotCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + 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: CreateSnapshotCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1CreateSnapshotCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1CreateSnapshotCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/CreateTrustCommand.ts b/clients/client-directory-service/commands/CreateTrustCommand.ts new file mode 100644 index 000000000000..4a1fc4cf111b --- /dev/null +++ b/clients/client-directory-service/commands/CreateTrustCommand.ts @@ -0,0 +1,81 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { CreateTrustRequest, CreateTrustResult } from "../models/index"; +import { + deserializeAws_json1_1CreateTrustCommand, + serializeAws_json1_1CreateTrustCommand +} from "../protocols/Aws_json1_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 CreateTrustCommandInput = CreateTrustRequest; +export type CreateTrustCommandOutput = CreateTrustResult; + +export class CreateTrustCommand extends $Command< + CreateTrustCommandInput, + CreateTrustCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateTrustCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + 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: CreateTrustCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1CreateTrustCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1CreateTrustCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/DeleteConditionalForwarderCommand.ts b/clients/client-directory-service/commands/DeleteConditionalForwarderCommand.ts new file mode 100644 index 000000000000..176d478ff874 --- /dev/null +++ b/clients/client-directory-service/commands/DeleteConditionalForwarderCommand.ts @@ -0,0 +1,93 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + DeleteConditionalForwarderRequest, + DeleteConditionalForwarderResult +} from "../models/index"; +import { + deserializeAws_json1_1DeleteConditionalForwarderCommand, + serializeAws_json1_1DeleteConditionalForwarderCommand +} from "../protocols/Aws_json1_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 DeleteConditionalForwarderCommandInput = DeleteConditionalForwarderRequest; +export type DeleteConditionalForwarderCommandOutput = DeleteConditionalForwarderResult; + +export class DeleteConditionalForwarderCommand extends $Command< + DeleteConditionalForwarderCommandInput, + DeleteConditionalForwarderCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteConditionalForwarderCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + DeleteConditionalForwarderCommandInput, + DeleteConditionalForwarderCommandOutput + > { + 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: DeleteConditionalForwarderCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DeleteConditionalForwarderCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DeleteConditionalForwarderCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/DeleteDirectoryCommand.ts b/clients/client-directory-service/commands/DeleteDirectoryCommand.ts new file mode 100644 index 000000000000..eec23c7e59ce --- /dev/null +++ b/clients/client-directory-service/commands/DeleteDirectoryCommand.ts @@ -0,0 +1,81 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { DeleteDirectoryRequest, DeleteDirectoryResult } from "../models/index"; +import { + deserializeAws_json1_1DeleteDirectoryCommand, + serializeAws_json1_1DeleteDirectoryCommand +} from "../protocols/Aws_json1_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 DeleteDirectoryCommandInput = DeleteDirectoryRequest; +export type DeleteDirectoryCommandOutput = DeleteDirectoryResult; + +export class DeleteDirectoryCommand extends $Command< + DeleteDirectoryCommandInput, + DeleteDirectoryCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteDirectoryCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + 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: DeleteDirectoryCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DeleteDirectoryCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DeleteDirectoryCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/DeleteLogSubscriptionCommand.ts b/clients/client-directory-service/commands/DeleteLogSubscriptionCommand.ts new file mode 100644 index 000000000000..2b281ac6bfd3 --- /dev/null +++ b/clients/client-directory-service/commands/DeleteLogSubscriptionCommand.ts @@ -0,0 +1,87 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + DeleteLogSubscriptionRequest, + DeleteLogSubscriptionResult +} from "../models/index"; +import { + deserializeAws_json1_1DeleteLogSubscriptionCommand, + serializeAws_json1_1DeleteLogSubscriptionCommand +} from "../protocols/Aws_json1_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 DeleteLogSubscriptionCommandInput = DeleteLogSubscriptionRequest; +export type DeleteLogSubscriptionCommandOutput = DeleteLogSubscriptionResult; + +export class DeleteLogSubscriptionCommand extends $Command< + DeleteLogSubscriptionCommandInput, + DeleteLogSubscriptionCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteLogSubscriptionCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + DeleteLogSubscriptionCommandInput, + DeleteLogSubscriptionCommandOutput + > { + 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: DeleteLogSubscriptionCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DeleteLogSubscriptionCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DeleteLogSubscriptionCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/DeleteSnapshotCommand.ts b/clients/client-directory-service/commands/DeleteSnapshotCommand.ts new file mode 100644 index 000000000000..6434d9aa14c1 --- /dev/null +++ b/clients/client-directory-service/commands/DeleteSnapshotCommand.ts @@ -0,0 +1,81 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { DeleteSnapshotRequest, DeleteSnapshotResult } from "../models/index"; +import { + deserializeAws_json1_1DeleteSnapshotCommand, + serializeAws_json1_1DeleteSnapshotCommand +} from "../protocols/Aws_json1_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 DeleteSnapshotCommandInput = DeleteSnapshotRequest; +export type DeleteSnapshotCommandOutput = DeleteSnapshotResult; + +export class DeleteSnapshotCommand extends $Command< + DeleteSnapshotCommandInput, + DeleteSnapshotCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteSnapshotCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + 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: DeleteSnapshotCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DeleteSnapshotCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DeleteSnapshotCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/DeleteTrustCommand.ts b/clients/client-directory-service/commands/DeleteTrustCommand.ts new file mode 100644 index 000000000000..077ccf90ca76 --- /dev/null +++ b/clients/client-directory-service/commands/DeleteTrustCommand.ts @@ -0,0 +1,81 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { DeleteTrustRequest, DeleteTrustResult } from "../models/index"; +import { + deserializeAws_json1_1DeleteTrustCommand, + serializeAws_json1_1DeleteTrustCommand +} from "../protocols/Aws_json1_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 DeleteTrustCommandInput = DeleteTrustRequest; +export type DeleteTrustCommandOutput = DeleteTrustResult; + +export class DeleteTrustCommand extends $Command< + DeleteTrustCommandInput, + DeleteTrustCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteTrustCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + 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: DeleteTrustCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DeleteTrustCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DeleteTrustCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/DeregisterCertificateCommand.ts b/clients/client-directory-service/commands/DeregisterCertificateCommand.ts new file mode 100644 index 000000000000..4b04352e1358 --- /dev/null +++ b/clients/client-directory-service/commands/DeregisterCertificateCommand.ts @@ -0,0 +1,87 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + DeregisterCertificateRequest, + DeregisterCertificateResult +} from "../models/index"; +import { + deserializeAws_json1_1DeregisterCertificateCommand, + serializeAws_json1_1DeregisterCertificateCommand +} from "../protocols/Aws_json1_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 DeregisterCertificateCommandInput = DeregisterCertificateRequest; +export type DeregisterCertificateCommandOutput = DeregisterCertificateResult; + +export class DeregisterCertificateCommand extends $Command< + DeregisterCertificateCommandInput, + DeregisterCertificateCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeregisterCertificateCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + DeregisterCertificateCommandInput, + DeregisterCertificateCommandOutput + > { + 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: DeregisterCertificateCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DeregisterCertificateCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DeregisterCertificateCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/DeregisterEventTopicCommand.ts b/clients/client-directory-service/commands/DeregisterEventTopicCommand.ts new file mode 100644 index 000000000000..50f7122302ae --- /dev/null +++ b/clients/client-directory-service/commands/DeregisterEventTopicCommand.ts @@ -0,0 +1,87 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + DeregisterEventTopicRequest, + DeregisterEventTopicResult +} from "../models/index"; +import { + deserializeAws_json1_1DeregisterEventTopicCommand, + serializeAws_json1_1DeregisterEventTopicCommand +} from "../protocols/Aws_json1_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 DeregisterEventTopicCommandInput = DeregisterEventTopicRequest; +export type DeregisterEventTopicCommandOutput = DeregisterEventTopicResult; + +export class DeregisterEventTopicCommand extends $Command< + DeregisterEventTopicCommandInput, + DeregisterEventTopicCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeregisterEventTopicCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + DeregisterEventTopicCommandInput, + DeregisterEventTopicCommandOutput + > { + 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: DeregisterEventTopicCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DeregisterEventTopicCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DeregisterEventTopicCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/DescribeCertificateCommand.ts b/clients/client-directory-service/commands/DescribeCertificateCommand.ts new file mode 100644 index 000000000000..537ee81ccebd --- /dev/null +++ b/clients/client-directory-service/commands/DescribeCertificateCommand.ts @@ -0,0 +1,87 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + DescribeCertificateRequest, + DescribeCertificateResult +} from "../models/index"; +import { + deserializeAws_json1_1DescribeCertificateCommand, + serializeAws_json1_1DescribeCertificateCommand +} from "../protocols/Aws_json1_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 DescribeCertificateCommandInput = DescribeCertificateRequest; +export type DescribeCertificateCommandOutput = DescribeCertificateResult; + +export class DescribeCertificateCommand extends $Command< + DescribeCertificateCommandInput, + DescribeCertificateCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DescribeCertificateCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + DescribeCertificateCommandInput, + DescribeCertificateCommandOutput + > { + 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: DescribeCertificateCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DescribeCertificateCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DescribeCertificateCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/DescribeConditionalForwardersCommand.ts b/clients/client-directory-service/commands/DescribeConditionalForwardersCommand.ts new file mode 100644 index 000000000000..74841b6fa2c9 --- /dev/null +++ b/clients/client-directory-service/commands/DescribeConditionalForwardersCommand.ts @@ -0,0 +1,93 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + DescribeConditionalForwardersRequest, + DescribeConditionalForwardersResult +} from "../models/index"; +import { + deserializeAws_json1_1DescribeConditionalForwardersCommand, + serializeAws_json1_1DescribeConditionalForwardersCommand +} from "../protocols/Aws_json1_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 DescribeConditionalForwardersCommandInput = DescribeConditionalForwardersRequest; +export type DescribeConditionalForwardersCommandOutput = DescribeConditionalForwardersResult; + +export class DescribeConditionalForwardersCommand extends $Command< + DescribeConditionalForwardersCommandInput, + DescribeConditionalForwardersCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DescribeConditionalForwardersCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + DescribeConditionalForwardersCommandInput, + DescribeConditionalForwardersCommandOutput + > { + 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: DescribeConditionalForwardersCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DescribeConditionalForwardersCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DescribeConditionalForwardersCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/DescribeDirectoriesCommand.ts b/clients/client-directory-service/commands/DescribeDirectoriesCommand.ts new file mode 100644 index 000000000000..d27d78565b8b --- /dev/null +++ b/clients/client-directory-service/commands/DescribeDirectoriesCommand.ts @@ -0,0 +1,87 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + DescribeDirectoriesRequest, + DescribeDirectoriesResult +} from "../models/index"; +import { + deserializeAws_json1_1DescribeDirectoriesCommand, + serializeAws_json1_1DescribeDirectoriesCommand +} from "../protocols/Aws_json1_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 DescribeDirectoriesCommandInput = DescribeDirectoriesRequest; +export type DescribeDirectoriesCommandOutput = DescribeDirectoriesResult; + +export class DescribeDirectoriesCommand extends $Command< + DescribeDirectoriesCommandInput, + DescribeDirectoriesCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DescribeDirectoriesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + DescribeDirectoriesCommandInput, + DescribeDirectoriesCommandOutput + > { + 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: DescribeDirectoriesCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DescribeDirectoriesCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DescribeDirectoriesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/DescribeDomainControllersCommand.ts b/clients/client-directory-service/commands/DescribeDomainControllersCommand.ts new file mode 100644 index 000000000000..49a5b4c4c463 --- /dev/null +++ b/clients/client-directory-service/commands/DescribeDomainControllersCommand.ts @@ -0,0 +1,90 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + DescribeDomainControllersRequest, + DescribeDomainControllersResult +} from "../models/index"; +import { + deserializeAws_json1_1DescribeDomainControllersCommand, + serializeAws_json1_1DescribeDomainControllersCommand +} from "../protocols/Aws_json1_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 DescribeDomainControllersCommandInput = DescribeDomainControllersRequest; +export type DescribeDomainControllersCommandOutput = DescribeDomainControllersResult; + +export class DescribeDomainControllersCommand extends $Command< + DescribeDomainControllersCommandInput, + DescribeDomainControllersCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DescribeDomainControllersCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + DescribeDomainControllersCommandInput, + DescribeDomainControllersCommandOutput + > { + 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: DescribeDomainControllersCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DescribeDomainControllersCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DescribeDomainControllersCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/DescribeEventTopicsCommand.ts b/clients/client-directory-service/commands/DescribeEventTopicsCommand.ts new file mode 100644 index 000000000000..3150e91e9c8d --- /dev/null +++ b/clients/client-directory-service/commands/DescribeEventTopicsCommand.ts @@ -0,0 +1,87 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + DescribeEventTopicsRequest, + DescribeEventTopicsResult +} from "../models/index"; +import { + deserializeAws_json1_1DescribeEventTopicsCommand, + serializeAws_json1_1DescribeEventTopicsCommand +} from "../protocols/Aws_json1_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 DescribeEventTopicsCommandInput = DescribeEventTopicsRequest; +export type DescribeEventTopicsCommandOutput = DescribeEventTopicsResult; + +export class DescribeEventTopicsCommand extends $Command< + DescribeEventTopicsCommandInput, + DescribeEventTopicsCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DescribeEventTopicsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + DescribeEventTopicsCommandInput, + DescribeEventTopicsCommandOutput + > { + 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: DescribeEventTopicsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DescribeEventTopicsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DescribeEventTopicsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/DescribeLDAPSSettingsCommand.ts b/clients/client-directory-service/commands/DescribeLDAPSSettingsCommand.ts new file mode 100644 index 000000000000..9f333bf29e37 --- /dev/null +++ b/clients/client-directory-service/commands/DescribeLDAPSSettingsCommand.ts @@ -0,0 +1,87 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + DescribeLDAPSSettingsRequest, + DescribeLDAPSSettingsResult +} from "../models/index"; +import { + deserializeAws_json1_1DescribeLDAPSSettingsCommand, + serializeAws_json1_1DescribeLDAPSSettingsCommand +} from "../protocols/Aws_json1_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 DescribeLDAPSSettingsCommandInput = DescribeLDAPSSettingsRequest; +export type DescribeLDAPSSettingsCommandOutput = DescribeLDAPSSettingsResult; + +export class DescribeLDAPSSettingsCommand extends $Command< + DescribeLDAPSSettingsCommandInput, + DescribeLDAPSSettingsCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DescribeLDAPSSettingsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + DescribeLDAPSSettingsCommandInput, + DescribeLDAPSSettingsCommandOutput + > { + 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: DescribeLDAPSSettingsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DescribeLDAPSSettingsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DescribeLDAPSSettingsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/DescribeSharedDirectoriesCommand.ts b/clients/client-directory-service/commands/DescribeSharedDirectoriesCommand.ts new file mode 100644 index 000000000000..6b157203fdf0 --- /dev/null +++ b/clients/client-directory-service/commands/DescribeSharedDirectoriesCommand.ts @@ -0,0 +1,90 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + DescribeSharedDirectoriesRequest, + DescribeSharedDirectoriesResult +} from "../models/index"; +import { + deserializeAws_json1_1DescribeSharedDirectoriesCommand, + serializeAws_json1_1DescribeSharedDirectoriesCommand +} from "../protocols/Aws_json1_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 DescribeSharedDirectoriesCommandInput = DescribeSharedDirectoriesRequest; +export type DescribeSharedDirectoriesCommandOutput = DescribeSharedDirectoriesResult; + +export class DescribeSharedDirectoriesCommand extends $Command< + DescribeSharedDirectoriesCommandInput, + DescribeSharedDirectoriesCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DescribeSharedDirectoriesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + DescribeSharedDirectoriesCommandInput, + DescribeSharedDirectoriesCommandOutput + > { + 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: DescribeSharedDirectoriesCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DescribeSharedDirectoriesCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DescribeSharedDirectoriesCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/DescribeSnapshotsCommand.ts b/clients/client-directory-service/commands/DescribeSnapshotsCommand.ts new file mode 100644 index 000000000000..515433a2b860 --- /dev/null +++ b/clients/client-directory-service/commands/DescribeSnapshotsCommand.ts @@ -0,0 +1,84 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + DescribeSnapshotsRequest, + DescribeSnapshotsResult +} from "../models/index"; +import { + deserializeAws_json1_1DescribeSnapshotsCommand, + serializeAws_json1_1DescribeSnapshotsCommand +} from "../protocols/Aws_json1_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 DescribeSnapshotsCommandInput = DescribeSnapshotsRequest; +export type DescribeSnapshotsCommandOutput = DescribeSnapshotsResult; + +export class DescribeSnapshotsCommand extends $Command< + DescribeSnapshotsCommandInput, + DescribeSnapshotsCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DescribeSnapshotsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + 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: DescribeSnapshotsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DescribeSnapshotsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DescribeSnapshotsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/DescribeTrustsCommand.ts b/clients/client-directory-service/commands/DescribeTrustsCommand.ts new file mode 100644 index 000000000000..ca4870b5276c --- /dev/null +++ b/clients/client-directory-service/commands/DescribeTrustsCommand.ts @@ -0,0 +1,81 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { DescribeTrustsRequest, DescribeTrustsResult } from "../models/index"; +import { + deserializeAws_json1_1DescribeTrustsCommand, + serializeAws_json1_1DescribeTrustsCommand +} from "../protocols/Aws_json1_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 DescribeTrustsCommandInput = DescribeTrustsRequest; +export type DescribeTrustsCommandOutput = DescribeTrustsResult; + +export class DescribeTrustsCommand extends $Command< + DescribeTrustsCommandInput, + DescribeTrustsCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DescribeTrustsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + 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: DescribeTrustsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DescribeTrustsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DescribeTrustsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/DisableLDAPSCommand.ts b/clients/client-directory-service/commands/DisableLDAPSCommand.ts new file mode 100644 index 000000000000..c7275058c769 --- /dev/null +++ b/clients/client-directory-service/commands/DisableLDAPSCommand.ts @@ -0,0 +1,81 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { DisableLDAPSRequest, DisableLDAPSResult } from "../models/index"; +import { + deserializeAws_json1_1DisableLDAPSCommand, + serializeAws_json1_1DisableLDAPSCommand +} from "../protocols/Aws_json1_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 DisableLDAPSCommandInput = DisableLDAPSRequest; +export type DisableLDAPSCommandOutput = DisableLDAPSResult; + +export class DisableLDAPSCommand extends $Command< + DisableLDAPSCommandInput, + DisableLDAPSCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DisableLDAPSCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + 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: DisableLDAPSCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DisableLDAPSCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DisableLDAPSCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/DisableRadiusCommand.ts b/clients/client-directory-service/commands/DisableRadiusCommand.ts new file mode 100644 index 000000000000..1de61fe5c79f --- /dev/null +++ b/clients/client-directory-service/commands/DisableRadiusCommand.ts @@ -0,0 +1,81 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { DisableRadiusRequest, DisableRadiusResult } from "../models/index"; +import { + deserializeAws_json1_1DisableRadiusCommand, + serializeAws_json1_1DisableRadiusCommand +} from "../protocols/Aws_json1_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 DisableRadiusCommandInput = DisableRadiusRequest; +export type DisableRadiusCommandOutput = DisableRadiusResult; + +export class DisableRadiusCommand extends $Command< + DisableRadiusCommandInput, + DisableRadiusCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DisableRadiusCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + 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: DisableRadiusCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DisableRadiusCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DisableRadiusCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/DisableSsoCommand.ts b/clients/client-directory-service/commands/DisableSsoCommand.ts new file mode 100644 index 000000000000..1c881f59322c --- /dev/null +++ b/clients/client-directory-service/commands/DisableSsoCommand.ts @@ -0,0 +1,81 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { DisableSsoRequest, DisableSsoResult } from "../models/index"; +import { + deserializeAws_json1_1DisableSsoCommand, + serializeAws_json1_1DisableSsoCommand +} from "../protocols/Aws_json1_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 DisableSsoCommandInput = DisableSsoRequest; +export type DisableSsoCommandOutput = DisableSsoResult; + +export class DisableSsoCommand extends $Command< + DisableSsoCommandInput, + DisableSsoCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DisableSsoCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + 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: DisableSsoCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DisableSsoCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DisableSsoCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/EnableLDAPSCommand.ts b/clients/client-directory-service/commands/EnableLDAPSCommand.ts new file mode 100644 index 000000000000..ced2f80b569a --- /dev/null +++ b/clients/client-directory-service/commands/EnableLDAPSCommand.ts @@ -0,0 +1,81 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { EnableLDAPSRequest, EnableLDAPSResult } from "../models/index"; +import { + deserializeAws_json1_1EnableLDAPSCommand, + serializeAws_json1_1EnableLDAPSCommand +} from "../protocols/Aws_json1_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 EnableLDAPSCommandInput = EnableLDAPSRequest; +export type EnableLDAPSCommandOutput = EnableLDAPSResult; + +export class EnableLDAPSCommand extends $Command< + EnableLDAPSCommandInput, + EnableLDAPSCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: EnableLDAPSCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + 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: EnableLDAPSCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1EnableLDAPSCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1EnableLDAPSCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/EnableRadiusCommand.ts b/clients/client-directory-service/commands/EnableRadiusCommand.ts new file mode 100644 index 000000000000..2078831e4a7f --- /dev/null +++ b/clients/client-directory-service/commands/EnableRadiusCommand.ts @@ -0,0 +1,81 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { EnableRadiusRequest, EnableRadiusResult } from "../models/index"; +import { + deserializeAws_json1_1EnableRadiusCommand, + serializeAws_json1_1EnableRadiusCommand +} from "../protocols/Aws_json1_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 EnableRadiusCommandInput = EnableRadiusRequest; +export type EnableRadiusCommandOutput = EnableRadiusResult; + +export class EnableRadiusCommand extends $Command< + EnableRadiusCommandInput, + EnableRadiusCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: EnableRadiusCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + 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: EnableRadiusCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1EnableRadiusCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1EnableRadiusCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/EnableSsoCommand.ts b/clients/client-directory-service/commands/EnableSsoCommand.ts new file mode 100644 index 000000000000..919f205e27bc --- /dev/null +++ b/clients/client-directory-service/commands/EnableSsoCommand.ts @@ -0,0 +1,81 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { EnableSsoRequest, EnableSsoResult } from "../models/index"; +import { + deserializeAws_json1_1EnableSsoCommand, + serializeAws_json1_1EnableSsoCommand +} from "../protocols/Aws_json1_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 EnableSsoCommandInput = EnableSsoRequest; +export type EnableSsoCommandOutput = EnableSsoResult; + +export class EnableSsoCommand extends $Command< + EnableSsoCommandInput, + EnableSsoCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: EnableSsoCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + 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: EnableSsoCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1EnableSsoCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1EnableSsoCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/GetDirectoryLimitsCommand.ts b/clients/client-directory-service/commands/GetDirectoryLimitsCommand.ts new file mode 100644 index 000000000000..1fa0edff5a66 --- /dev/null +++ b/clients/client-directory-service/commands/GetDirectoryLimitsCommand.ts @@ -0,0 +1,84 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + GetDirectoryLimitsRequest, + GetDirectoryLimitsResult +} from "../models/index"; +import { + deserializeAws_json1_1GetDirectoryLimitsCommand, + serializeAws_json1_1GetDirectoryLimitsCommand +} from "../protocols/Aws_json1_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 GetDirectoryLimitsCommandInput = GetDirectoryLimitsRequest; +export type GetDirectoryLimitsCommandOutput = GetDirectoryLimitsResult; + +export class GetDirectoryLimitsCommand extends $Command< + GetDirectoryLimitsCommandInput, + GetDirectoryLimitsCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetDirectoryLimitsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + 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: GetDirectoryLimitsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1GetDirectoryLimitsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1GetDirectoryLimitsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/GetSnapshotLimitsCommand.ts b/clients/client-directory-service/commands/GetSnapshotLimitsCommand.ts new file mode 100644 index 000000000000..762ed03b7b0e --- /dev/null +++ b/clients/client-directory-service/commands/GetSnapshotLimitsCommand.ts @@ -0,0 +1,84 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + GetSnapshotLimitsRequest, + GetSnapshotLimitsResult +} from "../models/index"; +import { + deserializeAws_json1_1GetSnapshotLimitsCommand, + serializeAws_json1_1GetSnapshotLimitsCommand +} from "../protocols/Aws_json1_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 GetSnapshotLimitsCommandInput = GetSnapshotLimitsRequest; +export type GetSnapshotLimitsCommandOutput = GetSnapshotLimitsResult; + +export class GetSnapshotLimitsCommand extends $Command< + GetSnapshotLimitsCommandInput, + GetSnapshotLimitsCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetSnapshotLimitsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + 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: GetSnapshotLimitsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1GetSnapshotLimitsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1GetSnapshotLimitsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/ListCertificatesCommand.ts b/clients/client-directory-service/commands/ListCertificatesCommand.ts new file mode 100644 index 000000000000..5ba87c3717dc --- /dev/null +++ b/clients/client-directory-service/commands/ListCertificatesCommand.ts @@ -0,0 +1,84 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + ListCertificatesRequest, + ListCertificatesResult +} from "../models/index"; +import { + deserializeAws_json1_1ListCertificatesCommand, + serializeAws_json1_1ListCertificatesCommand +} from "../protocols/Aws_json1_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 ListCertificatesCommandInput = ListCertificatesRequest; +export type ListCertificatesCommandOutput = ListCertificatesResult; + +export class ListCertificatesCommand extends $Command< + ListCertificatesCommandInput, + ListCertificatesCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListCertificatesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + 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: ListCertificatesCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1ListCertificatesCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1ListCertificatesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/ListIpRoutesCommand.ts b/clients/client-directory-service/commands/ListIpRoutesCommand.ts new file mode 100644 index 000000000000..2d6c00b8e93d --- /dev/null +++ b/clients/client-directory-service/commands/ListIpRoutesCommand.ts @@ -0,0 +1,81 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { ListIpRoutesRequest, ListIpRoutesResult } from "../models/index"; +import { + deserializeAws_json1_1ListIpRoutesCommand, + serializeAws_json1_1ListIpRoutesCommand +} from "../protocols/Aws_json1_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 ListIpRoutesCommandInput = ListIpRoutesRequest; +export type ListIpRoutesCommandOutput = ListIpRoutesResult; + +export class ListIpRoutesCommand extends $Command< + ListIpRoutesCommandInput, + ListIpRoutesCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListIpRoutesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + 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: ListIpRoutesCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1ListIpRoutesCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1ListIpRoutesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/ListLogSubscriptionsCommand.ts b/clients/client-directory-service/commands/ListLogSubscriptionsCommand.ts new file mode 100644 index 000000000000..192f1a400700 --- /dev/null +++ b/clients/client-directory-service/commands/ListLogSubscriptionsCommand.ts @@ -0,0 +1,87 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + ListLogSubscriptionsRequest, + ListLogSubscriptionsResult +} from "../models/index"; +import { + deserializeAws_json1_1ListLogSubscriptionsCommand, + serializeAws_json1_1ListLogSubscriptionsCommand +} from "../protocols/Aws_json1_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 ListLogSubscriptionsCommandInput = ListLogSubscriptionsRequest; +export type ListLogSubscriptionsCommandOutput = ListLogSubscriptionsResult; + +export class ListLogSubscriptionsCommand extends $Command< + ListLogSubscriptionsCommandInput, + ListLogSubscriptionsCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListLogSubscriptionsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + ListLogSubscriptionsCommandInput, + ListLogSubscriptionsCommandOutput + > { + 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: ListLogSubscriptionsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1ListLogSubscriptionsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1ListLogSubscriptionsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/ListSchemaExtensionsCommand.ts b/clients/client-directory-service/commands/ListSchemaExtensionsCommand.ts new file mode 100644 index 000000000000..64abc51c8cc8 --- /dev/null +++ b/clients/client-directory-service/commands/ListSchemaExtensionsCommand.ts @@ -0,0 +1,87 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + ListSchemaExtensionsRequest, + ListSchemaExtensionsResult +} from "../models/index"; +import { + deserializeAws_json1_1ListSchemaExtensionsCommand, + serializeAws_json1_1ListSchemaExtensionsCommand +} from "../protocols/Aws_json1_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 ListSchemaExtensionsCommandInput = ListSchemaExtensionsRequest; +export type ListSchemaExtensionsCommandOutput = ListSchemaExtensionsResult; + +export class ListSchemaExtensionsCommand extends $Command< + ListSchemaExtensionsCommandInput, + ListSchemaExtensionsCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListSchemaExtensionsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + ListSchemaExtensionsCommandInput, + ListSchemaExtensionsCommandOutput + > { + 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: ListSchemaExtensionsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1ListSchemaExtensionsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1ListSchemaExtensionsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/ListTagsForResourceCommand.ts b/clients/client-directory-service/commands/ListTagsForResourceCommand.ts new file mode 100644 index 000000000000..78a765ed4524 --- /dev/null +++ b/clients/client-directory-service/commands/ListTagsForResourceCommand.ts @@ -0,0 +1,87 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + ListTagsForResourceRequest, + ListTagsForResourceResult +} from "../models/index"; +import { + deserializeAws_json1_1ListTagsForResourceCommand, + serializeAws_json1_1ListTagsForResourceCommand +} from "../protocols/Aws_json1_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 ListTagsForResourceCommandInput = ListTagsForResourceRequest; +export type ListTagsForResourceCommandOutput = ListTagsForResourceResult; + +export class ListTagsForResourceCommand extends $Command< + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListTagsForResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput + > { + 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: ListTagsForResourceCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1ListTagsForResourceCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1ListTagsForResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/RegisterCertificateCommand.ts b/clients/client-directory-service/commands/RegisterCertificateCommand.ts new file mode 100644 index 000000000000..af28e2100c76 --- /dev/null +++ b/clients/client-directory-service/commands/RegisterCertificateCommand.ts @@ -0,0 +1,87 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + RegisterCertificateRequest, + RegisterCertificateResult +} from "../models/index"; +import { + deserializeAws_json1_1RegisterCertificateCommand, + serializeAws_json1_1RegisterCertificateCommand +} from "../protocols/Aws_json1_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 RegisterCertificateCommandInput = RegisterCertificateRequest; +export type RegisterCertificateCommandOutput = RegisterCertificateResult; + +export class RegisterCertificateCommand extends $Command< + RegisterCertificateCommandInput, + RegisterCertificateCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: RegisterCertificateCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + RegisterCertificateCommandInput, + RegisterCertificateCommandOutput + > { + 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: RegisterCertificateCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1RegisterCertificateCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1RegisterCertificateCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/RegisterEventTopicCommand.ts b/clients/client-directory-service/commands/RegisterEventTopicCommand.ts new file mode 100644 index 000000000000..b9cbbe5662fd --- /dev/null +++ b/clients/client-directory-service/commands/RegisterEventTopicCommand.ts @@ -0,0 +1,84 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + RegisterEventTopicRequest, + RegisterEventTopicResult +} from "../models/index"; +import { + deserializeAws_json1_1RegisterEventTopicCommand, + serializeAws_json1_1RegisterEventTopicCommand +} from "../protocols/Aws_json1_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 RegisterEventTopicCommandInput = RegisterEventTopicRequest; +export type RegisterEventTopicCommandOutput = RegisterEventTopicResult; + +export class RegisterEventTopicCommand extends $Command< + RegisterEventTopicCommandInput, + RegisterEventTopicCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: RegisterEventTopicCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + 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: RegisterEventTopicCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1RegisterEventTopicCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1RegisterEventTopicCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/RejectSharedDirectoryCommand.ts b/clients/client-directory-service/commands/RejectSharedDirectoryCommand.ts new file mode 100644 index 000000000000..c8716c6ee469 --- /dev/null +++ b/clients/client-directory-service/commands/RejectSharedDirectoryCommand.ts @@ -0,0 +1,87 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + RejectSharedDirectoryRequest, + RejectSharedDirectoryResult +} from "../models/index"; +import { + deserializeAws_json1_1RejectSharedDirectoryCommand, + serializeAws_json1_1RejectSharedDirectoryCommand +} from "../protocols/Aws_json1_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 RejectSharedDirectoryCommandInput = RejectSharedDirectoryRequest; +export type RejectSharedDirectoryCommandOutput = RejectSharedDirectoryResult; + +export class RejectSharedDirectoryCommand extends $Command< + RejectSharedDirectoryCommandInput, + RejectSharedDirectoryCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: RejectSharedDirectoryCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + RejectSharedDirectoryCommandInput, + RejectSharedDirectoryCommandOutput + > { + 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: RejectSharedDirectoryCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1RejectSharedDirectoryCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1RejectSharedDirectoryCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/RemoveIpRoutesCommand.ts b/clients/client-directory-service/commands/RemoveIpRoutesCommand.ts new file mode 100644 index 000000000000..a32093a6b9c7 --- /dev/null +++ b/clients/client-directory-service/commands/RemoveIpRoutesCommand.ts @@ -0,0 +1,81 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { RemoveIpRoutesRequest, RemoveIpRoutesResult } from "../models/index"; +import { + deserializeAws_json1_1RemoveIpRoutesCommand, + serializeAws_json1_1RemoveIpRoutesCommand +} from "../protocols/Aws_json1_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 RemoveIpRoutesCommandInput = RemoveIpRoutesRequest; +export type RemoveIpRoutesCommandOutput = RemoveIpRoutesResult; + +export class RemoveIpRoutesCommand extends $Command< + RemoveIpRoutesCommandInput, + RemoveIpRoutesCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: RemoveIpRoutesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + 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: RemoveIpRoutesCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1RemoveIpRoutesCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1RemoveIpRoutesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/RemoveTagsFromResourceCommand.ts b/clients/client-directory-service/commands/RemoveTagsFromResourceCommand.ts new file mode 100644 index 000000000000..fb93a77410fc --- /dev/null +++ b/clients/client-directory-service/commands/RemoveTagsFromResourceCommand.ts @@ -0,0 +1,87 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + RemoveTagsFromResourceRequest, + RemoveTagsFromResourceResult +} from "../models/index"; +import { + deserializeAws_json1_1RemoveTagsFromResourceCommand, + serializeAws_json1_1RemoveTagsFromResourceCommand +} from "../protocols/Aws_json1_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 RemoveTagsFromResourceCommandInput = RemoveTagsFromResourceRequest; +export type RemoveTagsFromResourceCommandOutput = RemoveTagsFromResourceResult; + +export class RemoveTagsFromResourceCommand extends $Command< + RemoveTagsFromResourceCommandInput, + RemoveTagsFromResourceCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: RemoveTagsFromResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + RemoveTagsFromResourceCommandInput, + RemoveTagsFromResourceCommandOutput + > { + 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: RemoveTagsFromResourceCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1RemoveTagsFromResourceCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1RemoveTagsFromResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/ResetUserPasswordCommand.ts b/clients/client-directory-service/commands/ResetUserPasswordCommand.ts new file mode 100644 index 000000000000..f4cc6b413d24 --- /dev/null +++ b/clients/client-directory-service/commands/ResetUserPasswordCommand.ts @@ -0,0 +1,84 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + ResetUserPasswordRequest, + ResetUserPasswordResult +} from "../models/index"; +import { + deserializeAws_json1_1ResetUserPasswordCommand, + serializeAws_json1_1ResetUserPasswordCommand +} from "../protocols/Aws_json1_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 ResetUserPasswordCommandInput = ResetUserPasswordRequest; +export type ResetUserPasswordCommandOutput = ResetUserPasswordResult; + +export class ResetUserPasswordCommand extends $Command< + ResetUserPasswordCommandInput, + ResetUserPasswordCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ResetUserPasswordCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + 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: ResetUserPasswordCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1ResetUserPasswordCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1ResetUserPasswordCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/RestoreFromSnapshotCommand.ts b/clients/client-directory-service/commands/RestoreFromSnapshotCommand.ts new file mode 100644 index 000000000000..c34b537ccf3b --- /dev/null +++ b/clients/client-directory-service/commands/RestoreFromSnapshotCommand.ts @@ -0,0 +1,87 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + RestoreFromSnapshotRequest, + RestoreFromSnapshotResult +} from "../models/index"; +import { + deserializeAws_json1_1RestoreFromSnapshotCommand, + serializeAws_json1_1RestoreFromSnapshotCommand +} from "../protocols/Aws_json1_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 RestoreFromSnapshotCommandInput = RestoreFromSnapshotRequest; +export type RestoreFromSnapshotCommandOutput = RestoreFromSnapshotResult; + +export class RestoreFromSnapshotCommand extends $Command< + RestoreFromSnapshotCommandInput, + RestoreFromSnapshotCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: RestoreFromSnapshotCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + RestoreFromSnapshotCommandInput, + RestoreFromSnapshotCommandOutput + > { + 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: RestoreFromSnapshotCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1RestoreFromSnapshotCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1RestoreFromSnapshotCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/ShareDirectoryCommand.ts b/clients/client-directory-service/commands/ShareDirectoryCommand.ts new file mode 100644 index 000000000000..fe7a4d52a1e3 --- /dev/null +++ b/clients/client-directory-service/commands/ShareDirectoryCommand.ts @@ -0,0 +1,81 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { ShareDirectoryRequest, ShareDirectoryResult } from "../models/index"; +import { + deserializeAws_json1_1ShareDirectoryCommand, + serializeAws_json1_1ShareDirectoryCommand +} from "../protocols/Aws_json1_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 ShareDirectoryCommandInput = ShareDirectoryRequest; +export type ShareDirectoryCommandOutput = ShareDirectoryResult; + +export class ShareDirectoryCommand extends $Command< + ShareDirectoryCommandInput, + ShareDirectoryCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ShareDirectoryCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + 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: ShareDirectoryCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1ShareDirectoryCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1ShareDirectoryCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/StartSchemaExtensionCommand.ts b/clients/client-directory-service/commands/StartSchemaExtensionCommand.ts new file mode 100644 index 000000000000..af25a21b52e6 --- /dev/null +++ b/clients/client-directory-service/commands/StartSchemaExtensionCommand.ts @@ -0,0 +1,87 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + StartSchemaExtensionRequest, + StartSchemaExtensionResult +} from "../models/index"; +import { + deserializeAws_json1_1StartSchemaExtensionCommand, + serializeAws_json1_1StartSchemaExtensionCommand +} from "../protocols/Aws_json1_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 StartSchemaExtensionCommandInput = StartSchemaExtensionRequest; +export type StartSchemaExtensionCommandOutput = StartSchemaExtensionResult; + +export class StartSchemaExtensionCommand extends $Command< + StartSchemaExtensionCommandInput, + StartSchemaExtensionCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: StartSchemaExtensionCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + StartSchemaExtensionCommandInput, + StartSchemaExtensionCommandOutput + > { + 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: StartSchemaExtensionCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1StartSchemaExtensionCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1StartSchemaExtensionCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/UnshareDirectoryCommand.ts b/clients/client-directory-service/commands/UnshareDirectoryCommand.ts new file mode 100644 index 000000000000..5cc44b880d0d --- /dev/null +++ b/clients/client-directory-service/commands/UnshareDirectoryCommand.ts @@ -0,0 +1,84 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + UnshareDirectoryRequest, + UnshareDirectoryResult +} from "../models/index"; +import { + deserializeAws_json1_1UnshareDirectoryCommand, + serializeAws_json1_1UnshareDirectoryCommand +} from "../protocols/Aws_json1_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 UnshareDirectoryCommandInput = UnshareDirectoryRequest; +export type UnshareDirectoryCommandOutput = UnshareDirectoryResult; + +export class UnshareDirectoryCommand extends $Command< + UnshareDirectoryCommandInput, + UnshareDirectoryCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UnshareDirectoryCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + 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: UnshareDirectoryCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1UnshareDirectoryCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1UnshareDirectoryCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/UpdateConditionalForwarderCommand.ts b/clients/client-directory-service/commands/UpdateConditionalForwarderCommand.ts new file mode 100644 index 000000000000..36370e1eee7c --- /dev/null +++ b/clients/client-directory-service/commands/UpdateConditionalForwarderCommand.ts @@ -0,0 +1,93 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + UpdateConditionalForwarderRequest, + UpdateConditionalForwarderResult +} from "../models/index"; +import { + deserializeAws_json1_1UpdateConditionalForwarderCommand, + serializeAws_json1_1UpdateConditionalForwarderCommand +} from "../protocols/Aws_json1_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 UpdateConditionalForwarderCommandInput = UpdateConditionalForwarderRequest; +export type UpdateConditionalForwarderCommandOutput = UpdateConditionalForwarderResult; + +export class UpdateConditionalForwarderCommand extends $Command< + UpdateConditionalForwarderCommandInput, + UpdateConditionalForwarderCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateConditionalForwarderCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + UpdateConditionalForwarderCommandInput, + UpdateConditionalForwarderCommandOutput + > { + 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: UpdateConditionalForwarderCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1UpdateConditionalForwarderCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1UpdateConditionalForwarderCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/UpdateNumberOfDomainControllersCommand.ts b/clients/client-directory-service/commands/UpdateNumberOfDomainControllersCommand.ts new file mode 100644 index 000000000000..7e2c4bf7496d --- /dev/null +++ b/clients/client-directory-service/commands/UpdateNumberOfDomainControllersCommand.ts @@ -0,0 +1,93 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { + UpdateNumberOfDomainControllersRequest, + UpdateNumberOfDomainControllersResult +} from "../models/index"; +import { + deserializeAws_json1_1UpdateNumberOfDomainControllersCommand, + serializeAws_json1_1UpdateNumberOfDomainControllersCommand +} from "../protocols/Aws_json1_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 UpdateNumberOfDomainControllersCommandInput = UpdateNumberOfDomainControllersRequest; +export type UpdateNumberOfDomainControllersCommandOutput = UpdateNumberOfDomainControllersResult; + +export class UpdateNumberOfDomainControllersCommand extends $Command< + UpdateNumberOfDomainControllersCommandInput, + UpdateNumberOfDomainControllersCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateNumberOfDomainControllersCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + UpdateNumberOfDomainControllersCommandInput, + UpdateNumberOfDomainControllersCommandOutput + > { + 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: UpdateNumberOfDomainControllersCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1UpdateNumberOfDomainControllersCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1UpdateNumberOfDomainControllersCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/UpdateRadiusCommand.ts b/clients/client-directory-service/commands/UpdateRadiusCommand.ts new file mode 100644 index 000000000000..42cac1abf441 --- /dev/null +++ b/clients/client-directory-service/commands/UpdateRadiusCommand.ts @@ -0,0 +1,81 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { UpdateRadiusRequest, UpdateRadiusResult } from "../models/index"; +import { + deserializeAws_json1_1UpdateRadiusCommand, + serializeAws_json1_1UpdateRadiusCommand +} from "../protocols/Aws_json1_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 UpdateRadiusCommandInput = UpdateRadiusRequest; +export type UpdateRadiusCommandOutput = UpdateRadiusResult; + +export class UpdateRadiusCommand extends $Command< + UpdateRadiusCommandInput, + UpdateRadiusCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateRadiusCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + 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: UpdateRadiusCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1UpdateRadiusCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1UpdateRadiusCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/UpdateTrustCommand.ts b/clients/client-directory-service/commands/UpdateTrustCommand.ts new file mode 100644 index 000000000000..e82f868852f0 --- /dev/null +++ b/clients/client-directory-service/commands/UpdateTrustCommand.ts @@ -0,0 +1,81 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { UpdateTrustRequest, UpdateTrustResult } from "../models/index"; +import { + deserializeAws_json1_1UpdateTrustCommand, + serializeAws_json1_1UpdateTrustCommand +} from "../protocols/Aws_json1_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 UpdateTrustCommandInput = UpdateTrustRequest; +export type UpdateTrustCommandOutput = UpdateTrustResult; + +export class UpdateTrustCommand extends $Command< + UpdateTrustCommandInput, + UpdateTrustCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateTrustCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + 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: UpdateTrustCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1UpdateTrustCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1UpdateTrustCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/commands/VerifyTrustCommand.ts b/clients/client-directory-service/commands/VerifyTrustCommand.ts new file mode 100644 index 000000000000..57e986fe0089 --- /dev/null +++ b/clients/client-directory-service/commands/VerifyTrustCommand.ts @@ -0,0 +1,81 @@ +import { + DirectoryServiceClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../DirectoryServiceClient"; +import { VerifyTrustRequest, VerifyTrustResult } from "../models/index"; +import { + deserializeAws_json1_1VerifyTrustCommand, + serializeAws_json1_1VerifyTrustCommand +} from "../protocols/Aws_json1_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 VerifyTrustCommandInput = VerifyTrustRequest; +export type VerifyTrustCommandOutput = VerifyTrustResult; + +export class VerifyTrustCommand extends $Command< + VerifyTrustCommandInput, + VerifyTrustCommandOutput, + DirectoryServiceClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: VerifyTrustCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DirectoryServiceClientResolvedConfig, + 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: VerifyTrustCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1VerifyTrustCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1VerifyTrustCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-directory-service/endpoints.ts b/clients/client-directory-service/endpoints.ts new file mode 100644 index 000000000000..31a4f6e4977a --- /dev/null +++ b/clients/client-directory-service/endpoints.ts @@ -0,0 +1,183 @@ +import { RegionInfo, RegionInfoProvider } from "@aws-sdk/types"; + +// Partition default templates +const AWS_TEMPLATE = "ds.{region}.amazonaws.com"; +const AWS_CN_TEMPLATE = "ds.{region}.amazonaws.com.cn"; +const AWS_ISO_TEMPLATE = "ds.{region}.c2s.ic.gov"; +const AWS_ISO_B_TEMPLATE = "ds.{region}.sc2s.sgov.gov"; +const AWS_US_GOV_TEMPLATE = "ds.{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: "ds.ap-east-1.amazonaws.com" + }; + break; + case "ap-northeast-1": + regionInfo = { + hostname: "ds.ap-northeast-1.amazonaws.com" + }; + break; + case "ap-northeast-2": + regionInfo = { + hostname: "ds.ap-northeast-2.amazonaws.com" + }; + break; + case "ap-south-1": + regionInfo = { + hostname: "ds.ap-south-1.amazonaws.com" + }; + break; + case "ap-southeast-1": + regionInfo = { + hostname: "ds.ap-southeast-1.amazonaws.com" + }; + break; + case "ap-southeast-2": + regionInfo = { + hostname: "ds.ap-southeast-2.amazonaws.com" + }; + break; + case "ca-central-1": + regionInfo = { + hostname: "ds.ca-central-1.amazonaws.com" + }; + break; + case "cn-north-1": + regionInfo = { + hostname: "ds.cn-north-1.amazonaws.com.cn" + }; + break; + case "cn-northwest-1": + regionInfo = { + hostname: "ds.cn-northwest-1.amazonaws.com.cn" + }; + break; + case "eu-central-1": + regionInfo = { + hostname: "ds.eu-central-1.amazonaws.com" + }; + break; + case "eu-north-1": + regionInfo = { + hostname: "ds.eu-north-1.amazonaws.com" + }; + break; + case "eu-west-1": + regionInfo = { + hostname: "ds.eu-west-1.amazonaws.com" + }; + break; + case "eu-west-2": + regionInfo = { + hostname: "ds.eu-west-2.amazonaws.com" + }; + break; + case "sa-east-1": + regionInfo = { + hostname: "ds.sa-east-1.amazonaws.com" + }; + break; + case "us-east-1": + regionInfo = { + hostname: "ds.us-east-1.amazonaws.com" + }; + break; + case "us-east-2": + regionInfo = { + hostname: "ds.us-east-2.amazonaws.com" + }; + break; + case "us-gov-east-1": + regionInfo = { + hostname: "ds.us-gov-east-1.amazonaws.com" + }; + break; + case "us-gov-west-1": + regionInfo = { + hostname: "ds.us-gov-west-1.amazonaws.com" + }; + break; + case "us-iso-east-1": + regionInfo = { + hostname: "ds.us-iso-east-1.c2s.ic.gov" + }; + break; + case "us-west-1": + regionInfo = { + hostname: "ds.us-west-1.amazonaws.com" + }; + break; + case "us-west-2": + regionInfo = { + hostname: "ds.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-directory-service/index.ts b/clients/client-directory-service/index.ts new file mode 100644 index 000000000000..eb920efc5fbc --- /dev/null +++ b/clients/client-directory-service/index.ts @@ -0,0 +1,59 @@ +export * from "./DirectoryServiceClient"; +export * from "./DirectoryService"; +export * from "./commands/AcceptSharedDirectoryCommand"; +export * from "./commands/AddIpRoutesCommand"; +export * from "./commands/AddTagsToResourceCommand"; +export * from "./commands/CancelSchemaExtensionCommand"; +export * from "./commands/ConnectDirectoryCommand"; +export * from "./commands/CreateAliasCommand"; +export * from "./commands/CreateComputerCommand"; +export * from "./commands/CreateConditionalForwarderCommand"; +export * from "./commands/CreateDirectoryCommand"; +export * from "./commands/CreateLogSubscriptionCommand"; +export * from "./commands/CreateMicrosoftADCommand"; +export * from "./commands/CreateSnapshotCommand"; +export * from "./commands/CreateTrustCommand"; +export * from "./commands/DeleteConditionalForwarderCommand"; +export * from "./commands/DeleteDirectoryCommand"; +export * from "./commands/DeleteLogSubscriptionCommand"; +export * from "./commands/DeleteSnapshotCommand"; +export * from "./commands/DeleteTrustCommand"; +export * from "./commands/DeregisterCertificateCommand"; +export * from "./commands/DeregisterEventTopicCommand"; +export * from "./commands/DescribeCertificateCommand"; +export * from "./commands/DescribeConditionalForwardersCommand"; +export * from "./commands/DescribeDirectoriesCommand"; +export * from "./commands/DescribeDomainControllersCommand"; +export * from "./commands/DescribeEventTopicsCommand"; +export * from "./commands/DescribeLDAPSSettingsCommand"; +export * from "./commands/DescribeSharedDirectoriesCommand"; +export * from "./commands/DescribeSnapshotsCommand"; +export * from "./commands/DescribeTrustsCommand"; +export * from "./commands/DisableLDAPSCommand"; +export * from "./commands/DisableRadiusCommand"; +export * from "./commands/DisableSsoCommand"; +export * from "./commands/EnableLDAPSCommand"; +export * from "./commands/EnableRadiusCommand"; +export * from "./commands/EnableSsoCommand"; +export * from "./commands/GetDirectoryLimitsCommand"; +export * from "./commands/GetSnapshotLimitsCommand"; +export * from "./commands/ListCertificatesCommand"; +export * from "./commands/ListIpRoutesCommand"; +export * from "./commands/ListLogSubscriptionsCommand"; +export * from "./commands/ListSchemaExtensionsCommand"; +export * from "./commands/ListTagsForResourceCommand"; +export * from "./commands/RegisterCertificateCommand"; +export * from "./commands/RegisterEventTopicCommand"; +export * from "./commands/RejectSharedDirectoryCommand"; +export * from "./commands/RemoveIpRoutesCommand"; +export * from "./commands/RemoveTagsFromResourceCommand"; +export * from "./commands/ResetUserPasswordCommand"; +export * from "./commands/RestoreFromSnapshotCommand"; +export * from "./commands/ShareDirectoryCommand"; +export * from "./commands/StartSchemaExtensionCommand"; +export * from "./commands/UnshareDirectoryCommand"; +export * from "./commands/UpdateConditionalForwarderCommand"; +export * from "./commands/UpdateNumberOfDomainControllersCommand"; +export * from "./commands/UpdateRadiusCommand"; +export * from "./commands/UpdateTrustCommand"; +export * from "./commands/VerifyTrustCommand"; diff --git a/clients/client-directory-service/models/index.ts b/clients/client-directory-service/models/index.ts new file mode 100644 index 000000000000..b32ae8713afe --- /dev/null +++ b/clients/client-directory-service/models/index.ts @@ -0,0 +1,5484 @@ +import * as _smithy from "@aws-sdk/smithy-client"; +import { MetadataBearer as $MetadataBearer } from "@aws-sdk/types"; + +export interface AcceptSharedDirectoryRequest { + __type?: "AcceptSharedDirectoryRequest"; + /** + * + *

Identifier of the shared directory in the directory consumer account. This identifier is different for each directory owner account.

+ * + */ + SharedDirectoryId: string | undefined; +} + +export namespace AcceptSharedDirectoryRequest { + export function isa(o: any): o is AcceptSharedDirectoryRequest { + return _smithy.isa(o, "AcceptSharedDirectoryRequest"); + } +} + +export interface AcceptSharedDirectoryResult extends $MetadataBearer { + __type?: "AcceptSharedDirectoryResult"; + /** + * + *

The shared directory in the directory consumer account.

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

You do not have sufficient access to perform this action.

+ * + */ +export interface AccessDeniedException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "AccessDeniedException"; + $fault: "client"; + /** + * + *

The descriptive message for the exception.

+ * + */ + Message?: string; + + /** + * + *

The AWS request identifier.

+ * + */ + RequestId?: string; +} + +export namespace AccessDeniedException { + export function isa(o: any): o is AccessDeniedException { + return _smithy.isa(o, "AccessDeniedException"); + } +} + +export interface AddIpRoutesRequest { + __type?: "AddIpRoutesRequest"; + /** + * + *

Identifier (ID) of the directory to which to add the address block.

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

IP address blocks, using CIDR format, of the traffic to route. This is often the IP address block of the DNS server used for your on-premises domain.

+ * + */ + IpRoutes: Array | undefined; + + /** + * + *

If set to true, updates the inbound and outbound rules of the security group that has the description: "AWS created security group for directory ID directory controllers." + * Following are the new rules: + *

+ *

Inbound:

+ *
    + *
  • + *

    Type: Custom UDP Rule, Protocol: UDP, Range: 88, Source: 0.0.0.0/0

    + *
  • + *
  • + *

    Type: Custom UDP Rule, Protocol: UDP, Range: 123, Source: 0.0.0.0/0

    + *
  • + *
  • + *

    Type: Custom UDP Rule, Protocol: UDP, Range: 138, Source: 0.0.0.0/0

    + *
  • + *
  • + *

    Type: Custom UDP Rule, Protocol: UDP, Range: 389, Source: 0.0.0.0/0

    + *
  • + *
  • + *

    Type: Custom UDP Rule, Protocol: UDP, Range: 464, Source: 0.0.0.0/0

    + *
  • + *
  • + *

    Type: Custom UDP Rule, Protocol: UDP, Range: 445, Source: 0.0.0.0/0

    + *
  • + *
  • + *

    Type: Custom TCP Rule, Protocol: TCP, Range: 88, Source: 0.0.0.0/0

    + *
  • + *
  • + *

    Type: Custom TCP Rule, Protocol: TCP, Range: 135, Source: 0.0.0.0/0

    + *
  • + *
  • + *

    Type: Custom TCP Rule, Protocol: TCP, Range: 445, Source: 0.0.0.0/0

    + *
  • + *
  • + *

    Type: Custom TCP Rule, Protocol: TCP, Range: 464, Source: 0.0.0.0/0

    + *
  • + *
  • + *

    Type: Custom TCP Rule, Protocol: TCP, Range: 636, Source: 0.0.0.0/0

    + *
  • + *
  • + *

    Type: Custom TCP Rule, Protocol: TCP, Range: 1024-65535, Source: 0.0.0.0/0

    + *
  • + *
  • + *

    Type: Custom TCP Rule, Protocol: TCP, Range: 3268-33269, Source: 0.0.0.0/0

    + *
  • + *
  • + *

    Type: DNS (UDP), Protocol: UDP, Range: 53, Source: 0.0.0.0/0

    + *
  • + *
  • + *

    Type: DNS (TCP), Protocol: TCP, Range: 53, Source: 0.0.0.0/0

    + *
  • + *
  • + *

    Type: LDAP, Protocol: TCP, Range: 389, Source: 0.0.0.0/0

    + *
  • + *
  • + *

    Type: All ICMP, Protocol: All, Range: N/A, Source: 0.0.0.0/0

    + *
  • + *
+ * + *

+ *

Outbound:

+ *
    + *
  • + *

    Type: All traffic, Protocol: All, Range: All, Destination: 0.0.0.0/0

    + *
  • + *
+ *

These security rules impact an internal network interface that is not exposed publicly.

+ * + */ + UpdateSecurityGroupForDirectoryControllers?: boolean; +} + +export namespace AddIpRoutesRequest { + export function isa(o: any): o is AddIpRoutesRequest { + return _smithy.isa(o, "AddIpRoutesRequest"); + } +} + +export interface AddIpRoutesResult extends $MetadataBearer { + __type?: "AddIpRoutesResult"; +} + +export namespace AddIpRoutesResult { + export function isa(o: any): o is AddIpRoutesResult { + return _smithy.isa(o, "AddIpRoutesResult"); + } +} + +export interface AddTagsToResourceRequest { + __type?: "AddTagsToResourceRequest"; + /** + * + *

Identifier (ID) for the directory to which to add the tag.

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

The tags to be assigned to the directory.

+ * + */ + Tags: Array | undefined; +} + +export namespace AddTagsToResourceRequest { + export function isa(o: any): o is AddTagsToResourceRequest { + return _smithy.isa(o, "AddTagsToResourceRequest"); + } +} + +export interface AddTagsToResourceResult extends $MetadataBearer { + __type?: "AddTagsToResourceResult"; +} + +export namespace AddTagsToResourceResult { + export function isa(o: any): o is AddTagsToResourceResult { + return _smithy.isa(o, "AddTagsToResourceResult"); + } +} + +/** + * + *

Represents a named directory attribute.

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

The name of the attribute.

+ * + */ + Name?: string; + + /** + * + *

The value of the attribute.

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

An authentication error occurred.

+ * + */ +export interface AuthenticationFailedException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "AuthenticationFailedException"; + $fault: "client"; + /** + * + *

The textual message for the exception.

+ * + */ + Message?: string; + + /** + * + *

The identifier of the request that caused the exception.

+ * + */ + RequestId?: string; +} + +export namespace AuthenticationFailedException { + export function isa(o: any): o is AuthenticationFailedException { + return _smithy.isa(o, "AuthenticationFailedException"); + } +} + +export interface CancelSchemaExtensionRequest { + __type?: "CancelSchemaExtensionRequest"; + /** + * + *

The identifier of the directory whose schema extension will be canceled.

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

The identifier of the schema extension that will be canceled.

+ * + */ + SchemaExtensionId: string | undefined; +} + +export namespace CancelSchemaExtensionRequest { + export function isa(o: any): o is CancelSchemaExtensionRequest { + return _smithy.isa(o, "CancelSchemaExtensionRequest"); + } +} + +export interface CancelSchemaExtensionResult extends $MetadataBearer { + __type?: "CancelSchemaExtensionResult"; +} + +export namespace CancelSchemaExtensionResult { + export function isa(o: any): o is CancelSchemaExtensionResult { + return _smithy.isa(o, "CancelSchemaExtensionResult"); + } +} + +/** + * + *

Information about the certificate.

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

The identifier of the certificate.

+ * + */ + CertificateId?: string; + + /** + * + *

The common name for the certificate.

+ * + */ + CommonName?: string; + + /** + * + *

The date and time when the certificate will expire.

+ * + */ + ExpiryDateTime?: Date; + + /** + * + *

The date and time that the certificate was registered.

+ * + */ + RegisteredDateTime?: Date; + + /** + * + *

The state of the certificate.

+ * + */ + State?: CertificateState | string; + + /** + * + *

Describes a state change for the certificate.

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

The certificate has already been registered into the system.

+ * + */ +export interface CertificateAlreadyExistsException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "CertificateAlreadyExistsException"; + $fault: "client"; + /** + * + *

The descriptive message for the exception.

+ * + */ + Message?: string; + + /** + * + *

The AWS request identifier.

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

The certificate is not present in the system for describe or deregister activities.

+ * + */ +export interface CertificateDoesNotExistException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "CertificateDoesNotExistException"; + $fault: "client"; + /** + * + *

The descriptive message for the exception.

+ * + */ + Message?: string; + + /** + * + *

The AWS request identifier.

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

The certificate is being used for the LDAP security connection and cannot be removed + * without disabling LDAP security.

+ * + */ +export interface CertificateInUseException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "CertificateInUseException"; + $fault: "client"; + /** + * + *

The descriptive message for the exception.

+ * + */ + Message?: string; + + /** + * + *

The AWS request identifier.

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

Contains general information about a certificate.

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

The identifier of the certificate.

+ * + */ + CertificateId?: string; + + /** + * + *

The common name for the certificate.

+ * + */ + CommonName?: string; + + /** + * + *

The state of the certificate.

+ * + */ + State?: CertificateState | string; +} + +export namespace CertificateInfo { + export function isa(o: any): o is CertificateInfo { + return _smithy.isa(o, "CertificateInfo"); + } +} + +/** + * + *

The certificate could not be added because the certificate limit has been reached.

+ * + */ +export interface CertificateLimitExceededException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "CertificateLimitExceededException"; + $fault: "client"; + /** + * + *

The descriptive message for the exception.

+ * + */ + Message?: string; + + /** + * + *

The AWS request identifier.

+ * + */ + RequestId?: string; +} + +export namespace CertificateLimitExceededException { + export function isa(o: any): o is CertificateLimitExceededException { + return _smithy.isa(o, "CertificateLimitExceededException"); + } +} + +export enum CertificateState { + DEREGISTERED = "Deregistered", + DEREGISTERING = "Deregistering", + DEREGISTER_FAILED = "DeregisterFailed", + REGISTERED = "Registered", + REGISTERING = "Registering", + REGISTER_FAILED = "RegisterFailed" +} + +/** + * + *

A client exception has occurred.

+ * + */ +export interface ClientException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "ClientException"; + $fault: "client"; + /** + * + *

The descriptive message for the exception.

+ * + */ + Message?: string; + + /** + * + *

The AWS request identifier.

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

Contains information about a computer account in a directory.

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

An array of Attribute objects containing the LDAP attributes that belong to the + * computer account.

+ * + */ + ComputerAttributes?: Array; + + /** + * + *

The identifier of the computer.

+ * + */ + ComputerId?: string; + + /** + * + *

The computer name.

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

Points to a remote domain with which you are setting up a trust relationship. Conditional forwarders are required in order to set up a trust relationship with another domain.

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

The IP addresses of the remote DNS server associated with RemoteDomainName. This is the IP address of the DNS server that your conditional forwarder points to.

+ * + */ + DnsIpAddrs?: Array; + + /** + * + *

The fully qualified domain name (FQDN) of the remote domains pointed to by the conditional forwarder.

+ * + */ + RemoteDomainName?: string; + + /** + * + *

The replication scope of the conditional forwarder. The only allowed value is + * Domain, which will replicate the conditional forwarder to all of the + * domain controllers for your AWS directory.

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

Contains the inputs for the ConnectDirectory operation.

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

A DirectoryConnectSettings object that contains additional information for the + * operation.

+ * + */ + ConnectSettings: DirectoryConnectSettings | undefined; + + /** + * + *

A description for the directory.

+ * + */ + Description?: string; + + /** + * + *

The fully qualified name of the on-premises directory, such as + * corp.example.com.

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

The password for the on-premises user account.

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

The NetBIOS name of the on-premises directory, such as CORP.

+ * + */ + ShortName?: string; + + /** + * + *

The size of the directory.

+ * + */ + Size: DirectorySize | string | undefined; + + /** + * + *

The tags to be assigned to AD Connector.

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

Contains the results of the ConnectDirectory operation.

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

The identifier of the new directory.

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

Contains the inputs for the CreateAlias operation.

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

The requested alias.

+ *

The alias must be unique amongst all aliases in AWS. This operation throws an + * EntityAlreadyExistsException error if the alias already exists.

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

The identifier of the directory for which to create the alias.

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

Contains the results of the CreateAlias operation.

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

The alias for the directory.

+ * + */ + Alias?: string; + + /** + * + *

The identifier of the directory.

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

Contains the inputs for the CreateComputer operation.

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

An array of Attribute objects that contain any LDAP attributes to apply to the + * computer account.

+ * + */ + ComputerAttributes?: Array; + + /** + * + *

The name of the computer account.

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

The identifier of the directory in which to create the computer account.

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

The fully-qualified distinguished name of the organizational unit to place the computer account in.

+ * + */ + OrganizationalUnitDistinguishedName?: string; + + /** + * + *

A one-time password that is used to join the computer to the directory. You should generate a random, strong password to use for this parameter.

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

Contains the results for the CreateComputer operation.

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

A Computer object that represents the computer account.

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

Initiates the creation of a conditional forwarder for your AWS Directory Service for Microsoft Active Directory. Conditional forwarders are required in order to set up a trust relationship with another domain.

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

The directory ID of the AWS directory for which you are creating the conditional forwarder.

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

The IP addresses of the remote DNS server associated with RemoteDomainName.

+ * + */ + DnsIpAddrs: Array | undefined; + + /** + * + *

The fully qualified domain name (FQDN) of the remote domain with which you will set up a trust relationship.

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

The result of a CreateConditinalForwarder request.

+ * + */ +export interface CreateConditionalForwarderResult extends $MetadataBearer { + __type?: "CreateConditionalForwarderResult"; +} + +export namespace CreateConditionalForwarderResult { + export function isa(o: any): o is CreateConditionalForwarderResult { + return _smithy.isa(o, "CreateConditionalForwarderResult"); + } +} + +/** + * + *

Contains the inputs for the CreateDirectory operation.

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

A description for the directory.

+ * + */ + Description?: string; + + /** + * + *

The fully qualified name for the directory, such as corp.example.com.

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

The password for the directory administrator. The directory creation process creates + * a directory administrator account with the user name Administrator and this + * password.

+ *

If you need to change the password for the administrator account, you can use the ResetUserPassword API call.

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

The NetBIOS name of the directory, such as CORP.

+ * + */ + ShortName?: string; + + /** + * + *

The size of the directory.

+ * + */ + Size: DirectorySize | string | undefined; + + /** + * + *

The tags to be assigned to the Simple AD directory.

+ * + */ + Tags?: Array; + + /** + * + *

A DirectoryVpcSettings object that contains additional information for the + * operation.

+ * + */ + VpcSettings?: DirectoryVpcSettings; +} + +export namespace CreateDirectoryRequest { + export function isa(o: any): o is CreateDirectoryRequest { + return _smithy.isa(o, "CreateDirectoryRequest"); + } +} + +/** + * + *

Contains the results of the CreateDirectory operation.

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

The identifier of the directory that was created.

+ * + */ + DirectoryId?: string; +} + +export namespace CreateDirectoryResult { + export function isa(o: any): o is CreateDirectoryResult { + return _smithy.isa(o, "CreateDirectoryResult"); + } +} + +export interface CreateLogSubscriptionRequest { + __type?: "CreateLogSubscriptionRequest"; + /** + * + *

Identifier of the directory to which you want to subscribe and receive real-time logs + * to your specified CloudWatch log group.

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

The name of the CloudWatch log group where the real-time domain controller logs are forwarded.

+ * + */ + LogGroupName: string | undefined; +} + +export namespace CreateLogSubscriptionRequest { + export function isa(o: any): o is CreateLogSubscriptionRequest { + return _smithy.isa(o, "CreateLogSubscriptionRequest"); + } +} + +export interface CreateLogSubscriptionResult extends $MetadataBearer { + __type?: "CreateLogSubscriptionResult"; +} + +export namespace CreateLogSubscriptionResult { + export function isa(o: any): o is CreateLogSubscriptionResult { + return _smithy.isa(o, "CreateLogSubscriptionResult"); + } +} + +/** + * + *

Creates an AWS Managed Microsoft AD directory.

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

A description for the directory. This label will appear on the AWS console Directory Details page after the directory is created.

+ * + */ + Description?: string; + + /** + * + *

AWS Managed Microsoft AD is available in two editions: Standard and Enterprise. Enterprise is the default.

+ * + */ + Edition?: DirectoryEdition | string; + + /** + * + *

The fully qualified domain name for the AWS Managed Microsoft AD directory, such as + * corp.example.com. This name will resolve inside your VPC only. It does not need + * to be publicly resolvable.

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

The password for the default administrative user named Admin.

+ *

If you need to change the password for the administrator account, you can use the ResetUserPassword API call.

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

The NetBIOS name for your domain, such as CORP. If you don't specify a NetBIOS name, it will default to the first part of your directory DNS. For example, CORP for the directory DNS corp.example.com.

+ * + */ + ShortName?: string; + + /** + * + *

The tags to be assigned to the AWS Managed Microsoft AD directory.

+ * + */ + Tags?: Array; + + /** + * + *

Contains VPC information for the CreateDirectory or CreateMicrosoftAD operation.

+ * + */ + VpcSettings: DirectoryVpcSettings | undefined; +} + +export namespace CreateMicrosoftADRequest { + export function isa(o: any): o is CreateMicrosoftADRequest { + return _smithy.isa(o, "CreateMicrosoftADRequest"); + } +} + +/** + * + *

Result of a CreateMicrosoftAD request.

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

The identifier of the directory that was created.

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

Contains the inputs for the CreateSnapshot operation.

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

The identifier of the directory of which to take a snapshot.

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

The descriptive name to apply to the snapshot.

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

Contains the results of the CreateSnapshot operation.

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

The identifier of the snapshot that was created.

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

AWS Directory Service for Microsoft Active Directory allows you to configure trust relationships. For example, you can establish a trust between your AWS Managed Microsoft AD directory, and your existing on-premises Microsoft Active Directory. This would allow you to provide users and groups access to resources in either domain, with a single set of credentials.

+ *

This action initiates the creation of the AWS side of a trust relationship between an AWS Managed Microsoft AD directory and an external domain.

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

The IP addresses of the remote DNS server associated with RemoteDomainName.

+ * + */ + ConditionalForwarderIpAddrs?: Array; + + /** + * + *

The Directory ID of the AWS Managed Microsoft AD directory for which to establish the trust relationship.

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

The Fully Qualified Domain Name (FQDN) of the external domain for which to create the trust relationship.

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

Optional parameter to enable selective authentication for the trust.

+ * + */ + SelectiveAuth?: SelectiveAuth | string; + + /** + * + *

The direction of the trust relationship.

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

The trust password. The must be the same password that was used when creating the trust relationship on the external domain.

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

The trust relationship type. Forest is the default.

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

The result of a CreateTrust request.

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

A unique identifier for the trust relationship that was created.

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

Deletes a conditional forwarder.

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

The directory ID for which you are deleting the conditional forwarder.

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

The fully qualified domain name (FQDN) of the remote domain with which you are deleting the conditional forwarder.

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

The result of a DeleteConditionalForwarder request.

+ * + */ +export interface DeleteConditionalForwarderResult extends $MetadataBearer { + __type?: "DeleteConditionalForwarderResult"; +} + +export namespace DeleteConditionalForwarderResult { + export function isa(o: any): o is DeleteConditionalForwarderResult { + return _smithy.isa(o, "DeleteConditionalForwarderResult"); + } +} + +/** + * + *

Contains the inputs for the DeleteDirectory operation.

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

The identifier of the directory to delete.

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

Contains the results of the DeleteDirectory operation.

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

The directory identifier.

+ * + */ + DirectoryId?: string; +} + +export namespace DeleteDirectoryResult { + export function isa(o: any): o is DeleteDirectoryResult { + return _smithy.isa(o, "DeleteDirectoryResult"); + } +} + +export interface DeleteLogSubscriptionRequest { + __type?: "DeleteLogSubscriptionRequest"; + /** + * + *

Identifier of the directory whose log subscription you want to delete.

+ * + */ + DirectoryId: string | undefined; +} + +export namespace DeleteLogSubscriptionRequest { + export function isa(o: any): o is DeleteLogSubscriptionRequest { + return _smithy.isa(o, "DeleteLogSubscriptionRequest"); + } +} + +export interface DeleteLogSubscriptionResult extends $MetadataBearer { + __type?: "DeleteLogSubscriptionResult"; +} + +export namespace DeleteLogSubscriptionResult { + export function isa(o: any): o is DeleteLogSubscriptionResult { + return _smithy.isa(o, "DeleteLogSubscriptionResult"); + } +} + +/** + * + *

Contains the inputs for the DeleteSnapshot operation.

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

The identifier of the directory snapshot to be deleted.

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

Contains the results of the DeleteSnapshot operation.

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

The identifier of the directory snapshot that was deleted.

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

Deletes the local side of an existing trust relationship between the AWS Managed Microsoft AD directory and the external domain.

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

Delete a conditional forwarder as part of a DeleteTrustRequest.

+ * + */ + DeleteAssociatedConditionalForwarder?: boolean; + + /** + * + *

The Trust ID of the trust relationship to be deleted.

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

The result of a DeleteTrust request.

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

The Trust ID of the trust relationship that was deleted.

+ * + */ + TrustId?: string; +} + +export namespace DeleteTrustResult { + export function isa(o: any): o is DeleteTrustResult { + return _smithy.isa(o, "DeleteTrustResult"); + } +} + +export interface DeregisterCertificateRequest { + __type?: "DeregisterCertificateRequest"; + /** + * + *

The identifier of the certificate.

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

The identifier of the directory.

+ * + */ + DirectoryId: string | undefined; +} + +export namespace DeregisterCertificateRequest { + export function isa(o: any): o is DeregisterCertificateRequest { + return _smithy.isa(o, "DeregisterCertificateRequest"); + } +} + +export interface DeregisterCertificateResult extends $MetadataBearer { + __type?: "DeregisterCertificateResult"; +} + +export namespace DeregisterCertificateResult { + export function isa(o: any): o is DeregisterCertificateResult { + return _smithy.isa(o, "DeregisterCertificateResult"); + } +} + +/** + * + *

Removes the specified directory as a publisher to the specified SNS topic.

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

The Directory ID to remove as a publisher. This directory will no longer send messages to the specified SNS topic.

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

The name of the SNS topic from which to remove the directory as a publisher.

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

The result of a DeregisterEventTopic request.

+ * + */ +export interface DeregisterEventTopicResult extends $MetadataBearer { + __type?: "DeregisterEventTopicResult"; +} + +export namespace DeregisterEventTopicResult { + export function isa(o: any): o is DeregisterEventTopicResult { + return _smithy.isa(o, "DeregisterEventTopicResult"); + } +} + +export interface DescribeCertificateRequest { + __type?: "DescribeCertificateRequest"; + /** + * + *

The identifier of the certificate.

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

The identifier of the directory.

+ * + */ + DirectoryId: string | undefined; +} + +export namespace DescribeCertificateRequest { + export function isa(o: any): o is DescribeCertificateRequest { + return _smithy.isa(o, "DescribeCertificateRequest"); + } +} + +export interface DescribeCertificateResult extends $MetadataBearer { + __type?: "DescribeCertificateResult"; + /** + * + *

Information about the certificate, including registered date time, certificate state, the + * reason for the state, expiration date time, and certificate common name.

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

Describes a conditional forwarder.

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

The directory ID for which to get the list of associated conditional forwarders.

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

The fully qualified domain names (FQDN) of the remote domains for which to get the list of associated conditional forwarders. If this member is null, all conditional forwarders are returned.

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

The result of a DescribeConditionalForwarder request.

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

The list of conditional forwarders that have been created.

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

Contains the inputs for the DescribeDirectories operation.

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

A list of identifiers of the directories for which to obtain the information. If this member is null, all directories that belong to the current account are returned.

+ *

An empty list results in an InvalidParameterException being thrown.

+ * + */ + DirectoryIds?: Array; + + /** + * + *

The maximum number of items to return. If this value is zero, the maximum number of items is specified by the limitations of the operation.

+ * + */ + Limit?: number; + + /** + * + *

The DescribeDirectoriesResult.NextToken value from a previous call to + * DescribeDirectories. Pass null if this is the first call.

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

Contains the results of the DescribeDirectories operation.

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

The list of DirectoryDescription objects that were retrieved.

+ *

It is possible that this list contains less than the number of items specified in the + * Limit member of the request. This occurs if there are less than the requested + * number of items left to retrieve, or if the limitations of the operation have been + * exceeded.

+ * + */ + DirectoryDescriptions?: Array; + + /** + * + *

If not null, more results are available. Pass this value for the NextToken parameter + * in a subsequent call to DescribeDirectories to retrieve the next set of items.

+ * + */ + NextToken?: string; +} + +export namespace DescribeDirectoriesResult { + export function isa(o: any): o is DescribeDirectoriesResult { + return _smithy.isa(o, "DescribeDirectoriesResult"); + } +} + +export interface DescribeDomainControllersRequest { + __type?: "DescribeDomainControllersRequest"; + /** + * + *

Identifier of the directory for which to retrieve the domain controller information.

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

A list of identifiers for the domain controllers whose information will be provided.

+ * + */ + DomainControllerIds?: Array; + + /** + * + *

The maximum number of items to return.

+ * + */ + Limit?: number; + + /** + * + *

The DescribeDomainControllers.NextToken value from a previous call to DescribeDomainControllers. Pass null if this is the first call.

+ * + */ + NextToken?: string; +} + +export namespace DescribeDomainControllersRequest { + export function isa(o: any): o is DescribeDomainControllersRequest { + return _smithy.isa(o, "DescribeDomainControllersRequest"); + } +} + +export interface DescribeDomainControllersResult extends $MetadataBearer { + __type?: "DescribeDomainControllersResult"; + /** + * + *

List of the DomainController objects that were retrieved.

+ * + */ + DomainControllers?: Array; + + /** + * + *

If not null, more results are available. Pass this value for the NextToken parameter in a subsequent call to DescribeDomainControllers retrieve the next set of items.

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

Describes event topics.

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

The Directory ID for which to get the list of associated SNS topics. If this member is null, associations for all Directory IDs are returned.

+ * + */ + DirectoryId?: string; + + /** + * + *

A list of SNS topic names for which to obtain the information. If this member is null, all associations for the specified Directory ID are returned.

+ *

An empty list results in an InvalidParameterException being thrown.

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

The result of a DescribeEventTopic request.

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

A list of SNS topic names that receive status messages from the specified Directory ID.

+ * + */ + EventTopics?: Array; +} + +export namespace DescribeEventTopicsResult { + export function isa(o: any): o is DescribeEventTopicsResult { + return _smithy.isa(o, "DescribeEventTopicsResult"); + } +} + +export interface DescribeLDAPSSettingsRequest { + __type?: "DescribeLDAPSSettingsRequest"; + /** + * + *

The identifier of the directory.

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

Specifies the number of items that should be displayed on one page.

+ * + */ + Limit?: number; + + /** + * + *

The type of next token used for pagination.

+ * + */ + NextToken?: string; + + /** + * + *

The type of LDAP security the customer wants to enable, either server or client. Currently + * supports only Client, (the default).

+ * + */ + Type?: LDAPSType | string; +} + +export namespace DescribeLDAPSSettingsRequest { + export function isa(o: any): o is DescribeLDAPSSettingsRequest { + return _smithy.isa(o, "DescribeLDAPSSettingsRequest"); + } +} + +export interface DescribeLDAPSSettingsResult extends $MetadataBearer { + __type?: "DescribeLDAPSSettingsResult"; + /** + * + *

Information about LDAP security for the specified directory, including status of + * enablement, state last updated date time, and the reason for the state.

+ * + */ + LDAPSSettingsInfo?: Array; + + /** + * + *

The next token used to retrieve the LDAPS settings if the number of setting types exceeds page limit and there is another page.

+ * + */ + NextToken?: string; +} + +export namespace DescribeLDAPSSettingsResult { + export function isa(o: any): o is DescribeLDAPSSettingsResult { + return _smithy.isa(o, "DescribeLDAPSSettingsResult"); + } +} + +export interface DescribeSharedDirectoriesRequest { + __type?: "DescribeSharedDirectoriesRequest"; + /** + * + *

The number of shared directories to return in the response object.

+ * + */ + Limit?: number; + + /** + * + *

The DescribeSharedDirectoriesResult.NextToken value from a previous call to + * DescribeSharedDirectories. Pass null if this is the first call. + *

+ * + */ + NextToken?: string; + + /** + * + *

Returns the identifier of the directory in the directory owner account.

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

A list of identifiers of all shared directories in your account.

+ * + */ + SharedDirectoryIds?: Array; +} + +export namespace DescribeSharedDirectoriesRequest { + export function isa(o: any): o is DescribeSharedDirectoriesRequest { + return _smithy.isa(o, "DescribeSharedDirectoriesRequest"); + } +} + +export interface DescribeSharedDirectoriesResult extends $MetadataBearer { + __type?: "DescribeSharedDirectoriesResult"; + /** + * + *

If not null, token that indicates that more results are available. Pass this value for the NextToken parameter + * in a subsequent call to DescribeSharedDirectories to retrieve the next set of items.

+ * + */ + NextToken?: string; + + /** + * + *

A list of all shared directories in your account.

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

Contains the inputs for the DescribeSnapshots operation.

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

The identifier of the directory for which to retrieve snapshot information.

+ * + */ + DirectoryId?: string; + + /** + * + *

The maximum number of objects to return.

+ * + */ + Limit?: number; + + /** + * + *

The DescribeSnapshotsResult.NextToken value from a previous call to + * DescribeSnapshots. Pass null if this is the first call.

+ * + */ + NextToken?: string; + + /** + * + *

A list of identifiers of the snapshots to obtain the information for. If this member is + * null or empty, all snapshots are returned using the Limit and NextToken + * members.

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

Contains the results of the DescribeSnapshots operation.

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

If not null, more results are available. Pass this value in the NextToken member of + * a subsequent call to DescribeSnapshots.

+ * + */ + NextToken?: string; + + /** + * + *

The list of Snapshot objects that were retrieved.

+ *

It is possible that this list contains less than the number of items specified in the + * Limit member of the request. This occurs if there are less than the requested + * number of items left to retrieve, or if the limitations of the operation have been + * exceeded.

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

Describes the trust relationships for a particular AWS Managed Microsoft AD directory. If no input parameters are are provided, such as directory ID or trust ID, this request describes all the trust relationships.

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

The Directory ID of the AWS directory that is a part of the requested trust relationship.

+ * + */ + DirectoryId?: string; + + /** + * + *

The maximum number of objects to return.

+ * + */ + Limit?: number; + + /** + * + *

The DescribeTrustsResult.NextToken value from a previous call to + * DescribeTrusts. Pass null if this is the first call.

+ * + */ + NextToken?: string; + + /** + * + *

A list of identifiers of the trust relationships for which to obtain the information. If this member is null, all trust relationships that belong to the current account are returned.

+ *

An empty list results in an InvalidParameterException being thrown.

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

The result of a DescribeTrust request.

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

If not null, more results are available. Pass this value for the NextToken parameter + * in a subsequent call to DescribeTrusts to retrieve the next set of items.

+ * + */ + NextToken?: string; + + /** + * + *

The list of Trust objects that were retrieved.

+ *

It is possible that this list contains less than the number of items specified in the + * Limit member of the request. This occurs if there are less than the requested + * number of items left to retrieve, or if the limitations of the operation have been + * exceeded.

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

The specified directory has already been shared with this AWS account.

+ * + */ +export interface DirectoryAlreadySharedException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "DirectoryAlreadySharedException"; + $fault: "client"; + /** + * + *

The descriptive message for the exception.

+ * + */ + Message?: string; + + /** + * + *

The AWS request identifier.

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

Contains information for the ConnectDirectory operation when an AD Connector + * directory is being created.

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

A list of one or more IP addresses of DNS servers or domain controllers in the on-premises directory.

+ * + */ + CustomerDnsIps: Array | undefined; + + /** + * + *

The user name of an account in the on-premises directory that is used to connect to + * the directory. This account must have the following permissions:

+ *
    + *
  • + *

    Read users and groups

    + *
  • + *
  • + *

    Create computer objects

    + *
  • + *
  • + *

    Join computers to the domain

    + *
  • + *
+ * + */ + CustomerUserName: string | undefined; + + /** + * + *

A list of subnet identifiers in the VPC in which the AD Connector is created.

+ * + */ + SubnetIds: Array | undefined; + + /** + * + *

The identifier of the VPC in which the AD Connector is created.

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

Contains information about an AD Connector directory.

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

A list of the Availability Zones that the directory is in.

+ * + */ + AvailabilityZones?: Array; + + /** + * + *

The IP addresses of the AD Connector servers.

+ * + */ + ConnectIps?: Array; + + /** + * + *

The user name of the service account in the on-premises directory.

+ * + */ + CustomerUserName?: string; + + /** + * + *

The security group identifier for the AD Connector directory.

+ * + */ + SecurityGroupId?: string; + + /** + * + *

A list of subnet identifiers in the VPC that the AD Connector is in.

+ * + */ + SubnetIds?: Array; + + /** + * + *

The identifier of the VPC that the AD Connector is in.

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

Contains information about an AWS Directory Service directory.

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

The access URL for the directory, such as + * http://.awsapps.com. + * If no alias has been created for the directory, + * is the directory identifier, such as d-XXXXXXXXXX.

+ * + */ + AccessUrl?: string; + + /** + * + *

The alias for the + * directory. If no + * alias has been created for the directory, the alias is the directory identifier, such as + * d-XXXXXXXXXX.

+ * + */ + Alias?: string; + + /** + * + *

A DirectoryConnectSettingsDescription object that contains additional information + * about an AD Connector directory. This member is only present if the directory is an AD + * Connector directory.

+ * + */ + ConnectSettings?: DirectoryConnectSettingsDescription; + + /** + * + *

The description for the directory.

+ * + */ + Description?: string; + + /** + * + *

The desired number of domain controllers in the directory if the directory is Microsoft AD.

+ * + */ + DesiredNumberOfDomainControllers?: number; + + /** + * + *

The directory identifier.

+ * + */ + DirectoryId?: string; + + /** + * + *

The IP addresses of the DNS servers for the directory. For a Simple AD or Microsoft AD directory, these are the IP addresses of the Simple AD or Microsoft AD directory servers. For an AD Connector directory, these are the IP addresses of the DNS servers or domain controllers in the on-premises directory to which the AD Connector is connected.

+ * + */ + DnsIpAddrs?: Array; + + /** + * + *

The edition associated with this directory.

+ * + */ + Edition?: DirectoryEdition | string; + + /** + * + *

Specifies when the directory was created.

+ * + */ + LaunchTime?: Date; + + /** + * + *

The fully qualified name of the directory.

+ * + */ + Name?: string; + + /** + * + *

Describes the AWS Managed Microsoft AD directory in the directory owner account.

+ * + */ + OwnerDirectoryDescription?: OwnerDirectoryDescription; + + /** + * + *

A RadiusSettings object that contains information about the RADIUS server configured + * for this directory.

+ * + */ + RadiusSettings?: RadiusSettings; + + /** + * + *

The status of the RADIUS MFA server connection.

+ * + */ + RadiusStatus?: RadiusStatus | string; + + /** + * + *

The method used when sharing a directory to determine whether the directory should be + * shared within your AWS organization (ORGANIZATIONS) or with any AWS account by + * sending a shared directory request (HANDSHAKE).

+ * + */ + ShareMethod?: ShareMethod | string; + + /** + * + *

A directory share request that is sent by the directory owner to the directory consumer. + * The request includes a typed message to help the directory consumer administrator determine + * whether to approve or reject the share invitation.

+ * + */ + ShareNotes?: string; + + /** + * + *

Current directory status of the shared AWS Managed Microsoft AD directory.

+ * + */ + ShareStatus?: ShareStatus | string; + + /** + * + *

The short name of the directory.

+ * + */ + ShortName?: string; + + /** + * + *

The directory size.

+ * + */ + Size?: DirectorySize | string; + + /** + * + *

Indicates if single sign-on is enabled for the directory. For more information, see + * EnableSso and DisableSso.

+ * + */ + SsoEnabled?: boolean; + + /** + * + *

The current stage of the directory.

+ * + */ + Stage?: DirectoryStage | string; + + /** + * + *

The date and time that the stage was last updated.

+ * + */ + StageLastUpdatedDateTime?: Date; + + /** + * + *

Additional information about the directory stage.

+ * + */ + StageReason?: string; + + /** + * + *

The directory size.

+ * + */ + Type?: DirectoryType | string; + + /** + * + *

A DirectoryVpcSettingsDescription object that contains additional information about + * a directory. This member is only present if the directory is a Simple AD or Managed AD + * directory.

+ * + */ + VpcSettings?: DirectoryVpcSettingsDescription; +} + +export namespace DirectoryDescription { + export function isa(o: any): o is DirectoryDescription { + return _smithy.isa(o, "DirectoryDescription"); + } +} + +/** + * + *

The specified directory does not exist in the system.

+ * + */ +export interface DirectoryDoesNotExistException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "DirectoryDoesNotExistException"; + $fault: "client"; + /** + * + *

The descriptive message for the exception.

+ * + */ + Message?: string; + + /** + * + *

The AWS request identifier.

+ * + */ + RequestId?: string; +} + +export namespace DirectoryDoesNotExistException { + export function isa(o: any): o is DirectoryDoesNotExistException { + return _smithy.isa(o, "DirectoryDoesNotExistException"); + } +} + +export enum DirectoryEdition { + ENTERPRISE = "Enterprise", + STANDARD = "Standard" +} + +/** + * + *

The maximum number of directories in the region has been reached. You can use the + * GetDirectoryLimits operation to determine your directory limits in the + * region.

+ * + */ +export interface DirectoryLimitExceededException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "DirectoryLimitExceededException"; + $fault: "client"; + /** + * + *

The descriptive message for the exception.

+ * + */ + Message?: string; + + /** + * + *

The AWS request identifier.

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

Contains directory limit information for a Region.

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

The current number of cloud directories in the Region.

+ * + */ + CloudOnlyDirectoriesCurrentCount?: number; + + /** + * + *

The maximum number of cloud directories allowed in the Region.

+ * + */ + CloudOnlyDirectoriesLimit?: number; + + /** + * + *

Indicates if the cloud directory limit has been reached.

+ * + */ + CloudOnlyDirectoriesLimitReached?: boolean; + + /** + * + *

The current number of AWS Managed Microsoft AD directories in the region.

+ * + */ + CloudOnlyMicrosoftADCurrentCount?: number; + + /** + * + *

The maximum number of AWS Managed Microsoft AD directories allowed in the region.

+ * + */ + CloudOnlyMicrosoftADLimit?: number; + + /** + * + *

Indicates if the AWS Managed Microsoft AD directory limit has been reached.

+ * + */ + CloudOnlyMicrosoftADLimitReached?: boolean; + + /** + * + *

The current number of connected directories in the Region.

+ * + */ + ConnectedDirectoriesCurrentCount?: number; + + /** + * + *

The maximum number of connected directories allowed in the Region.

+ * + */ + ConnectedDirectoriesLimit?: number; + + /** + * + *

Indicates if the connected directory limit has been reached.

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

The specified directory has not been shared with this AWS account.

+ * + */ +export interface DirectoryNotSharedException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "DirectoryNotSharedException"; + $fault: "client"; + /** + * + *

The descriptive message for the exception.

+ * + */ + Message?: string; + + /** + * + *

The AWS request identifier.

+ * + */ + RequestId?: string; +} + +export namespace DirectoryNotSharedException { + export function isa(o: any): o is DirectoryNotSharedException { + return _smithy.isa(o, "DirectoryNotSharedException"); + } +} + +export enum DirectorySize { + LARGE = "Large", + SMALL = "Small" +} + +export enum DirectoryStage { + ACTIVE = "Active", + CREATED = "Created", + CREATING = "Creating", + DELETED = "Deleted", + DELETING = "Deleting", + FAILED = "Failed", + IMPAIRED = "Impaired", + INOPERABLE = "Inoperable", + REQUESTED = "Requested", + RESTOREFAILED = "RestoreFailed", + RESTORING = "Restoring" +} + +export enum DirectoryType { + AD_CONNECTOR = "ADConnector", + MICROSOFT_AD = "MicrosoftAD", + SHARED_MICROSOFT_AD = "SharedMicrosoftAD", + SIMPLE_AD = "SimpleAD" +} + +/** + * + *

The specified directory is unavailable or could not be found.

+ * + */ +export interface DirectoryUnavailableException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "DirectoryUnavailableException"; + $fault: "client"; + /** + * + *

The descriptive message for the exception.

+ * + */ + Message?: string; + + /** + * + *

The AWS request identifier.

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

Contains VPC information for the CreateDirectory or CreateMicrosoftAD operation.

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

The identifiers of the subnets for the directory servers. The two subnets must be in different Availability Zones. AWS Directory Service creates a directory server and a DNS server in each of these subnets.

+ * + */ + SubnetIds: Array | undefined; + + /** + * + *

The identifier of the VPC in which to create the directory.

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

Contains information about the directory.

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

The list of Availability Zones that the directory is in.

+ * + */ + AvailabilityZones?: Array; + + /** + * + *

The domain controller security group identifier for the directory.

+ * + */ + SecurityGroupId?: string; + + /** + * + *

The identifiers of the subnets for the directory servers.

+ * + */ + SubnetIds?: Array; + + /** + * + *

The identifier of the VPC that the directory is in.

+ * + */ + VpcId?: string; +} + +export namespace DirectoryVpcSettingsDescription { + export function isa(o: any): o is DirectoryVpcSettingsDescription { + return _smithy.isa(o, "DirectoryVpcSettingsDescription"); + } +} + +export interface DisableLDAPSRequest { + __type?: "DisableLDAPSRequest"; + /** + * + *

The identifier of the directory.

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

The type of LDAP security that the customer wants to enable. The security can be either + * server or client, but currently only the default Client is supported.

+ * + */ + Type?: LDAPSType | string; +} + +export namespace DisableLDAPSRequest { + export function isa(o: any): o is DisableLDAPSRequest { + return _smithy.isa(o, "DisableLDAPSRequest"); + } +} + +export interface DisableLDAPSResult extends $MetadataBearer { + __type?: "DisableLDAPSResult"; +} + +export namespace DisableLDAPSResult { + export function isa(o: any): o is DisableLDAPSResult { + return _smithy.isa(o, "DisableLDAPSResult"); + } +} + +/** + * + *

Contains the inputs for the DisableRadius operation.

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

The identifier of the directory for which to disable MFA.

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

Contains the results of the DisableRadius operation.

+ * + */ +export interface DisableRadiusResult extends $MetadataBearer { + __type?: "DisableRadiusResult"; +} + +export namespace DisableRadiusResult { + export function isa(o: any): o is DisableRadiusResult { + return _smithy.isa(o, "DisableRadiusResult"); + } +} + +/** + * + *

Contains the inputs for the DisableSso operation.

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

The identifier of the directory for which to disable single-sign on.

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

The password of an alternate account to use to disable single-sign on. This is only used + * for AD Connector directories. For more information, see the UserName parameter.

+ * + */ + Password?: string; + + /** + * + *

The username of an alternate account to use to disable single-sign on. This is only used for AD Connector directories. This account must have privileges to remove a service principal name.

+ *

If the AD Connector service account does not have privileges to remove a service principal + * name, you can specify an alternate account with the UserName and Password + * parameters. These credentials are only used to disable single sign-on and are not stored by + * the service. The AD Connector service account is not changed.

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

Contains the results of the DisableSso operation.

+ * + */ +export interface DisableSsoResult extends $MetadataBearer { + __type?: "DisableSsoResult"; +} + +export namespace DisableSsoResult { + export function isa(o: any): o is DisableSsoResult { + return _smithy.isa(o, "DisableSsoResult"); + } +} + +/** + * + *

Contains information about the domain controllers for a specified directory.

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

The Availability Zone where the domain controller is located.

+ * + */ + AvailabilityZone?: string; + + /** + * + *

Identifier of the directory where the domain controller resides.

+ * + */ + DirectoryId?: string; + + /** + * + *

The IP address of the domain controller.

+ * + */ + DnsIpAddr?: string; + + /** + * + *

Identifies a specific domain controller in the directory.

+ * + */ + DomainControllerId?: string; + + /** + * + *

Specifies when the domain controller was created.

+ * + */ + LaunchTime?: Date; + + /** + * + *

The status of the domain controller.

+ * + */ + Status?: DomainControllerStatus | string; + + /** + * + *

The date and time that the status was last updated.

+ * + */ + StatusLastUpdatedDateTime?: Date; + + /** + * + *

A description of the domain controller state.

+ * + */ + StatusReason?: string; + + /** + * + *

Identifier of the subnet in the VPC that contains the domain controller.

+ * + */ + SubnetId?: string; + + /** + * + *

The identifier of the VPC that contains the domain controller.

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

The maximum allowed number of domain controllers per directory was exceeded. The default limit per directory is 20 domain controllers.

+ * + */ +export interface DomainControllerLimitExceededException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "DomainControllerLimitExceededException"; + $fault: "client"; + /** + * + *

The descriptive message for the exception.

+ * + */ + Message?: string; + + /** + * + *

The AWS request identifier.

+ * + */ + RequestId?: string; +} + +export namespace DomainControllerLimitExceededException { + export function isa(o: any): o is DomainControllerLimitExceededException { + return _smithy.isa(o, "DomainControllerLimitExceededException"); + } +} + +export enum DomainControllerStatus { + ACTIVE = "Active", + CREATING = "Creating", + DELETED = "Deleted", + DELETING = "Deleting", + FAILED = "Failed", + IMPAIRED = "Impaired", + RESTORING = "Restoring" +} + +export interface EnableLDAPSRequest { + __type?: "EnableLDAPSRequest"; + /** + * + *

The identifier of the directory.

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

The type of LDAP security the customer wants to enable. The security can be either server + * or client, but currently only the default Client is supported.

+ * + */ + Type?: LDAPSType | string; +} + +export namespace EnableLDAPSRequest { + export function isa(o: any): o is EnableLDAPSRequest { + return _smithy.isa(o, "EnableLDAPSRequest"); + } +} + +export interface EnableLDAPSResult extends $MetadataBearer { + __type?: "EnableLDAPSResult"; +} + +export namespace EnableLDAPSResult { + export function isa(o: any): o is EnableLDAPSResult { + return _smithy.isa(o, "EnableLDAPSResult"); + } +} + +/** + * + *

Contains the inputs for the EnableRadius operation.

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

The identifier of the directory for which to enable MFA.

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

A RadiusSettings object that contains information about the RADIUS server.

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

Contains the results of the EnableRadius operation.

+ * + */ +export interface EnableRadiusResult extends $MetadataBearer { + __type?: "EnableRadiusResult"; +} + +export namespace EnableRadiusResult { + export function isa(o: any): o is EnableRadiusResult { + return _smithy.isa(o, "EnableRadiusResult"); + } +} + +/** + * + *

Contains the inputs for the EnableSso operation.

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

The identifier of the directory for which to enable single-sign on.

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

The password of an alternate account to use to enable single-sign on. This is only used for + * AD Connector directories. For more information, see the UserName parameter.

+ * + */ + Password?: string; + + /** + * + *

The username of an alternate account to use to enable single-sign on. This is only used for AD Connector directories. This account must have privileges to add a service principal name.

+ *

If the AD Connector service account does not have privileges to add a service principal + * name, you can specify an alternate account with the UserName and Password + * parameters. These credentials are only used to enable single sign-on and are not stored by + * the service. The AD Connector service account is not changed.

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

Contains the results of the EnableSso operation.

+ * + */ +export interface EnableSsoResult extends $MetadataBearer { + __type?: "EnableSsoResult"; +} + +export namespace EnableSsoResult { + export function isa(o: any): o is EnableSsoResult { + return _smithy.isa(o, "EnableSsoResult"); + } +} + +/** + * + *

The specified entity already exists.

+ * + */ +export interface EntityAlreadyExistsException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "EntityAlreadyExistsException"; + $fault: "client"; + /** + * + *

The descriptive message for the exception.

+ * + */ + Message?: string; + + /** + * + *

The AWS request identifier.

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

The specified entity could not be found.

+ * + */ +export interface EntityDoesNotExistException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "EntityDoesNotExistException"; + $fault: "client"; + /** + * + *

The descriptive message for the exception.

+ * + */ + Message?: string; + + /** + * + *

The AWS request identifier.

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

Information about SNS topic and AWS Directory Service directory associations.

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

The date and time of when you associated your directory with the SNS topic.

+ * + */ + CreatedDateTime?: Date; + + /** + * + *

The Directory ID of an AWS Directory Service directory that will publish status messages to an SNS topic.

+ * + */ + DirectoryId?: string; + + /** + * + *

The topic registration status.

+ * + */ + Status?: TopicStatus | string; + + /** + * + *

The SNS topic ARN (Amazon Resource Name).

+ * + */ + TopicArn?: string; + + /** + * + *

The name of an AWS SNS topic the receives status messages from the directory.

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

Contains the inputs for the GetDirectoryLimits operation.

+ * + */ +export interface GetDirectoryLimitsRequest { + __type?: "GetDirectoryLimitsRequest"; +} + +export namespace GetDirectoryLimitsRequest { + export function isa(o: any): o is GetDirectoryLimitsRequest { + return _smithy.isa(o, "GetDirectoryLimitsRequest"); + } +} + +/** + * + *

Contains the results of the GetDirectoryLimits operation.

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

A DirectoryLimits object that contains the directory limits for the + * current rRegion.

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

Contains the inputs for the GetSnapshotLimits operation.

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

Contains the identifier of the directory to obtain the limits for.

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

Contains the results of the GetSnapshotLimits operation.

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

A SnapshotLimits object that contains the manual snapshot limits for the specified + * directory.

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

The account does not have sufficient permission to perform the operation.

+ * + */ +export interface InsufficientPermissionsException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "InsufficientPermissionsException"; + $fault: "client"; + /** + * + *

The descriptive message for the exception.

+ * + */ + Message?: string; + + /** + * + *

The AWS request identifier.

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

The certificate PEM that was provided has incorrect encoding.

+ * + */ +export interface InvalidCertificateException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "InvalidCertificateException"; + $fault: "client"; + /** + * + *

The descriptive message for the exception.

+ * + */ + Message?: string; + + /** + * + *

The AWS request identifier.

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

The LDAP activities could not be performed because they are limited by the LDAPS + * status.

+ * + */ +export interface InvalidLDAPSStatusException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "InvalidLDAPSStatusException"; + $fault: "client"; + /** + * + *

The descriptive message for the exception.

+ * + */ + Message?: string; + + /** + * + *

The AWS request identifier.

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

The NextToken value is not valid.

+ * + */ +export interface InvalidNextTokenException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "InvalidNextTokenException"; + $fault: "client"; + /** + * + *

The descriptive message for the exception.

+ * + */ + Message?: string; + + /** + * + *

The AWS request identifier.

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

One or more parameters are not valid.

+ * + */ +export interface InvalidParameterException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "InvalidParameterException"; + $fault: "client"; + /** + * + *

The descriptive message for the exception.

+ * + */ + Message?: string; + + /** + * + *

The AWS request identifier.

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

The new password provided by the user does not meet the password complexity requirements defined in your directory.

+ * + */ +export interface InvalidPasswordException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "InvalidPasswordException"; + $fault: "client"; + /** + * + *

The descriptive message for the exception.

+ * + */ + Message?: string; + + /** + * + *

The AWS request identifier.

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

The specified shared target is not valid.

+ * + */ +export interface InvalidTargetException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "InvalidTargetException"; + $fault: "client"; + /** + * + *

The descriptive message for the exception.

+ * + */ + Message?: string; + + /** + * + *

The AWS request identifier.

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

IP address block. This is often the address block of the DNS server used for your on-premises domain.

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

IP address block using CIDR format, for example 10.0.0.0/24. This is often the address block of the DNS server used for your on-premises domain. For a single IP address use a CIDR address block with /32. For example 10.0.0.0/32.

+ * + */ + CidrIp?: string; + + /** + * + *

Description of the address block.

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

Information about one or more IP address blocks.

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

The date and time the address block was added to the directory.

+ * + */ + AddedDateTime?: Date; + + /** + * + *

IP address block in the IpRoute.

+ * + */ + CidrIp?: string; + + /** + * + *

Description of the IpRouteInfo.

+ * + */ + Description?: string; + + /** + * + *

Identifier (ID) of the directory associated with the IP addresses.

+ * + */ + DirectoryId?: string; + + /** + * + *

The status of the IP address block.

+ * + */ + IpRouteStatusMsg?: IpRouteStatusMsg | string; + + /** + * + *

The reason for the IpRouteStatusMsg.

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

The maximum allowed number of IP addresses was exceeded. The default limit is 100 IP address blocks.

+ * + */ +export interface IpRouteLimitExceededException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "IpRouteLimitExceededException"; + $fault: "client"; + /** + * + *

The descriptive message for the exception.

+ * + */ + Message?: string; + + /** + * + *

The AWS request identifier.

+ * + */ + RequestId?: string; +} + +export namespace IpRouteLimitExceededException { + export function isa(o: any): o is IpRouteLimitExceededException { + return _smithy.isa(o, "IpRouteLimitExceededException"); + } +} + +export enum IpRouteStatusMsg { + ADDED = "Added", + ADDING = "Adding", + ADD_FAILED = "AddFailed", + REMOVED = "Removed", + REMOVE_FAILED = "RemoveFailed", + REMOVING = "Removing" +} + +/** + * + *

Contains general information about the LDAPS settings.

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

The state of the LDAPS settings.

+ * + */ + LDAPSStatus?: LDAPSStatus | string; + + /** + * + *

Describes a state change for LDAPS.

+ * + */ + LDAPSStatusReason?: string; + + /** + * + *

The date and time when the LDAPS settings were last updated.

+ * + */ + LastUpdatedDateTime?: Date; +} + +export namespace LDAPSSettingInfo { + export function isa(o: any): o is LDAPSSettingInfo { + return _smithy.isa(o, "LDAPSSettingInfo"); + } +} + +export enum LDAPSStatus { + DISABLED = "Disabled", + ENABLED = "Enabled", + ENABLE_FAILED = "EnableFailed", + ENABLING = "Enabling" +} + +export enum LDAPSType { + CLIENT = "Client" +} + +export interface ListCertificatesRequest { + __type?: "ListCertificatesRequest"; + /** + * + *

The identifier of the directory.

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

The number of items that should show up on one page

+ * + */ + Limit?: number; + + /** + * + *

A token for requesting another page of certificates if the NextToken response + * element indicates that more certificates are available. Use the value of the returned + * NextToken element in your request until the token comes back as + * null. Pass null if this is the first call.

+ * + */ + NextToken?: string; +} + +export namespace ListCertificatesRequest { + export function isa(o: any): o is ListCertificatesRequest { + return _smithy.isa(o, "ListCertificatesRequest"); + } +} + +export interface ListCertificatesResult extends $MetadataBearer { + __type?: "ListCertificatesResult"; + /** + * + *

A list of certificates with basic details including certificate ID, certificate common + * name, certificate state.

+ * + */ + CertificatesInfo?: Array; + + /** + * + *

Indicates whether another page of certificates is available when the number of available + * certificates exceeds the page limit.

+ * + */ + NextToken?: string; +} + +export namespace ListCertificatesResult { + export function isa(o: any): o is ListCertificatesResult { + return _smithy.isa(o, "ListCertificatesResult"); + } +} + +export interface ListIpRoutesRequest { + __type?: "ListIpRoutesRequest"; + /** + * + *

Identifier (ID) of the directory for which you want to retrieve the IP addresses.

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

Maximum number of items to return. If this value is zero, the maximum number of items is specified by the limitations of the operation.

+ * + */ + Limit?: number; + + /** + * + *

The ListIpRoutes.NextToken value from a previous call to + * ListIpRoutes. Pass null if this is the first call.

+ * + */ + NextToken?: string; +} + +export namespace ListIpRoutesRequest { + export function isa(o: any): o is ListIpRoutesRequest { + return _smithy.isa(o, "ListIpRoutesRequest"); + } +} + +export interface ListIpRoutesResult extends $MetadataBearer { + __type?: "ListIpRoutesResult"; + /** + * + *

A list of IpRoutes.

+ * + */ + IpRoutesInfo?: Array; + + /** + * + *

If not null, more results are available. Pass this value for the NextToken parameter + * in a subsequent call to ListIpRoutes to retrieve the next set of items.

+ * + */ + NextToken?: string; +} + +export namespace ListIpRoutesResult { + export function isa(o: any): o is ListIpRoutesResult { + return _smithy.isa(o, "ListIpRoutesResult"); + } +} + +export interface ListLogSubscriptionsRequest { + __type?: "ListLogSubscriptionsRequest"; + /** + * + *

If a DirectoryID is provided, lists only the log subscription associated with that directory. If no DirectoryId is provided, lists all log subscriptions associated with your AWS account. If there are no log subscriptions for the AWS account or the directory, an empty list will be returned.

+ * + */ + DirectoryId?: string; + + /** + * + *

The maximum number of items returned.

+ * + */ + Limit?: number; + + /** + * + *

The token for the next set of items to return.

+ * + */ + NextToken?: string; +} + +export namespace ListLogSubscriptionsRequest { + export function isa(o: any): o is ListLogSubscriptionsRequest { + return _smithy.isa(o, "ListLogSubscriptionsRequest"); + } +} + +export interface ListLogSubscriptionsResult extends $MetadataBearer { + __type?: "ListLogSubscriptionsResult"; + /** + * + *

A list of active LogSubscription objects for calling the AWS account.

+ * + */ + LogSubscriptions?: Array; + + /** + * + *

The token for the next set of items to return.

+ * + */ + NextToken?: string; +} + +export namespace ListLogSubscriptionsResult { + export function isa(o: any): o is ListLogSubscriptionsResult { + return _smithy.isa(o, "ListLogSubscriptionsResult"); + } +} + +export interface ListSchemaExtensionsRequest { + __type?: "ListSchemaExtensionsRequest"; + /** + * + *

The identifier of the directory from which to retrieve the schema extension information.

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

The maximum number of items to return.

+ * + */ + Limit?: number; + + /** + * + *

The ListSchemaExtensions.NextToken value from a previous call to ListSchemaExtensions. Pass null if this is the first call.

+ * + */ + NextToken?: string; +} + +export namespace ListSchemaExtensionsRequest { + export function isa(o: any): o is ListSchemaExtensionsRequest { + return _smithy.isa(o, "ListSchemaExtensionsRequest"); + } +} + +export interface ListSchemaExtensionsResult extends $MetadataBearer { + __type?: "ListSchemaExtensionsResult"; + /** + * + *

If not null, more results are available. Pass this value for the NextToken parameter in a subsequent call to ListSchemaExtensions to retrieve the next set of items.

+ * + */ + NextToken?: string; + + /** + * + *

Information about the schema extensions applied to the directory.

+ * + */ + SchemaExtensionsInfo?: Array; +} + +export namespace ListSchemaExtensionsResult { + export function isa(o: any): o is ListSchemaExtensionsResult { + return _smithy.isa(o, "ListSchemaExtensionsResult"); + } +} + +export interface ListTagsForResourceRequest { + __type?: "ListTagsForResourceRequest"; + /** + * + *

Reserved for future use.

+ * + * + */ + Limit?: number; + + /** + * + *

Reserved for future use.

+ * + * + */ + NextToken?: string; + + /** + * + *

Identifier (ID) of the directory for which you want to retrieve tags.

+ * + */ + ResourceId: string | undefined; +} + +export namespace ListTagsForResourceRequest { + export function isa(o: any): o is ListTagsForResourceRequest { + return _smithy.isa(o, "ListTagsForResourceRequest"); + } +} + +export interface ListTagsForResourceResult extends $MetadataBearer { + __type?: "ListTagsForResourceResult"; + /** + * + *

Reserved for future use.

+ * + * + */ + NextToken?: string; + + /** + * + *

List of tags returned by the ListTagsForResource operation.

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

Represents a log subscription, which tracks real-time data from a chosen log group to a specified destination.

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

Identifier (ID) of the directory that you want to associate with the log subscription.

+ * + */ + DirectoryId?: string; + + /** + * + *

The name of the log group.

+ * + */ + LogGroupName?: string; + + /** + * + *

The date and time that the log subscription was created.

+ * + */ + SubscriptionCreatedDateTime?: Date; +} + +export namespace LogSubscription { + export function isa(o: any): o is LogSubscription { + return _smithy.isa(o, "LogSubscription"); + } +} + +/** + * + *

The LDAP activities could not be performed because at least one valid certificate must be + * registered with the system.

+ * + */ +export interface NoAvailableCertificateException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "NoAvailableCertificateException"; + $fault: "client"; + /** + * + *

The descriptive message for the exception.

+ * + */ + Message?: string; + + /** + * + *

The AWS request identifier.

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

Exception encountered while trying to access your AWS organization.

+ * + */ +export interface OrganizationsException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "OrganizationsException"; + $fault: "client"; + /** + * + *

The descriptive message for the exception.

+ * + */ + Message?: string; + + /** + * + *

The AWS request identifier.

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

Describes the directory owner account details that have been shared to the directory consumer account.

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

Identifier of the directory owner account.

+ * + */ + AccountId?: string; + + /** + * + *

Identifier of the AWS Managed Microsoft AD directory in the directory owner account.

+ * + */ + DirectoryId?: string; + + /** + * + *

IP address of the directory’s domain controllers.

+ * + */ + DnsIpAddrs?: Array; + + /** + * + *

A RadiusSettings object that contains information about the RADIUS server.

+ * + */ + RadiusSettings?: RadiusSettings; + + /** + * + *

Information about the status of the RADIUS server.

+ * + */ + RadiusStatus?: RadiusStatus | string; + + /** + * + *

Information about the VPC settings for the directory.

+ * + */ + VpcSettings?: DirectoryVpcSettingsDescription; +} + +export namespace OwnerDirectoryDescription { + export function isa(o: any): o is OwnerDirectoryDescription { + return _smithy.isa(o, "OwnerDirectoryDescription"); + } +} + +export enum RadiusAuthenticationProtocol { + CHAP = "CHAP", + MSCHAPV1 = "MS-CHAPv1", + MSCHAPV2 = "MS-CHAPv2", + PAP = "PAP" +} + +/** + * + *

Contains information about a Remote Authentication Dial In User Service (RADIUS) server.

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

The protocol specified for your RADIUS endpoints.

+ * + */ + AuthenticationProtocol?: RadiusAuthenticationProtocol | string; + + /** + * + *

Not currently used.

+ * + */ + DisplayLabel?: string; + + /** + * + *

The port that your RADIUS server is using for communications. Your on-premises network must allow inbound traffic over this port from the AWS Directory Service servers.

+ * + */ + RadiusPort?: number; + + /** + * + *

The maximum number of times that communication with the RADIUS server is attempted.

+ * + */ + RadiusRetries?: number; + + /** + * + *

An array of strings that contains the IP addresses of the RADIUS server endpoints, or the IP addresses of your RADIUS server load balancer.

+ * + */ + RadiusServers?: Array; + + /** + * + *

The amount of time, in seconds, to wait for the RADIUS server to respond.

+ * + */ + RadiusTimeout?: number; + + /** + * + *

Required for enabling RADIUS on the directory.

+ * + */ + SharedSecret?: string; + + /** + * + *

Not currently used.

+ * + */ + UseSameUsername?: boolean; +} + +export namespace RadiusSettings { + export function isa(o: any): o is RadiusSettings { + return _smithy.isa(o, "RadiusSettings"); + } +} + +export enum RadiusStatus { + COMPLETED = "Completed", + CREATING = "Creating", + FAILED = "Failed" +} + +export interface RegisterCertificateRequest { + __type?: "RegisterCertificateRequest"; + /** + * + *

The certificate PEM string that needs to be registered.

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

The identifier of the directory.

+ * + */ + DirectoryId: string | undefined; +} + +export namespace RegisterCertificateRequest { + export function isa(o: any): o is RegisterCertificateRequest { + return _smithy.isa(o, "RegisterCertificateRequest"); + } +} + +export interface RegisterCertificateResult extends $MetadataBearer { + __type?: "RegisterCertificateResult"; + /** + * + *

The identifier of the certificate.

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

Registers a new event topic.

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

The Directory ID that will publish status messages to the SNS topic.

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

The SNS topic name to which the directory will publish status messages. This SNS topic must be in the same region as the specified Directory ID.

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

The result of a RegisterEventTopic request.

+ * + */ +export interface RegisterEventTopicResult extends $MetadataBearer { + __type?: "RegisterEventTopicResult"; +} + +export namespace RegisterEventTopicResult { + export function isa(o: any): o is RegisterEventTopicResult { + return _smithy.isa(o, "RegisterEventTopicResult"); + } +} + +export interface RejectSharedDirectoryRequest { + __type?: "RejectSharedDirectoryRequest"; + /** + * + *

Identifier of the shared directory in the directory consumer account. This identifier is different for each directory owner account.

+ * + */ + SharedDirectoryId: string | undefined; +} + +export namespace RejectSharedDirectoryRequest { + export function isa(o: any): o is RejectSharedDirectoryRequest { + return _smithy.isa(o, "RejectSharedDirectoryRequest"); + } +} + +export interface RejectSharedDirectoryResult extends $MetadataBearer { + __type?: "RejectSharedDirectoryResult"; + /** + * + *

Identifier of the shared directory in the directory consumer account.

+ * + */ + SharedDirectoryId?: string; +} + +export namespace RejectSharedDirectoryResult { + export function isa(o: any): o is RejectSharedDirectoryResult { + return _smithy.isa(o, "RejectSharedDirectoryResult"); + } +} + +export interface RemoveIpRoutesRequest { + __type?: "RemoveIpRoutesRequest"; + /** + * + *

IP address blocks that you want to remove.

+ * + */ + CidrIps: Array | undefined; + + /** + * + *

Identifier (ID) of the directory from which you want to remove the IP addresses.

+ * + */ + DirectoryId: string | undefined; +} + +export namespace RemoveIpRoutesRequest { + export function isa(o: any): o is RemoveIpRoutesRequest { + return _smithy.isa(o, "RemoveIpRoutesRequest"); + } +} + +export interface RemoveIpRoutesResult extends $MetadataBearer { + __type?: "RemoveIpRoutesResult"; +} + +export namespace RemoveIpRoutesResult { + export function isa(o: any): o is RemoveIpRoutesResult { + return _smithy.isa(o, "RemoveIpRoutesResult"); + } +} + +export interface RemoveTagsFromResourceRequest { + __type?: "RemoveTagsFromResourceRequest"; + /** + * + *

Identifier (ID) of the directory from which to remove the tag.

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

The tag key (name) of the tag to be removed.

+ * + */ + TagKeys: Array | undefined; +} + +export namespace RemoveTagsFromResourceRequest { + export function isa(o: any): o is RemoveTagsFromResourceRequest { + return _smithy.isa(o, "RemoveTagsFromResourceRequest"); + } +} + +export interface RemoveTagsFromResourceResult extends $MetadataBearer { + __type?: "RemoveTagsFromResourceResult"; +} + +export namespace RemoveTagsFromResourceResult { + export function isa(o: any): o is RemoveTagsFromResourceResult { + return _smithy.isa(o, "RemoveTagsFromResourceResult"); + } +} + +export enum ReplicationScope { + Domain = "Domain" +} + +export interface ResetUserPasswordRequest { + __type?: "ResetUserPasswordRequest"; + /** + * + *

Identifier of the AWS Managed Microsoft AD or Simple AD directory in which the user resides.

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

The new password that will be reset.

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

The user name of the user whose password will be reset.

+ * + */ + UserName: string | undefined; +} + +export namespace ResetUserPasswordRequest { + export function isa(o: any): o is ResetUserPasswordRequest { + return _smithy.isa(o, "ResetUserPasswordRequest"); + } +} + +export interface ResetUserPasswordResult extends $MetadataBearer { + __type?: "ResetUserPasswordResult"; +} + +export namespace ResetUserPasswordResult { + export function isa(o: any): o is ResetUserPasswordResult { + return _smithy.isa(o, "ResetUserPasswordResult"); + } +} + +/** + * + *

An object representing the inputs for the RestoreFromSnapshot operation.

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

The identifier of the snapshot to restore from.

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

Contains the results of the RestoreFromSnapshot operation.

+ * + */ +export interface RestoreFromSnapshotResult extends $MetadataBearer { + __type?: "RestoreFromSnapshotResult"; +} + +export namespace RestoreFromSnapshotResult { + export function isa(o: any): o is RestoreFromSnapshotResult { + return _smithy.isa(o, "RestoreFromSnapshotResult"); + } +} + +/** + * + *

Information about a schema extension.

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

A description of the schema extension.

+ * + */ + Description?: string; + + /** + * + *

The identifier of the directory to which the schema extension is applied.

+ * + */ + DirectoryId?: string; + + /** + * + *

The date and time that the schema extension was completed.

+ * + */ + EndDateTime?: Date; + + /** + * + *

The identifier of the schema extension.

+ * + */ + SchemaExtensionId?: string; + + /** + * + *

The current status of the schema extension.

+ * + */ + SchemaExtensionStatus?: SchemaExtensionStatus | string; + + /** + * + *

The reason for the SchemaExtensionStatus.

+ * + */ + SchemaExtensionStatusReason?: string; + + /** + * + *

The date and time that the schema extension started being applied to the directory.

+ * + */ + StartDateTime?: Date; +} + +export namespace SchemaExtensionInfo { + export function isa(o: any): o is SchemaExtensionInfo { + return _smithy.isa(o, "SchemaExtensionInfo"); + } +} + +export enum SchemaExtensionStatus { + CANCELLED = "Cancelled", + CANCEL_IN_PROGRESS = "CancelInProgress", + COMPLETED = "Completed", + CREATING_SNAPSHOT = "CreatingSnapshot", + FAILED = "Failed", + INITIALIZING = "Initializing", + REPLICATING = "Replicating", + ROLLBACK_IN_PROGRESS = "RollbackInProgress", + UPDATING_SCHEMA = "UpdatingSchema" +} + +export enum SelectiveAuth { + DISABLED = "Disabled", + ENABLED = "Enabled" +} + +/** + * + *

An exception has occurred in AWS Directory Service.

+ * + */ +export interface ServiceException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "ServiceException"; + $fault: "server"; + /** + * + *

The descriptive message for the exception.

+ * + */ + Message?: string; + + /** + * + *

The AWS request identifier.

+ * + */ + RequestId?: string; +} + +export namespace ServiceException { + export function isa(o: any): o is ServiceException { + return _smithy.isa(o, "ServiceException"); + } +} + +export interface ShareDirectoryRequest { + __type?: "ShareDirectoryRequest"; + /** + * + *

Identifier of the AWS Managed Microsoft AD directory that you want to share with other AWS accounts.

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

The method used when sharing a directory to determine whether the directory should be + * shared within your AWS organization (ORGANIZATIONS) or with any AWS account by + * sending a directory sharing request (HANDSHAKE).

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

A directory share request that is sent by the directory owner to the directory consumer. + * The request includes a typed message to help the directory consumer administrator determine + * whether to approve or reject the share invitation.

+ * + */ + ShareNotes?: string; + + /** + * + *

Identifier for the directory consumer account with whom the directory is to be shared.

+ * + */ + ShareTarget: ShareTarget | undefined; +} + +export namespace ShareDirectoryRequest { + export function isa(o: any): o is ShareDirectoryRequest { + return _smithy.isa(o, "ShareDirectoryRequest"); + } +} + +export interface ShareDirectoryResult extends $MetadataBearer { + __type?: "ShareDirectoryResult"; + /** + * + *

Identifier of the directory that is stored in the directory consumer account that is + * shared from the specified directory (DirectoryId).

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

The maximum number of AWS accounts that you can share with this directory has been reached.

+ * + */ +export interface ShareLimitExceededException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "ShareLimitExceededException"; + $fault: "client"; + /** + * + *

The descriptive message for the exception.

+ * + */ + Message?: string; + + /** + * + *

The AWS request identifier.

+ * + */ + RequestId?: string; +} + +export namespace ShareLimitExceededException { + export function isa(o: any): o is ShareLimitExceededException { + return _smithy.isa(o, "ShareLimitExceededException"); + } +} + +export enum ShareMethod { + HANDSHAKE = "HANDSHAKE", + ORGANIZATIONS = "ORGANIZATIONS" +} + +export enum ShareStatus { + DELETED = "Deleted", + DELETING = "Deleting", + PENDING_ACCEPTANCE = "PendingAcceptance", + REJECTED = "Rejected", + REJECTING = "Rejecting", + REJECT_FAILED = "RejectFailed", + SHARED = "Shared", + SHARE_FAILED = "ShareFailed", + SHARING = "Sharing" +} + +/** + * + *

Identifier that contains details about the directory consumer account.

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

Identifier of the directory consumer account.

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

Type of identifier to be used in the Id field.

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

Details about the shared directory in the directory owner account for which the share request in the directory consumer account has been accepted.

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

The date and time that the shared directory was created.

+ * + */ + CreatedDateTime?: Date; + + /** + * + *

The date and time that the shared directory was last updated.

+ * + */ + LastUpdatedDateTime?: Date; + + /** + * + *

Identifier of the directory owner account, which contains the directory that has been + * shared to the consumer account.

+ * + */ + OwnerAccountId?: string; + + /** + * + *

Identifier of the directory in the directory owner account.

+ * + */ + OwnerDirectoryId?: string; + + /** + * + *

The method used when sharing a directory to determine whether the directory should be + * shared within your AWS organization (ORGANIZATIONS) or with any AWS account by + * sending a shared directory request (HANDSHAKE).

+ * + */ + ShareMethod?: ShareMethod | string; + + /** + * + *

A directory share request that is sent by the directory owner to the directory consumer. + * The request includes a typed message to help the directory consumer administrator determine + * whether to approve or reject the share invitation.

+ * + */ + ShareNotes?: string; + + /** + * + *

Current directory status of the shared AWS Managed Microsoft AD directory.

+ * + */ + ShareStatus?: ShareStatus | string; + + /** + * + *

Identifier of the directory consumer account that has access to the shared directory (OwnerDirectoryId) in the directory owner account.

+ * + */ + SharedAccountId?: string; + + /** + * + *

Identifier of the shared directory in the directory consumer account. This identifier is different for each directory owner account.

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

Describes a directory snapshot.

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

The directory identifier.

+ * + */ + DirectoryId?: string; + + /** + * + *

The descriptive name of the snapshot.

+ * + */ + Name?: string; + + /** + * + *

The snapshot identifier.

+ * + */ + SnapshotId?: string; + + /** + * + *

The date and time that the snapshot was taken.

+ * + */ + StartTime?: Date; + + /** + * + *

The snapshot status.

+ * + */ + Status?: SnapshotStatus | string; + + /** + * + *

The snapshot type.

+ * + */ + Type?: SnapshotType | string; +} + +export namespace Snapshot { + export function isa(o: any): o is Snapshot { + return _smithy.isa(o, "Snapshot"); + } +} + +/** + * + *

The maximum number of manual snapshots for the directory has been reached. You can + * use the GetSnapshotLimits operation to determine the snapshot limits for a + * directory.

+ * + */ +export interface SnapshotLimitExceededException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "SnapshotLimitExceededException"; + $fault: "client"; + /** + * + *

The descriptive message for the exception.

+ * + */ + Message?: string; + + /** + * + *

The AWS request identifier.

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

Contains manual snapshot limit information for a directory.

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

The current number of manual snapshots of the directory.

+ * + */ + ManualSnapshotsCurrentCount?: number; + + /** + * + *

The maximum number of manual snapshots allowed.

+ * + */ + ManualSnapshotsLimit?: number; + + /** + * + *

Indicates if the manual snapshot limit has been reached.

+ * + */ + ManualSnapshotsLimitReached?: boolean; +} + +export namespace SnapshotLimits { + export function isa(o: any): o is SnapshotLimits { + return _smithy.isa(o, "SnapshotLimits"); + } +} + +export enum SnapshotStatus { + COMPLETED = "Completed", + CREATING = "Creating", + FAILED = "Failed" +} + +export enum SnapshotType { + AUTO = "Auto", + MANUAL = "Manual" +} + +export interface StartSchemaExtensionRequest { + __type?: "StartSchemaExtensionRequest"; + /** + * + *

If true, creates a snapshot of the directory before applying the schema extension.

+ * + */ + CreateSnapshotBeforeSchemaExtension: boolean | undefined; + + /** + * + *

A description of the schema extension.

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

The identifier of the directory for which the schema extension will be applied to.

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

The LDIF file represented as a string. To construct the LdifContent string, precede each line as it would be formatted in an ldif file with \n. See the example request below for more details. The file size can be no larger than 1MB.

+ * + */ + LdifContent: string | undefined; +} + +export namespace StartSchemaExtensionRequest { + export function isa(o: any): o is StartSchemaExtensionRequest { + return _smithy.isa(o, "StartSchemaExtensionRequest"); + } +} + +export interface StartSchemaExtensionResult extends $MetadataBearer { + __type?: "StartSchemaExtensionResult"; + /** + * + *

The identifier of the schema extension that will be applied.

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

Metadata assigned to a directory consisting of a key-value pair.

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

Required name of the tag. The string value can be Unicode characters and cannot be prefixed with "aws:". The string can contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$").

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

The optional value of the tag. The string value can be Unicode characters. The string can contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$").

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

The maximum allowed number of tags was exceeded.

+ * + */ +export interface TagLimitExceededException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "TagLimitExceededException"; + $fault: "client"; + /** + * + *

The descriptive message for the exception.

+ * + */ + Message?: string; + + /** + * + *

The AWS request identifier.

+ * + */ + RequestId?: string; +} + +export namespace TagLimitExceededException { + export function isa(o: any): o is TagLimitExceededException { + return _smithy.isa(o, "TagLimitExceededException"); + } +} + +export enum TargetType { + ACCOUNT = "ACCOUNT" +} + +export enum TopicStatus { + DELETED = "Deleted", + FAILED = "Failed", + REGISTERED = "Registered", + TOPIC_NOT_FOUND = "Topic not found" +} + +/** + * + *

Describes a trust relationship between an AWS Managed Microsoft AD directory and an external domain.

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

The date and time that the trust relationship was created.

+ * + */ + CreatedDateTime?: Date; + + /** + * + *

The Directory ID of the AWS directory involved in the trust relationship.

+ * + */ + DirectoryId?: string; + + /** + * + *

The date and time that the trust relationship was last updated.

+ * + */ + LastUpdatedDateTime?: Date; + + /** + * + *

The Fully Qualified Domain Name (FQDN) of the external domain involved in the trust relationship.

+ * + */ + RemoteDomainName?: string; + + /** + * + *

Current state of selective authentication for the trust.

+ * + */ + SelectiveAuth?: SelectiveAuth | string; + + /** + * + *

The date and time that the TrustState was last updated.

+ * + */ + StateLastUpdatedDateTime?: Date; + + /** + * + *

The trust relationship direction.

+ * + */ + TrustDirection?: TrustDirection | string; + + /** + * + *

The unique ID of the trust relationship.

+ * + */ + TrustId?: string; + + /** + * + *

The trust relationship state.

+ * + */ + TrustState?: TrustState | string; + + /** + * + *

The reason for the TrustState.

+ * + */ + TrustStateReason?: string; + + /** + * + *

The trust relationship type. Forest is the default.

+ * + */ + TrustType?: TrustType | string; +} + +export namespace Trust { + export function isa(o: any): o is Trust { + return _smithy.isa(o, "Trust"); + } +} + +export enum TrustDirection { + ONE_WAY_INCOMING = "One-Way: Incoming", + ONE_WAY_OUTGOING = "One-Way: Outgoing", + TWO_WAY = "Two-Way" +} + +export enum TrustState { + CREATED = "Created", + CREATING = "Creating", + DELETED = "Deleted", + DELETING = "Deleting", + FAILED = "Failed", + UPDATED = "Updated", + UPDATE_FAILED = "UpdateFailed", + UPDATING = "Updating", + VERIFIED = "Verified", + VERIFYING = "Verifying", + VERIFY_FAILED = "VerifyFailed" +} + +export enum TrustType { + EXTERNAL = "External", + FOREST = "Forest" +} + +export interface UnshareDirectoryRequest { + __type?: "UnshareDirectoryRequest"; + /** + * + *

The identifier of the AWS Managed Microsoft AD directory that you want to stop sharing.

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

Identifier for the directory consumer account with whom the directory has to be unshared.

+ * + */ + UnshareTarget: UnshareTarget | undefined; +} + +export namespace UnshareDirectoryRequest { + export function isa(o: any): o is UnshareDirectoryRequest { + return _smithy.isa(o, "UnshareDirectoryRequest"); + } +} + +export interface UnshareDirectoryResult extends $MetadataBearer { + __type?: "UnshareDirectoryResult"; + /** + * + *

Identifier of the directory stored in the directory consumer account that is to be unshared from the specified directory (DirectoryId).

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

Identifier that contains details about the directory consumer account with whom the directory is being unshared.

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

Identifier of the directory consumer account.

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

Type of identifier to be used in the Id field.

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

The operation is not supported.

+ * + */ +export interface UnsupportedOperationException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "UnsupportedOperationException"; + $fault: "client"; + /** + * + *

The descriptive message for the exception.

+ * + */ + Message?: string; + + /** + * + *

The AWS request identifier.

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

Updates a conditional forwarder.

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

The directory ID of the AWS directory for which to update the conditional forwarder.

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

The updated IP addresses of the remote DNS server associated with the conditional forwarder.

+ * + */ + DnsIpAddrs: Array | undefined; + + /** + * + *

The fully qualified domain name (FQDN) of the remote domain with which you will set up a trust relationship.

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

The result of an UpdateConditionalForwarder request.

+ * + */ +export interface UpdateConditionalForwarderResult extends $MetadataBearer { + __type?: "UpdateConditionalForwarderResult"; +} + +export namespace UpdateConditionalForwarderResult { + export function isa(o: any): o is UpdateConditionalForwarderResult { + return _smithy.isa(o, "UpdateConditionalForwarderResult"); + } +} + +export interface UpdateNumberOfDomainControllersRequest { + __type?: "UpdateNumberOfDomainControllersRequest"; + /** + * + *

The number of domain controllers desired in the directory.

+ * + */ + DesiredNumber: number | undefined; + + /** + * + *

Identifier of the directory to which the domain controllers will be added or removed.

+ * + */ + DirectoryId: string | undefined; +} + +export namespace UpdateNumberOfDomainControllersRequest { + export function isa(o: any): o is UpdateNumberOfDomainControllersRequest { + return _smithy.isa(o, "UpdateNumberOfDomainControllersRequest"); + } +} + +export interface UpdateNumberOfDomainControllersResult extends $MetadataBearer { + __type?: "UpdateNumberOfDomainControllersResult"; +} + +export namespace UpdateNumberOfDomainControllersResult { + export function isa(o: any): o is UpdateNumberOfDomainControllersResult { + return _smithy.isa(o, "UpdateNumberOfDomainControllersResult"); + } +} + +/** + * + *

Contains the inputs for the UpdateRadius operation.

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

The identifier of the directory for which to update the RADIUS server information.

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

A RadiusSettings object that contains information about the RADIUS server.

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

Contains the results of the UpdateRadius operation.

+ * + */ +export interface UpdateRadiusResult extends $MetadataBearer { + __type?: "UpdateRadiusResult"; +} + +export namespace UpdateRadiusResult { + export function isa(o: any): o is UpdateRadiusResult { + return _smithy.isa(o, "UpdateRadiusResult"); + } +} + +export interface UpdateTrustRequest { + __type?: "UpdateTrustRequest"; + /** + * + *

Updates selective authentication for the trust.

+ * + */ + SelectiveAuth?: SelectiveAuth | string; + + /** + * + *

Identifier of the trust relationship.

+ * + */ + TrustId: string | undefined; +} + +export namespace UpdateTrustRequest { + export function isa(o: any): o is UpdateTrustRequest { + return _smithy.isa(o, "UpdateTrustRequest"); + } +} + +export interface UpdateTrustResult extends $MetadataBearer { + __type?: "UpdateTrustResult"; + /** + * + *

The AWS request identifier.

+ * + */ + RequestId?: string; + + /** + * + *

Identifier of the trust relationship.

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

The user provided a username that does not exist in your directory.

+ * + */ +export interface UserDoesNotExistException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "UserDoesNotExistException"; + $fault: "client"; + /** + * + *

The descriptive message for the exception.

+ * + */ + Message?: string; + + /** + * + *

The AWS request identifier.

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

Initiates the verification of an existing trust relationship between an AWS Managed Microsoft AD directory and an external domain.

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

The unique Trust ID of the trust relationship to verify.

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

Result of a VerifyTrust request.

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

The unique Trust ID of the trust relationship that was verified.

+ * + */ + TrustId?: string; +} + +export namespace VerifyTrustResult { + export function isa(o: any): o is VerifyTrustResult { + return _smithy.isa(o, "VerifyTrustResult"); + } +} diff --git a/clients/client-directory-service/package.json b/clients/client-directory-service/package.json new file mode 100644 index 000000000000..5c37d8017bef --- /dev/null +++ b/clients/client-directory-service/package.json @@ -0,0 +1,75 @@ +{ + "name": "@aws-sdk/client-directory-service", + "description": "@aws-sdk/client-directory-service 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-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" +} diff --git a/clients/client-directory-service/protocols/Aws_json1_1.ts b/clients/client-directory-service/protocols/Aws_json1_1.ts new file mode 100644 index 000000000000..a4399a1789ea --- /dev/null +++ b/clients/client-directory-service/protocols/Aws_json1_1.ts @@ -0,0 +1,10873 @@ +import { + AcceptSharedDirectoryCommandInput, + AcceptSharedDirectoryCommandOutput +} from "../commands/AcceptSharedDirectoryCommand"; +import { + AddIpRoutesCommandInput, + AddIpRoutesCommandOutput +} from "../commands/AddIpRoutesCommand"; +import { + AddTagsToResourceCommandInput, + AddTagsToResourceCommandOutput +} from "../commands/AddTagsToResourceCommand"; +import { + CancelSchemaExtensionCommandInput, + CancelSchemaExtensionCommandOutput +} from "../commands/CancelSchemaExtensionCommand"; +import { + ConnectDirectoryCommandInput, + ConnectDirectoryCommandOutput +} from "../commands/ConnectDirectoryCommand"; +import { + CreateAliasCommandInput, + CreateAliasCommandOutput +} from "../commands/CreateAliasCommand"; +import { + CreateComputerCommandInput, + CreateComputerCommandOutput +} from "../commands/CreateComputerCommand"; +import { + CreateConditionalForwarderCommandInput, + CreateConditionalForwarderCommandOutput +} from "../commands/CreateConditionalForwarderCommand"; +import { + CreateDirectoryCommandInput, + CreateDirectoryCommandOutput +} from "../commands/CreateDirectoryCommand"; +import { + CreateLogSubscriptionCommandInput, + CreateLogSubscriptionCommandOutput +} from "../commands/CreateLogSubscriptionCommand"; +import { + CreateMicrosoftADCommandInput, + CreateMicrosoftADCommandOutput +} from "../commands/CreateMicrosoftADCommand"; +import { + CreateSnapshotCommandInput, + CreateSnapshotCommandOutput +} from "../commands/CreateSnapshotCommand"; +import { + CreateTrustCommandInput, + CreateTrustCommandOutput +} from "../commands/CreateTrustCommand"; +import { + DeleteConditionalForwarderCommandInput, + DeleteConditionalForwarderCommandOutput +} from "../commands/DeleteConditionalForwarderCommand"; +import { + DeleteDirectoryCommandInput, + DeleteDirectoryCommandOutput +} from "../commands/DeleteDirectoryCommand"; +import { + DeleteLogSubscriptionCommandInput, + DeleteLogSubscriptionCommandOutput +} from "../commands/DeleteLogSubscriptionCommand"; +import { + DeleteSnapshotCommandInput, + DeleteSnapshotCommandOutput +} from "../commands/DeleteSnapshotCommand"; +import { + DeleteTrustCommandInput, + DeleteTrustCommandOutput +} from "../commands/DeleteTrustCommand"; +import { + DeregisterCertificateCommandInput, + DeregisterCertificateCommandOutput +} from "../commands/DeregisterCertificateCommand"; +import { + DeregisterEventTopicCommandInput, + DeregisterEventTopicCommandOutput +} from "../commands/DeregisterEventTopicCommand"; +import { + DescribeCertificateCommandInput, + DescribeCertificateCommandOutput +} from "../commands/DescribeCertificateCommand"; +import { + DescribeConditionalForwardersCommandInput, + DescribeConditionalForwardersCommandOutput +} from "../commands/DescribeConditionalForwardersCommand"; +import { + DescribeDirectoriesCommandInput, + DescribeDirectoriesCommandOutput +} from "../commands/DescribeDirectoriesCommand"; +import { + DescribeDomainControllersCommandInput, + DescribeDomainControllersCommandOutput +} from "../commands/DescribeDomainControllersCommand"; +import { + DescribeEventTopicsCommandInput, + DescribeEventTopicsCommandOutput +} from "../commands/DescribeEventTopicsCommand"; +import { + DescribeLDAPSSettingsCommandInput, + DescribeLDAPSSettingsCommandOutput +} from "../commands/DescribeLDAPSSettingsCommand"; +import { + DescribeSharedDirectoriesCommandInput, + DescribeSharedDirectoriesCommandOutput +} from "../commands/DescribeSharedDirectoriesCommand"; +import { + DescribeSnapshotsCommandInput, + DescribeSnapshotsCommandOutput +} from "../commands/DescribeSnapshotsCommand"; +import { + DescribeTrustsCommandInput, + DescribeTrustsCommandOutput +} from "../commands/DescribeTrustsCommand"; +import { + DisableLDAPSCommandInput, + DisableLDAPSCommandOutput +} from "../commands/DisableLDAPSCommand"; +import { + DisableRadiusCommandInput, + DisableRadiusCommandOutput +} from "../commands/DisableRadiusCommand"; +import { + DisableSsoCommandInput, + DisableSsoCommandOutput +} from "../commands/DisableSsoCommand"; +import { + EnableLDAPSCommandInput, + EnableLDAPSCommandOutput +} from "../commands/EnableLDAPSCommand"; +import { + EnableRadiusCommandInput, + EnableRadiusCommandOutput +} from "../commands/EnableRadiusCommand"; +import { + EnableSsoCommandInput, + EnableSsoCommandOutput +} from "../commands/EnableSsoCommand"; +import { + GetDirectoryLimitsCommandInput, + GetDirectoryLimitsCommandOutput +} from "../commands/GetDirectoryLimitsCommand"; +import { + GetSnapshotLimitsCommandInput, + GetSnapshotLimitsCommandOutput +} from "../commands/GetSnapshotLimitsCommand"; +import { + ListCertificatesCommandInput, + ListCertificatesCommandOutput +} from "../commands/ListCertificatesCommand"; +import { + ListIpRoutesCommandInput, + ListIpRoutesCommandOutput +} from "../commands/ListIpRoutesCommand"; +import { + ListLogSubscriptionsCommandInput, + ListLogSubscriptionsCommandOutput +} from "../commands/ListLogSubscriptionsCommand"; +import { + ListSchemaExtensionsCommandInput, + ListSchemaExtensionsCommandOutput +} from "../commands/ListSchemaExtensionsCommand"; +import { + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput +} from "../commands/ListTagsForResourceCommand"; +import { + RegisterCertificateCommandInput, + RegisterCertificateCommandOutput +} from "../commands/RegisterCertificateCommand"; +import { + RegisterEventTopicCommandInput, + RegisterEventTopicCommandOutput +} from "../commands/RegisterEventTopicCommand"; +import { + RejectSharedDirectoryCommandInput, + RejectSharedDirectoryCommandOutput +} from "../commands/RejectSharedDirectoryCommand"; +import { + RemoveIpRoutesCommandInput, + RemoveIpRoutesCommandOutput +} from "../commands/RemoveIpRoutesCommand"; +import { + RemoveTagsFromResourceCommandInput, + RemoveTagsFromResourceCommandOutput +} from "../commands/RemoveTagsFromResourceCommand"; +import { + ResetUserPasswordCommandInput, + ResetUserPasswordCommandOutput +} from "../commands/ResetUserPasswordCommand"; +import { + RestoreFromSnapshotCommandInput, + RestoreFromSnapshotCommandOutput +} from "../commands/RestoreFromSnapshotCommand"; +import { + ShareDirectoryCommandInput, + ShareDirectoryCommandOutput +} from "../commands/ShareDirectoryCommand"; +import { + StartSchemaExtensionCommandInput, + StartSchemaExtensionCommandOutput +} from "../commands/StartSchemaExtensionCommand"; +import { + UnshareDirectoryCommandInput, + UnshareDirectoryCommandOutput +} from "../commands/UnshareDirectoryCommand"; +import { + UpdateConditionalForwarderCommandInput, + UpdateConditionalForwarderCommandOutput +} from "../commands/UpdateConditionalForwarderCommand"; +import { + UpdateNumberOfDomainControllersCommandInput, + UpdateNumberOfDomainControllersCommandOutput +} from "../commands/UpdateNumberOfDomainControllersCommand"; +import { + UpdateRadiusCommandInput, + UpdateRadiusCommandOutput +} from "../commands/UpdateRadiusCommand"; +import { + UpdateTrustCommandInput, + UpdateTrustCommandOutput +} from "../commands/UpdateTrustCommand"; +import { + VerifyTrustCommandInput, + VerifyTrustCommandOutput +} from "../commands/VerifyTrustCommand"; +import { + AcceptSharedDirectoryRequest, + AcceptSharedDirectoryResult, + AccessDeniedException, + AddIpRoutesRequest, + AddIpRoutesResult, + AddTagsToResourceRequest, + AddTagsToResourceResult, + Attribute, + AuthenticationFailedException, + CancelSchemaExtensionRequest, + CancelSchemaExtensionResult, + Certificate, + CertificateAlreadyExistsException, + CertificateDoesNotExistException, + CertificateInUseException, + CertificateInfo, + CertificateLimitExceededException, + ClientException, + Computer, + ConditionalForwarder, + ConnectDirectoryRequest, + ConnectDirectoryResult, + CreateAliasRequest, + CreateAliasResult, + CreateComputerRequest, + CreateComputerResult, + CreateConditionalForwarderRequest, + CreateConditionalForwarderResult, + CreateDirectoryRequest, + CreateDirectoryResult, + CreateLogSubscriptionRequest, + CreateLogSubscriptionResult, + CreateMicrosoftADRequest, + CreateMicrosoftADResult, + CreateSnapshotRequest, + CreateSnapshotResult, + CreateTrustRequest, + CreateTrustResult, + DeleteConditionalForwarderRequest, + DeleteConditionalForwarderResult, + DeleteDirectoryRequest, + DeleteDirectoryResult, + DeleteLogSubscriptionRequest, + DeleteLogSubscriptionResult, + DeleteSnapshotRequest, + DeleteSnapshotResult, + DeleteTrustRequest, + DeleteTrustResult, + DeregisterCertificateRequest, + DeregisterCertificateResult, + DeregisterEventTopicRequest, + DeregisterEventTopicResult, + DescribeCertificateRequest, + DescribeCertificateResult, + DescribeConditionalForwardersRequest, + DescribeConditionalForwardersResult, + DescribeDirectoriesRequest, + DescribeDirectoriesResult, + DescribeDomainControllersRequest, + DescribeDomainControllersResult, + DescribeEventTopicsRequest, + DescribeEventTopicsResult, + DescribeLDAPSSettingsRequest, + DescribeLDAPSSettingsResult, + DescribeSharedDirectoriesRequest, + DescribeSharedDirectoriesResult, + DescribeSnapshotsRequest, + DescribeSnapshotsResult, + DescribeTrustsRequest, + DescribeTrustsResult, + DirectoryAlreadySharedException, + DirectoryConnectSettings, + DirectoryConnectSettingsDescription, + DirectoryDescription, + DirectoryDoesNotExistException, + DirectoryLimitExceededException, + DirectoryLimits, + DirectoryNotSharedException, + DirectoryUnavailableException, + DirectoryVpcSettings, + DirectoryVpcSettingsDescription, + DisableLDAPSRequest, + DisableLDAPSResult, + DisableRadiusRequest, + DisableRadiusResult, + DisableSsoRequest, + DisableSsoResult, + DomainController, + DomainControllerLimitExceededException, + EnableLDAPSRequest, + EnableLDAPSResult, + EnableRadiusRequest, + EnableRadiusResult, + EnableSsoRequest, + EnableSsoResult, + EntityAlreadyExistsException, + EntityDoesNotExistException, + EventTopic, + GetDirectoryLimitsRequest, + GetDirectoryLimitsResult, + GetSnapshotLimitsRequest, + GetSnapshotLimitsResult, + InsufficientPermissionsException, + InvalidCertificateException, + InvalidLDAPSStatusException, + InvalidNextTokenException, + InvalidParameterException, + InvalidPasswordException, + InvalidTargetException, + IpRoute, + IpRouteInfo, + IpRouteLimitExceededException, + LDAPSSettingInfo, + ListCertificatesRequest, + ListCertificatesResult, + ListIpRoutesRequest, + ListIpRoutesResult, + ListLogSubscriptionsRequest, + ListLogSubscriptionsResult, + ListSchemaExtensionsRequest, + ListSchemaExtensionsResult, + ListTagsForResourceRequest, + ListTagsForResourceResult, + LogSubscription, + NoAvailableCertificateException, + OrganizationsException, + OwnerDirectoryDescription, + RadiusSettings, + RegisterCertificateRequest, + RegisterCertificateResult, + RegisterEventTopicRequest, + RegisterEventTopicResult, + RejectSharedDirectoryRequest, + RejectSharedDirectoryResult, + RemoveIpRoutesRequest, + RemoveIpRoutesResult, + RemoveTagsFromResourceRequest, + RemoveTagsFromResourceResult, + ResetUserPasswordRequest, + ResetUserPasswordResult, + RestoreFromSnapshotRequest, + RestoreFromSnapshotResult, + SchemaExtensionInfo, + ServiceException, + ShareDirectoryRequest, + ShareDirectoryResult, + ShareLimitExceededException, + ShareTarget, + SharedDirectory, + Snapshot, + SnapshotLimitExceededException, + SnapshotLimits, + StartSchemaExtensionRequest, + StartSchemaExtensionResult, + Tag, + TagLimitExceededException, + Trust, + UnshareDirectoryRequest, + UnshareDirectoryResult, + UnshareTarget, + UnsupportedOperationException, + UpdateConditionalForwarderRequest, + UpdateConditionalForwarderResult, + UpdateNumberOfDomainControllersRequest, + UpdateNumberOfDomainControllersResult, + UpdateRadiusRequest, + UpdateRadiusResult, + UpdateTrustRequest, + UpdateTrustResult, + UserDoesNotExistException, + VerifyTrustRequest, + VerifyTrustResult +} 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_json1_1AcceptSharedDirectoryCommand( + input: AcceptSharedDirectoryCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.AcceptSharedDirectory"; + let body: any = {}; + const wrappedBody: any = { + AcceptSharedDirectoryRequest: serializeAws_json1_1AcceptSharedDirectoryRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/AcceptSharedDirectory", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1AddIpRoutesCommand( + input: AddIpRoutesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.AddIpRoutes"; + let body: any = {}; + const wrappedBody: any = { + AddIpRoutesRequest: serializeAws_json1_1AddIpRoutesRequest(input, context) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/AddIpRoutes", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1AddTagsToResourceCommand( + input: AddTagsToResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.AddTagsToResource"; + let body: any = {}; + const wrappedBody: any = { + AddTagsToResourceRequest: serializeAws_json1_1AddTagsToResourceRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/AddTagsToResource", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1CancelSchemaExtensionCommand( + input: CancelSchemaExtensionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.CancelSchemaExtension"; + let body: any = {}; + const wrappedBody: any = { + CancelSchemaExtensionRequest: serializeAws_json1_1CancelSchemaExtensionRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/CancelSchemaExtension", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1ConnectDirectoryCommand( + input: ConnectDirectoryCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.ConnectDirectory"; + let body: any = {}; + const wrappedBody: any = { + ConnectDirectoryRequest: serializeAws_json1_1ConnectDirectoryRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/ConnectDirectory", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1CreateAliasCommand( + input: CreateAliasCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.CreateAlias"; + let body: any = {}; + const wrappedBody: any = { + CreateAliasRequest: serializeAws_json1_1CreateAliasRequest(input, context) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/CreateAlias", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1CreateComputerCommand( + input: CreateComputerCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.CreateComputer"; + let body: any = {}; + const wrappedBody: any = { + CreateComputerRequest: serializeAws_json1_1CreateComputerRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/CreateComputer", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1CreateConditionalForwarderCommand( + input: CreateConditionalForwarderCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = + "DirectoryService_20150416.CreateConditionalForwarder"; + let body: any = {}; + const wrappedBody: any = { + CreateConditionalForwarderRequest: serializeAws_json1_1CreateConditionalForwarderRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/CreateConditionalForwarder", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1CreateDirectoryCommand( + input: CreateDirectoryCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.CreateDirectory"; + let body: any = {}; + const wrappedBody: any = { + CreateDirectoryRequest: serializeAws_json1_1CreateDirectoryRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/CreateDirectory", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1CreateLogSubscriptionCommand( + input: CreateLogSubscriptionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.CreateLogSubscription"; + let body: any = {}; + const wrappedBody: any = { + CreateLogSubscriptionRequest: serializeAws_json1_1CreateLogSubscriptionRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/CreateLogSubscription", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1CreateMicrosoftADCommand( + input: CreateMicrosoftADCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.CreateMicrosoftAD"; + let body: any = {}; + const wrappedBody: any = { + CreateMicrosoftADRequest: serializeAws_json1_1CreateMicrosoftADRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/CreateMicrosoftAD", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1CreateSnapshotCommand( + input: CreateSnapshotCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.CreateSnapshot"; + let body: any = {}; + const wrappedBody: any = { + CreateSnapshotRequest: serializeAws_json1_1CreateSnapshotRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/CreateSnapshot", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1CreateTrustCommand( + input: CreateTrustCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.CreateTrust"; + let body: any = {}; + const wrappedBody: any = { + CreateTrustRequest: serializeAws_json1_1CreateTrustRequest(input, context) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/CreateTrust", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DeleteConditionalForwarderCommand( + input: DeleteConditionalForwarderCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = + "DirectoryService_20150416.DeleteConditionalForwarder"; + let body: any = {}; + const wrappedBody: any = { + DeleteConditionalForwarderRequest: serializeAws_json1_1DeleteConditionalForwarderRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DeleteConditionalForwarder", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DeleteDirectoryCommand( + input: DeleteDirectoryCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.DeleteDirectory"; + let body: any = {}; + const wrappedBody: any = { + DeleteDirectoryRequest: serializeAws_json1_1DeleteDirectoryRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DeleteDirectory", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DeleteLogSubscriptionCommand( + input: DeleteLogSubscriptionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.DeleteLogSubscription"; + let body: any = {}; + const wrappedBody: any = { + DeleteLogSubscriptionRequest: serializeAws_json1_1DeleteLogSubscriptionRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DeleteLogSubscription", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DeleteSnapshotCommand( + input: DeleteSnapshotCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.DeleteSnapshot"; + let body: any = {}; + const wrappedBody: any = { + DeleteSnapshotRequest: serializeAws_json1_1DeleteSnapshotRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DeleteSnapshot", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DeleteTrustCommand( + input: DeleteTrustCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.DeleteTrust"; + let body: any = {}; + const wrappedBody: any = { + DeleteTrustRequest: serializeAws_json1_1DeleteTrustRequest(input, context) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DeleteTrust", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DeregisterCertificateCommand( + input: DeregisterCertificateCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.DeregisterCertificate"; + let body: any = {}; + const wrappedBody: any = { + DeregisterCertificateRequest: serializeAws_json1_1DeregisterCertificateRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DeregisterCertificate", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DeregisterEventTopicCommand( + input: DeregisterEventTopicCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.DeregisterEventTopic"; + let body: any = {}; + const wrappedBody: any = { + DeregisterEventTopicRequest: serializeAws_json1_1DeregisterEventTopicRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DeregisterEventTopic", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DescribeCertificateCommand( + input: DescribeCertificateCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.DescribeCertificate"; + let body: any = {}; + const wrappedBody: any = { + DescribeCertificateRequest: serializeAws_json1_1DescribeCertificateRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DescribeCertificate", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DescribeConditionalForwardersCommand( + input: DescribeConditionalForwardersCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = + "DirectoryService_20150416.DescribeConditionalForwarders"; + let body: any = {}; + const wrappedBody: any = { + DescribeConditionalForwardersRequest: serializeAws_json1_1DescribeConditionalForwardersRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DescribeConditionalForwarders", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DescribeDirectoriesCommand( + input: DescribeDirectoriesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.DescribeDirectories"; + let body: any = {}; + const wrappedBody: any = { + DescribeDirectoriesRequest: serializeAws_json1_1DescribeDirectoriesRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DescribeDirectories", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DescribeDomainControllersCommand( + input: DescribeDomainControllersCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = + "DirectoryService_20150416.DescribeDomainControllers"; + let body: any = {}; + const wrappedBody: any = { + DescribeDomainControllersRequest: serializeAws_json1_1DescribeDomainControllersRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DescribeDomainControllers", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DescribeEventTopicsCommand( + input: DescribeEventTopicsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.DescribeEventTopics"; + let body: any = {}; + const wrappedBody: any = { + DescribeEventTopicsRequest: serializeAws_json1_1DescribeEventTopicsRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DescribeEventTopics", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DescribeLDAPSSettingsCommand( + input: DescribeLDAPSSettingsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.DescribeLDAPSSettings"; + let body: any = {}; + const wrappedBody: any = { + DescribeLDAPSSettingsRequest: serializeAws_json1_1DescribeLDAPSSettingsRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DescribeLDAPSSettings", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DescribeSharedDirectoriesCommand( + input: DescribeSharedDirectoriesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = + "DirectoryService_20150416.DescribeSharedDirectories"; + let body: any = {}; + const wrappedBody: any = { + DescribeSharedDirectoriesRequest: serializeAws_json1_1DescribeSharedDirectoriesRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DescribeSharedDirectories", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DescribeSnapshotsCommand( + input: DescribeSnapshotsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.DescribeSnapshots"; + let body: any = {}; + const wrappedBody: any = { + DescribeSnapshotsRequest: serializeAws_json1_1DescribeSnapshotsRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DescribeSnapshots", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DescribeTrustsCommand( + input: DescribeTrustsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.DescribeTrusts"; + let body: any = {}; + const wrappedBody: any = { + DescribeTrustsRequest: serializeAws_json1_1DescribeTrustsRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DescribeTrusts", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DisableLDAPSCommand( + input: DisableLDAPSCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.DisableLDAPS"; + let body: any = {}; + const wrappedBody: any = { + DisableLDAPSRequest: serializeAws_json1_1DisableLDAPSRequest(input, context) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DisableLDAPS", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DisableRadiusCommand( + input: DisableRadiusCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.DisableRadius"; + let body: any = {}; + const wrappedBody: any = { + DisableRadiusRequest: serializeAws_json1_1DisableRadiusRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DisableRadius", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DisableSsoCommand( + input: DisableSsoCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.DisableSso"; + let body: any = {}; + const wrappedBody: any = { + DisableSsoRequest: serializeAws_json1_1DisableSsoRequest(input, context) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DisableSso", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1EnableLDAPSCommand( + input: EnableLDAPSCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.EnableLDAPS"; + let body: any = {}; + const wrappedBody: any = { + EnableLDAPSRequest: serializeAws_json1_1EnableLDAPSRequest(input, context) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/EnableLDAPS", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1EnableRadiusCommand( + input: EnableRadiusCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.EnableRadius"; + let body: any = {}; + const wrappedBody: any = { + EnableRadiusRequest: serializeAws_json1_1EnableRadiusRequest(input, context) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/EnableRadius", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1EnableSsoCommand( + input: EnableSsoCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.EnableSso"; + let body: any = {}; + const wrappedBody: any = { + EnableSsoRequest: serializeAws_json1_1EnableSsoRequest(input, context) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/EnableSso", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1GetDirectoryLimitsCommand( + input: GetDirectoryLimitsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.GetDirectoryLimits"; + let body: any = {}; + const wrappedBody: any = { + GetDirectoryLimitsRequest: serializeAws_json1_1GetDirectoryLimitsRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/GetDirectoryLimits", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1GetSnapshotLimitsCommand( + input: GetSnapshotLimitsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.GetSnapshotLimits"; + let body: any = {}; + const wrappedBody: any = { + GetSnapshotLimitsRequest: serializeAws_json1_1GetSnapshotLimitsRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/GetSnapshotLimits", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1ListCertificatesCommand( + input: ListCertificatesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.ListCertificates"; + let body: any = {}; + const wrappedBody: any = { + ListCertificatesRequest: serializeAws_json1_1ListCertificatesRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/ListCertificates", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1ListIpRoutesCommand( + input: ListIpRoutesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.ListIpRoutes"; + let body: any = {}; + const wrappedBody: any = { + ListIpRoutesRequest: serializeAws_json1_1ListIpRoutesRequest(input, context) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/ListIpRoutes", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1ListLogSubscriptionsCommand( + input: ListLogSubscriptionsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.ListLogSubscriptions"; + let body: any = {}; + const wrappedBody: any = { + ListLogSubscriptionsRequest: serializeAws_json1_1ListLogSubscriptionsRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/ListLogSubscriptions", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1ListSchemaExtensionsCommand( + input: ListSchemaExtensionsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.ListSchemaExtensions"; + let body: any = {}; + const wrappedBody: any = { + ListSchemaExtensionsRequest: serializeAws_json1_1ListSchemaExtensionsRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/ListSchemaExtensions", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1ListTagsForResourceCommand( + input: ListTagsForResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.ListTagsForResource"; + let body: any = {}; + const wrappedBody: any = { + ListTagsForResourceRequest: serializeAws_json1_1ListTagsForResourceRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/ListTagsForResource", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1RegisterCertificateCommand( + input: RegisterCertificateCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.RegisterCertificate"; + let body: any = {}; + const wrappedBody: any = { + RegisterCertificateRequest: serializeAws_json1_1RegisterCertificateRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/RegisterCertificate", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1RegisterEventTopicCommand( + input: RegisterEventTopicCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.RegisterEventTopic"; + let body: any = {}; + const wrappedBody: any = { + RegisterEventTopicRequest: serializeAws_json1_1RegisterEventTopicRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/RegisterEventTopic", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1RejectSharedDirectoryCommand( + input: RejectSharedDirectoryCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.RejectSharedDirectory"; + let body: any = {}; + const wrappedBody: any = { + RejectSharedDirectoryRequest: serializeAws_json1_1RejectSharedDirectoryRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/RejectSharedDirectory", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1RemoveIpRoutesCommand( + input: RemoveIpRoutesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.RemoveIpRoutes"; + let body: any = {}; + const wrappedBody: any = { + RemoveIpRoutesRequest: serializeAws_json1_1RemoveIpRoutesRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/RemoveIpRoutes", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1RemoveTagsFromResourceCommand( + input: RemoveTagsFromResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.RemoveTagsFromResource"; + let body: any = {}; + const wrappedBody: any = { + RemoveTagsFromResourceRequest: serializeAws_json1_1RemoveTagsFromResourceRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/RemoveTagsFromResource", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1ResetUserPasswordCommand( + input: ResetUserPasswordCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.ResetUserPassword"; + let body: any = {}; + const wrappedBody: any = { + ResetUserPasswordRequest: serializeAws_json1_1ResetUserPasswordRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/ResetUserPassword", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1RestoreFromSnapshotCommand( + input: RestoreFromSnapshotCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.RestoreFromSnapshot"; + let body: any = {}; + const wrappedBody: any = { + RestoreFromSnapshotRequest: serializeAws_json1_1RestoreFromSnapshotRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/RestoreFromSnapshot", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1ShareDirectoryCommand( + input: ShareDirectoryCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.ShareDirectory"; + let body: any = {}; + const wrappedBody: any = { + ShareDirectoryRequest: serializeAws_json1_1ShareDirectoryRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/ShareDirectory", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1StartSchemaExtensionCommand( + input: StartSchemaExtensionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.StartSchemaExtension"; + let body: any = {}; + const wrappedBody: any = { + StartSchemaExtensionRequest: serializeAws_json1_1StartSchemaExtensionRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/StartSchemaExtension", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1UnshareDirectoryCommand( + input: UnshareDirectoryCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.UnshareDirectory"; + let body: any = {}; + const wrappedBody: any = { + UnshareDirectoryRequest: serializeAws_json1_1UnshareDirectoryRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/UnshareDirectory", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1UpdateConditionalForwarderCommand( + input: UpdateConditionalForwarderCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = + "DirectoryService_20150416.UpdateConditionalForwarder"; + let body: any = {}; + const wrappedBody: any = { + UpdateConditionalForwarderRequest: serializeAws_json1_1UpdateConditionalForwarderRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/UpdateConditionalForwarder", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1UpdateNumberOfDomainControllersCommand( + input: UpdateNumberOfDomainControllersCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = + "DirectoryService_20150416.UpdateNumberOfDomainControllers"; + let body: any = {}; + const wrappedBody: any = { + UpdateNumberOfDomainControllersRequest: serializeAws_json1_1UpdateNumberOfDomainControllersRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/UpdateNumberOfDomainControllers", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1UpdateRadiusCommand( + input: UpdateRadiusCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.UpdateRadius"; + let body: any = {}; + const wrappedBody: any = { + UpdateRadiusRequest: serializeAws_json1_1UpdateRadiusRequest(input, context) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/UpdateRadius", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1UpdateTrustCommand( + input: UpdateTrustCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.UpdateTrust"; + let body: any = {}; + const wrappedBody: any = { + UpdateTrustRequest: serializeAws_json1_1UpdateTrustRequest(input, context) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/UpdateTrust", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1VerifyTrustCommand( + input: VerifyTrustCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "DirectoryService_20150416.VerifyTrust"; + let body: any = {}; + const wrappedBody: any = { + VerifyTrustRequest: serializeAws_json1_1VerifyTrustRequest(input, context) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/VerifyTrust", + headers: headers, + body: body + }); +} + +export async function deserializeAws_json1_1AcceptSharedDirectoryCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1AcceptSharedDirectoryCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1AcceptSharedDirectoryResult( + data.AcceptSharedDirectoryResult, + context + ); + const response: AcceptSharedDirectoryCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "AcceptSharedDirectoryResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1AcceptSharedDirectoryCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "DirectoryAlreadySharedException": + case "com.amazonaws.directoryservice.v20150416#DirectoryAlreadySharedException": + response = await deserializeAws_json1_1DirectoryAlreadySharedExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1AddIpRoutesCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1AddIpRoutesCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1AddIpRoutesResult( + data.AddIpRoutesResult, + context + ); + const response: AddIpRoutesCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "AddIpRoutesResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1AddIpRoutesCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "DirectoryUnavailableException": + case "com.amazonaws.directoryservice.v20150416#DirectoryUnavailableException": + response = await deserializeAws_json1_1DirectoryUnavailableExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityAlreadyExistsException": + case "com.amazonaws.directoryservice.v20150416#EntityAlreadyExistsException": + response = await deserializeAws_json1_1EntityAlreadyExistsExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "IpRouteLimitExceededException": + case "com.amazonaws.directoryservice.v20150416#IpRouteLimitExceededException": + response = await deserializeAws_json1_1IpRouteLimitExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1AddTagsToResourceCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1AddTagsToResourceCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1AddTagsToResourceResult( + data.AddTagsToResourceResult, + context + ); + const response: AddTagsToResourceCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "AddTagsToResourceResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1AddTagsToResourceCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + case "TagLimitExceededException": + case "com.amazonaws.directoryservice.v20150416#TagLimitExceededException": + response = await deserializeAws_json1_1TagLimitExceededExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1CancelSchemaExtensionCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1CancelSchemaExtensionCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1CancelSchemaExtensionResult( + data.CancelSchemaExtensionResult, + context + ); + const response: CancelSchemaExtensionCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "CancelSchemaExtensionResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1CancelSchemaExtensionCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1ConnectDirectoryCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1ConnectDirectoryCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1ConnectDirectoryResult( + data.ConnectDirectoryResult, + context + ); + const response: ConnectDirectoryCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ConnectDirectoryResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1ConnectDirectoryCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "DirectoryLimitExceededException": + case "com.amazonaws.directoryservice.v20150416#DirectoryLimitExceededException": + response = await deserializeAws_json1_1DirectoryLimitExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1CreateAliasCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1CreateAliasCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1CreateAliasResult( + data.CreateAliasResult, + context + ); + const response: CreateAliasCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "CreateAliasResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1CreateAliasCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityAlreadyExistsException": + case "com.amazonaws.directoryservice.v20150416#EntityAlreadyExistsException": + response = await deserializeAws_json1_1EntityAlreadyExistsExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1CreateComputerCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1CreateComputerCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1CreateComputerResult( + data.CreateComputerResult, + context + ); + const response: CreateComputerCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "CreateComputerResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1CreateComputerCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "AuthenticationFailedException": + case "com.amazonaws.directoryservice.v20150416#AuthenticationFailedException": + response = await deserializeAws_json1_1AuthenticationFailedExceptionResponse( + parsedOutput, + context + ); + break; + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "DirectoryUnavailableException": + case "com.amazonaws.directoryservice.v20150416#DirectoryUnavailableException": + response = await deserializeAws_json1_1DirectoryUnavailableExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityAlreadyExistsException": + case "com.amazonaws.directoryservice.v20150416#EntityAlreadyExistsException": + response = await deserializeAws_json1_1EntityAlreadyExistsExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + case "UnsupportedOperationException": + case "com.amazonaws.directoryservice.v20150416#UnsupportedOperationException": + response = await deserializeAws_json1_1UnsupportedOperationExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1CreateConditionalForwarderCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1CreateConditionalForwarderCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1CreateConditionalForwarderResult( + data.CreateConditionalForwarderResult, + context + ); + const response: CreateConditionalForwarderCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "CreateConditionalForwarderResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1CreateConditionalForwarderCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "DirectoryUnavailableException": + case "com.amazonaws.directoryservice.v20150416#DirectoryUnavailableException": + response = await deserializeAws_json1_1DirectoryUnavailableExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityAlreadyExistsException": + case "com.amazonaws.directoryservice.v20150416#EntityAlreadyExistsException": + response = await deserializeAws_json1_1EntityAlreadyExistsExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + case "UnsupportedOperationException": + case "com.amazonaws.directoryservice.v20150416#UnsupportedOperationException": + response = await deserializeAws_json1_1UnsupportedOperationExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1CreateDirectoryCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1CreateDirectoryCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1CreateDirectoryResult( + data.CreateDirectoryResult, + context + ); + const response: CreateDirectoryCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "CreateDirectoryResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1CreateDirectoryCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "DirectoryLimitExceededException": + case "com.amazonaws.directoryservice.v20150416#DirectoryLimitExceededException": + response = await deserializeAws_json1_1DirectoryLimitExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1CreateLogSubscriptionCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1CreateLogSubscriptionCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1CreateLogSubscriptionResult( + data.CreateLogSubscriptionResult, + context + ); + const response: CreateLogSubscriptionCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "CreateLogSubscriptionResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1CreateLogSubscriptionCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityAlreadyExistsException": + case "com.amazonaws.directoryservice.v20150416#EntityAlreadyExistsException": + response = await deserializeAws_json1_1EntityAlreadyExistsExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InsufficientPermissionsException": + case "com.amazonaws.directoryservice.v20150416#InsufficientPermissionsException": + response = await deserializeAws_json1_1InsufficientPermissionsExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + case "UnsupportedOperationException": + case "com.amazonaws.directoryservice.v20150416#UnsupportedOperationException": + response = await deserializeAws_json1_1UnsupportedOperationExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1CreateMicrosoftADCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1CreateMicrosoftADCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1CreateMicrosoftADResult( + data.CreateMicrosoftADResult, + context + ); + const response: CreateMicrosoftADCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "CreateMicrosoftADResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1CreateMicrosoftADCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "DirectoryLimitExceededException": + case "com.amazonaws.directoryservice.v20150416#DirectoryLimitExceededException": + response = await deserializeAws_json1_1DirectoryLimitExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + case "UnsupportedOperationException": + case "com.amazonaws.directoryservice.v20150416#UnsupportedOperationException": + response = await deserializeAws_json1_1UnsupportedOperationExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1CreateSnapshotCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1CreateSnapshotCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1CreateSnapshotResult( + data.CreateSnapshotResult, + context + ); + const response: CreateSnapshotCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "CreateSnapshotResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1CreateSnapshotCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + case "SnapshotLimitExceededException": + case "com.amazonaws.directoryservice.v20150416#SnapshotLimitExceededException": + response = await deserializeAws_json1_1SnapshotLimitExceededExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1CreateTrustCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1CreateTrustCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1CreateTrustResult( + data.CreateTrustResult, + context + ); + const response: CreateTrustCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "CreateTrustResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1CreateTrustCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityAlreadyExistsException": + case "com.amazonaws.directoryservice.v20150416#EntityAlreadyExistsException": + response = await deserializeAws_json1_1EntityAlreadyExistsExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + case "UnsupportedOperationException": + case "com.amazonaws.directoryservice.v20150416#UnsupportedOperationException": + response = await deserializeAws_json1_1UnsupportedOperationExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DeleteConditionalForwarderCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DeleteConditionalForwarderCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DeleteConditionalForwarderResult( + data.DeleteConditionalForwarderResult, + context + ); + const response: DeleteConditionalForwarderCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DeleteConditionalForwarderResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DeleteConditionalForwarderCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "DirectoryUnavailableException": + case "com.amazonaws.directoryservice.v20150416#DirectoryUnavailableException": + response = await deserializeAws_json1_1DirectoryUnavailableExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + case "UnsupportedOperationException": + case "com.amazonaws.directoryservice.v20150416#UnsupportedOperationException": + response = await deserializeAws_json1_1UnsupportedOperationExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DeleteDirectoryCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DeleteDirectoryCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DeleteDirectoryResult( + data.DeleteDirectoryResult, + context + ); + const response: DeleteDirectoryCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DeleteDirectoryResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DeleteDirectoryCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DeleteLogSubscriptionCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DeleteLogSubscriptionCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DeleteLogSubscriptionResult( + data.DeleteLogSubscriptionResult, + context + ); + const response: DeleteLogSubscriptionCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DeleteLogSubscriptionResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DeleteLogSubscriptionCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + case "UnsupportedOperationException": + case "com.amazonaws.directoryservice.v20150416#UnsupportedOperationException": + response = await deserializeAws_json1_1UnsupportedOperationExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DeleteSnapshotCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DeleteSnapshotCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DeleteSnapshotResult( + data.DeleteSnapshotResult, + context + ); + const response: DeleteSnapshotCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DeleteSnapshotResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DeleteSnapshotCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DeleteTrustCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DeleteTrustCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DeleteTrustResult( + data.DeleteTrustResult, + context + ); + const response: DeleteTrustCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DeleteTrustResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DeleteTrustCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + case "UnsupportedOperationException": + case "com.amazonaws.directoryservice.v20150416#UnsupportedOperationException": + response = await deserializeAws_json1_1UnsupportedOperationExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DeregisterCertificateCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DeregisterCertificateCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DeregisterCertificateResult( + data.DeregisterCertificateResult, + context + ); + const response: DeregisterCertificateCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DeregisterCertificateResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DeregisterCertificateCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "CertificateDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#CertificateDoesNotExistException": + response = await deserializeAws_json1_1CertificateDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "CertificateInUseException": + case "com.amazonaws.directoryservice.v20150416#CertificateInUseException": + response = await deserializeAws_json1_1CertificateInUseExceptionResponse( + parsedOutput, + context + ); + break; + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "DirectoryDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#DirectoryDoesNotExistException": + response = await deserializeAws_json1_1DirectoryDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "DirectoryUnavailableException": + case "com.amazonaws.directoryservice.v20150416#DirectoryUnavailableException": + response = await deserializeAws_json1_1DirectoryUnavailableExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + case "UnsupportedOperationException": + case "com.amazonaws.directoryservice.v20150416#UnsupportedOperationException": + response = await deserializeAws_json1_1UnsupportedOperationExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DeregisterEventTopicCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DeregisterEventTopicCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DeregisterEventTopicResult( + data.DeregisterEventTopicResult, + context + ); + const response: DeregisterEventTopicCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DeregisterEventTopicResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DeregisterEventTopicCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DescribeCertificateCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DescribeCertificateCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DescribeCertificateResult( + data.DescribeCertificateResult, + context + ); + const response: DescribeCertificateCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DescribeCertificateResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DescribeCertificateCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "CertificateDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#CertificateDoesNotExistException": + response = await deserializeAws_json1_1CertificateDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "DirectoryDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#DirectoryDoesNotExistException": + response = await deserializeAws_json1_1DirectoryDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + case "UnsupportedOperationException": + case "com.amazonaws.directoryservice.v20150416#UnsupportedOperationException": + response = await deserializeAws_json1_1UnsupportedOperationExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DescribeConditionalForwardersCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DescribeConditionalForwardersCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DescribeConditionalForwardersResult( + data.DescribeConditionalForwardersResult, + context + ); + const response: DescribeConditionalForwardersCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DescribeConditionalForwardersResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DescribeConditionalForwardersCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "DirectoryUnavailableException": + case "com.amazonaws.directoryservice.v20150416#DirectoryUnavailableException": + response = await deserializeAws_json1_1DirectoryUnavailableExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + case "UnsupportedOperationException": + case "com.amazonaws.directoryservice.v20150416#UnsupportedOperationException": + response = await deserializeAws_json1_1UnsupportedOperationExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DescribeDirectoriesCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DescribeDirectoriesCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DescribeDirectoriesResult( + data.DescribeDirectoriesResult, + context + ); + const response: DescribeDirectoriesCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DescribeDirectoriesResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DescribeDirectoriesCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidNextTokenException": + case "com.amazonaws.directoryservice.v20150416#InvalidNextTokenException": + response = await deserializeAws_json1_1InvalidNextTokenExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DescribeDomainControllersCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DescribeDomainControllersCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DescribeDomainControllersResult( + data.DescribeDomainControllersResult, + context + ); + const response: DescribeDomainControllersCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DescribeDomainControllersResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DescribeDomainControllersCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidNextTokenException": + case "com.amazonaws.directoryservice.v20150416#InvalidNextTokenException": + response = await deserializeAws_json1_1InvalidNextTokenExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + case "UnsupportedOperationException": + case "com.amazonaws.directoryservice.v20150416#UnsupportedOperationException": + response = await deserializeAws_json1_1UnsupportedOperationExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DescribeEventTopicsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DescribeEventTopicsCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DescribeEventTopicsResult( + data.DescribeEventTopicsResult, + context + ); + const response: DescribeEventTopicsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DescribeEventTopicsResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DescribeEventTopicsCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DescribeLDAPSSettingsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DescribeLDAPSSettingsCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DescribeLDAPSSettingsResult( + data.DescribeLDAPSSettingsResult, + context + ); + const response: DescribeLDAPSSettingsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DescribeLDAPSSettingsResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DescribeLDAPSSettingsCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "DirectoryDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#DirectoryDoesNotExistException": + response = await deserializeAws_json1_1DirectoryDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidNextTokenException": + case "com.amazonaws.directoryservice.v20150416#InvalidNextTokenException": + response = await deserializeAws_json1_1InvalidNextTokenExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + case "UnsupportedOperationException": + case "com.amazonaws.directoryservice.v20150416#UnsupportedOperationException": + response = await deserializeAws_json1_1UnsupportedOperationExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DescribeSharedDirectoriesCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DescribeSharedDirectoriesCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DescribeSharedDirectoriesResult( + data.DescribeSharedDirectoriesResult, + context + ); + const response: DescribeSharedDirectoriesCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DescribeSharedDirectoriesResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DescribeSharedDirectoriesCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidNextTokenException": + case "com.amazonaws.directoryservice.v20150416#InvalidNextTokenException": + response = await deserializeAws_json1_1InvalidNextTokenExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + case "UnsupportedOperationException": + case "com.amazonaws.directoryservice.v20150416#UnsupportedOperationException": + response = await deserializeAws_json1_1UnsupportedOperationExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DescribeSnapshotsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DescribeSnapshotsCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DescribeSnapshotsResult( + data.DescribeSnapshotsResult, + context + ); + const response: DescribeSnapshotsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DescribeSnapshotsResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DescribeSnapshotsCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidNextTokenException": + case "com.amazonaws.directoryservice.v20150416#InvalidNextTokenException": + response = await deserializeAws_json1_1InvalidNextTokenExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DescribeTrustsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DescribeTrustsCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DescribeTrustsResult( + data.DescribeTrustsResult, + context + ); + const response: DescribeTrustsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DescribeTrustsResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DescribeTrustsCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidNextTokenException": + case "com.amazonaws.directoryservice.v20150416#InvalidNextTokenException": + response = await deserializeAws_json1_1InvalidNextTokenExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + case "UnsupportedOperationException": + case "com.amazonaws.directoryservice.v20150416#UnsupportedOperationException": + response = await deserializeAws_json1_1UnsupportedOperationExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DisableLDAPSCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DisableLDAPSCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DisableLDAPSResult( + data.DisableLDAPSResult, + context + ); + const response: DisableLDAPSCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DisableLDAPSResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DisableLDAPSCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "DirectoryDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#DirectoryDoesNotExistException": + response = await deserializeAws_json1_1DirectoryDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "DirectoryUnavailableException": + case "com.amazonaws.directoryservice.v20150416#DirectoryUnavailableException": + response = await deserializeAws_json1_1DirectoryUnavailableExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidLDAPSStatusException": + case "com.amazonaws.directoryservice.v20150416#InvalidLDAPSStatusException": + response = await deserializeAws_json1_1InvalidLDAPSStatusExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + case "UnsupportedOperationException": + case "com.amazonaws.directoryservice.v20150416#UnsupportedOperationException": + response = await deserializeAws_json1_1UnsupportedOperationExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DisableRadiusCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DisableRadiusCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DisableRadiusResult( + data.DisableRadiusResult, + context + ); + const response: DisableRadiusCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DisableRadiusResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DisableRadiusCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DisableSsoCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DisableSsoCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DisableSsoResult( + data.DisableSsoResult, + context + ); + const response: DisableSsoCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DisableSsoResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DisableSsoCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "AuthenticationFailedException": + case "com.amazonaws.directoryservice.v20150416#AuthenticationFailedException": + response = await deserializeAws_json1_1AuthenticationFailedExceptionResponse( + parsedOutput, + context + ); + break; + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InsufficientPermissionsException": + case "com.amazonaws.directoryservice.v20150416#InsufficientPermissionsException": + response = await deserializeAws_json1_1InsufficientPermissionsExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1EnableLDAPSCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1EnableLDAPSCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1EnableLDAPSResult( + data.EnableLDAPSResult, + context + ); + const response: EnableLDAPSCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "EnableLDAPSResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1EnableLDAPSCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "DirectoryDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#DirectoryDoesNotExistException": + response = await deserializeAws_json1_1DirectoryDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "DirectoryUnavailableException": + case "com.amazonaws.directoryservice.v20150416#DirectoryUnavailableException": + response = await deserializeAws_json1_1DirectoryUnavailableExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidLDAPSStatusException": + case "com.amazonaws.directoryservice.v20150416#InvalidLDAPSStatusException": + response = await deserializeAws_json1_1InvalidLDAPSStatusExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "NoAvailableCertificateException": + case "com.amazonaws.directoryservice.v20150416#NoAvailableCertificateException": + response = await deserializeAws_json1_1NoAvailableCertificateExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + case "UnsupportedOperationException": + case "com.amazonaws.directoryservice.v20150416#UnsupportedOperationException": + response = await deserializeAws_json1_1UnsupportedOperationExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1EnableRadiusCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1EnableRadiusCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1EnableRadiusResult( + data.EnableRadiusResult, + context + ); + const response: EnableRadiusCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "EnableRadiusResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1EnableRadiusCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityAlreadyExistsException": + case "com.amazonaws.directoryservice.v20150416#EntityAlreadyExistsException": + response = await deserializeAws_json1_1EntityAlreadyExistsExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1EnableSsoCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1EnableSsoCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1EnableSsoResult( + data.EnableSsoResult, + context + ); + const response: EnableSsoCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "EnableSsoResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1EnableSsoCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "AuthenticationFailedException": + case "com.amazonaws.directoryservice.v20150416#AuthenticationFailedException": + response = await deserializeAws_json1_1AuthenticationFailedExceptionResponse( + parsedOutput, + context + ); + break; + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InsufficientPermissionsException": + case "com.amazonaws.directoryservice.v20150416#InsufficientPermissionsException": + response = await deserializeAws_json1_1InsufficientPermissionsExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1GetDirectoryLimitsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1GetDirectoryLimitsCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1GetDirectoryLimitsResult( + data.GetDirectoryLimitsResult, + context + ); + const response: GetDirectoryLimitsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GetDirectoryLimitsResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1GetDirectoryLimitsCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1GetSnapshotLimitsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1GetSnapshotLimitsCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1GetSnapshotLimitsResult( + data.GetSnapshotLimitsResult, + context + ); + const response: GetSnapshotLimitsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GetSnapshotLimitsResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1GetSnapshotLimitsCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1ListCertificatesCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1ListCertificatesCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1ListCertificatesResult( + data.ListCertificatesResult, + context + ); + const response: ListCertificatesCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ListCertificatesResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1ListCertificatesCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "DirectoryDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#DirectoryDoesNotExistException": + response = await deserializeAws_json1_1DirectoryDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidNextTokenException": + case "com.amazonaws.directoryservice.v20150416#InvalidNextTokenException": + response = await deserializeAws_json1_1InvalidNextTokenExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + case "UnsupportedOperationException": + case "com.amazonaws.directoryservice.v20150416#UnsupportedOperationException": + response = await deserializeAws_json1_1UnsupportedOperationExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1ListIpRoutesCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1ListIpRoutesCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1ListIpRoutesResult( + data.ListIpRoutesResult, + context + ); + const response: ListIpRoutesCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ListIpRoutesResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1ListIpRoutesCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidNextTokenException": + case "com.amazonaws.directoryservice.v20150416#InvalidNextTokenException": + response = await deserializeAws_json1_1InvalidNextTokenExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1ListLogSubscriptionsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1ListLogSubscriptionsCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1ListLogSubscriptionsResult( + data.ListLogSubscriptionsResult, + context + ); + const response: ListLogSubscriptionsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ListLogSubscriptionsResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1ListLogSubscriptionsCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidNextTokenException": + case "com.amazonaws.directoryservice.v20150416#InvalidNextTokenException": + response = await deserializeAws_json1_1InvalidNextTokenExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1ListSchemaExtensionsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1ListSchemaExtensionsCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1ListSchemaExtensionsResult( + data.ListSchemaExtensionsResult, + context + ); + const response: ListSchemaExtensionsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ListSchemaExtensionsResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1ListSchemaExtensionsCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidNextTokenException": + case "com.amazonaws.directoryservice.v20150416#InvalidNextTokenException": + response = await deserializeAws_json1_1InvalidNextTokenExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1ListTagsForResourceCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1ListTagsForResourceCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1ListTagsForResourceResult( + data.ListTagsForResourceResult, + context + ); + const response: ListTagsForResourceCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ListTagsForResourceResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1ListTagsForResourceCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidNextTokenException": + case "com.amazonaws.directoryservice.v20150416#InvalidNextTokenException": + response = await deserializeAws_json1_1InvalidNextTokenExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1RegisterCertificateCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1RegisterCertificateCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1RegisterCertificateResult( + data.RegisterCertificateResult, + context + ); + const response: RegisterCertificateCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "RegisterCertificateResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1RegisterCertificateCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "CertificateAlreadyExistsException": + case "com.amazonaws.directoryservice.v20150416#CertificateAlreadyExistsException": + response = await deserializeAws_json1_1CertificateAlreadyExistsExceptionResponse( + parsedOutput, + context + ); + break; + case "CertificateLimitExceededException": + case "com.amazonaws.directoryservice.v20150416#CertificateLimitExceededException": + response = await deserializeAws_json1_1CertificateLimitExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "DirectoryDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#DirectoryDoesNotExistException": + response = await deserializeAws_json1_1DirectoryDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "DirectoryUnavailableException": + case "com.amazonaws.directoryservice.v20150416#DirectoryUnavailableException": + response = await deserializeAws_json1_1DirectoryUnavailableExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidCertificateException": + case "com.amazonaws.directoryservice.v20150416#InvalidCertificateException": + response = await deserializeAws_json1_1InvalidCertificateExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + case "UnsupportedOperationException": + case "com.amazonaws.directoryservice.v20150416#UnsupportedOperationException": + response = await deserializeAws_json1_1UnsupportedOperationExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1RegisterEventTopicCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1RegisterEventTopicCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1RegisterEventTopicResult( + data.RegisterEventTopicResult, + context + ); + const response: RegisterEventTopicCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "RegisterEventTopicResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1RegisterEventTopicCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1RejectSharedDirectoryCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1RejectSharedDirectoryCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1RejectSharedDirectoryResult( + data.RejectSharedDirectoryResult, + context + ); + const response: RejectSharedDirectoryCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "RejectSharedDirectoryResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1RejectSharedDirectoryCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "DirectoryAlreadySharedException": + case "com.amazonaws.directoryservice.v20150416#DirectoryAlreadySharedException": + response = await deserializeAws_json1_1DirectoryAlreadySharedExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1RemoveIpRoutesCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1RemoveIpRoutesCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1RemoveIpRoutesResult( + data.RemoveIpRoutesResult, + context + ); + const response: RemoveIpRoutesCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "RemoveIpRoutesResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1RemoveIpRoutesCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "DirectoryUnavailableException": + case "com.amazonaws.directoryservice.v20150416#DirectoryUnavailableException": + response = await deserializeAws_json1_1DirectoryUnavailableExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1RemoveTagsFromResourceCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1RemoveTagsFromResourceCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1RemoveTagsFromResourceResult( + data.RemoveTagsFromResourceResult, + context + ); + const response: RemoveTagsFromResourceCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "RemoveTagsFromResourceResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1RemoveTagsFromResourceCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1ResetUserPasswordCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1ResetUserPasswordCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1ResetUserPasswordResult( + data.ResetUserPasswordResult, + context + ); + const response: ResetUserPasswordCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ResetUserPasswordResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1ResetUserPasswordCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "DirectoryUnavailableException": + case "com.amazonaws.directoryservice.v20150416#DirectoryUnavailableException": + response = await deserializeAws_json1_1DirectoryUnavailableExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidPasswordException": + case "com.amazonaws.directoryservice.v20150416#InvalidPasswordException": + response = await deserializeAws_json1_1InvalidPasswordExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + case "UnsupportedOperationException": + case "com.amazonaws.directoryservice.v20150416#UnsupportedOperationException": + response = await deserializeAws_json1_1UnsupportedOperationExceptionResponse( + parsedOutput, + context + ); + break; + case "UserDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#UserDoesNotExistException": + response = await deserializeAws_json1_1UserDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1RestoreFromSnapshotCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1RestoreFromSnapshotCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1RestoreFromSnapshotResult( + data.RestoreFromSnapshotResult, + context + ); + const response: RestoreFromSnapshotCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "RestoreFromSnapshotResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1RestoreFromSnapshotCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1ShareDirectoryCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1ShareDirectoryCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1ShareDirectoryResult( + data.ShareDirectoryResult, + context + ); + const response: ShareDirectoryCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ShareDirectoryResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1ShareDirectoryCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.directoryservice.v20150416#AccessDeniedException": + response = await deserializeAws_json1_1AccessDeniedExceptionResponse( + parsedOutput, + context + ); + break; + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "DirectoryAlreadySharedException": + case "com.amazonaws.directoryservice.v20150416#DirectoryAlreadySharedException": + response = await deserializeAws_json1_1DirectoryAlreadySharedExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidTargetException": + case "com.amazonaws.directoryservice.v20150416#InvalidTargetException": + response = await deserializeAws_json1_1InvalidTargetExceptionResponse( + parsedOutput, + context + ); + break; + case "OrganizationsException": + case "com.amazonaws.directoryservice.v20150416#OrganizationsException": + response = await deserializeAws_json1_1OrganizationsExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + case "ShareLimitExceededException": + case "com.amazonaws.directoryservice.v20150416#ShareLimitExceededException": + response = await deserializeAws_json1_1ShareLimitExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "UnsupportedOperationException": + case "com.amazonaws.directoryservice.v20150416#UnsupportedOperationException": + response = await deserializeAws_json1_1UnsupportedOperationExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1StartSchemaExtensionCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1StartSchemaExtensionCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1StartSchemaExtensionResult( + data.StartSchemaExtensionResult, + context + ); + const response: StartSchemaExtensionCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "StartSchemaExtensionResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1StartSchemaExtensionCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "DirectoryUnavailableException": + case "com.amazonaws.directoryservice.v20150416#DirectoryUnavailableException": + response = await deserializeAws_json1_1DirectoryUnavailableExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + case "SnapshotLimitExceededException": + case "com.amazonaws.directoryservice.v20150416#SnapshotLimitExceededException": + response = await deserializeAws_json1_1SnapshotLimitExceededExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1UnshareDirectoryCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1UnshareDirectoryCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1UnshareDirectoryResult( + data.UnshareDirectoryResult, + context + ); + const response: UnshareDirectoryCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "UnshareDirectoryResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1UnshareDirectoryCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "DirectoryNotSharedException": + case "com.amazonaws.directoryservice.v20150416#DirectoryNotSharedException": + response = await deserializeAws_json1_1DirectoryNotSharedExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidTargetException": + case "com.amazonaws.directoryservice.v20150416#InvalidTargetException": + response = await deserializeAws_json1_1InvalidTargetExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1UpdateConditionalForwarderCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1UpdateConditionalForwarderCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1UpdateConditionalForwarderResult( + data.UpdateConditionalForwarderResult, + context + ); + const response: UpdateConditionalForwarderCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "UpdateConditionalForwarderResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1UpdateConditionalForwarderCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "DirectoryUnavailableException": + case "com.amazonaws.directoryservice.v20150416#DirectoryUnavailableException": + response = await deserializeAws_json1_1DirectoryUnavailableExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + case "UnsupportedOperationException": + case "com.amazonaws.directoryservice.v20150416#UnsupportedOperationException": + response = await deserializeAws_json1_1UnsupportedOperationExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1UpdateNumberOfDomainControllersCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1UpdateNumberOfDomainControllersCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1UpdateNumberOfDomainControllersResult( + data.UpdateNumberOfDomainControllersResult, + context + ); + const response: UpdateNumberOfDomainControllersCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "UpdateNumberOfDomainControllersResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1UpdateNumberOfDomainControllersCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "DirectoryUnavailableException": + case "com.amazonaws.directoryservice.v20150416#DirectoryUnavailableException": + response = await deserializeAws_json1_1DirectoryUnavailableExceptionResponse( + parsedOutput, + context + ); + break; + case "DomainControllerLimitExceededException": + case "com.amazonaws.directoryservice.v20150416#DomainControllerLimitExceededException": + response = await deserializeAws_json1_1DomainControllerLimitExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + case "UnsupportedOperationException": + case "com.amazonaws.directoryservice.v20150416#UnsupportedOperationException": + response = await deserializeAws_json1_1UnsupportedOperationExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1UpdateRadiusCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1UpdateRadiusCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1UpdateRadiusResult( + data.UpdateRadiusResult, + context + ); + const response: UpdateRadiusCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "UpdateRadiusResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1UpdateRadiusCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1UpdateTrustCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1UpdateTrustCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1UpdateTrustResult( + data.UpdateTrustResult, + context + ); + const response: UpdateTrustCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "UpdateTrustResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1UpdateTrustCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1VerifyTrustCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1VerifyTrustCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1VerifyTrustResult( + data.VerifyTrustResult, + context + ); + const response: VerifyTrustCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "VerifyTrustResult", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1VerifyTrustCommandError( + 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; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "ClientException": + case "com.amazonaws.directoryservice.v20150416#ClientException": + response = await deserializeAws_json1_1ClientExceptionResponse( + parsedOutput, + context + ); + break; + case "EntityDoesNotExistException": + case "com.amazonaws.directoryservice.v20150416#EntityDoesNotExistException": + response = await deserializeAws_json1_1EntityDoesNotExistExceptionResponse( + parsedOutput, + context + ); + break; + case "InvalidParameterException": + case "com.amazonaws.directoryservice.v20150416#InvalidParameterException": + response = await deserializeAws_json1_1InvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "ServiceException": + case "com.amazonaws.directoryservice.v20150416#ServiceException": + response = await deserializeAws_json1_1ServiceExceptionResponse( + parsedOutput, + context + ); + break; + case "UnsupportedOperationException": + case "com.amazonaws.directoryservice.v20150416#UnsupportedOperationException": + response = await deserializeAws_json1_1UnsupportedOperationExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.directoryservice.v20150416#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +const deserializeAws_json1_1AccessDeniedExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1AccessDeniedException( + output.body, + context + ); + const contents: AccessDeniedException = { + __type: "AccessDeniedException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1AuthenticationFailedExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1AuthenticationFailedException( + output.body, + context + ); + const contents: AuthenticationFailedException = { + __type: "AuthenticationFailedException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1CertificateAlreadyExistsExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1CertificateAlreadyExistsException( + output.body, + context + ); + const contents: CertificateAlreadyExistsException = { + __type: "CertificateAlreadyExistsException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1CertificateDoesNotExistExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1CertificateDoesNotExistException( + output.body, + context + ); + const contents: CertificateDoesNotExistException = { + __type: "CertificateDoesNotExistException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1CertificateInUseExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1CertificateInUseException( + output.body, + context + ); + const contents: CertificateInUseException = { + __type: "CertificateInUseException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1CertificateLimitExceededExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1CertificateLimitExceededException( + output.body, + context + ); + const contents: CertificateLimitExceededException = { + __type: "CertificateLimitExceededException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1ClientExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1ClientException( + output.body, + context + ); + const contents: ClientException = { + __type: "ClientException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1DirectoryAlreadySharedExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1DirectoryAlreadySharedException( + output.body, + context + ); + const contents: DirectoryAlreadySharedException = { + __type: "DirectoryAlreadySharedException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1DirectoryDoesNotExistExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1DirectoryDoesNotExistException( + output.body, + context + ); + const contents: DirectoryDoesNotExistException = { + __type: "DirectoryDoesNotExistException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1DirectoryLimitExceededExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1DirectoryLimitExceededException( + output.body, + context + ); + const contents: DirectoryLimitExceededException = { + __type: "DirectoryLimitExceededException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1DirectoryNotSharedExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1DirectoryNotSharedException( + output.body, + context + ); + const contents: DirectoryNotSharedException = { + __type: "DirectoryNotSharedException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1DirectoryUnavailableExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1DirectoryUnavailableException( + output.body, + context + ); + const contents: DirectoryUnavailableException = { + __type: "DirectoryUnavailableException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1DomainControllerLimitExceededExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1DomainControllerLimitExceededException( + output.body, + context + ); + const contents: DomainControllerLimitExceededException = { + __type: "DomainControllerLimitExceededException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1EntityAlreadyExistsExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1EntityAlreadyExistsException( + output.body, + context + ); + const contents: EntityAlreadyExistsException = { + __type: "EntityAlreadyExistsException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1EntityDoesNotExistExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1EntityDoesNotExistException( + output.body, + context + ); + const contents: EntityDoesNotExistException = { + __type: "EntityDoesNotExistException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1InsufficientPermissionsExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1InsufficientPermissionsException( + output.body, + context + ); + const contents: InsufficientPermissionsException = { + __type: "InsufficientPermissionsException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1InvalidCertificateExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1InvalidCertificateException( + output.body, + context + ); + const contents: InvalidCertificateException = { + __type: "InvalidCertificateException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1InvalidLDAPSStatusExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1InvalidLDAPSStatusException( + output.body, + context + ); + const contents: InvalidLDAPSStatusException = { + __type: "InvalidLDAPSStatusException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1InvalidNextTokenExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1InvalidNextTokenException( + output.body, + context + ); + const contents: InvalidNextTokenException = { + __type: "InvalidNextTokenException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1InvalidParameterExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1InvalidParameterException( + output.body, + context + ); + const contents: InvalidParameterException = { + __type: "InvalidParameterException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1InvalidPasswordExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1InvalidPasswordException( + output.body, + context + ); + const contents: InvalidPasswordException = { + __type: "InvalidPasswordException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1InvalidTargetExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1InvalidTargetException( + output.body, + context + ); + const contents: InvalidTargetException = { + __type: "InvalidTargetException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1IpRouteLimitExceededExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1IpRouteLimitExceededException( + output.body, + context + ); + const contents: IpRouteLimitExceededException = { + __type: "IpRouteLimitExceededException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1NoAvailableCertificateExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1NoAvailableCertificateException( + output.body, + context + ); + const contents: NoAvailableCertificateException = { + __type: "NoAvailableCertificateException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1OrganizationsExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1OrganizationsException( + output.body, + context + ); + const contents: OrganizationsException = { + __type: "OrganizationsException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1ServiceExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1ServiceException( + output.body, + context + ); + const contents: ServiceException = { + __type: "ServiceException", + $fault: "server", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1ShareLimitExceededExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1ShareLimitExceededException( + output.body, + context + ); + const contents: ShareLimitExceededException = { + __type: "ShareLimitExceededException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1SnapshotLimitExceededExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1SnapshotLimitExceededException( + output.body, + context + ); + const contents: SnapshotLimitExceededException = { + __type: "SnapshotLimitExceededException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1TagLimitExceededExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1TagLimitExceededException( + output.body, + context + ); + const contents: TagLimitExceededException = { + __type: "TagLimitExceededException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1UnsupportedOperationExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1UnsupportedOperationException( + output.body, + context + ); + const contents: UnsupportedOperationException = { + __type: "UnsupportedOperationException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1UserDoesNotExistExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1UserDoesNotExistException( + output.body, + context + ); + const contents: UserDoesNotExistException = { + __type: "UserDoesNotExistException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const serializeAws_json1_1AcceptSharedDirectoryRequest = ( + input: AcceptSharedDirectoryRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.SharedDirectoryId !== undefined) { + bodyParams["SharedDirectoryId"] = input.SharedDirectoryId; + } + return bodyParams; +}; + +const serializeAws_json1_1AddIpRoutesRequest = ( + input: AddIpRoutesRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + if (input.IpRoutes !== undefined) { + bodyParams["IpRoutes"] = serializeAws_json1_1IpRoutes( + input.IpRoutes, + context + ); + } + if (input.UpdateSecurityGroupForDirectoryControllers !== undefined) { + bodyParams["UpdateSecurityGroupForDirectoryControllers"] = + input.UpdateSecurityGroupForDirectoryControllers; + } + return bodyParams; +}; + +const serializeAws_json1_1AddTagsToResourceRequest = ( + input: AddTagsToResourceRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ResourceId !== undefined) { + bodyParams["ResourceId"] = input.ResourceId; + } + if (input.Tags !== undefined) { + bodyParams["Tags"] = serializeAws_json1_1Tags(input.Tags, context); + } + return bodyParams; +}; + +const serializeAws_json1_1Attribute = ( + input: Attribute, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Name !== undefined) { + bodyParams["Name"] = input.Name; + } + if (input.Value !== undefined) { + bodyParams["Value"] = input.Value; + } + return bodyParams; +}; + +const serializeAws_json1_1Attributes = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => + serializeAws_json1_1Attribute(entry, context) + ); +}; + +const serializeAws_json1_1CancelSchemaExtensionRequest = ( + input: CancelSchemaExtensionRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + if (input.SchemaExtensionId !== undefined) { + bodyParams["SchemaExtensionId"] = input.SchemaExtensionId; + } + return bodyParams; +}; + +const serializeAws_json1_1CidrIps = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => entry); +}; + +const serializeAws_json1_1ConnectDirectoryRequest = ( + input: ConnectDirectoryRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ConnectSettings !== undefined) { + bodyParams[ + "ConnectSettings" + ] = serializeAws_json1_1DirectoryConnectSettings( + input.ConnectSettings, + context + ); + } + if (input.Description !== undefined) { + bodyParams["Description"] = input.Description; + } + if (input.Name !== undefined) { + bodyParams["Name"] = input.Name; + } + if (input.Password !== undefined) { + bodyParams["Password"] = input.Password; + } + if (input.ShortName !== undefined) { + bodyParams["ShortName"] = input.ShortName; + } + if (input.Size !== undefined) { + bodyParams["Size"] = input.Size; + } + if (input.Tags !== undefined) { + bodyParams["Tags"] = serializeAws_json1_1Tags(input.Tags, context); + } + return bodyParams; +}; + +const serializeAws_json1_1CreateAliasRequest = ( + input: CreateAliasRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Alias !== undefined) { + bodyParams["Alias"] = input.Alias; + } + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + return bodyParams; +}; + +const serializeAws_json1_1CreateComputerRequest = ( + input: CreateComputerRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ComputerAttributes !== undefined) { + bodyParams["ComputerAttributes"] = serializeAws_json1_1Attributes( + input.ComputerAttributes, + context + ); + } + if (input.ComputerName !== undefined) { + bodyParams["ComputerName"] = input.ComputerName; + } + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + if (input.OrganizationalUnitDistinguishedName !== undefined) { + bodyParams["OrganizationalUnitDistinguishedName"] = + input.OrganizationalUnitDistinguishedName; + } + if (input.Password !== undefined) { + bodyParams["Password"] = input.Password; + } + return bodyParams; +}; + +const serializeAws_json1_1CreateConditionalForwarderRequest = ( + input: CreateConditionalForwarderRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + if (input.DnsIpAddrs !== undefined) { + bodyParams["DnsIpAddrs"] = serializeAws_json1_1DnsIpAddrs( + input.DnsIpAddrs, + context + ); + } + if (input.RemoteDomainName !== undefined) { + bodyParams["RemoteDomainName"] = input.RemoteDomainName; + } + return bodyParams; +}; + +const serializeAws_json1_1CreateDirectoryRequest = ( + input: CreateDirectoryRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Description !== undefined) { + bodyParams["Description"] = input.Description; + } + if (input.Name !== undefined) { + bodyParams["Name"] = input.Name; + } + if (input.Password !== undefined) { + bodyParams["Password"] = input.Password; + } + if (input.ShortName !== undefined) { + bodyParams["ShortName"] = input.ShortName; + } + if (input.Size !== undefined) { + bodyParams["Size"] = input.Size; + } + if (input.Tags !== undefined) { + bodyParams["Tags"] = serializeAws_json1_1Tags(input.Tags, context); + } + if (input.VpcSettings !== undefined) { + bodyParams["VpcSettings"] = serializeAws_json1_1DirectoryVpcSettings( + input.VpcSettings, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1CreateLogSubscriptionRequest = ( + input: CreateLogSubscriptionRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + if (input.LogGroupName !== undefined) { + bodyParams["LogGroupName"] = input.LogGroupName; + } + return bodyParams; +}; + +const serializeAws_json1_1CreateMicrosoftADRequest = ( + input: CreateMicrosoftADRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Description !== undefined) { + bodyParams["Description"] = input.Description; + } + if (input.Edition !== undefined) { + bodyParams["Edition"] = input.Edition; + } + if (input.Name !== undefined) { + bodyParams["Name"] = input.Name; + } + if (input.Password !== undefined) { + bodyParams["Password"] = input.Password; + } + if (input.ShortName !== undefined) { + bodyParams["ShortName"] = input.ShortName; + } + if (input.Tags !== undefined) { + bodyParams["Tags"] = serializeAws_json1_1Tags(input.Tags, context); + } + if (input.VpcSettings !== undefined) { + bodyParams["VpcSettings"] = serializeAws_json1_1DirectoryVpcSettings( + input.VpcSettings, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1CreateSnapshotRequest = ( + input: CreateSnapshotRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + if (input.Name !== undefined) { + bodyParams["Name"] = input.Name; + } + return bodyParams; +}; + +const serializeAws_json1_1CreateTrustRequest = ( + input: CreateTrustRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ConditionalForwarderIpAddrs !== undefined) { + bodyParams["ConditionalForwarderIpAddrs"] = serializeAws_json1_1DnsIpAddrs( + input.ConditionalForwarderIpAddrs, + context + ); + } + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + if (input.RemoteDomainName !== undefined) { + bodyParams["RemoteDomainName"] = input.RemoteDomainName; + } + if (input.SelectiveAuth !== undefined) { + bodyParams["SelectiveAuth"] = input.SelectiveAuth; + } + if (input.TrustDirection !== undefined) { + bodyParams["TrustDirection"] = input.TrustDirection; + } + if (input.TrustPassword !== undefined) { + bodyParams["TrustPassword"] = input.TrustPassword; + } + if (input.TrustType !== undefined) { + bodyParams["TrustType"] = input.TrustType; + } + return bodyParams; +}; + +const serializeAws_json1_1DeleteConditionalForwarderRequest = ( + input: DeleteConditionalForwarderRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + if (input.RemoteDomainName !== undefined) { + bodyParams["RemoteDomainName"] = input.RemoteDomainName; + } + return bodyParams; +}; + +const serializeAws_json1_1DeleteDirectoryRequest = ( + input: DeleteDirectoryRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + return bodyParams; +}; + +const serializeAws_json1_1DeleteLogSubscriptionRequest = ( + input: DeleteLogSubscriptionRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + return bodyParams; +}; + +const serializeAws_json1_1DeleteSnapshotRequest = ( + input: DeleteSnapshotRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.SnapshotId !== undefined) { + bodyParams["SnapshotId"] = input.SnapshotId; + } + return bodyParams; +}; + +const serializeAws_json1_1DeleteTrustRequest = ( + input: DeleteTrustRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DeleteAssociatedConditionalForwarder !== undefined) { + bodyParams["DeleteAssociatedConditionalForwarder"] = + input.DeleteAssociatedConditionalForwarder; + } + if (input.TrustId !== undefined) { + bodyParams["TrustId"] = input.TrustId; + } + return bodyParams; +}; + +const serializeAws_json1_1DeregisterCertificateRequest = ( + input: DeregisterCertificateRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.CertificateId !== undefined) { + bodyParams["CertificateId"] = input.CertificateId; + } + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + return bodyParams; +}; + +const serializeAws_json1_1DeregisterEventTopicRequest = ( + input: DeregisterEventTopicRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + if (input.TopicName !== undefined) { + bodyParams["TopicName"] = input.TopicName; + } + return bodyParams; +}; + +const serializeAws_json1_1DescribeCertificateRequest = ( + input: DescribeCertificateRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.CertificateId !== undefined) { + bodyParams["CertificateId"] = input.CertificateId; + } + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + return bodyParams; +}; + +const serializeAws_json1_1DescribeConditionalForwardersRequest = ( + input: DescribeConditionalForwardersRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + if (input.RemoteDomainNames !== undefined) { + bodyParams["RemoteDomainNames"] = serializeAws_json1_1RemoteDomainNames( + input.RemoteDomainNames, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1DescribeDirectoriesRequest = ( + input: DescribeDirectoriesRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryIds !== undefined) { + bodyParams["DirectoryIds"] = serializeAws_json1_1DirectoryIds( + input.DirectoryIds, + context + ); + } + if (input.Limit !== undefined) { + bodyParams["Limit"] = input.Limit; + } + if (input.NextToken !== undefined) { + bodyParams["NextToken"] = input.NextToken; + } + return bodyParams; +}; + +const serializeAws_json1_1DescribeDomainControllersRequest = ( + input: DescribeDomainControllersRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + if (input.DomainControllerIds !== undefined) { + bodyParams["DomainControllerIds"] = serializeAws_json1_1DomainControllerIds( + input.DomainControllerIds, + context + ); + } + if (input.Limit !== undefined) { + bodyParams["Limit"] = input.Limit; + } + if (input.NextToken !== undefined) { + bodyParams["NextToken"] = input.NextToken; + } + return bodyParams; +}; + +const serializeAws_json1_1DescribeEventTopicsRequest = ( + input: DescribeEventTopicsRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + if (input.TopicNames !== undefined) { + bodyParams["TopicNames"] = serializeAws_json1_1TopicNames( + input.TopicNames, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1DescribeLDAPSSettingsRequest = ( + input: DescribeLDAPSSettingsRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + if (input.Limit !== undefined) { + bodyParams["Limit"] = input.Limit; + } + if (input.NextToken !== undefined) { + bodyParams["NextToken"] = input.NextToken; + } + if (input.Type !== undefined) { + bodyParams["Type"] = input.Type; + } + return bodyParams; +}; + +const serializeAws_json1_1DescribeSharedDirectoriesRequest = ( + input: DescribeSharedDirectoriesRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Limit !== undefined) { + bodyParams["Limit"] = input.Limit; + } + if (input.NextToken !== undefined) { + bodyParams["NextToken"] = input.NextToken; + } + if (input.OwnerDirectoryId !== undefined) { + bodyParams["OwnerDirectoryId"] = input.OwnerDirectoryId; + } + if (input.SharedDirectoryIds !== undefined) { + bodyParams["SharedDirectoryIds"] = serializeAws_json1_1DirectoryIds( + input.SharedDirectoryIds, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1DescribeSnapshotsRequest = ( + input: DescribeSnapshotsRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + if (input.Limit !== undefined) { + bodyParams["Limit"] = input.Limit; + } + if (input.NextToken !== undefined) { + bodyParams["NextToken"] = input.NextToken; + } + if (input.SnapshotIds !== undefined) { + bodyParams["SnapshotIds"] = serializeAws_json1_1SnapshotIds( + input.SnapshotIds, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1DescribeTrustsRequest = ( + input: DescribeTrustsRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + if (input.Limit !== undefined) { + bodyParams["Limit"] = input.Limit; + } + if (input.NextToken !== undefined) { + bodyParams["NextToken"] = input.NextToken; + } + if (input.TrustIds !== undefined) { + bodyParams["TrustIds"] = serializeAws_json1_1TrustIds( + input.TrustIds, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1DirectoryConnectSettings = ( + input: DirectoryConnectSettings, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.CustomerDnsIps !== undefined) { + bodyParams["CustomerDnsIps"] = serializeAws_json1_1DnsIpAddrs( + input.CustomerDnsIps, + context + ); + } + if (input.CustomerUserName !== undefined) { + bodyParams["CustomerUserName"] = input.CustomerUserName; + } + if (input.SubnetIds !== undefined) { + bodyParams["SubnetIds"] = serializeAws_json1_1SubnetIds( + input.SubnetIds, + context + ); + } + if (input.VpcId !== undefined) { + bodyParams["VpcId"] = input.VpcId; + } + return bodyParams; +}; + +const serializeAws_json1_1DirectoryIds = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => entry); +}; + +const serializeAws_json1_1DirectoryVpcSettings = ( + input: DirectoryVpcSettings, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.SubnetIds !== undefined) { + bodyParams["SubnetIds"] = serializeAws_json1_1SubnetIds( + input.SubnetIds, + context + ); + } + if (input.VpcId !== undefined) { + bodyParams["VpcId"] = input.VpcId; + } + return bodyParams; +}; + +const serializeAws_json1_1DisableLDAPSRequest = ( + input: DisableLDAPSRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + if (input.Type !== undefined) { + bodyParams["Type"] = input.Type; + } + return bodyParams; +}; + +const serializeAws_json1_1DisableRadiusRequest = ( + input: DisableRadiusRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + return bodyParams; +}; + +const serializeAws_json1_1DisableSsoRequest = ( + input: DisableSsoRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + if (input.Password !== undefined) { + bodyParams["Password"] = input.Password; + } + if (input.UserName !== undefined) { + bodyParams["UserName"] = input.UserName; + } + return bodyParams; +}; + +const serializeAws_json1_1DnsIpAddrs = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => entry); +}; + +const serializeAws_json1_1DomainControllerIds = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => entry); +}; + +const serializeAws_json1_1EnableLDAPSRequest = ( + input: EnableLDAPSRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + if (input.Type !== undefined) { + bodyParams["Type"] = input.Type; + } + return bodyParams; +}; + +const serializeAws_json1_1EnableRadiusRequest = ( + input: EnableRadiusRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + if (input.RadiusSettings !== undefined) { + bodyParams["RadiusSettings"] = serializeAws_json1_1RadiusSettings( + input.RadiusSettings, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1EnableSsoRequest = ( + input: EnableSsoRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + if (input.Password !== undefined) { + bodyParams["Password"] = input.Password; + } + if (input.UserName !== undefined) { + bodyParams["UserName"] = input.UserName; + } + return bodyParams; +}; + +const serializeAws_json1_1GetDirectoryLimitsRequest = ( + input: GetDirectoryLimitsRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + return bodyParams; +}; + +const serializeAws_json1_1GetSnapshotLimitsRequest = ( + input: GetSnapshotLimitsRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + return bodyParams; +}; + +const serializeAws_json1_1IpRoute = ( + input: IpRoute, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.CidrIp !== undefined) { + bodyParams["CidrIp"] = input.CidrIp; + } + if (input.Description !== undefined) { + bodyParams["Description"] = input.Description; + } + return bodyParams; +}; + +const serializeAws_json1_1IpRoutes = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => + serializeAws_json1_1IpRoute(entry, context) + ); +}; + +const serializeAws_json1_1ListCertificatesRequest = ( + input: ListCertificatesRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + if (input.Limit !== undefined) { + bodyParams["Limit"] = input.Limit; + } + if (input.NextToken !== undefined) { + bodyParams["NextToken"] = input.NextToken; + } + return bodyParams; +}; + +const serializeAws_json1_1ListIpRoutesRequest = ( + input: ListIpRoutesRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + if (input.Limit !== undefined) { + bodyParams["Limit"] = input.Limit; + } + if (input.NextToken !== undefined) { + bodyParams["NextToken"] = input.NextToken; + } + return bodyParams; +}; + +const serializeAws_json1_1ListLogSubscriptionsRequest = ( + input: ListLogSubscriptionsRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + if (input.Limit !== undefined) { + bodyParams["Limit"] = input.Limit; + } + if (input.NextToken !== undefined) { + bodyParams["NextToken"] = input.NextToken; + } + return bodyParams; +}; + +const serializeAws_json1_1ListSchemaExtensionsRequest = ( + input: ListSchemaExtensionsRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + if (input.Limit !== undefined) { + bodyParams["Limit"] = input.Limit; + } + if (input.NextToken !== undefined) { + bodyParams["NextToken"] = input.NextToken; + } + return bodyParams; +}; + +const serializeAws_json1_1ListTagsForResourceRequest = ( + input: ListTagsForResourceRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Limit !== undefined) { + bodyParams["Limit"] = input.Limit; + } + if (input.NextToken !== undefined) { + bodyParams["NextToken"] = input.NextToken; + } + if (input.ResourceId !== undefined) { + bodyParams["ResourceId"] = input.ResourceId; + } + return bodyParams; +}; + +const serializeAws_json1_1RadiusSettings = ( + input: RadiusSettings, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.AuthenticationProtocol !== undefined) { + bodyParams["AuthenticationProtocol"] = input.AuthenticationProtocol; + } + if (input.DisplayLabel !== undefined) { + bodyParams["DisplayLabel"] = input.DisplayLabel; + } + if (input.RadiusPort !== undefined) { + bodyParams["RadiusPort"] = input.RadiusPort; + } + if (input.RadiusRetries !== undefined) { + bodyParams["RadiusRetries"] = input.RadiusRetries; + } + if (input.RadiusServers !== undefined) { + bodyParams["RadiusServers"] = serializeAws_json1_1Servers( + input.RadiusServers, + context + ); + } + if (input.RadiusTimeout !== undefined) { + bodyParams["RadiusTimeout"] = input.RadiusTimeout; + } + if (input.SharedSecret !== undefined) { + bodyParams["SharedSecret"] = input.SharedSecret; + } + if (input.UseSameUsername !== undefined) { + bodyParams["UseSameUsername"] = input.UseSameUsername; + } + return bodyParams; +}; + +const serializeAws_json1_1RegisterCertificateRequest = ( + input: RegisterCertificateRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.CertificateData !== undefined) { + bodyParams["CertificateData"] = input.CertificateData; + } + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + return bodyParams; +}; + +const serializeAws_json1_1RegisterEventTopicRequest = ( + input: RegisterEventTopicRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + if (input.TopicName !== undefined) { + bodyParams["TopicName"] = input.TopicName; + } + return bodyParams; +}; + +const serializeAws_json1_1RejectSharedDirectoryRequest = ( + input: RejectSharedDirectoryRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.SharedDirectoryId !== undefined) { + bodyParams["SharedDirectoryId"] = input.SharedDirectoryId; + } + return bodyParams; +}; + +const serializeAws_json1_1RemoteDomainNames = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => entry); +}; + +const serializeAws_json1_1RemoveIpRoutesRequest = ( + input: RemoveIpRoutesRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.CidrIps !== undefined) { + bodyParams["CidrIps"] = serializeAws_json1_1CidrIps(input.CidrIps, context); + } + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + return bodyParams; +}; + +const serializeAws_json1_1RemoveTagsFromResourceRequest = ( + input: RemoveTagsFromResourceRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ResourceId !== undefined) { + bodyParams["ResourceId"] = input.ResourceId; + } + if (input.TagKeys !== undefined) { + bodyParams["TagKeys"] = serializeAws_json1_1TagKeys(input.TagKeys, context); + } + return bodyParams; +}; + +const serializeAws_json1_1ResetUserPasswordRequest = ( + input: ResetUserPasswordRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + if (input.NewPassword !== undefined) { + bodyParams["NewPassword"] = input.NewPassword; + } + if (input.UserName !== undefined) { + bodyParams["UserName"] = input.UserName; + } + return bodyParams; +}; + +const serializeAws_json1_1RestoreFromSnapshotRequest = ( + input: RestoreFromSnapshotRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.SnapshotId !== undefined) { + bodyParams["SnapshotId"] = input.SnapshotId; + } + return bodyParams; +}; + +const serializeAws_json1_1Servers = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => entry); +}; + +const serializeAws_json1_1ShareDirectoryRequest = ( + input: ShareDirectoryRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + if (input.ShareMethod !== undefined) { + bodyParams["ShareMethod"] = input.ShareMethod; + } + if (input.ShareNotes !== undefined) { + bodyParams["ShareNotes"] = input.ShareNotes; + } + if (input.ShareTarget !== undefined) { + bodyParams["ShareTarget"] = serializeAws_json1_1ShareTarget( + input.ShareTarget, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1ShareTarget = ( + input: ShareTarget, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Id !== undefined) { + bodyParams["Id"] = input.Id; + } + if (input.Type !== undefined) { + bodyParams["Type"] = input.Type; + } + return bodyParams; +}; + +const serializeAws_json1_1SnapshotIds = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => entry); +}; + +const serializeAws_json1_1StartSchemaExtensionRequest = ( + input: StartSchemaExtensionRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.CreateSnapshotBeforeSchemaExtension !== undefined) { + bodyParams["CreateSnapshotBeforeSchemaExtension"] = + input.CreateSnapshotBeforeSchemaExtension; + } + if (input.Description !== undefined) { + bodyParams["Description"] = input.Description; + } + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + if (input.LdifContent !== undefined) { + bodyParams["LdifContent"] = input.LdifContent; + } + return bodyParams; +}; + +const serializeAws_json1_1SubnetIds = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => entry); +}; + +const serializeAws_json1_1Tag = (input: Tag, context: __SerdeContext): any => { + let bodyParams: any = {}; + if (input.Key !== undefined) { + bodyParams["Key"] = input.Key; + } + if (input.Value !== undefined) { + bodyParams["Value"] = input.Value; + } + return bodyParams; +}; + +const serializeAws_json1_1TagKeys = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => entry); +}; + +const serializeAws_json1_1Tags = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => serializeAws_json1_1Tag(entry, context)); +}; + +const serializeAws_json1_1TopicNames = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => entry); +}; + +const serializeAws_json1_1TrustIds = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => entry); +}; + +const serializeAws_json1_1UnshareDirectoryRequest = ( + input: UnshareDirectoryRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + if (input.UnshareTarget !== undefined) { + bodyParams["UnshareTarget"] = serializeAws_json1_1UnshareTarget( + input.UnshareTarget, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1UnshareTarget = ( + input: UnshareTarget, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Id !== undefined) { + bodyParams["Id"] = input.Id; + } + if (input.Type !== undefined) { + bodyParams["Type"] = input.Type; + } + return bodyParams; +}; + +const serializeAws_json1_1UpdateConditionalForwarderRequest = ( + input: UpdateConditionalForwarderRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + if (input.DnsIpAddrs !== undefined) { + bodyParams["DnsIpAddrs"] = serializeAws_json1_1DnsIpAddrs( + input.DnsIpAddrs, + context + ); + } + if (input.RemoteDomainName !== undefined) { + bodyParams["RemoteDomainName"] = input.RemoteDomainName; + } + return bodyParams; +}; + +const serializeAws_json1_1UpdateNumberOfDomainControllersRequest = ( + input: UpdateNumberOfDomainControllersRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DesiredNumber !== undefined) { + bodyParams["DesiredNumber"] = input.DesiredNumber; + } + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + return bodyParams; +}; + +const serializeAws_json1_1UpdateRadiusRequest = ( + input: UpdateRadiusRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DirectoryId !== undefined) { + bodyParams["DirectoryId"] = input.DirectoryId; + } + if (input.RadiusSettings !== undefined) { + bodyParams["RadiusSettings"] = serializeAws_json1_1RadiusSettings( + input.RadiusSettings, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1UpdateTrustRequest = ( + input: UpdateTrustRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.SelectiveAuth !== undefined) { + bodyParams["SelectiveAuth"] = input.SelectiveAuth; + } + if (input.TrustId !== undefined) { + bodyParams["TrustId"] = input.TrustId; + } + return bodyParams; +}; + +const serializeAws_json1_1VerifyTrustRequest = ( + input: VerifyTrustRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.TrustId !== undefined) { + bodyParams["TrustId"] = input.TrustId; + } + return bodyParams; +}; + +const deserializeAws_json1_1AcceptSharedDirectoryResult = ( + output: any, + context: __SerdeContext +): AcceptSharedDirectoryResult => { + let contents: any = { + __type: "AcceptSharedDirectoryResult", + SharedDirectory: undefined + }; + if (output.SharedDirectory !== undefined) { + contents.SharedDirectory = deserializeAws_json1_1SharedDirectory( + output.SharedDirectory, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1AccessDeniedException = ( + output: any, + context: __SerdeContext +): AccessDeniedException => { + let contents: any = { + __type: "AccessDeniedException", + Message: undefined, + RequestId: undefined + }; + if (output.Message !== undefined) { + contents.Message = output.Message; + } + if (output.RequestId !== undefined) { + contents.RequestId = output.RequestId; + } + return contents; +}; + +const deserializeAws_json1_1AddIpRoutesResult = ( + output: any, + context: __SerdeContext +): AddIpRoutesResult => { + let contents: any = { + __type: "AddIpRoutesResult" + }; + return contents; +}; + +const deserializeAws_json1_1AddTagsToResourceResult = ( + output: any, + context: __SerdeContext +): AddTagsToResourceResult => { + let contents: any = { + __type: "AddTagsToResourceResult" + }; + return contents; +}; + +const deserializeAws_json1_1Attribute = ( + output: any, + context: __SerdeContext +): Attribute => { + let contents: any = { + __type: "Attribute", + Name: undefined, + Value: undefined + }; + if (output.Name !== undefined) { + contents.Name = output.Name; + } + if (output.Value !== undefined) { + contents.Value = output.Value; + } + return contents; +}; + +const deserializeAws_json1_1Attributes = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1Attribute(entry, context) + ); +}; + +const deserializeAws_json1_1AuthenticationFailedException = ( + output: any, + context: __SerdeContext +): AuthenticationFailedException => { + let contents: any = { + __type: "AuthenticationFailedException", + Message: undefined, + RequestId: undefined + }; + if (output.Message !== undefined) { + contents.Message = output.Message; + } + if (output.RequestId !== undefined) { + contents.RequestId = output.RequestId; + } + return contents; +}; + +const deserializeAws_json1_1AvailabilityZones = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => entry); +}; + +const deserializeAws_json1_1CancelSchemaExtensionResult = ( + output: any, + context: __SerdeContext +): CancelSchemaExtensionResult => { + let contents: any = { + __type: "CancelSchemaExtensionResult" + }; + return contents; +}; + +const deserializeAws_json1_1Certificate = ( + output: any, + context: __SerdeContext +): Certificate => { + let contents: any = { + __type: "Certificate", + CertificateId: undefined, + CommonName: undefined, + ExpiryDateTime: undefined, + RegisteredDateTime: undefined, + State: undefined, + StateReason: undefined + }; + if (output.CertificateId !== undefined) { + contents.CertificateId = output.CertificateId; + } + if (output.CommonName !== undefined) { + contents.CommonName = output.CommonName; + } + if (output.ExpiryDateTime !== undefined) { + contents.ExpiryDateTime = new Date( + output.ExpiryDateTime % 1 != 0 + ? Math.round(output.ExpiryDateTime * 1000) + : output.ExpiryDateTime + ); + } + if (output.RegisteredDateTime !== undefined) { + contents.RegisteredDateTime = new Date( + output.RegisteredDateTime % 1 != 0 + ? Math.round(output.RegisteredDateTime * 1000) + : output.RegisteredDateTime + ); + } + if (output.State !== undefined) { + contents.State = output.State; + } + if (output.StateReason !== undefined) { + contents.StateReason = output.StateReason; + } + return contents; +}; + +const deserializeAws_json1_1CertificateAlreadyExistsException = ( + output: any, + context: __SerdeContext +): CertificateAlreadyExistsException => { + let contents: any = { + __type: "CertificateAlreadyExistsException", + Message: undefined, + RequestId: undefined + }; + if (output.Message !== undefined) { + contents.Message = output.Message; + } + if (output.RequestId !== undefined) { + contents.RequestId = output.RequestId; + } + return contents; +}; + +const deserializeAws_json1_1CertificateDoesNotExistException = ( + output: any, + context: __SerdeContext +): CertificateDoesNotExistException => { + let contents: any = { + __type: "CertificateDoesNotExistException", + Message: undefined, + RequestId: undefined + }; + if (output.Message !== undefined) { + contents.Message = output.Message; + } + if (output.RequestId !== undefined) { + contents.RequestId = output.RequestId; + } + return contents; +}; + +const deserializeAws_json1_1CertificateInUseException = ( + output: any, + context: __SerdeContext +): CertificateInUseException => { + let contents: any = { + __type: "CertificateInUseException", + Message: undefined, + RequestId: undefined + }; + if (output.Message !== undefined) { + contents.Message = output.Message; + } + if (output.RequestId !== undefined) { + contents.RequestId = output.RequestId; + } + return contents; +}; + +const deserializeAws_json1_1CertificateInfo = ( + output: any, + context: __SerdeContext +): CertificateInfo => { + let contents: any = { + __type: "CertificateInfo", + CertificateId: undefined, + CommonName: undefined, + State: undefined + }; + if (output.CertificateId !== undefined) { + contents.CertificateId = output.CertificateId; + } + if (output.CommonName !== undefined) { + contents.CommonName = output.CommonName; + } + if (output.State !== undefined) { + contents.State = output.State; + } + return contents; +}; + +const deserializeAws_json1_1CertificateLimitExceededException = ( + output: any, + context: __SerdeContext +): CertificateLimitExceededException => { + let contents: any = { + __type: "CertificateLimitExceededException", + Message: undefined, + RequestId: undefined + }; + if (output.Message !== undefined) { + contents.Message = output.Message; + } + if (output.RequestId !== undefined) { + contents.RequestId = output.RequestId; + } + return contents; +}; + +const deserializeAws_json1_1CertificatesInfo = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1CertificateInfo(entry, context) + ); +}; + +const deserializeAws_json1_1ClientException = ( + output: any, + context: __SerdeContext +): ClientException => { + let contents: any = { + __type: "ClientException", + Message: undefined, + RequestId: undefined + }; + if (output.Message !== undefined) { + contents.Message = output.Message; + } + if (output.RequestId !== undefined) { + contents.RequestId = output.RequestId; + } + return contents; +}; + +const deserializeAws_json1_1Computer = ( + output: any, + context: __SerdeContext +): Computer => { + let contents: any = { + __type: "Computer", + ComputerAttributes: undefined, + ComputerId: undefined, + ComputerName: undefined + }; + if (output.ComputerAttributes !== undefined) { + contents.ComputerAttributes = deserializeAws_json1_1Attributes( + output.ComputerAttributes, + context + ); + } + if (output.ComputerId !== undefined) { + contents.ComputerId = output.ComputerId; + } + if (output.ComputerName !== undefined) { + contents.ComputerName = output.ComputerName; + } + return contents; +}; + +const deserializeAws_json1_1ConditionalForwarder = ( + output: any, + context: __SerdeContext +): ConditionalForwarder => { + let contents: any = { + __type: "ConditionalForwarder", + DnsIpAddrs: undefined, + RemoteDomainName: undefined, + ReplicationScope: undefined + }; + if (output.DnsIpAddrs !== undefined) { + contents.DnsIpAddrs = deserializeAws_json1_1DnsIpAddrs( + output.DnsIpAddrs, + context + ); + } + if (output.RemoteDomainName !== undefined) { + contents.RemoteDomainName = output.RemoteDomainName; + } + if (output.ReplicationScope !== undefined) { + contents.ReplicationScope = output.ReplicationScope; + } + return contents; +}; + +const deserializeAws_json1_1ConditionalForwarders = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1ConditionalForwarder(entry, context) + ); +}; + +const deserializeAws_json1_1ConnectDirectoryResult = ( + output: any, + context: __SerdeContext +): ConnectDirectoryResult => { + let contents: any = { + __type: "ConnectDirectoryResult", + DirectoryId: undefined + }; + if (output.DirectoryId !== undefined) { + contents.DirectoryId = output.DirectoryId; + } + return contents; +}; + +const deserializeAws_json1_1CreateAliasResult = ( + output: any, + context: __SerdeContext +): CreateAliasResult => { + let contents: any = { + __type: "CreateAliasResult", + Alias: undefined, + DirectoryId: undefined + }; + if (output.Alias !== undefined) { + contents.Alias = output.Alias; + } + if (output.DirectoryId !== undefined) { + contents.DirectoryId = output.DirectoryId; + } + return contents; +}; + +const deserializeAws_json1_1CreateComputerResult = ( + output: any, + context: __SerdeContext +): CreateComputerResult => { + let contents: any = { + __type: "CreateComputerResult", + Computer: undefined + }; + if (output.Computer !== undefined) { + contents.Computer = deserializeAws_json1_1Computer( + output.Computer, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1CreateConditionalForwarderResult = ( + output: any, + context: __SerdeContext +): CreateConditionalForwarderResult => { + let contents: any = { + __type: "CreateConditionalForwarderResult" + }; + return contents; +}; + +const deserializeAws_json1_1CreateDirectoryResult = ( + output: any, + context: __SerdeContext +): CreateDirectoryResult => { + let contents: any = { + __type: "CreateDirectoryResult", + DirectoryId: undefined + }; + if (output.DirectoryId !== undefined) { + contents.DirectoryId = output.DirectoryId; + } + return contents; +}; + +const deserializeAws_json1_1CreateLogSubscriptionResult = ( + output: any, + context: __SerdeContext +): CreateLogSubscriptionResult => { + let contents: any = { + __type: "CreateLogSubscriptionResult" + }; + return contents; +}; + +const deserializeAws_json1_1CreateMicrosoftADResult = ( + output: any, + context: __SerdeContext +): CreateMicrosoftADResult => { + let contents: any = { + __type: "CreateMicrosoftADResult", + DirectoryId: undefined + }; + if (output.DirectoryId !== undefined) { + contents.DirectoryId = output.DirectoryId; + } + return contents; +}; + +const deserializeAws_json1_1CreateSnapshotResult = ( + output: any, + context: __SerdeContext +): CreateSnapshotResult => { + let contents: any = { + __type: "CreateSnapshotResult", + SnapshotId: undefined + }; + if (output.SnapshotId !== undefined) { + contents.SnapshotId = output.SnapshotId; + } + return contents; +}; + +const deserializeAws_json1_1CreateTrustResult = ( + output: any, + context: __SerdeContext +): CreateTrustResult => { + let contents: any = { + __type: "CreateTrustResult", + TrustId: undefined + }; + if (output.TrustId !== undefined) { + contents.TrustId = output.TrustId; + } + return contents; +}; + +const deserializeAws_json1_1DeleteConditionalForwarderResult = ( + output: any, + context: __SerdeContext +): DeleteConditionalForwarderResult => { + let contents: any = { + __type: "DeleteConditionalForwarderResult" + }; + return contents; +}; + +const deserializeAws_json1_1DeleteDirectoryResult = ( + output: any, + context: __SerdeContext +): DeleteDirectoryResult => { + let contents: any = { + __type: "DeleteDirectoryResult", + DirectoryId: undefined + }; + if (output.DirectoryId !== undefined) { + contents.DirectoryId = output.DirectoryId; + } + return contents; +}; + +const deserializeAws_json1_1DeleteLogSubscriptionResult = ( + output: any, + context: __SerdeContext +): DeleteLogSubscriptionResult => { + let contents: any = { + __type: "DeleteLogSubscriptionResult" + }; + return contents; +}; + +const deserializeAws_json1_1DeleteSnapshotResult = ( + output: any, + context: __SerdeContext +): DeleteSnapshotResult => { + let contents: any = { + __type: "DeleteSnapshotResult", + SnapshotId: undefined + }; + if (output.SnapshotId !== undefined) { + contents.SnapshotId = output.SnapshotId; + } + return contents; +}; + +const deserializeAws_json1_1DeleteTrustResult = ( + output: any, + context: __SerdeContext +): DeleteTrustResult => { + let contents: any = { + __type: "DeleteTrustResult", + TrustId: undefined + }; + if (output.TrustId !== undefined) { + contents.TrustId = output.TrustId; + } + return contents; +}; + +const deserializeAws_json1_1DeregisterCertificateResult = ( + output: any, + context: __SerdeContext +): DeregisterCertificateResult => { + let contents: any = { + __type: "DeregisterCertificateResult" + }; + return contents; +}; + +const deserializeAws_json1_1DeregisterEventTopicResult = ( + output: any, + context: __SerdeContext +): DeregisterEventTopicResult => { + let contents: any = { + __type: "DeregisterEventTopicResult" + }; + return contents; +}; + +const deserializeAws_json1_1DescribeCertificateResult = ( + output: any, + context: __SerdeContext +): DescribeCertificateResult => { + let contents: any = { + __type: "DescribeCertificateResult", + Certificate: undefined + }; + if (output.Certificate !== undefined) { + contents.Certificate = deserializeAws_json1_1Certificate( + output.Certificate, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1DescribeConditionalForwardersResult = ( + output: any, + context: __SerdeContext +): DescribeConditionalForwardersResult => { + let contents: any = { + __type: "DescribeConditionalForwardersResult", + ConditionalForwarders: undefined + }; + if (output.ConditionalForwarders !== undefined) { + contents.ConditionalForwarders = deserializeAws_json1_1ConditionalForwarders( + output.ConditionalForwarders, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1DescribeDirectoriesResult = ( + output: any, + context: __SerdeContext +): DescribeDirectoriesResult => { + let contents: any = { + __type: "DescribeDirectoriesResult", + DirectoryDescriptions: undefined, + NextToken: undefined + }; + if (output.DirectoryDescriptions !== undefined) { + contents.DirectoryDescriptions = deserializeAws_json1_1DirectoryDescriptions( + output.DirectoryDescriptions, + context + ); + } + if (output.NextToken !== undefined) { + contents.NextToken = output.NextToken; + } + return contents; +}; + +const deserializeAws_json1_1DescribeDomainControllersResult = ( + output: any, + context: __SerdeContext +): DescribeDomainControllersResult => { + let contents: any = { + __type: "DescribeDomainControllersResult", + DomainControllers: undefined, + NextToken: undefined + }; + if (output.DomainControllers !== undefined) { + contents.DomainControllers = deserializeAws_json1_1DomainControllers( + output.DomainControllers, + context + ); + } + if (output.NextToken !== undefined) { + contents.NextToken = output.NextToken; + } + return contents; +}; + +const deserializeAws_json1_1DescribeEventTopicsResult = ( + output: any, + context: __SerdeContext +): DescribeEventTopicsResult => { + let contents: any = { + __type: "DescribeEventTopicsResult", + EventTopics: undefined + }; + if (output.EventTopics !== undefined) { + contents.EventTopics = deserializeAws_json1_1EventTopics( + output.EventTopics, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1DescribeLDAPSSettingsResult = ( + output: any, + context: __SerdeContext +): DescribeLDAPSSettingsResult => { + let contents: any = { + __type: "DescribeLDAPSSettingsResult", + LDAPSSettingsInfo: undefined, + NextToken: undefined + }; + if (output.LDAPSSettingsInfo !== undefined) { + contents.LDAPSSettingsInfo = deserializeAws_json1_1LDAPSSettingsInfo( + output.LDAPSSettingsInfo, + context + ); + } + if (output.NextToken !== undefined) { + contents.NextToken = output.NextToken; + } + return contents; +}; + +const deserializeAws_json1_1DescribeSharedDirectoriesResult = ( + output: any, + context: __SerdeContext +): DescribeSharedDirectoriesResult => { + let contents: any = { + __type: "DescribeSharedDirectoriesResult", + NextToken: undefined, + SharedDirectories: undefined + }; + if (output.NextToken !== undefined) { + contents.NextToken = output.NextToken; + } + if (output.SharedDirectories !== undefined) { + contents.SharedDirectories = deserializeAws_json1_1SharedDirectories( + output.SharedDirectories, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1DescribeSnapshotsResult = ( + output: any, + context: __SerdeContext +): DescribeSnapshotsResult => { + let contents: any = { + __type: "DescribeSnapshotsResult", + NextToken: undefined, + Snapshots: undefined + }; + if (output.NextToken !== undefined) { + contents.NextToken = output.NextToken; + } + if (output.Snapshots !== undefined) { + contents.Snapshots = deserializeAws_json1_1Snapshots( + output.Snapshots, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1DescribeTrustsResult = ( + output: any, + context: __SerdeContext +): DescribeTrustsResult => { + let contents: any = { + __type: "DescribeTrustsResult", + NextToken: undefined, + Trusts: undefined + }; + if (output.NextToken !== undefined) { + contents.NextToken = output.NextToken; + } + if (output.Trusts !== undefined) { + contents.Trusts = deserializeAws_json1_1Trusts(output.Trusts, context); + } + return contents; +}; + +const deserializeAws_json1_1DirectoryAlreadySharedException = ( + output: any, + context: __SerdeContext +): DirectoryAlreadySharedException => { + let contents: any = { + __type: "DirectoryAlreadySharedException", + Message: undefined, + RequestId: undefined + }; + if (output.Message !== undefined) { + contents.Message = output.Message; + } + if (output.RequestId !== undefined) { + contents.RequestId = output.RequestId; + } + return contents; +}; + +const deserializeAws_json1_1DirectoryConnectSettingsDescription = ( + output: any, + context: __SerdeContext +): DirectoryConnectSettingsDescription => { + let contents: any = { + __type: "DirectoryConnectSettingsDescription", + AvailabilityZones: undefined, + ConnectIps: undefined, + CustomerUserName: undefined, + SecurityGroupId: undefined, + SubnetIds: undefined, + VpcId: undefined + }; + if (output.AvailabilityZones !== undefined) { + contents.AvailabilityZones = deserializeAws_json1_1AvailabilityZones( + output.AvailabilityZones, + context + ); + } + if (output.ConnectIps !== undefined) { + contents.ConnectIps = deserializeAws_json1_1IpAddrs( + output.ConnectIps, + context + ); + } + if (output.CustomerUserName !== undefined) { + contents.CustomerUserName = output.CustomerUserName; + } + if (output.SecurityGroupId !== undefined) { + contents.SecurityGroupId = output.SecurityGroupId; + } + if (output.SubnetIds !== undefined) { + contents.SubnetIds = deserializeAws_json1_1SubnetIds( + output.SubnetIds, + context + ); + } + if (output.VpcId !== undefined) { + contents.VpcId = output.VpcId; + } + return contents; +}; + +const deserializeAws_json1_1DirectoryDescription = ( + output: any, + context: __SerdeContext +): DirectoryDescription => { + let contents: any = { + __type: "DirectoryDescription", + AccessUrl: undefined, + Alias: undefined, + ConnectSettings: undefined, + Description: undefined, + DesiredNumberOfDomainControllers: undefined, + DirectoryId: undefined, + DnsIpAddrs: undefined, + Edition: undefined, + LaunchTime: undefined, + Name: undefined, + OwnerDirectoryDescription: undefined, + RadiusSettings: undefined, + RadiusStatus: undefined, + ShareMethod: undefined, + ShareNotes: undefined, + ShareStatus: undefined, + ShortName: undefined, + Size: undefined, + SsoEnabled: undefined, + Stage: undefined, + StageLastUpdatedDateTime: undefined, + StageReason: undefined, + Type: undefined, + VpcSettings: undefined + }; + if (output.AccessUrl !== undefined) { + contents.AccessUrl = output.AccessUrl; + } + if (output.Alias !== undefined) { + contents.Alias = output.Alias; + } + if (output.ConnectSettings !== undefined) { + contents.ConnectSettings = deserializeAws_json1_1DirectoryConnectSettingsDescription( + output.ConnectSettings, + context + ); + } + if (output.Description !== undefined) { + contents.Description = output.Description; + } + if (output.DesiredNumberOfDomainControllers !== undefined) { + contents.DesiredNumberOfDomainControllers = + output.DesiredNumberOfDomainControllers; + } + if (output.DirectoryId !== undefined) { + contents.DirectoryId = output.DirectoryId; + } + if (output.DnsIpAddrs !== undefined) { + contents.DnsIpAddrs = deserializeAws_json1_1DnsIpAddrs( + output.DnsIpAddrs, + context + ); + } + if (output.Edition !== undefined) { + contents.Edition = output.Edition; + } + if (output.LaunchTime !== undefined) { + contents.LaunchTime = new Date( + output.LaunchTime % 1 != 0 + ? Math.round(output.LaunchTime * 1000) + : output.LaunchTime + ); + } + if (output.Name !== undefined) { + contents.Name = output.Name; + } + if (output.OwnerDirectoryDescription !== undefined) { + contents.OwnerDirectoryDescription = deserializeAws_json1_1OwnerDirectoryDescription( + output.OwnerDirectoryDescription, + context + ); + } + if (output.RadiusSettings !== undefined) { + contents.RadiusSettings = deserializeAws_json1_1RadiusSettings( + output.RadiusSettings, + context + ); + } + if (output.RadiusStatus !== undefined) { + contents.RadiusStatus = output.RadiusStatus; + } + if (output.ShareMethod !== undefined) { + contents.ShareMethod = output.ShareMethod; + } + if (output.ShareNotes !== undefined) { + contents.ShareNotes = output.ShareNotes; + } + if (output.ShareStatus !== undefined) { + contents.ShareStatus = output.ShareStatus; + } + if (output.ShortName !== undefined) { + contents.ShortName = output.ShortName; + } + if (output.Size !== undefined) { + contents.Size = output.Size; + } + if (output.SsoEnabled !== undefined) { + contents.SsoEnabled = output.SsoEnabled; + } + if (output.Stage !== undefined) { + contents.Stage = output.Stage; + } + if (output.StageLastUpdatedDateTime !== undefined) { + contents.StageLastUpdatedDateTime = new Date( + output.StageLastUpdatedDateTime % 1 != 0 + ? Math.round(output.StageLastUpdatedDateTime * 1000) + : output.StageLastUpdatedDateTime + ); + } + if (output.StageReason !== undefined) { + contents.StageReason = output.StageReason; + } + if (output.Type !== undefined) { + contents.Type = output.Type; + } + if (output.VpcSettings !== undefined) { + contents.VpcSettings = deserializeAws_json1_1DirectoryVpcSettingsDescription( + output.VpcSettings, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1DirectoryDescriptions = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1DirectoryDescription(entry, context) + ); +}; + +const deserializeAws_json1_1DirectoryDoesNotExistException = ( + output: any, + context: __SerdeContext +): DirectoryDoesNotExistException => { + let contents: any = { + __type: "DirectoryDoesNotExistException", + Message: undefined, + RequestId: undefined + }; + if (output.Message !== undefined) { + contents.Message = output.Message; + } + if (output.RequestId !== undefined) { + contents.RequestId = output.RequestId; + } + return contents; +}; + +const deserializeAws_json1_1DirectoryLimitExceededException = ( + output: any, + context: __SerdeContext +): DirectoryLimitExceededException => { + let contents: any = { + __type: "DirectoryLimitExceededException", + Message: undefined, + RequestId: undefined + }; + if (output.Message !== undefined) { + contents.Message = output.Message; + } + if (output.RequestId !== undefined) { + contents.RequestId = output.RequestId; + } + return contents; +}; + +const deserializeAws_json1_1DirectoryLimits = ( + output: any, + context: __SerdeContext +): DirectoryLimits => { + let contents: any = { + __type: "DirectoryLimits", + CloudOnlyDirectoriesCurrentCount: undefined, + CloudOnlyDirectoriesLimit: undefined, + CloudOnlyDirectoriesLimitReached: undefined, + CloudOnlyMicrosoftADCurrentCount: undefined, + CloudOnlyMicrosoftADLimit: undefined, + CloudOnlyMicrosoftADLimitReached: undefined, + ConnectedDirectoriesCurrentCount: undefined, + ConnectedDirectoriesLimit: undefined, + ConnectedDirectoriesLimitReached: undefined + }; + if (output.CloudOnlyDirectoriesCurrentCount !== undefined) { + contents.CloudOnlyDirectoriesCurrentCount = + output.CloudOnlyDirectoriesCurrentCount; + } + if (output.CloudOnlyDirectoriesLimit !== undefined) { + contents.CloudOnlyDirectoriesLimit = output.CloudOnlyDirectoriesLimit; + } + if (output.CloudOnlyDirectoriesLimitReached !== undefined) { + contents.CloudOnlyDirectoriesLimitReached = + output.CloudOnlyDirectoriesLimitReached; + } + if (output.CloudOnlyMicrosoftADCurrentCount !== undefined) { + contents.CloudOnlyMicrosoftADCurrentCount = + output.CloudOnlyMicrosoftADCurrentCount; + } + if (output.CloudOnlyMicrosoftADLimit !== undefined) { + contents.CloudOnlyMicrosoftADLimit = output.CloudOnlyMicrosoftADLimit; + } + if (output.CloudOnlyMicrosoftADLimitReached !== undefined) { + contents.CloudOnlyMicrosoftADLimitReached = + output.CloudOnlyMicrosoftADLimitReached; + } + if (output.ConnectedDirectoriesCurrentCount !== undefined) { + contents.ConnectedDirectoriesCurrentCount = + output.ConnectedDirectoriesCurrentCount; + } + if (output.ConnectedDirectoriesLimit !== undefined) { + contents.ConnectedDirectoriesLimit = output.ConnectedDirectoriesLimit; + } + if (output.ConnectedDirectoriesLimitReached !== undefined) { + contents.ConnectedDirectoriesLimitReached = + output.ConnectedDirectoriesLimitReached; + } + return contents; +}; + +const deserializeAws_json1_1DirectoryNotSharedException = ( + output: any, + context: __SerdeContext +): DirectoryNotSharedException => { + let contents: any = { + __type: "DirectoryNotSharedException", + Message: undefined, + RequestId: undefined + }; + if (output.Message !== undefined) { + contents.Message = output.Message; + } + if (output.RequestId !== undefined) { + contents.RequestId = output.RequestId; + } + return contents; +}; + +const deserializeAws_json1_1DirectoryUnavailableException = ( + output: any, + context: __SerdeContext +): DirectoryUnavailableException => { + let contents: any = { + __type: "DirectoryUnavailableException", + Message: undefined, + RequestId: undefined + }; + if (output.Message !== undefined) { + contents.Message = output.Message; + } + if (output.RequestId !== undefined) { + contents.RequestId = output.RequestId; + } + return contents; +}; + +const deserializeAws_json1_1DirectoryVpcSettingsDescription = ( + output: any, + context: __SerdeContext +): DirectoryVpcSettingsDescription => { + let contents: any = { + __type: "DirectoryVpcSettingsDescription", + AvailabilityZones: undefined, + SecurityGroupId: undefined, + SubnetIds: undefined, + VpcId: undefined + }; + if (output.AvailabilityZones !== undefined) { + contents.AvailabilityZones = deserializeAws_json1_1AvailabilityZones( + output.AvailabilityZones, + context + ); + } + if (output.SecurityGroupId !== undefined) { + contents.SecurityGroupId = output.SecurityGroupId; + } + if (output.SubnetIds !== undefined) { + contents.SubnetIds = deserializeAws_json1_1SubnetIds( + output.SubnetIds, + context + ); + } + if (output.VpcId !== undefined) { + contents.VpcId = output.VpcId; + } + return contents; +}; + +const deserializeAws_json1_1DisableLDAPSResult = ( + output: any, + context: __SerdeContext +): DisableLDAPSResult => { + let contents: any = { + __type: "DisableLDAPSResult" + }; + return contents; +}; + +const deserializeAws_json1_1DisableRadiusResult = ( + output: any, + context: __SerdeContext +): DisableRadiusResult => { + let contents: any = { + __type: "DisableRadiusResult" + }; + return contents; +}; + +const deserializeAws_json1_1DisableSsoResult = ( + output: any, + context: __SerdeContext +): DisableSsoResult => { + let contents: any = { + __type: "DisableSsoResult" + }; + return contents; +}; + +const deserializeAws_json1_1DnsIpAddrs = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => entry); +}; + +const deserializeAws_json1_1DomainController = ( + output: any, + context: __SerdeContext +): DomainController => { + let contents: any = { + __type: "DomainController", + AvailabilityZone: undefined, + DirectoryId: undefined, + DnsIpAddr: undefined, + DomainControllerId: undefined, + LaunchTime: undefined, + Status: undefined, + StatusLastUpdatedDateTime: undefined, + StatusReason: undefined, + SubnetId: undefined, + VpcId: undefined + }; + if (output.AvailabilityZone !== undefined) { + contents.AvailabilityZone = output.AvailabilityZone; + } + if (output.DirectoryId !== undefined) { + contents.DirectoryId = output.DirectoryId; + } + if (output.DnsIpAddr !== undefined) { + contents.DnsIpAddr = output.DnsIpAddr; + } + if (output.DomainControllerId !== undefined) { + contents.DomainControllerId = output.DomainControllerId; + } + if (output.LaunchTime !== undefined) { + contents.LaunchTime = new Date( + output.LaunchTime % 1 != 0 + ? Math.round(output.LaunchTime * 1000) + : output.LaunchTime + ); + } + if (output.Status !== undefined) { + contents.Status = output.Status; + } + if (output.StatusLastUpdatedDateTime !== undefined) { + contents.StatusLastUpdatedDateTime = new Date( + output.StatusLastUpdatedDateTime % 1 != 0 + ? Math.round(output.StatusLastUpdatedDateTime * 1000) + : output.StatusLastUpdatedDateTime + ); + } + if (output.StatusReason !== undefined) { + contents.StatusReason = output.StatusReason; + } + if (output.SubnetId !== undefined) { + contents.SubnetId = output.SubnetId; + } + if (output.VpcId !== undefined) { + contents.VpcId = output.VpcId; + } + return contents; +}; + +const deserializeAws_json1_1DomainControllerLimitExceededException = ( + output: any, + context: __SerdeContext +): DomainControllerLimitExceededException => { + let contents: any = { + __type: "DomainControllerLimitExceededException", + Message: undefined, + RequestId: undefined + }; + if (output.Message !== undefined) { + contents.Message = output.Message; + } + if (output.RequestId !== undefined) { + contents.RequestId = output.RequestId; + } + return contents; +}; + +const deserializeAws_json1_1DomainControllers = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1DomainController(entry, context) + ); +}; + +const deserializeAws_json1_1EnableLDAPSResult = ( + output: any, + context: __SerdeContext +): EnableLDAPSResult => { + let contents: any = { + __type: "EnableLDAPSResult" + }; + return contents; +}; + +const deserializeAws_json1_1EnableRadiusResult = ( + output: any, + context: __SerdeContext +): EnableRadiusResult => { + let contents: any = { + __type: "EnableRadiusResult" + }; + return contents; +}; + +const deserializeAws_json1_1EnableSsoResult = ( + output: any, + context: __SerdeContext +): EnableSsoResult => { + let contents: any = { + __type: "EnableSsoResult" + }; + return contents; +}; + +const deserializeAws_json1_1EntityAlreadyExistsException = ( + output: any, + context: __SerdeContext +): EntityAlreadyExistsException => { + let contents: any = { + __type: "EntityAlreadyExistsException", + Message: undefined, + RequestId: undefined + }; + if (output.Message !== undefined) { + contents.Message = output.Message; + } + if (output.RequestId !== undefined) { + contents.RequestId = output.RequestId; + } + return contents; +}; + +const deserializeAws_json1_1EntityDoesNotExistException = ( + output: any, + context: __SerdeContext +): EntityDoesNotExistException => { + let contents: any = { + __type: "EntityDoesNotExistException", + Message: undefined, + RequestId: undefined + }; + if (output.Message !== undefined) { + contents.Message = output.Message; + } + if (output.RequestId !== undefined) { + contents.RequestId = output.RequestId; + } + return contents; +}; + +const deserializeAws_json1_1EventTopic = ( + output: any, + context: __SerdeContext +): EventTopic => { + let contents: any = { + __type: "EventTopic", + CreatedDateTime: undefined, + DirectoryId: undefined, + Status: undefined, + TopicArn: undefined, + TopicName: undefined + }; + if (output.CreatedDateTime !== undefined) { + contents.CreatedDateTime = new Date( + output.CreatedDateTime % 1 != 0 + ? Math.round(output.CreatedDateTime * 1000) + : output.CreatedDateTime + ); + } + if (output.DirectoryId !== undefined) { + contents.DirectoryId = output.DirectoryId; + } + if (output.Status !== undefined) { + contents.Status = output.Status; + } + if (output.TopicArn !== undefined) { + contents.TopicArn = output.TopicArn; + } + if (output.TopicName !== undefined) { + contents.TopicName = output.TopicName; + } + return contents; +}; + +const deserializeAws_json1_1EventTopics = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1EventTopic(entry, context) + ); +}; + +const deserializeAws_json1_1GetDirectoryLimitsResult = ( + output: any, + context: __SerdeContext +): GetDirectoryLimitsResult => { + let contents: any = { + __type: "GetDirectoryLimitsResult", + DirectoryLimits: undefined + }; + if (output.DirectoryLimits !== undefined) { + contents.DirectoryLimits = deserializeAws_json1_1DirectoryLimits( + output.DirectoryLimits, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1GetSnapshotLimitsResult = ( + output: any, + context: __SerdeContext +): GetSnapshotLimitsResult => { + let contents: any = { + __type: "GetSnapshotLimitsResult", + SnapshotLimits: undefined + }; + if (output.SnapshotLimits !== undefined) { + contents.SnapshotLimits = deserializeAws_json1_1SnapshotLimits( + output.SnapshotLimits, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1InsufficientPermissionsException = ( + output: any, + context: __SerdeContext +): InsufficientPermissionsException => { + let contents: any = { + __type: "InsufficientPermissionsException", + Message: undefined, + RequestId: undefined + }; + if (output.Message !== undefined) { + contents.Message = output.Message; + } + if (output.RequestId !== undefined) { + contents.RequestId = output.RequestId; + } + return contents; +}; + +const deserializeAws_json1_1InvalidCertificateException = ( + output: any, + context: __SerdeContext +): InvalidCertificateException => { + let contents: any = { + __type: "InvalidCertificateException", + Message: undefined, + RequestId: undefined + }; + if (output.Message !== undefined) { + contents.Message = output.Message; + } + if (output.RequestId !== undefined) { + contents.RequestId = output.RequestId; + } + return contents; +}; + +const deserializeAws_json1_1InvalidLDAPSStatusException = ( + output: any, + context: __SerdeContext +): InvalidLDAPSStatusException => { + let contents: any = { + __type: "InvalidLDAPSStatusException", + Message: undefined, + RequestId: undefined + }; + if (output.Message !== undefined) { + contents.Message = output.Message; + } + if (output.RequestId !== undefined) { + contents.RequestId = output.RequestId; + } + return contents; +}; + +const deserializeAws_json1_1InvalidNextTokenException = ( + output: any, + context: __SerdeContext +): InvalidNextTokenException => { + let contents: any = { + __type: "InvalidNextTokenException", + Message: undefined, + RequestId: undefined + }; + if (output.Message !== undefined) { + contents.Message = output.Message; + } + if (output.RequestId !== undefined) { + contents.RequestId = output.RequestId; + } + return contents; +}; + +const deserializeAws_json1_1InvalidParameterException = ( + output: any, + context: __SerdeContext +): InvalidParameterException => { + let contents: any = { + __type: "InvalidParameterException", + Message: undefined, + RequestId: undefined + }; + if (output.Message !== undefined) { + contents.Message = output.Message; + } + if (output.RequestId !== undefined) { + contents.RequestId = output.RequestId; + } + return contents; +}; + +const deserializeAws_json1_1InvalidPasswordException = ( + output: any, + context: __SerdeContext +): InvalidPasswordException => { + let contents: any = { + __type: "InvalidPasswordException", + Message: undefined, + RequestId: undefined + }; + if (output.Message !== undefined) { + contents.Message = output.Message; + } + if (output.RequestId !== undefined) { + contents.RequestId = output.RequestId; + } + return contents; +}; + +const deserializeAws_json1_1InvalidTargetException = ( + output: any, + context: __SerdeContext +): InvalidTargetException => { + let contents: any = { + __type: "InvalidTargetException", + Message: undefined, + RequestId: undefined + }; + if (output.Message !== undefined) { + contents.Message = output.Message; + } + if (output.RequestId !== undefined) { + contents.RequestId = output.RequestId; + } + return contents; +}; + +const deserializeAws_json1_1IpAddrs = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => entry); +}; + +const deserializeAws_json1_1IpRouteInfo = ( + output: any, + context: __SerdeContext +): IpRouteInfo => { + let contents: any = { + __type: "IpRouteInfo", + AddedDateTime: undefined, + CidrIp: undefined, + Description: undefined, + DirectoryId: undefined, + IpRouteStatusMsg: undefined, + IpRouteStatusReason: undefined + }; + if (output.AddedDateTime !== undefined) { + contents.AddedDateTime = new Date( + output.AddedDateTime % 1 != 0 + ? Math.round(output.AddedDateTime * 1000) + : output.AddedDateTime + ); + } + if (output.CidrIp !== undefined) { + contents.CidrIp = output.CidrIp; + } + if (output.Description !== undefined) { + contents.Description = output.Description; + } + if (output.DirectoryId !== undefined) { + contents.DirectoryId = output.DirectoryId; + } + if (output.IpRouteStatusMsg !== undefined) { + contents.IpRouteStatusMsg = output.IpRouteStatusMsg; + } + if (output.IpRouteStatusReason !== undefined) { + contents.IpRouteStatusReason = output.IpRouteStatusReason; + } + return contents; +}; + +const deserializeAws_json1_1IpRouteLimitExceededException = ( + output: any, + context: __SerdeContext +): IpRouteLimitExceededException => { + let contents: any = { + __type: "IpRouteLimitExceededException", + Message: undefined, + RequestId: undefined + }; + if (output.Message !== undefined) { + contents.Message = output.Message; + } + if (output.RequestId !== undefined) { + contents.RequestId = output.RequestId; + } + return contents; +}; + +const deserializeAws_json1_1IpRoutesInfo = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1IpRouteInfo(entry, context) + ); +}; + +const deserializeAws_json1_1LDAPSSettingInfo = ( + output: any, + context: __SerdeContext +): LDAPSSettingInfo => { + let contents: any = { + __type: "LDAPSSettingInfo", + LDAPSStatus: undefined, + LDAPSStatusReason: undefined, + LastUpdatedDateTime: undefined + }; + if (output.LDAPSStatus !== undefined) { + contents.LDAPSStatus = output.LDAPSStatus; + } + if (output.LDAPSStatusReason !== undefined) { + contents.LDAPSStatusReason = output.LDAPSStatusReason; + } + if (output.LastUpdatedDateTime !== undefined) { + contents.LastUpdatedDateTime = new Date( + output.LastUpdatedDateTime % 1 != 0 + ? Math.round(output.LastUpdatedDateTime * 1000) + : output.LastUpdatedDateTime + ); + } + return contents; +}; + +const deserializeAws_json1_1LDAPSSettingsInfo = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1LDAPSSettingInfo(entry, context) + ); +}; + +const deserializeAws_json1_1ListCertificatesResult = ( + output: any, + context: __SerdeContext +): ListCertificatesResult => { + let contents: any = { + __type: "ListCertificatesResult", + CertificatesInfo: undefined, + NextToken: undefined + }; + if (output.CertificatesInfo !== undefined) { + contents.CertificatesInfo = deserializeAws_json1_1CertificatesInfo( + output.CertificatesInfo, + context + ); + } + if (output.NextToken !== undefined) { + contents.NextToken = output.NextToken; + } + return contents; +}; + +const deserializeAws_json1_1ListIpRoutesResult = ( + output: any, + context: __SerdeContext +): ListIpRoutesResult => { + let contents: any = { + __type: "ListIpRoutesResult", + IpRoutesInfo: undefined, + NextToken: undefined + }; + if (output.IpRoutesInfo !== undefined) { + contents.IpRoutesInfo = deserializeAws_json1_1IpRoutesInfo( + output.IpRoutesInfo, + context + ); + } + if (output.NextToken !== undefined) { + contents.NextToken = output.NextToken; + } + return contents; +}; + +const deserializeAws_json1_1ListLogSubscriptionsResult = ( + output: any, + context: __SerdeContext +): ListLogSubscriptionsResult => { + let contents: any = { + __type: "ListLogSubscriptionsResult", + LogSubscriptions: undefined, + NextToken: undefined + }; + if (output.LogSubscriptions !== undefined) { + contents.LogSubscriptions = deserializeAws_json1_1LogSubscriptions( + output.LogSubscriptions, + context + ); + } + if (output.NextToken !== undefined) { + contents.NextToken = output.NextToken; + } + return contents; +}; + +const deserializeAws_json1_1ListSchemaExtensionsResult = ( + output: any, + context: __SerdeContext +): ListSchemaExtensionsResult => { + let contents: any = { + __type: "ListSchemaExtensionsResult", + NextToken: undefined, + SchemaExtensionsInfo: undefined + }; + if (output.NextToken !== undefined) { + contents.NextToken = output.NextToken; + } + if (output.SchemaExtensionsInfo !== undefined) { + contents.SchemaExtensionsInfo = deserializeAws_json1_1SchemaExtensionsInfo( + output.SchemaExtensionsInfo, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1ListTagsForResourceResult = ( + output: any, + context: __SerdeContext +): ListTagsForResourceResult => { + let contents: any = { + __type: "ListTagsForResourceResult", + NextToken: undefined, + Tags: undefined + }; + if (output.NextToken !== undefined) { + contents.NextToken = output.NextToken; + } + if (output.Tags !== undefined) { + contents.Tags = deserializeAws_json1_1Tags(output.Tags, context); + } + return contents; +}; + +const deserializeAws_json1_1LogSubscription = ( + output: any, + context: __SerdeContext +): LogSubscription => { + let contents: any = { + __type: "LogSubscription", + DirectoryId: undefined, + LogGroupName: undefined, + SubscriptionCreatedDateTime: undefined + }; + if (output.DirectoryId !== undefined) { + contents.DirectoryId = output.DirectoryId; + } + if (output.LogGroupName !== undefined) { + contents.LogGroupName = output.LogGroupName; + } + if (output.SubscriptionCreatedDateTime !== undefined) { + contents.SubscriptionCreatedDateTime = new Date( + output.SubscriptionCreatedDateTime % 1 != 0 + ? Math.round(output.SubscriptionCreatedDateTime * 1000) + : output.SubscriptionCreatedDateTime + ); + } + return contents; +}; + +const deserializeAws_json1_1LogSubscriptions = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1LogSubscription(entry, context) + ); +}; + +const deserializeAws_json1_1NoAvailableCertificateException = ( + output: any, + context: __SerdeContext +): NoAvailableCertificateException => { + let contents: any = { + __type: "NoAvailableCertificateException", + Message: undefined, + RequestId: undefined + }; + if (output.Message !== undefined) { + contents.Message = output.Message; + } + if (output.RequestId !== undefined) { + contents.RequestId = output.RequestId; + } + return contents; +}; + +const deserializeAws_json1_1OrganizationsException = ( + output: any, + context: __SerdeContext +): OrganizationsException => { + let contents: any = { + __type: "OrganizationsException", + Message: undefined, + RequestId: undefined + }; + if (output.Message !== undefined) { + contents.Message = output.Message; + } + if (output.RequestId !== undefined) { + contents.RequestId = output.RequestId; + } + return contents; +}; + +const deserializeAws_json1_1OwnerDirectoryDescription = ( + output: any, + context: __SerdeContext +): OwnerDirectoryDescription => { + let contents: any = { + __type: "OwnerDirectoryDescription", + AccountId: undefined, + DirectoryId: undefined, + DnsIpAddrs: undefined, + RadiusSettings: undefined, + RadiusStatus: undefined, + VpcSettings: undefined + }; + if (output.AccountId !== undefined) { + contents.AccountId = output.AccountId; + } + if (output.DirectoryId !== undefined) { + contents.DirectoryId = output.DirectoryId; + } + if (output.DnsIpAddrs !== undefined) { + contents.DnsIpAddrs = deserializeAws_json1_1DnsIpAddrs( + output.DnsIpAddrs, + context + ); + } + if (output.RadiusSettings !== undefined) { + contents.RadiusSettings = deserializeAws_json1_1RadiusSettings( + output.RadiusSettings, + context + ); + } + if (output.RadiusStatus !== undefined) { + contents.RadiusStatus = output.RadiusStatus; + } + if (output.VpcSettings !== undefined) { + contents.VpcSettings = deserializeAws_json1_1DirectoryVpcSettingsDescription( + output.VpcSettings, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1RadiusSettings = ( + output: any, + context: __SerdeContext +): RadiusSettings => { + let contents: any = { + __type: "RadiusSettings", + AuthenticationProtocol: undefined, + DisplayLabel: undefined, + RadiusPort: undefined, + RadiusRetries: undefined, + RadiusServers: undefined, + RadiusTimeout: undefined, + SharedSecret: undefined, + UseSameUsername: undefined + }; + if (output.AuthenticationProtocol !== undefined) { + contents.AuthenticationProtocol = output.AuthenticationProtocol; + } + if (output.DisplayLabel !== undefined) { + contents.DisplayLabel = output.DisplayLabel; + } + if (output.RadiusPort !== undefined) { + contents.RadiusPort = output.RadiusPort; + } + if (output.RadiusRetries !== undefined) { + contents.RadiusRetries = output.RadiusRetries; + } + if (output.RadiusServers !== undefined) { + contents.RadiusServers = deserializeAws_json1_1Servers( + output.RadiusServers, + context + ); + } + if (output.RadiusTimeout !== undefined) { + contents.RadiusTimeout = output.RadiusTimeout; + } + if (output.SharedSecret !== undefined) { + contents.SharedSecret = output.SharedSecret; + } + if (output.UseSameUsername !== undefined) { + contents.UseSameUsername = output.UseSameUsername; + } + return contents; +}; + +const deserializeAws_json1_1RegisterCertificateResult = ( + output: any, + context: __SerdeContext +): RegisterCertificateResult => { + let contents: any = { + __type: "RegisterCertificateResult", + CertificateId: undefined + }; + if (output.CertificateId !== undefined) { + contents.CertificateId = output.CertificateId; + } + return contents; +}; + +const deserializeAws_json1_1RegisterEventTopicResult = ( + output: any, + context: __SerdeContext +): RegisterEventTopicResult => { + let contents: any = { + __type: "RegisterEventTopicResult" + }; + return contents; +}; + +const deserializeAws_json1_1RejectSharedDirectoryResult = ( + output: any, + context: __SerdeContext +): RejectSharedDirectoryResult => { + let contents: any = { + __type: "RejectSharedDirectoryResult", + SharedDirectoryId: undefined + }; + if (output.SharedDirectoryId !== undefined) { + contents.SharedDirectoryId = output.SharedDirectoryId; + } + return contents; +}; + +const deserializeAws_json1_1RemoveIpRoutesResult = ( + output: any, + context: __SerdeContext +): RemoveIpRoutesResult => { + let contents: any = { + __type: "RemoveIpRoutesResult" + }; + return contents; +}; + +const deserializeAws_json1_1RemoveTagsFromResourceResult = ( + output: any, + context: __SerdeContext +): RemoveTagsFromResourceResult => { + let contents: any = { + __type: "RemoveTagsFromResourceResult" + }; + return contents; +}; + +const deserializeAws_json1_1ResetUserPasswordResult = ( + output: any, + context: __SerdeContext +): ResetUserPasswordResult => { + let contents: any = { + __type: "ResetUserPasswordResult" + }; + return contents; +}; + +const deserializeAws_json1_1RestoreFromSnapshotResult = ( + output: any, + context: __SerdeContext +): RestoreFromSnapshotResult => { + let contents: any = { + __type: "RestoreFromSnapshotResult" + }; + return contents; +}; + +const deserializeAws_json1_1SchemaExtensionInfo = ( + output: any, + context: __SerdeContext +): SchemaExtensionInfo => { + let contents: any = { + __type: "SchemaExtensionInfo", + Description: undefined, + DirectoryId: undefined, + EndDateTime: undefined, + SchemaExtensionId: undefined, + SchemaExtensionStatus: undefined, + SchemaExtensionStatusReason: undefined, + StartDateTime: undefined + }; + if (output.Description !== undefined) { + contents.Description = output.Description; + } + if (output.DirectoryId !== undefined) { + contents.DirectoryId = output.DirectoryId; + } + if (output.EndDateTime !== undefined) { + contents.EndDateTime = new Date( + output.EndDateTime % 1 != 0 + ? Math.round(output.EndDateTime * 1000) + : output.EndDateTime + ); + } + if (output.SchemaExtensionId !== undefined) { + contents.SchemaExtensionId = output.SchemaExtensionId; + } + if (output.SchemaExtensionStatus !== undefined) { + contents.SchemaExtensionStatus = output.SchemaExtensionStatus; + } + if (output.SchemaExtensionStatusReason !== undefined) { + contents.SchemaExtensionStatusReason = output.SchemaExtensionStatusReason; + } + if (output.StartDateTime !== undefined) { + contents.StartDateTime = new Date( + output.StartDateTime % 1 != 0 + ? Math.round(output.StartDateTime * 1000) + : output.StartDateTime + ); + } + return contents; +}; + +const deserializeAws_json1_1SchemaExtensionsInfo = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1SchemaExtensionInfo(entry, context) + ); +}; + +const deserializeAws_json1_1Servers = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => entry); +}; + +const deserializeAws_json1_1ServiceException = ( + output: any, + context: __SerdeContext +): ServiceException => { + let contents: any = { + __type: "ServiceException", + Message: undefined, + RequestId: undefined + }; + if (output.Message !== undefined) { + contents.Message = output.Message; + } + if (output.RequestId !== undefined) { + contents.RequestId = output.RequestId; + } + return contents; +}; + +const deserializeAws_json1_1ShareDirectoryResult = ( + output: any, + context: __SerdeContext +): ShareDirectoryResult => { + let contents: any = { + __type: "ShareDirectoryResult", + SharedDirectoryId: undefined + }; + if (output.SharedDirectoryId !== undefined) { + contents.SharedDirectoryId = output.SharedDirectoryId; + } + return contents; +}; + +const deserializeAws_json1_1ShareLimitExceededException = ( + output: any, + context: __SerdeContext +): ShareLimitExceededException => { + let contents: any = { + __type: "ShareLimitExceededException", + Message: undefined, + RequestId: undefined + }; + if (output.Message !== undefined) { + contents.Message = output.Message; + } + if (output.RequestId !== undefined) { + contents.RequestId = output.RequestId; + } + return contents; +}; + +const deserializeAws_json1_1SharedDirectories = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1SharedDirectory(entry, context) + ); +}; + +const deserializeAws_json1_1SharedDirectory = ( + output: any, + context: __SerdeContext +): SharedDirectory => { + let contents: any = { + __type: "SharedDirectory", + CreatedDateTime: undefined, + LastUpdatedDateTime: undefined, + OwnerAccountId: undefined, + OwnerDirectoryId: undefined, + ShareMethod: undefined, + ShareNotes: undefined, + ShareStatus: undefined, + SharedAccountId: undefined, + SharedDirectoryId: undefined + }; + if (output.CreatedDateTime !== undefined) { + contents.CreatedDateTime = new Date( + output.CreatedDateTime % 1 != 0 + ? Math.round(output.CreatedDateTime * 1000) + : output.CreatedDateTime + ); + } + if (output.LastUpdatedDateTime !== undefined) { + contents.LastUpdatedDateTime = new Date( + output.LastUpdatedDateTime % 1 != 0 + ? Math.round(output.LastUpdatedDateTime * 1000) + : output.LastUpdatedDateTime + ); + } + if (output.OwnerAccountId !== undefined) { + contents.OwnerAccountId = output.OwnerAccountId; + } + if (output.OwnerDirectoryId !== undefined) { + contents.OwnerDirectoryId = output.OwnerDirectoryId; + } + if (output.ShareMethod !== undefined) { + contents.ShareMethod = output.ShareMethod; + } + if (output.ShareNotes !== undefined) { + contents.ShareNotes = output.ShareNotes; + } + if (output.ShareStatus !== undefined) { + contents.ShareStatus = output.ShareStatus; + } + if (output.SharedAccountId !== undefined) { + contents.SharedAccountId = output.SharedAccountId; + } + if (output.SharedDirectoryId !== undefined) { + contents.SharedDirectoryId = output.SharedDirectoryId; + } + return contents; +}; + +const deserializeAws_json1_1Snapshot = ( + output: any, + context: __SerdeContext +): Snapshot => { + let contents: any = { + __type: "Snapshot", + DirectoryId: undefined, + Name: undefined, + SnapshotId: undefined, + StartTime: undefined, + Status: undefined, + Type: undefined + }; + if (output.DirectoryId !== undefined) { + contents.DirectoryId = output.DirectoryId; + } + if (output.Name !== undefined) { + contents.Name = output.Name; + } + if (output.SnapshotId !== undefined) { + contents.SnapshotId = output.SnapshotId; + } + if (output.StartTime !== undefined) { + contents.StartTime = new Date( + output.StartTime % 1 != 0 + ? Math.round(output.StartTime * 1000) + : output.StartTime + ); + } + if (output.Status !== undefined) { + contents.Status = output.Status; + } + if (output.Type !== undefined) { + contents.Type = output.Type; + } + return contents; +}; + +const deserializeAws_json1_1SnapshotLimitExceededException = ( + output: any, + context: __SerdeContext +): SnapshotLimitExceededException => { + let contents: any = { + __type: "SnapshotLimitExceededException", + Message: undefined, + RequestId: undefined + }; + if (output.Message !== undefined) { + contents.Message = output.Message; + } + if (output.RequestId !== undefined) { + contents.RequestId = output.RequestId; + } + return contents; +}; + +const deserializeAws_json1_1SnapshotLimits = ( + output: any, + context: __SerdeContext +): SnapshotLimits => { + let contents: any = { + __type: "SnapshotLimits", + ManualSnapshotsCurrentCount: undefined, + ManualSnapshotsLimit: undefined, + ManualSnapshotsLimitReached: undefined + }; + if (output.ManualSnapshotsCurrentCount !== undefined) { + contents.ManualSnapshotsCurrentCount = output.ManualSnapshotsCurrentCount; + } + if (output.ManualSnapshotsLimit !== undefined) { + contents.ManualSnapshotsLimit = output.ManualSnapshotsLimit; + } + if (output.ManualSnapshotsLimitReached !== undefined) { + contents.ManualSnapshotsLimitReached = output.ManualSnapshotsLimitReached; + } + return contents; +}; + +const deserializeAws_json1_1Snapshots = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1Snapshot(entry, context) + ); +}; + +const deserializeAws_json1_1StartSchemaExtensionResult = ( + output: any, + context: __SerdeContext +): StartSchemaExtensionResult => { + let contents: any = { + __type: "StartSchemaExtensionResult", + SchemaExtensionId: undefined + }; + if (output.SchemaExtensionId !== undefined) { + contents.SchemaExtensionId = output.SchemaExtensionId; + } + return contents; +}; + +const deserializeAws_json1_1SubnetIds = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => entry); +}; + +const deserializeAws_json1_1Tag = ( + output: any, + context: __SerdeContext +): Tag => { + let contents: any = { + __type: "Tag", + Key: undefined, + Value: undefined + }; + if (output.Key !== undefined) { + contents.Key = output.Key; + } + if (output.Value !== undefined) { + contents.Value = output.Value; + } + return contents; +}; + +const deserializeAws_json1_1TagLimitExceededException = ( + output: any, + context: __SerdeContext +): TagLimitExceededException => { + let contents: any = { + __type: "TagLimitExceededException", + Message: undefined, + RequestId: undefined + }; + if (output.Message !== undefined) { + contents.Message = output.Message; + } + if (output.RequestId !== undefined) { + contents.RequestId = output.RequestId; + } + return contents; +}; + +const deserializeAws_json1_1Tags = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1Tag(entry, context) + ); +}; + +const deserializeAws_json1_1Trust = ( + output: any, + context: __SerdeContext +): Trust => { + let contents: any = { + __type: "Trust", + CreatedDateTime: undefined, + DirectoryId: undefined, + LastUpdatedDateTime: undefined, + RemoteDomainName: undefined, + SelectiveAuth: undefined, + StateLastUpdatedDateTime: undefined, + TrustDirection: undefined, + TrustId: undefined, + TrustState: undefined, + TrustStateReason: undefined, + TrustType: undefined + }; + if (output.CreatedDateTime !== undefined) { + contents.CreatedDateTime = new Date( + output.CreatedDateTime % 1 != 0 + ? Math.round(output.CreatedDateTime * 1000) + : output.CreatedDateTime + ); + } + if (output.DirectoryId !== undefined) { + contents.DirectoryId = output.DirectoryId; + } + if (output.LastUpdatedDateTime !== undefined) { + contents.LastUpdatedDateTime = new Date( + output.LastUpdatedDateTime % 1 != 0 + ? Math.round(output.LastUpdatedDateTime * 1000) + : output.LastUpdatedDateTime + ); + } + if (output.RemoteDomainName !== undefined) { + contents.RemoteDomainName = output.RemoteDomainName; + } + if (output.SelectiveAuth !== undefined) { + contents.SelectiveAuth = output.SelectiveAuth; + } + if (output.StateLastUpdatedDateTime !== undefined) { + contents.StateLastUpdatedDateTime = new Date( + output.StateLastUpdatedDateTime % 1 != 0 + ? Math.round(output.StateLastUpdatedDateTime * 1000) + : output.StateLastUpdatedDateTime + ); + } + if (output.TrustDirection !== undefined) { + contents.TrustDirection = output.TrustDirection; + } + if (output.TrustId !== undefined) { + contents.TrustId = output.TrustId; + } + if (output.TrustState !== undefined) { + contents.TrustState = output.TrustState; + } + if (output.TrustStateReason !== undefined) { + contents.TrustStateReason = output.TrustStateReason; + } + if (output.TrustType !== undefined) { + contents.TrustType = output.TrustType; + } + return contents; +}; + +const deserializeAws_json1_1Trusts = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1Trust(entry, context) + ); +}; + +const deserializeAws_json1_1UnshareDirectoryResult = ( + output: any, + context: __SerdeContext +): UnshareDirectoryResult => { + let contents: any = { + __type: "UnshareDirectoryResult", + SharedDirectoryId: undefined + }; + if (output.SharedDirectoryId !== undefined) { + contents.SharedDirectoryId = output.SharedDirectoryId; + } + return contents; +}; + +const deserializeAws_json1_1UnsupportedOperationException = ( + output: any, + context: __SerdeContext +): UnsupportedOperationException => { + let contents: any = { + __type: "UnsupportedOperationException", + Message: undefined, + RequestId: undefined + }; + if (output.Message !== undefined) { + contents.Message = output.Message; + } + if (output.RequestId !== undefined) { + contents.RequestId = output.RequestId; + } + return contents; +}; + +const deserializeAws_json1_1UpdateConditionalForwarderResult = ( + output: any, + context: __SerdeContext +): UpdateConditionalForwarderResult => { + let contents: any = { + __type: "UpdateConditionalForwarderResult" + }; + return contents; +}; + +const deserializeAws_json1_1UpdateNumberOfDomainControllersResult = ( + output: any, + context: __SerdeContext +): UpdateNumberOfDomainControllersResult => { + let contents: any = { + __type: "UpdateNumberOfDomainControllersResult" + }; + return contents; +}; + +const deserializeAws_json1_1UpdateRadiusResult = ( + output: any, + context: __SerdeContext +): UpdateRadiusResult => { + let contents: any = { + __type: "UpdateRadiusResult" + }; + return contents; +}; + +const deserializeAws_json1_1UpdateTrustResult = ( + output: any, + context: __SerdeContext +): UpdateTrustResult => { + let contents: any = { + __type: "UpdateTrustResult", + RequestId: undefined, + TrustId: undefined + }; + if (output.RequestId !== undefined) { + contents.RequestId = output.RequestId; + } + if (output.TrustId !== undefined) { + contents.TrustId = output.TrustId; + } + return contents; +}; + +const deserializeAws_json1_1UserDoesNotExistException = ( + output: any, + context: __SerdeContext +): UserDoesNotExistException => { + let contents: any = { + __type: "UserDoesNotExistException", + Message: undefined, + RequestId: undefined + }; + if (output.Message !== undefined) { + contents.Message = output.Message; + } + if (output.RequestId !== undefined) { + contents.RequestId = output.RequestId; + } + return contents; +}; + +const deserializeAws_json1_1VerifyTrustResult = ( + output: any, + context: __SerdeContext +): VerifyTrustResult => { + let contents: any = { + __type: "VerifyTrustResult", + TrustId: undefined + }; + if (output.TrustId !== undefined) { + contents.TrustId = output.TrustId; + } + return contents; +}; + +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-directory-service/runtimeConfig.browser.ts b/clients/client-directory-service/runtimeConfig.browser.ts new file mode 100644 index 000000000000..b460fb6d6b67 --- /dev/null +++ b/clients/client-directory-service/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 "./DirectoryServiceClient"; +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: "ds", + credentialDefaultProvider: invalidFunction("Credential is missing") as any, + regionDefaultProvider: invalidFunction("Region is missing") as any +}; diff --git a/clients/client-directory-service/runtimeConfig.shared.ts b/clients/client-directory-service/runtimeConfig.shared.ts new file mode 100644 index 000000000000..1419a4da5af2 --- /dev/null +++ b/clients/client-directory-service/runtimeConfig.shared.ts @@ -0,0 +1,7 @@ +import { defaultRegionInfoProvider } from "./endpoints"; + +export const ClientSharedValues = { + apiVersion: "2015-04-16", + signingName: "ds", + regionInfoProvider: defaultRegionInfoProvider +}; diff --git a/clients/client-directory-service/runtimeConfig.ts b/clients/client-directory-service/runtimeConfig.ts new file mode 100644 index 000000000000..cc2415fb18fe --- /dev/null +++ b/clients/client-directory-service/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 "./DirectoryServiceClient"; +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: "ds", + credentialDefaultProvider, + regionDefaultProvider +}; diff --git a/clients/client-directory-service/tsconfig.es.json b/clients/client-directory-service/tsconfig.es.json new file mode 100644 index 000000000000..9add6a7c2445 --- /dev/null +++ b/clients/client-directory-service/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-directory-service/tsconfig.json b/clients/client-directory-service/tsconfig.json new file mode 100644 index 000000000000..ca2fadc08187 --- /dev/null +++ b/clients/client-directory-service/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" + } +}