From 69dd6050743fc7f54cd5db358004ab4202b62b37 Mon Sep 17 00:00:00 2001
From: Trivikram Kamat <16024985+trivikr@users.noreply.github.com>
Date: Mon, 6 Jan 2020 11:06:14 -0800
Subject: [PATCH] feat: add client-networkmanager (#643)
---
clients/client-networkmanager/.gitignore | 14 +
clients/client-networkmanager/.npmignore | 4 +
clients/client-networkmanager/LICENSE | 201 +
.../client-networkmanager/NetworkManager.ts | 1219 +++++
.../NetworkManagerClient.ts | 307 ++
clients/client-networkmanager/README.md | 6 +
.../AssociateCustomerGatewayCommand.ts | 93 +
.../commands/AssociateLinkCommand.ts | 81 +
.../commands/CreateDeviceCommand.ts | 81 +
.../commands/CreateGlobalNetworkCommand.ts | 90 +
.../commands/CreateLinkCommand.ts | 81 +
.../commands/CreateSiteCommand.ts | 81 +
.../commands/DeleteDeviceCommand.ts | 81 +
.../commands/DeleteGlobalNetworkCommand.ts | 90 +
.../commands/DeleteLinkCommand.ts | 81 +
.../commands/DeleteSiteCommand.ts | 81 +
.../DeregisterTransitGatewayCommand.ts | 93 +
.../commands/DescribeGlobalNetworksCommand.ts | 93 +
.../DisassociateCustomerGatewayCommand.ts | 93 +
.../commands/DisassociateLinkCommand.ts | 84 +
.../GetCustomerGatewayAssociationsCommand.ts | 93 +
.../commands/GetDevicesCommand.ts | 81 +
.../commands/GetLinkAssociationsCommand.ts | 90 +
.../commands/GetLinksCommand.ts | 81 +
.../commands/GetSitesCommand.ts | 81 +
.../GetTransitGatewayRegistrationsCommand.ts | 93 +
.../commands/ListTagsForResourceCommand.ts | 90 +
.../commands/RegisterTransitGatewayCommand.ts | 93 +
.../commands/TagResourceCommand.ts | 81 +
.../commands/UntagResourceCommand.ts | 81 +
.../commands/UpdateDeviceCommand.ts | 81 +
.../commands/UpdateGlobalNetworkCommand.ts | 90 +
.../commands/UpdateLinkCommand.ts | 81 +
.../commands/UpdateSiteCommand.ts | 81 +
clients/client-networkmanager/endpoints.ts | 78 +
clients/client-networkmanager/index.ts | 30 +
clients/client-networkmanager/models/index.ts | 2387 +++++++++
clients/client-networkmanager/package.json | 75 +
.../protocols/Aws_restJson1_1.ts | 4447 +++++++++++++++++
.../runtimeConfig.browser.ts | 30 +
.../runtimeConfig.shared.ts | 7 +
.../client-networkmanager/runtimeConfig.ts | 31 +
.../client-networkmanager/tsconfig.es.json | 19 +
clients/client-networkmanager/tsconfig.json | 27 +
44 files changed, 11282 insertions(+)
create mode 100644 clients/client-networkmanager/.gitignore
create mode 100644 clients/client-networkmanager/.npmignore
create mode 100644 clients/client-networkmanager/LICENSE
create mode 100644 clients/client-networkmanager/NetworkManager.ts
create mode 100644 clients/client-networkmanager/NetworkManagerClient.ts
create mode 100644 clients/client-networkmanager/README.md
create mode 100644 clients/client-networkmanager/commands/AssociateCustomerGatewayCommand.ts
create mode 100644 clients/client-networkmanager/commands/AssociateLinkCommand.ts
create mode 100644 clients/client-networkmanager/commands/CreateDeviceCommand.ts
create mode 100644 clients/client-networkmanager/commands/CreateGlobalNetworkCommand.ts
create mode 100644 clients/client-networkmanager/commands/CreateLinkCommand.ts
create mode 100644 clients/client-networkmanager/commands/CreateSiteCommand.ts
create mode 100644 clients/client-networkmanager/commands/DeleteDeviceCommand.ts
create mode 100644 clients/client-networkmanager/commands/DeleteGlobalNetworkCommand.ts
create mode 100644 clients/client-networkmanager/commands/DeleteLinkCommand.ts
create mode 100644 clients/client-networkmanager/commands/DeleteSiteCommand.ts
create mode 100644 clients/client-networkmanager/commands/DeregisterTransitGatewayCommand.ts
create mode 100644 clients/client-networkmanager/commands/DescribeGlobalNetworksCommand.ts
create mode 100644 clients/client-networkmanager/commands/DisassociateCustomerGatewayCommand.ts
create mode 100644 clients/client-networkmanager/commands/DisassociateLinkCommand.ts
create mode 100644 clients/client-networkmanager/commands/GetCustomerGatewayAssociationsCommand.ts
create mode 100644 clients/client-networkmanager/commands/GetDevicesCommand.ts
create mode 100644 clients/client-networkmanager/commands/GetLinkAssociationsCommand.ts
create mode 100644 clients/client-networkmanager/commands/GetLinksCommand.ts
create mode 100644 clients/client-networkmanager/commands/GetSitesCommand.ts
create mode 100644 clients/client-networkmanager/commands/GetTransitGatewayRegistrationsCommand.ts
create mode 100644 clients/client-networkmanager/commands/ListTagsForResourceCommand.ts
create mode 100644 clients/client-networkmanager/commands/RegisterTransitGatewayCommand.ts
create mode 100644 clients/client-networkmanager/commands/TagResourceCommand.ts
create mode 100644 clients/client-networkmanager/commands/UntagResourceCommand.ts
create mode 100644 clients/client-networkmanager/commands/UpdateDeviceCommand.ts
create mode 100644 clients/client-networkmanager/commands/UpdateGlobalNetworkCommand.ts
create mode 100644 clients/client-networkmanager/commands/UpdateLinkCommand.ts
create mode 100644 clients/client-networkmanager/commands/UpdateSiteCommand.ts
create mode 100644 clients/client-networkmanager/endpoints.ts
create mode 100644 clients/client-networkmanager/index.ts
create mode 100644 clients/client-networkmanager/models/index.ts
create mode 100644 clients/client-networkmanager/package.json
create mode 100644 clients/client-networkmanager/protocols/Aws_restJson1_1.ts
create mode 100644 clients/client-networkmanager/runtimeConfig.browser.ts
create mode 100644 clients/client-networkmanager/runtimeConfig.shared.ts
create mode 100644 clients/client-networkmanager/runtimeConfig.ts
create mode 100644 clients/client-networkmanager/tsconfig.es.json
create mode 100644 clients/client-networkmanager/tsconfig.json
diff --git a/clients/client-networkmanager/.gitignore b/clients/client-networkmanager/.gitignore
new file mode 100644
index 000000000000..b41c05b597c4
--- /dev/null
+++ b/clients/client-networkmanager/.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-networkmanager/.npmignore b/clients/client-networkmanager/.npmignore
new file mode 100644
index 000000000000..b7ff81137c4a
--- /dev/null
+++ b/clients/client-networkmanager/.npmignore
@@ -0,0 +1,4 @@
+/coverage/
+/docs/
+tsconfig.test.json
+*.tsbuildinfo
diff --git a/clients/client-networkmanager/LICENSE b/clients/client-networkmanager/LICENSE
new file mode 100644
index 000000000000..b7d2463d8cc0
--- /dev/null
+++ b/clients/client-networkmanager/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-networkmanager/NetworkManager.ts b/clients/client-networkmanager/NetworkManager.ts
new file mode 100644
index 000000000000..ae1cdf8c4f0b
--- /dev/null
+++ b/clients/client-networkmanager/NetworkManager.ts
@@ -0,0 +1,1219 @@
+import { NetworkManagerClient } from "./NetworkManagerClient";
+import {
+ AssociateCustomerGatewayCommand,
+ AssociateCustomerGatewayCommandInput,
+ AssociateCustomerGatewayCommandOutput
+} from "./commands/AssociateCustomerGatewayCommand";
+import {
+ AssociateLinkCommand,
+ AssociateLinkCommandInput,
+ AssociateLinkCommandOutput
+} from "./commands/AssociateLinkCommand";
+import {
+ CreateDeviceCommand,
+ CreateDeviceCommandInput,
+ CreateDeviceCommandOutput
+} from "./commands/CreateDeviceCommand";
+import {
+ CreateGlobalNetworkCommand,
+ CreateGlobalNetworkCommandInput,
+ CreateGlobalNetworkCommandOutput
+} from "./commands/CreateGlobalNetworkCommand";
+import {
+ CreateLinkCommand,
+ CreateLinkCommandInput,
+ CreateLinkCommandOutput
+} from "./commands/CreateLinkCommand";
+import {
+ CreateSiteCommand,
+ CreateSiteCommandInput,
+ CreateSiteCommandOutput
+} from "./commands/CreateSiteCommand";
+import {
+ DeleteDeviceCommand,
+ DeleteDeviceCommandInput,
+ DeleteDeviceCommandOutput
+} from "./commands/DeleteDeviceCommand";
+import {
+ DeleteGlobalNetworkCommand,
+ DeleteGlobalNetworkCommandInput,
+ DeleteGlobalNetworkCommandOutput
+} from "./commands/DeleteGlobalNetworkCommand";
+import {
+ DeleteLinkCommand,
+ DeleteLinkCommandInput,
+ DeleteLinkCommandOutput
+} from "./commands/DeleteLinkCommand";
+import {
+ DeleteSiteCommand,
+ DeleteSiteCommandInput,
+ DeleteSiteCommandOutput
+} from "./commands/DeleteSiteCommand";
+import {
+ DeregisterTransitGatewayCommand,
+ DeregisterTransitGatewayCommandInput,
+ DeregisterTransitGatewayCommandOutput
+} from "./commands/DeregisterTransitGatewayCommand";
+import {
+ DescribeGlobalNetworksCommand,
+ DescribeGlobalNetworksCommandInput,
+ DescribeGlobalNetworksCommandOutput
+} from "./commands/DescribeGlobalNetworksCommand";
+import {
+ DisassociateCustomerGatewayCommand,
+ DisassociateCustomerGatewayCommandInput,
+ DisassociateCustomerGatewayCommandOutput
+} from "./commands/DisassociateCustomerGatewayCommand";
+import {
+ DisassociateLinkCommand,
+ DisassociateLinkCommandInput,
+ DisassociateLinkCommandOutput
+} from "./commands/DisassociateLinkCommand";
+import {
+ GetCustomerGatewayAssociationsCommand,
+ GetCustomerGatewayAssociationsCommandInput,
+ GetCustomerGatewayAssociationsCommandOutput
+} from "./commands/GetCustomerGatewayAssociationsCommand";
+import {
+ GetDevicesCommand,
+ GetDevicesCommandInput,
+ GetDevicesCommandOutput
+} from "./commands/GetDevicesCommand";
+import {
+ GetLinkAssociationsCommand,
+ GetLinkAssociationsCommandInput,
+ GetLinkAssociationsCommandOutput
+} from "./commands/GetLinkAssociationsCommand";
+import {
+ GetLinksCommand,
+ GetLinksCommandInput,
+ GetLinksCommandOutput
+} from "./commands/GetLinksCommand";
+import {
+ GetSitesCommand,
+ GetSitesCommandInput,
+ GetSitesCommandOutput
+} from "./commands/GetSitesCommand";
+import {
+ GetTransitGatewayRegistrationsCommand,
+ GetTransitGatewayRegistrationsCommandInput,
+ GetTransitGatewayRegistrationsCommandOutput
+} from "./commands/GetTransitGatewayRegistrationsCommand";
+import {
+ ListTagsForResourceCommand,
+ ListTagsForResourceCommandInput,
+ ListTagsForResourceCommandOutput
+} from "./commands/ListTagsForResourceCommand";
+import {
+ RegisterTransitGatewayCommand,
+ RegisterTransitGatewayCommandInput,
+ RegisterTransitGatewayCommandOutput
+} from "./commands/RegisterTransitGatewayCommand";
+import {
+ TagResourceCommand,
+ TagResourceCommandInput,
+ TagResourceCommandOutput
+} from "./commands/TagResourceCommand";
+import {
+ UntagResourceCommand,
+ UntagResourceCommandInput,
+ UntagResourceCommandOutput
+} from "./commands/UntagResourceCommand";
+import {
+ UpdateDeviceCommand,
+ UpdateDeviceCommandInput,
+ UpdateDeviceCommandOutput
+} from "./commands/UpdateDeviceCommand";
+import {
+ UpdateGlobalNetworkCommand,
+ UpdateGlobalNetworkCommandInput,
+ UpdateGlobalNetworkCommandOutput
+} from "./commands/UpdateGlobalNetworkCommand";
+import {
+ UpdateLinkCommand,
+ UpdateLinkCommandInput,
+ UpdateLinkCommandOutput
+} from "./commands/UpdateLinkCommand";
+import {
+ UpdateSiteCommand,
+ UpdateSiteCommandInput,
+ UpdateSiteCommandOutput
+} from "./commands/UpdateSiteCommand";
+import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
+
+/**
+ *
+ *
Transit Gateway Network Manager (Network Manager) enables you to create a global network, in which you can monitor your
+ * AWS and on-premises networks that are built around transit gateways.
+ *
+ */
+export class NetworkManager extends NetworkManagerClient {
+ /**
+ *
+ * Describes one or more global networks. By default, all global networks are
+ * described. To describe the objects in your global network, you must use the appropriate
+ * Get*
action. For example, to list the transit gateways in your global
+ * network, use GetTransitGatewayRegistrations .
+ *
+ */
+ public describeGlobalNetworks(
+ args: DescribeGlobalNetworksCommandInput,
+ options?: __HttpHandlerOptions
+ ): Promise;
+ public describeGlobalNetworks(
+ args: DescribeGlobalNetworksCommandInput,
+ cb: (err: any, data?: DescribeGlobalNetworksCommandOutput) => void
+ ): void;
+ public describeGlobalNetworks(
+ args: DescribeGlobalNetworksCommandInput,
+ options: __HttpHandlerOptions,
+ cb: (err: any, data?: DescribeGlobalNetworksCommandOutput) => void
+ ): void;
+ public describeGlobalNetworks(
+ args: DescribeGlobalNetworksCommandInput,
+ optionsOrCb?:
+ | __HttpHandlerOptions
+ | ((err: any, data?: DescribeGlobalNetworksCommandOutput) => void),
+ cb?: (err: any, data?: DescribeGlobalNetworksCommandOutput) => void
+ ): Promise | void {
+ const command = new DescribeGlobalNetworksCommand(args);
+ if (typeof optionsOrCb === "function") {
+ this.send(command, optionsOrCb);
+ } else if (typeof cb === "function") {
+ if (typeof optionsOrCb !== "object")
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
+ this.send(command, optionsOrCb || {}, cb);
+ } else {
+ return this.send(command, optionsOrCb);
+ }
+ }
+
+ /**
+ *
+ * Creates a new device in a global network. If you specify both a site ID and a
+ * location, the location of the site is used for visualization in the Network Manager console.
+ *
+ */
+ public createDevice(
+ args: CreateDeviceCommandInput,
+ options?: __HttpHandlerOptions
+ ): Promise;
+ public createDevice(
+ args: CreateDeviceCommandInput,
+ cb: (err: any, data?: CreateDeviceCommandOutput) => void
+ ): void;
+ public createDevice(
+ args: CreateDeviceCommandInput,
+ options: __HttpHandlerOptions,
+ cb: (err: any, data?: CreateDeviceCommandOutput) => void
+ ): void;
+ public createDevice(
+ args: CreateDeviceCommandInput,
+ optionsOrCb?:
+ | __HttpHandlerOptions
+ | ((err: any, data?: CreateDeviceCommandOutput) => void),
+ cb?: (err: any, data?: CreateDeviceCommandOutput) => void
+ ): Promise | void {
+ const command = new CreateDeviceCommand(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 details for an existing device. To remove information for any of the
+ * parameters, specify an empty string.
+ *
+ */
+ public updateDevice(
+ args: UpdateDeviceCommandInput,
+ options?: __HttpHandlerOptions
+ ): Promise;
+ public updateDevice(
+ args: UpdateDeviceCommandInput,
+ cb: (err: any, data?: UpdateDeviceCommandOutput) => void
+ ): void;
+ public updateDevice(
+ args: UpdateDeviceCommandInput,
+ options: __HttpHandlerOptions,
+ cb: (err: any, data?: UpdateDeviceCommandOutput) => void
+ ): void;
+ public updateDevice(
+ args: UpdateDeviceCommandInput,
+ optionsOrCb?:
+ | __HttpHandlerOptions
+ | ((err: any, data?: UpdateDeviceCommandOutput) => void),
+ cb?: (err: any, data?: UpdateDeviceCommandOutput) => void
+ ): Promise | void {
+ const command = new UpdateDeviceCommand(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 tags for a specified resource.
+ *
+ */
+ 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);
+ }
+ }
+
+ /**
+ *
+ * Updates the information for an existing site. To remove information for any of the
+ * parameters, specify an empty string.
+ *
+ */
+ public updateSite(
+ args: UpdateSiteCommandInput,
+ options?: __HttpHandlerOptions
+ ): Promise;
+ public updateSite(
+ args: UpdateSiteCommandInput,
+ cb: (err: any, data?: UpdateSiteCommandOutput) => void
+ ): void;
+ public updateSite(
+ args: UpdateSiteCommandInput,
+ options: __HttpHandlerOptions,
+ cb: (err: any, data?: UpdateSiteCommandOutput) => void
+ ): void;
+ public updateSite(
+ args: UpdateSiteCommandInput,
+ optionsOrCb?:
+ | __HttpHandlerOptions
+ | ((err: any, data?: UpdateSiteCommandOutput) => void),
+ cb?: (err: any, data?: UpdateSiteCommandOutput) => void
+ ): Promise | void {
+ const command = new UpdateSiteCommand(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 link to a device. A device can be associated to multiple links and a link can be associated to multiple devices. The device and link must be in the same global network and the same site.
+ *
+ */
+ public associateLink(
+ args: AssociateLinkCommandInput,
+ options?: __HttpHandlerOptions
+ ): Promise;
+ public associateLink(
+ args: AssociateLinkCommandInput,
+ cb: (err: any, data?: AssociateLinkCommandOutput) => void
+ ): void;
+ public associateLink(
+ args: AssociateLinkCommandInput,
+ options: __HttpHandlerOptions,
+ cb: (err: any, data?: AssociateLinkCommandOutput) => void
+ ): void;
+ public associateLink(
+ args: AssociateLinkCommandInput,
+ optionsOrCb?:
+ | __HttpHandlerOptions
+ | ((err: any, data?: AssociateLinkCommandOutput) => void),
+ cb?: (err: any, data?: AssociateLinkCommandOutput) => void
+ ): Promise | void {
+ const command = new AssociateLinkCommand(args);
+ if (typeof optionsOrCb === "function") {
+ this.send(command, optionsOrCb);
+ } else if (typeof cb === "function") {
+ if (typeof optionsOrCb !== "object")
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
+ this.send(command, optionsOrCb || {}, cb);
+ } else {
+ return this.send(command, optionsOrCb);
+ }
+ }
+
+ /**
+ *
+ * Gets the association information for customer gateways that are associated with
+ * devices and links in your global network.
+ *
+ */
+ public getCustomerGatewayAssociations(
+ args: GetCustomerGatewayAssociationsCommandInput,
+ options?: __HttpHandlerOptions
+ ): Promise;
+ public getCustomerGatewayAssociations(
+ args: GetCustomerGatewayAssociationsCommandInput,
+ cb: (err: any, data?: GetCustomerGatewayAssociationsCommandOutput) => void
+ ): void;
+ public getCustomerGatewayAssociations(
+ args: GetCustomerGatewayAssociationsCommandInput,
+ options: __HttpHandlerOptions,
+ cb: (err: any, data?: GetCustomerGatewayAssociationsCommandOutput) => void
+ ): void;
+ public getCustomerGatewayAssociations(
+ args: GetCustomerGatewayAssociationsCommandInput,
+ optionsOrCb?:
+ | __HttpHandlerOptions
+ | ((
+ err: any,
+ data?: GetCustomerGatewayAssociationsCommandOutput
+ ) => void),
+ cb?: (err: any, data?: GetCustomerGatewayAssociationsCommandOutput) => void
+ ): Promise | void {
+ const command = new GetCustomerGatewayAssociationsCommand(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 global network. You must first delete all global network objects
+ * (devices, links, and sites) and deregister all transit gateways.
+ *
+ */
+ public deleteGlobalNetwork(
+ args: DeleteGlobalNetworkCommandInput,
+ options?: __HttpHandlerOptions
+ ): Promise;
+ public deleteGlobalNetwork(
+ args: DeleteGlobalNetworkCommandInput,
+ cb: (err: any, data?: DeleteGlobalNetworkCommandOutput) => void
+ ): void;
+ public deleteGlobalNetwork(
+ args: DeleteGlobalNetworkCommandInput,
+ options: __HttpHandlerOptions,
+ cb: (err: any, data?: DeleteGlobalNetworkCommandOutput) => void
+ ): void;
+ public deleteGlobalNetwork(
+ args: DeleteGlobalNetworkCommandInput,
+ optionsOrCb?:
+ | __HttpHandlerOptions
+ | ((err: any, data?: DeleteGlobalNetworkCommandOutput) => void),
+ cb?: (err: any, data?: DeleteGlobalNetworkCommandOutput) => void
+ ): Promise | void {
+ const command = new DeleteGlobalNetworkCommand(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 customer gateway with a device and optionally, with a link. If you
+ * specify a link, it must be associated with the specified device.
+ * You can only associate customer gateways that are connected to a VPN attachment on a
+ * transit gateway. The transit gateway must be registered in your global network. When
+ * you register a transit gateway, customer gateways that are connected to the transit
+ * gateway are automatically included in the global network. To list customer gateways
+ * that are connected to a transit gateway, use the DescribeVpnConnections EC2 API and filter by
+ * transit-gateway-id
.
+ * You cannot associate a customer gateway with more than one device and link.
+ *
+ */
+ public associateCustomerGateway(
+ args: AssociateCustomerGatewayCommandInput,
+ options?: __HttpHandlerOptions
+ ): Promise;
+ public associateCustomerGateway(
+ args: AssociateCustomerGatewayCommandInput,
+ cb: (err: any, data?: AssociateCustomerGatewayCommandOutput) => void
+ ): void;
+ public associateCustomerGateway(
+ args: AssociateCustomerGatewayCommandInput,
+ options: __HttpHandlerOptions,
+ cb: (err: any, data?: AssociateCustomerGatewayCommandOutput) => void
+ ): void;
+ public associateCustomerGateway(
+ args: AssociateCustomerGatewayCommandInput,
+ optionsOrCb?:
+ | __HttpHandlerOptions
+ | ((err: any, data?: AssociateCustomerGatewayCommandOutput) => void),
+ cb?: (err: any, data?: AssociateCustomerGatewayCommandOutput) => void
+ ): Promise | void {
+ const command = new AssociateCustomerGatewayCommand(args);
+ if (typeof optionsOrCb === "function") {
+ this.send(command, optionsOrCb);
+ } else if (typeof cb === "function") {
+ if (typeof optionsOrCb !== "object")
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
+ this.send(command, optionsOrCb || {}, cb);
+ } else {
+ return this.send(command, optionsOrCb);
+ }
+ }
+
+ /**
+ *
+ * Creates a new link for a specified site.
+ *
+ */
+ public createLink(
+ args: CreateLinkCommandInput,
+ options?: __HttpHandlerOptions
+ ): Promise;
+ public createLink(
+ args: CreateLinkCommandInput,
+ cb: (err: any, data?: CreateLinkCommandOutput) => void
+ ): void;
+ public createLink(
+ args: CreateLinkCommandInput,
+ options: __HttpHandlerOptions,
+ cb: (err: any, data?: CreateLinkCommandOutput) => void
+ ): void;
+ public createLink(
+ args: CreateLinkCommandInput,
+ optionsOrCb?:
+ | __HttpHandlerOptions
+ | ((err: any, data?: CreateLinkCommandOutput) => void),
+ cb?: (err: any, data?: CreateLinkCommandOutput) => void
+ ): Promise | void {
+ const command = new CreateLinkCommand(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 device. You must first disassociate the device from any links and
+ * customer gateways.
+ *
+ */
+ public deleteDevice(
+ args: DeleteDeviceCommandInput,
+ options?: __HttpHandlerOptions
+ ): Promise;
+ public deleteDevice(
+ args: DeleteDeviceCommandInput,
+ cb: (err: any, data?: DeleteDeviceCommandOutput) => void
+ ): void;
+ public deleteDevice(
+ args: DeleteDeviceCommandInput,
+ options: __HttpHandlerOptions,
+ cb: (err: any, data?: DeleteDeviceCommandOutput) => void
+ ): void;
+ public deleteDevice(
+ args: DeleteDeviceCommandInput,
+ optionsOrCb?:
+ | __HttpHandlerOptions
+ | ((err: any, data?: DeleteDeviceCommandOutput) => void),
+ cb?: (err: any, data?: DeleteDeviceCommandOutput) => void
+ ): Promise | void {
+ const command = new DeleteDeviceCommand(args);
+ if (typeof optionsOrCb === "function") {
+ this.send(command, optionsOrCb);
+ } else if (typeof cb === "function") {
+ if (typeof optionsOrCb !== "object")
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
+ this.send(command, optionsOrCb || {}, cb);
+ } else {
+ return this.send(command, optionsOrCb);
+ }
+ }
+
+ /**
+ *
+ * Gets information about one or more links in a specified global network.
+ * If you specify the site ID, you cannot specify the type or provider in the same request. You can specify the type and provider in the same request.
+ *
+ */
+ public getLinks(
+ args: GetLinksCommandInput,
+ options?: __HttpHandlerOptions
+ ): Promise;
+ public getLinks(
+ args: GetLinksCommandInput,
+ cb: (err: any, data?: GetLinksCommandOutput) => void
+ ): void;
+ public getLinks(
+ args: GetLinksCommandInput,
+ options: __HttpHandlerOptions,
+ cb: (err: any, data?: GetLinksCommandOutput) => void
+ ): void;
+ public getLinks(
+ args: GetLinksCommandInput,
+ optionsOrCb?:
+ | __HttpHandlerOptions
+ | ((err: any, data?: GetLinksCommandOutput) => void),
+ cb?: (err: any, data?: GetLinksCommandOutput) => void
+ ): Promise | void {
+ const command = new GetLinksCommand(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);
+ }
+ }
+
+ /**
+ *
+ * Disassociates an existing device from a link. You must first disassociate any customer
+ * gateways that are associated with the link.
+ *
+ */
+ public disassociateLink(
+ args: DisassociateLinkCommandInput,
+ options?: __HttpHandlerOptions
+ ): Promise;
+ public disassociateLink(
+ args: DisassociateLinkCommandInput,
+ cb: (err: any, data?: DisassociateLinkCommandOutput) => void
+ ): void;
+ public disassociateLink(
+ args: DisassociateLinkCommandInput,
+ options: __HttpHandlerOptions,
+ cb: (err: any, data?: DisassociateLinkCommandOutput) => void
+ ): void;
+ public disassociateLink(
+ args: DisassociateLinkCommandInput,
+ optionsOrCb?:
+ | __HttpHandlerOptions
+ | ((err: any, data?: DisassociateLinkCommandOutput) => void),
+ cb?: (err: any, data?: DisassociateLinkCommandOutput) => void
+ ): Promise | void {
+ const command = new DisassociateLinkCommand(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);
+ }
+ }
+
+ /**
+ *
+ * Tags a specified resource.
+ *
+ */
+ public tagResource(
+ args: TagResourceCommandInput,
+ options?: __HttpHandlerOptions
+ ): Promise;
+ public tagResource(
+ args: TagResourceCommandInput,
+ cb: (err: any, data?: TagResourceCommandOutput) => void
+ ): void;
+ public tagResource(
+ args: TagResourceCommandInput,
+ options: __HttpHandlerOptions,
+ cb: (err: any, data?: TagResourceCommandOutput) => void
+ ): void;
+ public tagResource(
+ args: TagResourceCommandInput,
+ optionsOrCb?:
+ | __HttpHandlerOptions
+ | ((err: any, data?: TagResourceCommandOutput) => void),
+ cb?: (err: any, data?: TagResourceCommandOutput) => void
+ ): Promise | void {
+ const command = new TagResourceCommand(args);
+ if (typeof optionsOrCb === "function") {
+ this.send(command, optionsOrCb);
+ } else if (typeof cb === "function") {
+ if (typeof optionsOrCb !== "object")
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
+ this.send(command, optionsOrCb || {}, cb);
+ } else {
+ return this.send(command, optionsOrCb);
+ }
+ }
+
+ /**
+ *
+ * Deletes an existing link. You must first disassociate the link from any devices and
+ * customer gateways.
+ *
+ */
+ public deleteLink(
+ args: DeleteLinkCommandInput,
+ options?: __HttpHandlerOptions
+ ): Promise;
+ public deleteLink(
+ args: DeleteLinkCommandInput,
+ cb: (err: any, data?: DeleteLinkCommandOutput) => void
+ ): void;
+ public deleteLink(
+ args: DeleteLinkCommandInput,
+ options: __HttpHandlerOptions,
+ cb: (err: any, data?: DeleteLinkCommandOutput) => void
+ ): void;
+ public deleteLink(
+ args: DeleteLinkCommandInput,
+ optionsOrCb?:
+ | __HttpHandlerOptions
+ | ((err: any, data?: DeleteLinkCommandOutput) => void),
+ cb?: (err: any, data?: DeleteLinkCommandOutput) => void
+ ): Promise | void {
+ const command = new DeleteLinkCommand(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);
+ }
+ }
+
+ /**
+ *
+ * Disassociates a customer gateway from a device and a link.
+ *
+ */
+ public disassociateCustomerGateway(
+ args: DisassociateCustomerGatewayCommandInput,
+ options?: __HttpHandlerOptions
+ ): Promise;
+ public disassociateCustomerGateway(
+ args: DisassociateCustomerGatewayCommandInput,
+ cb: (err: any, data?: DisassociateCustomerGatewayCommandOutput) => void
+ ): void;
+ public disassociateCustomerGateway(
+ args: DisassociateCustomerGatewayCommandInput,
+ options: __HttpHandlerOptions,
+ cb: (err: any, data?: DisassociateCustomerGatewayCommandOutput) => void
+ ): void;
+ public disassociateCustomerGateway(
+ args: DisassociateCustomerGatewayCommandInput,
+ optionsOrCb?:
+ | __HttpHandlerOptions
+ | ((err: any, data?: DisassociateCustomerGatewayCommandOutput) => void),
+ cb?: (err: any, data?: DisassociateCustomerGatewayCommandOutput) => void
+ ): Promise | void {
+ const command = new DisassociateCustomerGatewayCommand(args);
+ if (typeof optionsOrCb === "function") {
+ this.send(command, optionsOrCb);
+ } else if (typeof cb === "function") {
+ if (typeof optionsOrCb !== "object")
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
+ this.send(command, optionsOrCb || {}, cb);
+ } else {
+ return this.send(command, optionsOrCb);
+ }
+ }
+
+ /**
+ *
+ * Creates a new, empty global network.
+ *
+ */
+ public createGlobalNetwork(
+ args: CreateGlobalNetworkCommandInput,
+ options?: __HttpHandlerOptions
+ ): Promise;
+ public createGlobalNetwork(
+ args: CreateGlobalNetworkCommandInput,
+ cb: (err: any, data?: CreateGlobalNetworkCommandOutput) => void
+ ): void;
+ public createGlobalNetwork(
+ args: CreateGlobalNetworkCommandInput,
+ options: __HttpHandlerOptions,
+ cb: (err: any, data?: CreateGlobalNetworkCommandOutput) => void
+ ): void;
+ public createGlobalNetwork(
+ args: CreateGlobalNetworkCommandInput,
+ optionsOrCb?:
+ | __HttpHandlerOptions
+ | ((err: any, data?: CreateGlobalNetworkCommandOutput) => void),
+ cb?: (err: any, data?: CreateGlobalNetworkCommandOutput) => void
+ ): Promise | void {
+ const command = new CreateGlobalNetworkCommand(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 transit gateway in your global network. The transit gateway can be in any
+ * AWS Region, but it must be owned by the same AWS account that owns the global network.
+ * You cannot register a transit gateway in more than one global network.
+ *
+ */
+ public registerTransitGateway(
+ args: RegisterTransitGatewayCommandInput,
+ options?: __HttpHandlerOptions
+ ): Promise;
+ public registerTransitGateway(
+ args: RegisterTransitGatewayCommandInput,
+ cb: (err: any, data?: RegisterTransitGatewayCommandOutput) => void
+ ): void;
+ public registerTransitGateway(
+ args: RegisterTransitGatewayCommandInput,
+ options: __HttpHandlerOptions,
+ cb: (err: any, data?: RegisterTransitGatewayCommandOutput) => void
+ ): void;
+ public registerTransitGateway(
+ args: RegisterTransitGatewayCommandInput,
+ optionsOrCb?:
+ | __HttpHandlerOptions
+ | ((err: any, data?: RegisterTransitGatewayCommandOutput) => void),
+ cb?: (err: any, data?: RegisterTransitGatewayCommandOutput) => void
+ ): Promise | void {
+ const command = new RegisterTransitGatewayCommand(args);
+ if (typeof optionsOrCb === "function") {
+ this.send(command, optionsOrCb);
+ } else if (typeof cb === "function") {
+ if (typeof optionsOrCb !== "object")
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
+ this.send(command, optionsOrCb || {}, cb);
+ } else {
+ return this.send(command, optionsOrCb);
+ }
+ }
+
+ /**
+ *
+ * Gets information about one or more of your sites in a global network.
+ *
+ */
+ public getSites(
+ args: GetSitesCommandInput,
+ options?: __HttpHandlerOptions
+ ): Promise;
+ public getSites(
+ args: GetSitesCommandInput,
+ cb: (err: any, data?: GetSitesCommandOutput) => void
+ ): void;
+ public getSites(
+ args: GetSitesCommandInput,
+ options: __HttpHandlerOptions,
+ cb: (err: any, data?: GetSitesCommandOutput) => void
+ ): void;
+ public getSites(
+ args: GetSitesCommandInput,
+ optionsOrCb?:
+ | __HttpHandlerOptions
+ | ((err: any, data?: GetSitesCommandOutput) => void),
+ cb?: (err: any, data?: GetSitesCommandOutput) => void
+ ): Promise | void {
+ const command = new GetSitesCommand(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);
+ }
+ }
+
+ /**
+ *
+ * Deregisters a transit gateway from your global network. This action does not delete
+ * your transit gateway, or modify any of its attachments. This action removes any customer gateway associations.
+ *
+ */
+ public deregisterTransitGateway(
+ args: DeregisterTransitGatewayCommandInput,
+ options?: __HttpHandlerOptions
+ ): Promise;
+ public deregisterTransitGateway(
+ args: DeregisterTransitGatewayCommandInput,
+ cb: (err: any, data?: DeregisterTransitGatewayCommandOutput) => void
+ ): void;
+ public deregisterTransitGateway(
+ args: DeregisterTransitGatewayCommandInput,
+ options: __HttpHandlerOptions,
+ cb: (err: any, data?: DeregisterTransitGatewayCommandOutput) => void
+ ): void;
+ public deregisterTransitGateway(
+ args: DeregisterTransitGatewayCommandInput,
+ optionsOrCb?:
+ | __HttpHandlerOptions
+ | ((err: any, data?: DeregisterTransitGatewayCommandOutput) => void),
+ cb?: (err: any, data?: DeregisterTransitGatewayCommandOutput) => void
+ ): Promise | void {
+ const command = new DeregisterTransitGatewayCommand(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 site. The site cannot be associated with any device or link.
+ *
+ */
+ public deleteSite(
+ args: DeleteSiteCommandInput,
+ options?: __HttpHandlerOptions
+ ): Promise;
+ public deleteSite(
+ args: DeleteSiteCommandInput,
+ cb: (err: any, data?: DeleteSiteCommandOutput) => void
+ ): void;
+ public deleteSite(
+ args: DeleteSiteCommandInput,
+ options: __HttpHandlerOptions,
+ cb: (err: any, data?: DeleteSiteCommandOutput) => void
+ ): void;
+ public deleteSite(
+ args: DeleteSiteCommandInput,
+ optionsOrCb?:
+ | __HttpHandlerOptions
+ | ((err: any, data?: DeleteSiteCommandOutput) => void),
+ cb?: (err: any, data?: DeleteSiteCommandOutput) => void
+ ): Promise | void {
+ const command = new DeleteSiteCommand(args);
+ if (typeof optionsOrCb === "function") {
+ this.send(command, optionsOrCb);
+ } else if (typeof cb === "function") {
+ if (typeof optionsOrCb !== "object")
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
+ this.send(command, optionsOrCb || {}, cb);
+ } else {
+ return this.send(command, optionsOrCb);
+ }
+ }
+
+ /**
+ *
+ * Gets information about the transit gateway registrations in a specified
+ * global network.
+ *
+ */
+ public getTransitGatewayRegistrations(
+ args: GetTransitGatewayRegistrationsCommandInput,
+ options?: __HttpHandlerOptions
+ ): Promise;
+ public getTransitGatewayRegistrations(
+ args: GetTransitGatewayRegistrationsCommandInput,
+ cb: (err: any, data?: GetTransitGatewayRegistrationsCommandOutput) => void
+ ): void;
+ public getTransitGatewayRegistrations(
+ args: GetTransitGatewayRegistrationsCommandInput,
+ options: __HttpHandlerOptions,
+ cb: (err: any, data?: GetTransitGatewayRegistrationsCommandOutput) => void
+ ): void;
+ public getTransitGatewayRegistrations(
+ args: GetTransitGatewayRegistrationsCommandInput,
+ optionsOrCb?:
+ | __HttpHandlerOptions
+ | ((
+ err: any,
+ data?: GetTransitGatewayRegistrationsCommandOutput
+ ) => void),
+ cb?: (err: any, data?: GetTransitGatewayRegistrationsCommandOutput) => void
+ ): Promise | void {
+ const command = new GetTransitGatewayRegistrationsCommand(args);
+ if (typeof optionsOrCb === "function") {
+ this.send(command, optionsOrCb);
+ } else if (typeof cb === "function") {
+ if (typeof optionsOrCb !== "object")
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
+ this.send(command, optionsOrCb || {}, cb);
+ } else {
+ return this.send(command, optionsOrCb);
+ }
+ }
+
+ /**
+ *
+ * Creates a new site in a global network.
+ *
+ */
+ public createSite(
+ args: CreateSiteCommandInput,
+ options?: __HttpHandlerOptions
+ ): Promise;
+ public createSite(
+ args: CreateSiteCommandInput,
+ cb: (err: any, data?: CreateSiteCommandOutput) => void
+ ): void;
+ public createSite(
+ args: CreateSiteCommandInput,
+ options: __HttpHandlerOptions,
+ cb: (err: any, data?: CreateSiteCommandOutput) => void
+ ): void;
+ public createSite(
+ args: CreateSiteCommandInput,
+ optionsOrCb?:
+ | __HttpHandlerOptions
+ | ((err: any, data?: CreateSiteCommandOutput) => void),
+ cb?: (err: any, data?: CreateSiteCommandOutput) => void
+ ): Promise | void {
+ const command = new CreateSiteCommand(args);
+ if (typeof optionsOrCb === "function") {
+ this.send(command, optionsOrCb);
+ } else if (typeof cb === "function") {
+ if (typeof optionsOrCb !== "object")
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
+ this.send(command, optionsOrCb || {}, cb);
+ } else {
+ return this.send(command, optionsOrCb);
+ }
+ }
+
+ /**
+ *
+ * Gets information about one or more of your devices in a global network.
+ *
+ */
+ public getDevices(
+ args: GetDevicesCommandInput,
+ options?: __HttpHandlerOptions
+ ): Promise;
+ public getDevices(
+ args: GetDevicesCommandInput,
+ cb: (err: any, data?: GetDevicesCommandOutput) => void
+ ): void;
+ public getDevices(
+ args: GetDevicesCommandInput,
+ options: __HttpHandlerOptions,
+ cb: (err: any, data?: GetDevicesCommandOutput) => void
+ ): void;
+ public getDevices(
+ args: GetDevicesCommandInput,
+ optionsOrCb?:
+ | __HttpHandlerOptions
+ | ((err: any, data?: GetDevicesCommandOutput) => void),
+ cb?: (err: any, data?: GetDevicesCommandOutput) => void
+ ): Promise | void {
+ const command = new GetDevicesCommand(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 details for an existing link. To remove information for any of the
+ * parameters, specify an empty string.
+ *
+ */
+ public updateLink(
+ args: UpdateLinkCommandInput,
+ options?: __HttpHandlerOptions
+ ): Promise;
+ public updateLink(
+ args: UpdateLinkCommandInput,
+ cb: (err: any, data?: UpdateLinkCommandOutput) => void
+ ): void;
+ public updateLink(
+ args: UpdateLinkCommandInput,
+ options: __HttpHandlerOptions,
+ cb: (err: any, data?: UpdateLinkCommandOutput) => void
+ ): void;
+ public updateLink(
+ args: UpdateLinkCommandInput,
+ optionsOrCb?:
+ | __HttpHandlerOptions
+ | ((err: any, data?: UpdateLinkCommandOutput) => void),
+ cb?: (err: any, data?: UpdateLinkCommandOutput) => void
+ ): Promise | void {
+ const command = new UpdateLinkCommand(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 specified resource.
+ *
+ */
+ public untagResource(
+ args: UntagResourceCommandInput,
+ options?: __HttpHandlerOptions
+ ): Promise;
+ public untagResource(
+ args: UntagResourceCommandInput,
+ cb: (err: any, data?: UntagResourceCommandOutput) => void
+ ): void;
+ public untagResource(
+ args: UntagResourceCommandInput,
+ options: __HttpHandlerOptions,
+ cb: (err: any, data?: UntagResourceCommandOutput) => void
+ ): void;
+ public untagResource(
+ args: UntagResourceCommandInput,
+ optionsOrCb?:
+ | __HttpHandlerOptions
+ | ((err: any, data?: UntagResourceCommandOutput) => void),
+ cb?: (err: any, data?: UntagResourceCommandOutput) => void
+ ): Promise | void {
+ const command = new UntagResourceCommand(args);
+ if (typeof optionsOrCb === "function") {
+ this.send(command, optionsOrCb);
+ } else if (typeof cb === "function") {
+ if (typeof optionsOrCb !== "object")
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
+ this.send(command, optionsOrCb || {}, cb);
+ } else {
+ return this.send(command, optionsOrCb);
+ }
+ }
+
+ /**
+ *
+ * Updates an existing global network. To remove information for any of the parameters,
+ * specify an empty string.
+ *
+ */
+ public updateGlobalNetwork(
+ args: UpdateGlobalNetworkCommandInput,
+ options?: __HttpHandlerOptions
+ ): Promise;
+ public updateGlobalNetwork(
+ args: UpdateGlobalNetworkCommandInput,
+ cb: (err: any, data?: UpdateGlobalNetworkCommandOutput) => void
+ ): void;
+ public updateGlobalNetwork(
+ args: UpdateGlobalNetworkCommandInput,
+ options: __HttpHandlerOptions,
+ cb: (err: any, data?: UpdateGlobalNetworkCommandOutput) => void
+ ): void;
+ public updateGlobalNetwork(
+ args: UpdateGlobalNetworkCommandInput,
+ optionsOrCb?:
+ | __HttpHandlerOptions
+ | ((err: any, data?: UpdateGlobalNetworkCommandOutput) => void),
+ cb?: (err: any, data?: UpdateGlobalNetworkCommandOutput) => void
+ ): Promise | void {
+ const command = new UpdateGlobalNetworkCommand(args);
+ if (typeof optionsOrCb === "function") {
+ this.send(command, optionsOrCb);
+ } else if (typeof cb === "function") {
+ if (typeof optionsOrCb !== "object")
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
+ this.send(command, optionsOrCb || {}, cb);
+ } else {
+ return this.send(command, optionsOrCb);
+ }
+ }
+
+ /**
+ *
+ * Gets the link associations for a device or a link. Either the device ID or the link ID
+ * must be specified.
+ *
+ */
+ public getLinkAssociations(
+ args: GetLinkAssociationsCommandInput,
+ options?: __HttpHandlerOptions
+ ): Promise;
+ public getLinkAssociations(
+ args: GetLinkAssociationsCommandInput,
+ cb: (err: any, data?: GetLinkAssociationsCommandOutput) => void
+ ): void;
+ public getLinkAssociations(
+ args: GetLinkAssociationsCommandInput,
+ options: __HttpHandlerOptions,
+ cb: (err: any, data?: GetLinkAssociationsCommandOutput) => void
+ ): void;
+ public getLinkAssociations(
+ args: GetLinkAssociationsCommandInput,
+ optionsOrCb?:
+ | __HttpHandlerOptions
+ | ((err: any, data?: GetLinkAssociationsCommandOutput) => void),
+ cb?: (err: any, data?: GetLinkAssociationsCommandOutput) => void
+ ): Promise | void {
+ const command = new GetLinkAssociationsCommand(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-networkmanager/NetworkManagerClient.ts b/clients/client-networkmanager/NetworkManagerClient.ts
new file mode 100644
index 000000000000..79f3a58613cc
--- /dev/null
+++ b/clients/client-networkmanager/NetworkManagerClient.ts
@@ -0,0 +1,307 @@
+import {
+ AssociateCustomerGatewayRequest,
+ AssociateCustomerGatewayResponse,
+ AssociateLinkRequest,
+ AssociateLinkResponse,
+ CreateDeviceRequest,
+ CreateDeviceResponse,
+ CreateGlobalNetworkRequest,
+ CreateGlobalNetworkResponse,
+ CreateLinkRequest,
+ CreateLinkResponse,
+ CreateSiteRequest,
+ CreateSiteResponse,
+ DeleteDeviceRequest,
+ DeleteDeviceResponse,
+ DeleteGlobalNetworkRequest,
+ DeleteGlobalNetworkResponse,
+ DeleteLinkRequest,
+ DeleteLinkResponse,
+ DeleteSiteRequest,
+ DeleteSiteResponse,
+ DeregisterTransitGatewayRequest,
+ DeregisterTransitGatewayResponse,
+ DescribeGlobalNetworksRequest,
+ DescribeGlobalNetworksResponse,
+ DisassociateCustomerGatewayRequest,
+ DisassociateCustomerGatewayResponse,
+ DisassociateLinkRequest,
+ DisassociateLinkResponse,
+ GetCustomerGatewayAssociationsRequest,
+ GetCustomerGatewayAssociationsResponse,
+ GetDevicesRequest,
+ GetDevicesResponse,
+ GetLinkAssociationsRequest,
+ GetLinkAssociationsResponse,
+ GetLinksRequest,
+ GetLinksResponse,
+ GetSitesRequest,
+ GetSitesResponse,
+ GetTransitGatewayRegistrationsRequest,
+ GetTransitGatewayRegistrationsResponse,
+ ListTagsForResourceRequest,
+ ListTagsForResourceResponse,
+ RegisterTransitGatewayRequest,
+ RegisterTransitGatewayResponse,
+ TagResourceRequest,
+ TagResourceResponse,
+ UntagResourceRequest,
+ UntagResourceResponse,
+ UpdateDeviceRequest,
+ UpdateDeviceResponse,
+ UpdateGlobalNetworkRequest,
+ UpdateGlobalNetworkResponse,
+ UpdateLinkRequest,
+ UpdateLinkResponse,
+ UpdateSiteRequest,
+ UpdateSiteResponse
+} 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 =
+ | AssociateCustomerGatewayRequest
+ | AssociateLinkRequest
+ | CreateDeviceRequest
+ | CreateGlobalNetworkRequest
+ | CreateLinkRequest
+ | CreateSiteRequest
+ | DeleteDeviceRequest
+ | DeleteGlobalNetworkRequest
+ | DeleteLinkRequest
+ | DeleteSiteRequest
+ | DeregisterTransitGatewayRequest
+ | DescribeGlobalNetworksRequest
+ | DisassociateCustomerGatewayRequest
+ | DisassociateLinkRequest
+ | GetCustomerGatewayAssociationsRequest
+ | GetDevicesRequest
+ | GetLinkAssociationsRequest
+ | GetLinksRequest
+ | GetSitesRequest
+ | GetTransitGatewayRegistrationsRequest
+ | ListTagsForResourceRequest
+ | RegisterTransitGatewayRequest
+ | TagResourceRequest
+ | UntagResourceRequest
+ | UpdateDeviceRequest
+ | UpdateGlobalNetworkRequest
+ | UpdateLinkRequest
+ | UpdateSiteRequest;
+
+export type ServiceOutputTypes =
+ | AssociateCustomerGatewayResponse
+ | AssociateLinkResponse
+ | CreateDeviceResponse
+ | CreateGlobalNetworkResponse
+ | CreateLinkResponse
+ | CreateSiteResponse
+ | DeleteDeviceResponse
+ | DeleteGlobalNetworkResponse
+ | DeleteLinkResponse
+ | DeleteSiteResponse
+ | DeregisterTransitGatewayResponse
+ | DescribeGlobalNetworksResponse
+ | DisassociateCustomerGatewayResponse
+ | DisassociateLinkResponse
+ | GetCustomerGatewayAssociationsResponse
+ | GetDevicesResponse
+ | GetLinkAssociationsResponse
+ | GetLinksResponse
+ | GetSitesResponse
+ | GetTransitGatewayRegistrationsResponse
+ | ListTagsForResourceResponse
+ | RegisterTransitGatewayResponse
+ | TagResourceResponse
+ | UntagResourceResponse
+ | UpdateDeviceResponse
+ | UpdateGlobalNetworkResponse
+ | UpdateLinkResponse
+ | UpdateSiteResponse;
+
+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 NetworkManagerClientConfig = Partial<
+ __SmithyConfiguration<__HttpHandlerOptions>
+> &
+ ClientDefaults &
+ RegionInputConfig &
+ EndpointsInputConfig &
+ AwsAuthInputConfig &
+ RetryInputConfig &
+ UserAgentInputConfig &
+ HostHeaderInputConfig;
+
+export type NetworkManagerClientResolvedConfig = __SmithyResolvedConfiguration<
+ __HttpHandlerOptions
+> &
+ Required &
+ RegionResolvedConfig &
+ EndpointsResolvedConfig &
+ AwsAuthResolvedConfig &
+ RetryResolvedConfig &
+ UserAgentResolvedConfig &
+ HostHeaderResolvedConfig;
+
+/**
+ *
+ * Transit Gateway Network Manager (Network Manager) enables you to create a global network, in which you can monitor your
+ * AWS and on-premises networks that are built around transit gateways.
+ *
+ */
+export class NetworkManagerClient extends __Client<
+ __HttpHandlerOptions,
+ ServiceInputTypes,
+ ServiceOutputTypes,
+ NetworkManagerClientResolvedConfig
+> {
+ readonly config: NetworkManagerClientResolvedConfig;
+
+ constructor(configuration: NetworkManagerClientConfig) {
+ 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-networkmanager/README.md b/clients/client-networkmanager/README.md
new file mode 100644
index 000000000000..653b43c1e598
--- /dev/null
+++ b/clients/client-networkmanager/README.md
@@ -0,0 +1,6 @@
+@aws-sdk/client-networkmanager
+
+[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-networkmanager/preview.svg)](https://www.npmjs.com/package/@aws-sdk/client-networkmanager)
+[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-networkmanager.svg)](https://www.npmjs.com/package/@aws-sdk/client-networkmanager)
+
+For SDK usage, please step to [SDK reademe](https://github.com/aws/aws-sdk-js-v3).
diff --git a/clients/client-networkmanager/commands/AssociateCustomerGatewayCommand.ts b/clients/client-networkmanager/commands/AssociateCustomerGatewayCommand.ts
new file mode 100644
index 000000000000..2d1176dceb1c
--- /dev/null
+++ b/clients/client-networkmanager/commands/AssociateCustomerGatewayCommand.ts
@@ -0,0 +1,93 @@
+import {
+ NetworkManagerClientResolvedConfig,
+ ServiceInputTypes,
+ ServiceOutputTypes
+} from "../NetworkManagerClient";
+import {
+ AssociateCustomerGatewayRequest,
+ AssociateCustomerGatewayResponse
+} from "../models/index";
+import {
+ deserializeAws_restJson1_1AssociateCustomerGatewayCommand,
+ serializeAws_restJson1_1AssociateCustomerGatewayCommand
+} from "../protocols/Aws_restJson1_1";
+import { getSerdePlugin } from "@aws-sdk/middleware-serde";
+import {
+ HttpRequest as __HttpRequest,
+ HttpResponse as __HttpResponse
+} from "@aws-sdk/protocol-http";
+import { Command as $Command } from "@aws-sdk/smithy-client";
+import {
+ FinalizeHandlerArguments,
+ Handler,
+ HandlerExecutionContext,
+ MiddlewareStack,
+ SerdeContext,
+ HttpHandlerOptions as __HttpHandlerOptions
+} from "@aws-sdk/types";
+
+export type AssociateCustomerGatewayCommandInput = AssociateCustomerGatewayRequest;
+export type AssociateCustomerGatewayCommandOutput = AssociateCustomerGatewayResponse;
+
+export class AssociateCustomerGatewayCommand extends $Command<
+ AssociateCustomerGatewayCommandInput,
+ AssociateCustomerGatewayCommandOutput,
+ NetworkManagerClientResolvedConfig
+> {
+ // Start section: command_properties
+ // End section: command_properties
+
+ constructor(readonly input: AssociateCustomerGatewayCommandInput) {
+ // Start section: command_constructor
+ super();
+ // End section: command_constructor
+ }
+
+ resolveMiddleware(
+ clientStack: MiddlewareStack,
+ configuration: NetworkManagerClientResolvedConfig,
+ options?: __HttpHandlerOptions
+ ): Handler<
+ AssociateCustomerGatewayCommandInput,
+ AssociateCustomerGatewayCommandOutput
+ > {
+ 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: AssociateCustomerGatewayCommandInput,
+ context: SerdeContext
+ ): Promise<__HttpRequest> {
+ return serializeAws_restJson1_1AssociateCustomerGatewayCommand(
+ input,
+ context
+ );
+ }
+
+ private deserialize(
+ output: __HttpResponse,
+ context: SerdeContext
+ ): Promise {
+ return deserializeAws_restJson1_1AssociateCustomerGatewayCommand(
+ output,
+ context
+ );
+ }
+
+ // Start section: command_body_extra
+ // End section: command_body_extra
+}
diff --git a/clients/client-networkmanager/commands/AssociateLinkCommand.ts b/clients/client-networkmanager/commands/AssociateLinkCommand.ts
new file mode 100644
index 000000000000..d6ef96979bd1
--- /dev/null
+++ b/clients/client-networkmanager/commands/AssociateLinkCommand.ts
@@ -0,0 +1,81 @@
+import {
+ NetworkManagerClientResolvedConfig,
+ ServiceInputTypes,
+ ServiceOutputTypes
+} from "../NetworkManagerClient";
+import { AssociateLinkRequest, AssociateLinkResponse } from "../models/index";
+import {
+ deserializeAws_restJson1_1AssociateLinkCommand,
+ serializeAws_restJson1_1AssociateLinkCommand
+} from "../protocols/Aws_restJson1_1";
+import { getSerdePlugin } from "@aws-sdk/middleware-serde";
+import {
+ HttpRequest as __HttpRequest,
+ HttpResponse as __HttpResponse
+} from "@aws-sdk/protocol-http";
+import { Command as $Command } from "@aws-sdk/smithy-client";
+import {
+ FinalizeHandlerArguments,
+ Handler,
+ HandlerExecutionContext,
+ MiddlewareStack,
+ SerdeContext,
+ HttpHandlerOptions as __HttpHandlerOptions
+} from "@aws-sdk/types";
+
+export type AssociateLinkCommandInput = AssociateLinkRequest;
+export type AssociateLinkCommandOutput = AssociateLinkResponse;
+
+export class AssociateLinkCommand extends $Command<
+ AssociateLinkCommandInput,
+ AssociateLinkCommandOutput,
+ NetworkManagerClientResolvedConfig
+> {
+ // Start section: command_properties
+ // End section: command_properties
+
+ constructor(readonly input: AssociateLinkCommandInput) {
+ // Start section: command_constructor
+ super();
+ // End section: command_constructor
+ }
+
+ resolveMiddleware(
+ clientStack: MiddlewareStack,
+ configuration: NetworkManagerClientResolvedConfig,
+ 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: AssociateLinkCommandInput,
+ context: SerdeContext
+ ): Promise<__HttpRequest> {
+ return serializeAws_restJson1_1AssociateLinkCommand(input, context);
+ }
+
+ private deserialize(
+ output: __HttpResponse,
+ context: SerdeContext
+ ): Promise {
+ return deserializeAws_restJson1_1AssociateLinkCommand(output, context);
+ }
+
+ // Start section: command_body_extra
+ // End section: command_body_extra
+}
diff --git a/clients/client-networkmanager/commands/CreateDeviceCommand.ts b/clients/client-networkmanager/commands/CreateDeviceCommand.ts
new file mode 100644
index 000000000000..e797581ebe20
--- /dev/null
+++ b/clients/client-networkmanager/commands/CreateDeviceCommand.ts
@@ -0,0 +1,81 @@
+import {
+ NetworkManagerClientResolvedConfig,
+ ServiceInputTypes,
+ ServiceOutputTypes
+} from "../NetworkManagerClient";
+import { CreateDeviceRequest, CreateDeviceResponse } from "../models/index";
+import {
+ deserializeAws_restJson1_1CreateDeviceCommand,
+ serializeAws_restJson1_1CreateDeviceCommand
+} from "../protocols/Aws_restJson1_1";
+import { getSerdePlugin } from "@aws-sdk/middleware-serde";
+import {
+ HttpRequest as __HttpRequest,
+ HttpResponse as __HttpResponse
+} from "@aws-sdk/protocol-http";
+import { Command as $Command } from "@aws-sdk/smithy-client";
+import {
+ FinalizeHandlerArguments,
+ Handler,
+ HandlerExecutionContext,
+ MiddlewareStack,
+ SerdeContext,
+ HttpHandlerOptions as __HttpHandlerOptions
+} from "@aws-sdk/types";
+
+export type CreateDeviceCommandInput = CreateDeviceRequest;
+export type CreateDeviceCommandOutput = CreateDeviceResponse;
+
+export class CreateDeviceCommand extends $Command<
+ CreateDeviceCommandInput,
+ CreateDeviceCommandOutput,
+ NetworkManagerClientResolvedConfig
+> {
+ // Start section: command_properties
+ // End section: command_properties
+
+ constructor(readonly input: CreateDeviceCommandInput) {
+ // Start section: command_constructor
+ super();
+ // End section: command_constructor
+ }
+
+ resolveMiddleware(
+ clientStack: MiddlewareStack,
+ configuration: NetworkManagerClientResolvedConfig,
+ 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: CreateDeviceCommandInput,
+ context: SerdeContext
+ ): Promise<__HttpRequest> {
+ return serializeAws_restJson1_1CreateDeviceCommand(input, context);
+ }
+
+ private deserialize(
+ output: __HttpResponse,
+ context: SerdeContext
+ ): Promise {
+ return deserializeAws_restJson1_1CreateDeviceCommand(output, context);
+ }
+
+ // Start section: command_body_extra
+ // End section: command_body_extra
+}
diff --git a/clients/client-networkmanager/commands/CreateGlobalNetworkCommand.ts b/clients/client-networkmanager/commands/CreateGlobalNetworkCommand.ts
new file mode 100644
index 000000000000..676cf0032a62
--- /dev/null
+++ b/clients/client-networkmanager/commands/CreateGlobalNetworkCommand.ts
@@ -0,0 +1,90 @@
+import {
+ NetworkManagerClientResolvedConfig,
+ ServiceInputTypes,
+ ServiceOutputTypes
+} from "../NetworkManagerClient";
+import {
+ CreateGlobalNetworkRequest,
+ CreateGlobalNetworkResponse
+} from "../models/index";
+import {
+ deserializeAws_restJson1_1CreateGlobalNetworkCommand,
+ serializeAws_restJson1_1CreateGlobalNetworkCommand
+} from "../protocols/Aws_restJson1_1";
+import { getSerdePlugin } from "@aws-sdk/middleware-serde";
+import {
+ HttpRequest as __HttpRequest,
+ HttpResponse as __HttpResponse
+} from "@aws-sdk/protocol-http";
+import { Command as $Command } from "@aws-sdk/smithy-client";
+import {
+ FinalizeHandlerArguments,
+ Handler,
+ HandlerExecutionContext,
+ MiddlewareStack,
+ SerdeContext,
+ HttpHandlerOptions as __HttpHandlerOptions
+} from "@aws-sdk/types";
+
+export type CreateGlobalNetworkCommandInput = CreateGlobalNetworkRequest;
+export type CreateGlobalNetworkCommandOutput = CreateGlobalNetworkResponse;
+
+export class CreateGlobalNetworkCommand extends $Command<
+ CreateGlobalNetworkCommandInput,
+ CreateGlobalNetworkCommandOutput,
+ NetworkManagerClientResolvedConfig
+> {
+ // Start section: command_properties
+ // End section: command_properties
+
+ constructor(readonly input: CreateGlobalNetworkCommandInput) {
+ // Start section: command_constructor
+ super();
+ // End section: command_constructor
+ }
+
+ resolveMiddleware(
+ clientStack: MiddlewareStack,
+ configuration: NetworkManagerClientResolvedConfig,
+ options?: __HttpHandlerOptions
+ ): Handler<
+ CreateGlobalNetworkCommandInput,
+ CreateGlobalNetworkCommandOutput
+ > {
+ 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: CreateGlobalNetworkCommandInput,
+ context: SerdeContext
+ ): Promise<__HttpRequest> {
+ return serializeAws_restJson1_1CreateGlobalNetworkCommand(input, context);
+ }
+
+ private deserialize(
+ output: __HttpResponse,
+ context: SerdeContext
+ ): Promise {
+ return deserializeAws_restJson1_1CreateGlobalNetworkCommand(
+ output,
+ context
+ );
+ }
+
+ // Start section: command_body_extra
+ // End section: command_body_extra
+}
diff --git a/clients/client-networkmanager/commands/CreateLinkCommand.ts b/clients/client-networkmanager/commands/CreateLinkCommand.ts
new file mode 100644
index 000000000000..a1d490a3a7d6
--- /dev/null
+++ b/clients/client-networkmanager/commands/CreateLinkCommand.ts
@@ -0,0 +1,81 @@
+import {
+ NetworkManagerClientResolvedConfig,
+ ServiceInputTypes,
+ ServiceOutputTypes
+} from "../NetworkManagerClient";
+import { CreateLinkRequest, CreateLinkResponse } from "../models/index";
+import {
+ deserializeAws_restJson1_1CreateLinkCommand,
+ serializeAws_restJson1_1CreateLinkCommand
+} from "../protocols/Aws_restJson1_1";
+import { getSerdePlugin } from "@aws-sdk/middleware-serde";
+import {
+ HttpRequest as __HttpRequest,
+ HttpResponse as __HttpResponse
+} from "@aws-sdk/protocol-http";
+import { Command as $Command } from "@aws-sdk/smithy-client";
+import {
+ FinalizeHandlerArguments,
+ Handler,
+ HandlerExecutionContext,
+ MiddlewareStack,
+ SerdeContext,
+ HttpHandlerOptions as __HttpHandlerOptions
+} from "@aws-sdk/types";
+
+export type CreateLinkCommandInput = CreateLinkRequest;
+export type CreateLinkCommandOutput = CreateLinkResponse;
+
+export class CreateLinkCommand extends $Command<
+ CreateLinkCommandInput,
+ CreateLinkCommandOutput,
+ NetworkManagerClientResolvedConfig
+> {
+ // Start section: command_properties
+ // End section: command_properties
+
+ constructor(readonly input: CreateLinkCommandInput) {
+ // Start section: command_constructor
+ super();
+ // End section: command_constructor
+ }
+
+ resolveMiddleware(
+ clientStack: MiddlewareStack,
+ configuration: NetworkManagerClientResolvedConfig,
+ 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: CreateLinkCommandInput,
+ context: SerdeContext
+ ): Promise<__HttpRequest> {
+ return serializeAws_restJson1_1CreateLinkCommand(input, context);
+ }
+
+ private deserialize(
+ output: __HttpResponse,
+ context: SerdeContext
+ ): Promise {
+ return deserializeAws_restJson1_1CreateLinkCommand(output, context);
+ }
+
+ // Start section: command_body_extra
+ // End section: command_body_extra
+}
diff --git a/clients/client-networkmanager/commands/CreateSiteCommand.ts b/clients/client-networkmanager/commands/CreateSiteCommand.ts
new file mode 100644
index 000000000000..8da8d7f4531d
--- /dev/null
+++ b/clients/client-networkmanager/commands/CreateSiteCommand.ts
@@ -0,0 +1,81 @@
+import {
+ NetworkManagerClientResolvedConfig,
+ ServiceInputTypes,
+ ServiceOutputTypes
+} from "../NetworkManagerClient";
+import { CreateSiteRequest, CreateSiteResponse } from "../models/index";
+import {
+ deserializeAws_restJson1_1CreateSiteCommand,
+ serializeAws_restJson1_1CreateSiteCommand
+} from "../protocols/Aws_restJson1_1";
+import { getSerdePlugin } from "@aws-sdk/middleware-serde";
+import {
+ HttpRequest as __HttpRequest,
+ HttpResponse as __HttpResponse
+} from "@aws-sdk/protocol-http";
+import { Command as $Command } from "@aws-sdk/smithy-client";
+import {
+ FinalizeHandlerArguments,
+ Handler,
+ HandlerExecutionContext,
+ MiddlewareStack,
+ SerdeContext,
+ HttpHandlerOptions as __HttpHandlerOptions
+} from "@aws-sdk/types";
+
+export type CreateSiteCommandInput = CreateSiteRequest;
+export type CreateSiteCommandOutput = CreateSiteResponse;
+
+export class CreateSiteCommand extends $Command<
+ CreateSiteCommandInput,
+ CreateSiteCommandOutput,
+ NetworkManagerClientResolvedConfig
+> {
+ // Start section: command_properties
+ // End section: command_properties
+
+ constructor(readonly input: CreateSiteCommandInput) {
+ // Start section: command_constructor
+ super();
+ // End section: command_constructor
+ }
+
+ resolveMiddleware(
+ clientStack: MiddlewareStack,
+ configuration: NetworkManagerClientResolvedConfig,
+ 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: CreateSiteCommandInput,
+ context: SerdeContext
+ ): Promise<__HttpRequest> {
+ return serializeAws_restJson1_1CreateSiteCommand(input, context);
+ }
+
+ private deserialize(
+ output: __HttpResponse,
+ context: SerdeContext
+ ): Promise {
+ return deserializeAws_restJson1_1CreateSiteCommand(output, context);
+ }
+
+ // Start section: command_body_extra
+ // End section: command_body_extra
+}
diff --git a/clients/client-networkmanager/commands/DeleteDeviceCommand.ts b/clients/client-networkmanager/commands/DeleteDeviceCommand.ts
new file mode 100644
index 000000000000..7a6a9044ea2b
--- /dev/null
+++ b/clients/client-networkmanager/commands/DeleteDeviceCommand.ts
@@ -0,0 +1,81 @@
+import {
+ NetworkManagerClientResolvedConfig,
+ ServiceInputTypes,
+ ServiceOutputTypes
+} from "../NetworkManagerClient";
+import { DeleteDeviceRequest, DeleteDeviceResponse } from "../models/index";
+import {
+ deserializeAws_restJson1_1DeleteDeviceCommand,
+ serializeAws_restJson1_1DeleteDeviceCommand
+} from "../protocols/Aws_restJson1_1";
+import { getSerdePlugin } from "@aws-sdk/middleware-serde";
+import {
+ HttpRequest as __HttpRequest,
+ HttpResponse as __HttpResponse
+} from "@aws-sdk/protocol-http";
+import { Command as $Command } from "@aws-sdk/smithy-client";
+import {
+ FinalizeHandlerArguments,
+ Handler,
+ HandlerExecutionContext,
+ MiddlewareStack,
+ SerdeContext,
+ HttpHandlerOptions as __HttpHandlerOptions
+} from "@aws-sdk/types";
+
+export type DeleteDeviceCommandInput = DeleteDeviceRequest;
+export type DeleteDeviceCommandOutput = DeleteDeviceResponse;
+
+export class DeleteDeviceCommand extends $Command<
+ DeleteDeviceCommandInput,
+ DeleteDeviceCommandOutput,
+ NetworkManagerClientResolvedConfig
+> {
+ // Start section: command_properties
+ // End section: command_properties
+
+ constructor(readonly input: DeleteDeviceCommandInput) {
+ // Start section: command_constructor
+ super();
+ // End section: command_constructor
+ }
+
+ resolveMiddleware(
+ clientStack: MiddlewareStack,
+ configuration: NetworkManagerClientResolvedConfig,
+ 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: DeleteDeviceCommandInput,
+ context: SerdeContext
+ ): Promise<__HttpRequest> {
+ return serializeAws_restJson1_1DeleteDeviceCommand(input, context);
+ }
+
+ private deserialize(
+ output: __HttpResponse,
+ context: SerdeContext
+ ): Promise {
+ return deserializeAws_restJson1_1DeleteDeviceCommand(output, context);
+ }
+
+ // Start section: command_body_extra
+ // End section: command_body_extra
+}
diff --git a/clients/client-networkmanager/commands/DeleteGlobalNetworkCommand.ts b/clients/client-networkmanager/commands/DeleteGlobalNetworkCommand.ts
new file mode 100644
index 000000000000..228517539af4
--- /dev/null
+++ b/clients/client-networkmanager/commands/DeleteGlobalNetworkCommand.ts
@@ -0,0 +1,90 @@
+import {
+ NetworkManagerClientResolvedConfig,
+ ServiceInputTypes,
+ ServiceOutputTypes
+} from "../NetworkManagerClient";
+import {
+ DeleteGlobalNetworkRequest,
+ DeleteGlobalNetworkResponse
+} from "../models/index";
+import {
+ deserializeAws_restJson1_1DeleteGlobalNetworkCommand,
+ serializeAws_restJson1_1DeleteGlobalNetworkCommand
+} from "../protocols/Aws_restJson1_1";
+import { getSerdePlugin } from "@aws-sdk/middleware-serde";
+import {
+ HttpRequest as __HttpRequest,
+ HttpResponse as __HttpResponse
+} from "@aws-sdk/protocol-http";
+import { Command as $Command } from "@aws-sdk/smithy-client";
+import {
+ FinalizeHandlerArguments,
+ Handler,
+ HandlerExecutionContext,
+ MiddlewareStack,
+ SerdeContext,
+ HttpHandlerOptions as __HttpHandlerOptions
+} from "@aws-sdk/types";
+
+export type DeleteGlobalNetworkCommandInput = DeleteGlobalNetworkRequest;
+export type DeleteGlobalNetworkCommandOutput = DeleteGlobalNetworkResponse;
+
+export class DeleteGlobalNetworkCommand extends $Command<
+ DeleteGlobalNetworkCommandInput,
+ DeleteGlobalNetworkCommandOutput,
+ NetworkManagerClientResolvedConfig
+> {
+ // Start section: command_properties
+ // End section: command_properties
+
+ constructor(readonly input: DeleteGlobalNetworkCommandInput) {
+ // Start section: command_constructor
+ super();
+ // End section: command_constructor
+ }
+
+ resolveMiddleware(
+ clientStack: MiddlewareStack,
+ configuration: NetworkManagerClientResolvedConfig,
+ options?: __HttpHandlerOptions
+ ): Handler<
+ DeleteGlobalNetworkCommandInput,
+ DeleteGlobalNetworkCommandOutput
+ > {
+ 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: DeleteGlobalNetworkCommandInput,
+ context: SerdeContext
+ ): Promise<__HttpRequest> {
+ return serializeAws_restJson1_1DeleteGlobalNetworkCommand(input, context);
+ }
+
+ private deserialize(
+ output: __HttpResponse,
+ context: SerdeContext
+ ): Promise {
+ return deserializeAws_restJson1_1DeleteGlobalNetworkCommand(
+ output,
+ context
+ );
+ }
+
+ // Start section: command_body_extra
+ // End section: command_body_extra
+}
diff --git a/clients/client-networkmanager/commands/DeleteLinkCommand.ts b/clients/client-networkmanager/commands/DeleteLinkCommand.ts
new file mode 100644
index 000000000000..6db06035589e
--- /dev/null
+++ b/clients/client-networkmanager/commands/DeleteLinkCommand.ts
@@ -0,0 +1,81 @@
+import {
+ NetworkManagerClientResolvedConfig,
+ ServiceInputTypes,
+ ServiceOutputTypes
+} from "../NetworkManagerClient";
+import { DeleteLinkRequest, DeleteLinkResponse } from "../models/index";
+import {
+ deserializeAws_restJson1_1DeleteLinkCommand,
+ serializeAws_restJson1_1DeleteLinkCommand
+} from "../protocols/Aws_restJson1_1";
+import { getSerdePlugin } from "@aws-sdk/middleware-serde";
+import {
+ HttpRequest as __HttpRequest,
+ HttpResponse as __HttpResponse
+} from "@aws-sdk/protocol-http";
+import { Command as $Command } from "@aws-sdk/smithy-client";
+import {
+ FinalizeHandlerArguments,
+ Handler,
+ HandlerExecutionContext,
+ MiddlewareStack,
+ SerdeContext,
+ HttpHandlerOptions as __HttpHandlerOptions
+} from "@aws-sdk/types";
+
+export type DeleteLinkCommandInput = DeleteLinkRequest;
+export type DeleteLinkCommandOutput = DeleteLinkResponse;
+
+export class DeleteLinkCommand extends $Command<
+ DeleteLinkCommandInput,
+ DeleteLinkCommandOutput,
+ NetworkManagerClientResolvedConfig
+> {
+ // Start section: command_properties
+ // End section: command_properties
+
+ constructor(readonly input: DeleteLinkCommandInput) {
+ // Start section: command_constructor
+ super();
+ // End section: command_constructor
+ }
+
+ resolveMiddleware(
+ clientStack: MiddlewareStack,
+ configuration: NetworkManagerClientResolvedConfig,
+ 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: DeleteLinkCommandInput,
+ context: SerdeContext
+ ): Promise<__HttpRequest> {
+ return serializeAws_restJson1_1DeleteLinkCommand(input, context);
+ }
+
+ private deserialize(
+ output: __HttpResponse,
+ context: SerdeContext
+ ): Promise {
+ return deserializeAws_restJson1_1DeleteLinkCommand(output, context);
+ }
+
+ // Start section: command_body_extra
+ // End section: command_body_extra
+}
diff --git a/clients/client-networkmanager/commands/DeleteSiteCommand.ts b/clients/client-networkmanager/commands/DeleteSiteCommand.ts
new file mode 100644
index 000000000000..5742a356d273
--- /dev/null
+++ b/clients/client-networkmanager/commands/DeleteSiteCommand.ts
@@ -0,0 +1,81 @@
+import {
+ NetworkManagerClientResolvedConfig,
+ ServiceInputTypes,
+ ServiceOutputTypes
+} from "../NetworkManagerClient";
+import { DeleteSiteRequest, DeleteSiteResponse } from "../models/index";
+import {
+ deserializeAws_restJson1_1DeleteSiteCommand,
+ serializeAws_restJson1_1DeleteSiteCommand
+} from "../protocols/Aws_restJson1_1";
+import { getSerdePlugin } from "@aws-sdk/middleware-serde";
+import {
+ HttpRequest as __HttpRequest,
+ HttpResponse as __HttpResponse
+} from "@aws-sdk/protocol-http";
+import { Command as $Command } from "@aws-sdk/smithy-client";
+import {
+ FinalizeHandlerArguments,
+ Handler,
+ HandlerExecutionContext,
+ MiddlewareStack,
+ SerdeContext,
+ HttpHandlerOptions as __HttpHandlerOptions
+} from "@aws-sdk/types";
+
+export type DeleteSiteCommandInput = DeleteSiteRequest;
+export type DeleteSiteCommandOutput = DeleteSiteResponse;
+
+export class DeleteSiteCommand extends $Command<
+ DeleteSiteCommandInput,
+ DeleteSiteCommandOutput,
+ NetworkManagerClientResolvedConfig
+> {
+ // Start section: command_properties
+ // End section: command_properties
+
+ constructor(readonly input: DeleteSiteCommandInput) {
+ // Start section: command_constructor
+ super();
+ // End section: command_constructor
+ }
+
+ resolveMiddleware(
+ clientStack: MiddlewareStack,
+ configuration: NetworkManagerClientResolvedConfig,
+ 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: DeleteSiteCommandInput,
+ context: SerdeContext
+ ): Promise<__HttpRequest> {
+ return serializeAws_restJson1_1DeleteSiteCommand(input, context);
+ }
+
+ private deserialize(
+ output: __HttpResponse,
+ context: SerdeContext
+ ): Promise {
+ return deserializeAws_restJson1_1DeleteSiteCommand(output, context);
+ }
+
+ // Start section: command_body_extra
+ // End section: command_body_extra
+}
diff --git a/clients/client-networkmanager/commands/DeregisterTransitGatewayCommand.ts b/clients/client-networkmanager/commands/DeregisterTransitGatewayCommand.ts
new file mode 100644
index 000000000000..6b53c642d132
--- /dev/null
+++ b/clients/client-networkmanager/commands/DeregisterTransitGatewayCommand.ts
@@ -0,0 +1,93 @@
+import {
+ NetworkManagerClientResolvedConfig,
+ ServiceInputTypes,
+ ServiceOutputTypes
+} from "../NetworkManagerClient";
+import {
+ DeregisterTransitGatewayRequest,
+ DeregisterTransitGatewayResponse
+} from "../models/index";
+import {
+ deserializeAws_restJson1_1DeregisterTransitGatewayCommand,
+ serializeAws_restJson1_1DeregisterTransitGatewayCommand
+} from "../protocols/Aws_restJson1_1";
+import { getSerdePlugin } from "@aws-sdk/middleware-serde";
+import {
+ HttpRequest as __HttpRequest,
+ HttpResponse as __HttpResponse
+} from "@aws-sdk/protocol-http";
+import { Command as $Command } from "@aws-sdk/smithy-client";
+import {
+ FinalizeHandlerArguments,
+ Handler,
+ HandlerExecutionContext,
+ MiddlewareStack,
+ SerdeContext,
+ HttpHandlerOptions as __HttpHandlerOptions
+} from "@aws-sdk/types";
+
+export type DeregisterTransitGatewayCommandInput = DeregisterTransitGatewayRequest;
+export type DeregisterTransitGatewayCommandOutput = DeregisterTransitGatewayResponse;
+
+export class DeregisterTransitGatewayCommand extends $Command<
+ DeregisterTransitGatewayCommandInput,
+ DeregisterTransitGatewayCommandOutput,
+ NetworkManagerClientResolvedConfig
+> {
+ // Start section: command_properties
+ // End section: command_properties
+
+ constructor(readonly input: DeregisterTransitGatewayCommandInput) {
+ // Start section: command_constructor
+ super();
+ // End section: command_constructor
+ }
+
+ resolveMiddleware(
+ clientStack: MiddlewareStack,
+ configuration: NetworkManagerClientResolvedConfig,
+ options?: __HttpHandlerOptions
+ ): Handler<
+ DeregisterTransitGatewayCommandInput,
+ DeregisterTransitGatewayCommandOutput
+ > {
+ 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: DeregisterTransitGatewayCommandInput,
+ context: SerdeContext
+ ): Promise<__HttpRequest> {
+ return serializeAws_restJson1_1DeregisterTransitGatewayCommand(
+ input,
+ context
+ );
+ }
+
+ private deserialize(
+ output: __HttpResponse,
+ context: SerdeContext
+ ): Promise {
+ return deserializeAws_restJson1_1DeregisterTransitGatewayCommand(
+ output,
+ context
+ );
+ }
+
+ // Start section: command_body_extra
+ // End section: command_body_extra
+}
diff --git a/clients/client-networkmanager/commands/DescribeGlobalNetworksCommand.ts b/clients/client-networkmanager/commands/DescribeGlobalNetworksCommand.ts
new file mode 100644
index 000000000000..3d6c039a7f95
--- /dev/null
+++ b/clients/client-networkmanager/commands/DescribeGlobalNetworksCommand.ts
@@ -0,0 +1,93 @@
+import {
+ NetworkManagerClientResolvedConfig,
+ ServiceInputTypes,
+ ServiceOutputTypes
+} from "../NetworkManagerClient";
+import {
+ DescribeGlobalNetworksRequest,
+ DescribeGlobalNetworksResponse
+} from "../models/index";
+import {
+ deserializeAws_restJson1_1DescribeGlobalNetworksCommand,
+ serializeAws_restJson1_1DescribeGlobalNetworksCommand
+} from "../protocols/Aws_restJson1_1";
+import { getSerdePlugin } from "@aws-sdk/middleware-serde";
+import {
+ HttpRequest as __HttpRequest,
+ HttpResponse as __HttpResponse
+} from "@aws-sdk/protocol-http";
+import { Command as $Command } from "@aws-sdk/smithy-client";
+import {
+ FinalizeHandlerArguments,
+ Handler,
+ HandlerExecutionContext,
+ MiddlewareStack,
+ SerdeContext,
+ HttpHandlerOptions as __HttpHandlerOptions
+} from "@aws-sdk/types";
+
+export type DescribeGlobalNetworksCommandInput = DescribeGlobalNetworksRequest;
+export type DescribeGlobalNetworksCommandOutput = DescribeGlobalNetworksResponse;
+
+export class DescribeGlobalNetworksCommand extends $Command<
+ DescribeGlobalNetworksCommandInput,
+ DescribeGlobalNetworksCommandOutput,
+ NetworkManagerClientResolvedConfig
+> {
+ // Start section: command_properties
+ // End section: command_properties
+
+ constructor(readonly input: DescribeGlobalNetworksCommandInput) {
+ // Start section: command_constructor
+ super();
+ // End section: command_constructor
+ }
+
+ resolveMiddleware(
+ clientStack: MiddlewareStack,
+ configuration: NetworkManagerClientResolvedConfig,
+ options?: __HttpHandlerOptions
+ ): Handler<
+ DescribeGlobalNetworksCommandInput,
+ DescribeGlobalNetworksCommandOutput
+ > {
+ 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: DescribeGlobalNetworksCommandInput,
+ context: SerdeContext
+ ): Promise<__HttpRequest> {
+ return serializeAws_restJson1_1DescribeGlobalNetworksCommand(
+ input,
+ context
+ );
+ }
+
+ private deserialize(
+ output: __HttpResponse,
+ context: SerdeContext
+ ): Promise {
+ return deserializeAws_restJson1_1DescribeGlobalNetworksCommand(
+ output,
+ context
+ );
+ }
+
+ // Start section: command_body_extra
+ // End section: command_body_extra
+}
diff --git a/clients/client-networkmanager/commands/DisassociateCustomerGatewayCommand.ts b/clients/client-networkmanager/commands/DisassociateCustomerGatewayCommand.ts
new file mode 100644
index 000000000000..dd5ce4ffb55d
--- /dev/null
+++ b/clients/client-networkmanager/commands/DisassociateCustomerGatewayCommand.ts
@@ -0,0 +1,93 @@
+import {
+ NetworkManagerClientResolvedConfig,
+ ServiceInputTypes,
+ ServiceOutputTypes
+} from "../NetworkManagerClient";
+import {
+ DisassociateCustomerGatewayRequest,
+ DisassociateCustomerGatewayResponse
+} from "../models/index";
+import {
+ deserializeAws_restJson1_1DisassociateCustomerGatewayCommand,
+ serializeAws_restJson1_1DisassociateCustomerGatewayCommand
+} from "../protocols/Aws_restJson1_1";
+import { getSerdePlugin } from "@aws-sdk/middleware-serde";
+import {
+ HttpRequest as __HttpRequest,
+ HttpResponse as __HttpResponse
+} from "@aws-sdk/protocol-http";
+import { Command as $Command } from "@aws-sdk/smithy-client";
+import {
+ FinalizeHandlerArguments,
+ Handler,
+ HandlerExecutionContext,
+ MiddlewareStack,
+ SerdeContext,
+ HttpHandlerOptions as __HttpHandlerOptions
+} from "@aws-sdk/types";
+
+export type DisassociateCustomerGatewayCommandInput = DisassociateCustomerGatewayRequest;
+export type DisassociateCustomerGatewayCommandOutput = DisassociateCustomerGatewayResponse;
+
+export class DisassociateCustomerGatewayCommand extends $Command<
+ DisassociateCustomerGatewayCommandInput,
+ DisassociateCustomerGatewayCommandOutput,
+ NetworkManagerClientResolvedConfig
+> {
+ // Start section: command_properties
+ // End section: command_properties
+
+ constructor(readonly input: DisassociateCustomerGatewayCommandInput) {
+ // Start section: command_constructor
+ super();
+ // End section: command_constructor
+ }
+
+ resolveMiddleware(
+ clientStack: MiddlewareStack,
+ configuration: NetworkManagerClientResolvedConfig,
+ options?: __HttpHandlerOptions
+ ): Handler<
+ DisassociateCustomerGatewayCommandInput,
+ DisassociateCustomerGatewayCommandOutput
+ > {
+ 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: DisassociateCustomerGatewayCommandInput,
+ context: SerdeContext
+ ): Promise<__HttpRequest> {
+ return serializeAws_restJson1_1DisassociateCustomerGatewayCommand(
+ input,
+ context
+ );
+ }
+
+ private deserialize(
+ output: __HttpResponse,
+ context: SerdeContext
+ ): Promise {
+ return deserializeAws_restJson1_1DisassociateCustomerGatewayCommand(
+ output,
+ context
+ );
+ }
+
+ // Start section: command_body_extra
+ // End section: command_body_extra
+}
diff --git a/clients/client-networkmanager/commands/DisassociateLinkCommand.ts b/clients/client-networkmanager/commands/DisassociateLinkCommand.ts
new file mode 100644
index 000000000000..9bb6704124c3
--- /dev/null
+++ b/clients/client-networkmanager/commands/DisassociateLinkCommand.ts
@@ -0,0 +1,84 @@
+import {
+ NetworkManagerClientResolvedConfig,
+ ServiceInputTypes,
+ ServiceOutputTypes
+} from "../NetworkManagerClient";
+import {
+ DisassociateLinkRequest,
+ DisassociateLinkResponse
+} from "../models/index";
+import {
+ deserializeAws_restJson1_1DisassociateLinkCommand,
+ serializeAws_restJson1_1DisassociateLinkCommand
+} from "../protocols/Aws_restJson1_1";
+import { getSerdePlugin } from "@aws-sdk/middleware-serde";
+import {
+ HttpRequest as __HttpRequest,
+ HttpResponse as __HttpResponse
+} from "@aws-sdk/protocol-http";
+import { Command as $Command } from "@aws-sdk/smithy-client";
+import {
+ FinalizeHandlerArguments,
+ Handler,
+ HandlerExecutionContext,
+ MiddlewareStack,
+ SerdeContext,
+ HttpHandlerOptions as __HttpHandlerOptions
+} from "@aws-sdk/types";
+
+export type DisassociateLinkCommandInput = DisassociateLinkRequest;
+export type DisassociateLinkCommandOutput = DisassociateLinkResponse;
+
+export class DisassociateLinkCommand extends $Command<
+ DisassociateLinkCommandInput,
+ DisassociateLinkCommandOutput,
+ NetworkManagerClientResolvedConfig
+> {
+ // Start section: command_properties
+ // End section: command_properties
+
+ constructor(readonly input: DisassociateLinkCommandInput) {
+ // Start section: command_constructor
+ super();
+ // End section: command_constructor
+ }
+
+ resolveMiddleware(
+ clientStack: MiddlewareStack,
+ configuration: NetworkManagerClientResolvedConfig,
+ 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: DisassociateLinkCommandInput,
+ context: SerdeContext
+ ): Promise<__HttpRequest> {
+ return serializeAws_restJson1_1DisassociateLinkCommand(input, context);
+ }
+
+ private deserialize(
+ output: __HttpResponse,
+ context: SerdeContext
+ ): Promise {
+ return deserializeAws_restJson1_1DisassociateLinkCommand(output, context);
+ }
+
+ // Start section: command_body_extra
+ // End section: command_body_extra
+}
diff --git a/clients/client-networkmanager/commands/GetCustomerGatewayAssociationsCommand.ts b/clients/client-networkmanager/commands/GetCustomerGatewayAssociationsCommand.ts
new file mode 100644
index 000000000000..503457b31396
--- /dev/null
+++ b/clients/client-networkmanager/commands/GetCustomerGatewayAssociationsCommand.ts
@@ -0,0 +1,93 @@
+import {
+ NetworkManagerClientResolvedConfig,
+ ServiceInputTypes,
+ ServiceOutputTypes
+} from "../NetworkManagerClient";
+import {
+ GetCustomerGatewayAssociationsRequest,
+ GetCustomerGatewayAssociationsResponse
+} from "../models/index";
+import {
+ deserializeAws_restJson1_1GetCustomerGatewayAssociationsCommand,
+ serializeAws_restJson1_1GetCustomerGatewayAssociationsCommand
+} from "../protocols/Aws_restJson1_1";
+import { getSerdePlugin } from "@aws-sdk/middleware-serde";
+import {
+ HttpRequest as __HttpRequest,
+ HttpResponse as __HttpResponse
+} from "@aws-sdk/protocol-http";
+import { Command as $Command } from "@aws-sdk/smithy-client";
+import {
+ FinalizeHandlerArguments,
+ Handler,
+ HandlerExecutionContext,
+ MiddlewareStack,
+ SerdeContext,
+ HttpHandlerOptions as __HttpHandlerOptions
+} from "@aws-sdk/types";
+
+export type GetCustomerGatewayAssociationsCommandInput = GetCustomerGatewayAssociationsRequest;
+export type GetCustomerGatewayAssociationsCommandOutput = GetCustomerGatewayAssociationsResponse;
+
+export class GetCustomerGatewayAssociationsCommand extends $Command<
+ GetCustomerGatewayAssociationsCommandInput,
+ GetCustomerGatewayAssociationsCommandOutput,
+ NetworkManagerClientResolvedConfig
+> {
+ // Start section: command_properties
+ // End section: command_properties
+
+ constructor(readonly input: GetCustomerGatewayAssociationsCommandInput) {
+ // Start section: command_constructor
+ super();
+ // End section: command_constructor
+ }
+
+ resolveMiddleware(
+ clientStack: MiddlewareStack,
+ configuration: NetworkManagerClientResolvedConfig,
+ options?: __HttpHandlerOptions
+ ): Handler<
+ GetCustomerGatewayAssociationsCommandInput,
+ GetCustomerGatewayAssociationsCommandOutput
+ > {
+ 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: GetCustomerGatewayAssociationsCommandInput,
+ context: SerdeContext
+ ): Promise<__HttpRequest> {
+ return serializeAws_restJson1_1GetCustomerGatewayAssociationsCommand(
+ input,
+ context
+ );
+ }
+
+ private deserialize(
+ output: __HttpResponse,
+ context: SerdeContext
+ ): Promise {
+ return deserializeAws_restJson1_1GetCustomerGatewayAssociationsCommand(
+ output,
+ context
+ );
+ }
+
+ // Start section: command_body_extra
+ // End section: command_body_extra
+}
diff --git a/clients/client-networkmanager/commands/GetDevicesCommand.ts b/clients/client-networkmanager/commands/GetDevicesCommand.ts
new file mode 100644
index 000000000000..0f7ca810501f
--- /dev/null
+++ b/clients/client-networkmanager/commands/GetDevicesCommand.ts
@@ -0,0 +1,81 @@
+import {
+ NetworkManagerClientResolvedConfig,
+ ServiceInputTypes,
+ ServiceOutputTypes
+} from "../NetworkManagerClient";
+import { GetDevicesRequest, GetDevicesResponse } from "../models/index";
+import {
+ deserializeAws_restJson1_1GetDevicesCommand,
+ serializeAws_restJson1_1GetDevicesCommand
+} from "../protocols/Aws_restJson1_1";
+import { getSerdePlugin } from "@aws-sdk/middleware-serde";
+import {
+ HttpRequest as __HttpRequest,
+ HttpResponse as __HttpResponse
+} from "@aws-sdk/protocol-http";
+import { Command as $Command } from "@aws-sdk/smithy-client";
+import {
+ FinalizeHandlerArguments,
+ Handler,
+ HandlerExecutionContext,
+ MiddlewareStack,
+ SerdeContext,
+ HttpHandlerOptions as __HttpHandlerOptions
+} from "@aws-sdk/types";
+
+export type GetDevicesCommandInput = GetDevicesRequest;
+export type GetDevicesCommandOutput = GetDevicesResponse;
+
+export class GetDevicesCommand extends $Command<
+ GetDevicesCommandInput,
+ GetDevicesCommandOutput,
+ NetworkManagerClientResolvedConfig
+> {
+ // Start section: command_properties
+ // End section: command_properties
+
+ constructor(readonly input: GetDevicesCommandInput) {
+ // Start section: command_constructor
+ super();
+ // End section: command_constructor
+ }
+
+ resolveMiddleware(
+ clientStack: MiddlewareStack,
+ configuration: NetworkManagerClientResolvedConfig,
+ 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: GetDevicesCommandInput,
+ context: SerdeContext
+ ): Promise<__HttpRequest> {
+ return serializeAws_restJson1_1GetDevicesCommand(input, context);
+ }
+
+ private deserialize(
+ output: __HttpResponse,
+ context: SerdeContext
+ ): Promise {
+ return deserializeAws_restJson1_1GetDevicesCommand(output, context);
+ }
+
+ // Start section: command_body_extra
+ // End section: command_body_extra
+}
diff --git a/clients/client-networkmanager/commands/GetLinkAssociationsCommand.ts b/clients/client-networkmanager/commands/GetLinkAssociationsCommand.ts
new file mode 100644
index 000000000000..491c1e6da825
--- /dev/null
+++ b/clients/client-networkmanager/commands/GetLinkAssociationsCommand.ts
@@ -0,0 +1,90 @@
+import {
+ NetworkManagerClientResolvedConfig,
+ ServiceInputTypes,
+ ServiceOutputTypes
+} from "../NetworkManagerClient";
+import {
+ GetLinkAssociationsRequest,
+ GetLinkAssociationsResponse
+} from "../models/index";
+import {
+ deserializeAws_restJson1_1GetLinkAssociationsCommand,
+ serializeAws_restJson1_1GetLinkAssociationsCommand
+} from "../protocols/Aws_restJson1_1";
+import { getSerdePlugin } from "@aws-sdk/middleware-serde";
+import {
+ HttpRequest as __HttpRequest,
+ HttpResponse as __HttpResponse
+} from "@aws-sdk/protocol-http";
+import { Command as $Command } from "@aws-sdk/smithy-client";
+import {
+ FinalizeHandlerArguments,
+ Handler,
+ HandlerExecutionContext,
+ MiddlewareStack,
+ SerdeContext,
+ HttpHandlerOptions as __HttpHandlerOptions
+} from "@aws-sdk/types";
+
+export type GetLinkAssociationsCommandInput = GetLinkAssociationsRequest;
+export type GetLinkAssociationsCommandOutput = GetLinkAssociationsResponse;
+
+export class GetLinkAssociationsCommand extends $Command<
+ GetLinkAssociationsCommandInput,
+ GetLinkAssociationsCommandOutput,
+ NetworkManagerClientResolvedConfig
+> {
+ // Start section: command_properties
+ // End section: command_properties
+
+ constructor(readonly input: GetLinkAssociationsCommandInput) {
+ // Start section: command_constructor
+ super();
+ // End section: command_constructor
+ }
+
+ resolveMiddleware(
+ clientStack: MiddlewareStack,
+ configuration: NetworkManagerClientResolvedConfig,
+ options?: __HttpHandlerOptions
+ ): Handler<
+ GetLinkAssociationsCommandInput,
+ GetLinkAssociationsCommandOutput
+ > {
+ 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: GetLinkAssociationsCommandInput,
+ context: SerdeContext
+ ): Promise<__HttpRequest> {
+ return serializeAws_restJson1_1GetLinkAssociationsCommand(input, context);
+ }
+
+ private deserialize(
+ output: __HttpResponse,
+ context: SerdeContext
+ ): Promise {
+ return deserializeAws_restJson1_1GetLinkAssociationsCommand(
+ output,
+ context
+ );
+ }
+
+ // Start section: command_body_extra
+ // End section: command_body_extra
+}
diff --git a/clients/client-networkmanager/commands/GetLinksCommand.ts b/clients/client-networkmanager/commands/GetLinksCommand.ts
new file mode 100644
index 000000000000..b098be4e8303
--- /dev/null
+++ b/clients/client-networkmanager/commands/GetLinksCommand.ts
@@ -0,0 +1,81 @@
+import {
+ NetworkManagerClientResolvedConfig,
+ ServiceInputTypes,
+ ServiceOutputTypes
+} from "../NetworkManagerClient";
+import { GetLinksRequest, GetLinksResponse } from "../models/index";
+import {
+ deserializeAws_restJson1_1GetLinksCommand,
+ serializeAws_restJson1_1GetLinksCommand
+} from "../protocols/Aws_restJson1_1";
+import { getSerdePlugin } from "@aws-sdk/middleware-serde";
+import {
+ HttpRequest as __HttpRequest,
+ HttpResponse as __HttpResponse
+} from "@aws-sdk/protocol-http";
+import { Command as $Command } from "@aws-sdk/smithy-client";
+import {
+ FinalizeHandlerArguments,
+ Handler,
+ HandlerExecutionContext,
+ MiddlewareStack,
+ SerdeContext,
+ HttpHandlerOptions as __HttpHandlerOptions
+} from "@aws-sdk/types";
+
+export type GetLinksCommandInput = GetLinksRequest;
+export type GetLinksCommandOutput = GetLinksResponse;
+
+export class GetLinksCommand extends $Command<
+ GetLinksCommandInput,
+ GetLinksCommandOutput,
+ NetworkManagerClientResolvedConfig
+> {
+ // Start section: command_properties
+ // End section: command_properties
+
+ constructor(readonly input: GetLinksCommandInput) {
+ // Start section: command_constructor
+ super();
+ // End section: command_constructor
+ }
+
+ resolveMiddleware(
+ clientStack: MiddlewareStack,
+ configuration: NetworkManagerClientResolvedConfig,
+ 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: GetLinksCommandInput,
+ context: SerdeContext
+ ): Promise<__HttpRequest> {
+ return serializeAws_restJson1_1GetLinksCommand(input, context);
+ }
+
+ private deserialize(
+ output: __HttpResponse,
+ context: SerdeContext
+ ): Promise {
+ return deserializeAws_restJson1_1GetLinksCommand(output, context);
+ }
+
+ // Start section: command_body_extra
+ // End section: command_body_extra
+}
diff --git a/clients/client-networkmanager/commands/GetSitesCommand.ts b/clients/client-networkmanager/commands/GetSitesCommand.ts
new file mode 100644
index 000000000000..894d42c6de2b
--- /dev/null
+++ b/clients/client-networkmanager/commands/GetSitesCommand.ts
@@ -0,0 +1,81 @@
+import {
+ NetworkManagerClientResolvedConfig,
+ ServiceInputTypes,
+ ServiceOutputTypes
+} from "../NetworkManagerClient";
+import { GetSitesRequest, GetSitesResponse } from "../models/index";
+import {
+ deserializeAws_restJson1_1GetSitesCommand,
+ serializeAws_restJson1_1GetSitesCommand
+} from "../protocols/Aws_restJson1_1";
+import { getSerdePlugin } from "@aws-sdk/middleware-serde";
+import {
+ HttpRequest as __HttpRequest,
+ HttpResponse as __HttpResponse
+} from "@aws-sdk/protocol-http";
+import { Command as $Command } from "@aws-sdk/smithy-client";
+import {
+ FinalizeHandlerArguments,
+ Handler,
+ HandlerExecutionContext,
+ MiddlewareStack,
+ SerdeContext,
+ HttpHandlerOptions as __HttpHandlerOptions
+} from "@aws-sdk/types";
+
+export type GetSitesCommandInput = GetSitesRequest;
+export type GetSitesCommandOutput = GetSitesResponse;
+
+export class GetSitesCommand extends $Command<
+ GetSitesCommandInput,
+ GetSitesCommandOutput,
+ NetworkManagerClientResolvedConfig
+> {
+ // Start section: command_properties
+ // End section: command_properties
+
+ constructor(readonly input: GetSitesCommandInput) {
+ // Start section: command_constructor
+ super();
+ // End section: command_constructor
+ }
+
+ resolveMiddleware(
+ clientStack: MiddlewareStack,
+ configuration: NetworkManagerClientResolvedConfig,
+ 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: GetSitesCommandInput,
+ context: SerdeContext
+ ): Promise<__HttpRequest> {
+ return serializeAws_restJson1_1GetSitesCommand(input, context);
+ }
+
+ private deserialize(
+ output: __HttpResponse,
+ context: SerdeContext
+ ): Promise {
+ return deserializeAws_restJson1_1GetSitesCommand(output, context);
+ }
+
+ // Start section: command_body_extra
+ // End section: command_body_extra
+}
diff --git a/clients/client-networkmanager/commands/GetTransitGatewayRegistrationsCommand.ts b/clients/client-networkmanager/commands/GetTransitGatewayRegistrationsCommand.ts
new file mode 100644
index 000000000000..9ec3ea3d376a
--- /dev/null
+++ b/clients/client-networkmanager/commands/GetTransitGatewayRegistrationsCommand.ts
@@ -0,0 +1,93 @@
+import {
+ NetworkManagerClientResolvedConfig,
+ ServiceInputTypes,
+ ServiceOutputTypes
+} from "../NetworkManagerClient";
+import {
+ GetTransitGatewayRegistrationsRequest,
+ GetTransitGatewayRegistrationsResponse
+} from "../models/index";
+import {
+ deserializeAws_restJson1_1GetTransitGatewayRegistrationsCommand,
+ serializeAws_restJson1_1GetTransitGatewayRegistrationsCommand
+} from "../protocols/Aws_restJson1_1";
+import { getSerdePlugin } from "@aws-sdk/middleware-serde";
+import {
+ HttpRequest as __HttpRequest,
+ HttpResponse as __HttpResponse
+} from "@aws-sdk/protocol-http";
+import { Command as $Command } from "@aws-sdk/smithy-client";
+import {
+ FinalizeHandlerArguments,
+ Handler,
+ HandlerExecutionContext,
+ MiddlewareStack,
+ SerdeContext,
+ HttpHandlerOptions as __HttpHandlerOptions
+} from "@aws-sdk/types";
+
+export type GetTransitGatewayRegistrationsCommandInput = GetTransitGatewayRegistrationsRequest;
+export type GetTransitGatewayRegistrationsCommandOutput = GetTransitGatewayRegistrationsResponse;
+
+export class GetTransitGatewayRegistrationsCommand extends $Command<
+ GetTransitGatewayRegistrationsCommandInput,
+ GetTransitGatewayRegistrationsCommandOutput,
+ NetworkManagerClientResolvedConfig
+> {
+ // Start section: command_properties
+ // End section: command_properties
+
+ constructor(readonly input: GetTransitGatewayRegistrationsCommandInput) {
+ // Start section: command_constructor
+ super();
+ // End section: command_constructor
+ }
+
+ resolveMiddleware(
+ clientStack: MiddlewareStack,
+ configuration: NetworkManagerClientResolvedConfig,
+ options?: __HttpHandlerOptions
+ ): Handler<
+ GetTransitGatewayRegistrationsCommandInput,
+ GetTransitGatewayRegistrationsCommandOutput
+ > {
+ 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: GetTransitGatewayRegistrationsCommandInput,
+ context: SerdeContext
+ ): Promise<__HttpRequest> {
+ return serializeAws_restJson1_1GetTransitGatewayRegistrationsCommand(
+ input,
+ context
+ );
+ }
+
+ private deserialize(
+ output: __HttpResponse,
+ context: SerdeContext
+ ): Promise {
+ return deserializeAws_restJson1_1GetTransitGatewayRegistrationsCommand(
+ output,
+ context
+ );
+ }
+
+ // Start section: command_body_extra
+ // End section: command_body_extra
+}
diff --git a/clients/client-networkmanager/commands/ListTagsForResourceCommand.ts b/clients/client-networkmanager/commands/ListTagsForResourceCommand.ts
new file mode 100644
index 000000000000..7cc61fa85e61
--- /dev/null
+++ b/clients/client-networkmanager/commands/ListTagsForResourceCommand.ts
@@ -0,0 +1,90 @@
+import {
+ NetworkManagerClientResolvedConfig,
+ ServiceInputTypes,
+ ServiceOutputTypes
+} from "../NetworkManagerClient";
+import {
+ ListTagsForResourceRequest,
+ ListTagsForResourceResponse
+} from "../models/index";
+import {
+ deserializeAws_restJson1_1ListTagsForResourceCommand,
+ serializeAws_restJson1_1ListTagsForResourceCommand
+} from "../protocols/Aws_restJson1_1";
+import { getSerdePlugin } from "@aws-sdk/middleware-serde";
+import {
+ HttpRequest as __HttpRequest,
+ HttpResponse as __HttpResponse
+} from "@aws-sdk/protocol-http";
+import { Command as $Command } from "@aws-sdk/smithy-client";
+import {
+ FinalizeHandlerArguments,
+ Handler,
+ HandlerExecutionContext,
+ MiddlewareStack,
+ SerdeContext,
+ HttpHandlerOptions as __HttpHandlerOptions
+} from "@aws-sdk/types";
+
+export type ListTagsForResourceCommandInput = ListTagsForResourceRequest;
+export type ListTagsForResourceCommandOutput = ListTagsForResourceResponse;
+
+export class ListTagsForResourceCommand extends $Command<
+ ListTagsForResourceCommandInput,
+ ListTagsForResourceCommandOutput,
+ NetworkManagerClientResolvedConfig
+> {
+ // 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: NetworkManagerClientResolvedConfig,
+ 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_restJson1_1ListTagsForResourceCommand(input, context);
+ }
+
+ private deserialize(
+ output: __HttpResponse,
+ context: SerdeContext
+ ): Promise {
+ return deserializeAws_restJson1_1ListTagsForResourceCommand(
+ output,
+ context
+ );
+ }
+
+ // Start section: command_body_extra
+ // End section: command_body_extra
+}
diff --git a/clients/client-networkmanager/commands/RegisterTransitGatewayCommand.ts b/clients/client-networkmanager/commands/RegisterTransitGatewayCommand.ts
new file mode 100644
index 000000000000..99f17b538fab
--- /dev/null
+++ b/clients/client-networkmanager/commands/RegisterTransitGatewayCommand.ts
@@ -0,0 +1,93 @@
+import {
+ NetworkManagerClientResolvedConfig,
+ ServiceInputTypes,
+ ServiceOutputTypes
+} from "../NetworkManagerClient";
+import {
+ RegisterTransitGatewayRequest,
+ RegisterTransitGatewayResponse
+} from "../models/index";
+import {
+ deserializeAws_restJson1_1RegisterTransitGatewayCommand,
+ serializeAws_restJson1_1RegisterTransitGatewayCommand
+} from "../protocols/Aws_restJson1_1";
+import { getSerdePlugin } from "@aws-sdk/middleware-serde";
+import {
+ HttpRequest as __HttpRequest,
+ HttpResponse as __HttpResponse
+} from "@aws-sdk/protocol-http";
+import { Command as $Command } from "@aws-sdk/smithy-client";
+import {
+ FinalizeHandlerArguments,
+ Handler,
+ HandlerExecutionContext,
+ MiddlewareStack,
+ SerdeContext,
+ HttpHandlerOptions as __HttpHandlerOptions
+} from "@aws-sdk/types";
+
+export type RegisterTransitGatewayCommandInput = RegisterTransitGatewayRequest;
+export type RegisterTransitGatewayCommandOutput = RegisterTransitGatewayResponse;
+
+export class RegisterTransitGatewayCommand extends $Command<
+ RegisterTransitGatewayCommandInput,
+ RegisterTransitGatewayCommandOutput,
+ NetworkManagerClientResolvedConfig
+> {
+ // Start section: command_properties
+ // End section: command_properties
+
+ constructor(readonly input: RegisterTransitGatewayCommandInput) {
+ // Start section: command_constructor
+ super();
+ // End section: command_constructor
+ }
+
+ resolveMiddleware(
+ clientStack: MiddlewareStack,
+ configuration: NetworkManagerClientResolvedConfig,
+ options?: __HttpHandlerOptions
+ ): Handler<
+ RegisterTransitGatewayCommandInput,
+ RegisterTransitGatewayCommandOutput
+ > {
+ 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: RegisterTransitGatewayCommandInput,
+ context: SerdeContext
+ ): Promise<__HttpRequest> {
+ return serializeAws_restJson1_1RegisterTransitGatewayCommand(
+ input,
+ context
+ );
+ }
+
+ private deserialize(
+ output: __HttpResponse,
+ context: SerdeContext
+ ): Promise {
+ return deserializeAws_restJson1_1RegisterTransitGatewayCommand(
+ output,
+ context
+ );
+ }
+
+ // Start section: command_body_extra
+ // End section: command_body_extra
+}
diff --git a/clients/client-networkmanager/commands/TagResourceCommand.ts b/clients/client-networkmanager/commands/TagResourceCommand.ts
new file mode 100644
index 000000000000..61c3f296481c
--- /dev/null
+++ b/clients/client-networkmanager/commands/TagResourceCommand.ts
@@ -0,0 +1,81 @@
+import {
+ NetworkManagerClientResolvedConfig,
+ ServiceInputTypes,
+ ServiceOutputTypes
+} from "../NetworkManagerClient";
+import { TagResourceRequest, TagResourceResponse } from "../models/index";
+import {
+ deserializeAws_restJson1_1TagResourceCommand,
+ serializeAws_restJson1_1TagResourceCommand
+} from "../protocols/Aws_restJson1_1";
+import { getSerdePlugin } from "@aws-sdk/middleware-serde";
+import {
+ HttpRequest as __HttpRequest,
+ HttpResponse as __HttpResponse
+} from "@aws-sdk/protocol-http";
+import { Command as $Command } from "@aws-sdk/smithy-client";
+import {
+ FinalizeHandlerArguments,
+ Handler,
+ HandlerExecutionContext,
+ MiddlewareStack,
+ SerdeContext,
+ HttpHandlerOptions as __HttpHandlerOptions
+} from "@aws-sdk/types";
+
+export type TagResourceCommandInput = TagResourceRequest;
+export type TagResourceCommandOutput = TagResourceResponse;
+
+export class TagResourceCommand extends $Command<
+ TagResourceCommandInput,
+ TagResourceCommandOutput,
+ NetworkManagerClientResolvedConfig
+> {
+ // Start section: command_properties
+ // End section: command_properties
+
+ constructor(readonly input: TagResourceCommandInput) {
+ // Start section: command_constructor
+ super();
+ // End section: command_constructor
+ }
+
+ resolveMiddleware(
+ clientStack: MiddlewareStack,
+ configuration: NetworkManagerClientResolvedConfig,
+ options?: __HttpHandlerOptions
+ ): Handler {
+ this.middlewareStack.use(
+ getSerdePlugin(configuration, this.serialize, this.deserialize)
+ );
+
+ const stack = clientStack.concat(this.middlewareStack);
+
+ const handlerExecutionContext: HandlerExecutionContext = {
+ logger: {} as any
+ };
+ const { requestHandler } = configuration;
+ return stack.resolve(
+ (request: FinalizeHandlerArguments) =>
+ requestHandler.handle(request.request as __HttpRequest, options || {}),
+ handlerExecutionContext
+ );
+ }
+
+ private serialize(
+ input: TagResourceCommandInput,
+ context: SerdeContext
+ ): Promise<__HttpRequest> {
+ return serializeAws_restJson1_1TagResourceCommand(input, context);
+ }
+
+ private deserialize(
+ output: __HttpResponse,
+ context: SerdeContext
+ ): Promise {
+ return deserializeAws_restJson1_1TagResourceCommand(output, context);
+ }
+
+ // Start section: command_body_extra
+ // End section: command_body_extra
+}
diff --git a/clients/client-networkmanager/commands/UntagResourceCommand.ts b/clients/client-networkmanager/commands/UntagResourceCommand.ts
new file mode 100644
index 000000000000..d6736269993c
--- /dev/null
+++ b/clients/client-networkmanager/commands/UntagResourceCommand.ts
@@ -0,0 +1,81 @@
+import {
+ NetworkManagerClientResolvedConfig,
+ ServiceInputTypes,
+ ServiceOutputTypes
+} from "../NetworkManagerClient";
+import { UntagResourceRequest, UntagResourceResponse } from "../models/index";
+import {
+ deserializeAws_restJson1_1UntagResourceCommand,
+ serializeAws_restJson1_1UntagResourceCommand
+} from "../protocols/Aws_restJson1_1";
+import { getSerdePlugin } from "@aws-sdk/middleware-serde";
+import {
+ HttpRequest as __HttpRequest,
+ HttpResponse as __HttpResponse
+} from "@aws-sdk/protocol-http";
+import { Command as $Command } from "@aws-sdk/smithy-client";
+import {
+ FinalizeHandlerArguments,
+ Handler,
+ HandlerExecutionContext,
+ MiddlewareStack,
+ SerdeContext,
+ HttpHandlerOptions as __HttpHandlerOptions
+} from "@aws-sdk/types";
+
+export type UntagResourceCommandInput = UntagResourceRequest;
+export type UntagResourceCommandOutput = UntagResourceResponse;
+
+export class UntagResourceCommand extends $Command<
+ UntagResourceCommandInput,
+ UntagResourceCommandOutput,
+ NetworkManagerClientResolvedConfig
+> {
+ // Start section: command_properties
+ // End section: command_properties
+
+ constructor(readonly input: UntagResourceCommandInput) {
+ // Start section: command_constructor
+ super();
+ // End section: command_constructor
+ }
+
+ resolveMiddleware(
+ clientStack: MiddlewareStack,
+ configuration: NetworkManagerClientResolvedConfig,
+ options?: __HttpHandlerOptions
+ ): Handler {
+ this.middlewareStack.use(
+ getSerdePlugin(configuration, this.serialize, this.deserialize)
+ );
+
+ const stack = clientStack.concat(this.middlewareStack);
+
+ const handlerExecutionContext: HandlerExecutionContext = {
+ logger: {} as any
+ };
+ const { requestHandler } = configuration;
+ return stack.resolve(
+ (request: FinalizeHandlerArguments) =>
+ requestHandler.handle(request.request as __HttpRequest, options || {}),
+ handlerExecutionContext
+ );
+ }
+
+ private serialize(
+ input: UntagResourceCommandInput,
+ context: SerdeContext
+ ): Promise<__HttpRequest> {
+ return serializeAws_restJson1_1UntagResourceCommand(input, context);
+ }
+
+ private deserialize(
+ output: __HttpResponse,
+ context: SerdeContext
+ ): Promise {
+ return deserializeAws_restJson1_1UntagResourceCommand(output, context);
+ }
+
+ // Start section: command_body_extra
+ // End section: command_body_extra
+}
diff --git a/clients/client-networkmanager/commands/UpdateDeviceCommand.ts b/clients/client-networkmanager/commands/UpdateDeviceCommand.ts
new file mode 100644
index 000000000000..387e52efebd3
--- /dev/null
+++ b/clients/client-networkmanager/commands/UpdateDeviceCommand.ts
@@ -0,0 +1,81 @@
+import {
+ NetworkManagerClientResolvedConfig,
+ ServiceInputTypes,
+ ServiceOutputTypes
+} from "../NetworkManagerClient";
+import { UpdateDeviceRequest, UpdateDeviceResponse } from "../models/index";
+import {
+ deserializeAws_restJson1_1UpdateDeviceCommand,
+ serializeAws_restJson1_1UpdateDeviceCommand
+} from "../protocols/Aws_restJson1_1";
+import { getSerdePlugin } from "@aws-sdk/middleware-serde";
+import {
+ HttpRequest as __HttpRequest,
+ HttpResponse as __HttpResponse
+} from "@aws-sdk/protocol-http";
+import { Command as $Command } from "@aws-sdk/smithy-client";
+import {
+ FinalizeHandlerArguments,
+ Handler,
+ HandlerExecutionContext,
+ MiddlewareStack,
+ SerdeContext,
+ HttpHandlerOptions as __HttpHandlerOptions
+} from "@aws-sdk/types";
+
+export type UpdateDeviceCommandInput = UpdateDeviceRequest;
+export type UpdateDeviceCommandOutput = UpdateDeviceResponse;
+
+export class UpdateDeviceCommand extends $Command<
+ UpdateDeviceCommandInput,
+ UpdateDeviceCommandOutput,
+ NetworkManagerClientResolvedConfig
+> {
+ // Start section: command_properties
+ // End section: command_properties
+
+ constructor(readonly input: UpdateDeviceCommandInput) {
+ // Start section: command_constructor
+ super();
+ // End section: command_constructor
+ }
+
+ resolveMiddleware(
+ clientStack: MiddlewareStack,
+ configuration: NetworkManagerClientResolvedConfig,
+ 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: UpdateDeviceCommandInput,
+ context: SerdeContext
+ ): Promise<__HttpRequest> {
+ return serializeAws_restJson1_1UpdateDeviceCommand(input, context);
+ }
+
+ private deserialize(
+ output: __HttpResponse,
+ context: SerdeContext
+ ): Promise {
+ return deserializeAws_restJson1_1UpdateDeviceCommand(output, context);
+ }
+
+ // Start section: command_body_extra
+ // End section: command_body_extra
+}
diff --git a/clients/client-networkmanager/commands/UpdateGlobalNetworkCommand.ts b/clients/client-networkmanager/commands/UpdateGlobalNetworkCommand.ts
new file mode 100644
index 000000000000..6acb51f2c902
--- /dev/null
+++ b/clients/client-networkmanager/commands/UpdateGlobalNetworkCommand.ts
@@ -0,0 +1,90 @@
+import {
+ NetworkManagerClientResolvedConfig,
+ ServiceInputTypes,
+ ServiceOutputTypes
+} from "../NetworkManagerClient";
+import {
+ UpdateGlobalNetworkRequest,
+ UpdateGlobalNetworkResponse
+} from "../models/index";
+import {
+ deserializeAws_restJson1_1UpdateGlobalNetworkCommand,
+ serializeAws_restJson1_1UpdateGlobalNetworkCommand
+} from "../protocols/Aws_restJson1_1";
+import { getSerdePlugin } from "@aws-sdk/middleware-serde";
+import {
+ HttpRequest as __HttpRequest,
+ HttpResponse as __HttpResponse
+} from "@aws-sdk/protocol-http";
+import { Command as $Command } from "@aws-sdk/smithy-client";
+import {
+ FinalizeHandlerArguments,
+ Handler,
+ HandlerExecutionContext,
+ MiddlewareStack,
+ SerdeContext,
+ HttpHandlerOptions as __HttpHandlerOptions
+} from "@aws-sdk/types";
+
+export type UpdateGlobalNetworkCommandInput = UpdateGlobalNetworkRequest;
+export type UpdateGlobalNetworkCommandOutput = UpdateGlobalNetworkResponse;
+
+export class UpdateGlobalNetworkCommand extends $Command<
+ UpdateGlobalNetworkCommandInput,
+ UpdateGlobalNetworkCommandOutput,
+ NetworkManagerClientResolvedConfig
+> {
+ // Start section: command_properties
+ // End section: command_properties
+
+ constructor(readonly input: UpdateGlobalNetworkCommandInput) {
+ // Start section: command_constructor
+ super();
+ // End section: command_constructor
+ }
+
+ resolveMiddleware(
+ clientStack: MiddlewareStack,
+ configuration: NetworkManagerClientResolvedConfig,
+ options?: __HttpHandlerOptions
+ ): Handler<
+ UpdateGlobalNetworkCommandInput,
+ UpdateGlobalNetworkCommandOutput
+ > {
+ 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: UpdateGlobalNetworkCommandInput,
+ context: SerdeContext
+ ): Promise<__HttpRequest> {
+ return serializeAws_restJson1_1UpdateGlobalNetworkCommand(input, context);
+ }
+
+ private deserialize(
+ output: __HttpResponse,
+ context: SerdeContext
+ ): Promise {
+ return deserializeAws_restJson1_1UpdateGlobalNetworkCommand(
+ output,
+ context
+ );
+ }
+
+ // Start section: command_body_extra
+ // End section: command_body_extra
+}
diff --git a/clients/client-networkmanager/commands/UpdateLinkCommand.ts b/clients/client-networkmanager/commands/UpdateLinkCommand.ts
new file mode 100644
index 000000000000..7bb7844641d4
--- /dev/null
+++ b/clients/client-networkmanager/commands/UpdateLinkCommand.ts
@@ -0,0 +1,81 @@
+import {
+ NetworkManagerClientResolvedConfig,
+ ServiceInputTypes,
+ ServiceOutputTypes
+} from "../NetworkManagerClient";
+import { UpdateLinkRequest, UpdateLinkResponse } from "../models/index";
+import {
+ deserializeAws_restJson1_1UpdateLinkCommand,
+ serializeAws_restJson1_1UpdateLinkCommand
+} from "../protocols/Aws_restJson1_1";
+import { getSerdePlugin } from "@aws-sdk/middleware-serde";
+import {
+ HttpRequest as __HttpRequest,
+ HttpResponse as __HttpResponse
+} from "@aws-sdk/protocol-http";
+import { Command as $Command } from "@aws-sdk/smithy-client";
+import {
+ FinalizeHandlerArguments,
+ Handler,
+ HandlerExecutionContext,
+ MiddlewareStack,
+ SerdeContext,
+ HttpHandlerOptions as __HttpHandlerOptions
+} from "@aws-sdk/types";
+
+export type UpdateLinkCommandInput = UpdateLinkRequest;
+export type UpdateLinkCommandOutput = UpdateLinkResponse;
+
+export class UpdateLinkCommand extends $Command<
+ UpdateLinkCommandInput,
+ UpdateLinkCommandOutput,
+ NetworkManagerClientResolvedConfig
+> {
+ // Start section: command_properties
+ // End section: command_properties
+
+ constructor(readonly input: UpdateLinkCommandInput) {
+ // Start section: command_constructor
+ super();
+ // End section: command_constructor
+ }
+
+ resolveMiddleware(
+ clientStack: MiddlewareStack,
+ configuration: NetworkManagerClientResolvedConfig,
+ 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: UpdateLinkCommandInput,
+ context: SerdeContext
+ ): Promise<__HttpRequest> {
+ return serializeAws_restJson1_1UpdateLinkCommand(input, context);
+ }
+
+ private deserialize(
+ output: __HttpResponse,
+ context: SerdeContext
+ ): Promise {
+ return deserializeAws_restJson1_1UpdateLinkCommand(output, context);
+ }
+
+ // Start section: command_body_extra
+ // End section: command_body_extra
+}
diff --git a/clients/client-networkmanager/commands/UpdateSiteCommand.ts b/clients/client-networkmanager/commands/UpdateSiteCommand.ts
new file mode 100644
index 000000000000..10f9f18fa4ac
--- /dev/null
+++ b/clients/client-networkmanager/commands/UpdateSiteCommand.ts
@@ -0,0 +1,81 @@
+import {
+ NetworkManagerClientResolvedConfig,
+ ServiceInputTypes,
+ ServiceOutputTypes
+} from "../NetworkManagerClient";
+import { UpdateSiteRequest, UpdateSiteResponse } from "../models/index";
+import {
+ deserializeAws_restJson1_1UpdateSiteCommand,
+ serializeAws_restJson1_1UpdateSiteCommand
+} from "../protocols/Aws_restJson1_1";
+import { getSerdePlugin } from "@aws-sdk/middleware-serde";
+import {
+ HttpRequest as __HttpRequest,
+ HttpResponse as __HttpResponse
+} from "@aws-sdk/protocol-http";
+import { Command as $Command } from "@aws-sdk/smithy-client";
+import {
+ FinalizeHandlerArguments,
+ Handler,
+ HandlerExecutionContext,
+ MiddlewareStack,
+ SerdeContext,
+ HttpHandlerOptions as __HttpHandlerOptions
+} from "@aws-sdk/types";
+
+export type UpdateSiteCommandInput = UpdateSiteRequest;
+export type UpdateSiteCommandOutput = UpdateSiteResponse;
+
+export class UpdateSiteCommand extends $Command<
+ UpdateSiteCommandInput,
+ UpdateSiteCommandOutput,
+ NetworkManagerClientResolvedConfig
+> {
+ // Start section: command_properties
+ // End section: command_properties
+
+ constructor(readonly input: UpdateSiteCommandInput) {
+ // Start section: command_constructor
+ super();
+ // End section: command_constructor
+ }
+
+ resolveMiddleware(
+ clientStack: MiddlewareStack,
+ configuration: NetworkManagerClientResolvedConfig,
+ 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: UpdateSiteCommandInput,
+ context: SerdeContext
+ ): Promise<__HttpRequest> {
+ return serializeAws_restJson1_1UpdateSiteCommand(input, context);
+ }
+
+ private deserialize(
+ output: __HttpResponse,
+ context: SerdeContext
+ ): Promise {
+ return deserializeAws_restJson1_1UpdateSiteCommand(output, context);
+ }
+
+ // Start section: command_body_extra
+ // End section: command_body_extra
+}
diff --git a/clients/client-networkmanager/endpoints.ts b/clients/client-networkmanager/endpoints.ts
new file mode 100644
index 000000000000..a7d0f4346937
--- /dev/null
+++ b/clients/client-networkmanager/endpoints.ts
@@ -0,0 +1,78 @@
+import { RegionInfo, RegionInfoProvider } from "@aws-sdk/types";
+
+// Partition default templates
+const AWS_TEMPLATE = "networkmanager.{region}.amazonaws.com";
+const AWS_CN_TEMPLATE = "networkmanager.{region}.amazonaws.com.cn";
+const AWS_ISO_TEMPLATE = "networkmanager.{region}.c2s.ic.gov";
+const AWS_ISO_B_TEMPLATE = "networkmanager.{region}.sc2s.sgov.gov";
+const AWS_US_GOV_TEMPLATE = "networkmanager.{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.
+ // 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-networkmanager/index.ts b/clients/client-networkmanager/index.ts
new file mode 100644
index 000000000000..063db59da3a5
--- /dev/null
+++ b/clients/client-networkmanager/index.ts
@@ -0,0 +1,30 @@
+export * from "./NetworkManagerClient";
+export * from "./NetworkManager";
+export * from "./commands/DescribeGlobalNetworksCommand";
+export * from "./commands/CreateDeviceCommand";
+export * from "./commands/UpdateDeviceCommand";
+export * from "./commands/ListTagsForResourceCommand";
+export * from "./commands/UpdateSiteCommand";
+export * from "./commands/AssociateLinkCommand";
+export * from "./commands/GetCustomerGatewayAssociationsCommand";
+export * from "./commands/DeleteGlobalNetworkCommand";
+export * from "./commands/AssociateCustomerGatewayCommand";
+export * from "./commands/CreateLinkCommand";
+export * from "./commands/DeleteDeviceCommand";
+export * from "./commands/GetLinksCommand";
+export * from "./commands/DisassociateLinkCommand";
+export * from "./commands/TagResourceCommand";
+export * from "./commands/DeleteLinkCommand";
+export * from "./commands/DisassociateCustomerGatewayCommand";
+export * from "./commands/CreateGlobalNetworkCommand";
+export * from "./commands/RegisterTransitGatewayCommand";
+export * from "./commands/GetSitesCommand";
+export * from "./commands/DeregisterTransitGatewayCommand";
+export * from "./commands/DeleteSiteCommand";
+export * from "./commands/GetTransitGatewayRegistrationsCommand";
+export * from "./commands/CreateSiteCommand";
+export * from "./commands/GetDevicesCommand";
+export * from "./commands/UpdateLinkCommand";
+export * from "./commands/UntagResourceCommand";
+export * from "./commands/UpdateGlobalNetworkCommand";
+export * from "./commands/GetLinkAssociationsCommand";
diff --git a/clients/client-networkmanager/models/index.ts b/clients/client-networkmanager/models/index.ts
new file mode 100644
index 000000000000..57b3dc97188e
--- /dev/null
+++ b/clients/client-networkmanager/models/index.ts
@@ -0,0 +1,2387 @@
+import * as _smithy from "@aws-sdk/smithy-client";
+import { MetadataBearer as $MetadataBearer } from "@aws-sdk/types";
+
+/**
+ *
+ * You do not have sufficient access to perform this action.
+ *
+ */
+export interface AccessDeniedException
+ extends _smithy.SmithyException,
+ $MetadataBearer {
+ __type: "AccessDeniedException";
+ $fault: "client";
+ Message: string | undefined;
+}
+
+export namespace AccessDeniedException {
+ export function isa(o: any): o is AccessDeniedException {
+ return _smithy.isa(o, "AccessDeniedException");
+ }
+}
+
+export interface AssociateCustomerGatewayRequest {
+ __type?: "AssociateCustomerGatewayRequest";
+ /**
+ *
+ * The Amazon Resource Name (ARN) of the customer gateway. For more information, see
+ * Resources Defined by Amazon EC2 .
+ *
+ */
+ CustomerGatewayArn: string | undefined;
+
+ /**
+ *
+ * The ID of the device.
+ *
+ */
+ DeviceId: string | undefined;
+
+ /**
+ *
+ * The ID of the global network.
+ *
+ */
+ GlobalNetworkId: string | undefined;
+
+ /**
+ *
+ * The ID of the link.
+ *
+ */
+ LinkId?: string;
+}
+
+export namespace AssociateCustomerGatewayRequest {
+ export function isa(o: any): o is AssociateCustomerGatewayRequest {
+ return _smithy.isa(o, "AssociateCustomerGatewayRequest");
+ }
+}
+
+export interface AssociateCustomerGatewayResponse extends $MetadataBearer {
+ __type?: "AssociateCustomerGatewayResponse";
+ /**
+ *
+ * The customer gateway association.
+ *
+ */
+ CustomerGatewayAssociation?: CustomerGatewayAssociation;
+}
+
+export namespace AssociateCustomerGatewayResponse {
+ export function isa(o: any): o is AssociateCustomerGatewayResponse {
+ return _smithy.isa(o, "AssociateCustomerGatewayResponse");
+ }
+}
+
+export interface AssociateLinkRequest {
+ __type?: "AssociateLinkRequest";
+ /**
+ *
+ * The ID of the device.
+ *
+ */
+ DeviceId: string | undefined;
+
+ /**
+ *
+ * The ID of the global network.
+ *
+ */
+ GlobalNetworkId: string | undefined;
+
+ /**
+ *
+ * The ID of the link.
+ *
+ */
+ LinkId: string | undefined;
+}
+
+export namespace AssociateLinkRequest {
+ export function isa(o: any): o is AssociateLinkRequest {
+ return _smithy.isa(o, "AssociateLinkRequest");
+ }
+}
+
+export interface AssociateLinkResponse extends $MetadataBearer {
+ __type?: "AssociateLinkResponse";
+ /**
+ *
+ * The link association.
+ *
+ */
+ LinkAssociation?: LinkAssociation;
+}
+
+export namespace AssociateLinkResponse {
+ export function isa(o: any): o is AssociateLinkResponse {
+ return _smithy.isa(o, "AssociateLinkResponse");
+ }
+}
+
+/**
+ *
+ * Describes bandwidth information.
+ *
+ */
+export interface Bandwidth {
+ __type?: "Bandwidth";
+ /**
+ *
+ * Download speed in Mbps.
+ *
+ */
+ DownloadSpeed?: number;
+
+ /**
+ *
+ * Upload speed in Mbps.
+ *
+ */
+ UploadSpeed?: number;
+}
+
+export namespace Bandwidth {
+ export function isa(o: any): o is Bandwidth {
+ return _smithy.isa(o, "Bandwidth");
+ }
+}
+
+/**
+ *
+ * There was a conflict processing the request. Updating or deleting the resource can
+ * cause an inconsistent state.
+ *
+ */
+export interface ConflictException
+ extends _smithy.SmithyException,
+ $MetadataBearer {
+ __type: "ConflictException";
+ $fault: "client";
+ Message: string | undefined;
+ /**
+ *
+ * The ID of the resource.
+ *
+ */
+ ResourceId: string | undefined;
+
+ /**
+ *
+ * The resource type.
+ *
+ */
+ ResourceType: string | undefined;
+}
+
+export namespace ConflictException {
+ export function isa(o: any): o is ConflictException {
+ return _smithy.isa(o, "ConflictException");
+ }
+}
+
+export interface CreateDeviceRequest {
+ __type?: "CreateDeviceRequest";
+ /**
+ *
+ * A description of the device.
+ * Length Constraints: Maximum length of 256 characters.
+ *
+ */
+ Description?: string;
+
+ /**
+ *
+ * The ID of the global network.
+ *
+ */
+ GlobalNetworkId: string | undefined;
+
+ /**
+ *
+ * The location of the device.
+ *
+ */
+ Location?: Location;
+
+ /**
+ *
+ * The model of the device.
+ * Length Constraints: Maximum length of 128 characters.
+ *
+ */
+ Model?: string;
+
+ /**
+ *
+ * The serial number of the device.
+ * Length Constraints: Maximum length of 128 characters.
+ *
+ */
+ SerialNumber?: string;
+
+ /**
+ *
+ * The ID of the site.
+ *
+ */
+ SiteId?: string;
+
+ /**
+ *
+ * The tags to apply to the resource during creation.
+ *
+ */
+ Tags?: Array;
+
+ /**
+ *
+ * The type of the device.
+ *
+ */
+ Type?: string;
+
+ /**
+ *
+ * The vendor of the device.
+ * Length Constraints: Maximum length of 128 characters.
+ *
+ */
+ Vendor?: string;
+}
+
+export namespace CreateDeviceRequest {
+ export function isa(o: any): o is CreateDeviceRequest {
+ return _smithy.isa(o, "CreateDeviceRequest");
+ }
+}
+
+export interface CreateDeviceResponse extends $MetadataBearer {
+ __type?: "CreateDeviceResponse";
+ /**
+ *
+ * Information about the device.
+ *
+ */
+ Device?: Device;
+}
+
+export namespace CreateDeviceResponse {
+ export function isa(o: any): o is CreateDeviceResponse {
+ return _smithy.isa(o, "CreateDeviceResponse");
+ }
+}
+
+export interface CreateGlobalNetworkRequest {
+ __type?: "CreateGlobalNetworkRequest";
+ /**
+ *
+ * A description of the global network.
+ * Length Constraints: Maximum length of 256 characters.
+ *
+ */
+ Description?: string;
+
+ /**
+ *
+ * The tags to apply to the resource during creation.
+ *
+ */
+ Tags?: Array;
+}
+
+export namespace CreateGlobalNetworkRequest {
+ export function isa(o: any): o is CreateGlobalNetworkRequest {
+ return _smithy.isa(o, "CreateGlobalNetworkRequest");
+ }
+}
+
+export interface CreateGlobalNetworkResponse extends $MetadataBearer {
+ __type?: "CreateGlobalNetworkResponse";
+ /**
+ *
+ * Information about the global network object.
+ *
+ */
+ GlobalNetwork?: GlobalNetwork;
+}
+
+export namespace CreateGlobalNetworkResponse {
+ export function isa(o: any): o is CreateGlobalNetworkResponse {
+ return _smithy.isa(o, "CreateGlobalNetworkResponse");
+ }
+}
+
+export interface CreateLinkRequest {
+ __type?: "CreateLinkRequest";
+ /**
+ *
+ * The upload speed and download speed in Mbps.
+ *
+ */
+ Bandwidth: Bandwidth | undefined;
+
+ /**
+ *
+ * A description of the link.
+ * Length Constraints: Maximum length of 256 characters.
+ *
+ */
+ Description?: string;
+
+ /**
+ *
+ * The ID of the global network.
+ *
+ */
+ GlobalNetworkId: string | undefined;
+
+ /**
+ *
+ * The provider of the link.
+ * Constraints: Cannot include the following characters: | \ ^
+ * Length Constraints: Maximum length of 128 characters.
+ *
+ */
+ Provider?: string;
+
+ /**
+ *
+ * The ID of the site.
+ *
+ */
+ SiteId: string | undefined;
+
+ /**
+ *
+ * The tags to apply to the resource during creation.
+ *
+ */
+ Tags?: Array;
+
+ /**
+ *
+ * The type of the link.
+ * Constraints: Cannot include the following characters: | \ ^
+ * Length Constraints: Maximum length of 128 characters.
+ *
+ */
+ Type?: string;
+}
+
+export namespace CreateLinkRequest {
+ export function isa(o: any): o is CreateLinkRequest {
+ return _smithy.isa(o, "CreateLinkRequest");
+ }
+}
+
+export interface CreateLinkResponse extends $MetadataBearer {
+ __type?: "CreateLinkResponse";
+ /**
+ *
+ * Information about the link.
+ *
+ */
+ Link?: Link;
+}
+
+export namespace CreateLinkResponse {
+ export function isa(o: any): o is CreateLinkResponse {
+ return _smithy.isa(o, "CreateLinkResponse");
+ }
+}
+
+export interface CreateSiteRequest {
+ __type?: "CreateSiteRequest";
+ /**
+ *
+ * A description of your site.
+ * Length Constraints: Maximum length of 256 characters.
+ *
+ */
+ Description?: string;
+
+ /**
+ *
+ * The ID of the global network.
+ *
+ */
+ GlobalNetworkId: string | undefined;
+
+ /**
+ *
+ * The site location. This information is used for visualization in the Network Manager console. If you specify the address, the latitude and longitude are automatically calculated.
+ *
+ *
+ *
+ * Address
: The physical address of the site.
+ *
+ *
+ *
+ * Latitude
: The latitude of the site.
+ *
+ *
+ *
+ * Longitude
: The longitude of the site.
+ *
+ *
+ *
+ */
+ Location?: Location;
+
+ /**
+ *
+ * The tags to apply to the resource during creation.
+ *
+ */
+ Tags?: Array;
+}
+
+export namespace CreateSiteRequest {
+ export function isa(o: any): o is CreateSiteRequest {
+ return _smithy.isa(o, "CreateSiteRequest");
+ }
+}
+
+export interface CreateSiteResponse extends $MetadataBearer {
+ __type?: "CreateSiteResponse";
+ /**
+ *
+ * Information about the site.
+ *
+ */
+ Site?: Site;
+}
+
+export namespace CreateSiteResponse {
+ export function isa(o: any): o is CreateSiteResponse {
+ return _smithy.isa(o, "CreateSiteResponse");
+ }
+}
+
+/**
+ *
+ * Describes the association between a customer gateway, a device, and a link.
+ *
+ */
+export interface CustomerGatewayAssociation {
+ __type?: "CustomerGatewayAssociation";
+ /**
+ *
+ * The Amazon Resource Name (ARN) of the customer gateway.
+ *
+ */
+ CustomerGatewayArn?: string;
+
+ /**
+ *
+ * The ID of the device.
+ *
+ */
+ DeviceId?: string;
+
+ /**
+ *
+ * The ID of the global network.
+ *
+ */
+ GlobalNetworkId?: string;
+
+ /**
+ *
+ * The ID of the link.
+ *
+ */
+ LinkId?: string;
+
+ /**
+ *
+ * The association state.
+ *
+ */
+ State?: CustomerGatewayAssociationState | string;
+}
+
+export namespace CustomerGatewayAssociation {
+ export function isa(o: any): o is CustomerGatewayAssociation {
+ return _smithy.isa(o, "CustomerGatewayAssociation");
+ }
+}
+
+export enum CustomerGatewayAssociationState {
+ available = "AVAILABLE",
+ deleted = "DELETED",
+ deleting = "DELETING",
+ pending = "PENDING"
+}
+
+export interface DeleteDeviceRequest {
+ __type?: "DeleteDeviceRequest";
+ /**
+ *
+ * The ID of the device.
+ *
+ */
+ DeviceId: string | undefined;
+
+ /**
+ *
+ * The ID of the global network.
+ *
+ */
+ GlobalNetworkId: string | undefined;
+}
+
+export namespace DeleteDeviceRequest {
+ export function isa(o: any): o is DeleteDeviceRequest {
+ return _smithy.isa(o, "DeleteDeviceRequest");
+ }
+}
+
+export interface DeleteDeviceResponse extends $MetadataBearer {
+ __type?: "DeleteDeviceResponse";
+ /**
+ *
+ * Information about the device.
+ *
+ */
+ Device?: Device;
+}
+
+export namespace DeleteDeviceResponse {
+ export function isa(o: any): o is DeleteDeviceResponse {
+ return _smithy.isa(o, "DeleteDeviceResponse");
+ }
+}
+
+export interface DeleteGlobalNetworkRequest {
+ __type?: "DeleteGlobalNetworkRequest";
+ /**
+ *
+ * The ID of the global network.
+ *
+ */
+ GlobalNetworkId: string | undefined;
+}
+
+export namespace DeleteGlobalNetworkRequest {
+ export function isa(o: any): o is DeleteGlobalNetworkRequest {
+ return _smithy.isa(o, "DeleteGlobalNetworkRequest");
+ }
+}
+
+export interface DeleteGlobalNetworkResponse extends $MetadataBearer {
+ __type?: "DeleteGlobalNetworkResponse";
+ /**
+ *
+ * Information about the global network.
+ *
+ */
+ GlobalNetwork?: GlobalNetwork;
+}
+
+export namespace DeleteGlobalNetworkResponse {
+ export function isa(o: any): o is DeleteGlobalNetworkResponse {
+ return _smithy.isa(o, "DeleteGlobalNetworkResponse");
+ }
+}
+
+export interface DeleteLinkRequest {
+ __type?: "DeleteLinkRequest";
+ /**
+ *
+ * The ID of the global network.
+ *
+ */
+ GlobalNetworkId: string | undefined;
+
+ /**
+ *
+ * The ID of the link.
+ *
+ */
+ LinkId: string | undefined;
+}
+
+export namespace DeleteLinkRequest {
+ export function isa(o: any): o is DeleteLinkRequest {
+ return _smithy.isa(o, "DeleteLinkRequest");
+ }
+}
+
+export interface DeleteLinkResponse extends $MetadataBearer {
+ __type?: "DeleteLinkResponse";
+ /**
+ *
+ * Information about the link.
+ *
+ */
+ Link?: Link;
+}
+
+export namespace DeleteLinkResponse {
+ export function isa(o: any): o is DeleteLinkResponse {
+ return _smithy.isa(o, "DeleteLinkResponse");
+ }
+}
+
+export interface DeleteSiteRequest {
+ __type?: "DeleteSiteRequest";
+ /**
+ *
+ * The ID of the global network.
+ *
+ */
+ GlobalNetworkId: string | undefined;
+
+ /**
+ *
+ * The ID of the site.
+ *
+ */
+ SiteId: string | undefined;
+}
+
+export namespace DeleteSiteRequest {
+ export function isa(o: any): o is DeleteSiteRequest {
+ return _smithy.isa(o, "DeleteSiteRequest");
+ }
+}
+
+export interface DeleteSiteResponse extends $MetadataBearer {
+ __type?: "DeleteSiteResponse";
+ /**
+ *
+ * Information about the site.
+ *
+ */
+ Site?: Site;
+}
+
+export namespace DeleteSiteResponse {
+ export function isa(o: any): o is DeleteSiteResponse {
+ return _smithy.isa(o, "DeleteSiteResponse");
+ }
+}
+
+export interface DeregisterTransitGatewayRequest {
+ __type?: "DeregisterTransitGatewayRequest";
+ /**
+ *
+ * The ID of the global network.
+ *
+ */
+ GlobalNetworkId: string | undefined;
+
+ /**
+ *
+ * The Amazon Resource Name (ARN) of the transit gateway.
+ *
+ */
+ TransitGatewayArn: string | undefined;
+}
+
+export namespace DeregisterTransitGatewayRequest {
+ export function isa(o: any): o is DeregisterTransitGatewayRequest {
+ return _smithy.isa(o, "DeregisterTransitGatewayRequest");
+ }
+}
+
+export interface DeregisterTransitGatewayResponse extends $MetadataBearer {
+ __type?: "DeregisterTransitGatewayResponse";
+ /**
+ *
+ * The transit gateway registration information.
+ *
+ */
+ TransitGatewayRegistration?: TransitGatewayRegistration;
+}
+
+export namespace DeregisterTransitGatewayResponse {
+ export function isa(o: any): o is DeregisterTransitGatewayResponse {
+ return _smithy.isa(o, "DeregisterTransitGatewayResponse");
+ }
+}
+
+export interface DescribeGlobalNetworksRequest {
+ __type?: "DescribeGlobalNetworksRequest";
+ /**
+ *
+ * The IDs of one or more global networks. The maximum is 10.
+ *
+ */
+ GlobalNetworkIds?: Array;
+
+ /**
+ *
+ * The maximum number of results to return.
+ *
+ */
+ MaxResults?: number;
+
+ /**
+ *
+ * The token for the next page of results.
+ *
+ */
+ NextToken?: string;
+}
+
+export namespace DescribeGlobalNetworksRequest {
+ export function isa(o: any): o is DescribeGlobalNetworksRequest {
+ return _smithy.isa(o, "DescribeGlobalNetworksRequest");
+ }
+}
+
+export interface DescribeGlobalNetworksResponse extends $MetadataBearer {
+ __type?: "DescribeGlobalNetworksResponse";
+ /**
+ *
+ * Information about the global networks.
+ *
+ */
+ GlobalNetworks?: Array;
+
+ /**
+ *
+ * The token for the next page of results.
+ *
+ */
+ NextToken?: string;
+}
+
+export namespace DescribeGlobalNetworksResponse {
+ export function isa(o: any): o is DescribeGlobalNetworksResponse {
+ return _smithy.isa(o, "DescribeGlobalNetworksResponse");
+ }
+}
+
+/**
+ *
+ * Describes a device.
+ *
+ */
+export interface Device {
+ __type?: "Device";
+ /**
+ *
+ * The date and time that the site was created.
+ *
+ */
+ CreatedAt?: Date;
+
+ /**
+ *
+ * The description of the device.
+ *
+ */
+ Description?: string;
+
+ /**
+ *
+ * The Amazon Resource Name (ARN) of the device.
+ *
+ */
+ DeviceArn?: string;
+
+ /**
+ *
+ * The ID of the device.
+ *
+ */
+ DeviceId?: string;
+
+ /**
+ *
+ * The ID of the global network.
+ *
+ */
+ GlobalNetworkId?: string;
+
+ /**
+ *
+ * The site location.
+ *
+ */
+ Location?: Location;
+
+ /**
+ *
+ * The device model.
+ *
+ */
+ Model?: string;
+
+ /**
+ *
+ * The device serial number.
+ *
+ */
+ SerialNumber?: string;
+
+ /**
+ *
+ * The site ID.
+ *
+ */
+ SiteId?: string;
+
+ /**
+ *
+ * The device state.
+ *
+ */
+ State?: DeviceState | string;
+
+ /**
+ *
+ * The tags for the device.
+ *
+ */
+ Tags?: Array;
+
+ /**
+ *
+ * The device type.
+ *
+ */
+ Type?: string;
+
+ /**
+ *
+ * The device vendor.
+ *
+ */
+ Vendor?: string;
+}
+
+export namespace Device {
+ export function isa(o: any): o is Device {
+ return _smithy.isa(o, "Device");
+ }
+}
+
+export enum DeviceState {
+ available = "AVAILABLE",
+ deleting = "DELETING",
+ pending = "PENDING",
+ updating = "UPDATING"
+}
+
+export interface DisassociateCustomerGatewayRequest {
+ __type?: "DisassociateCustomerGatewayRequest";
+ /**
+ *
+ * The Amazon Resource Name (ARN) of the customer gateway. For more information, see
+ * Resources Defined by Amazon EC2 .
+ *
+ */
+ CustomerGatewayArn: string | undefined;
+
+ /**
+ *
+ * The ID of the global network.
+ *
+ */
+ GlobalNetworkId: string | undefined;
+}
+
+export namespace DisassociateCustomerGatewayRequest {
+ export function isa(o: any): o is DisassociateCustomerGatewayRequest {
+ return _smithy.isa(o, "DisassociateCustomerGatewayRequest");
+ }
+}
+
+export interface DisassociateCustomerGatewayResponse extends $MetadataBearer {
+ __type?: "DisassociateCustomerGatewayResponse";
+ /**
+ *
+ * Information about the customer gateway association.
+ *
+ */
+ CustomerGatewayAssociation?: CustomerGatewayAssociation;
+}
+
+export namespace DisassociateCustomerGatewayResponse {
+ export function isa(o: any): o is DisassociateCustomerGatewayResponse {
+ return _smithy.isa(o, "DisassociateCustomerGatewayResponse");
+ }
+}
+
+export interface DisassociateLinkRequest {
+ __type?: "DisassociateLinkRequest";
+ /**
+ *
+ * The ID of the device.
+ *
+ */
+ DeviceId: string | undefined;
+
+ /**
+ *
+ * The ID of the global network.
+ *
+ */
+ GlobalNetworkId: string | undefined;
+
+ /**
+ *
+ * The ID of the link.
+ *
+ */
+ LinkId: string | undefined;
+}
+
+export namespace DisassociateLinkRequest {
+ export function isa(o: any): o is DisassociateLinkRequest {
+ return _smithy.isa(o, "DisassociateLinkRequest");
+ }
+}
+
+export interface DisassociateLinkResponse extends $MetadataBearer {
+ __type?: "DisassociateLinkResponse";
+ /**
+ *
+ * Information about the link association.
+ *
+ */
+ LinkAssociation?: LinkAssociation;
+}
+
+export namespace DisassociateLinkResponse {
+ export function isa(o: any): o is DisassociateLinkResponse {
+ return _smithy.isa(o, "DisassociateLinkResponse");
+ }
+}
+
+export interface GetCustomerGatewayAssociationsRequest {
+ __type?: "GetCustomerGatewayAssociationsRequest";
+ /**
+ *
+ * One or more customer gateway Amazon Resource Names (ARNs). For more information, see
+ * Resources Defined by Amazon EC2 . The maximum is 10.
+ *
+ */
+ CustomerGatewayArns?: Array;
+
+ /**
+ *
+ * The ID of the global network.
+ *
+ */
+ GlobalNetworkId: string | undefined;
+
+ /**
+ *
+ * The maximum number of results to return.
+ *
+ */
+ MaxResults?: number;
+
+ /**
+ *
+ * The token for the next page of results.
+ *
+ */
+ NextToken?: string;
+}
+
+export namespace GetCustomerGatewayAssociationsRequest {
+ export function isa(o: any): o is GetCustomerGatewayAssociationsRequest {
+ return _smithy.isa(o, "GetCustomerGatewayAssociationsRequest");
+ }
+}
+
+export interface GetCustomerGatewayAssociationsResponse
+ extends $MetadataBearer {
+ __type?: "GetCustomerGatewayAssociationsResponse";
+ /**
+ *
+ * The customer gateway associations.
+ *
+ */
+ CustomerGatewayAssociations?: Array;
+
+ /**
+ *
+ * The token for the next page of results.
+ *
+ */
+ NextToken?: string;
+}
+
+export namespace GetCustomerGatewayAssociationsResponse {
+ export function isa(o: any): o is GetCustomerGatewayAssociationsResponse {
+ return _smithy.isa(o, "GetCustomerGatewayAssociationsResponse");
+ }
+}
+
+export interface GetDevicesRequest {
+ __type?: "GetDevicesRequest";
+ /**
+ *
+ * One or more device IDs. The maximum is 10.
+ *
+ */
+ DeviceIds?: Array;
+
+ /**
+ *
+ * The ID of the global network.
+ *
+ */
+ GlobalNetworkId: string | undefined;
+
+ /**
+ *
+ * The maximum number of results to return.
+ *
+ */
+ MaxResults?: number;
+
+ /**
+ *
+ * The token for the next page of results.
+ *
+ */
+ NextToken?: string;
+
+ /**
+ *
+ * The ID of the site.
+ *
+ */
+ SiteId?: string;
+}
+
+export namespace GetDevicesRequest {
+ export function isa(o: any): o is GetDevicesRequest {
+ return _smithy.isa(o, "GetDevicesRequest");
+ }
+}
+
+export interface GetDevicesResponse extends $MetadataBearer {
+ __type?: "GetDevicesResponse";
+ /**
+ *
+ * The devices.
+ *
+ */
+ Devices?: Array;
+
+ /**
+ *
+ * The token for the next page of results.
+ *
+ */
+ NextToken?: string;
+}
+
+export namespace GetDevicesResponse {
+ export function isa(o: any): o is GetDevicesResponse {
+ return _smithy.isa(o, "GetDevicesResponse");
+ }
+}
+
+export interface GetLinkAssociationsRequest {
+ __type?: "GetLinkAssociationsRequest";
+ /**
+ *
+ * The ID of the device.
+ *
+ */
+ DeviceId?: string;
+
+ /**
+ *
+ * The ID of the global network.
+ *
+ */
+ GlobalNetworkId: string | undefined;
+
+ /**
+ *
+ * The ID of the link.
+ *
+ */
+ LinkId?: string;
+
+ /**
+ *
+ * The maximum number of results to return.
+ *
+ */
+ MaxResults?: number;
+
+ /**
+ *
+ * The token for the next page of results.
+ *
+ */
+ NextToken?: string;
+}
+
+export namespace GetLinkAssociationsRequest {
+ export function isa(o: any): o is GetLinkAssociationsRequest {
+ return _smithy.isa(o, "GetLinkAssociationsRequest");
+ }
+}
+
+export interface GetLinkAssociationsResponse extends $MetadataBearer {
+ __type?: "GetLinkAssociationsResponse";
+ /**
+ *
+ * The link associations.
+ *
+ */
+ LinkAssociations?: Array;
+
+ /**
+ *
+ * The token for the next page of results.
+ *
+ */
+ NextToken?: string;
+}
+
+export namespace GetLinkAssociationsResponse {
+ export function isa(o: any): o is GetLinkAssociationsResponse {
+ return _smithy.isa(o, "GetLinkAssociationsResponse");
+ }
+}
+
+export interface GetLinksRequest {
+ __type?: "GetLinksRequest";
+ /**
+ *
+ * The ID of the global network.
+ *
+ */
+ GlobalNetworkId: string | undefined;
+
+ /**
+ *
+ * One or more link IDs. The maximum is 10.
+ *
+ */
+ LinkIds?: Array;
+
+ /**
+ *
+ * The maximum number of results to return.
+ *
+ */
+ MaxResults?: number;
+
+ /**
+ *
+ * The token for the next page of results.
+ *
+ */
+ NextToken?: string;
+
+ /**
+ *
+ * The link provider.
+ *
+ */
+ Provider?: string;
+
+ /**
+ *
+ * The ID of the site.
+ *
+ */
+ SiteId?: string;
+
+ /**
+ *
+ * The link type.
+ *
+ */
+ Type?: string;
+}
+
+export namespace GetLinksRequest {
+ export function isa(o: any): o is GetLinksRequest {
+ return _smithy.isa(o, "GetLinksRequest");
+ }
+}
+
+export interface GetLinksResponse extends $MetadataBearer {
+ __type?: "GetLinksResponse";
+ /**
+ *
+ * The links.
+ *
+ */
+ Links?: Array ;
+
+ /**
+ *
+ * The token for the next page of results.
+ *
+ */
+ NextToken?: string;
+}
+
+export namespace GetLinksResponse {
+ export function isa(o: any): o is GetLinksResponse {
+ return _smithy.isa(o, "GetLinksResponse");
+ }
+}
+
+export interface GetSitesRequest {
+ __type?: "GetSitesRequest";
+ /**
+ *
+ * The ID of the global network.
+ *
+ */
+ GlobalNetworkId: string | undefined;
+
+ /**
+ *
+ * The maximum number of results to return.
+ *
+ */
+ MaxResults?: number;
+
+ /**
+ *
+ * The token for the next page of results.
+ *
+ */
+ NextToken?: string;
+
+ /**
+ *
+ * One or more site IDs. The maximum is 10.
+ *
+ */
+ SiteIds?: Array;
+}
+
+export namespace GetSitesRequest {
+ export function isa(o: any): o is GetSitesRequest {
+ return _smithy.isa(o, "GetSitesRequest");
+ }
+}
+
+export interface GetSitesResponse extends $MetadataBearer {
+ __type?: "GetSitesResponse";
+ /**
+ *
+ * The token for the next page of results.
+ *
+ */
+ NextToken?: string;
+
+ /**
+ *
+ * The sites.
+ *
+ */
+ Sites?: Array;
+}
+
+export namespace GetSitesResponse {
+ export function isa(o: any): o is GetSitesResponse {
+ return _smithy.isa(o, "GetSitesResponse");
+ }
+}
+
+export interface GetTransitGatewayRegistrationsRequest {
+ __type?: "GetTransitGatewayRegistrationsRequest";
+ /**
+ *
+ * The ID of the global network.
+ *
+ */
+ GlobalNetworkId: string | undefined;
+
+ /**
+ *
+ * The maximum number of results to return.
+ *
+ */
+ MaxResults?: number;
+
+ /**
+ *
+ * The token for the next page of results.
+ *
+ */
+ NextToken?: string;
+
+ /**
+ *
+ * The Amazon Resource Names (ARNs) of one or more transit gateways. The maximum is
+ * 10.
+ *
+ */
+ TransitGatewayArns?: Array;
+}
+
+export namespace GetTransitGatewayRegistrationsRequest {
+ export function isa(o: any): o is GetTransitGatewayRegistrationsRequest {
+ return _smithy.isa(o, "GetTransitGatewayRegistrationsRequest");
+ }
+}
+
+export interface GetTransitGatewayRegistrationsResponse
+ extends $MetadataBearer {
+ __type?: "GetTransitGatewayRegistrationsResponse";
+ /**
+ *
+ * The token for the next page of results.
+ *
+ */
+ NextToken?: string;
+
+ /**
+ *
+ * The transit gateway registrations.
+ *
+ */
+ TransitGatewayRegistrations?: Array;
+}
+
+export namespace GetTransitGatewayRegistrationsResponse {
+ export function isa(o: any): o is GetTransitGatewayRegistrationsResponse {
+ return _smithy.isa(o, "GetTransitGatewayRegistrationsResponse");
+ }
+}
+
+/**
+ *
+ * Describes a global network.
+ *
+ */
+export interface GlobalNetwork {
+ __type?: "GlobalNetwork";
+ /**
+ *
+ * The date and time that the global network was created.
+ *
+ */
+ CreatedAt?: Date;
+
+ /**
+ *
+ * The description of the global network.
+ *
+ */
+ Description?: string;
+
+ /**
+ *
+ * The Amazon Resource Name (ARN) of the global network.
+ *
+ */
+ GlobalNetworkArn?: string;
+
+ /**
+ *
+ * The ID of the global network.
+ *
+ */
+ GlobalNetworkId?: string;
+
+ /**
+ *
+ * The state of the global network.
+ *
+ */
+ State?: GlobalNetworkState | string;
+
+ /**
+ *
+ * The tags for the global network.
+ *
+ */
+ Tags?: Array;
+}
+
+export namespace GlobalNetwork {
+ export function isa(o: any): o is GlobalNetwork {
+ return _smithy.isa(o, "GlobalNetwork");
+ }
+}
+
+export enum GlobalNetworkState {
+ available = "AVAILABLE",
+ deleting = "DELETING",
+ pending = "PENDING",
+ updating = "UPDATING"
+}
+
+/**
+ *
+ * The request has failed due to an internal error.
+ *
+ */
+export interface InternalServerException
+ extends _smithy.SmithyException,
+ $MetadataBearer {
+ __type: "InternalServerException";
+ $fault: "server";
+ Message: string | undefined;
+ /**
+ *
+ * Indicates when to retry the request.
+ *
+ */
+ RetryAfterSeconds?: number;
+}
+
+export namespace InternalServerException {
+ export function isa(o: any): o is InternalServerException {
+ return _smithy.isa(o, "InternalServerException");
+ }
+}
+
+/**
+ *
+ * Describes a link.
+ *
+ */
+export interface Link {
+ __type?: "Link";
+ /**
+ *
+ * The bandwidth for the link.
+ *
+ */
+ Bandwidth?: Bandwidth;
+
+ /**
+ *
+ * The date and time that the link was created.
+ *
+ */
+ CreatedAt?: Date;
+
+ /**
+ *
+ * The description of the link.
+ *
+ */
+ Description?: string;
+
+ /**
+ *
+ * The ID of the global network.
+ *
+ */
+ GlobalNetworkId?: string;
+
+ /**
+ *
+ * The Amazon Resource Name (ARN) of the link.
+ *
+ */
+ LinkArn?: string;
+
+ /**
+ *
+ * The ID of the link.
+ *
+ */
+ LinkId?: string;
+
+ /**
+ *
+ * The provider of the link.
+ *
+ */
+ Provider?: string;
+
+ /**
+ *
+ * The ID of the site.
+ *
+ */
+ SiteId?: string;
+
+ /**
+ *
+ * The state of the link.
+ *
+ */
+ State?: LinkState | string;
+
+ /**
+ *
+ * The tags for the link.
+ *
+ */
+ Tags?: Array;
+
+ /**
+ *
+ * The type of the link.
+ *
+ */
+ Type?: string;
+}
+
+export namespace Link {
+ export function isa(o: any): o is Link {
+ return _smithy.isa(o, "Link");
+ }
+}
+
+/**
+ *
+ * Describes the association between a device and a link.
+ *
+ */
+export interface LinkAssociation {
+ __type?: "LinkAssociation";
+ /**
+ *
+ * The device ID for the link association.
+ *
+ */
+ DeviceId?: string;
+
+ /**
+ *
+ * The ID of the global network.
+ *
+ */
+ GlobalNetworkId?: string;
+
+ /**
+ *
+ * The state of the association.
+ *
+ */
+ LinkAssociationState?: LinkAssociationState | string;
+
+ /**
+ *
+ * The ID of the link.
+ *
+ */
+ LinkId?: string;
+}
+
+export namespace LinkAssociation {
+ export function isa(o: any): o is LinkAssociation {
+ return _smithy.isa(o, "LinkAssociation");
+ }
+}
+
+export enum LinkAssociationState {
+ available = "AVAILABLE",
+ deleted = "DELETED",
+ deleting = "DELETING",
+ pending = "PENDING"
+}
+
+export enum LinkState {
+ available = "AVAILABLE",
+ deleting = "DELETING",
+ pending = "PENDING",
+ updating = "UPDATING"
+}
+
+export interface ListTagsForResourceRequest {
+ __type?: "ListTagsForResourceRequest";
+ /**
+ *
+ * The Amazon Resource Name (ARN) of the resource.
+ *
+ */
+ ResourceArn: string | undefined;
+}
+
+export namespace ListTagsForResourceRequest {
+ export function isa(o: any): o is ListTagsForResourceRequest {
+ return _smithy.isa(o, "ListTagsForResourceRequest");
+ }
+}
+
+export interface ListTagsForResourceResponse extends $MetadataBearer {
+ __type?: "ListTagsForResourceResponse";
+ /**
+ *
+ * The list of tags.
+ *
+ */
+ TagList?: Array;
+}
+
+export namespace ListTagsForResourceResponse {
+ export function isa(o: any): o is ListTagsForResourceResponse {
+ return _smithy.isa(o, "ListTagsForResourceResponse");
+ }
+}
+
+/**
+ *
+ * Describes a location.
+ *
+ */
+export interface Location {
+ __type?: "Location";
+ /**
+ *
+ * The physical address.
+ *
+ */
+ Address?: string;
+
+ /**
+ *
+ * The latitude.
+ *
+ */
+ Latitude?: string;
+
+ /**
+ *
+ * The longitude.
+ *
+ */
+ Longitude?: string;
+}
+
+export namespace Location {
+ export function isa(o: any): o is Location {
+ return _smithy.isa(o, "Location");
+ }
+}
+
+export interface RegisterTransitGatewayRequest {
+ __type?: "RegisterTransitGatewayRequest";
+ /**
+ *
+ * The ID of the global network.
+ *
+ */
+ GlobalNetworkId: string | undefined;
+
+ /**
+ *
+ * The Amazon Resource Name (ARN) of the transit gateway. For more information, see
+ * Resources Defined by Amazon EC2 .
+ *
+ */
+ TransitGatewayArn: string | undefined;
+}
+
+export namespace RegisterTransitGatewayRequest {
+ export function isa(o: any): o is RegisterTransitGatewayRequest {
+ return _smithy.isa(o, "RegisterTransitGatewayRequest");
+ }
+}
+
+export interface RegisterTransitGatewayResponse extends $MetadataBearer {
+ __type?: "RegisterTransitGatewayResponse";
+ /**
+ *
+ * Information about the transit gateway registration.
+ *
+ */
+ TransitGatewayRegistration?: TransitGatewayRegistration;
+}
+
+export namespace RegisterTransitGatewayResponse {
+ export function isa(o: any): o is RegisterTransitGatewayResponse {
+ return _smithy.isa(o, "RegisterTransitGatewayResponse");
+ }
+}
+
+/**
+ *
+ * The specified resource could not be found.
+ *
+ */
+export interface ResourceNotFoundException
+ extends _smithy.SmithyException,
+ $MetadataBearer {
+ __type: "ResourceNotFoundException";
+ $fault: "client";
+ Message: string | undefined;
+ /**
+ *
+ * The ID of the resource.
+ *
+ */
+ ResourceId: string | undefined;
+
+ /**
+ *
+ * The resource type.
+ *
+ */
+ ResourceType: string | undefined;
+}
+
+export namespace ResourceNotFoundException {
+ export function isa(o: any): o is ResourceNotFoundException {
+ return _smithy.isa(o, "ResourceNotFoundException");
+ }
+}
+
+/**
+ *
+ * A service limit was exceeded.
+ *
+ */
+export interface ServiceQuotaExceededException
+ extends _smithy.SmithyException,
+ $MetadataBearer {
+ __type: "ServiceQuotaExceededException";
+ $fault: "client";
+ /**
+ *
+ * The limit code.
+ *
+ */
+ LimitCode: string | undefined;
+
+ /**
+ *
+ * The error message.
+ *
+ */
+ Message: string | undefined;
+
+ /**
+ *
+ * The ID of the resource.
+ *
+ */
+ ResourceId?: string;
+
+ /**
+ *
+ * The resource type.
+ *
+ */
+ ResourceType?: string;
+
+ /**
+ *
+ * The service code.
+ *
+ */
+ ServiceCode: string | undefined;
+}
+
+export namespace ServiceQuotaExceededException {
+ export function isa(o: any): o is ServiceQuotaExceededException {
+ return _smithy.isa(o, "ServiceQuotaExceededException");
+ }
+}
+
+/**
+ *
+ * Describes a site.
+ *
+ */
+export interface Site {
+ __type?: "Site";
+ /**
+ *
+ * The date and time that the site was created.
+ *
+ */
+ CreatedAt?: Date;
+
+ /**
+ *
+ * The description of the site.
+ *
+ */
+ Description?: string;
+
+ /**
+ *
+ * The ID of the global network.
+ *
+ */
+ GlobalNetworkId?: string;
+
+ /**
+ *
+ * The location of the site.
+ *
+ */
+ Location?: Location;
+
+ /**
+ *
+ * The Amazon Resource Name (ARN) of the site.
+ *
+ */
+ SiteArn?: string;
+
+ /**
+ *
+ * The ID of the site.
+ *
+ */
+ SiteId?: string;
+
+ /**
+ *
+ * The state of the site.
+ *
+ */
+ State?: SiteState | string;
+
+ /**
+ *
+ * The tags for the site.
+ *
+ */
+ Tags?: Array;
+}
+
+export namespace Site {
+ export function isa(o: any): o is Site {
+ return _smithy.isa(o, "Site");
+ }
+}
+
+export enum SiteState {
+ available = "AVAILABLE",
+ deleting = "DELETING",
+ pending = "PENDING",
+ updating = "UPDATING"
+}
+
+/**
+ *
+ * Describes a tag.
+ *
+ */
+export interface Tag {
+ __type?: "Tag";
+ /**
+ *
+ * The tag key.
+ * Length Constraints: Maximum length of 128 characters.
+ *
+ */
+ Key?: string;
+
+ /**
+ *
+ * The tag value.
+ * Length Constraints: Maximum length of 256 characters.
+ *
+ */
+ Value?: string;
+}
+
+export namespace Tag {
+ export function isa(o: any): o is Tag {
+ return _smithy.isa(o, "Tag");
+ }
+}
+
+export interface TagResourceRequest {
+ __type?: "TagResourceRequest";
+ /**
+ *
+ * The Amazon Resource Name (ARN) of the resource.
+ *
+ */
+ ResourceArn: string | undefined;
+
+ /**
+ *
+ * The tags to apply to the specified resource.
+ *
+ */
+ Tags: Array | undefined;
+}
+
+export namespace TagResourceRequest {
+ export function isa(o: any): o is TagResourceRequest {
+ return _smithy.isa(o, "TagResourceRequest");
+ }
+}
+
+export interface TagResourceResponse extends $MetadataBearer {
+ __type?: "TagResourceResponse";
+}
+
+export namespace TagResourceResponse {
+ export function isa(o: any): o is TagResourceResponse {
+ return _smithy.isa(o, "TagResourceResponse");
+ }
+}
+
+/**
+ *
+ * The request was denied due to request throttling.
+ *
+ */
+export interface ThrottlingException
+ extends _smithy.SmithyException,
+ $MetadataBearer {
+ __type: "ThrottlingException";
+ $fault: "client";
+ Message: string | undefined;
+ /**
+ *
+ * Indicates when to retry the request.
+ *
+ */
+ RetryAfterSeconds?: number;
+}
+
+export namespace ThrottlingException {
+ export function isa(o: any): o is ThrottlingException {
+ return _smithy.isa(o, "ThrottlingException");
+ }
+}
+
+/**
+ *
+ * Describes the registration of a transit gateway to a global network.
+ *
+ */
+export interface TransitGatewayRegistration {
+ __type?: "TransitGatewayRegistration";
+ /**
+ *
+ * The ID of the global network.
+ *
+ */
+ GlobalNetworkId?: string;
+
+ /**
+ *
+ * The state of the transit gateway registration.
+ *
+ */
+ State?: TransitGatewayRegistrationStateReason;
+
+ /**
+ *
+ * The Amazon Resource Name (ARN) of the transit gateway.
+ *
+ */
+ TransitGatewayArn?: string;
+}
+
+export namespace TransitGatewayRegistration {
+ export function isa(o: any): o is TransitGatewayRegistration {
+ return _smithy.isa(o, "TransitGatewayRegistration");
+ }
+}
+
+export enum TransitGatewayRegistrationState {
+ available = "AVAILABLE",
+ deleted = "DELETED",
+ deleting = "DELETING",
+ failed = "FAILED",
+ pending = "PENDING"
+}
+
+/**
+ *
+ * Describes the status of a transit gateway registration.
+ *
+ */
+export interface TransitGatewayRegistrationStateReason {
+ __type?: "TransitGatewayRegistrationStateReason";
+ /**
+ *
+ * The code for the state reason.
+ *
+ */
+ Code?: TransitGatewayRegistrationState | string;
+
+ /**
+ *
+ * The message for the state reason.
+ *
+ */
+ Message?: string;
+}
+
+export namespace TransitGatewayRegistrationStateReason {
+ export function isa(o: any): o is TransitGatewayRegistrationStateReason {
+ return _smithy.isa(o, "TransitGatewayRegistrationStateReason");
+ }
+}
+
+export interface UntagResourceRequest {
+ __type?: "UntagResourceRequest";
+ /**
+ *
+ * The Amazon Resource Name (ARN) of the resource.
+ *
+ */
+ ResourceArn: string | undefined;
+
+ /**
+ *
+ * The tag keys to remove from the specified resource.
+ *
+ */
+ TagKeys: Array | undefined;
+}
+
+export namespace UntagResourceRequest {
+ export function isa(o: any): o is UntagResourceRequest {
+ return _smithy.isa(o, "UntagResourceRequest");
+ }
+}
+
+export interface UntagResourceResponse extends $MetadataBearer {
+ __type?: "UntagResourceResponse";
+}
+
+export namespace UntagResourceResponse {
+ export function isa(o: any): o is UntagResourceResponse {
+ return _smithy.isa(o, "UntagResourceResponse");
+ }
+}
+
+export interface UpdateDeviceRequest {
+ __type?: "UpdateDeviceRequest";
+ /**
+ *
+ * A description of the device.
+ * Length Constraints: Maximum length of 256 characters.
+ *
+ */
+ Description?: string;
+
+ /**
+ *
+ * The ID of the device.
+ *
+ */
+ DeviceId: string | undefined;
+
+ /**
+ *
+ * The ID of the global network.
+ *
+ */
+ GlobalNetworkId: string | undefined;
+
+ /**
+ *
+ * Describes a location.
+ *
+ */
+ Location?: Location;
+
+ /**
+ *
+ * The model of the device.
+ * Length Constraints: Maximum length of 128 characters.
+ *
+ */
+ Model?: string;
+
+ /**
+ *
+ * The serial number of the device.
+ * Length Constraints: Maximum length of 128 characters.
+ *
+ */
+ SerialNumber?: string;
+
+ /**
+ *
+ * The ID of the site.
+ *
+ */
+ SiteId?: string;
+
+ /**
+ *
+ * The type of the device.
+ *
+ */
+ Type?: string;
+
+ /**
+ *
+ * The vendor of the device.
+ * Length Constraints: Maximum length of 128 characters.
+ *
+ */
+ Vendor?: string;
+}
+
+export namespace UpdateDeviceRequest {
+ export function isa(o: any): o is UpdateDeviceRequest {
+ return _smithy.isa(o, "UpdateDeviceRequest");
+ }
+}
+
+export interface UpdateDeviceResponse extends $MetadataBearer {
+ __type?: "UpdateDeviceResponse";
+ /**
+ *
+ * Information about the device.
+ *
+ */
+ Device?: Device;
+}
+
+export namespace UpdateDeviceResponse {
+ export function isa(o: any): o is UpdateDeviceResponse {
+ return _smithy.isa(o, "UpdateDeviceResponse");
+ }
+}
+
+export interface UpdateGlobalNetworkRequest {
+ __type?: "UpdateGlobalNetworkRequest";
+ /**
+ *
+ * A description of the global network.
+ * Length Constraints: Maximum length of 256 characters.
+ *
+ */
+ Description?: string;
+
+ /**
+ *
+ * The ID of your global network.
+ *
+ */
+ GlobalNetworkId: string | undefined;
+}
+
+export namespace UpdateGlobalNetworkRequest {
+ export function isa(o: any): o is UpdateGlobalNetworkRequest {
+ return _smithy.isa(o, "UpdateGlobalNetworkRequest");
+ }
+}
+
+export interface UpdateGlobalNetworkResponse extends $MetadataBearer {
+ __type?: "UpdateGlobalNetworkResponse";
+ /**
+ *
+ * Information about the global network object.
+ *
+ */
+ GlobalNetwork?: GlobalNetwork;
+}
+
+export namespace UpdateGlobalNetworkResponse {
+ export function isa(o: any): o is UpdateGlobalNetworkResponse {
+ return _smithy.isa(o, "UpdateGlobalNetworkResponse");
+ }
+}
+
+export interface UpdateLinkRequest {
+ __type?: "UpdateLinkRequest";
+ /**
+ *
+ * The upload and download speed in Mbps.
+ *
+ */
+ Bandwidth?: Bandwidth;
+
+ /**
+ *
+ * A description of the link.
+ * Length Constraints: Maximum length of 256 characters.
+ *
+ */
+ Description?: string;
+
+ /**
+ *
+ * The ID of the global network.
+ *
+ */
+ GlobalNetworkId: string | undefined;
+
+ /**
+ *
+ * The ID of the link.
+ *
+ */
+ LinkId: string | undefined;
+
+ /**
+ *
+ * The provider of the link.
+ * Length Constraints: Maximum length of 128 characters.
+ *
+ */
+ Provider?: string;
+
+ /**
+ *
+ * The type of the link.
+ * Length Constraints: Maximum length of 128 characters.
+ *
+ */
+ Type?: string;
+}
+
+export namespace UpdateLinkRequest {
+ export function isa(o: any): o is UpdateLinkRequest {
+ return _smithy.isa(o, "UpdateLinkRequest");
+ }
+}
+
+export interface UpdateLinkResponse extends $MetadataBearer {
+ __type?: "UpdateLinkResponse";
+ /**
+ *
+ * Information about the link.
+ *
+ */
+ Link?: Link;
+}
+
+export namespace UpdateLinkResponse {
+ export function isa(o: any): o is UpdateLinkResponse {
+ return _smithy.isa(o, "UpdateLinkResponse");
+ }
+}
+
+export interface UpdateSiteRequest {
+ __type?: "UpdateSiteRequest";
+ /**
+ *
+ * A description of your site.
+ * Length Constraints: Maximum length of 256 characters.
+ *
+ */
+ Description?: string;
+
+ /**
+ *
+ * The ID of the global network.
+ *
+ */
+ GlobalNetworkId: string | undefined;
+
+ /**
+ *
+ * The site location:
+ *
+ *
+ *
+ * Address
: The physical address of the site.
+ *
+ *
+ *
+ * Latitude
: The latitude of the site.
+ *
+ *
+ *
+ * Longitude
: The longitude of the site.
+ *
+ *
+ *
+ */
+ Location?: Location;
+
+ /**
+ *
+ * The ID of your site.
+ *
+ */
+ SiteId: string | undefined;
+}
+
+export namespace UpdateSiteRequest {
+ export function isa(o: any): o is UpdateSiteRequest {
+ return _smithy.isa(o, "UpdateSiteRequest");
+ }
+}
+
+export interface UpdateSiteResponse extends $MetadataBearer {
+ __type?: "UpdateSiteResponse";
+ /**
+ *
+ * Information about the site.
+ *
+ */
+ Site?: Site;
+}
+
+export namespace UpdateSiteResponse {
+ export function isa(o: any): o is UpdateSiteResponse {
+ return _smithy.isa(o, "UpdateSiteResponse");
+ }
+}
+
+/**
+ *
+ * The input fails to satisfy the constraints.
+ *
+ */
+export interface ValidationException
+ extends _smithy.SmithyException,
+ $MetadataBearer {
+ __type: "ValidationException";
+ $fault: "client";
+ /**
+ *
+ * The fields that caused the error, if applicable.
+ *
+ */
+ Fields?: Array;
+
+ Message: string | undefined;
+ /**
+ *
+ * The reason for the error.
+ *
+ */
+ Reason?: ValidationExceptionReason | string;
+}
+
+export namespace ValidationException {
+ export function isa(o: any): o is ValidationException {
+ return _smithy.isa(o, "ValidationException");
+ }
+}
+
+/**
+ *
+ * Describes a validation exception for a field.
+ *
+ */
+export interface ValidationExceptionField {
+ __type?: "ValidationExceptionField";
+ /**
+ *
+ * The message for the field.
+ *
+ */
+ Message: string | undefined;
+
+ /**
+ *
+ * The name of the field.
+ *
+ */
+ Name: string | undefined;
+}
+
+export namespace ValidationExceptionField {
+ export function isa(o: any): o is ValidationExceptionField {
+ return _smithy.isa(o, "ValidationExceptionField");
+ }
+}
+
+export enum ValidationExceptionReason {
+ CANNOT_PARSE = "CannotParse",
+ FIELD_VALIDATION_FAILED = "FieldValidationFailed",
+ OTHER = "Other",
+ UNKNOWN_OPERATION = "UnknownOperation"
+}
diff --git a/clients/client-networkmanager/package.json b/clients/client-networkmanager/package.json
new file mode 100644
index 000000000000..2f45ee6a4528
--- /dev/null
+++ b/clients/client-networkmanager/package.json
@@ -0,0 +1,75 @@
+{
+ "name": "@aws-sdk/client-networkmanager",
+ "description": "@aws-sdk/client-networkmanager client",
+ "version": "0.1.0-preview.1",
+ "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-networkmanager/protocols/Aws_restJson1_1.ts b/clients/client-networkmanager/protocols/Aws_restJson1_1.ts
new file mode 100644
index 000000000000..f923fe359b1f
--- /dev/null
+++ b/clients/client-networkmanager/protocols/Aws_restJson1_1.ts
@@ -0,0 +1,4447 @@
+import {
+ AssociateCustomerGatewayCommandInput,
+ AssociateCustomerGatewayCommandOutput
+} from "../commands/AssociateCustomerGatewayCommand";
+import {
+ AssociateLinkCommandInput,
+ AssociateLinkCommandOutput
+} from "../commands/AssociateLinkCommand";
+import {
+ CreateDeviceCommandInput,
+ CreateDeviceCommandOutput
+} from "../commands/CreateDeviceCommand";
+import {
+ CreateGlobalNetworkCommandInput,
+ CreateGlobalNetworkCommandOutput
+} from "../commands/CreateGlobalNetworkCommand";
+import {
+ CreateLinkCommandInput,
+ CreateLinkCommandOutput
+} from "../commands/CreateLinkCommand";
+import {
+ CreateSiteCommandInput,
+ CreateSiteCommandOutput
+} from "../commands/CreateSiteCommand";
+import {
+ DeleteDeviceCommandInput,
+ DeleteDeviceCommandOutput
+} from "../commands/DeleteDeviceCommand";
+import {
+ DeleteGlobalNetworkCommandInput,
+ DeleteGlobalNetworkCommandOutput
+} from "../commands/DeleteGlobalNetworkCommand";
+import {
+ DeleteLinkCommandInput,
+ DeleteLinkCommandOutput
+} from "../commands/DeleteLinkCommand";
+import {
+ DeleteSiteCommandInput,
+ DeleteSiteCommandOutput
+} from "../commands/DeleteSiteCommand";
+import {
+ DeregisterTransitGatewayCommandInput,
+ DeregisterTransitGatewayCommandOutput
+} from "../commands/DeregisterTransitGatewayCommand";
+import {
+ DescribeGlobalNetworksCommandInput,
+ DescribeGlobalNetworksCommandOutput
+} from "../commands/DescribeGlobalNetworksCommand";
+import {
+ DisassociateCustomerGatewayCommandInput,
+ DisassociateCustomerGatewayCommandOutput
+} from "../commands/DisassociateCustomerGatewayCommand";
+import {
+ DisassociateLinkCommandInput,
+ DisassociateLinkCommandOutput
+} from "../commands/DisassociateLinkCommand";
+import {
+ GetCustomerGatewayAssociationsCommandInput,
+ GetCustomerGatewayAssociationsCommandOutput
+} from "../commands/GetCustomerGatewayAssociationsCommand";
+import {
+ GetDevicesCommandInput,
+ GetDevicesCommandOutput
+} from "../commands/GetDevicesCommand";
+import {
+ GetLinkAssociationsCommandInput,
+ GetLinkAssociationsCommandOutput
+} from "../commands/GetLinkAssociationsCommand";
+import {
+ GetLinksCommandInput,
+ GetLinksCommandOutput
+} from "../commands/GetLinksCommand";
+import {
+ GetSitesCommandInput,
+ GetSitesCommandOutput
+} from "../commands/GetSitesCommand";
+import {
+ GetTransitGatewayRegistrationsCommandInput,
+ GetTransitGatewayRegistrationsCommandOutput
+} from "../commands/GetTransitGatewayRegistrationsCommand";
+import {
+ ListTagsForResourceCommandInput,
+ ListTagsForResourceCommandOutput
+} from "../commands/ListTagsForResourceCommand";
+import {
+ RegisterTransitGatewayCommandInput,
+ RegisterTransitGatewayCommandOutput
+} from "../commands/RegisterTransitGatewayCommand";
+import {
+ TagResourceCommandInput,
+ TagResourceCommandOutput
+} from "../commands/TagResourceCommand";
+import {
+ UntagResourceCommandInput,
+ UntagResourceCommandOutput
+} from "../commands/UntagResourceCommand";
+import {
+ UpdateDeviceCommandInput,
+ UpdateDeviceCommandOutput
+} from "../commands/UpdateDeviceCommand";
+import {
+ UpdateGlobalNetworkCommandInput,
+ UpdateGlobalNetworkCommandOutput
+} from "../commands/UpdateGlobalNetworkCommand";
+import {
+ UpdateLinkCommandInput,
+ UpdateLinkCommandOutput
+} from "../commands/UpdateLinkCommand";
+import {
+ UpdateSiteCommandInput,
+ UpdateSiteCommandOutput
+} from "../commands/UpdateSiteCommand";
+import {
+ AccessDeniedException,
+ Bandwidth,
+ ConflictException,
+ CustomerGatewayAssociation,
+ Device,
+ GlobalNetwork,
+ InternalServerException,
+ Link,
+ LinkAssociation,
+ Location,
+ ResourceNotFoundException,
+ ServiceQuotaExceededException,
+ Site,
+ Tag,
+ ThrottlingException,
+ TransitGatewayRegistration,
+ TransitGatewayRegistrationStateReason,
+ ValidationException,
+ ValidationExceptionField
+} from "../models/index";
+import {
+ HttpRequest as __HttpRequest,
+ HttpResponse as __HttpResponse
+} from "@aws-sdk/protocol-http";
+import { SmithyException as __SmithyException } from "@aws-sdk/smithy-client";
+import {
+ Endpoint as __Endpoint,
+ MetadataBearer as __MetadataBearer,
+ ResponseMetadata as __ResponseMetadata,
+ SerdeContext as __SerdeContext
+} from "@aws-sdk/types";
+
+export async function serializeAws_restJson1_1AssociateCustomerGatewayCommand(
+ input: AssociateCustomerGatewayCommandInput,
+ context: __SerdeContext
+): Promise<__HttpRequest> {
+ const headers: any = {};
+ headers["Content-Type"] = "application/json";
+ let resolvedPath =
+ "/global-networks/{GlobalNetworkId}/customer-gateway-associations";
+ if (input.GlobalNetworkId !== undefined) {
+ const labelValue: any = input.GlobalNetworkId.toString();
+ if (labelValue.length <= 0) {
+ throw new Error(
+ "Empty value provided for input HTTP label: GlobalNetworkId."
+ );
+ }
+ resolvedPath = resolvedPath.replace("{GlobalNetworkId}", labelValue);
+ } else {
+ throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
+ }
+ let body: any = {};
+ const bodyParams: any = {};
+ if (input.CustomerGatewayArn !== undefined) {
+ bodyParams["CustomerGatewayArn"] = input.CustomerGatewayArn;
+ }
+ if (input.DeviceId !== undefined) {
+ bodyParams["DeviceId"] = input.DeviceId;
+ }
+ if (input.LinkId !== undefined) {
+ bodyParams["LinkId"] = input.LinkId;
+ }
+ body = JSON.stringify(bodyParams);
+ return new __HttpRequest({
+ ...context.endpoint,
+ protocol: "https",
+ method: "POST",
+ headers: headers,
+ path: resolvedPath,
+ body: body
+ });
+}
+
+export async function serializeAws_restJson1_1AssociateLinkCommand(
+ input: AssociateLinkCommandInput,
+ context: __SerdeContext
+): Promise<__HttpRequest> {
+ const headers: any = {};
+ headers["Content-Type"] = "application/json";
+ let resolvedPath = "/global-networks/{GlobalNetworkId}/link-associations";
+ if (input.GlobalNetworkId !== undefined) {
+ const labelValue: any = input.GlobalNetworkId.toString();
+ if (labelValue.length <= 0) {
+ throw new Error(
+ "Empty value provided for input HTTP label: GlobalNetworkId."
+ );
+ }
+ resolvedPath = resolvedPath.replace("{GlobalNetworkId}", labelValue);
+ } else {
+ throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
+ }
+ let body: any = {};
+ const bodyParams: any = {};
+ if (input.DeviceId !== undefined) {
+ bodyParams["DeviceId"] = input.DeviceId;
+ }
+ if (input.LinkId !== undefined) {
+ bodyParams["LinkId"] = input.LinkId;
+ }
+ body = JSON.stringify(bodyParams);
+ return new __HttpRequest({
+ ...context.endpoint,
+ protocol: "https",
+ method: "POST",
+ headers: headers,
+ path: resolvedPath,
+ body: body
+ });
+}
+
+export async function serializeAws_restJson1_1CreateDeviceCommand(
+ input: CreateDeviceCommandInput,
+ context: __SerdeContext
+): Promise<__HttpRequest> {
+ const headers: any = {};
+ headers["Content-Type"] = "application/json";
+ let resolvedPath = "/global-networks/{GlobalNetworkId}/devices";
+ if (input.GlobalNetworkId !== undefined) {
+ const labelValue: any = input.GlobalNetworkId.toString();
+ if (labelValue.length <= 0) {
+ throw new Error(
+ "Empty value provided for input HTTP label: GlobalNetworkId."
+ );
+ }
+ resolvedPath = resolvedPath.replace("{GlobalNetworkId}", labelValue);
+ } else {
+ throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
+ }
+ let body: any = {};
+ const bodyParams: any = {};
+ if (input.Description !== undefined) {
+ bodyParams["Description"] = input.Description;
+ }
+ if (input.Location !== undefined) {
+ bodyParams["Location"] = serializeAws_restJson1_1Location(
+ input.Location,
+ context
+ );
+ }
+ if (input.Model !== undefined) {
+ bodyParams["Model"] = input.Model;
+ }
+ if (input.SerialNumber !== undefined) {
+ bodyParams["SerialNumber"] = input.SerialNumber;
+ }
+ if (input.SiteId !== undefined) {
+ bodyParams["SiteId"] = input.SiteId;
+ }
+ if (input.Tags !== undefined) {
+ bodyParams["Tags"] = serializeAws_restJson1_1TagList(input.Tags, context);
+ }
+ if (input.Type !== undefined) {
+ bodyParams["Type"] = input.Type;
+ }
+ if (input.Vendor !== undefined) {
+ bodyParams["Vendor"] = input.Vendor;
+ }
+ body = JSON.stringify(bodyParams);
+ return new __HttpRequest({
+ ...context.endpoint,
+ protocol: "https",
+ method: "POST",
+ headers: headers,
+ path: resolvedPath,
+ body: body
+ });
+}
+
+export async function serializeAws_restJson1_1CreateGlobalNetworkCommand(
+ input: CreateGlobalNetworkCommandInput,
+ context: __SerdeContext
+): Promise<__HttpRequest> {
+ const headers: any = {};
+ headers["Content-Type"] = "application/json";
+ let resolvedPath = "/global-networks";
+ let body: any = {};
+ const bodyParams: any = {};
+ if (input.Description !== undefined) {
+ bodyParams["Description"] = input.Description;
+ }
+ if (input.Tags !== undefined) {
+ bodyParams["Tags"] = serializeAws_restJson1_1TagList(input.Tags, context);
+ }
+ body = JSON.stringify(bodyParams);
+ return new __HttpRequest({
+ ...context.endpoint,
+ protocol: "https",
+ method: "POST",
+ headers: headers,
+ path: resolvedPath,
+ body: body
+ });
+}
+
+export async function serializeAws_restJson1_1CreateLinkCommand(
+ input: CreateLinkCommandInput,
+ context: __SerdeContext
+): Promise<__HttpRequest> {
+ const headers: any = {};
+ headers["Content-Type"] = "application/json";
+ let resolvedPath = "/global-networks/{GlobalNetworkId}/links";
+ if (input.GlobalNetworkId !== undefined) {
+ const labelValue: any = input.GlobalNetworkId.toString();
+ if (labelValue.length <= 0) {
+ throw new Error(
+ "Empty value provided for input HTTP label: GlobalNetworkId."
+ );
+ }
+ resolvedPath = resolvedPath.replace("{GlobalNetworkId}", labelValue);
+ } else {
+ throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
+ }
+ let body: any = {};
+ const bodyParams: any = {};
+ if (input.Bandwidth !== undefined) {
+ bodyParams["Bandwidth"] = serializeAws_restJson1_1Bandwidth(
+ input.Bandwidth,
+ context
+ );
+ }
+ if (input.Description !== undefined) {
+ bodyParams["Description"] = input.Description;
+ }
+ if (input.Provider !== undefined) {
+ bodyParams["Provider"] = input.Provider;
+ }
+ if (input.SiteId !== undefined) {
+ bodyParams["SiteId"] = input.SiteId;
+ }
+ if (input.Tags !== undefined) {
+ bodyParams["Tags"] = serializeAws_restJson1_1TagList(input.Tags, context);
+ }
+ if (input.Type !== undefined) {
+ bodyParams["Type"] = input.Type;
+ }
+ body = JSON.stringify(bodyParams);
+ return new __HttpRequest({
+ ...context.endpoint,
+ protocol: "https",
+ method: "POST",
+ headers: headers,
+ path: resolvedPath,
+ body: body
+ });
+}
+
+export async function serializeAws_restJson1_1CreateSiteCommand(
+ input: CreateSiteCommandInput,
+ context: __SerdeContext
+): Promise<__HttpRequest> {
+ const headers: any = {};
+ headers["Content-Type"] = "application/json";
+ let resolvedPath = "/global-networks/{GlobalNetworkId}/sites";
+ if (input.GlobalNetworkId !== undefined) {
+ const labelValue: any = input.GlobalNetworkId.toString();
+ if (labelValue.length <= 0) {
+ throw new Error(
+ "Empty value provided for input HTTP label: GlobalNetworkId."
+ );
+ }
+ resolvedPath = resolvedPath.replace("{GlobalNetworkId}", labelValue);
+ } else {
+ throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
+ }
+ let body: any = {};
+ const bodyParams: any = {};
+ if (input.Description !== undefined) {
+ bodyParams["Description"] = input.Description;
+ }
+ if (input.Location !== undefined) {
+ bodyParams["Location"] = serializeAws_restJson1_1Location(
+ input.Location,
+ context
+ );
+ }
+ if (input.Tags !== undefined) {
+ bodyParams["Tags"] = serializeAws_restJson1_1TagList(input.Tags, context);
+ }
+ body = JSON.stringify(bodyParams);
+ return new __HttpRequest({
+ ...context.endpoint,
+ protocol: "https",
+ method: "POST",
+ headers: headers,
+ path: resolvedPath,
+ body: body
+ });
+}
+
+export async function serializeAws_restJson1_1DeleteDeviceCommand(
+ input: DeleteDeviceCommandInput,
+ context: __SerdeContext
+): Promise<__HttpRequest> {
+ const headers: any = {};
+ headers["Content-Type"] = "";
+ let resolvedPath = "/global-networks/{GlobalNetworkId}/devices/{DeviceId}";
+ if (input.DeviceId !== undefined) {
+ const labelValue: any = input.DeviceId.toString();
+ if (labelValue.length <= 0) {
+ throw new Error("Empty value provided for input HTTP label: DeviceId.");
+ }
+ resolvedPath = resolvedPath.replace("{DeviceId}", labelValue);
+ } else {
+ throw new Error("No value provided for input HTTP label: DeviceId.");
+ }
+ if (input.GlobalNetworkId !== undefined) {
+ const labelValue: any = input.GlobalNetworkId.toString();
+ if (labelValue.length <= 0) {
+ throw new Error(
+ "Empty value provided for input HTTP label: GlobalNetworkId."
+ );
+ }
+ resolvedPath = resolvedPath.replace("{GlobalNetworkId}", labelValue);
+ } else {
+ throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
+ }
+ return new __HttpRequest({
+ ...context.endpoint,
+ protocol: "https",
+ method: "DELETE",
+ headers: headers,
+ path: resolvedPath
+ });
+}
+
+export async function serializeAws_restJson1_1DeleteGlobalNetworkCommand(
+ input: DeleteGlobalNetworkCommandInput,
+ context: __SerdeContext
+): Promise<__HttpRequest> {
+ const headers: any = {};
+ headers["Content-Type"] = "";
+ let resolvedPath = "/global-networks/{GlobalNetworkId}";
+ if (input.GlobalNetworkId !== undefined) {
+ const labelValue: any = input.GlobalNetworkId.toString();
+ if (labelValue.length <= 0) {
+ throw new Error(
+ "Empty value provided for input HTTP label: GlobalNetworkId."
+ );
+ }
+ resolvedPath = resolvedPath.replace("{GlobalNetworkId}", labelValue);
+ } else {
+ throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
+ }
+ return new __HttpRequest({
+ ...context.endpoint,
+ protocol: "https",
+ method: "DELETE",
+ headers: headers,
+ path: resolvedPath
+ });
+}
+
+export async function serializeAws_restJson1_1DeleteLinkCommand(
+ input: DeleteLinkCommandInput,
+ context: __SerdeContext
+): Promise<__HttpRequest> {
+ const headers: any = {};
+ headers["Content-Type"] = "";
+ let resolvedPath = "/global-networks/{GlobalNetworkId}/links/{LinkId}";
+ if (input.GlobalNetworkId !== undefined) {
+ const labelValue: any = input.GlobalNetworkId.toString();
+ if (labelValue.length <= 0) {
+ throw new Error(
+ "Empty value provided for input HTTP label: GlobalNetworkId."
+ );
+ }
+ resolvedPath = resolvedPath.replace("{GlobalNetworkId}", labelValue);
+ } else {
+ throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
+ }
+ if (input.LinkId !== undefined) {
+ const labelValue: any = input.LinkId.toString();
+ if (labelValue.length <= 0) {
+ throw new Error("Empty value provided for input HTTP label: LinkId.");
+ }
+ resolvedPath = resolvedPath.replace("{LinkId}", labelValue);
+ } else {
+ throw new Error("No value provided for input HTTP label: LinkId.");
+ }
+ return new __HttpRequest({
+ ...context.endpoint,
+ protocol: "https",
+ method: "DELETE",
+ headers: headers,
+ path: resolvedPath
+ });
+}
+
+export async function serializeAws_restJson1_1DeleteSiteCommand(
+ input: DeleteSiteCommandInput,
+ context: __SerdeContext
+): Promise<__HttpRequest> {
+ const headers: any = {};
+ headers["Content-Type"] = "";
+ let resolvedPath = "/global-networks/{GlobalNetworkId}/sites/{SiteId}";
+ if (input.GlobalNetworkId !== undefined) {
+ const labelValue: any = input.GlobalNetworkId.toString();
+ if (labelValue.length <= 0) {
+ throw new Error(
+ "Empty value provided for input HTTP label: GlobalNetworkId."
+ );
+ }
+ resolvedPath = resolvedPath.replace("{GlobalNetworkId}", labelValue);
+ } else {
+ throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
+ }
+ if (input.SiteId !== undefined) {
+ const labelValue: any = input.SiteId.toString();
+ if (labelValue.length <= 0) {
+ throw new Error("Empty value provided for input HTTP label: SiteId.");
+ }
+ resolvedPath = resolvedPath.replace("{SiteId}", labelValue);
+ } else {
+ throw new Error("No value provided for input HTTP label: SiteId.");
+ }
+ return new __HttpRequest({
+ ...context.endpoint,
+ protocol: "https",
+ method: "DELETE",
+ headers: headers,
+ path: resolvedPath
+ });
+}
+
+export async function serializeAws_restJson1_1DeregisterTransitGatewayCommand(
+ input: DeregisterTransitGatewayCommandInput,
+ context: __SerdeContext
+): Promise<__HttpRequest> {
+ const headers: any = {};
+ headers["Content-Type"] = "";
+ let resolvedPath =
+ "/global-networks/{GlobalNetworkId}/transit-gateway-registrations/{TransitGatewayArn}";
+ if (input.GlobalNetworkId !== undefined) {
+ const labelValue: any = input.GlobalNetworkId.toString();
+ if (labelValue.length <= 0) {
+ throw new Error(
+ "Empty value provided for input HTTP label: GlobalNetworkId."
+ );
+ }
+ resolvedPath = resolvedPath.replace("{GlobalNetworkId}", labelValue);
+ } else {
+ throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
+ }
+ if (input.TransitGatewayArn !== undefined) {
+ const labelValue: any = input.TransitGatewayArn.toString();
+ if (labelValue.length <= 0) {
+ throw new Error(
+ "Empty value provided for input HTTP label: TransitGatewayArn."
+ );
+ }
+ resolvedPath = resolvedPath.replace("{TransitGatewayArn}", labelValue);
+ } else {
+ throw new Error(
+ "No value provided for input HTTP label: TransitGatewayArn."
+ );
+ }
+ return new __HttpRequest({
+ ...context.endpoint,
+ protocol: "https",
+ method: "DELETE",
+ headers: headers,
+ path: resolvedPath
+ });
+}
+
+export async function serializeAws_restJson1_1DescribeGlobalNetworksCommand(
+ input: DescribeGlobalNetworksCommandInput,
+ context: __SerdeContext
+): Promise<__HttpRequest> {
+ const headers: any = {};
+ headers["Content-Type"] = "";
+ let resolvedPath = "/global-networks";
+ const query: any = {};
+ if (input.GlobalNetworkIds !== undefined) {
+ query["globalNetworkIds"] = input.GlobalNetworkIds;
+ }
+ if (input.MaxResults !== undefined) {
+ query["maxResults"] = input.MaxResults.toString();
+ }
+ if (input.NextToken !== undefined) {
+ query["nextToken"] = input.NextToken.toString();
+ }
+ return new __HttpRequest({
+ ...context.endpoint,
+ protocol: "https",
+ method: "GET",
+ headers: headers,
+ path: resolvedPath,
+ query: query
+ });
+}
+
+export async function serializeAws_restJson1_1DisassociateCustomerGatewayCommand(
+ input: DisassociateCustomerGatewayCommandInput,
+ context: __SerdeContext
+): Promise<__HttpRequest> {
+ const headers: any = {};
+ headers["Content-Type"] = "";
+ let resolvedPath =
+ "/global-networks/{GlobalNetworkId}/customer-gateway-associations/{CustomerGatewayArn}";
+ if (input.CustomerGatewayArn !== undefined) {
+ const labelValue: any = input.CustomerGatewayArn.toString();
+ if (labelValue.length <= 0) {
+ throw new Error(
+ "Empty value provided for input HTTP label: CustomerGatewayArn."
+ );
+ }
+ resolvedPath = resolvedPath.replace("{CustomerGatewayArn}", labelValue);
+ } else {
+ throw new Error(
+ "No value provided for input HTTP label: CustomerGatewayArn."
+ );
+ }
+ if (input.GlobalNetworkId !== undefined) {
+ const labelValue: any = input.GlobalNetworkId.toString();
+ if (labelValue.length <= 0) {
+ throw new Error(
+ "Empty value provided for input HTTP label: GlobalNetworkId."
+ );
+ }
+ resolvedPath = resolvedPath.replace("{GlobalNetworkId}", labelValue);
+ } else {
+ throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
+ }
+ return new __HttpRequest({
+ ...context.endpoint,
+ protocol: "https",
+ method: "DELETE",
+ headers: headers,
+ path: resolvedPath
+ });
+}
+
+export async function serializeAws_restJson1_1DisassociateLinkCommand(
+ input: DisassociateLinkCommandInput,
+ context: __SerdeContext
+): Promise<__HttpRequest> {
+ const headers: any = {};
+ headers["Content-Type"] = "";
+ let resolvedPath = "/global-networks/{GlobalNetworkId}/link-associations";
+ if (input.GlobalNetworkId !== undefined) {
+ const labelValue: any = input.GlobalNetworkId.toString();
+ if (labelValue.length <= 0) {
+ throw new Error(
+ "Empty value provided for input HTTP label: GlobalNetworkId."
+ );
+ }
+ resolvedPath = resolvedPath.replace("{GlobalNetworkId}", labelValue);
+ } else {
+ throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
+ }
+ const query: any = {};
+ if (input.DeviceId !== undefined) {
+ query["deviceId"] = input.DeviceId.toString();
+ }
+ if (input.LinkId !== undefined) {
+ query["linkId"] = input.LinkId.toString();
+ }
+ return new __HttpRequest({
+ ...context.endpoint,
+ protocol: "https",
+ method: "DELETE",
+ headers: headers,
+ path: resolvedPath,
+ query: query
+ });
+}
+
+export async function serializeAws_restJson1_1GetCustomerGatewayAssociationsCommand(
+ input: GetCustomerGatewayAssociationsCommandInput,
+ context: __SerdeContext
+): Promise<__HttpRequest> {
+ const headers: any = {};
+ headers["Content-Type"] = "";
+ let resolvedPath =
+ "/global-networks/{GlobalNetworkId}/customer-gateway-associations";
+ if (input.GlobalNetworkId !== undefined) {
+ const labelValue: any = input.GlobalNetworkId.toString();
+ if (labelValue.length <= 0) {
+ throw new Error(
+ "Empty value provided for input HTTP label: GlobalNetworkId."
+ );
+ }
+ resolvedPath = resolvedPath.replace("{GlobalNetworkId}", labelValue);
+ } else {
+ throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
+ }
+ const query: any = {};
+ if (input.CustomerGatewayArns !== undefined) {
+ query["customerGatewayArns"] = input.CustomerGatewayArns;
+ }
+ if (input.MaxResults !== undefined) {
+ query["maxResults"] = input.MaxResults.toString();
+ }
+ if (input.NextToken !== undefined) {
+ query["nextToken"] = input.NextToken.toString();
+ }
+ return new __HttpRequest({
+ ...context.endpoint,
+ protocol: "https",
+ method: "GET",
+ headers: headers,
+ path: resolvedPath,
+ query: query
+ });
+}
+
+export async function serializeAws_restJson1_1GetDevicesCommand(
+ input: GetDevicesCommandInput,
+ context: __SerdeContext
+): Promise<__HttpRequest> {
+ const headers: any = {};
+ headers["Content-Type"] = "";
+ let resolvedPath = "/global-networks/{GlobalNetworkId}/devices";
+ if (input.GlobalNetworkId !== undefined) {
+ const labelValue: any = input.GlobalNetworkId.toString();
+ if (labelValue.length <= 0) {
+ throw new Error(
+ "Empty value provided for input HTTP label: GlobalNetworkId."
+ );
+ }
+ resolvedPath = resolvedPath.replace("{GlobalNetworkId}", labelValue);
+ } else {
+ throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
+ }
+ const query: any = {};
+ if (input.DeviceIds !== undefined) {
+ query["deviceIds"] = input.DeviceIds;
+ }
+ if (input.MaxResults !== undefined) {
+ query["maxResults"] = input.MaxResults.toString();
+ }
+ if (input.NextToken !== undefined) {
+ query["nextToken"] = input.NextToken.toString();
+ }
+ if (input.SiteId !== undefined) {
+ query["siteId"] = input.SiteId.toString();
+ }
+ return new __HttpRequest({
+ ...context.endpoint,
+ protocol: "https",
+ method: "GET",
+ headers: headers,
+ path: resolvedPath,
+ query: query
+ });
+}
+
+export async function serializeAws_restJson1_1GetLinkAssociationsCommand(
+ input: GetLinkAssociationsCommandInput,
+ context: __SerdeContext
+): Promise<__HttpRequest> {
+ const headers: any = {};
+ headers["Content-Type"] = "";
+ let resolvedPath = "/global-networks/{GlobalNetworkId}/link-associations";
+ if (input.GlobalNetworkId !== undefined) {
+ const labelValue: any = input.GlobalNetworkId.toString();
+ if (labelValue.length <= 0) {
+ throw new Error(
+ "Empty value provided for input HTTP label: GlobalNetworkId."
+ );
+ }
+ resolvedPath = resolvedPath.replace("{GlobalNetworkId}", labelValue);
+ } else {
+ throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
+ }
+ const query: any = {};
+ if (input.DeviceId !== undefined) {
+ query["deviceId"] = input.DeviceId.toString();
+ }
+ if (input.LinkId !== undefined) {
+ query["linkId"] = input.LinkId.toString();
+ }
+ if (input.MaxResults !== undefined) {
+ query["maxResults"] = input.MaxResults.toString();
+ }
+ if (input.NextToken !== undefined) {
+ query["nextToken"] = input.NextToken.toString();
+ }
+ return new __HttpRequest({
+ ...context.endpoint,
+ protocol: "https",
+ method: "GET",
+ headers: headers,
+ path: resolvedPath,
+ query: query
+ });
+}
+
+export async function serializeAws_restJson1_1GetLinksCommand(
+ input: GetLinksCommandInput,
+ context: __SerdeContext
+): Promise<__HttpRequest> {
+ const headers: any = {};
+ headers["Content-Type"] = "";
+ let resolvedPath = "/global-networks/{GlobalNetworkId}/links";
+ if (input.GlobalNetworkId !== undefined) {
+ const labelValue: any = input.GlobalNetworkId.toString();
+ if (labelValue.length <= 0) {
+ throw new Error(
+ "Empty value provided for input HTTP label: GlobalNetworkId."
+ );
+ }
+ resolvedPath = resolvedPath.replace("{GlobalNetworkId}", labelValue);
+ } else {
+ throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
+ }
+ const query: any = {};
+ if (input.LinkIds !== undefined) {
+ query["linkIds"] = input.LinkIds;
+ }
+ if (input.MaxResults !== undefined) {
+ query["maxResults"] = input.MaxResults.toString();
+ }
+ if (input.NextToken !== undefined) {
+ query["nextToken"] = input.NextToken.toString();
+ }
+ if (input.Provider !== undefined) {
+ query["provider"] = input.Provider.toString();
+ }
+ if (input.SiteId !== undefined) {
+ query["siteId"] = input.SiteId.toString();
+ }
+ if (input.Type !== undefined) {
+ query["type"] = input.Type.toString();
+ }
+ return new __HttpRequest({
+ ...context.endpoint,
+ protocol: "https",
+ method: "GET",
+ headers: headers,
+ path: resolvedPath,
+ query: query
+ });
+}
+
+export async function serializeAws_restJson1_1GetSitesCommand(
+ input: GetSitesCommandInput,
+ context: __SerdeContext
+): Promise<__HttpRequest> {
+ const headers: any = {};
+ headers["Content-Type"] = "";
+ let resolvedPath = "/global-networks/{GlobalNetworkId}/sites";
+ if (input.GlobalNetworkId !== undefined) {
+ const labelValue: any = input.GlobalNetworkId.toString();
+ if (labelValue.length <= 0) {
+ throw new Error(
+ "Empty value provided for input HTTP label: GlobalNetworkId."
+ );
+ }
+ resolvedPath = resolvedPath.replace("{GlobalNetworkId}", labelValue);
+ } else {
+ throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
+ }
+ const query: any = {};
+ if (input.MaxResults !== undefined) {
+ query["maxResults"] = input.MaxResults.toString();
+ }
+ if (input.NextToken !== undefined) {
+ query["nextToken"] = input.NextToken.toString();
+ }
+ if (input.SiteIds !== undefined) {
+ query["siteIds"] = input.SiteIds;
+ }
+ return new __HttpRequest({
+ ...context.endpoint,
+ protocol: "https",
+ method: "GET",
+ headers: headers,
+ path: resolvedPath,
+ query: query
+ });
+}
+
+export async function serializeAws_restJson1_1GetTransitGatewayRegistrationsCommand(
+ input: GetTransitGatewayRegistrationsCommandInput,
+ context: __SerdeContext
+): Promise<__HttpRequest> {
+ const headers: any = {};
+ headers["Content-Type"] = "";
+ let resolvedPath =
+ "/global-networks/{GlobalNetworkId}/transit-gateway-registrations";
+ if (input.GlobalNetworkId !== undefined) {
+ const labelValue: any = input.GlobalNetworkId.toString();
+ if (labelValue.length <= 0) {
+ throw new Error(
+ "Empty value provided for input HTTP label: GlobalNetworkId."
+ );
+ }
+ resolvedPath = resolvedPath.replace("{GlobalNetworkId}", labelValue);
+ } else {
+ throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
+ }
+ const query: any = {};
+ if (input.MaxResults !== undefined) {
+ query["maxResults"] = input.MaxResults.toString();
+ }
+ if (input.NextToken !== undefined) {
+ query["nextToken"] = input.NextToken.toString();
+ }
+ if (input.TransitGatewayArns !== undefined) {
+ query["transitGatewayArns"] = input.TransitGatewayArns;
+ }
+ return new __HttpRequest({
+ ...context.endpoint,
+ protocol: "https",
+ method: "GET",
+ headers: headers,
+ path: resolvedPath,
+ query: query
+ });
+}
+
+export async function serializeAws_restJson1_1ListTagsForResourceCommand(
+ input: ListTagsForResourceCommandInput,
+ context: __SerdeContext
+): Promise<__HttpRequest> {
+ const headers: any = {};
+ headers["Content-Type"] = "";
+ let resolvedPath = "/tags/{ResourceArn}";
+ if (input.ResourceArn !== undefined) {
+ const labelValue: any = input.ResourceArn.toString();
+ if (labelValue.length <= 0) {
+ throw new Error(
+ "Empty value provided for input HTTP label: ResourceArn."
+ );
+ }
+ resolvedPath = resolvedPath.replace("{ResourceArn}", labelValue);
+ } else {
+ throw new Error("No value provided for input HTTP label: ResourceArn.");
+ }
+ return new __HttpRequest({
+ ...context.endpoint,
+ protocol: "https",
+ method: "GET",
+ headers: headers,
+ path: resolvedPath
+ });
+}
+
+export async function serializeAws_restJson1_1RegisterTransitGatewayCommand(
+ input: RegisterTransitGatewayCommandInput,
+ context: __SerdeContext
+): Promise<__HttpRequest> {
+ const headers: any = {};
+ headers["Content-Type"] = "application/json";
+ let resolvedPath =
+ "/global-networks/{GlobalNetworkId}/transit-gateway-registrations";
+ if (input.GlobalNetworkId !== undefined) {
+ const labelValue: any = input.GlobalNetworkId.toString();
+ if (labelValue.length <= 0) {
+ throw new Error(
+ "Empty value provided for input HTTP label: GlobalNetworkId."
+ );
+ }
+ resolvedPath = resolvedPath.replace("{GlobalNetworkId}", labelValue);
+ } else {
+ throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
+ }
+ let body: any = {};
+ const bodyParams: any = {};
+ if (input.TransitGatewayArn !== undefined) {
+ bodyParams["TransitGatewayArn"] = input.TransitGatewayArn;
+ }
+ body = JSON.stringify(bodyParams);
+ return new __HttpRequest({
+ ...context.endpoint,
+ protocol: "https",
+ method: "POST",
+ headers: headers,
+ path: resolvedPath,
+ body: body
+ });
+}
+
+export async function serializeAws_restJson1_1TagResourceCommand(
+ input: TagResourceCommandInput,
+ context: __SerdeContext
+): Promise<__HttpRequest> {
+ const headers: any = {};
+ headers["Content-Type"] = "application/json";
+ let resolvedPath = "/tags/{ResourceArn}";
+ if (input.ResourceArn !== undefined) {
+ const labelValue: any = input.ResourceArn.toString();
+ if (labelValue.length <= 0) {
+ throw new Error(
+ "Empty value provided for input HTTP label: ResourceArn."
+ );
+ }
+ resolvedPath = resolvedPath.replace("{ResourceArn}", labelValue);
+ } else {
+ throw new Error("No value provided for input HTTP label: ResourceArn.");
+ }
+ let body: any = {};
+ const bodyParams: any = {};
+ if (input.Tags !== undefined) {
+ bodyParams["Tags"] = serializeAws_restJson1_1TagList(input.Tags, context);
+ }
+ body = JSON.stringify(bodyParams);
+ return new __HttpRequest({
+ ...context.endpoint,
+ protocol: "https",
+ method: "POST",
+ headers: headers,
+ path: resolvedPath,
+ body: body
+ });
+}
+
+export async function serializeAws_restJson1_1UntagResourceCommand(
+ input: UntagResourceCommandInput,
+ context: __SerdeContext
+): Promise<__HttpRequest> {
+ const headers: any = {};
+ headers["Content-Type"] = "";
+ let resolvedPath = "/tags/{ResourceArn}";
+ if (input.ResourceArn !== undefined) {
+ const labelValue: any = input.ResourceArn.toString();
+ if (labelValue.length <= 0) {
+ throw new Error(
+ "Empty value provided for input HTTP label: ResourceArn."
+ );
+ }
+ resolvedPath = resolvedPath.replace("{ResourceArn}", labelValue);
+ } else {
+ throw new Error("No value provided for input HTTP label: ResourceArn.");
+ }
+ const query: any = {};
+ if (input.TagKeys !== undefined) {
+ query["tagKeys"] = input.TagKeys;
+ }
+ return new __HttpRequest({
+ ...context.endpoint,
+ protocol: "https",
+ method: "DELETE",
+ headers: headers,
+ path: resolvedPath,
+ query: query
+ });
+}
+
+export async function serializeAws_restJson1_1UpdateDeviceCommand(
+ input: UpdateDeviceCommandInput,
+ context: __SerdeContext
+): Promise<__HttpRequest> {
+ const headers: any = {};
+ headers["Content-Type"] = "application/json";
+ let resolvedPath = "/global-networks/{GlobalNetworkId}/devices/{DeviceId}";
+ if (input.DeviceId !== undefined) {
+ const labelValue: any = input.DeviceId.toString();
+ if (labelValue.length <= 0) {
+ throw new Error("Empty value provided for input HTTP label: DeviceId.");
+ }
+ resolvedPath = resolvedPath.replace("{DeviceId}", labelValue);
+ } else {
+ throw new Error("No value provided for input HTTP label: DeviceId.");
+ }
+ if (input.GlobalNetworkId !== undefined) {
+ const labelValue: any = input.GlobalNetworkId.toString();
+ if (labelValue.length <= 0) {
+ throw new Error(
+ "Empty value provided for input HTTP label: GlobalNetworkId."
+ );
+ }
+ resolvedPath = resolvedPath.replace("{GlobalNetworkId}", labelValue);
+ } else {
+ throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
+ }
+ let body: any = {};
+ const bodyParams: any = {};
+ if (input.Description !== undefined) {
+ bodyParams["Description"] = input.Description;
+ }
+ if (input.Location !== undefined) {
+ bodyParams["Location"] = serializeAws_restJson1_1Location(
+ input.Location,
+ context
+ );
+ }
+ if (input.Model !== undefined) {
+ bodyParams["Model"] = input.Model;
+ }
+ if (input.SerialNumber !== undefined) {
+ bodyParams["SerialNumber"] = input.SerialNumber;
+ }
+ if (input.SiteId !== undefined) {
+ bodyParams["SiteId"] = input.SiteId;
+ }
+ if (input.Type !== undefined) {
+ bodyParams["Type"] = input.Type;
+ }
+ if (input.Vendor !== undefined) {
+ bodyParams["Vendor"] = input.Vendor;
+ }
+ body = JSON.stringify(bodyParams);
+ return new __HttpRequest({
+ ...context.endpoint,
+ protocol: "https",
+ method: "PATCH",
+ headers: headers,
+ path: resolvedPath,
+ body: body
+ });
+}
+
+export async function serializeAws_restJson1_1UpdateGlobalNetworkCommand(
+ input: UpdateGlobalNetworkCommandInput,
+ context: __SerdeContext
+): Promise<__HttpRequest> {
+ const headers: any = {};
+ headers["Content-Type"] = "application/json";
+ let resolvedPath = "/global-networks/{GlobalNetworkId}";
+ if (input.GlobalNetworkId !== undefined) {
+ const labelValue: any = input.GlobalNetworkId.toString();
+ if (labelValue.length <= 0) {
+ throw new Error(
+ "Empty value provided for input HTTP label: GlobalNetworkId."
+ );
+ }
+ resolvedPath = resolvedPath.replace("{GlobalNetworkId}", labelValue);
+ } else {
+ throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
+ }
+ let body: any = {};
+ const bodyParams: any = {};
+ if (input.Description !== undefined) {
+ bodyParams["Description"] = input.Description;
+ }
+ body = JSON.stringify(bodyParams);
+ return new __HttpRequest({
+ ...context.endpoint,
+ protocol: "https",
+ method: "PATCH",
+ headers: headers,
+ path: resolvedPath,
+ body: body
+ });
+}
+
+export async function serializeAws_restJson1_1UpdateLinkCommand(
+ input: UpdateLinkCommandInput,
+ context: __SerdeContext
+): Promise<__HttpRequest> {
+ const headers: any = {};
+ headers["Content-Type"] = "application/json";
+ let resolvedPath = "/global-networks/{GlobalNetworkId}/links/{LinkId}";
+ if (input.GlobalNetworkId !== undefined) {
+ const labelValue: any = input.GlobalNetworkId.toString();
+ if (labelValue.length <= 0) {
+ throw new Error(
+ "Empty value provided for input HTTP label: GlobalNetworkId."
+ );
+ }
+ resolvedPath = resolvedPath.replace("{GlobalNetworkId}", labelValue);
+ } else {
+ throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
+ }
+ if (input.LinkId !== undefined) {
+ const labelValue: any = input.LinkId.toString();
+ if (labelValue.length <= 0) {
+ throw new Error("Empty value provided for input HTTP label: LinkId.");
+ }
+ resolvedPath = resolvedPath.replace("{LinkId}", labelValue);
+ } else {
+ throw new Error("No value provided for input HTTP label: LinkId.");
+ }
+ let body: any = {};
+ const bodyParams: any = {};
+ if (input.Bandwidth !== undefined) {
+ bodyParams["Bandwidth"] = serializeAws_restJson1_1Bandwidth(
+ input.Bandwidth,
+ context
+ );
+ }
+ if (input.Description !== undefined) {
+ bodyParams["Description"] = input.Description;
+ }
+ if (input.Provider !== undefined) {
+ bodyParams["Provider"] = input.Provider;
+ }
+ if (input.Type !== undefined) {
+ bodyParams["Type"] = input.Type;
+ }
+ body = JSON.stringify(bodyParams);
+ return new __HttpRequest({
+ ...context.endpoint,
+ protocol: "https",
+ method: "PATCH",
+ headers: headers,
+ path: resolvedPath,
+ body: body
+ });
+}
+
+export async function serializeAws_restJson1_1UpdateSiteCommand(
+ input: UpdateSiteCommandInput,
+ context: __SerdeContext
+): Promise<__HttpRequest> {
+ const headers: any = {};
+ headers["Content-Type"] = "application/json";
+ let resolvedPath = "/global-networks/{GlobalNetworkId}/sites/{SiteId}";
+ if (input.GlobalNetworkId !== undefined) {
+ const labelValue: any = input.GlobalNetworkId.toString();
+ if (labelValue.length <= 0) {
+ throw new Error(
+ "Empty value provided for input HTTP label: GlobalNetworkId."
+ );
+ }
+ resolvedPath = resolvedPath.replace("{GlobalNetworkId}", labelValue);
+ } else {
+ throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
+ }
+ if (input.SiteId !== undefined) {
+ const labelValue: any = input.SiteId.toString();
+ if (labelValue.length <= 0) {
+ throw new Error("Empty value provided for input HTTP label: SiteId.");
+ }
+ resolvedPath = resolvedPath.replace("{SiteId}", labelValue);
+ } else {
+ throw new Error("No value provided for input HTTP label: SiteId.");
+ }
+ let body: any = {};
+ const bodyParams: any = {};
+ if (input.Description !== undefined) {
+ bodyParams["Description"] = input.Description;
+ }
+ if (input.Location !== undefined) {
+ bodyParams["Location"] = serializeAws_restJson1_1Location(
+ input.Location,
+ context
+ );
+ }
+ body = JSON.stringify(bodyParams);
+ return new __HttpRequest({
+ ...context.endpoint,
+ protocol: "https",
+ method: "PATCH",
+ headers: headers,
+ path: resolvedPath,
+ body: body
+ });
+}
+
+export async function deserializeAws_restJson1_1AssociateCustomerGatewayCommand(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ if (output.statusCode !== 200) {
+ return deserializeAws_restJson1_1AssociateCustomerGatewayCommandError(
+ output,
+ context
+ );
+ }
+ const contents: AssociateCustomerGatewayCommandOutput = {
+ $metadata: deserializeMetadata(output),
+ __type: "AssociateCustomerGatewayResponse",
+ CustomerGatewayAssociation: undefined
+ };
+ const data: any = await parseBody(output.body, context);
+ if (data.CustomerGatewayAssociation !== undefined) {
+ contents.CustomerGatewayAssociation = deserializeAws_restJson1_1CustomerGatewayAssociation(
+ data.CustomerGatewayAssociation,
+ context
+ );
+ }
+ return Promise.resolve(contents);
+}
+
+async function deserializeAws_restJson1_1AssociateCustomerGatewayCommandError(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ const data: any = await parseBody(output.body, context);
+ const parsedOutput: any = {
+ ...output,
+ body: data
+ };
+ let response: __SmithyException & __MetadataBearer;
+ let errorCode: String;
+ errorCode = output.headers["x-amzn-errortype"].split(":")[0];
+ switch (errorCode) {
+ case "AccessDeniedException":
+ case "com.amazonaws.networkmanager.V2019_07_05#AccessDeniedException":
+ response = await deserializeAws_restJson1_1AccessDeniedExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ConflictException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ConflictException":
+ response = await deserializeAws_restJson1_1ConflictExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "InternalServerException":
+ case "com.amazonaws.networkmanager.V2019_07_05#InternalServerException":
+ response = await deserializeAws_restJson1_1InternalServerExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ResourceNotFoundException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ResourceNotFoundException":
+ response = await deserializeAws_restJson1_1ResourceNotFoundExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ServiceQuotaExceededException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ServiceQuotaExceededException":
+ response = await deserializeAws_restJson1_1ServiceQuotaExceededExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ThrottlingException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ThrottlingException":
+ response = await deserializeAws_restJson1_1ThrottlingExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ValidationException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ValidationException":
+ response = await deserializeAws_restJson1_1ValidationExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ default:
+ errorCode = errorCode || "UnknownError";
+ response = {
+ __type: `com.amazonaws.networkmanager.V2019_07_05#${errorCode}`,
+ $fault: "client",
+ $metadata: deserializeMetadata(output)
+ };
+ }
+ return Promise.reject(Object.assign(new Error(response.__type), response));
+}
+
+export async function deserializeAws_restJson1_1AssociateLinkCommand(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ if (output.statusCode !== 200) {
+ return deserializeAws_restJson1_1AssociateLinkCommandError(output, context);
+ }
+ const contents: AssociateLinkCommandOutput = {
+ $metadata: deserializeMetadata(output),
+ __type: "AssociateLinkResponse",
+ LinkAssociation: undefined
+ };
+ const data: any = await parseBody(output.body, context);
+ if (data.LinkAssociation !== undefined) {
+ contents.LinkAssociation = deserializeAws_restJson1_1LinkAssociation(
+ data.LinkAssociation,
+ context
+ );
+ }
+ return Promise.resolve(contents);
+}
+
+async function deserializeAws_restJson1_1AssociateLinkCommandError(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ const data: any = await parseBody(output.body, context);
+ const parsedOutput: any = {
+ ...output,
+ body: data
+ };
+ let response: __SmithyException & __MetadataBearer;
+ let errorCode: String;
+ errorCode = output.headers["x-amzn-errortype"].split(":")[0];
+ switch (errorCode) {
+ case "AccessDeniedException":
+ case "com.amazonaws.networkmanager.V2019_07_05#AccessDeniedException":
+ response = await deserializeAws_restJson1_1AccessDeniedExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ConflictException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ConflictException":
+ response = await deserializeAws_restJson1_1ConflictExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "InternalServerException":
+ case "com.amazonaws.networkmanager.V2019_07_05#InternalServerException":
+ response = await deserializeAws_restJson1_1InternalServerExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ResourceNotFoundException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ResourceNotFoundException":
+ response = await deserializeAws_restJson1_1ResourceNotFoundExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ServiceQuotaExceededException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ServiceQuotaExceededException":
+ response = await deserializeAws_restJson1_1ServiceQuotaExceededExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ThrottlingException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ThrottlingException":
+ response = await deserializeAws_restJson1_1ThrottlingExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ValidationException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ValidationException":
+ response = await deserializeAws_restJson1_1ValidationExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ default:
+ errorCode = errorCode || "UnknownError";
+ response = {
+ __type: `com.amazonaws.networkmanager.V2019_07_05#${errorCode}`,
+ $fault: "client",
+ $metadata: deserializeMetadata(output)
+ };
+ }
+ return Promise.reject(Object.assign(new Error(response.__type), response));
+}
+
+export async function deserializeAws_restJson1_1CreateDeviceCommand(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ if (output.statusCode !== 200) {
+ return deserializeAws_restJson1_1CreateDeviceCommandError(output, context);
+ }
+ const contents: CreateDeviceCommandOutput = {
+ $metadata: deserializeMetadata(output),
+ __type: "CreateDeviceResponse",
+ Device: undefined
+ };
+ const data: any = await parseBody(output.body, context);
+ if (data.Device !== undefined) {
+ contents.Device = deserializeAws_restJson1_1Device(data.Device, context);
+ }
+ return Promise.resolve(contents);
+}
+
+async function deserializeAws_restJson1_1CreateDeviceCommandError(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ const data: any = await parseBody(output.body, context);
+ const parsedOutput: any = {
+ ...output,
+ body: data
+ };
+ let response: __SmithyException & __MetadataBearer;
+ let errorCode: String;
+ errorCode = output.headers["x-amzn-errortype"].split(":")[0];
+ switch (errorCode) {
+ case "AccessDeniedException":
+ case "com.amazonaws.networkmanager.V2019_07_05#AccessDeniedException":
+ response = await deserializeAws_restJson1_1AccessDeniedExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ConflictException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ConflictException":
+ response = await deserializeAws_restJson1_1ConflictExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "InternalServerException":
+ case "com.amazonaws.networkmanager.V2019_07_05#InternalServerException":
+ response = await deserializeAws_restJson1_1InternalServerExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ResourceNotFoundException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ResourceNotFoundException":
+ response = await deserializeAws_restJson1_1ResourceNotFoundExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ServiceQuotaExceededException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ServiceQuotaExceededException":
+ response = await deserializeAws_restJson1_1ServiceQuotaExceededExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ThrottlingException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ThrottlingException":
+ response = await deserializeAws_restJson1_1ThrottlingExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ValidationException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ValidationException":
+ response = await deserializeAws_restJson1_1ValidationExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ default:
+ errorCode = errorCode || "UnknownError";
+ response = {
+ __type: `com.amazonaws.networkmanager.V2019_07_05#${errorCode}`,
+ $fault: "client",
+ $metadata: deserializeMetadata(output)
+ };
+ }
+ return Promise.reject(Object.assign(new Error(response.__type), response));
+}
+
+export async function deserializeAws_restJson1_1CreateGlobalNetworkCommand(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ if (output.statusCode !== 200) {
+ return deserializeAws_restJson1_1CreateGlobalNetworkCommandError(
+ output,
+ context
+ );
+ }
+ const contents: CreateGlobalNetworkCommandOutput = {
+ $metadata: deserializeMetadata(output),
+ __type: "CreateGlobalNetworkResponse",
+ GlobalNetwork: undefined
+ };
+ const data: any = await parseBody(output.body, context);
+ if (data.GlobalNetwork !== undefined) {
+ contents.GlobalNetwork = deserializeAws_restJson1_1GlobalNetwork(
+ data.GlobalNetwork,
+ context
+ );
+ }
+ return Promise.resolve(contents);
+}
+
+async function deserializeAws_restJson1_1CreateGlobalNetworkCommandError(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ const data: any = await parseBody(output.body, context);
+ const parsedOutput: any = {
+ ...output,
+ body: data
+ };
+ let response: __SmithyException & __MetadataBearer;
+ let errorCode: String;
+ errorCode = output.headers["x-amzn-errortype"].split(":")[0];
+ switch (errorCode) {
+ case "AccessDeniedException":
+ case "com.amazonaws.networkmanager.V2019_07_05#AccessDeniedException":
+ response = await deserializeAws_restJson1_1AccessDeniedExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ConflictException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ConflictException":
+ response = await deserializeAws_restJson1_1ConflictExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "InternalServerException":
+ case "com.amazonaws.networkmanager.V2019_07_05#InternalServerException":
+ response = await deserializeAws_restJson1_1InternalServerExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ServiceQuotaExceededException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ServiceQuotaExceededException":
+ response = await deserializeAws_restJson1_1ServiceQuotaExceededExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ThrottlingException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ThrottlingException":
+ response = await deserializeAws_restJson1_1ThrottlingExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ValidationException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ValidationException":
+ response = await deserializeAws_restJson1_1ValidationExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ default:
+ errorCode = errorCode || "UnknownError";
+ response = {
+ __type: `com.amazonaws.networkmanager.V2019_07_05#${errorCode}`,
+ $fault: "client",
+ $metadata: deserializeMetadata(output)
+ };
+ }
+ return Promise.reject(Object.assign(new Error(response.__type), response));
+}
+
+export async function deserializeAws_restJson1_1CreateLinkCommand(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ if (output.statusCode !== 200) {
+ return deserializeAws_restJson1_1CreateLinkCommandError(output, context);
+ }
+ const contents: CreateLinkCommandOutput = {
+ $metadata: deserializeMetadata(output),
+ __type: "CreateLinkResponse",
+ Link: undefined
+ };
+ const data: any = await parseBody(output.body, context);
+ if (data.Link !== undefined) {
+ contents.Link = deserializeAws_restJson1_1Link(data.Link, context);
+ }
+ return Promise.resolve(contents);
+}
+
+async function deserializeAws_restJson1_1CreateLinkCommandError(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ const data: any = await parseBody(output.body, context);
+ const parsedOutput: any = {
+ ...output,
+ body: data
+ };
+ let response: __SmithyException & __MetadataBearer;
+ let errorCode: String;
+ errorCode = output.headers["x-amzn-errortype"].split(":")[0];
+ switch (errorCode) {
+ case "AccessDeniedException":
+ case "com.amazonaws.networkmanager.V2019_07_05#AccessDeniedException":
+ response = await deserializeAws_restJson1_1AccessDeniedExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ConflictException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ConflictException":
+ response = await deserializeAws_restJson1_1ConflictExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "InternalServerException":
+ case "com.amazonaws.networkmanager.V2019_07_05#InternalServerException":
+ response = await deserializeAws_restJson1_1InternalServerExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ResourceNotFoundException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ResourceNotFoundException":
+ response = await deserializeAws_restJson1_1ResourceNotFoundExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ServiceQuotaExceededException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ServiceQuotaExceededException":
+ response = await deserializeAws_restJson1_1ServiceQuotaExceededExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ThrottlingException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ThrottlingException":
+ response = await deserializeAws_restJson1_1ThrottlingExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ValidationException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ValidationException":
+ response = await deserializeAws_restJson1_1ValidationExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ default:
+ errorCode = errorCode || "UnknownError";
+ response = {
+ __type: `com.amazonaws.networkmanager.V2019_07_05#${errorCode}`,
+ $fault: "client",
+ $metadata: deserializeMetadata(output)
+ };
+ }
+ return Promise.reject(Object.assign(new Error(response.__type), response));
+}
+
+export async function deserializeAws_restJson1_1CreateSiteCommand(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ if (output.statusCode !== 200) {
+ return deserializeAws_restJson1_1CreateSiteCommandError(output, context);
+ }
+ const contents: CreateSiteCommandOutput = {
+ $metadata: deserializeMetadata(output),
+ __type: "CreateSiteResponse",
+ Site: undefined
+ };
+ const data: any = await parseBody(output.body, context);
+ if (data.Site !== undefined) {
+ contents.Site = deserializeAws_restJson1_1Site(data.Site, context);
+ }
+ return Promise.resolve(contents);
+}
+
+async function deserializeAws_restJson1_1CreateSiteCommandError(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ const data: any = await parseBody(output.body, context);
+ const parsedOutput: any = {
+ ...output,
+ body: data
+ };
+ let response: __SmithyException & __MetadataBearer;
+ let errorCode: String;
+ errorCode = output.headers["x-amzn-errortype"].split(":")[0];
+ switch (errorCode) {
+ case "AccessDeniedException":
+ case "com.amazonaws.networkmanager.V2019_07_05#AccessDeniedException":
+ response = await deserializeAws_restJson1_1AccessDeniedExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ConflictException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ConflictException":
+ response = await deserializeAws_restJson1_1ConflictExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "InternalServerException":
+ case "com.amazonaws.networkmanager.V2019_07_05#InternalServerException":
+ response = await deserializeAws_restJson1_1InternalServerExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ResourceNotFoundException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ResourceNotFoundException":
+ response = await deserializeAws_restJson1_1ResourceNotFoundExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ServiceQuotaExceededException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ServiceQuotaExceededException":
+ response = await deserializeAws_restJson1_1ServiceQuotaExceededExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ThrottlingException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ThrottlingException":
+ response = await deserializeAws_restJson1_1ThrottlingExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ValidationException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ValidationException":
+ response = await deserializeAws_restJson1_1ValidationExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ default:
+ errorCode = errorCode || "UnknownError";
+ response = {
+ __type: `com.amazonaws.networkmanager.V2019_07_05#${errorCode}`,
+ $fault: "client",
+ $metadata: deserializeMetadata(output)
+ };
+ }
+ return Promise.reject(Object.assign(new Error(response.__type), response));
+}
+
+export async function deserializeAws_restJson1_1DeleteDeviceCommand(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ if (output.statusCode !== 200) {
+ return deserializeAws_restJson1_1DeleteDeviceCommandError(output, context);
+ }
+ const contents: DeleteDeviceCommandOutput = {
+ $metadata: deserializeMetadata(output),
+ __type: "DeleteDeviceResponse",
+ Device: undefined
+ };
+ const data: any = await parseBody(output.body, context);
+ if (data.Device !== undefined) {
+ contents.Device = deserializeAws_restJson1_1Device(data.Device, context);
+ }
+ return Promise.resolve(contents);
+}
+
+async function deserializeAws_restJson1_1DeleteDeviceCommandError(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ const data: any = await parseBody(output.body, context);
+ const parsedOutput: any = {
+ ...output,
+ body: data
+ };
+ let response: __SmithyException & __MetadataBearer;
+ let errorCode: String;
+ errorCode = output.headers["x-amzn-errortype"].split(":")[0];
+ switch (errorCode) {
+ case "AccessDeniedException":
+ case "com.amazonaws.networkmanager.V2019_07_05#AccessDeniedException":
+ response = await deserializeAws_restJson1_1AccessDeniedExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ConflictException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ConflictException":
+ response = await deserializeAws_restJson1_1ConflictExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "InternalServerException":
+ case "com.amazonaws.networkmanager.V2019_07_05#InternalServerException":
+ response = await deserializeAws_restJson1_1InternalServerExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ResourceNotFoundException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ResourceNotFoundException":
+ response = await deserializeAws_restJson1_1ResourceNotFoundExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ThrottlingException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ThrottlingException":
+ response = await deserializeAws_restJson1_1ThrottlingExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ValidationException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ValidationException":
+ response = await deserializeAws_restJson1_1ValidationExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ default:
+ errorCode = errorCode || "UnknownError";
+ response = {
+ __type: `com.amazonaws.networkmanager.V2019_07_05#${errorCode}`,
+ $fault: "client",
+ $metadata: deserializeMetadata(output)
+ };
+ }
+ return Promise.reject(Object.assign(new Error(response.__type), response));
+}
+
+export async function deserializeAws_restJson1_1DeleteGlobalNetworkCommand(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ if (output.statusCode !== 200) {
+ return deserializeAws_restJson1_1DeleteGlobalNetworkCommandError(
+ output,
+ context
+ );
+ }
+ const contents: DeleteGlobalNetworkCommandOutput = {
+ $metadata: deserializeMetadata(output),
+ __type: "DeleteGlobalNetworkResponse",
+ GlobalNetwork: undefined
+ };
+ const data: any = await parseBody(output.body, context);
+ if (data.GlobalNetwork !== undefined) {
+ contents.GlobalNetwork = deserializeAws_restJson1_1GlobalNetwork(
+ data.GlobalNetwork,
+ context
+ );
+ }
+ return Promise.resolve(contents);
+}
+
+async function deserializeAws_restJson1_1DeleteGlobalNetworkCommandError(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ const data: any = await parseBody(output.body, context);
+ const parsedOutput: any = {
+ ...output,
+ body: data
+ };
+ let response: __SmithyException & __MetadataBearer;
+ let errorCode: String;
+ errorCode = output.headers["x-amzn-errortype"].split(":")[0];
+ switch (errorCode) {
+ case "AccessDeniedException":
+ case "com.amazonaws.networkmanager.V2019_07_05#AccessDeniedException":
+ response = await deserializeAws_restJson1_1AccessDeniedExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ConflictException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ConflictException":
+ response = await deserializeAws_restJson1_1ConflictExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "InternalServerException":
+ case "com.amazonaws.networkmanager.V2019_07_05#InternalServerException":
+ response = await deserializeAws_restJson1_1InternalServerExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ResourceNotFoundException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ResourceNotFoundException":
+ response = await deserializeAws_restJson1_1ResourceNotFoundExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ThrottlingException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ThrottlingException":
+ response = await deserializeAws_restJson1_1ThrottlingExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ValidationException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ValidationException":
+ response = await deserializeAws_restJson1_1ValidationExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ default:
+ errorCode = errorCode || "UnknownError";
+ response = {
+ __type: `com.amazonaws.networkmanager.V2019_07_05#${errorCode}`,
+ $fault: "client",
+ $metadata: deserializeMetadata(output)
+ };
+ }
+ return Promise.reject(Object.assign(new Error(response.__type), response));
+}
+
+export async function deserializeAws_restJson1_1DeleteLinkCommand(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ if (output.statusCode !== 200) {
+ return deserializeAws_restJson1_1DeleteLinkCommandError(output, context);
+ }
+ const contents: DeleteLinkCommandOutput = {
+ $metadata: deserializeMetadata(output),
+ __type: "DeleteLinkResponse",
+ Link: undefined
+ };
+ const data: any = await parseBody(output.body, context);
+ if (data.Link !== undefined) {
+ contents.Link = deserializeAws_restJson1_1Link(data.Link, context);
+ }
+ return Promise.resolve(contents);
+}
+
+async function deserializeAws_restJson1_1DeleteLinkCommandError(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ const data: any = await parseBody(output.body, context);
+ const parsedOutput: any = {
+ ...output,
+ body: data
+ };
+ let response: __SmithyException & __MetadataBearer;
+ let errorCode: String;
+ errorCode = output.headers["x-amzn-errortype"].split(":")[0];
+ switch (errorCode) {
+ case "AccessDeniedException":
+ case "com.amazonaws.networkmanager.V2019_07_05#AccessDeniedException":
+ response = await deserializeAws_restJson1_1AccessDeniedExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ConflictException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ConflictException":
+ response = await deserializeAws_restJson1_1ConflictExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "InternalServerException":
+ case "com.amazonaws.networkmanager.V2019_07_05#InternalServerException":
+ response = await deserializeAws_restJson1_1InternalServerExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ResourceNotFoundException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ResourceNotFoundException":
+ response = await deserializeAws_restJson1_1ResourceNotFoundExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ThrottlingException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ThrottlingException":
+ response = await deserializeAws_restJson1_1ThrottlingExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ValidationException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ValidationException":
+ response = await deserializeAws_restJson1_1ValidationExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ default:
+ errorCode = errorCode || "UnknownError";
+ response = {
+ __type: `com.amazonaws.networkmanager.V2019_07_05#${errorCode}`,
+ $fault: "client",
+ $metadata: deserializeMetadata(output)
+ };
+ }
+ return Promise.reject(Object.assign(new Error(response.__type), response));
+}
+
+export async function deserializeAws_restJson1_1DeleteSiteCommand(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ if (output.statusCode !== 200) {
+ return deserializeAws_restJson1_1DeleteSiteCommandError(output, context);
+ }
+ const contents: DeleteSiteCommandOutput = {
+ $metadata: deserializeMetadata(output),
+ __type: "DeleteSiteResponse",
+ Site: undefined
+ };
+ const data: any = await parseBody(output.body, context);
+ if (data.Site !== undefined) {
+ contents.Site = deserializeAws_restJson1_1Site(data.Site, context);
+ }
+ return Promise.resolve(contents);
+}
+
+async function deserializeAws_restJson1_1DeleteSiteCommandError(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ const data: any = await parseBody(output.body, context);
+ const parsedOutput: any = {
+ ...output,
+ body: data
+ };
+ let response: __SmithyException & __MetadataBearer;
+ let errorCode: String;
+ errorCode = output.headers["x-amzn-errortype"].split(":")[0];
+ switch (errorCode) {
+ case "AccessDeniedException":
+ case "com.amazonaws.networkmanager.V2019_07_05#AccessDeniedException":
+ response = await deserializeAws_restJson1_1AccessDeniedExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ConflictException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ConflictException":
+ response = await deserializeAws_restJson1_1ConflictExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "InternalServerException":
+ case "com.amazonaws.networkmanager.V2019_07_05#InternalServerException":
+ response = await deserializeAws_restJson1_1InternalServerExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ResourceNotFoundException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ResourceNotFoundException":
+ response = await deserializeAws_restJson1_1ResourceNotFoundExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ThrottlingException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ThrottlingException":
+ response = await deserializeAws_restJson1_1ThrottlingExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ValidationException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ValidationException":
+ response = await deserializeAws_restJson1_1ValidationExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ default:
+ errorCode = errorCode || "UnknownError";
+ response = {
+ __type: `com.amazonaws.networkmanager.V2019_07_05#${errorCode}`,
+ $fault: "client",
+ $metadata: deserializeMetadata(output)
+ };
+ }
+ return Promise.reject(Object.assign(new Error(response.__type), response));
+}
+
+export async function deserializeAws_restJson1_1DeregisterTransitGatewayCommand(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ if (output.statusCode !== 200) {
+ return deserializeAws_restJson1_1DeregisterTransitGatewayCommandError(
+ output,
+ context
+ );
+ }
+ const contents: DeregisterTransitGatewayCommandOutput = {
+ $metadata: deserializeMetadata(output),
+ __type: "DeregisterTransitGatewayResponse",
+ TransitGatewayRegistration: undefined
+ };
+ const data: any = await parseBody(output.body, context);
+ if (data.TransitGatewayRegistration !== undefined) {
+ contents.TransitGatewayRegistration = deserializeAws_restJson1_1TransitGatewayRegistration(
+ data.TransitGatewayRegistration,
+ context
+ );
+ }
+ return Promise.resolve(contents);
+}
+
+async function deserializeAws_restJson1_1DeregisterTransitGatewayCommandError(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ const data: any = await parseBody(output.body, context);
+ const parsedOutput: any = {
+ ...output,
+ body: data
+ };
+ let response: __SmithyException & __MetadataBearer;
+ let errorCode: String;
+ errorCode = output.headers["x-amzn-errortype"].split(":")[0];
+ switch (errorCode) {
+ case "AccessDeniedException":
+ case "com.amazonaws.networkmanager.V2019_07_05#AccessDeniedException":
+ response = await deserializeAws_restJson1_1AccessDeniedExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ConflictException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ConflictException":
+ response = await deserializeAws_restJson1_1ConflictExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "InternalServerException":
+ case "com.amazonaws.networkmanager.V2019_07_05#InternalServerException":
+ response = await deserializeAws_restJson1_1InternalServerExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ResourceNotFoundException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ResourceNotFoundException":
+ response = await deserializeAws_restJson1_1ResourceNotFoundExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ThrottlingException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ThrottlingException":
+ response = await deserializeAws_restJson1_1ThrottlingExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ValidationException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ValidationException":
+ response = await deserializeAws_restJson1_1ValidationExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ default:
+ errorCode = errorCode || "UnknownError";
+ response = {
+ __type: `com.amazonaws.networkmanager.V2019_07_05#${errorCode}`,
+ $fault: "client",
+ $metadata: deserializeMetadata(output)
+ };
+ }
+ return Promise.reject(Object.assign(new Error(response.__type), response));
+}
+
+export async function deserializeAws_restJson1_1DescribeGlobalNetworksCommand(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ if (output.statusCode !== 200) {
+ return deserializeAws_restJson1_1DescribeGlobalNetworksCommandError(
+ output,
+ context
+ );
+ }
+ const contents: DescribeGlobalNetworksCommandOutput = {
+ $metadata: deserializeMetadata(output),
+ __type: "DescribeGlobalNetworksResponse",
+ GlobalNetworks: undefined,
+ NextToken: undefined
+ };
+ const data: any = await parseBody(output.body, context);
+ if (data.GlobalNetworks !== undefined) {
+ contents.GlobalNetworks = deserializeAws_restJson1_1GlobalNetworkList(
+ data.GlobalNetworks,
+ context
+ );
+ }
+ if (data.NextToken !== undefined) {
+ contents.NextToken = data.NextToken;
+ }
+ return Promise.resolve(contents);
+}
+
+async function deserializeAws_restJson1_1DescribeGlobalNetworksCommandError(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ const data: any = await parseBody(output.body, context);
+ const parsedOutput: any = {
+ ...output,
+ body: data
+ };
+ let response: __SmithyException & __MetadataBearer;
+ let errorCode: String;
+ errorCode = output.headers["x-amzn-errortype"].split(":")[0];
+ switch (errorCode) {
+ case "AccessDeniedException":
+ case "com.amazonaws.networkmanager.V2019_07_05#AccessDeniedException":
+ response = await deserializeAws_restJson1_1AccessDeniedExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "InternalServerException":
+ case "com.amazonaws.networkmanager.V2019_07_05#InternalServerException":
+ response = await deserializeAws_restJson1_1InternalServerExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ResourceNotFoundException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ResourceNotFoundException":
+ response = await deserializeAws_restJson1_1ResourceNotFoundExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ThrottlingException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ThrottlingException":
+ response = await deserializeAws_restJson1_1ThrottlingExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ValidationException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ValidationException":
+ response = await deserializeAws_restJson1_1ValidationExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ default:
+ errorCode = errorCode || "UnknownError";
+ response = {
+ __type: `com.amazonaws.networkmanager.V2019_07_05#${errorCode}`,
+ $fault: "client",
+ $metadata: deserializeMetadata(output)
+ };
+ }
+ return Promise.reject(Object.assign(new Error(response.__type), response));
+}
+
+export async function deserializeAws_restJson1_1DisassociateCustomerGatewayCommand(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ if (output.statusCode !== 200) {
+ return deserializeAws_restJson1_1DisassociateCustomerGatewayCommandError(
+ output,
+ context
+ );
+ }
+ const contents: DisassociateCustomerGatewayCommandOutput = {
+ $metadata: deserializeMetadata(output),
+ __type: "DisassociateCustomerGatewayResponse",
+ CustomerGatewayAssociation: undefined
+ };
+ const data: any = await parseBody(output.body, context);
+ if (data.CustomerGatewayAssociation !== undefined) {
+ contents.CustomerGatewayAssociation = deserializeAws_restJson1_1CustomerGatewayAssociation(
+ data.CustomerGatewayAssociation,
+ context
+ );
+ }
+ return Promise.resolve(contents);
+}
+
+async function deserializeAws_restJson1_1DisassociateCustomerGatewayCommandError(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ const data: any = await parseBody(output.body, context);
+ const parsedOutput: any = {
+ ...output,
+ body: data
+ };
+ let response: __SmithyException & __MetadataBearer;
+ let errorCode: String;
+ errorCode = output.headers["x-amzn-errortype"].split(":")[0];
+ switch (errorCode) {
+ case "AccessDeniedException":
+ case "com.amazonaws.networkmanager.V2019_07_05#AccessDeniedException":
+ response = await deserializeAws_restJson1_1AccessDeniedExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ConflictException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ConflictException":
+ response = await deserializeAws_restJson1_1ConflictExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "InternalServerException":
+ case "com.amazonaws.networkmanager.V2019_07_05#InternalServerException":
+ response = await deserializeAws_restJson1_1InternalServerExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ResourceNotFoundException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ResourceNotFoundException":
+ response = await deserializeAws_restJson1_1ResourceNotFoundExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ThrottlingException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ThrottlingException":
+ response = await deserializeAws_restJson1_1ThrottlingExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ValidationException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ValidationException":
+ response = await deserializeAws_restJson1_1ValidationExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ default:
+ errorCode = errorCode || "UnknownError";
+ response = {
+ __type: `com.amazonaws.networkmanager.V2019_07_05#${errorCode}`,
+ $fault: "client",
+ $metadata: deserializeMetadata(output)
+ };
+ }
+ return Promise.reject(Object.assign(new Error(response.__type), response));
+}
+
+export async function deserializeAws_restJson1_1DisassociateLinkCommand(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ if (output.statusCode !== 200) {
+ return deserializeAws_restJson1_1DisassociateLinkCommandError(
+ output,
+ context
+ );
+ }
+ const contents: DisassociateLinkCommandOutput = {
+ $metadata: deserializeMetadata(output),
+ __type: "DisassociateLinkResponse",
+ LinkAssociation: undefined
+ };
+ const data: any = await parseBody(output.body, context);
+ if (data.LinkAssociation !== undefined) {
+ contents.LinkAssociation = deserializeAws_restJson1_1LinkAssociation(
+ data.LinkAssociation,
+ context
+ );
+ }
+ return Promise.resolve(contents);
+}
+
+async function deserializeAws_restJson1_1DisassociateLinkCommandError(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ const data: any = await parseBody(output.body, context);
+ const parsedOutput: any = {
+ ...output,
+ body: data
+ };
+ let response: __SmithyException & __MetadataBearer;
+ let errorCode: String;
+ errorCode = output.headers["x-amzn-errortype"].split(":")[0];
+ switch (errorCode) {
+ case "AccessDeniedException":
+ case "com.amazonaws.networkmanager.V2019_07_05#AccessDeniedException":
+ response = await deserializeAws_restJson1_1AccessDeniedExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ConflictException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ConflictException":
+ response = await deserializeAws_restJson1_1ConflictExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "InternalServerException":
+ case "com.amazonaws.networkmanager.V2019_07_05#InternalServerException":
+ response = await deserializeAws_restJson1_1InternalServerExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ResourceNotFoundException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ResourceNotFoundException":
+ response = await deserializeAws_restJson1_1ResourceNotFoundExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ThrottlingException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ThrottlingException":
+ response = await deserializeAws_restJson1_1ThrottlingExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ValidationException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ValidationException":
+ response = await deserializeAws_restJson1_1ValidationExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ default:
+ errorCode = errorCode || "UnknownError";
+ response = {
+ __type: `com.amazonaws.networkmanager.V2019_07_05#${errorCode}`,
+ $fault: "client",
+ $metadata: deserializeMetadata(output)
+ };
+ }
+ return Promise.reject(Object.assign(new Error(response.__type), response));
+}
+
+export async function deserializeAws_restJson1_1GetCustomerGatewayAssociationsCommand(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ if (output.statusCode !== 200) {
+ return deserializeAws_restJson1_1GetCustomerGatewayAssociationsCommandError(
+ output,
+ context
+ );
+ }
+ const contents: GetCustomerGatewayAssociationsCommandOutput = {
+ $metadata: deserializeMetadata(output),
+ __type: "GetCustomerGatewayAssociationsResponse",
+ CustomerGatewayAssociations: undefined,
+ NextToken: undefined
+ };
+ const data: any = await parseBody(output.body, context);
+ if (data.CustomerGatewayAssociations !== undefined) {
+ contents.CustomerGatewayAssociations = deserializeAws_restJson1_1CustomerGatewayAssociationList(
+ data.CustomerGatewayAssociations,
+ context
+ );
+ }
+ if (data.NextToken !== undefined) {
+ contents.NextToken = data.NextToken;
+ }
+ return Promise.resolve(contents);
+}
+
+async function deserializeAws_restJson1_1GetCustomerGatewayAssociationsCommandError(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ const data: any = await parseBody(output.body, context);
+ const parsedOutput: any = {
+ ...output,
+ body: data
+ };
+ let response: __SmithyException & __MetadataBearer;
+ let errorCode: String;
+ errorCode = output.headers["x-amzn-errortype"].split(":")[0];
+ switch (errorCode) {
+ case "AccessDeniedException":
+ case "com.amazonaws.networkmanager.V2019_07_05#AccessDeniedException":
+ response = await deserializeAws_restJson1_1AccessDeniedExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ConflictException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ConflictException":
+ response = await deserializeAws_restJson1_1ConflictExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "InternalServerException":
+ case "com.amazonaws.networkmanager.V2019_07_05#InternalServerException":
+ response = await deserializeAws_restJson1_1InternalServerExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ResourceNotFoundException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ResourceNotFoundException":
+ response = await deserializeAws_restJson1_1ResourceNotFoundExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ThrottlingException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ThrottlingException":
+ response = await deserializeAws_restJson1_1ThrottlingExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ValidationException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ValidationException":
+ response = await deserializeAws_restJson1_1ValidationExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ default:
+ errorCode = errorCode || "UnknownError";
+ response = {
+ __type: `com.amazonaws.networkmanager.V2019_07_05#${errorCode}`,
+ $fault: "client",
+ $metadata: deserializeMetadata(output)
+ };
+ }
+ return Promise.reject(Object.assign(new Error(response.__type), response));
+}
+
+export async function deserializeAws_restJson1_1GetDevicesCommand(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ if (output.statusCode !== 200) {
+ return deserializeAws_restJson1_1GetDevicesCommandError(output, context);
+ }
+ const contents: GetDevicesCommandOutput = {
+ $metadata: deserializeMetadata(output),
+ __type: "GetDevicesResponse",
+ Devices: undefined,
+ NextToken: undefined
+ };
+ const data: any = await parseBody(output.body, context);
+ if (data.Devices !== undefined) {
+ contents.Devices = deserializeAws_restJson1_1DeviceList(
+ data.Devices,
+ context
+ );
+ }
+ if (data.NextToken !== undefined) {
+ contents.NextToken = data.NextToken;
+ }
+ return Promise.resolve(contents);
+}
+
+async function deserializeAws_restJson1_1GetDevicesCommandError(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ const data: any = await parseBody(output.body, context);
+ const parsedOutput: any = {
+ ...output,
+ body: data
+ };
+ let response: __SmithyException & __MetadataBearer;
+ let errorCode: String;
+ errorCode = output.headers["x-amzn-errortype"].split(":")[0];
+ switch (errorCode) {
+ case "AccessDeniedException":
+ case "com.amazonaws.networkmanager.V2019_07_05#AccessDeniedException":
+ response = await deserializeAws_restJson1_1AccessDeniedExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "InternalServerException":
+ case "com.amazonaws.networkmanager.V2019_07_05#InternalServerException":
+ response = await deserializeAws_restJson1_1InternalServerExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ResourceNotFoundException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ResourceNotFoundException":
+ response = await deserializeAws_restJson1_1ResourceNotFoundExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ThrottlingException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ThrottlingException":
+ response = await deserializeAws_restJson1_1ThrottlingExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ValidationException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ValidationException":
+ response = await deserializeAws_restJson1_1ValidationExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ default:
+ errorCode = errorCode || "UnknownError";
+ response = {
+ __type: `com.amazonaws.networkmanager.V2019_07_05#${errorCode}`,
+ $fault: "client",
+ $metadata: deserializeMetadata(output)
+ };
+ }
+ return Promise.reject(Object.assign(new Error(response.__type), response));
+}
+
+export async function deserializeAws_restJson1_1GetLinkAssociationsCommand(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ if (output.statusCode !== 200) {
+ return deserializeAws_restJson1_1GetLinkAssociationsCommandError(
+ output,
+ context
+ );
+ }
+ const contents: GetLinkAssociationsCommandOutput = {
+ $metadata: deserializeMetadata(output),
+ __type: "GetLinkAssociationsResponse",
+ LinkAssociations: undefined,
+ NextToken: undefined
+ };
+ const data: any = await parseBody(output.body, context);
+ if (data.LinkAssociations !== undefined) {
+ contents.LinkAssociations = deserializeAws_restJson1_1LinkAssociationList(
+ data.LinkAssociations,
+ context
+ );
+ }
+ if (data.NextToken !== undefined) {
+ contents.NextToken = data.NextToken;
+ }
+ return Promise.resolve(contents);
+}
+
+async function deserializeAws_restJson1_1GetLinkAssociationsCommandError(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ const data: any = await parseBody(output.body, context);
+ const parsedOutput: any = {
+ ...output,
+ body: data
+ };
+ let response: __SmithyException & __MetadataBearer;
+ let errorCode: String;
+ errorCode = output.headers["x-amzn-errortype"].split(":")[0];
+ switch (errorCode) {
+ case "AccessDeniedException":
+ case "com.amazonaws.networkmanager.V2019_07_05#AccessDeniedException":
+ response = await deserializeAws_restJson1_1AccessDeniedExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "InternalServerException":
+ case "com.amazonaws.networkmanager.V2019_07_05#InternalServerException":
+ response = await deserializeAws_restJson1_1InternalServerExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ResourceNotFoundException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ResourceNotFoundException":
+ response = await deserializeAws_restJson1_1ResourceNotFoundExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ThrottlingException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ThrottlingException":
+ response = await deserializeAws_restJson1_1ThrottlingExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ValidationException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ValidationException":
+ response = await deserializeAws_restJson1_1ValidationExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ default:
+ errorCode = errorCode || "UnknownError";
+ response = {
+ __type: `com.amazonaws.networkmanager.V2019_07_05#${errorCode}`,
+ $fault: "client",
+ $metadata: deserializeMetadata(output)
+ };
+ }
+ return Promise.reject(Object.assign(new Error(response.__type), response));
+}
+
+export async function deserializeAws_restJson1_1GetLinksCommand(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ if (output.statusCode !== 200) {
+ return deserializeAws_restJson1_1GetLinksCommandError(output, context);
+ }
+ const contents: GetLinksCommandOutput = {
+ $metadata: deserializeMetadata(output),
+ __type: "GetLinksResponse",
+ Links: undefined,
+ NextToken: undefined
+ };
+ const data: any = await parseBody(output.body, context);
+ if (data.Links !== undefined) {
+ contents.Links = deserializeAws_restJson1_1LinkList(data.Links, context);
+ }
+ if (data.NextToken !== undefined) {
+ contents.NextToken = data.NextToken;
+ }
+ return Promise.resolve(contents);
+}
+
+async function deserializeAws_restJson1_1GetLinksCommandError(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ const data: any = await parseBody(output.body, context);
+ const parsedOutput: any = {
+ ...output,
+ body: data
+ };
+ let response: __SmithyException & __MetadataBearer;
+ let errorCode: String;
+ errorCode = output.headers["x-amzn-errortype"].split(":")[0];
+ switch (errorCode) {
+ case "AccessDeniedException":
+ case "com.amazonaws.networkmanager.V2019_07_05#AccessDeniedException":
+ response = await deserializeAws_restJson1_1AccessDeniedExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "InternalServerException":
+ case "com.amazonaws.networkmanager.V2019_07_05#InternalServerException":
+ response = await deserializeAws_restJson1_1InternalServerExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ResourceNotFoundException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ResourceNotFoundException":
+ response = await deserializeAws_restJson1_1ResourceNotFoundExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ThrottlingException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ThrottlingException":
+ response = await deserializeAws_restJson1_1ThrottlingExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ValidationException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ValidationException":
+ response = await deserializeAws_restJson1_1ValidationExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ default:
+ errorCode = errorCode || "UnknownError";
+ response = {
+ __type: `com.amazonaws.networkmanager.V2019_07_05#${errorCode}`,
+ $fault: "client",
+ $metadata: deserializeMetadata(output)
+ };
+ }
+ return Promise.reject(Object.assign(new Error(response.__type), response));
+}
+
+export async function deserializeAws_restJson1_1GetSitesCommand(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ if (output.statusCode !== 200) {
+ return deserializeAws_restJson1_1GetSitesCommandError(output, context);
+ }
+ const contents: GetSitesCommandOutput = {
+ $metadata: deserializeMetadata(output),
+ __type: "GetSitesResponse",
+ NextToken: undefined,
+ Sites: undefined
+ };
+ const data: any = await parseBody(output.body, context);
+ if (data.NextToken !== undefined) {
+ contents.NextToken = data.NextToken;
+ }
+ if (data.Sites !== undefined) {
+ contents.Sites = deserializeAws_restJson1_1SiteList(data.Sites, context);
+ }
+ return Promise.resolve(contents);
+}
+
+async function deserializeAws_restJson1_1GetSitesCommandError(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ const data: any = await parseBody(output.body, context);
+ const parsedOutput: any = {
+ ...output,
+ body: data
+ };
+ let response: __SmithyException & __MetadataBearer;
+ let errorCode: String;
+ errorCode = output.headers["x-amzn-errortype"].split(":")[0];
+ switch (errorCode) {
+ case "AccessDeniedException":
+ case "com.amazonaws.networkmanager.V2019_07_05#AccessDeniedException":
+ response = await deserializeAws_restJson1_1AccessDeniedExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "InternalServerException":
+ case "com.amazonaws.networkmanager.V2019_07_05#InternalServerException":
+ response = await deserializeAws_restJson1_1InternalServerExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ResourceNotFoundException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ResourceNotFoundException":
+ response = await deserializeAws_restJson1_1ResourceNotFoundExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ThrottlingException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ThrottlingException":
+ response = await deserializeAws_restJson1_1ThrottlingExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ValidationException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ValidationException":
+ response = await deserializeAws_restJson1_1ValidationExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ default:
+ errorCode = errorCode || "UnknownError";
+ response = {
+ __type: `com.amazonaws.networkmanager.V2019_07_05#${errorCode}`,
+ $fault: "client",
+ $metadata: deserializeMetadata(output)
+ };
+ }
+ return Promise.reject(Object.assign(new Error(response.__type), response));
+}
+
+export async function deserializeAws_restJson1_1GetTransitGatewayRegistrationsCommand(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ if (output.statusCode !== 200) {
+ return deserializeAws_restJson1_1GetTransitGatewayRegistrationsCommandError(
+ output,
+ context
+ );
+ }
+ const contents: GetTransitGatewayRegistrationsCommandOutput = {
+ $metadata: deserializeMetadata(output),
+ __type: "GetTransitGatewayRegistrationsResponse",
+ NextToken: undefined,
+ TransitGatewayRegistrations: undefined
+ };
+ const data: any = await parseBody(output.body, context);
+ if (data.NextToken !== undefined) {
+ contents.NextToken = data.NextToken;
+ }
+ if (data.TransitGatewayRegistrations !== undefined) {
+ contents.TransitGatewayRegistrations = deserializeAws_restJson1_1TransitGatewayRegistrationList(
+ data.TransitGatewayRegistrations,
+ context
+ );
+ }
+ return Promise.resolve(contents);
+}
+
+async function deserializeAws_restJson1_1GetTransitGatewayRegistrationsCommandError(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ const data: any = await parseBody(output.body, context);
+ const parsedOutput: any = {
+ ...output,
+ body: data
+ };
+ let response: __SmithyException & __MetadataBearer;
+ let errorCode: String;
+ errorCode = output.headers["x-amzn-errortype"].split(":")[0];
+ switch (errorCode) {
+ case "AccessDeniedException":
+ case "com.amazonaws.networkmanager.V2019_07_05#AccessDeniedException":
+ response = await deserializeAws_restJson1_1AccessDeniedExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "InternalServerException":
+ case "com.amazonaws.networkmanager.V2019_07_05#InternalServerException":
+ response = await deserializeAws_restJson1_1InternalServerExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ResourceNotFoundException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ResourceNotFoundException":
+ response = await deserializeAws_restJson1_1ResourceNotFoundExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ThrottlingException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ThrottlingException":
+ response = await deserializeAws_restJson1_1ThrottlingExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ValidationException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ValidationException":
+ response = await deserializeAws_restJson1_1ValidationExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ default:
+ errorCode = errorCode || "UnknownError";
+ response = {
+ __type: `com.amazonaws.networkmanager.V2019_07_05#${errorCode}`,
+ $fault: "client",
+ $metadata: deserializeMetadata(output)
+ };
+ }
+ return Promise.reject(Object.assign(new Error(response.__type), response));
+}
+
+export async function deserializeAws_restJson1_1ListTagsForResourceCommand(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ if (output.statusCode !== 200) {
+ return deserializeAws_restJson1_1ListTagsForResourceCommandError(
+ output,
+ context
+ );
+ }
+ const contents: ListTagsForResourceCommandOutput = {
+ $metadata: deserializeMetadata(output),
+ __type: "ListTagsForResourceResponse",
+ TagList: undefined
+ };
+ const data: any = await parseBody(output.body, context);
+ if (data.TagList !== undefined) {
+ contents.TagList = deserializeAws_restJson1_1TagList(data.TagList, context);
+ }
+ return Promise.resolve(contents);
+}
+
+async function deserializeAws_restJson1_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;
+ errorCode = output.headers["x-amzn-errortype"].split(":")[0];
+ switch (errorCode) {
+ case "AccessDeniedException":
+ case "com.amazonaws.networkmanager.V2019_07_05#AccessDeniedException":
+ response = await deserializeAws_restJson1_1AccessDeniedExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "InternalServerException":
+ case "com.amazonaws.networkmanager.V2019_07_05#InternalServerException":
+ response = await deserializeAws_restJson1_1InternalServerExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ResourceNotFoundException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ResourceNotFoundException":
+ response = await deserializeAws_restJson1_1ResourceNotFoundExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ThrottlingException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ThrottlingException":
+ response = await deserializeAws_restJson1_1ThrottlingExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ValidationException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ValidationException":
+ response = await deserializeAws_restJson1_1ValidationExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ default:
+ errorCode = errorCode || "UnknownError";
+ response = {
+ __type: `com.amazonaws.networkmanager.V2019_07_05#${errorCode}`,
+ $fault: "client",
+ $metadata: deserializeMetadata(output)
+ };
+ }
+ return Promise.reject(Object.assign(new Error(response.__type), response));
+}
+
+export async function deserializeAws_restJson1_1RegisterTransitGatewayCommand(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ if (output.statusCode !== 200) {
+ return deserializeAws_restJson1_1RegisterTransitGatewayCommandError(
+ output,
+ context
+ );
+ }
+ const contents: RegisterTransitGatewayCommandOutput = {
+ $metadata: deserializeMetadata(output),
+ __type: "RegisterTransitGatewayResponse",
+ TransitGatewayRegistration: undefined
+ };
+ const data: any = await parseBody(output.body, context);
+ if (data.TransitGatewayRegistration !== undefined) {
+ contents.TransitGatewayRegistration = deserializeAws_restJson1_1TransitGatewayRegistration(
+ data.TransitGatewayRegistration,
+ context
+ );
+ }
+ return Promise.resolve(contents);
+}
+
+async function deserializeAws_restJson1_1RegisterTransitGatewayCommandError(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ const data: any = await parseBody(output.body, context);
+ const parsedOutput: any = {
+ ...output,
+ body: data
+ };
+ let response: __SmithyException & __MetadataBearer;
+ let errorCode: String;
+ errorCode = output.headers["x-amzn-errortype"].split(":")[0];
+ switch (errorCode) {
+ case "AccessDeniedException":
+ case "com.amazonaws.networkmanager.V2019_07_05#AccessDeniedException":
+ response = await deserializeAws_restJson1_1AccessDeniedExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ConflictException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ConflictException":
+ response = await deserializeAws_restJson1_1ConflictExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "InternalServerException":
+ case "com.amazonaws.networkmanager.V2019_07_05#InternalServerException":
+ response = await deserializeAws_restJson1_1InternalServerExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ResourceNotFoundException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ResourceNotFoundException":
+ response = await deserializeAws_restJson1_1ResourceNotFoundExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ThrottlingException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ThrottlingException":
+ response = await deserializeAws_restJson1_1ThrottlingExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ValidationException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ValidationException":
+ response = await deserializeAws_restJson1_1ValidationExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ default:
+ errorCode = errorCode || "UnknownError";
+ response = {
+ __type: `com.amazonaws.networkmanager.V2019_07_05#${errorCode}`,
+ $fault: "client",
+ $metadata: deserializeMetadata(output)
+ };
+ }
+ return Promise.reject(Object.assign(new Error(response.__type), response));
+}
+
+export async function deserializeAws_restJson1_1TagResourceCommand(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ if (output.statusCode !== 200) {
+ return deserializeAws_restJson1_1TagResourceCommandError(output, context);
+ }
+ const contents: TagResourceCommandOutput = {
+ $metadata: deserializeMetadata(output),
+ __type: "TagResourceResponse"
+ };
+ return Promise.resolve(contents);
+}
+
+async function deserializeAws_restJson1_1TagResourceCommandError(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ const data: any = await parseBody(output.body, context);
+ const parsedOutput: any = {
+ ...output,
+ body: data
+ };
+ let response: __SmithyException & __MetadataBearer;
+ let errorCode: String;
+ errorCode = output.headers["x-amzn-errortype"].split(":")[0];
+ switch (errorCode) {
+ case "AccessDeniedException":
+ case "com.amazonaws.networkmanager.V2019_07_05#AccessDeniedException":
+ response = await deserializeAws_restJson1_1AccessDeniedExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ConflictException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ConflictException":
+ response = await deserializeAws_restJson1_1ConflictExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "InternalServerException":
+ case "com.amazonaws.networkmanager.V2019_07_05#InternalServerException":
+ response = await deserializeAws_restJson1_1InternalServerExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ResourceNotFoundException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ResourceNotFoundException":
+ response = await deserializeAws_restJson1_1ResourceNotFoundExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ServiceQuotaExceededException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ServiceQuotaExceededException":
+ response = await deserializeAws_restJson1_1ServiceQuotaExceededExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ThrottlingException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ThrottlingException":
+ response = await deserializeAws_restJson1_1ThrottlingExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ValidationException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ValidationException":
+ response = await deserializeAws_restJson1_1ValidationExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ default:
+ errorCode = errorCode || "UnknownError";
+ response = {
+ __type: `com.amazonaws.networkmanager.V2019_07_05#${errorCode}`,
+ $fault: "client",
+ $metadata: deserializeMetadata(output)
+ };
+ }
+ return Promise.reject(Object.assign(new Error(response.__type), response));
+}
+
+export async function deserializeAws_restJson1_1UntagResourceCommand(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ if (output.statusCode !== 200) {
+ return deserializeAws_restJson1_1UntagResourceCommandError(output, context);
+ }
+ const contents: UntagResourceCommandOutput = {
+ $metadata: deserializeMetadata(output),
+ __type: "UntagResourceResponse"
+ };
+ return Promise.resolve(contents);
+}
+
+async function deserializeAws_restJson1_1UntagResourceCommandError(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ const data: any = await parseBody(output.body, context);
+ const parsedOutput: any = {
+ ...output,
+ body: data
+ };
+ let response: __SmithyException & __MetadataBearer;
+ let errorCode: String;
+ errorCode = output.headers["x-amzn-errortype"].split(":")[0];
+ switch (errorCode) {
+ case "AccessDeniedException":
+ case "com.amazonaws.networkmanager.V2019_07_05#AccessDeniedException":
+ response = await deserializeAws_restJson1_1AccessDeniedExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ConflictException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ConflictException":
+ response = await deserializeAws_restJson1_1ConflictExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "InternalServerException":
+ case "com.amazonaws.networkmanager.V2019_07_05#InternalServerException":
+ response = await deserializeAws_restJson1_1InternalServerExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ResourceNotFoundException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ResourceNotFoundException":
+ response = await deserializeAws_restJson1_1ResourceNotFoundExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ThrottlingException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ThrottlingException":
+ response = await deserializeAws_restJson1_1ThrottlingExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ValidationException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ValidationException":
+ response = await deserializeAws_restJson1_1ValidationExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ default:
+ errorCode = errorCode || "UnknownError";
+ response = {
+ __type: `com.amazonaws.networkmanager.V2019_07_05#${errorCode}`,
+ $fault: "client",
+ $metadata: deserializeMetadata(output)
+ };
+ }
+ return Promise.reject(Object.assign(new Error(response.__type), response));
+}
+
+export async function deserializeAws_restJson1_1UpdateDeviceCommand(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ if (output.statusCode !== 200) {
+ return deserializeAws_restJson1_1UpdateDeviceCommandError(output, context);
+ }
+ const contents: UpdateDeviceCommandOutput = {
+ $metadata: deserializeMetadata(output),
+ __type: "UpdateDeviceResponse",
+ Device: undefined
+ };
+ const data: any = await parseBody(output.body, context);
+ if (data.Device !== undefined) {
+ contents.Device = deserializeAws_restJson1_1Device(data.Device, context);
+ }
+ return Promise.resolve(contents);
+}
+
+async function deserializeAws_restJson1_1UpdateDeviceCommandError(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ const data: any = await parseBody(output.body, context);
+ const parsedOutput: any = {
+ ...output,
+ body: data
+ };
+ let response: __SmithyException & __MetadataBearer;
+ let errorCode: String;
+ errorCode = output.headers["x-amzn-errortype"].split(":")[0];
+ switch (errorCode) {
+ case "AccessDeniedException":
+ case "com.amazonaws.networkmanager.V2019_07_05#AccessDeniedException":
+ response = await deserializeAws_restJson1_1AccessDeniedExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ConflictException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ConflictException":
+ response = await deserializeAws_restJson1_1ConflictExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "InternalServerException":
+ case "com.amazonaws.networkmanager.V2019_07_05#InternalServerException":
+ response = await deserializeAws_restJson1_1InternalServerExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ResourceNotFoundException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ResourceNotFoundException":
+ response = await deserializeAws_restJson1_1ResourceNotFoundExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ThrottlingException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ThrottlingException":
+ response = await deserializeAws_restJson1_1ThrottlingExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ValidationException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ValidationException":
+ response = await deserializeAws_restJson1_1ValidationExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ default:
+ errorCode = errorCode || "UnknownError";
+ response = {
+ __type: `com.amazonaws.networkmanager.V2019_07_05#${errorCode}`,
+ $fault: "client",
+ $metadata: deserializeMetadata(output)
+ };
+ }
+ return Promise.reject(Object.assign(new Error(response.__type), response));
+}
+
+export async function deserializeAws_restJson1_1UpdateGlobalNetworkCommand(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ if (output.statusCode !== 200) {
+ return deserializeAws_restJson1_1UpdateGlobalNetworkCommandError(
+ output,
+ context
+ );
+ }
+ const contents: UpdateGlobalNetworkCommandOutput = {
+ $metadata: deserializeMetadata(output),
+ __type: "UpdateGlobalNetworkResponse",
+ GlobalNetwork: undefined
+ };
+ const data: any = await parseBody(output.body, context);
+ if (data.GlobalNetwork !== undefined) {
+ contents.GlobalNetwork = deserializeAws_restJson1_1GlobalNetwork(
+ data.GlobalNetwork,
+ context
+ );
+ }
+ return Promise.resolve(contents);
+}
+
+async function deserializeAws_restJson1_1UpdateGlobalNetworkCommandError(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ const data: any = await parseBody(output.body, context);
+ const parsedOutput: any = {
+ ...output,
+ body: data
+ };
+ let response: __SmithyException & __MetadataBearer;
+ let errorCode: String;
+ errorCode = output.headers["x-amzn-errortype"].split(":")[0];
+ switch (errorCode) {
+ case "AccessDeniedException":
+ case "com.amazonaws.networkmanager.V2019_07_05#AccessDeniedException":
+ response = await deserializeAws_restJson1_1AccessDeniedExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ConflictException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ConflictException":
+ response = await deserializeAws_restJson1_1ConflictExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "InternalServerException":
+ case "com.amazonaws.networkmanager.V2019_07_05#InternalServerException":
+ response = await deserializeAws_restJson1_1InternalServerExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ResourceNotFoundException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ResourceNotFoundException":
+ response = await deserializeAws_restJson1_1ResourceNotFoundExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ThrottlingException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ThrottlingException":
+ response = await deserializeAws_restJson1_1ThrottlingExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ValidationException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ValidationException":
+ response = await deserializeAws_restJson1_1ValidationExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ default:
+ errorCode = errorCode || "UnknownError";
+ response = {
+ __type: `com.amazonaws.networkmanager.V2019_07_05#${errorCode}`,
+ $fault: "client",
+ $metadata: deserializeMetadata(output)
+ };
+ }
+ return Promise.reject(Object.assign(new Error(response.__type), response));
+}
+
+export async function deserializeAws_restJson1_1UpdateLinkCommand(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ if (output.statusCode !== 200) {
+ return deserializeAws_restJson1_1UpdateLinkCommandError(output, context);
+ }
+ const contents: UpdateLinkCommandOutput = {
+ $metadata: deserializeMetadata(output),
+ __type: "UpdateLinkResponse",
+ Link: undefined
+ };
+ const data: any = await parseBody(output.body, context);
+ if (data.Link !== undefined) {
+ contents.Link = deserializeAws_restJson1_1Link(data.Link, context);
+ }
+ return Promise.resolve(contents);
+}
+
+async function deserializeAws_restJson1_1UpdateLinkCommandError(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ const data: any = await parseBody(output.body, context);
+ const parsedOutput: any = {
+ ...output,
+ body: data
+ };
+ let response: __SmithyException & __MetadataBearer;
+ let errorCode: String;
+ errorCode = output.headers["x-amzn-errortype"].split(":")[0];
+ switch (errorCode) {
+ case "AccessDeniedException":
+ case "com.amazonaws.networkmanager.V2019_07_05#AccessDeniedException":
+ response = await deserializeAws_restJson1_1AccessDeniedExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ConflictException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ConflictException":
+ response = await deserializeAws_restJson1_1ConflictExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "InternalServerException":
+ case "com.amazonaws.networkmanager.V2019_07_05#InternalServerException":
+ response = await deserializeAws_restJson1_1InternalServerExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ResourceNotFoundException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ResourceNotFoundException":
+ response = await deserializeAws_restJson1_1ResourceNotFoundExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ServiceQuotaExceededException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ServiceQuotaExceededException":
+ response = await deserializeAws_restJson1_1ServiceQuotaExceededExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ThrottlingException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ThrottlingException":
+ response = await deserializeAws_restJson1_1ThrottlingExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ValidationException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ValidationException":
+ response = await deserializeAws_restJson1_1ValidationExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ default:
+ errorCode = errorCode || "UnknownError";
+ response = {
+ __type: `com.amazonaws.networkmanager.V2019_07_05#${errorCode}`,
+ $fault: "client",
+ $metadata: deserializeMetadata(output)
+ };
+ }
+ return Promise.reject(Object.assign(new Error(response.__type), response));
+}
+
+export async function deserializeAws_restJson1_1UpdateSiteCommand(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ if (output.statusCode !== 200) {
+ return deserializeAws_restJson1_1UpdateSiteCommandError(output, context);
+ }
+ const contents: UpdateSiteCommandOutput = {
+ $metadata: deserializeMetadata(output),
+ __type: "UpdateSiteResponse",
+ Site: undefined
+ };
+ const data: any = await parseBody(output.body, context);
+ if (data.Site !== undefined) {
+ contents.Site = deserializeAws_restJson1_1Site(data.Site, context);
+ }
+ return Promise.resolve(contents);
+}
+
+async function deserializeAws_restJson1_1UpdateSiteCommandError(
+ output: __HttpResponse,
+ context: __SerdeContext
+): Promise {
+ const data: any = await parseBody(output.body, context);
+ const parsedOutput: any = {
+ ...output,
+ body: data
+ };
+ let response: __SmithyException & __MetadataBearer;
+ let errorCode: String;
+ errorCode = output.headers["x-amzn-errortype"].split(":")[0];
+ switch (errorCode) {
+ case "AccessDeniedException":
+ case "com.amazonaws.networkmanager.V2019_07_05#AccessDeniedException":
+ response = await deserializeAws_restJson1_1AccessDeniedExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ConflictException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ConflictException":
+ response = await deserializeAws_restJson1_1ConflictExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "InternalServerException":
+ case "com.amazonaws.networkmanager.V2019_07_05#InternalServerException":
+ response = await deserializeAws_restJson1_1InternalServerExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ResourceNotFoundException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ResourceNotFoundException":
+ response = await deserializeAws_restJson1_1ResourceNotFoundExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ThrottlingException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ThrottlingException":
+ response = await deserializeAws_restJson1_1ThrottlingExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ case "ValidationException":
+ case "com.amazonaws.networkmanager.V2019_07_05#ValidationException":
+ response = await deserializeAws_restJson1_1ValidationExceptionResponse(
+ parsedOutput,
+ context
+ );
+ break;
+ default:
+ errorCode = errorCode || "UnknownError";
+ response = {
+ __type: `com.amazonaws.networkmanager.V2019_07_05#${errorCode}`,
+ $fault: "client",
+ $metadata: deserializeMetadata(output)
+ };
+ }
+ return Promise.reject(Object.assign(new Error(response.__type), response));
+}
+
+const deserializeAws_restJson1_1AccessDeniedExceptionResponse = async (
+ output: any,
+ context: __SerdeContext
+): Promise => {
+ const contents: AccessDeniedException = {
+ __type: "AccessDeniedException",
+ $fault: "client",
+ $metadata: deserializeMetadata(output),
+ Message: undefined
+ };
+ const data: any = await parseBody(output.body, context);
+ if (data.Message !== undefined) {
+ contents.Message = data.Message;
+ }
+ return contents;
+};
+
+const deserializeAws_restJson1_1ConflictExceptionResponse = async (
+ output: any,
+ context: __SerdeContext
+): Promise => {
+ const contents: ConflictException = {
+ __type: "ConflictException",
+ $fault: "client",
+ $metadata: deserializeMetadata(output),
+ Message: undefined,
+ ResourceId: undefined,
+ ResourceType: undefined
+ };
+ const data: any = await parseBody(output.body, context);
+ if (data.Message !== undefined) {
+ contents.Message = data.Message;
+ }
+ if (data.ResourceId !== undefined) {
+ contents.ResourceId = data.ResourceId;
+ }
+ if (data.ResourceType !== undefined) {
+ contents.ResourceType = data.ResourceType;
+ }
+ return contents;
+};
+
+const deserializeAws_restJson1_1InternalServerExceptionResponse = async (
+ output: any,
+ context: __SerdeContext
+): Promise => {
+ const contents: InternalServerException = {
+ __type: "InternalServerException",
+ $fault: "server",
+ $metadata: deserializeMetadata(output),
+ Message: undefined,
+ RetryAfterSeconds: undefined
+ };
+ if (output.headers["Retry-After"] !== undefined) {
+ contents.RetryAfterSeconds = parseInt(output.headers["Retry-After"], 10);
+ }
+ const data: any = await parseBody(output.body, context);
+ if (data.Message !== undefined) {
+ contents.Message = data.Message;
+ }
+ return contents;
+};
+
+const deserializeAws_restJson1_1ResourceNotFoundExceptionResponse = async (
+ output: any,
+ context: __SerdeContext
+): Promise => {
+ const contents: ResourceNotFoundException = {
+ __type: "ResourceNotFoundException",
+ $fault: "client",
+ $metadata: deserializeMetadata(output),
+ Message: undefined,
+ ResourceId: undefined,
+ ResourceType: undefined
+ };
+ const data: any = await parseBody(output.body, context);
+ if (data.Message !== undefined) {
+ contents.Message = data.Message;
+ }
+ if (data.ResourceId !== undefined) {
+ contents.ResourceId = data.ResourceId;
+ }
+ if (data.ResourceType !== undefined) {
+ contents.ResourceType = data.ResourceType;
+ }
+ return contents;
+};
+
+const deserializeAws_restJson1_1ServiceQuotaExceededExceptionResponse = async (
+ output: any,
+ context: __SerdeContext
+): Promise => {
+ const contents: ServiceQuotaExceededException = {
+ __type: "ServiceQuotaExceededException",
+ $fault: "client",
+ $metadata: deserializeMetadata(output),
+ LimitCode: undefined,
+ Message: undefined,
+ ResourceId: undefined,
+ ResourceType: undefined,
+ ServiceCode: undefined
+ };
+ const data: any = await parseBody(output.body, context);
+ if (data.LimitCode !== undefined) {
+ contents.LimitCode = data.LimitCode;
+ }
+ if (data.Message !== undefined) {
+ contents.Message = data.Message;
+ }
+ if (data.ResourceId !== undefined) {
+ contents.ResourceId = data.ResourceId;
+ }
+ if (data.ResourceType !== undefined) {
+ contents.ResourceType = data.ResourceType;
+ }
+ if (data.ServiceCode !== undefined) {
+ contents.ServiceCode = data.ServiceCode;
+ }
+ return contents;
+};
+
+const deserializeAws_restJson1_1ThrottlingExceptionResponse = async (
+ output: any,
+ context: __SerdeContext
+): Promise => {
+ const contents: ThrottlingException = {
+ __type: "ThrottlingException",
+ $fault: "client",
+ $metadata: deserializeMetadata(output),
+ Message: undefined,
+ RetryAfterSeconds: undefined
+ };
+ if (output.headers["Retry-After"] !== undefined) {
+ contents.RetryAfterSeconds = parseInt(output.headers["Retry-After"], 10);
+ }
+ const data: any = await parseBody(output.body, context);
+ if (data.Message !== undefined) {
+ contents.Message = data.Message;
+ }
+ return contents;
+};
+
+const deserializeAws_restJson1_1ValidationExceptionResponse = async (
+ output: any,
+ context: __SerdeContext
+): Promise => {
+ const contents: ValidationException = {
+ __type: "ValidationException",
+ $fault: "client",
+ $metadata: deserializeMetadata(output),
+ Fields: undefined,
+ Message: undefined,
+ Reason: undefined
+ };
+ const data: any = await parseBody(output.body, context);
+ if (data.Fields !== undefined) {
+ contents.Fields = deserializeAws_restJson1_1ValidationExceptionFieldList(
+ data.Fields,
+ context
+ );
+ }
+ if (data.Message !== undefined) {
+ contents.Message = data.Message;
+ }
+ if (data.Reason !== undefined) {
+ contents.Reason = data.Reason;
+ }
+ return contents;
+};
+
+const serializeAws_restJson1_1Bandwidth = (
+ input: Bandwidth,
+ context: __SerdeContext
+): any => {
+ let bodyParams: any = {};
+ if (input.DownloadSpeed !== undefined) {
+ bodyParams["DownloadSpeed"] = input.DownloadSpeed;
+ }
+ if (input.UploadSpeed !== undefined) {
+ bodyParams["UploadSpeed"] = input.UploadSpeed;
+ }
+ return bodyParams;
+};
+
+const serializeAws_restJson1_1Location = (
+ input: Location,
+ context: __SerdeContext
+): any => {
+ let bodyParams: any = {};
+ if (input.Address !== undefined) {
+ bodyParams["Address"] = input.Address;
+ }
+ if (input.Latitude !== undefined) {
+ bodyParams["Latitude"] = input.Latitude;
+ }
+ if (input.Longitude !== undefined) {
+ bodyParams["Longitude"] = input.Longitude;
+ }
+ return bodyParams;
+};
+
+const serializeAws_restJson1_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_restJson1_1TagList = (
+ input: Array,
+ context: __SerdeContext
+): any => {
+ return (input || []).map(entry =>
+ serializeAws_restJson1_1Tag(entry, context)
+ );
+};
+
+const deserializeAws_restJson1_1Bandwidth = (
+ output: any,
+ context: __SerdeContext
+): Bandwidth => {
+ let contents: any = {
+ __type: "Bandwidth",
+ DownloadSpeed: undefined,
+ UploadSpeed: undefined
+ };
+ if (output.DownloadSpeed !== undefined) {
+ contents.DownloadSpeed = output.DownloadSpeed;
+ }
+ if (output.UploadSpeed !== undefined) {
+ contents.UploadSpeed = output.UploadSpeed;
+ }
+ return contents;
+};
+
+const deserializeAws_restJson1_1CustomerGatewayAssociation = (
+ output: any,
+ context: __SerdeContext
+): CustomerGatewayAssociation => {
+ let contents: any = {
+ __type: "CustomerGatewayAssociation",
+ CustomerGatewayArn: undefined,
+ DeviceId: undefined,
+ GlobalNetworkId: undefined,
+ LinkId: undefined,
+ State: undefined
+ };
+ if (output.CustomerGatewayArn !== undefined) {
+ contents.CustomerGatewayArn = output.CustomerGatewayArn;
+ }
+ if (output.DeviceId !== undefined) {
+ contents.DeviceId = output.DeviceId;
+ }
+ if (output.GlobalNetworkId !== undefined) {
+ contents.GlobalNetworkId = output.GlobalNetworkId;
+ }
+ if (output.LinkId !== undefined) {
+ contents.LinkId = output.LinkId;
+ }
+ if (output.State !== undefined) {
+ contents.State = output.State;
+ }
+ return contents;
+};
+
+const deserializeAws_restJson1_1CustomerGatewayAssociationList = (
+ output: any,
+ context: __SerdeContext
+): Array => {
+ return (output || []).map((entry: any) =>
+ deserializeAws_restJson1_1CustomerGatewayAssociation(entry, context)
+ );
+};
+
+const deserializeAws_restJson1_1Device = (
+ output: any,
+ context: __SerdeContext
+): Device => {
+ let contents: any = {
+ __type: "Device",
+ CreatedAt: undefined,
+ Description: undefined,
+ DeviceArn: undefined,
+ DeviceId: undefined,
+ GlobalNetworkId: undefined,
+ Location: undefined,
+ Model: undefined,
+ SerialNumber: undefined,
+ SiteId: undefined,
+ State: undefined,
+ Tags: undefined,
+ Type: undefined,
+ Vendor: undefined
+ };
+ if (output.CreatedAt !== undefined) {
+ contents.CreatedAt = new Date(
+ output.CreatedAt % 1 != 0
+ ? Math.round(output.CreatedAt * 1000)
+ : output.CreatedAt
+ );
+ }
+ if (output.Description !== undefined) {
+ contents.Description = output.Description;
+ }
+ if (output.DeviceArn !== undefined) {
+ contents.DeviceArn = output.DeviceArn;
+ }
+ if (output.DeviceId !== undefined) {
+ contents.DeviceId = output.DeviceId;
+ }
+ if (output.GlobalNetworkId !== undefined) {
+ contents.GlobalNetworkId = output.GlobalNetworkId;
+ }
+ if (output.Location !== undefined) {
+ contents.Location = deserializeAws_restJson1_1Location(
+ output.Location,
+ context
+ );
+ }
+ if (output.Model !== undefined) {
+ contents.Model = output.Model;
+ }
+ if (output.SerialNumber !== undefined) {
+ contents.SerialNumber = output.SerialNumber;
+ }
+ if (output.SiteId !== undefined) {
+ contents.SiteId = output.SiteId;
+ }
+ if (output.State !== undefined) {
+ contents.State = output.State;
+ }
+ if (output.Tags !== undefined) {
+ contents.Tags = deserializeAws_restJson1_1TagList(output.Tags, context);
+ }
+ if (output.Type !== undefined) {
+ contents.Type = output.Type;
+ }
+ if (output.Vendor !== undefined) {
+ contents.Vendor = output.Vendor;
+ }
+ return contents;
+};
+
+const deserializeAws_restJson1_1DeviceList = (
+ output: any,
+ context: __SerdeContext
+): Array => {
+ return (output || []).map((entry: any) =>
+ deserializeAws_restJson1_1Device(entry, context)
+ );
+};
+
+const deserializeAws_restJson1_1GlobalNetwork = (
+ output: any,
+ context: __SerdeContext
+): GlobalNetwork => {
+ let contents: any = {
+ __type: "GlobalNetwork",
+ CreatedAt: undefined,
+ Description: undefined,
+ GlobalNetworkArn: undefined,
+ GlobalNetworkId: undefined,
+ State: undefined,
+ Tags: undefined
+ };
+ if (output.CreatedAt !== undefined) {
+ contents.CreatedAt = new Date(
+ output.CreatedAt % 1 != 0
+ ? Math.round(output.CreatedAt * 1000)
+ : output.CreatedAt
+ );
+ }
+ if (output.Description !== undefined) {
+ contents.Description = output.Description;
+ }
+ if (output.GlobalNetworkArn !== undefined) {
+ contents.GlobalNetworkArn = output.GlobalNetworkArn;
+ }
+ if (output.GlobalNetworkId !== undefined) {
+ contents.GlobalNetworkId = output.GlobalNetworkId;
+ }
+ if (output.State !== undefined) {
+ contents.State = output.State;
+ }
+ if (output.Tags !== undefined) {
+ contents.Tags = deserializeAws_restJson1_1TagList(output.Tags, context);
+ }
+ return contents;
+};
+
+const deserializeAws_restJson1_1GlobalNetworkList = (
+ output: any,
+ context: __SerdeContext
+): Array => {
+ return (output || []).map((entry: any) =>
+ deserializeAws_restJson1_1GlobalNetwork(entry, context)
+ );
+};
+
+const deserializeAws_restJson1_1Link = (
+ output: any,
+ context: __SerdeContext
+): Link => {
+ let contents: any = {
+ __type: "Link",
+ Bandwidth: undefined,
+ CreatedAt: undefined,
+ Description: undefined,
+ GlobalNetworkId: undefined,
+ LinkArn: undefined,
+ LinkId: undefined,
+ Provider: undefined,
+ SiteId: undefined,
+ State: undefined,
+ Tags: undefined,
+ Type: undefined
+ };
+ if (output.Bandwidth !== undefined) {
+ contents.Bandwidth = deserializeAws_restJson1_1Bandwidth(
+ output.Bandwidth,
+ context
+ );
+ }
+ if (output.CreatedAt !== undefined) {
+ contents.CreatedAt = new Date(
+ output.CreatedAt % 1 != 0
+ ? Math.round(output.CreatedAt * 1000)
+ : output.CreatedAt
+ );
+ }
+ if (output.Description !== undefined) {
+ contents.Description = output.Description;
+ }
+ if (output.GlobalNetworkId !== undefined) {
+ contents.GlobalNetworkId = output.GlobalNetworkId;
+ }
+ if (output.LinkArn !== undefined) {
+ contents.LinkArn = output.LinkArn;
+ }
+ if (output.LinkId !== undefined) {
+ contents.LinkId = output.LinkId;
+ }
+ if (output.Provider !== undefined) {
+ contents.Provider = output.Provider;
+ }
+ if (output.SiteId !== undefined) {
+ contents.SiteId = output.SiteId;
+ }
+ if (output.State !== undefined) {
+ contents.State = output.State;
+ }
+ if (output.Tags !== undefined) {
+ contents.Tags = deserializeAws_restJson1_1TagList(output.Tags, context);
+ }
+ if (output.Type !== undefined) {
+ contents.Type = output.Type;
+ }
+ return contents;
+};
+
+const deserializeAws_restJson1_1LinkAssociation = (
+ output: any,
+ context: __SerdeContext
+): LinkAssociation => {
+ let contents: any = {
+ __type: "LinkAssociation",
+ DeviceId: undefined,
+ GlobalNetworkId: undefined,
+ LinkAssociationState: undefined,
+ LinkId: undefined
+ };
+ if (output.DeviceId !== undefined) {
+ contents.DeviceId = output.DeviceId;
+ }
+ if (output.GlobalNetworkId !== undefined) {
+ contents.GlobalNetworkId = output.GlobalNetworkId;
+ }
+ if (output.LinkAssociationState !== undefined) {
+ contents.LinkAssociationState = output.LinkAssociationState;
+ }
+ if (output.LinkId !== undefined) {
+ contents.LinkId = output.LinkId;
+ }
+ return contents;
+};
+
+const deserializeAws_restJson1_1LinkAssociationList = (
+ output: any,
+ context: __SerdeContext
+): Array => {
+ return (output || []).map((entry: any) =>
+ deserializeAws_restJson1_1LinkAssociation(entry, context)
+ );
+};
+
+const deserializeAws_restJson1_1LinkList = (
+ output: any,
+ context: __SerdeContext
+): Array => {
+ return (output || []).map((entry: any) =>
+ deserializeAws_restJson1_1Link(entry, context)
+ );
+};
+
+const deserializeAws_restJson1_1Location = (
+ output: any,
+ context: __SerdeContext
+): Location => {
+ let contents: any = {
+ __type: "Location",
+ Address: undefined,
+ Latitude: undefined,
+ Longitude: undefined
+ };
+ if (output.Address !== undefined) {
+ contents.Address = output.Address;
+ }
+ if (output.Latitude !== undefined) {
+ contents.Latitude = output.Latitude;
+ }
+ if (output.Longitude !== undefined) {
+ contents.Longitude = output.Longitude;
+ }
+ return contents;
+};
+
+const deserializeAws_restJson1_1Site = (
+ output: any,
+ context: __SerdeContext
+): Site => {
+ let contents: any = {
+ __type: "Site",
+ CreatedAt: undefined,
+ Description: undefined,
+ GlobalNetworkId: undefined,
+ Location: undefined,
+ SiteArn: undefined,
+ SiteId: undefined,
+ State: undefined,
+ Tags: undefined
+ };
+ if (output.CreatedAt !== undefined) {
+ contents.CreatedAt = new Date(
+ output.CreatedAt % 1 != 0
+ ? Math.round(output.CreatedAt * 1000)
+ : output.CreatedAt
+ );
+ }
+ if (output.Description !== undefined) {
+ contents.Description = output.Description;
+ }
+ if (output.GlobalNetworkId !== undefined) {
+ contents.GlobalNetworkId = output.GlobalNetworkId;
+ }
+ if (output.Location !== undefined) {
+ contents.Location = deserializeAws_restJson1_1Location(
+ output.Location,
+ context
+ );
+ }
+ if (output.SiteArn !== undefined) {
+ contents.SiteArn = output.SiteArn;
+ }
+ if (output.SiteId !== undefined) {
+ contents.SiteId = output.SiteId;
+ }
+ if (output.State !== undefined) {
+ contents.State = output.State;
+ }
+ if (output.Tags !== undefined) {
+ contents.Tags = deserializeAws_restJson1_1TagList(output.Tags, context);
+ }
+ return contents;
+};
+
+const deserializeAws_restJson1_1SiteList = (
+ output: any,
+ context: __SerdeContext
+): Array => {
+ return (output || []).map((entry: any) =>
+ deserializeAws_restJson1_1Site(entry, context)
+ );
+};
+
+const deserializeAws_restJson1_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_restJson1_1TagList = (
+ output: any,
+ context: __SerdeContext
+): Array => {
+ return (output || []).map((entry: any) =>
+ deserializeAws_restJson1_1Tag(entry, context)
+ );
+};
+
+const deserializeAws_restJson1_1TransitGatewayRegistration = (
+ output: any,
+ context: __SerdeContext
+): TransitGatewayRegistration => {
+ let contents: any = {
+ __type: "TransitGatewayRegistration",
+ GlobalNetworkId: undefined,
+ State: undefined,
+ TransitGatewayArn: undefined
+ };
+ if (output.GlobalNetworkId !== undefined) {
+ contents.GlobalNetworkId = output.GlobalNetworkId;
+ }
+ if (output.State !== undefined) {
+ contents.State = deserializeAws_restJson1_1TransitGatewayRegistrationStateReason(
+ output.State,
+ context
+ );
+ }
+ if (output.TransitGatewayArn !== undefined) {
+ contents.TransitGatewayArn = output.TransitGatewayArn;
+ }
+ return contents;
+};
+
+const deserializeAws_restJson1_1TransitGatewayRegistrationList = (
+ output: any,
+ context: __SerdeContext
+): Array => {
+ return (output || []).map((entry: any) =>
+ deserializeAws_restJson1_1TransitGatewayRegistration(entry, context)
+ );
+};
+
+const deserializeAws_restJson1_1TransitGatewayRegistrationStateReason = (
+ output: any,
+ context: __SerdeContext
+): TransitGatewayRegistrationStateReason => {
+ let contents: any = {
+ __type: "TransitGatewayRegistrationStateReason",
+ Code: undefined,
+ Message: undefined
+ };
+ if (output.Code !== undefined) {
+ contents.Code = output.Code;
+ }
+ if (output.Message !== undefined) {
+ contents.Message = output.Message;
+ }
+ return contents;
+};
+
+const deserializeAws_restJson1_1ValidationExceptionField = (
+ output: any,
+ context: __SerdeContext
+): ValidationExceptionField => {
+ let contents: any = {
+ __type: "ValidationExceptionField",
+ Message: undefined,
+ Name: undefined
+ };
+ if (output.Message !== undefined) {
+ contents.Message = output.Message;
+ }
+ if (output.Name !== undefined) {
+ contents.Name = output.Name;
+ }
+ return contents;
+};
+
+const deserializeAws_restJson1_1ValidationExceptionFieldList = (
+ output: any,
+ context: __SerdeContext
+): Array