@aws-sdk/client-appconfig 3.35.0 → 3.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +47 -0
- package/dist-cjs/AppConfig.js +0 -52
- package/dist-cjs/AppConfigClient.js +0 -57
- package/dist-cjs/commands/CreateApplicationCommand.js +0 -28
- package/dist-cjs/commands/CreateConfigurationProfileCommand.js +0 -42
- package/dist-cjs/commands/CreateDeploymentStrategyCommand.js +0 -28
- package/dist-cjs/commands/CreateEnvironmentCommand.js +0 -31
- package/dist-cjs/commands/CreateHostedConfigurationVersionCommand.js +0 -25
- package/dist-cjs/commands/DeleteApplicationCommand.js +0 -26
- package/dist-cjs/commands/DeleteConfigurationProfileCommand.js +0 -26
- package/dist-cjs/commands/DeleteDeploymentStrategyCommand.js +0 -26
- package/dist-cjs/commands/DeleteEnvironmentCommand.js +0 -26
- package/dist-cjs/commands/DeleteHostedConfigurationVersionCommand.js +0 -25
- package/dist-cjs/commands/GetApplicationCommand.js +0 -25
- package/dist-cjs/commands/GetConfigurationCommand.js +0 -37
- package/dist-cjs/commands/GetConfigurationProfileCommand.js +0 -25
- package/dist-cjs/commands/GetDeploymentCommand.js +0 -25
- package/dist-cjs/commands/GetDeploymentStrategyCommand.js +0 -29
- package/dist-cjs/commands/GetEnvironmentCommand.js +0 -29
- package/dist-cjs/commands/GetHostedConfigurationVersionCommand.js +0 -25
- package/dist-cjs/commands/ListApplicationsCommand.js +0 -25
- package/dist-cjs/commands/ListConfigurationProfilesCommand.js +0 -25
- package/dist-cjs/commands/ListDeploymentStrategiesCommand.js +0 -25
- package/dist-cjs/commands/ListDeploymentsCommand.js +0 -25
- package/dist-cjs/commands/ListEnvironmentsCommand.js +0 -25
- package/dist-cjs/commands/ListHostedConfigurationVersionsCommand.js +0 -26
- package/dist-cjs/commands/ListTagsForResourceCommand.js +0 -25
- package/dist-cjs/commands/StartDeploymentCommand.js +0 -25
- package/dist-cjs/commands/StopDeploymentCommand.js +0 -27
- package/dist-cjs/commands/TagResourceCommand.js +0 -27
- package/dist-cjs/commands/UntagResourceCommand.js +0 -25
- package/dist-cjs/commands/UpdateApplicationCommand.js +0 -25
- package/dist-cjs/commands/UpdateConfigurationProfileCommand.js +0 -25
- package/dist-cjs/commands/UpdateDeploymentStrategyCommand.js +0 -25
- package/dist-cjs/commands/UpdateEnvironmentCommand.js +0 -25
- package/dist-cjs/commands/ValidateConfigurationCommand.js +0 -25
- package/dist-cjs/commands/index.js +36 -0
- package/dist-cjs/endpoints.js +1 -2
- package/dist-cjs/index.js +4 -43
- package/dist-cjs/models/index.js +0 -1
- package/dist-cjs/models/models_0.js +0 -178
- package/dist-cjs/pagination/Interfaces.js +0 -1
- package/dist-cjs/pagination/ListApplicationsPaginator.js +0 -11
- package/dist-cjs/pagination/ListConfigurationProfilesPaginator.js +0 -11
- package/dist-cjs/pagination/ListDeploymentStrategiesPaginator.js +0 -11
- package/dist-cjs/pagination/ListDeploymentsPaginator.js +0 -11
- package/dist-cjs/pagination/ListEnvironmentsPaginator.js +0 -11
- package/dist-cjs/pagination/ListHostedConfigurationVersionsPaginator.js +0 -11
- package/dist-cjs/pagination/index.js +10 -0
- package/dist-cjs/protocols/Aws_restJson1.js +0 -6
- package/dist-cjs/runtimeConfig.browser.js +1 -6
- package/dist-cjs/runtimeConfig.js +2 -7
- package/dist-cjs/runtimeConfig.native.js +0 -4
- package/dist-cjs/runtimeConfig.shared.js +0 -4
- package/dist-es/AppConfig.js +0 -1
- package/dist-es/AppConfigClient.js +0 -1
- package/dist-es/commands/CreateApplicationCommand.js +0 -1
- package/dist-es/commands/CreateConfigurationProfileCommand.js +0 -1
- package/dist-es/commands/CreateDeploymentStrategyCommand.js +0 -1
- package/dist-es/commands/CreateEnvironmentCommand.js +0 -1
- package/dist-es/commands/CreateHostedConfigurationVersionCommand.js +0 -1
- package/dist-es/commands/DeleteApplicationCommand.js +0 -1
- package/dist-es/commands/DeleteConfigurationProfileCommand.js +0 -1
- package/dist-es/commands/DeleteDeploymentStrategyCommand.js +0 -1
- package/dist-es/commands/DeleteEnvironmentCommand.js +0 -1
- package/dist-es/commands/DeleteHostedConfigurationVersionCommand.js +0 -1
- package/dist-es/commands/GetApplicationCommand.js +0 -1
- package/dist-es/commands/GetConfigurationCommand.js +0 -1
- package/dist-es/commands/GetConfigurationProfileCommand.js +0 -1
- package/dist-es/commands/GetDeploymentCommand.js +0 -1
- package/dist-es/commands/GetDeploymentStrategyCommand.js +0 -1
- package/dist-es/commands/GetEnvironmentCommand.js +0 -1
- package/dist-es/commands/GetHostedConfigurationVersionCommand.js +0 -1
- package/dist-es/commands/ListApplicationsCommand.js +0 -1
- package/dist-es/commands/ListConfigurationProfilesCommand.js +0 -1
- package/dist-es/commands/ListDeploymentStrategiesCommand.js +0 -1
- package/dist-es/commands/ListDeploymentsCommand.js +0 -1
- package/dist-es/commands/ListEnvironmentsCommand.js +0 -1
- package/dist-es/commands/ListHostedConfigurationVersionsCommand.js +0 -1
- package/dist-es/commands/ListTagsForResourceCommand.js +0 -1
- package/dist-es/commands/StartDeploymentCommand.js +0 -1
- package/dist-es/commands/StopDeploymentCommand.js +0 -1
- package/dist-es/commands/TagResourceCommand.js +0 -1
- package/dist-es/commands/UntagResourceCommand.js +0 -1
- package/dist-es/commands/UpdateApplicationCommand.js +0 -1
- package/dist-es/commands/UpdateConfigurationProfileCommand.js +0 -1
- package/dist-es/commands/UpdateDeploymentStrategyCommand.js +0 -1
- package/dist-es/commands/UpdateEnvironmentCommand.js +0 -1
- package/dist-es/commands/ValidateConfigurationCommand.js +0 -1
- package/dist-es/commands/index.js +33 -0
- package/dist-es/endpoints.js +1 -2
- package/dist-es/index.js +4 -43
- package/dist-es/models/index.js +0 -1
- package/dist-es/models/models_0.js +0 -1
- package/dist-es/pagination/Interfaces.js +0 -1
- package/dist-es/pagination/ListApplicationsPaginator.js +0 -1
- package/dist-es/pagination/ListConfigurationProfilesPaginator.js +0 -1
- package/dist-es/pagination/ListDeploymentStrategiesPaginator.js +0 -1
- package/dist-es/pagination/ListDeploymentsPaginator.js +0 -1
- package/dist-es/pagination/ListEnvironmentsPaginator.js +0 -1
- package/dist-es/pagination/ListHostedConfigurationVersionsPaginator.js +0 -1
- package/dist-es/pagination/index.js +7 -0
- package/dist-es/protocols/Aws_restJson1.js +0 -1
- package/dist-es/runtimeConfig.browser.js +1 -2
- package/dist-es/runtimeConfig.js +2 -3
- package/dist-es/runtimeConfig.native.js +0 -1
- package/dist-es/runtimeConfig.shared.js +0 -1
- package/dist-types/commands/index.d.ts +33 -0
- package/dist-types/index.d.ts +4 -42
- package/dist-types/pagination/index.d.ts +7 -0
- package/dist-types/ts3.4/AppConfig.d.ts +34 -208
- package/dist-types/ts3.4/AppConfigClient.d.ts +24 -137
- package/dist-types/ts3.4/commands/CreateApplicationCommand.d.ts +2 -23
- package/dist-types/ts3.4/commands/CreateConfigurationProfileCommand.d.ts +2 -37
- package/dist-types/ts3.4/commands/CreateDeploymentStrategyCommand.d.ts +2 -23
- package/dist-types/ts3.4/commands/CreateEnvironmentCommand.d.ts +2 -26
- package/dist-types/ts3.4/commands/CreateHostedConfigurationVersionCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/DeleteApplicationCommand.d.ts +2 -21
- package/dist-types/ts3.4/commands/DeleteConfigurationProfileCommand.d.ts +2 -21
- package/dist-types/ts3.4/commands/DeleteDeploymentStrategyCommand.d.ts +2 -21
- package/dist-types/ts3.4/commands/DeleteEnvironmentCommand.d.ts +2 -21
- package/dist-types/ts3.4/commands/DeleteHostedConfigurationVersionCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/GetApplicationCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/GetConfigurationCommand.d.ts +2 -32
- package/dist-types/ts3.4/commands/GetConfigurationProfileCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/GetDeploymentCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/GetDeploymentStrategyCommand.d.ts +2 -24
- package/dist-types/ts3.4/commands/GetEnvironmentCommand.d.ts +2 -24
- package/dist-types/ts3.4/commands/GetHostedConfigurationVersionCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/ListApplicationsCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/ListConfigurationProfilesCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/ListDeploymentStrategiesCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/ListDeploymentsCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/ListEnvironmentsCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/ListHostedConfigurationVersionsCommand.d.ts +2 -21
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/StartDeploymentCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/StopDeploymentCommand.d.ts +2 -22
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +2 -22
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/UpdateApplicationCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/UpdateConfigurationProfileCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/UpdateDeploymentStrategyCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/UpdateEnvironmentCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/ValidateConfigurationCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/index.d.ts +33 -0
- package/dist-types/ts3.4/index.d.ts +4 -42
- package/dist-types/ts3.4/models/models_0.d.ts +275 -973
- package/dist-types/ts3.4/pagination/index.d.ts +7 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -3
- package/package.json +33 -30
- package/dist-cjs/AppConfig.js.map +0 -1
- package/dist-cjs/AppConfigClient.js.map +0 -1
- package/dist-cjs/commands/CreateApplicationCommand.js.map +0 -1
- package/dist-cjs/commands/CreateConfigurationProfileCommand.js.map +0 -1
- package/dist-cjs/commands/CreateDeploymentStrategyCommand.js.map +0 -1
- package/dist-cjs/commands/CreateEnvironmentCommand.js.map +0 -1
- package/dist-cjs/commands/CreateHostedConfigurationVersionCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteApplicationCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteConfigurationProfileCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteDeploymentStrategyCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteEnvironmentCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteHostedConfigurationVersionCommand.js.map +0 -1
- package/dist-cjs/commands/GetApplicationCommand.js.map +0 -1
- package/dist-cjs/commands/GetConfigurationCommand.js.map +0 -1
- package/dist-cjs/commands/GetConfigurationProfileCommand.js.map +0 -1
- package/dist-cjs/commands/GetDeploymentCommand.js.map +0 -1
- package/dist-cjs/commands/GetDeploymentStrategyCommand.js.map +0 -1
- package/dist-cjs/commands/GetEnvironmentCommand.js.map +0 -1
- package/dist-cjs/commands/GetHostedConfigurationVersionCommand.js.map +0 -1
- package/dist-cjs/commands/ListApplicationsCommand.js.map +0 -1
- package/dist-cjs/commands/ListConfigurationProfilesCommand.js.map +0 -1
- package/dist-cjs/commands/ListDeploymentStrategiesCommand.js.map +0 -1
- package/dist-cjs/commands/ListDeploymentsCommand.js.map +0 -1
- package/dist-cjs/commands/ListEnvironmentsCommand.js.map +0 -1
- package/dist-cjs/commands/ListHostedConfigurationVersionsCommand.js.map +0 -1
- package/dist-cjs/commands/ListTagsForResourceCommand.js.map +0 -1
- package/dist-cjs/commands/StartDeploymentCommand.js.map +0 -1
- package/dist-cjs/commands/StopDeploymentCommand.js.map +0 -1
- package/dist-cjs/commands/TagResourceCommand.js.map +0 -1
- package/dist-cjs/commands/UntagResourceCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateApplicationCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateConfigurationProfileCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateDeploymentStrategyCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateEnvironmentCommand.js.map +0 -1
- package/dist-cjs/commands/ValidateConfigurationCommand.js.map +0 -1
- package/dist-cjs/endpoints.js.map +0 -1
- package/dist-cjs/index.js.map +0 -1
- package/dist-cjs/models/index.js.map +0 -1
- package/dist-cjs/models/models_0.js.map +0 -1
- package/dist-cjs/pagination/Interfaces.js.map +0 -1
- package/dist-cjs/pagination/ListApplicationsPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListConfigurationProfilesPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListDeploymentStrategiesPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListDeploymentsPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListEnvironmentsPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListHostedConfigurationVersionsPaginator.js.map +0 -1
- package/dist-cjs/protocols/Aws_restJson1.js.map +0 -1
- package/dist-cjs/runtimeConfig.browser.js.map +0 -1
- package/dist-cjs/runtimeConfig.js.map +0 -1
- package/dist-cjs/runtimeConfig.native.js.map +0 -1
- package/dist-cjs/runtimeConfig.shared.js.map +0 -1
- package/dist-es/AppConfig.js.map +0 -1
- package/dist-es/AppConfigClient.js.map +0 -1
- package/dist-es/commands/CreateApplicationCommand.js.map +0 -1
- package/dist-es/commands/CreateConfigurationProfileCommand.js.map +0 -1
- package/dist-es/commands/CreateDeploymentStrategyCommand.js.map +0 -1
- package/dist-es/commands/CreateEnvironmentCommand.js.map +0 -1
- package/dist-es/commands/CreateHostedConfigurationVersionCommand.js.map +0 -1
- package/dist-es/commands/DeleteApplicationCommand.js.map +0 -1
- package/dist-es/commands/DeleteConfigurationProfileCommand.js.map +0 -1
- package/dist-es/commands/DeleteDeploymentStrategyCommand.js.map +0 -1
- package/dist-es/commands/DeleteEnvironmentCommand.js.map +0 -1
- package/dist-es/commands/DeleteHostedConfigurationVersionCommand.js.map +0 -1
- package/dist-es/commands/GetApplicationCommand.js.map +0 -1
- package/dist-es/commands/GetConfigurationCommand.js.map +0 -1
- package/dist-es/commands/GetConfigurationProfileCommand.js.map +0 -1
- package/dist-es/commands/GetDeploymentCommand.js.map +0 -1
- package/dist-es/commands/GetDeploymentStrategyCommand.js.map +0 -1
- package/dist-es/commands/GetEnvironmentCommand.js.map +0 -1
- package/dist-es/commands/GetHostedConfigurationVersionCommand.js.map +0 -1
- package/dist-es/commands/ListApplicationsCommand.js.map +0 -1
- package/dist-es/commands/ListConfigurationProfilesCommand.js.map +0 -1
- package/dist-es/commands/ListDeploymentStrategiesCommand.js.map +0 -1
- package/dist-es/commands/ListDeploymentsCommand.js.map +0 -1
- package/dist-es/commands/ListEnvironmentsCommand.js.map +0 -1
- package/dist-es/commands/ListHostedConfigurationVersionsCommand.js.map +0 -1
- package/dist-es/commands/ListTagsForResourceCommand.js.map +0 -1
- package/dist-es/commands/StartDeploymentCommand.js.map +0 -1
- package/dist-es/commands/StopDeploymentCommand.js.map +0 -1
- package/dist-es/commands/TagResourceCommand.js.map +0 -1
- package/dist-es/commands/UntagResourceCommand.js.map +0 -1
- package/dist-es/commands/UpdateApplicationCommand.js.map +0 -1
- package/dist-es/commands/UpdateConfigurationProfileCommand.js.map +0 -1
- package/dist-es/commands/UpdateDeploymentStrategyCommand.js.map +0 -1
- package/dist-es/commands/UpdateEnvironmentCommand.js.map +0 -1
- package/dist-es/commands/ValidateConfigurationCommand.js.map +0 -1
- package/dist-es/endpoints.js.map +0 -1
- package/dist-es/index.js.map +0 -1
- package/dist-es/models/index.js.map +0 -1
- package/dist-es/models/models_0.js.map +0 -1
- package/dist-es/pagination/Interfaces.js.map +0 -1
- package/dist-es/pagination/ListApplicationsPaginator.js.map +0 -1
- package/dist-es/pagination/ListConfigurationProfilesPaginator.js.map +0 -1
- package/dist-es/pagination/ListDeploymentStrategiesPaginator.js.map +0 -1
- package/dist-es/pagination/ListDeploymentsPaginator.js.map +0 -1
- package/dist-es/pagination/ListEnvironmentsPaginator.js.map +0 -1
- package/dist-es/pagination/ListHostedConfigurationVersionsPaginator.js.map +0 -1
- package/dist-es/protocols/Aws_restJson1.js.map +0 -1
- package/dist-es/runtimeConfig.browser.js.map +0 -1
- package/dist-es/runtimeConfig.js.map +0 -1
- package/dist-es/runtimeConfig.native.js.map +0 -1
- package/dist-es/runtimeConfig.shared.js.map +0 -1
- package/jest.config.js +0 -4
- package/src/AppConfig.ts +0 -1325
- package/src/AppConfigClient.ts +0 -431
- package/src/commands/CreateApplicationCommand.ts +0 -98
- package/src/commands/CreateConfigurationProfileCommand.ts +0 -115
- package/src/commands/CreateDeploymentStrategyCommand.ts +0 -98
- package/src/commands/CreateEnvironmentCommand.ts +0 -101
- package/src/commands/CreateHostedConfigurationVersionCommand.ts +0 -101
- package/src/commands/DeleteApplicationCommand.ts +0 -96
- package/src/commands/DeleteConfigurationProfileCommand.ts +0 -99
- package/src/commands/DeleteDeploymentStrategyCommand.ts +0 -96
- package/src/commands/DeleteEnvironmentCommand.ts +0 -96
- package/src/commands/DeleteHostedConfigurationVersionCommand.ts +0 -101
- package/src/commands/GetApplicationCommand.ts +0 -95
- package/src/commands/GetConfigurationCommand.ts +0 -107
- package/src/commands/GetConfigurationProfileCommand.ts +0 -95
- package/src/commands/GetDeploymentCommand.ts +0 -95
- package/src/commands/GetDeploymentStrategyCommand.ts +0 -99
- package/src/commands/GetEnvironmentCommand.ts +0 -99
- package/src/commands/GetHostedConfigurationVersionCommand.ts +0 -98
- package/src/commands/ListApplicationsCommand.ts +0 -95
- package/src/commands/ListConfigurationProfilesCommand.ts +0 -98
- package/src/commands/ListDeploymentStrategiesCommand.ts +0 -95
- package/src/commands/ListDeploymentsCommand.ts +0 -95
- package/src/commands/ListEnvironmentsCommand.ts +0 -95
- package/src/commands/ListHostedConfigurationVersionsCommand.ts +0 -102
- package/src/commands/ListTagsForResourceCommand.ts +0 -95
- package/src/commands/StartDeploymentCommand.ts +0 -95
- package/src/commands/StopDeploymentCommand.ts +0 -97
- package/src/commands/TagResourceCommand.ts +0 -97
- package/src/commands/UntagResourceCommand.ts +0 -95
- package/src/commands/UpdateApplicationCommand.ts +0 -95
- package/src/commands/UpdateConfigurationProfileCommand.ts +0 -98
- package/src/commands/UpdateDeploymentStrategyCommand.ts +0 -95
- package/src/commands/UpdateEnvironmentCommand.ts +0 -95
- package/src/commands/ValidateConfigurationCommand.ts +0 -95
- package/src/endpoints.ts +0 -57
- package/src/index.ts +0 -43
- package/src/models/index.ts +0 -1
- package/src/models/models_0.ts +0 -1941
- package/src/pagination/Interfaces.ts +0 -8
- package/src/pagination/ListApplicationsPaginator.ts +0 -59
- package/src/pagination/ListConfigurationProfilesPaginator.ts +0 -59
- package/src/pagination/ListDeploymentStrategiesPaginator.ts +0 -59
- package/src/pagination/ListDeploymentsPaginator.ts +0 -59
- package/src/pagination/ListEnvironmentsPaginator.ts +0 -59
- package/src/pagination/ListHostedConfigurationVersionsPaginator.ts +0 -59
- package/src/protocols/Aws_restJson1.ts +0 -4709
- package/src/runtimeConfig.browser.ts +0 -41
- package/src/runtimeConfig.native.ts +0 -17
- package/src/runtimeConfig.shared.ts +0 -17
- package/src/runtimeConfig.ts +0 -46
- package/tsconfig.es.json +0 -10
- package/tsconfig.json +0 -33
- package/tsconfig.types.json +0 -9
|
@@ -1,4709 +0,0 @@
|
|
|
1
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
|
|
2
|
-
import {
|
|
3
|
-
expectInt32 as __expectInt32,
|
|
4
|
-
expectNonNull as __expectNonNull,
|
|
5
|
-
expectObject as __expectObject,
|
|
6
|
-
expectString as __expectString,
|
|
7
|
-
extendedEncodeURIComponent as __extendedEncodeURIComponent,
|
|
8
|
-
limitedParseFloat32 as __limitedParseFloat32,
|
|
9
|
-
parseRfc3339DateTime as __parseRfc3339DateTime,
|
|
10
|
-
serializeFloat as __serializeFloat,
|
|
11
|
-
strictParseInt32 as __strictParseInt32,
|
|
12
|
-
} from "@aws-sdk/smithy-client";
|
|
13
|
-
import {
|
|
14
|
-
Endpoint as __Endpoint,
|
|
15
|
-
MetadataBearer as __MetadataBearer,
|
|
16
|
-
ResponseMetadata as __ResponseMetadata,
|
|
17
|
-
SerdeContext as __SerdeContext,
|
|
18
|
-
SmithyException as __SmithyException,
|
|
19
|
-
} from "@aws-sdk/types";
|
|
20
|
-
|
|
21
|
-
import { CreateApplicationCommandInput, CreateApplicationCommandOutput } from "../commands/CreateApplicationCommand";
|
|
22
|
-
import {
|
|
23
|
-
CreateConfigurationProfileCommandInput,
|
|
24
|
-
CreateConfigurationProfileCommandOutput,
|
|
25
|
-
} from "../commands/CreateConfigurationProfileCommand";
|
|
26
|
-
import {
|
|
27
|
-
CreateDeploymentStrategyCommandInput,
|
|
28
|
-
CreateDeploymentStrategyCommandOutput,
|
|
29
|
-
} from "../commands/CreateDeploymentStrategyCommand";
|
|
30
|
-
import { CreateEnvironmentCommandInput, CreateEnvironmentCommandOutput } from "../commands/CreateEnvironmentCommand";
|
|
31
|
-
import {
|
|
32
|
-
CreateHostedConfigurationVersionCommandInput,
|
|
33
|
-
CreateHostedConfigurationVersionCommandOutput,
|
|
34
|
-
} from "../commands/CreateHostedConfigurationVersionCommand";
|
|
35
|
-
import { DeleteApplicationCommandInput, DeleteApplicationCommandOutput } from "../commands/DeleteApplicationCommand";
|
|
36
|
-
import {
|
|
37
|
-
DeleteConfigurationProfileCommandInput,
|
|
38
|
-
DeleteConfigurationProfileCommandOutput,
|
|
39
|
-
} from "../commands/DeleteConfigurationProfileCommand";
|
|
40
|
-
import {
|
|
41
|
-
DeleteDeploymentStrategyCommandInput,
|
|
42
|
-
DeleteDeploymentStrategyCommandOutput,
|
|
43
|
-
} from "../commands/DeleteDeploymentStrategyCommand";
|
|
44
|
-
import { DeleteEnvironmentCommandInput, DeleteEnvironmentCommandOutput } from "../commands/DeleteEnvironmentCommand";
|
|
45
|
-
import {
|
|
46
|
-
DeleteHostedConfigurationVersionCommandInput,
|
|
47
|
-
DeleteHostedConfigurationVersionCommandOutput,
|
|
48
|
-
} from "../commands/DeleteHostedConfigurationVersionCommand";
|
|
49
|
-
import { GetApplicationCommandInput, GetApplicationCommandOutput } from "../commands/GetApplicationCommand";
|
|
50
|
-
import { GetConfigurationCommandInput, GetConfigurationCommandOutput } from "../commands/GetConfigurationCommand";
|
|
51
|
-
import {
|
|
52
|
-
GetConfigurationProfileCommandInput,
|
|
53
|
-
GetConfigurationProfileCommandOutput,
|
|
54
|
-
} from "../commands/GetConfigurationProfileCommand";
|
|
55
|
-
import { GetDeploymentCommandInput, GetDeploymentCommandOutput } from "../commands/GetDeploymentCommand";
|
|
56
|
-
import {
|
|
57
|
-
GetDeploymentStrategyCommandInput,
|
|
58
|
-
GetDeploymentStrategyCommandOutput,
|
|
59
|
-
} from "../commands/GetDeploymentStrategyCommand";
|
|
60
|
-
import { GetEnvironmentCommandInput, GetEnvironmentCommandOutput } from "../commands/GetEnvironmentCommand";
|
|
61
|
-
import {
|
|
62
|
-
GetHostedConfigurationVersionCommandInput,
|
|
63
|
-
GetHostedConfigurationVersionCommandOutput,
|
|
64
|
-
} from "../commands/GetHostedConfigurationVersionCommand";
|
|
65
|
-
import { ListApplicationsCommandInput, ListApplicationsCommandOutput } from "../commands/ListApplicationsCommand";
|
|
66
|
-
import {
|
|
67
|
-
ListConfigurationProfilesCommandInput,
|
|
68
|
-
ListConfigurationProfilesCommandOutput,
|
|
69
|
-
} from "../commands/ListConfigurationProfilesCommand";
|
|
70
|
-
import { ListDeploymentsCommandInput, ListDeploymentsCommandOutput } from "../commands/ListDeploymentsCommand";
|
|
71
|
-
import {
|
|
72
|
-
ListDeploymentStrategiesCommandInput,
|
|
73
|
-
ListDeploymentStrategiesCommandOutput,
|
|
74
|
-
} from "../commands/ListDeploymentStrategiesCommand";
|
|
75
|
-
import { ListEnvironmentsCommandInput, ListEnvironmentsCommandOutput } from "../commands/ListEnvironmentsCommand";
|
|
76
|
-
import {
|
|
77
|
-
ListHostedConfigurationVersionsCommandInput,
|
|
78
|
-
ListHostedConfigurationVersionsCommandOutput,
|
|
79
|
-
} from "../commands/ListHostedConfigurationVersionsCommand";
|
|
80
|
-
import {
|
|
81
|
-
ListTagsForResourceCommandInput,
|
|
82
|
-
ListTagsForResourceCommandOutput,
|
|
83
|
-
} from "../commands/ListTagsForResourceCommand";
|
|
84
|
-
import { StartDeploymentCommandInput, StartDeploymentCommandOutput } from "../commands/StartDeploymentCommand";
|
|
85
|
-
import { StopDeploymentCommandInput, StopDeploymentCommandOutput } from "../commands/StopDeploymentCommand";
|
|
86
|
-
import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand";
|
|
87
|
-
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand";
|
|
88
|
-
import { UpdateApplicationCommandInput, UpdateApplicationCommandOutput } from "../commands/UpdateApplicationCommand";
|
|
89
|
-
import {
|
|
90
|
-
UpdateConfigurationProfileCommandInput,
|
|
91
|
-
UpdateConfigurationProfileCommandOutput,
|
|
92
|
-
} from "../commands/UpdateConfigurationProfileCommand";
|
|
93
|
-
import {
|
|
94
|
-
UpdateDeploymentStrategyCommandInput,
|
|
95
|
-
UpdateDeploymentStrategyCommandOutput,
|
|
96
|
-
} from "../commands/UpdateDeploymentStrategyCommand";
|
|
97
|
-
import { UpdateEnvironmentCommandInput, UpdateEnvironmentCommandOutput } from "../commands/UpdateEnvironmentCommand";
|
|
98
|
-
import {
|
|
99
|
-
ValidateConfigurationCommandInput,
|
|
100
|
-
ValidateConfigurationCommandOutput,
|
|
101
|
-
} from "../commands/ValidateConfigurationCommand";
|
|
102
|
-
import {
|
|
103
|
-
Application,
|
|
104
|
-
BadRequestException,
|
|
105
|
-
ConfigurationProfileSummary,
|
|
106
|
-
ConflictException,
|
|
107
|
-
DeploymentEvent,
|
|
108
|
-
DeploymentStrategy,
|
|
109
|
-
DeploymentSummary,
|
|
110
|
-
Environment,
|
|
111
|
-
HostedConfigurationVersionSummary,
|
|
112
|
-
InternalServerException,
|
|
113
|
-
Monitor,
|
|
114
|
-
PayloadTooLargeException,
|
|
115
|
-
ResourceNotFoundException,
|
|
116
|
-
ServiceQuotaExceededException,
|
|
117
|
-
Validator,
|
|
118
|
-
ValidatorType,
|
|
119
|
-
} from "../models/models_0";
|
|
120
|
-
|
|
121
|
-
export const serializeAws_restJson1CreateApplicationCommand = async (
|
|
122
|
-
input: CreateApplicationCommandInput,
|
|
123
|
-
context: __SerdeContext
|
|
124
|
-
): Promise<__HttpRequest> => {
|
|
125
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
126
|
-
const headers: any = {
|
|
127
|
-
"content-type": "application/json",
|
|
128
|
-
};
|
|
129
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications";
|
|
130
|
-
let body: any;
|
|
131
|
-
body = JSON.stringify({
|
|
132
|
-
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
|
|
133
|
-
...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
|
|
134
|
-
...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
|
|
135
|
-
});
|
|
136
|
-
return new __HttpRequest({
|
|
137
|
-
protocol,
|
|
138
|
-
hostname,
|
|
139
|
-
port,
|
|
140
|
-
method: "POST",
|
|
141
|
-
headers,
|
|
142
|
-
path: resolvedPath,
|
|
143
|
-
body,
|
|
144
|
-
});
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
export const serializeAws_restJson1CreateConfigurationProfileCommand = async (
|
|
148
|
-
input: CreateConfigurationProfileCommandInput,
|
|
149
|
-
context: __SerdeContext
|
|
150
|
-
): Promise<__HttpRequest> => {
|
|
151
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
152
|
-
const headers: any = {
|
|
153
|
-
"content-type": "application/json",
|
|
154
|
-
};
|
|
155
|
-
let resolvedPath =
|
|
156
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
157
|
-
"/applications/{ApplicationId}/configurationprofiles";
|
|
158
|
-
if (input.ApplicationId !== undefined) {
|
|
159
|
-
const labelValue: string = input.ApplicationId;
|
|
160
|
-
if (labelValue.length <= 0) {
|
|
161
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
162
|
-
}
|
|
163
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
164
|
-
} else {
|
|
165
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
166
|
-
}
|
|
167
|
-
let body: any;
|
|
168
|
-
body = JSON.stringify({
|
|
169
|
-
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
|
|
170
|
-
...(input.LocationUri !== undefined && input.LocationUri !== null && { LocationUri: input.LocationUri }),
|
|
171
|
-
...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
|
|
172
|
-
...(input.RetrievalRoleArn !== undefined &&
|
|
173
|
-
input.RetrievalRoleArn !== null && { RetrievalRoleArn: input.RetrievalRoleArn }),
|
|
174
|
-
...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
|
|
175
|
-
...(input.Validators !== undefined &&
|
|
176
|
-
input.Validators !== null && { Validators: serializeAws_restJson1ValidatorList(input.Validators, context) }),
|
|
177
|
-
});
|
|
178
|
-
return new __HttpRequest({
|
|
179
|
-
protocol,
|
|
180
|
-
hostname,
|
|
181
|
-
port,
|
|
182
|
-
method: "POST",
|
|
183
|
-
headers,
|
|
184
|
-
path: resolvedPath,
|
|
185
|
-
body,
|
|
186
|
-
});
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
export const serializeAws_restJson1CreateDeploymentStrategyCommand = async (
|
|
190
|
-
input: CreateDeploymentStrategyCommandInput,
|
|
191
|
-
context: __SerdeContext
|
|
192
|
-
): Promise<__HttpRequest> => {
|
|
193
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
194
|
-
const headers: any = {
|
|
195
|
-
"content-type": "application/json",
|
|
196
|
-
};
|
|
197
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deploymentstrategies";
|
|
198
|
-
let body: any;
|
|
199
|
-
body = JSON.stringify({
|
|
200
|
-
...(input.DeploymentDurationInMinutes !== undefined &&
|
|
201
|
-
input.DeploymentDurationInMinutes !== null && { DeploymentDurationInMinutes: input.DeploymentDurationInMinutes }),
|
|
202
|
-
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
|
|
203
|
-
...(input.FinalBakeTimeInMinutes !== undefined &&
|
|
204
|
-
input.FinalBakeTimeInMinutes !== null && { FinalBakeTimeInMinutes: input.FinalBakeTimeInMinutes }),
|
|
205
|
-
...(input.GrowthFactor !== undefined &&
|
|
206
|
-
input.GrowthFactor !== null && { GrowthFactor: __serializeFloat(input.GrowthFactor) }),
|
|
207
|
-
...(input.GrowthType !== undefined && input.GrowthType !== null && { GrowthType: input.GrowthType }),
|
|
208
|
-
...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
|
|
209
|
-
...(input.ReplicateTo !== undefined && input.ReplicateTo !== null && { ReplicateTo: input.ReplicateTo }),
|
|
210
|
-
...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
|
|
211
|
-
});
|
|
212
|
-
return new __HttpRequest({
|
|
213
|
-
protocol,
|
|
214
|
-
hostname,
|
|
215
|
-
port,
|
|
216
|
-
method: "POST",
|
|
217
|
-
headers,
|
|
218
|
-
path: resolvedPath,
|
|
219
|
-
body,
|
|
220
|
-
});
|
|
221
|
-
};
|
|
222
|
-
|
|
223
|
-
export const serializeAws_restJson1CreateEnvironmentCommand = async (
|
|
224
|
-
input: CreateEnvironmentCommandInput,
|
|
225
|
-
context: __SerdeContext
|
|
226
|
-
): Promise<__HttpRequest> => {
|
|
227
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
228
|
-
const headers: any = {
|
|
229
|
-
"content-type": "application/json",
|
|
230
|
-
};
|
|
231
|
-
let resolvedPath =
|
|
232
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
233
|
-
"/applications/{ApplicationId}/environments";
|
|
234
|
-
if (input.ApplicationId !== undefined) {
|
|
235
|
-
const labelValue: string = input.ApplicationId;
|
|
236
|
-
if (labelValue.length <= 0) {
|
|
237
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
238
|
-
}
|
|
239
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
240
|
-
} else {
|
|
241
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
242
|
-
}
|
|
243
|
-
let body: any;
|
|
244
|
-
body = JSON.stringify({
|
|
245
|
-
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
|
|
246
|
-
...(input.Monitors !== undefined &&
|
|
247
|
-
input.Monitors !== null && { Monitors: serializeAws_restJson1MonitorList(input.Monitors, context) }),
|
|
248
|
-
...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
|
|
249
|
-
...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
|
|
250
|
-
});
|
|
251
|
-
return new __HttpRequest({
|
|
252
|
-
protocol,
|
|
253
|
-
hostname,
|
|
254
|
-
port,
|
|
255
|
-
method: "POST",
|
|
256
|
-
headers,
|
|
257
|
-
path: resolvedPath,
|
|
258
|
-
body,
|
|
259
|
-
});
|
|
260
|
-
};
|
|
261
|
-
|
|
262
|
-
export const serializeAws_restJson1CreateHostedConfigurationVersionCommand = async (
|
|
263
|
-
input: CreateHostedConfigurationVersionCommandInput,
|
|
264
|
-
context: __SerdeContext
|
|
265
|
-
): Promise<__HttpRequest> => {
|
|
266
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
267
|
-
const headers: any = {
|
|
268
|
-
"content-type": "application/octet-stream",
|
|
269
|
-
...(isSerializableHeaderValue(input.Description) && { description: input.Description! }),
|
|
270
|
-
...(isSerializableHeaderValue(input.ContentType) && { "content-type": input.ContentType! }),
|
|
271
|
-
...(isSerializableHeaderValue(input.LatestVersionNumber) && {
|
|
272
|
-
"latest-version-number": input.LatestVersionNumber!.toString(),
|
|
273
|
-
}),
|
|
274
|
-
};
|
|
275
|
-
let resolvedPath =
|
|
276
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
277
|
-
"/applications/{ApplicationId}/configurationprofiles/{ConfigurationProfileId}/hostedconfigurationversions";
|
|
278
|
-
if (input.ApplicationId !== undefined) {
|
|
279
|
-
const labelValue: string = input.ApplicationId;
|
|
280
|
-
if (labelValue.length <= 0) {
|
|
281
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
282
|
-
}
|
|
283
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
284
|
-
} else {
|
|
285
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
286
|
-
}
|
|
287
|
-
if (input.ConfigurationProfileId !== undefined) {
|
|
288
|
-
const labelValue: string = input.ConfigurationProfileId;
|
|
289
|
-
if (labelValue.length <= 0) {
|
|
290
|
-
throw new Error("Empty value provided for input HTTP label: ConfigurationProfileId.");
|
|
291
|
-
}
|
|
292
|
-
resolvedPath = resolvedPath.replace("{ConfigurationProfileId}", __extendedEncodeURIComponent(labelValue));
|
|
293
|
-
} else {
|
|
294
|
-
throw new Error("No value provided for input HTTP label: ConfigurationProfileId.");
|
|
295
|
-
}
|
|
296
|
-
let body: any;
|
|
297
|
-
if (input.Content !== undefined) {
|
|
298
|
-
body = input.Content;
|
|
299
|
-
}
|
|
300
|
-
return new __HttpRequest({
|
|
301
|
-
protocol,
|
|
302
|
-
hostname,
|
|
303
|
-
port,
|
|
304
|
-
method: "POST",
|
|
305
|
-
headers,
|
|
306
|
-
path: resolvedPath,
|
|
307
|
-
body,
|
|
308
|
-
});
|
|
309
|
-
};
|
|
310
|
-
|
|
311
|
-
export const serializeAws_restJson1DeleteApplicationCommand = async (
|
|
312
|
-
input: DeleteApplicationCommandInput,
|
|
313
|
-
context: __SerdeContext
|
|
314
|
-
): Promise<__HttpRequest> => {
|
|
315
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
316
|
-
const headers: any = {};
|
|
317
|
-
let resolvedPath =
|
|
318
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}";
|
|
319
|
-
if (input.ApplicationId !== undefined) {
|
|
320
|
-
const labelValue: string = input.ApplicationId;
|
|
321
|
-
if (labelValue.length <= 0) {
|
|
322
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
323
|
-
}
|
|
324
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
325
|
-
} else {
|
|
326
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
327
|
-
}
|
|
328
|
-
let body: any;
|
|
329
|
-
return new __HttpRequest({
|
|
330
|
-
protocol,
|
|
331
|
-
hostname,
|
|
332
|
-
port,
|
|
333
|
-
method: "DELETE",
|
|
334
|
-
headers,
|
|
335
|
-
path: resolvedPath,
|
|
336
|
-
body,
|
|
337
|
-
});
|
|
338
|
-
};
|
|
339
|
-
|
|
340
|
-
export const serializeAws_restJson1DeleteConfigurationProfileCommand = async (
|
|
341
|
-
input: DeleteConfigurationProfileCommandInput,
|
|
342
|
-
context: __SerdeContext
|
|
343
|
-
): Promise<__HttpRequest> => {
|
|
344
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
345
|
-
const headers: any = {};
|
|
346
|
-
let resolvedPath =
|
|
347
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
348
|
-
"/applications/{ApplicationId}/configurationprofiles/{ConfigurationProfileId}";
|
|
349
|
-
if (input.ApplicationId !== undefined) {
|
|
350
|
-
const labelValue: string = input.ApplicationId;
|
|
351
|
-
if (labelValue.length <= 0) {
|
|
352
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
353
|
-
}
|
|
354
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
355
|
-
} else {
|
|
356
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
357
|
-
}
|
|
358
|
-
if (input.ConfigurationProfileId !== undefined) {
|
|
359
|
-
const labelValue: string = input.ConfigurationProfileId;
|
|
360
|
-
if (labelValue.length <= 0) {
|
|
361
|
-
throw new Error("Empty value provided for input HTTP label: ConfigurationProfileId.");
|
|
362
|
-
}
|
|
363
|
-
resolvedPath = resolvedPath.replace("{ConfigurationProfileId}", __extendedEncodeURIComponent(labelValue));
|
|
364
|
-
} else {
|
|
365
|
-
throw new Error("No value provided for input HTTP label: ConfigurationProfileId.");
|
|
366
|
-
}
|
|
367
|
-
let body: any;
|
|
368
|
-
return new __HttpRequest({
|
|
369
|
-
protocol,
|
|
370
|
-
hostname,
|
|
371
|
-
port,
|
|
372
|
-
method: "DELETE",
|
|
373
|
-
headers,
|
|
374
|
-
path: resolvedPath,
|
|
375
|
-
body,
|
|
376
|
-
});
|
|
377
|
-
};
|
|
378
|
-
|
|
379
|
-
export const serializeAws_restJson1DeleteDeploymentStrategyCommand = async (
|
|
380
|
-
input: DeleteDeploymentStrategyCommandInput,
|
|
381
|
-
context: __SerdeContext
|
|
382
|
-
): Promise<__HttpRequest> => {
|
|
383
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
384
|
-
const headers: any = {};
|
|
385
|
-
let resolvedPath =
|
|
386
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
387
|
-
"/deployementstrategies/{DeploymentStrategyId}";
|
|
388
|
-
if (input.DeploymentStrategyId !== undefined) {
|
|
389
|
-
const labelValue: string = input.DeploymentStrategyId;
|
|
390
|
-
if (labelValue.length <= 0) {
|
|
391
|
-
throw new Error("Empty value provided for input HTTP label: DeploymentStrategyId.");
|
|
392
|
-
}
|
|
393
|
-
resolvedPath = resolvedPath.replace("{DeploymentStrategyId}", __extendedEncodeURIComponent(labelValue));
|
|
394
|
-
} else {
|
|
395
|
-
throw new Error("No value provided for input HTTP label: DeploymentStrategyId.");
|
|
396
|
-
}
|
|
397
|
-
let body: any;
|
|
398
|
-
return new __HttpRequest({
|
|
399
|
-
protocol,
|
|
400
|
-
hostname,
|
|
401
|
-
port,
|
|
402
|
-
method: "DELETE",
|
|
403
|
-
headers,
|
|
404
|
-
path: resolvedPath,
|
|
405
|
-
body,
|
|
406
|
-
});
|
|
407
|
-
};
|
|
408
|
-
|
|
409
|
-
export const serializeAws_restJson1DeleteEnvironmentCommand = async (
|
|
410
|
-
input: DeleteEnvironmentCommandInput,
|
|
411
|
-
context: __SerdeContext
|
|
412
|
-
): Promise<__HttpRequest> => {
|
|
413
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
414
|
-
const headers: any = {};
|
|
415
|
-
let resolvedPath =
|
|
416
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
417
|
-
"/applications/{ApplicationId}/environments/{EnvironmentId}";
|
|
418
|
-
if (input.ApplicationId !== undefined) {
|
|
419
|
-
const labelValue: string = input.ApplicationId;
|
|
420
|
-
if (labelValue.length <= 0) {
|
|
421
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
422
|
-
}
|
|
423
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
424
|
-
} else {
|
|
425
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
426
|
-
}
|
|
427
|
-
if (input.EnvironmentId !== undefined) {
|
|
428
|
-
const labelValue: string = input.EnvironmentId;
|
|
429
|
-
if (labelValue.length <= 0) {
|
|
430
|
-
throw new Error("Empty value provided for input HTTP label: EnvironmentId.");
|
|
431
|
-
}
|
|
432
|
-
resolvedPath = resolvedPath.replace("{EnvironmentId}", __extendedEncodeURIComponent(labelValue));
|
|
433
|
-
} else {
|
|
434
|
-
throw new Error("No value provided for input HTTP label: EnvironmentId.");
|
|
435
|
-
}
|
|
436
|
-
let body: any;
|
|
437
|
-
return new __HttpRequest({
|
|
438
|
-
protocol,
|
|
439
|
-
hostname,
|
|
440
|
-
port,
|
|
441
|
-
method: "DELETE",
|
|
442
|
-
headers,
|
|
443
|
-
path: resolvedPath,
|
|
444
|
-
body,
|
|
445
|
-
});
|
|
446
|
-
};
|
|
447
|
-
|
|
448
|
-
export const serializeAws_restJson1DeleteHostedConfigurationVersionCommand = async (
|
|
449
|
-
input: DeleteHostedConfigurationVersionCommandInput,
|
|
450
|
-
context: __SerdeContext
|
|
451
|
-
): Promise<__HttpRequest> => {
|
|
452
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
453
|
-
const headers: any = {};
|
|
454
|
-
let resolvedPath =
|
|
455
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
456
|
-
"/applications/{ApplicationId}/configurationprofiles/{ConfigurationProfileId}/hostedconfigurationversions/{VersionNumber}";
|
|
457
|
-
if (input.ApplicationId !== undefined) {
|
|
458
|
-
const labelValue: string = input.ApplicationId;
|
|
459
|
-
if (labelValue.length <= 0) {
|
|
460
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
461
|
-
}
|
|
462
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
463
|
-
} else {
|
|
464
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
465
|
-
}
|
|
466
|
-
if (input.ConfigurationProfileId !== undefined) {
|
|
467
|
-
const labelValue: string = input.ConfigurationProfileId;
|
|
468
|
-
if (labelValue.length <= 0) {
|
|
469
|
-
throw new Error("Empty value provided for input HTTP label: ConfigurationProfileId.");
|
|
470
|
-
}
|
|
471
|
-
resolvedPath = resolvedPath.replace("{ConfigurationProfileId}", __extendedEncodeURIComponent(labelValue));
|
|
472
|
-
} else {
|
|
473
|
-
throw new Error("No value provided for input HTTP label: ConfigurationProfileId.");
|
|
474
|
-
}
|
|
475
|
-
if (input.VersionNumber !== undefined) {
|
|
476
|
-
const labelValue: string = input.VersionNumber.toString();
|
|
477
|
-
if (labelValue.length <= 0) {
|
|
478
|
-
throw new Error("Empty value provided for input HTTP label: VersionNumber.");
|
|
479
|
-
}
|
|
480
|
-
resolvedPath = resolvedPath.replace("{VersionNumber}", __extendedEncodeURIComponent(labelValue));
|
|
481
|
-
} else {
|
|
482
|
-
throw new Error("No value provided for input HTTP label: VersionNumber.");
|
|
483
|
-
}
|
|
484
|
-
let body: any;
|
|
485
|
-
return new __HttpRequest({
|
|
486
|
-
protocol,
|
|
487
|
-
hostname,
|
|
488
|
-
port,
|
|
489
|
-
method: "DELETE",
|
|
490
|
-
headers,
|
|
491
|
-
path: resolvedPath,
|
|
492
|
-
body,
|
|
493
|
-
});
|
|
494
|
-
};
|
|
495
|
-
|
|
496
|
-
export const serializeAws_restJson1GetApplicationCommand = async (
|
|
497
|
-
input: GetApplicationCommandInput,
|
|
498
|
-
context: __SerdeContext
|
|
499
|
-
): Promise<__HttpRequest> => {
|
|
500
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
501
|
-
const headers: any = {};
|
|
502
|
-
let resolvedPath =
|
|
503
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}";
|
|
504
|
-
if (input.ApplicationId !== undefined) {
|
|
505
|
-
const labelValue: string = input.ApplicationId;
|
|
506
|
-
if (labelValue.length <= 0) {
|
|
507
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
508
|
-
}
|
|
509
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
510
|
-
} else {
|
|
511
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
512
|
-
}
|
|
513
|
-
let body: any;
|
|
514
|
-
return new __HttpRequest({
|
|
515
|
-
protocol,
|
|
516
|
-
hostname,
|
|
517
|
-
port,
|
|
518
|
-
method: "GET",
|
|
519
|
-
headers,
|
|
520
|
-
path: resolvedPath,
|
|
521
|
-
body,
|
|
522
|
-
});
|
|
523
|
-
};
|
|
524
|
-
|
|
525
|
-
export const serializeAws_restJson1GetConfigurationCommand = async (
|
|
526
|
-
input: GetConfigurationCommandInput,
|
|
527
|
-
context: __SerdeContext
|
|
528
|
-
): Promise<__HttpRequest> => {
|
|
529
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
530
|
-
const headers: any = {};
|
|
531
|
-
let resolvedPath =
|
|
532
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
533
|
-
"/applications/{Application}/environments/{Environment}/configurations/{Configuration}";
|
|
534
|
-
if (input.Application !== undefined) {
|
|
535
|
-
const labelValue: string = input.Application;
|
|
536
|
-
if (labelValue.length <= 0) {
|
|
537
|
-
throw new Error("Empty value provided for input HTTP label: Application.");
|
|
538
|
-
}
|
|
539
|
-
resolvedPath = resolvedPath.replace("{Application}", __extendedEncodeURIComponent(labelValue));
|
|
540
|
-
} else {
|
|
541
|
-
throw new Error("No value provided for input HTTP label: Application.");
|
|
542
|
-
}
|
|
543
|
-
if (input.Environment !== undefined) {
|
|
544
|
-
const labelValue: string = input.Environment;
|
|
545
|
-
if (labelValue.length <= 0) {
|
|
546
|
-
throw new Error("Empty value provided for input HTTP label: Environment.");
|
|
547
|
-
}
|
|
548
|
-
resolvedPath = resolvedPath.replace("{Environment}", __extendedEncodeURIComponent(labelValue));
|
|
549
|
-
} else {
|
|
550
|
-
throw new Error("No value provided for input HTTP label: Environment.");
|
|
551
|
-
}
|
|
552
|
-
if (input.Configuration !== undefined) {
|
|
553
|
-
const labelValue: string = input.Configuration;
|
|
554
|
-
if (labelValue.length <= 0) {
|
|
555
|
-
throw new Error("Empty value provided for input HTTP label: Configuration.");
|
|
556
|
-
}
|
|
557
|
-
resolvedPath = resolvedPath.replace("{Configuration}", __extendedEncodeURIComponent(labelValue));
|
|
558
|
-
} else {
|
|
559
|
-
throw new Error("No value provided for input HTTP label: Configuration.");
|
|
560
|
-
}
|
|
561
|
-
const query: any = {
|
|
562
|
-
...(input.ClientId !== undefined && { client_id: input.ClientId }),
|
|
563
|
-
...(input.ClientConfigurationVersion !== undefined && {
|
|
564
|
-
client_configuration_version: input.ClientConfigurationVersion,
|
|
565
|
-
}),
|
|
566
|
-
};
|
|
567
|
-
let body: any;
|
|
568
|
-
return new __HttpRequest({
|
|
569
|
-
protocol,
|
|
570
|
-
hostname,
|
|
571
|
-
port,
|
|
572
|
-
method: "GET",
|
|
573
|
-
headers,
|
|
574
|
-
path: resolvedPath,
|
|
575
|
-
query,
|
|
576
|
-
body,
|
|
577
|
-
});
|
|
578
|
-
};
|
|
579
|
-
|
|
580
|
-
export const serializeAws_restJson1GetConfigurationProfileCommand = async (
|
|
581
|
-
input: GetConfigurationProfileCommandInput,
|
|
582
|
-
context: __SerdeContext
|
|
583
|
-
): Promise<__HttpRequest> => {
|
|
584
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
585
|
-
const headers: any = {};
|
|
586
|
-
let resolvedPath =
|
|
587
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
588
|
-
"/applications/{ApplicationId}/configurationprofiles/{ConfigurationProfileId}";
|
|
589
|
-
if (input.ApplicationId !== undefined) {
|
|
590
|
-
const labelValue: string = input.ApplicationId;
|
|
591
|
-
if (labelValue.length <= 0) {
|
|
592
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
593
|
-
}
|
|
594
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
595
|
-
} else {
|
|
596
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
597
|
-
}
|
|
598
|
-
if (input.ConfigurationProfileId !== undefined) {
|
|
599
|
-
const labelValue: string = input.ConfigurationProfileId;
|
|
600
|
-
if (labelValue.length <= 0) {
|
|
601
|
-
throw new Error("Empty value provided for input HTTP label: ConfigurationProfileId.");
|
|
602
|
-
}
|
|
603
|
-
resolvedPath = resolvedPath.replace("{ConfigurationProfileId}", __extendedEncodeURIComponent(labelValue));
|
|
604
|
-
} else {
|
|
605
|
-
throw new Error("No value provided for input HTTP label: ConfigurationProfileId.");
|
|
606
|
-
}
|
|
607
|
-
let body: any;
|
|
608
|
-
return new __HttpRequest({
|
|
609
|
-
protocol,
|
|
610
|
-
hostname,
|
|
611
|
-
port,
|
|
612
|
-
method: "GET",
|
|
613
|
-
headers,
|
|
614
|
-
path: resolvedPath,
|
|
615
|
-
body,
|
|
616
|
-
});
|
|
617
|
-
};
|
|
618
|
-
|
|
619
|
-
export const serializeAws_restJson1GetDeploymentCommand = async (
|
|
620
|
-
input: GetDeploymentCommandInput,
|
|
621
|
-
context: __SerdeContext
|
|
622
|
-
): Promise<__HttpRequest> => {
|
|
623
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
624
|
-
const headers: any = {};
|
|
625
|
-
let resolvedPath =
|
|
626
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
627
|
-
"/applications/{ApplicationId}/environments/{EnvironmentId}/deployments/{DeploymentNumber}";
|
|
628
|
-
if (input.ApplicationId !== undefined) {
|
|
629
|
-
const labelValue: string = input.ApplicationId;
|
|
630
|
-
if (labelValue.length <= 0) {
|
|
631
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
632
|
-
}
|
|
633
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
634
|
-
} else {
|
|
635
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
636
|
-
}
|
|
637
|
-
if (input.EnvironmentId !== undefined) {
|
|
638
|
-
const labelValue: string = input.EnvironmentId;
|
|
639
|
-
if (labelValue.length <= 0) {
|
|
640
|
-
throw new Error("Empty value provided for input HTTP label: EnvironmentId.");
|
|
641
|
-
}
|
|
642
|
-
resolvedPath = resolvedPath.replace("{EnvironmentId}", __extendedEncodeURIComponent(labelValue));
|
|
643
|
-
} else {
|
|
644
|
-
throw new Error("No value provided for input HTTP label: EnvironmentId.");
|
|
645
|
-
}
|
|
646
|
-
if (input.DeploymentNumber !== undefined) {
|
|
647
|
-
const labelValue: string = input.DeploymentNumber.toString();
|
|
648
|
-
if (labelValue.length <= 0) {
|
|
649
|
-
throw new Error("Empty value provided for input HTTP label: DeploymentNumber.");
|
|
650
|
-
}
|
|
651
|
-
resolvedPath = resolvedPath.replace("{DeploymentNumber}", __extendedEncodeURIComponent(labelValue));
|
|
652
|
-
} else {
|
|
653
|
-
throw new Error("No value provided for input HTTP label: DeploymentNumber.");
|
|
654
|
-
}
|
|
655
|
-
let body: any;
|
|
656
|
-
return new __HttpRequest({
|
|
657
|
-
protocol,
|
|
658
|
-
hostname,
|
|
659
|
-
port,
|
|
660
|
-
method: "GET",
|
|
661
|
-
headers,
|
|
662
|
-
path: resolvedPath,
|
|
663
|
-
body,
|
|
664
|
-
});
|
|
665
|
-
};
|
|
666
|
-
|
|
667
|
-
export const serializeAws_restJson1GetDeploymentStrategyCommand = async (
|
|
668
|
-
input: GetDeploymentStrategyCommandInput,
|
|
669
|
-
context: __SerdeContext
|
|
670
|
-
): Promise<__HttpRequest> => {
|
|
671
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
672
|
-
const headers: any = {};
|
|
673
|
-
let resolvedPath =
|
|
674
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
675
|
-
"/deploymentstrategies/{DeploymentStrategyId}";
|
|
676
|
-
if (input.DeploymentStrategyId !== undefined) {
|
|
677
|
-
const labelValue: string = input.DeploymentStrategyId;
|
|
678
|
-
if (labelValue.length <= 0) {
|
|
679
|
-
throw new Error("Empty value provided for input HTTP label: DeploymentStrategyId.");
|
|
680
|
-
}
|
|
681
|
-
resolvedPath = resolvedPath.replace("{DeploymentStrategyId}", __extendedEncodeURIComponent(labelValue));
|
|
682
|
-
} else {
|
|
683
|
-
throw new Error("No value provided for input HTTP label: DeploymentStrategyId.");
|
|
684
|
-
}
|
|
685
|
-
let body: any;
|
|
686
|
-
return new __HttpRequest({
|
|
687
|
-
protocol,
|
|
688
|
-
hostname,
|
|
689
|
-
port,
|
|
690
|
-
method: "GET",
|
|
691
|
-
headers,
|
|
692
|
-
path: resolvedPath,
|
|
693
|
-
body,
|
|
694
|
-
});
|
|
695
|
-
};
|
|
696
|
-
|
|
697
|
-
export const serializeAws_restJson1GetEnvironmentCommand = async (
|
|
698
|
-
input: GetEnvironmentCommandInput,
|
|
699
|
-
context: __SerdeContext
|
|
700
|
-
): Promise<__HttpRequest> => {
|
|
701
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
702
|
-
const headers: any = {};
|
|
703
|
-
let resolvedPath =
|
|
704
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
705
|
-
"/applications/{ApplicationId}/environments/{EnvironmentId}";
|
|
706
|
-
if (input.ApplicationId !== undefined) {
|
|
707
|
-
const labelValue: string = input.ApplicationId;
|
|
708
|
-
if (labelValue.length <= 0) {
|
|
709
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
710
|
-
}
|
|
711
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
712
|
-
} else {
|
|
713
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
714
|
-
}
|
|
715
|
-
if (input.EnvironmentId !== undefined) {
|
|
716
|
-
const labelValue: string = input.EnvironmentId;
|
|
717
|
-
if (labelValue.length <= 0) {
|
|
718
|
-
throw new Error("Empty value provided for input HTTP label: EnvironmentId.");
|
|
719
|
-
}
|
|
720
|
-
resolvedPath = resolvedPath.replace("{EnvironmentId}", __extendedEncodeURIComponent(labelValue));
|
|
721
|
-
} else {
|
|
722
|
-
throw new Error("No value provided for input HTTP label: EnvironmentId.");
|
|
723
|
-
}
|
|
724
|
-
let body: any;
|
|
725
|
-
return new __HttpRequest({
|
|
726
|
-
protocol,
|
|
727
|
-
hostname,
|
|
728
|
-
port,
|
|
729
|
-
method: "GET",
|
|
730
|
-
headers,
|
|
731
|
-
path: resolvedPath,
|
|
732
|
-
body,
|
|
733
|
-
});
|
|
734
|
-
};
|
|
735
|
-
|
|
736
|
-
export const serializeAws_restJson1GetHostedConfigurationVersionCommand = async (
|
|
737
|
-
input: GetHostedConfigurationVersionCommandInput,
|
|
738
|
-
context: __SerdeContext
|
|
739
|
-
): Promise<__HttpRequest> => {
|
|
740
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
741
|
-
const headers: any = {};
|
|
742
|
-
let resolvedPath =
|
|
743
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
744
|
-
"/applications/{ApplicationId}/configurationprofiles/{ConfigurationProfileId}/hostedconfigurationversions/{VersionNumber}";
|
|
745
|
-
if (input.ApplicationId !== undefined) {
|
|
746
|
-
const labelValue: string = input.ApplicationId;
|
|
747
|
-
if (labelValue.length <= 0) {
|
|
748
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
749
|
-
}
|
|
750
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
751
|
-
} else {
|
|
752
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
753
|
-
}
|
|
754
|
-
if (input.ConfigurationProfileId !== undefined) {
|
|
755
|
-
const labelValue: string = input.ConfigurationProfileId;
|
|
756
|
-
if (labelValue.length <= 0) {
|
|
757
|
-
throw new Error("Empty value provided for input HTTP label: ConfigurationProfileId.");
|
|
758
|
-
}
|
|
759
|
-
resolvedPath = resolvedPath.replace("{ConfigurationProfileId}", __extendedEncodeURIComponent(labelValue));
|
|
760
|
-
} else {
|
|
761
|
-
throw new Error("No value provided for input HTTP label: ConfigurationProfileId.");
|
|
762
|
-
}
|
|
763
|
-
if (input.VersionNumber !== undefined) {
|
|
764
|
-
const labelValue: string = input.VersionNumber.toString();
|
|
765
|
-
if (labelValue.length <= 0) {
|
|
766
|
-
throw new Error("Empty value provided for input HTTP label: VersionNumber.");
|
|
767
|
-
}
|
|
768
|
-
resolvedPath = resolvedPath.replace("{VersionNumber}", __extendedEncodeURIComponent(labelValue));
|
|
769
|
-
} else {
|
|
770
|
-
throw new Error("No value provided for input HTTP label: VersionNumber.");
|
|
771
|
-
}
|
|
772
|
-
let body: any;
|
|
773
|
-
return new __HttpRequest({
|
|
774
|
-
protocol,
|
|
775
|
-
hostname,
|
|
776
|
-
port,
|
|
777
|
-
method: "GET",
|
|
778
|
-
headers,
|
|
779
|
-
path: resolvedPath,
|
|
780
|
-
body,
|
|
781
|
-
});
|
|
782
|
-
};
|
|
783
|
-
|
|
784
|
-
export const serializeAws_restJson1ListApplicationsCommand = async (
|
|
785
|
-
input: ListApplicationsCommandInput,
|
|
786
|
-
context: __SerdeContext
|
|
787
|
-
): Promise<__HttpRequest> => {
|
|
788
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
789
|
-
const headers: any = {};
|
|
790
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications";
|
|
791
|
-
const query: any = {
|
|
792
|
-
...(input.MaxResults !== undefined && { max_results: input.MaxResults.toString() }),
|
|
793
|
-
...(input.NextToken !== undefined && { next_token: input.NextToken }),
|
|
794
|
-
};
|
|
795
|
-
let body: any;
|
|
796
|
-
return new __HttpRequest({
|
|
797
|
-
protocol,
|
|
798
|
-
hostname,
|
|
799
|
-
port,
|
|
800
|
-
method: "GET",
|
|
801
|
-
headers,
|
|
802
|
-
path: resolvedPath,
|
|
803
|
-
query,
|
|
804
|
-
body,
|
|
805
|
-
});
|
|
806
|
-
};
|
|
807
|
-
|
|
808
|
-
export const serializeAws_restJson1ListConfigurationProfilesCommand = async (
|
|
809
|
-
input: ListConfigurationProfilesCommandInput,
|
|
810
|
-
context: __SerdeContext
|
|
811
|
-
): Promise<__HttpRequest> => {
|
|
812
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
813
|
-
const headers: any = {};
|
|
814
|
-
let resolvedPath =
|
|
815
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
816
|
-
"/applications/{ApplicationId}/configurationprofiles";
|
|
817
|
-
if (input.ApplicationId !== undefined) {
|
|
818
|
-
const labelValue: string = input.ApplicationId;
|
|
819
|
-
if (labelValue.length <= 0) {
|
|
820
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
821
|
-
}
|
|
822
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
823
|
-
} else {
|
|
824
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
825
|
-
}
|
|
826
|
-
const query: any = {
|
|
827
|
-
...(input.MaxResults !== undefined && { max_results: input.MaxResults.toString() }),
|
|
828
|
-
...(input.NextToken !== undefined && { next_token: input.NextToken }),
|
|
829
|
-
};
|
|
830
|
-
let body: any;
|
|
831
|
-
return new __HttpRequest({
|
|
832
|
-
protocol,
|
|
833
|
-
hostname,
|
|
834
|
-
port,
|
|
835
|
-
method: "GET",
|
|
836
|
-
headers,
|
|
837
|
-
path: resolvedPath,
|
|
838
|
-
query,
|
|
839
|
-
body,
|
|
840
|
-
});
|
|
841
|
-
};
|
|
842
|
-
|
|
843
|
-
export const serializeAws_restJson1ListDeploymentsCommand = async (
|
|
844
|
-
input: ListDeploymentsCommandInput,
|
|
845
|
-
context: __SerdeContext
|
|
846
|
-
): Promise<__HttpRequest> => {
|
|
847
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
848
|
-
const headers: any = {};
|
|
849
|
-
let resolvedPath =
|
|
850
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
851
|
-
"/applications/{ApplicationId}/environments/{EnvironmentId}/deployments";
|
|
852
|
-
if (input.ApplicationId !== undefined) {
|
|
853
|
-
const labelValue: string = input.ApplicationId;
|
|
854
|
-
if (labelValue.length <= 0) {
|
|
855
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
856
|
-
}
|
|
857
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
858
|
-
} else {
|
|
859
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
860
|
-
}
|
|
861
|
-
if (input.EnvironmentId !== undefined) {
|
|
862
|
-
const labelValue: string = input.EnvironmentId;
|
|
863
|
-
if (labelValue.length <= 0) {
|
|
864
|
-
throw new Error("Empty value provided for input HTTP label: EnvironmentId.");
|
|
865
|
-
}
|
|
866
|
-
resolvedPath = resolvedPath.replace("{EnvironmentId}", __extendedEncodeURIComponent(labelValue));
|
|
867
|
-
} else {
|
|
868
|
-
throw new Error("No value provided for input HTTP label: EnvironmentId.");
|
|
869
|
-
}
|
|
870
|
-
const query: any = {
|
|
871
|
-
...(input.MaxResults !== undefined && { max_results: input.MaxResults.toString() }),
|
|
872
|
-
...(input.NextToken !== undefined && { next_token: input.NextToken }),
|
|
873
|
-
};
|
|
874
|
-
let body: any;
|
|
875
|
-
return new __HttpRequest({
|
|
876
|
-
protocol,
|
|
877
|
-
hostname,
|
|
878
|
-
port,
|
|
879
|
-
method: "GET",
|
|
880
|
-
headers,
|
|
881
|
-
path: resolvedPath,
|
|
882
|
-
query,
|
|
883
|
-
body,
|
|
884
|
-
});
|
|
885
|
-
};
|
|
886
|
-
|
|
887
|
-
export const serializeAws_restJson1ListDeploymentStrategiesCommand = async (
|
|
888
|
-
input: ListDeploymentStrategiesCommandInput,
|
|
889
|
-
context: __SerdeContext
|
|
890
|
-
): Promise<__HttpRequest> => {
|
|
891
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
892
|
-
const headers: any = {};
|
|
893
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deploymentstrategies";
|
|
894
|
-
const query: any = {
|
|
895
|
-
...(input.MaxResults !== undefined && { max_results: input.MaxResults.toString() }),
|
|
896
|
-
...(input.NextToken !== undefined && { next_token: input.NextToken }),
|
|
897
|
-
};
|
|
898
|
-
let body: any;
|
|
899
|
-
return new __HttpRequest({
|
|
900
|
-
protocol,
|
|
901
|
-
hostname,
|
|
902
|
-
port,
|
|
903
|
-
method: "GET",
|
|
904
|
-
headers,
|
|
905
|
-
path: resolvedPath,
|
|
906
|
-
query,
|
|
907
|
-
body,
|
|
908
|
-
});
|
|
909
|
-
};
|
|
910
|
-
|
|
911
|
-
export const serializeAws_restJson1ListEnvironmentsCommand = async (
|
|
912
|
-
input: ListEnvironmentsCommandInput,
|
|
913
|
-
context: __SerdeContext
|
|
914
|
-
): Promise<__HttpRequest> => {
|
|
915
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
916
|
-
const headers: any = {};
|
|
917
|
-
let resolvedPath =
|
|
918
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
919
|
-
"/applications/{ApplicationId}/environments";
|
|
920
|
-
if (input.ApplicationId !== undefined) {
|
|
921
|
-
const labelValue: string = input.ApplicationId;
|
|
922
|
-
if (labelValue.length <= 0) {
|
|
923
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
924
|
-
}
|
|
925
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
926
|
-
} else {
|
|
927
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
928
|
-
}
|
|
929
|
-
const query: any = {
|
|
930
|
-
...(input.MaxResults !== undefined && { max_results: input.MaxResults.toString() }),
|
|
931
|
-
...(input.NextToken !== undefined && { next_token: input.NextToken }),
|
|
932
|
-
};
|
|
933
|
-
let body: any;
|
|
934
|
-
return new __HttpRequest({
|
|
935
|
-
protocol,
|
|
936
|
-
hostname,
|
|
937
|
-
port,
|
|
938
|
-
method: "GET",
|
|
939
|
-
headers,
|
|
940
|
-
path: resolvedPath,
|
|
941
|
-
query,
|
|
942
|
-
body,
|
|
943
|
-
});
|
|
944
|
-
};
|
|
945
|
-
|
|
946
|
-
export const serializeAws_restJson1ListHostedConfigurationVersionsCommand = async (
|
|
947
|
-
input: ListHostedConfigurationVersionsCommandInput,
|
|
948
|
-
context: __SerdeContext
|
|
949
|
-
): Promise<__HttpRequest> => {
|
|
950
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
951
|
-
const headers: any = {};
|
|
952
|
-
let resolvedPath =
|
|
953
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
954
|
-
"/applications/{ApplicationId}/configurationprofiles/{ConfigurationProfileId}/hostedconfigurationversions";
|
|
955
|
-
if (input.ApplicationId !== undefined) {
|
|
956
|
-
const labelValue: string = input.ApplicationId;
|
|
957
|
-
if (labelValue.length <= 0) {
|
|
958
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
959
|
-
}
|
|
960
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
961
|
-
} else {
|
|
962
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
963
|
-
}
|
|
964
|
-
if (input.ConfigurationProfileId !== undefined) {
|
|
965
|
-
const labelValue: string = input.ConfigurationProfileId;
|
|
966
|
-
if (labelValue.length <= 0) {
|
|
967
|
-
throw new Error("Empty value provided for input HTTP label: ConfigurationProfileId.");
|
|
968
|
-
}
|
|
969
|
-
resolvedPath = resolvedPath.replace("{ConfigurationProfileId}", __extendedEncodeURIComponent(labelValue));
|
|
970
|
-
} else {
|
|
971
|
-
throw new Error("No value provided for input HTTP label: ConfigurationProfileId.");
|
|
972
|
-
}
|
|
973
|
-
const query: any = {
|
|
974
|
-
...(input.MaxResults !== undefined && { max_results: input.MaxResults.toString() }),
|
|
975
|
-
...(input.NextToken !== undefined && { next_token: input.NextToken }),
|
|
976
|
-
};
|
|
977
|
-
let body: any;
|
|
978
|
-
return new __HttpRequest({
|
|
979
|
-
protocol,
|
|
980
|
-
hostname,
|
|
981
|
-
port,
|
|
982
|
-
method: "GET",
|
|
983
|
-
headers,
|
|
984
|
-
path: resolvedPath,
|
|
985
|
-
query,
|
|
986
|
-
body,
|
|
987
|
-
});
|
|
988
|
-
};
|
|
989
|
-
|
|
990
|
-
export const serializeAws_restJson1ListTagsForResourceCommand = async (
|
|
991
|
-
input: ListTagsForResourceCommandInput,
|
|
992
|
-
context: __SerdeContext
|
|
993
|
-
): Promise<__HttpRequest> => {
|
|
994
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
995
|
-
const headers: any = {};
|
|
996
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
997
|
-
if (input.ResourceArn !== undefined) {
|
|
998
|
-
const labelValue: string = input.ResourceArn;
|
|
999
|
-
if (labelValue.length <= 0) {
|
|
1000
|
-
throw new Error("Empty value provided for input HTTP label: ResourceArn.");
|
|
1001
|
-
}
|
|
1002
|
-
resolvedPath = resolvedPath.replace("{ResourceArn}", __extendedEncodeURIComponent(labelValue));
|
|
1003
|
-
} else {
|
|
1004
|
-
throw new Error("No value provided for input HTTP label: ResourceArn.");
|
|
1005
|
-
}
|
|
1006
|
-
let body: any;
|
|
1007
|
-
return new __HttpRequest({
|
|
1008
|
-
protocol,
|
|
1009
|
-
hostname,
|
|
1010
|
-
port,
|
|
1011
|
-
method: "GET",
|
|
1012
|
-
headers,
|
|
1013
|
-
path: resolvedPath,
|
|
1014
|
-
body,
|
|
1015
|
-
});
|
|
1016
|
-
};
|
|
1017
|
-
|
|
1018
|
-
export const serializeAws_restJson1StartDeploymentCommand = async (
|
|
1019
|
-
input: StartDeploymentCommandInput,
|
|
1020
|
-
context: __SerdeContext
|
|
1021
|
-
): Promise<__HttpRequest> => {
|
|
1022
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1023
|
-
const headers: any = {
|
|
1024
|
-
"content-type": "application/json",
|
|
1025
|
-
};
|
|
1026
|
-
let resolvedPath =
|
|
1027
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
1028
|
-
"/applications/{ApplicationId}/environments/{EnvironmentId}/deployments";
|
|
1029
|
-
if (input.ApplicationId !== undefined) {
|
|
1030
|
-
const labelValue: string = input.ApplicationId;
|
|
1031
|
-
if (labelValue.length <= 0) {
|
|
1032
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
1033
|
-
}
|
|
1034
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
1035
|
-
} else {
|
|
1036
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
1037
|
-
}
|
|
1038
|
-
if (input.EnvironmentId !== undefined) {
|
|
1039
|
-
const labelValue: string = input.EnvironmentId;
|
|
1040
|
-
if (labelValue.length <= 0) {
|
|
1041
|
-
throw new Error("Empty value provided for input HTTP label: EnvironmentId.");
|
|
1042
|
-
}
|
|
1043
|
-
resolvedPath = resolvedPath.replace("{EnvironmentId}", __extendedEncodeURIComponent(labelValue));
|
|
1044
|
-
} else {
|
|
1045
|
-
throw new Error("No value provided for input HTTP label: EnvironmentId.");
|
|
1046
|
-
}
|
|
1047
|
-
let body: any;
|
|
1048
|
-
body = JSON.stringify({
|
|
1049
|
-
...(input.ConfigurationProfileId !== undefined &&
|
|
1050
|
-
input.ConfigurationProfileId !== null && { ConfigurationProfileId: input.ConfigurationProfileId }),
|
|
1051
|
-
...(input.ConfigurationVersion !== undefined &&
|
|
1052
|
-
input.ConfigurationVersion !== null && { ConfigurationVersion: input.ConfigurationVersion }),
|
|
1053
|
-
...(input.DeploymentStrategyId !== undefined &&
|
|
1054
|
-
input.DeploymentStrategyId !== null && { DeploymentStrategyId: input.DeploymentStrategyId }),
|
|
1055
|
-
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
|
|
1056
|
-
...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
|
|
1057
|
-
});
|
|
1058
|
-
return new __HttpRequest({
|
|
1059
|
-
protocol,
|
|
1060
|
-
hostname,
|
|
1061
|
-
port,
|
|
1062
|
-
method: "POST",
|
|
1063
|
-
headers,
|
|
1064
|
-
path: resolvedPath,
|
|
1065
|
-
body,
|
|
1066
|
-
});
|
|
1067
|
-
};
|
|
1068
|
-
|
|
1069
|
-
export const serializeAws_restJson1StopDeploymentCommand = async (
|
|
1070
|
-
input: StopDeploymentCommandInput,
|
|
1071
|
-
context: __SerdeContext
|
|
1072
|
-
): Promise<__HttpRequest> => {
|
|
1073
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1074
|
-
const headers: any = {};
|
|
1075
|
-
let resolvedPath =
|
|
1076
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
1077
|
-
"/applications/{ApplicationId}/environments/{EnvironmentId}/deployments/{DeploymentNumber}";
|
|
1078
|
-
if (input.ApplicationId !== undefined) {
|
|
1079
|
-
const labelValue: string = input.ApplicationId;
|
|
1080
|
-
if (labelValue.length <= 0) {
|
|
1081
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
1082
|
-
}
|
|
1083
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
1084
|
-
} else {
|
|
1085
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
1086
|
-
}
|
|
1087
|
-
if (input.EnvironmentId !== undefined) {
|
|
1088
|
-
const labelValue: string = input.EnvironmentId;
|
|
1089
|
-
if (labelValue.length <= 0) {
|
|
1090
|
-
throw new Error("Empty value provided for input HTTP label: EnvironmentId.");
|
|
1091
|
-
}
|
|
1092
|
-
resolvedPath = resolvedPath.replace("{EnvironmentId}", __extendedEncodeURIComponent(labelValue));
|
|
1093
|
-
} else {
|
|
1094
|
-
throw new Error("No value provided for input HTTP label: EnvironmentId.");
|
|
1095
|
-
}
|
|
1096
|
-
if (input.DeploymentNumber !== undefined) {
|
|
1097
|
-
const labelValue: string = input.DeploymentNumber.toString();
|
|
1098
|
-
if (labelValue.length <= 0) {
|
|
1099
|
-
throw new Error("Empty value provided for input HTTP label: DeploymentNumber.");
|
|
1100
|
-
}
|
|
1101
|
-
resolvedPath = resolvedPath.replace("{DeploymentNumber}", __extendedEncodeURIComponent(labelValue));
|
|
1102
|
-
} else {
|
|
1103
|
-
throw new Error("No value provided for input HTTP label: DeploymentNumber.");
|
|
1104
|
-
}
|
|
1105
|
-
let body: any;
|
|
1106
|
-
return new __HttpRequest({
|
|
1107
|
-
protocol,
|
|
1108
|
-
hostname,
|
|
1109
|
-
port,
|
|
1110
|
-
method: "DELETE",
|
|
1111
|
-
headers,
|
|
1112
|
-
path: resolvedPath,
|
|
1113
|
-
body,
|
|
1114
|
-
});
|
|
1115
|
-
};
|
|
1116
|
-
|
|
1117
|
-
export const serializeAws_restJson1TagResourceCommand = async (
|
|
1118
|
-
input: TagResourceCommandInput,
|
|
1119
|
-
context: __SerdeContext
|
|
1120
|
-
): Promise<__HttpRequest> => {
|
|
1121
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1122
|
-
const headers: any = {
|
|
1123
|
-
"content-type": "application/json",
|
|
1124
|
-
};
|
|
1125
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
1126
|
-
if (input.ResourceArn !== undefined) {
|
|
1127
|
-
const labelValue: string = input.ResourceArn;
|
|
1128
|
-
if (labelValue.length <= 0) {
|
|
1129
|
-
throw new Error("Empty value provided for input HTTP label: ResourceArn.");
|
|
1130
|
-
}
|
|
1131
|
-
resolvedPath = resolvedPath.replace("{ResourceArn}", __extendedEncodeURIComponent(labelValue));
|
|
1132
|
-
} else {
|
|
1133
|
-
throw new Error("No value provided for input HTTP label: ResourceArn.");
|
|
1134
|
-
}
|
|
1135
|
-
let body: any;
|
|
1136
|
-
body = JSON.stringify({
|
|
1137
|
-
...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
|
|
1138
|
-
});
|
|
1139
|
-
return new __HttpRequest({
|
|
1140
|
-
protocol,
|
|
1141
|
-
hostname,
|
|
1142
|
-
port,
|
|
1143
|
-
method: "POST",
|
|
1144
|
-
headers,
|
|
1145
|
-
path: resolvedPath,
|
|
1146
|
-
body,
|
|
1147
|
-
});
|
|
1148
|
-
};
|
|
1149
|
-
|
|
1150
|
-
export const serializeAws_restJson1UntagResourceCommand = async (
|
|
1151
|
-
input: UntagResourceCommandInput,
|
|
1152
|
-
context: __SerdeContext
|
|
1153
|
-
): Promise<__HttpRequest> => {
|
|
1154
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1155
|
-
const headers: any = {};
|
|
1156
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
1157
|
-
if (input.ResourceArn !== undefined) {
|
|
1158
|
-
const labelValue: string = input.ResourceArn;
|
|
1159
|
-
if (labelValue.length <= 0) {
|
|
1160
|
-
throw new Error("Empty value provided for input HTTP label: ResourceArn.");
|
|
1161
|
-
}
|
|
1162
|
-
resolvedPath = resolvedPath.replace("{ResourceArn}", __extendedEncodeURIComponent(labelValue));
|
|
1163
|
-
} else {
|
|
1164
|
-
throw new Error("No value provided for input HTTP label: ResourceArn.");
|
|
1165
|
-
}
|
|
1166
|
-
const query: any = {
|
|
1167
|
-
...(input.TagKeys !== undefined && { tagKeys: (input.TagKeys || []).map((_entry) => _entry as any) }),
|
|
1168
|
-
};
|
|
1169
|
-
let body: any;
|
|
1170
|
-
return new __HttpRequest({
|
|
1171
|
-
protocol,
|
|
1172
|
-
hostname,
|
|
1173
|
-
port,
|
|
1174
|
-
method: "DELETE",
|
|
1175
|
-
headers,
|
|
1176
|
-
path: resolvedPath,
|
|
1177
|
-
query,
|
|
1178
|
-
body,
|
|
1179
|
-
});
|
|
1180
|
-
};
|
|
1181
|
-
|
|
1182
|
-
export const serializeAws_restJson1UpdateApplicationCommand = async (
|
|
1183
|
-
input: UpdateApplicationCommandInput,
|
|
1184
|
-
context: __SerdeContext
|
|
1185
|
-
): Promise<__HttpRequest> => {
|
|
1186
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1187
|
-
const headers: any = {
|
|
1188
|
-
"content-type": "application/json",
|
|
1189
|
-
};
|
|
1190
|
-
let resolvedPath =
|
|
1191
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}";
|
|
1192
|
-
if (input.ApplicationId !== undefined) {
|
|
1193
|
-
const labelValue: string = input.ApplicationId;
|
|
1194
|
-
if (labelValue.length <= 0) {
|
|
1195
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
1196
|
-
}
|
|
1197
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
1198
|
-
} else {
|
|
1199
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
1200
|
-
}
|
|
1201
|
-
let body: any;
|
|
1202
|
-
body = JSON.stringify({
|
|
1203
|
-
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
|
|
1204
|
-
...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
|
|
1205
|
-
});
|
|
1206
|
-
return new __HttpRequest({
|
|
1207
|
-
protocol,
|
|
1208
|
-
hostname,
|
|
1209
|
-
port,
|
|
1210
|
-
method: "PATCH",
|
|
1211
|
-
headers,
|
|
1212
|
-
path: resolvedPath,
|
|
1213
|
-
body,
|
|
1214
|
-
});
|
|
1215
|
-
};
|
|
1216
|
-
|
|
1217
|
-
export const serializeAws_restJson1UpdateConfigurationProfileCommand = async (
|
|
1218
|
-
input: UpdateConfigurationProfileCommandInput,
|
|
1219
|
-
context: __SerdeContext
|
|
1220
|
-
): Promise<__HttpRequest> => {
|
|
1221
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1222
|
-
const headers: any = {
|
|
1223
|
-
"content-type": "application/json",
|
|
1224
|
-
};
|
|
1225
|
-
let resolvedPath =
|
|
1226
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
1227
|
-
"/applications/{ApplicationId}/configurationprofiles/{ConfigurationProfileId}";
|
|
1228
|
-
if (input.ApplicationId !== undefined) {
|
|
1229
|
-
const labelValue: string = input.ApplicationId;
|
|
1230
|
-
if (labelValue.length <= 0) {
|
|
1231
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
1232
|
-
}
|
|
1233
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
1234
|
-
} else {
|
|
1235
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
1236
|
-
}
|
|
1237
|
-
if (input.ConfigurationProfileId !== undefined) {
|
|
1238
|
-
const labelValue: string = input.ConfigurationProfileId;
|
|
1239
|
-
if (labelValue.length <= 0) {
|
|
1240
|
-
throw new Error("Empty value provided for input HTTP label: ConfigurationProfileId.");
|
|
1241
|
-
}
|
|
1242
|
-
resolvedPath = resolvedPath.replace("{ConfigurationProfileId}", __extendedEncodeURIComponent(labelValue));
|
|
1243
|
-
} else {
|
|
1244
|
-
throw new Error("No value provided for input HTTP label: ConfigurationProfileId.");
|
|
1245
|
-
}
|
|
1246
|
-
let body: any;
|
|
1247
|
-
body = JSON.stringify({
|
|
1248
|
-
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
|
|
1249
|
-
...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
|
|
1250
|
-
...(input.RetrievalRoleArn !== undefined &&
|
|
1251
|
-
input.RetrievalRoleArn !== null && { RetrievalRoleArn: input.RetrievalRoleArn }),
|
|
1252
|
-
...(input.Validators !== undefined &&
|
|
1253
|
-
input.Validators !== null && { Validators: serializeAws_restJson1ValidatorList(input.Validators, context) }),
|
|
1254
|
-
});
|
|
1255
|
-
return new __HttpRequest({
|
|
1256
|
-
protocol,
|
|
1257
|
-
hostname,
|
|
1258
|
-
port,
|
|
1259
|
-
method: "PATCH",
|
|
1260
|
-
headers,
|
|
1261
|
-
path: resolvedPath,
|
|
1262
|
-
body,
|
|
1263
|
-
});
|
|
1264
|
-
};
|
|
1265
|
-
|
|
1266
|
-
export const serializeAws_restJson1UpdateDeploymentStrategyCommand = async (
|
|
1267
|
-
input: UpdateDeploymentStrategyCommandInput,
|
|
1268
|
-
context: __SerdeContext
|
|
1269
|
-
): Promise<__HttpRequest> => {
|
|
1270
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1271
|
-
const headers: any = {
|
|
1272
|
-
"content-type": "application/json",
|
|
1273
|
-
};
|
|
1274
|
-
let resolvedPath =
|
|
1275
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
1276
|
-
"/deploymentstrategies/{DeploymentStrategyId}";
|
|
1277
|
-
if (input.DeploymentStrategyId !== undefined) {
|
|
1278
|
-
const labelValue: string = input.DeploymentStrategyId;
|
|
1279
|
-
if (labelValue.length <= 0) {
|
|
1280
|
-
throw new Error("Empty value provided for input HTTP label: DeploymentStrategyId.");
|
|
1281
|
-
}
|
|
1282
|
-
resolvedPath = resolvedPath.replace("{DeploymentStrategyId}", __extendedEncodeURIComponent(labelValue));
|
|
1283
|
-
} else {
|
|
1284
|
-
throw new Error("No value provided for input HTTP label: DeploymentStrategyId.");
|
|
1285
|
-
}
|
|
1286
|
-
let body: any;
|
|
1287
|
-
body = JSON.stringify({
|
|
1288
|
-
...(input.DeploymentDurationInMinutes !== undefined &&
|
|
1289
|
-
input.DeploymentDurationInMinutes !== null && { DeploymentDurationInMinutes: input.DeploymentDurationInMinutes }),
|
|
1290
|
-
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
|
|
1291
|
-
...(input.FinalBakeTimeInMinutes !== undefined &&
|
|
1292
|
-
input.FinalBakeTimeInMinutes !== null && { FinalBakeTimeInMinutes: input.FinalBakeTimeInMinutes }),
|
|
1293
|
-
...(input.GrowthFactor !== undefined &&
|
|
1294
|
-
input.GrowthFactor !== null && { GrowthFactor: __serializeFloat(input.GrowthFactor) }),
|
|
1295
|
-
...(input.GrowthType !== undefined && input.GrowthType !== null && { GrowthType: input.GrowthType }),
|
|
1296
|
-
});
|
|
1297
|
-
return new __HttpRequest({
|
|
1298
|
-
protocol,
|
|
1299
|
-
hostname,
|
|
1300
|
-
port,
|
|
1301
|
-
method: "PATCH",
|
|
1302
|
-
headers,
|
|
1303
|
-
path: resolvedPath,
|
|
1304
|
-
body,
|
|
1305
|
-
});
|
|
1306
|
-
};
|
|
1307
|
-
|
|
1308
|
-
export const serializeAws_restJson1UpdateEnvironmentCommand = async (
|
|
1309
|
-
input: UpdateEnvironmentCommandInput,
|
|
1310
|
-
context: __SerdeContext
|
|
1311
|
-
): Promise<__HttpRequest> => {
|
|
1312
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1313
|
-
const headers: any = {
|
|
1314
|
-
"content-type": "application/json",
|
|
1315
|
-
};
|
|
1316
|
-
let resolvedPath =
|
|
1317
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
1318
|
-
"/applications/{ApplicationId}/environments/{EnvironmentId}";
|
|
1319
|
-
if (input.ApplicationId !== undefined) {
|
|
1320
|
-
const labelValue: string = input.ApplicationId;
|
|
1321
|
-
if (labelValue.length <= 0) {
|
|
1322
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
1323
|
-
}
|
|
1324
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
1325
|
-
} else {
|
|
1326
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
1327
|
-
}
|
|
1328
|
-
if (input.EnvironmentId !== undefined) {
|
|
1329
|
-
const labelValue: string = input.EnvironmentId;
|
|
1330
|
-
if (labelValue.length <= 0) {
|
|
1331
|
-
throw new Error("Empty value provided for input HTTP label: EnvironmentId.");
|
|
1332
|
-
}
|
|
1333
|
-
resolvedPath = resolvedPath.replace("{EnvironmentId}", __extendedEncodeURIComponent(labelValue));
|
|
1334
|
-
} else {
|
|
1335
|
-
throw new Error("No value provided for input HTTP label: EnvironmentId.");
|
|
1336
|
-
}
|
|
1337
|
-
let body: any;
|
|
1338
|
-
body = JSON.stringify({
|
|
1339
|
-
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
|
|
1340
|
-
...(input.Monitors !== undefined &&
|
|
1341
|
-
input.Monitors !== null && { Monitors: serializeAws_restJson1MonitorList(input.Monitors, context) }),
|
|
1342
|
-
...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
|
|
1343
|
-
});
|
|
1344
|
-
return new __HttpRequest({
|
|
1345
|
-
protocol,
|
|
1346
|
-
hostname,
|
|
1347
|
-
port,
|
|
1348
|
-
method: "PATCH",
|
|
1349
|
-
headers,
|
|
1350
|
-
path: resolvedPath,
|
|
1351
|
-
body,
|
|
1352
|
-
});
|
|
1353
|
-
};
|
|
1354
|
-
|
|
1355
|
-
export const serializeAws_restJson1ValidateConfigurationCommand = async (
|
|
1356
|
-
input: ValidateConfigurationCommandInput,
|
|
1357
|
-
context: __SerdeContext
|
|
1358
|
-
): Promise<__HttpRequest> => {
|
|
1359
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1360
|
-
const headers: any = {};
|
|
1361
|
-
let resolvedPath =
|
|
1362
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
1363
|
-
"/applications/{ApplicationId}/configurationprofiles/{ConfigurationProfileId}/validators";
|
|
1364
|
-
if (input.ApplicationId !== undefined) {
|
|
1365
|
-
const labelValue: string = input.ApplicationId;
|
|
1366
|
-
if (labelValue.length <= 0) {
|
|
1367
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
1368
|
-
}
|
|
1369
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
1370
|
-
} else {
|
|
1371
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
1372
|
-
}
|
|
1373
|
-
if (input.ConfigurationProfileId !== undefined) {
|
|
1374
|
-
const labelValue: string = input.ConfigurationProfileId;
|
|
1375
|
-
if (labelValue.length <= 0) {
|
|
1376
|
-
throw new Error("Empty value provided for input HTTP label: ConfigurationProfileId.");
|
|
1377
|
-
}
|
|
1378
|
-
resolvedPath = resolvedPath.replace("{ConfigurationProfileId}", __extendedEncodeURIComponent(labelValue));
|
|
1379
|
-
} else {
|
|
1380
|
-
throw new Error("No value provided for input HTTP label: ConfigurationProfileId.");
|
|
1381
|
-
}
|
|
1382
|
-
const query: any = {
|
|
1383
|
-
...(input.ConfigurationVersion !== undefined && { configuration_version: input.ConfigurationVersion }),
|
|
1384
|
-
};
|
|
1385
|
-
let body: any;
|
|
1386
|
-
return new __HttpRequest({
|
|
1387
|
-
protocol,
|
|
1388
|
-
hostname,
|
|
1389
|
-
port,
|
|
1390
|
-
method: "POST",
|
|
1391
|
-
headers,
|
|
1392
|
-
path: resolvedPath,
|
|
1393
|
-
query,
|
|
1394
|
-
body,
|
|
1395
|
-
});
|
|
1396
|
-
};
|
|
1397
|
-
|
|
1398
|
-
export const deserializeAws_restJson1CreateApplicationCommand = async (
|
|
1399
|
-
output: __HttpResponse,
|
|
1400
|
-
context: __SerdeContext
|
|
1401
|
-
): Promise<CreateApplicationCommandOutput> => {
|
|
1402
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
1403
|
-
return deserializeAws_restJson1CreateApplicationCommandError(output, context);
|
|
1404
|
-
}
|
|
1405
|
-
const contents: CreateApplicationCommandOutput = {
|
|
1406
|
-
$metadata: deserializeMetadata(output),
|
|
1407
|
-
Description: undefined,
|
|
1408
|
-
Id: undefined,
|
|
1409
|
-
Name: undefined,
|
|
1410
|
-
};
|
|
1411
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1412
|
-
if (data.Description !== undefined && data.Description !== null) {
|
|
1413
|
-
contents.Description = __expectString(data.Description);
|
|
1414
|
-
}
|
|
1415
|
-
if (data.Id !== undefined && data.Id !== null) {
|
|
1416
|
-
contents.Id = __expectString(data.Id);
|
|
1417
|
-
}
|
|
1418
|
-
if (data.Name !== undefined && data.Name !== null) {
|
|
1419
|
-
contents.Name = __expectString(data.Name);
|
|
1420
|
-
}
|
|
1421
|
-
return Promise.resolve(contents);
|
|
1422
|
-
};
|
|
1423
|
-
|
|
1424
|
-
const deserializeAws_restJson1CreateApplicationCommandError = async (
|
|
1425
|
-
output: __HttpResponse,
|
|
1426
|
-
context: __SerdeContext
|
|
1427
|
-
): Promise<CreateApplicationCommandOutput> => {
|
|
1428
|
-
const parsedOutput: any = {
|
|
1429
|
-
...output,
|
|
1430
|
-
body: await parseBody(output.body, context),
|
|
1431
|
-
};
|
|
1432
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1433
|
-
let errorCode = "UnknownError";
|
|
1434
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1435
|
-
switch (errorCode) {
|
|
1436
|
-
case "BadRequestException":
|
|
1437
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
1438
|
-
response = {
|
|
1439
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1440
|
-
name: errorCode,
|
|
1441
|
-
$metadata: deserializeMetadata(output),
|
|
1442
|
-
};
|
|
1443
|
-
break;
|
|
1444
|
-
case "InternalServerException":
|
|
1445
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
1446
|
-
response = {
|
|
1447
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1448
|
-
name: errorCode,
|
|
1449
|
-
$metadata: deserializeMetadata(output),
|
|
1450
|
-
};
|
|
1451
|
-
break;
|
|
1452
|
-
default:
|
|
1453
|
-
const parsedBody = parsedOutput.body;
|
|
1454
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1455
|
-
response = {
|
|
1456
|
-
...parsedBody,
|
|
1457
|
-
name: `${errorCode}`,
|
|
1458
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1459
|
-
$fault: "client",
|
|
1460
|
-
$metadata: deserializeMetadata(output),
|
|
1461
|
-
} as any;
|
|
1462
|
-
}
|
|
1463
|
-
const message = response.message || response.Message || errorCode;
|
|
1464
|
-
response.message = message;
|
|
1465
|
-
delete response.Message;
|
|
1466
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1467
|
-
};
|
|
1468
|
-
|
|
1469
|
-
export const deserializeAws_restJson1CreateConfigurationProfileCommand = async (
|
|
1470
|
-
output: __HttpResponse,
|
|
1471
|
-
context: __SerdeContext
|
|
1472
|
-
): Promise<CreateConfigurationProfileCommandOutput> => {
|
|
1473
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
1474
|
-
return deserializeAws_restJson1CreateConfigurationProfileCommandError(output, context);
|
|
1475
|
-
}
|
|
1476
|
-
const contents: CreateConfigurationProfileCommandOutput = {
|
|
1477
|
-
$metadata: deserializeMetadata(output),
|
|
1478
|
-
ApplicationId: undefined,
|
|
1479
|
-
Description: undefined,
|
|
1480
|
-
Id: undefined,
|
|
1481
|
-
LocationUri: undefined,
|
|
1482
|
-
Name: undefined,
|
|
1483
|
-
RetrievalRoleArn: undefined,
|
|
1484
|
-
Validators: undefined,
|
|
1485
|
-
};
|
|
1486
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1487
|
-
if (data.ApplicationId !== undefined && data.ApplicationId !== null) {
|
|
1488
|
-
contents.ApplicationId = __expectString(data.ApplicationId);
|
|
1489
|
-
}
|
|
1490
|
-
if (data.Description !== undefined && data.Description !== null) {
|
|
1491
|
-
contents.Description = __expectString(data.Description);
|
|
1492
|
-
}
|
|
1493
|
-
if (data.Id !== undefined && data.Id !== null) {
|
|
1494
|
-
contents.Id = __expectString(data.Id);
|
|
1495
|
-
}
|
|
1496
|
-
if (data.LocationUri !== undefined && data.LocationUri !== null) {
|
|
1497
|
-
contents.LocationUri = __expectString(data.LocationUri);
|
|
1498
|
-
}
|
|
1499
|
-
if (data.Name !== undefined && data.Name !== null) {
|
|
1500
|
-
contents.Name = __expectString(data.Name);
|
|
1501
|
-
}
|
|
1502
|
-
if (data.RetrievalRoleArn !== undefined && data.RetrievalRoleArn !== null) {
|
|
1503
|
-
contents.RetrievalRoleArn = __expectString(data.RetrievalRoleArn);
|
|
1504
|
-
}
|
|
1505
|
-
if (data.Validators !== undefined && data.Validators !== null) {
|
|
1506
|
-
contents.Validators = deserializeAws_restJson1ValidatorList(data.Validators, context);
|
|
1507
|
-
}
|
|
1508
|
-
return Promise.resolve(contents);
|
|
1509
|
-
};
|
|
1510
|
-
|
|
1511
|
-
const deserializeAws_restJson1CreateConfigurationProfileCommandError = async (
|
|
1512
|
-
output: __HttpResponse,
|
|
1513
|
-
context: __SerdeContext
|
|
1514
|
-
): Promise<CreateConfigurationProfileCommandOutput> => {
|
|
1515
|
-
const parsedOutput: any = {
|
|
1516
|
-
...output,
|
|
1517
|
-
body: await parseBody(output.body, context),
|
|
1518
|
-
};
|
|
1519
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1520
|
-
let errorCode = "UnknownError";
|
|
1521
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1522
|
-
switch (errorCode) {
|
|
1523
|
-
case "BadRequestException":
|
|
1524
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
1525
|
-
response = {
|
|
1526
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1527
|
-
name: errorCode,
|
|
1528
|
-
$metadata: deserializeMetadata(output),
|
|
1529
|
-
};
|
|
1530
|
-
break;
|
|
1531
|
-
case "InternalServerException":
|
|
1532
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
1533
|
-
response = {
|
|
1534
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1535
|
-
name: errorCode,
|
|
1536
|
-
$metadata: deserializeMetadata(output),
|
|
1537
|
-
};
|
|
1538
|
-
break;
|
|
1539
|
-
case "ResourceNotFoundException":
|
|
1540
|
-
case "com.amazonaws.appconfig#ResourceNotFoundException":
|
|
1541
|
-
response = {
|
|
1542
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1543
|
-
name: errorCode,
|
|
1544
|
-
$metadata: deserializeMetadata(output),
|
|
1545
|
-
};
|
|
1546
|
-
break;
|
|
1547
|
-
default:
|
|
1548
|
-
const parsedBody = parsedOutput.body;
|
|
1549
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1550
|
-
response = {
|
|
1551
|
-
...parsedBody,
|
|
1552
|
-
name: `${errorCode}`,
|
|
1553
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1554
|
-
$fault: "client",
|
|
1555
|
-
$metadata: deserializeMetadata(output),
|
|
1556
|
-
} as any;
|
|
1557
|
-
}
|
|
1558
|
-
const message = response.message || response.Message || errorCode;
|
|
1559
|
-
response.message = message;
|
|
1560
|
-
delete response.Message;
|
|
1561
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1562
|
-
};
|
|
1563
|
-
|
|
1564
|
-
export const deserializeAws_restJson1CreateDeploymentStrategyCommand = async (
|
|
1565
|
-
output: __HttpResponse,
|
|
1566
|
-
context: __SerdeContext
|
|
1567
|
-
): Promise<CreateDeploymentStrategyCommandOutput> => {
|
|
1568
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
1569
|
-
return deserializeAws_restJson1CreateDeploymentStrategyCommandError(output, context);
|
|
1570
|
-
}
|
|
1571
|
-
const contents: CreateDeploymentStrategyCommandOutput = {
|
|
1572
|
-
$metadata: deserializeMetadata(output),
|
|
1573
|
-
DeploymentDurationInMinutes: undefined,
|
|
1574
|
-
Description: undefined,
|
|
1575
|
-
FinalBakeTimeInMinutes: undefined,
|
|
1576
|
-
GrowthFactor: undefined,
|
|
1577
|
-
GrowthType: undefined,
|
|
1578
|
-
Id: undefined,
|
|
1579
|
-
Name: undefined,
|
|
1580
|
-
ReplicateTo: undefined,
|
|
1581
|
-
};
|
|
1582
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1583
|
-
if (data.DeploymentDurationInMinutes !== undefined && data.DeploymentDurationInMinutes !== null) {
|
|
1584
|
-
contents.DeploymentDurationInMinutes = __expectInt32(data.DeploymentDurationInMinutes);
|
|
1585
|
-
}
|
|
1586
|
-
if (data.Description !== undefined && data.Description !== null) {
|
|
1587
|
-
contents.Description = __expectString(data.Description);
|
|
1588
|
-
}
|
|
1589
|
-
if (data.FinalBakeTimeInMinutes !== undefined && data.FinalBakeTimeInMinutes !== null) {
|
|
1590
|
-
contents.FinalBakeTimeInMinutes = __expectInt32(data.FinalBakeTimeInMinutes);
|
|
1591
|
-
}
|
|
1592
|
-
if (data.GrowthFactor !== undefined && data.GrowthFactor !== null) {
|
|
1593
|
-
contents.GrowthFactor = __limitedParseFloat32(data.GrowthFactor);
|
|
1594
|
-
}
|
|
1595
|
-
if (data.GrowthType !== undefined && data.GrowthType !== null) {
|
|
1596
|
-
contents.GrowthType = __expectString(data.GrowthType);
|
|
1597
|
-
}
|
|
1598
|
-
if (data.Id !== undefined && data.Id !== null) {
|
|
1599
|
-
contents.Id = __expectString(data.Id);
|
|
1600
|
-
}
|
|
1601
|
-
if (data.Name !== undefined && data.Name !== null) {
|
|
1602
|
-
contents.Name = __expectString(data.Name);
|
|
1603
|
-
}
|
|
1604
|
-
if (data.ReplicateTo !== undefined && data.ReplicateTo !== null) {
|
|
1605
|
-
contents.ReplicateTo = __expectString(data.ReplicateTo);
|
|
1606
|
-
}
|
|
1607
|
-
return Promise.resolve(contents);
|
|
1608
|
-
};
|
|
1609
|
-
|
|
1610
|
-
const deserializeAws_restJson1CreateDeploymentStrategyCommandError = async (
|
|
1611
|
-
output: __HttpResponse,
|
|
1612
|
-
context: __SerdeContext
|
|
1613
|
-
): Promise<CreateDeploymentStrategyCommandOutput> => {
|
|
1614
|
-
const parsedOutput: any = {
|
|
1615
|
-
...output,
|
|
1616
|
-
body: await parseBody(output.body, context),
|
|
1617
|
-
};
|
|
1618
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1619
|
-
let errorCode = "UnknownError";
|
|
1620
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1621
|
-
switch (errorCode) {
|
|
1622
|
-
case "BadRequestException":
|
|
1623
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
1624
|
-
response = {
|
|
1625
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1626
|
-
name: errorCode,
|
|
1627
|
-
$metadata: deserializeMetadata(output),
|
|
1628
|
-
};
|
|
1629
|
-
break;
|
|
1630
|
-
case "InternalServerException":
|
|
1631
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
1632
|
-
response = {
|
|
1633
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1634
|
-
name: errorCode,
|
|
1635
|
-
$metadata: deserializeMetadata(output),
|
|
1636
|
-
};
|
|
1637
|
-
break;
|
|
1638
|
-
default:
|
|
1639
|
-
const parsedBody = parsedOutput.body;
|
|
1640
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1641
|
-
response = {
|
|
1642
|
-
...parsedBody,
|
|
1643
|
-
name: `${errorCode}`,
|
|
1644
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1645
|
-
$fault: "client",
|
|
1646
|
-
$metadata: deserializeMetadata(output),
|
|
1647
|
-
} as any;
|
|
1648
|
-
}
|
|
1649
|
-
const message = response.message || response.Message || errorCode;
|
|
1650
|
-
response.message = message;
|
|
1651
|
-
delete response.Message;
|
|
1652
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1653
|
-
};
|
|
1654
|
-
|
|
1655
|
-
export const deserializeAws_restJson1CreateEnvironmentCommand = async (
|
|
1656
|
-
output: __HttpResponse,
|
|
1657
|
-
context: __SerdeContext
|
|
1658
|
-
): Promise<CreateEnvironmentCommandOutput> => {
|
|
1659
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
1660
|
-
return deserializeAws_restJson1CreateEnvironmentCommandError(output, context);
|
|
1661
|
-
}
|
|
1662
|
-
const contents: CreateEnvironmentCommandOutput = {
|
|
1663
|
-
$metadata: deserializeMetadata(output),
|
|
1664
|
-
ApplicationId: undefined,
|
|
1665
|
-
Description: undefined,
|
|
1666
|
-
Id: undefined,
|
|
1667
|
-
Monitors: undefined,
|
|
1668
|
-
Name: undefined,
|
|
1669
|
-
State: undefined,
|
|
1670
|
-
};
|
|
1671
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1672
|
-
if (data.ApplicationId !== undefined && data.ApplicationId !== null) {
|
|
1673
|
-
contents.ApplicationId = __expectString(data.ApplicationId);
|
|
1674
|
-
}
|
|
1675
|
-
if (data.Description !== undefined && data.Description !== null) {
|
|
1676
|
-
contents.Description = __expectString(data.Description);
|
|
1677
|
-
}
|
|
1678
|
-
if (data.Id !== undefined && data.Id !== null) {
|
|
1679
|
-
contents.Id = __expectString(data.Id);
|
|
1680
|
-
}
|
|
1681
|
-
if (data.Monitors !== undefined && data.Monitors !== null) {
|
|
1682
|
-
contents.Monitors = deserializeAws_restJson1MonitorList(data.Monitors, context);
|
|
1683
|
-
}
|
|
1684
|
-
if (data.Name !== undefined && data.Name !== null) {
|
|
1685
|
-
contents.Name = __expectString(data.Name);
|
|
1686
|
-
}
|
|
1687
|
-
if (data.State !== undefined && data.State !== null) {
|
|
1688
|
-
contents.State = __expectString(data.State);
|
|
1689
|
-
}
|
|
1690
|
-
return Promise.resolve(contents);
|
|
1691
|
-
};
|
|
1692
|
-
|
|
1693
|
-
const deserializeAws_restJson1CreateEnvironmentCommandError = async (
|
|
1694
|
-
output: __HttpResponse,
|
|
1695
|
-
context: __SerdeContext
|
|
1696
|
-
): Promise<CreateEnvironmentCommandOutput> => {
|
|
1697
|
-
const parsedOutput: any = {
|
|
1698
|
-
...output,
|
|
1699
|
-
body: await parseBody(output.body, context),
|
|
1700
|
-
};
|
|
1701
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1702
|
-
let errorCode = "UnknownError";
|
|
1703
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1704
|
-
switch (errorCode) {
|
|
1705
|
-
case "BadRequestException":
|
|
1706
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
1707
|
-
response = {
|
|
1708
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1709
|
-
name: errorCode,
|
|
1710
|
-
$metadata: deserializeMetadata(output),
|
|
1711
|
-
};
|
|
1712
|
-
break;
|
|
1713
|
-
case "InternalServerException":
|
|
1714
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
1715
|
-
response = {
|
|
1716
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1717
|
-
name: errorCode,
|
|
1718
|
-
$metadata: deserializeMetadata(output),
|
|
1719
|
-
};
|
|
1720
|
-
break;
|
|
1721
|
-
case "ResourceNotFoundException":
|
|
1722
|
-
case "com.amazonaws.appconfig#ResourceNotFoundException":
|
|
1723
|
-
response = {
|
|
1724
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1725
|
-
name: errorCode,
|
|
1726
|
-
$metadata: deserializeMetadata(output),
|
|
1727
|
-
};
|
|
1728
|
-
break;
|
|
1729
|
-
default:
|
|
1730
|
-
const parsedBody = parsedOutput.body;
|
|
1731
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1732
|
-
response = {
|
|
1733
|
-
...parsedBody,
|
|
1734
|
-
name: `${errorCode}`,
|
|
1735
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1736
|
-
$fault: "client",
|
|
1737
|
-
$metadata: deserializeMetadata(output),
|
|
1738
|
-
} as any;
|
|
1739
|
-
}
|
|
1740
|
-
const message = response.message || response.Message || errorCode;
|
|
1741
|
-
response.message = message;
|
|
1742
|
-
delete response.Message;
|
|
1743
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1744
|
-
};
|
|
1745
|
-
|
|
1746
|
-
export const deserializeAws_restJson1CreateHostedConfigurationVersionCommand = async (
|
|
1747
|
-
output: __HttpResponse,
|
|
1748
|
-
context: __SerdeContext
|
|
1749
|
-
): Promise<CreateHostedConfigurationVersionCommandOutput> => {
|
|
1750
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
1751
|
-
return deserializeAws_restJson1CreateHostedConfigurationVersionCommandError(output, context);
|
|
1752
|
-
}
|
|
1753
|
-
const contents: CreateHostedConfigurationVersionCommandOutput = {
|
|
1754
|
-
$metadata: deserializeMetadata(output),
|
|
1755
|
-
ApplicationId: undefined,
|
|
1756
|
-
ConfigurationProfileId: undefined,
|
|
1757
|
-
Content: undefined,
|
|
1758
|
-
ContentType: undefined,
|
|
1759
|
-
Description: undefined,
|
|
1760
|
-
VersionNumber: undefined,
|
|
1761
|
-
};
|
|
1762
|
-
if (output.headers["application-id"] !== undefined) {
|
|
1763
|
-
contents.ApplicationId = output.headers["application-id"];
|
|
1764
|
-
}
|
|
1765
|
-
if (output.headers["configuration-profile-id"] !== undefined) {
|
|
1766
|
-
contents.ConfigurationProfileId = output.headers["configuration-profile-id"];
|
|
1767
|
-
}
|
|
1768
|
-
if (output.headers["version-number"] !== undefined) {
|
|
1769
|
-
contents.VersionNumber = __strictParseInt32(output.headers["version-number"]);
|
|
1770
|
-
}
|
|
1771
|
-
if (output.headers["description"] !== undefined) {
|
|
1772
|
-
contents.Description = output.headers["description"];
|
|
1773
|
-
}
|
|
1774
|
-
if (output.headers["content-type"] !== undefined) {
|
|
1775
|
-
contents.ContentType = output.headers["content-type"];
|
|
1776
|
-
}
|
|
1777
|
-
const data: any = await collectBody(output.body, context);
|
|
1778
|
-
contents.Content = data;
|
|
1779
|
-
return Promise.resolve(contents);
|
|
1780
|
-
};
|
|
1781
|
-
|
|
1782
|
-
const deserializeAws_restJson1CreateHostedConfigurationVersionCommandError = async (
|
|
1783
|
-
output: __HttpResponse,
|
|
1784
|
-
context: __SerdeContext
|
|
1785
|
-
): Promise<CreateHostedConfigurationVersionCommandOutput> => {
|
|
1786
|
-
const parsedOutput: any = {
|
|
1787
|
-
...output,
|
|
1788
|
-
body: await parseBody(output.body, context),
|
|
1789
|
-
};
|
|
1790
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1791
|
-
let errorCode = "UnknownError";
|
|
1792
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1793
|
-
switch (errorCode) {
|
|
1794
|
-
case "BadRequestException":
|
|
1795
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
1796
|
-
response = {
|
|
1797
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1798
|
-
name: errorCode,
|
|
1799
|
-
$metadata: deserializeMetadata(output),
|
|
1800
|
-
};
|
|
1801
|
-
break;
|
|
1802
|
-
case "ConflictException":
|
|
1803
|
-
case "com.amazonaws.appconfig#ConflictException":
|
|
1804
|
-
response = {
|
|
1805
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
1806
|
-
name: errorCode,
|
|
1807
|
-
$metadata: deserializeMetadata(output),
|
|
1808
|
-
};
|
|
1809
|
-
break;
|
|
1810
|
-
case "InternalServerException":
|
|
1811
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
1812
|
-
response = {
|
|
1813
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1814
|
-
name: errorCode,
|
|
1815
|
-
$metadata: deserializeMetadata(output),
|
|
1816
|
-
};
|
|
1817
|
-
break;
|
|
1818
|
-
case "PayloadTooLargeException":
|
|
1819
|
-
case "com.amazonaws.appconfig#PayloadTooLargeException":
|
|
1820
|
-
response = {
|
|
1821
|
-
...(await deserializeAws_restJson1PayloadTooLargeExceptionResponse(parsedOutput, context)),
|
|
1822
|
-
name: errorCode,
|
|
1823
|
-
$metadata: deserializeMetadata(output),
|
|
1824
|
-
};
|
|
1825
|
-
break;
|
|
1826
|
-
case "ResourceNotFoundException":
|
|
1827
|
-
case "com.amazonaws.appconfig#ResourceNotFoundException":
|
|
1828
|
-
response = {
|
|
1829
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1830
|
-
name: errorCode,
|
|
1831
|
-
$metadata: deserializeMetadata(output),
|
|
1832
|
-
};
|
|
1833
|
-
break;
|
|
1834
|
-
case "ServiceQuotaExceededException":
|
|
1835
|
-
case "com.amazonaws.appconfig#ServiceQuotaExceededException":
|
|
1836
|
-
response = {
|
|
1837
|
-
...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
1838
|
-
name: errorCode,
|
|
1839
|
-
$metadata: deserializeMetadata(output),
|
|
1840
|
-
};
|
|
1841
|
-
break;
|
|
1842
|
-
default:
|
|
1843
|
-
const parsedBody = parsedOutput.body;
|
|
1844
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1845
|
-
response = {
|
|
1846
|
-
...parsedBody,
|
|
1847
|
-
name: `${errorCode}`,
|
|
1848
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1849
|
-
$fault: "client",
|
|
1850
|
-
$metadata: deserializeMetadata(output),
|
|
1851
|
-
} as any;
|
|
1852
|
-
}
|
|
1853
|
-
const message = response.message || response.Message || errorCode;
|
|
1854
|
-
response.message = message;
|
|
1855
|
-
delete response.Message;
|
|
1856
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1857
|
-
};
|
|
1858
|
-
|
|
1859
|
-
export const deserializeAws_restJson1DeleteApplicationCommand = async (
|
|
1860
|
-
output: __HttpResponse,
|
|
1861
|
-
context: __SerdeContext
|
|
1862
|
-
): Promise<DeleteApplicationCommandOutput> => {
|
|
1863
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1864
|
-
return deserializeAws_restJson1DeleteApplicationCommandError(output, context);
|
|
1865
|
-
}
|
|
1866
|
-
const contents: DeleteApplicationCommandOutput = {
|
|
1867
|
-
$metadata: deserializeMetadata(output),
|
|
1868
|
-
};
|
|
1869
|
-
await collectBody(output.body, context);
|
|
1870
|
-
return Promise.resolve(contents);
|
|
1871
|
-
};
|
|
1872
|
-
|
|
1873
|
-
const deserializeAws_restJson1DeleteApplicationCommandError = async (
|
|
1874
|
-
output: __HttpResponse,
|
|
1875
|
-
context: __SerdeContext
|
|
1876
|
-
): Promise<DeleteApplicationCommandOutput> => {
|
|
1877
|
-
const parsedOutput: any = {
|
|
1878
|
-
...output,
|
|
1879
|
-
body: await parseBody(output.body, context),
|
|
1880
|
-
};
|
|
1881
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1882
|
-
let errorCode = "UnknownError";
|
|
1883
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1884
|
-
switch (errorCode) {
|
|
1885
|
-
case "BadRequestException":
|
|
1886
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
1887
|
-
response = {
|
|
1888
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1889
|
-
name: errorCode,
|
|
1890
|
-
$metadata: deserializeMetadata(output),
|
|
1891
|
-
};
|
|
1892
|
-
break;
|
|
1893
|
-
case "InternalServerException":
|
|
1894
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
1895
|
-
response = {
|
|
1896
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1897
|
-
name: errorCode,
|
|
1898
|
-
$metadata: deserializeMetadata(output),
|
|
1899
|
-
};
|
|
1900
|
-
break;
|
|
1901
|
-
case "ResourceNotFoundException":
|
|
1902
|
-
case "com.amazonaws.appconfig#ResourceNotFoundException":
|
|
1903
|
-
response = {
|
|
1904
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1905
|
-
name: errorCode,
|
|
1906
|
-
$metadata: deserializeMetadata(output),
|
|
1907
|
-
};
|
|
1908
|
-
break;
|
|
1909
|
-
default:
|
|
1910
|
-
const parsedBody = parsedOutput.body;
|
|
1911
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1912
|
-
response = {
|
|
1913
|
-
...parsedBody,
|
|
1914
|
-
name: `${errorCode}`,
|
|
1915
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1916
|
-
$fault: "client",
|
|
1917
|
-
$metadata: deserializeMetadata(output),
|
|
1918
|
-
} as any;
|
|
1919
|
-
}
|
|
1920
|
-
const message = response.message || response.Message || errorCode;
|
|
1921
|
-
response.message = message;
|
|
1922
|
-
delete response.Message;
|
|
1923
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1924
|
-
};
|
|
1925
|
-
|
|
1926
|
-
export const deserializeAws_restJson1DeleteConfigurationProfileCommand = async (
|
|
1927
|
-
output: __HttpResponse,
|
|
1928
|
-
context: __SerdeContext
|
|
1929
|
-
): Promise<DeleteConfigurationProfileCommandOutput> => {
|
|
1930
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1931
|
-
return deserializeAws_restJson1DeleteConfigurationProfileCommandError(output, context);
|
|
1932
|
-
}
|
|
1933
|
-
const contents: DeleteConfigurationProfileCommandOutput = {
|
|
1934
|
-
$metadata: deserializeMetadata(output),
|
|
1935
|
-
};
|
|
1936
|
-
await collectBody(output.body, context);
|
|
1937
|
-
return Promise.resolve(contents);
|
|
1938
|
-
};
|
|
1939
|
-
|
|
1940
|
-
const deserializeAws_restJson1DeleteConfigurationProfileCommandError = async (
|
|
1941
|
-
output: __HttpResponse,
|
|
1942
|
-
context: __SerdeContext
|
|
1943
|
-
): Promise<DeleteConfigurationProfileCommandOutput> => {
|
|
1944
|
-
const parsedOutput: any = {
|
|
1945
|
-
...output,
|
|
1946
|
-
body: await parseBody(output.body, context),
|
|
1947
|
-
};
|
|
1948
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1949
|
-
let errorCode = "UnknownError";
|
|
1950
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1951
|
-
switch (errorCode) {
|
|
1952
|
-
case "BadRequestException":
|
|
1953
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
1954
|
-
response = {
|
|
1955
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1956
|
-
name: errorCode,
|
|
1957
|
-
$metadata: deserializeMetadata(output),
|
|
1958
|
-
};
|
|
1959
|
-
break;
|
|
1960
|
-
case "ConflictException":
|
|
1961
|
-
case "com.amazonaws.appconfig#ConflictException":
|
|
1962
|
-
response = {
|
|
1963
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
1964
|
-
name: errorCode,
|
|
1965
|
-
$metadata: deserializeMetadata(output),
|
|
1966
|
-
};
|
|
1967
|
-
break;
|
|
1968
|
-
case "InternalServerException":
|
|
1969
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
1970
|
-
response = {
|
|
1971
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1972
|
-
name: errorCode,
|
|
1973
|
-
$metadata: deserializeMetadata(output),
|
|
1974
|
-
};
|
|
1975
|
-
break;
|
|
1976
|
-
case "ResourceNotFoundException":
|
|
1977
|
-
case "com.amazonaws.appconfig#ResourceNotFoundException":
|
|
1978
|
-
response = {
|
|
1979
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1980
|
-
name: errorCode,
|
|
1981
|
-
$metadata: deserializeMetadata(output),
|
|
1982
|
-
};
|
|
1983
|
-
break;
|
|
1984
|
-
default:
|
|
1985
|
-
const parsedBody = parsedOutput.body;
|
|
1986
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1987
|
-
response = {
|
|
1988
|
-
...parsedBody,
|
|
1989
|
-
name: `${errorCode}`,
|
|
1990
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1991
|
-
$fault: "client",
|
|
1992
|
-
$metadata: deserializeMetadata(output),
|
|
1993
|
-
} as any;
|
|
1994
|
-
}
|
|
1995
|
-
const message = response.message || response.Message || errorCode;
|
|
1996
|
-
response.message = message;
|
|
1997
|
-
delete response.Message;
|
|
1998
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1999
|
-
};
|
|
2000
|
-
|
|
2001
|
-
export const deserializeAws_restJson1DeleteDeploymentStrategyCommand = async (
|
|
2002
|
-
output: __HttpResponse,
|
|
2003
|
-
context: __SerdeContext
|
|
2004
|
-
): Promise<DeleteDeploymentStrategyCommandOutput> => {
|
|
2005
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
2006
|
-
return deserializeAws_restJson1DeleteDeploymentStrategyCommandError(output, context);
|
|
2007
|
-
}
|
|
2008
|
-
const contents: DeleteDeploymentStrategyCommandOutput = {
|
|
2009
|
-
$metadata: deserializeMetadata(output),
|
|
2010
|
-
};
|
|
2011
|
-
await collectBody(output.body, context);
|
|
2012
|
-
return Promise.resolve(contents);
|
|
2013
|
-
};
|
|
2014
|
-
|
|
2015
|
-
const deserializeAws_restJson1DeleteDeploymentStrategyCommandError = async (
|
|
2016
|
-
output: __HttpResponse,
|
|
2017
|
-
context: __SerdeContext
|
|
2018
|
-
): Promise<DeleteDeploymentStrategyCommandOutput> => {
|
|
2019
|
-
const parsedOutput: any = {
|
|
2020
|
-
...output,
|
|
2021
|
-
body: await parseBody(output.body, context),
|
|
2022
|
-
};
|
|
2023
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2024
|
-
let errorCode = "UnknownError";
|
|
2025
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2026
|
-
switch (errorCode) {
|
|
2027
|
-
case "BadRequestException":
|
|
2028
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
2029
|
-
response = {
|
|
2030
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2031
|
-
name: errorCode,
|
|
2032
|
-
$metadata: deserializeMetadata(output),
|
|
2033
|
-
};
|
|
2034
|
-
break;
|
|
2035
|
-
case "InternalServerException":
|
|
2036
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
2037
|
-
response = {
|
|
2038
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2039
|
-
name: errorCode,
|
|
2040
|
-
$metadata: deserializeMetadata(output),
|
|
2041
|
-
};
|
|
2042
|
-
break;
|
|
2043
|
-
case "ResourceNotFoundException":
|
|
2044
|
-
case "com.amazonaws.appconfig#ResourceNotFoundException":
|
|
2045
|
-
response = {
|
|
2046
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2047
|
-
name: errorCode,
|
|
2048
|
-
$metadata: deserializeMetadata(output),
|
|
2049
|
-
};
|
|
2050
|
-
break;
|
|
2051
|
-
default:
|
|
2052
|
-
const parsedBody = parsedOutput.body;
|
|
2053
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2054
|
-
response = {
|
|
2055
|
-
...parsedBody,
|
|
2056
|
-
name: `${errorCode}`,
|
|
2057
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2058
|
-
$fault: "client",
|
|
2059
|
-
$metadata: deserializeMetadata(output),
|
|
2060
|
-
} as any;
|
|
2061
|
-
}
|
|
2062
|
-
const message = response.message || response.Message || errorCode;
|
|
2063
|
-
response.message = message;
|
|
2064
|
-
delete response.Message;
|
|
2065
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2066
|
-
};
|
|
2067
|
-
|
|
2068
|
-
export const deserializeAws_restJson1DeleteEnvironmentCommand = async (
|
|
2069
|
-
output: __HttpResponse,
|
|
2070
|
-
context: __SerdeContext
|
|
2071
|
-
): Promise<DeleteEnvironmentCommandOutput> => {
|
|
2072
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
2073
|
-
return deserializeAws_restJson1DeleteEnvironmentCommandError(output, context);
|
|
2074
|
-
}
|
|
2075
|
-
const contents: DeleteEnvironmentCommandOutput = {
|
|
2076
|
-
$metadata: deserializeMetadata(output),
|
|
2077
|
-
};
|
|
2078
|
-
await collectBody(output.body, context);
|
|
2079
|
-
return Promise.resolve(contents);
|
|
2080
|
-
};
|
|
2081
|
-
|
|
2082
|
-
const deserializeAws_restJson1DeleteEnvironmentCommandError = async (
|
|
2083
|
-
output: __HttpResponse,
|
|
2084
|
-
context: __SerdeContext
|
|
2085
|
-
): Promise<DeleteEnvironmentCommandOutput> => {
|
|
2086
|
-
const parsedOutput: any = {
|
|
2087
|
-
...output,
|
|
2088
|
-
body: await parseBody(output.body, context),
|
|
2089
|
-
};
|
|
2090
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2091
|
-
let errorCode = "UnknownError";
|
|
2092
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2093
|
-
switch (errorCode) {
|
|
2094
|
-
case "BadRequestException":
|
|
2095
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
2096
|
-
response = {
|
|
2097
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2098
|
-
name: errorCode,
|
|
2099
|
-
$metadata: deserializeMetadata(output),
|
|
2100
|
-
};
|
|
2101
|
-
break;
|
|
2102
|
-
case "ConflictException":
|
|
2103
|
-
case "com.amazonaws.appconfig#ConflictException":
|
|
2104
|
-
response = {
|
|
2105
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
2106
|
-
name: errorCode,
|
|
2107
|
-
$metadata: deserializeMetadata(output),
|
|
2108
|
-
};
|
|
2109
|
-
break;
|
|
2110
|
-
case "InternalServerException":
|
|
2111
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
2112
|
-
response = {
|
|
2113
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2114
|
-
name: errorCode,
|
|
2115
|
-
$metadata: deserializeMetadata(output),
|
|
2116
|
-
};
|
|
2117
|
-
break;
|
|
2118
|
-
case "ResourceNotFoundException":
|
|
2119
|
-
case "com.amazonaws.appconfig#ResourceNotFoundException":
|
|
2120
|
-
response = {
|
|
2121
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2122
|
-
name: errorCode,
|
|
2123
|
-
$metadata: deserializeMetadata(output),
|
|
2124
|
-
};
|
|
2125
|
-
break;
|
|
2126
|
-
default:
|
|
2127
|
-
const parsedBody = parsedOutput.body;
|
|
2128
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2129
|
-
response = {
|
|
2130
|
-
...parsedBody,
|
|
2131
|
-
name: `${errorCode}`,
|
|
2132
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2133
|
-
$fault: "client",
|
|
2134
|
-
$metadata: deserializeMetadata(output),
|
|
2135
|
-
} as any;
|
|
2136
|
-
}
|
|
2137
|
-
const message = response.message || response.Message || errorCode;
|
|
2138
|
-
response.message = message;
|
|
2139
|
-
delete response.Message;
|
|
2140
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2141
|
-
};
|
|
2142
|
-
|
|
2143
|
-
export const deserializeAws_restJson1DeleteHostedConfigurationVersionCommand = async (
|
|
2144
|
-
output: __HttpResponse,
|
|
2145
|
-
context: __SerdeContext
|
|
2146
|
-
): Promise<DeleteHostedConfigurationVersionCommandOutput> => {
|
|
2147
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
2148
|
-
return deserializeAws_restJson1DeleteHostedConfigurationVersionCommandError(output, context);
|
|
2149
|
-
}
|
|
2150
|
-
const contents: DeleteHostedConfigurationVersionCommandOutput = {
|
|
2151
|
-
$metadata: deserializeMetadata(output),
|
|
2152
|
-
};
|
|
2153
|
-
await collectBody(output.body, context);
|
|
2154
|
-
return Promise.resolve(contents);
|
|
2155
|
-
};
|
|
2156
|
-
|
|
2157
|
-
const deserializeAws_restJson1DeleteHostedConfigurationVersionCommandError = async (
|
|
2158
|
-
output: __HttpResponse,
|
|
2159
|
-
context: __SerdeContext
|
|
2160
|
-
): Promise<DeleteHostedConfigurationVersionCommandOutput> => {
|
|
2161
|
-
const parsedOutput: any = {
|
|
2162
|
-
...output,
|
|
2163
|
-
body: await parseBody(output.body, context),
|
|
2164
|
-
};
|
|
2165
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2166
|
-
let errorCode = "UnknownError";
|
|
2167
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2168
|
-
switch (errorCode) {
|
|
2169
|
-
case "BadRequestException":
|
|
2170
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
2171
|
-
response = {
|
|
2172
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2173
|
-
name: errorCode,
|
|
2174
|
-
$metadata: deserializeMetadata(output),
|
|
2175
|
-
};
|
|
2176
|
-
break;
|
|
2177
|
-
case "InternalServerException":
|
|
2178
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
2179
|
-
response = {
|
|
2180
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2181
|
-
name: errorCode,
|
|
2182
|
-
$metadata: deserializeMetadata(output),
|
|
2183
|
-
};
|
|
2184
|
-
break;
|
|
2185
|
-
case "ResourceNotFoundException":
|
|
2186
|
-
case "com.amazonaws.appconfig#ResourceNotFoundException":
|
|
2187
|
-
response = {
|
|
2188
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2189
|
-
name: errorCode,
|
|
2190
|
-
$metadata: deserializeMetadata(output),
|
|
2191
|
-
};
|
|
2192
|
-
break;
|
|
2193
|
-
default:
|
|
2194
|
-
const parsedBody = parsedOutput.body;
|
|
2195
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2196
|
-
response = {
|
|
2197
|
-
...parsedBody,
|
|
2198
|
-
name: `${errorCode}`,
|
|
2199
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2200
|
-
$fault: "client",
|
|
2201
|
-
$metadata: deserializeMetadata(output),
|
|
2202
|
-
} as any;
|
|
2203
|
-
}
|
|
2204
|
-
const message = response.message || response.Message || errorCode;
|
|
2205
|
-
response.message = message;
|
|
2206
|
-
delete response.Message;
|
|
2207
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2208
|
-
};
|
|
2209
|
-
|
|
2210
|
-
export const deserializeAws_restJson1GetApplicationCommand = async (
|
|
2211
|
-
output: __HttpResponse,
|
|
2212
|
-
context: __SerdeContext
|
|
2213
|
-
): Promise<GetApplicationCommandOutput> => {
|
|
2214
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2215
|
-
return deserializeAws_restJson1GetApplicationCommandError(output, context);
|
|
2216
|
-
}
|
|
2217
|
-
const contents: GetApplicationCommandOutput = {
|
|
2218
|
-
$metadata: deserializeMetadata(output),
|
|
2219
|
-
Description: undefined,
|
|
2220
|
-
Id: undefined,
|
|
2221
|
-
Name: undefined,
|
|
2222
|
-
};
|
|
2223
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2224
|
-
if (data.Description !== undefined && data.Description !== null) {
|
|
2225
|
-
contents.Description = __expectString(data.Description);
|
|
2226
|
-
}
|
|
2227
|
-
if (data.Id !== undefined && data.Id !== null) {
|
|
2228
|
-
contents.Id = __expectString(data.Id);
|
|
2229
|
-
}
|
|
2230
|
-
if (data.Name !== undefined && data.Name !== null) {
|
|
2231
|
-
contents.Name = __expectString(data.Name);
|
|
2232
|
-
}
|
|
2233
|
-
return Promise.resolve(contents);
|
|
2234
|
-
};
|
|
2235
|
-
|
|
2236
|
-
const deserializeAws_restJson1GetApplicationCommandError = async (
|
|
2237
|
-
output: __HttpResponse,
|
|
2238
|
-
context: __SerdeContext
|
|
2239
|
-
): Promise<GetApplicationCommandOutput> => {
|
|
2240
|
-
const parsedOutput: any = {
|
|
2241
|
-
...output,
|
|
2242
|
-
body: await parseBody(output.body, context),
|
|
2243
|
-
};
|
|
2244
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2245
|
-
let errorCode = "UnknownError";
|
|
2246
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2247
|
-
switch (errorCode) {
|
|
2248
|
-
case "BadRequestException":
|
|
2249
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
2250
|
-
response = {
|
|
2251
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2252
|
-
name: errorCode,
|
|
2253
|
-
$metadata: deserializeMetadata(output),
|
|
2254
|
-
};
|
|
2255
|
-
break;
|
|
2256
|
-
case "InternalServerException":
|
|
2257
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
2258
|
-
response = {
|
|
2259
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2260
|
-
name: errorCode,
|
|
2261
|
-
$metadata: deserializeMetadata(output),
|
|
2262
|
-
};
|
|
2263
|
-
break;
|
|
2264
|
-
case "ResourceNotFoundException":
|
|
2265
|
-
case "com.amazonaws.appconfig#ResourceNotFoundException":
|
|
2266
|
-
response = {
|
|
2267
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2268
|
-
name: errorCode,
|
|
2269
|
-
$metadata: deserializeMetadata(output),
|
|
2270
|
-
};
|
|
2271
|
-
break;
|
|
2272
|
-
default:
|
|
2273
|
-
const parsedBody = parsedOutput.body;
|
|
2274
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2275
|
-
response = {
|
|
2276
|
-
...parsedBody,
|
|
2277
|
-
name: `${errorCode}`,
|
|
2278
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2279
|
-
$fault: "client",
|
|
2280
|
-
$metadata: deserializeMetadata(output),
|
|
2281
|
-
} as any;
|
|
2282
|
-
}
|
|
2283
|
-
const message = response.message || response.Message || errorCode;
|
|
2284
|
-
response.message = message;
|
|
2285
|
-
delete response.Message;
|
|
2286
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2287
|
-
};
|
|
2288
|
-
|
|
2289
|
-
export const deserializeAws_restJson1GetConfigurationCommand = async (
|
|
2290
|
-
output: __HttpResponse,
|
|
2291
|
-
context: __SerdeContext
|
|
2292
|
-
): Promise<GetConfigurationCommandOutput> => {
|
|
2293
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2294
|
-
return deserializeAws_restJson1GetConfigurationCommandError(output, context);
|
|
2295
|
-
}
|
|
2296
|
-
const contents: GetConfigurationCommandOutput = {
|
|
2297
|
-
$metadata: deserializeMetadata(output),
|
|
2298
|
-
ConfigurationVersion: undefined,
|
|
2299
|
-
Content: undefined,
|
|
2300
|
-
ContentType: undefined,
|
|
2301
|
-
};
|
|
2302
|
-
if (output.headers["configuration-version"] !== undefined) {
|
|
2303
|
-
contents.ConfigurationVersion = output.headers["configuration-version"];
|
|
2304
|
-
}
|
|
2305
|
-
if (output.headers["content-type"] !== undefined) {
|
|
2306
|
-
contents.ContentType = output.headers["content-type"];
|
|
2307
|
-
}
|
|
2308
|
-
const data: any = await collectBody(output.body, context);
|
|
2309
|
-
contents.Content = data;
|
|
2310
|
-
return Promise.resolve(contents);
|
|
2311
|
-
};
|
|
2312
|
-
|
|
2313
|
-
const deserializeAws_restJson1GetConfigurationCommandError = async (
|
|
2314
|
-
output: __HttpResponse,
|
|
2315
|
-
context: __SerdeContext
|
|
2316
|
-
): Promise<GetConfigurationCommandOutput> => {
|
|
2317
|
-
const parsedOutput: any = {
|
|
2318
|
-
...output,
|
|
2319
|
-
body: await parseBody(output.body, context),
|
|
2320
|
-
};
|
|
2321
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2322
|
-
let errorCode = "UnknownError";
|
|
2323
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2324
|
-
switch (errorCode) {
|
|
2325
|
-
case "BadRequestException":
|
|
2326
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
2327
|
-
response = {
|
|
2328
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2329
|
-
name: errorCode,
|
|
2330
|
-
$metadata: deserializeMetadata(output),
|
|
2331
|
-
};
|
|
2332
|
-
break;
|
|
2333
|
-
case "InternalServerException":
|
|
2334
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
2335
|
-
response = {
|
|
2336
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2337
|
-
name: errorCode,
|
|
2338
|
-
$metadata: deserializeMetadata(output),
|
|
2339
|
-
};
|
|
2340
|
-
break;
|
|
2341
|
-
case "ResourceNotFoundException":
|
|
2342
|
-
case "com.amazonaws.appconfig#ResourceNotFoundException":
|
|
2343
|
-
response = {
|
|
2344
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2345
|
-
name: errorCode,
|
|
2346
|
-
$metadata: deserializeMetadata(output),
|
|
2347
|
-
};
|
|
2348
|
-
break;
|
|
2349
|
-
default:
|
|
2350
|
-
const parsedBody = parsedOutput.body;
|
|
2351
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2352
|
-
response = {
|
|
2353
|
-
...parsedBody,
|
|
2354
|
-
name: `${errorCode}`,
|
|
2355
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2356
|
-
$fault: "client",
|
|
2357
|
-
$metadata: deserializeMetadata(output),
|
|
2358
|
-
} as any;
|
|
2359
|
-
}
|
|
2360
|
-
const message = response.message || response.Message || errorCode;
|
|
2361
|
-
response.message = message;
|
|
2362
|
-
delete response.Message;
|
|
2363
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2364
|
-
};
|
|
2365
|
-
|
|
2366
|
-
export const deserializeAws_restJson1GetConfigurationProfileCommand = async (
|
|
2367
|
-
output: __HttpResponse,
|
|
2368
|
-
context: __SerdeContext
|
|
2369
|
-
): Promise<GetConfigurationProfileCommandOutput> => {
|
|
2370
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2371
|
-
return deserializeAws_restJson1GetConfigurationProfileCommandError(output, context);
|
|
2372
|
-
}
|
|
2373
|
-
const contents: GetConfigurationProfileCommandOutput = {
|
|
2374
|
-
$metadata: deserializeMetadata(output),
|
|
2375
|
-
ApplicationId: undefined,
|
|
2376
|
-
Description: undefined,
|
|
2377
|
-
Id: undefined,
|
|
2378
|
-
LocationUri: undefined,
|
|
2379
|
-
Name: undefined,
|
|
2380
|
-
RetrievalRoleArn: undefined,
|
|
2381
|
-
Validators: undefined,
|
|
2382
|
-
};
|
|
2383
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2384
|
-
if (data.ApplicationId !== undefined && data.ApplicationId !== null) {
|
|
2385
|
-
contents.ApplicationId = __expectString(data.ApplicationId);
|
|
2386
|
-
}
|
|
2387
|
-
if (data.Description !== undefined && data.Description !== null) {
|
|
2388
|
-
contents.Description = __expectString(data.Description);
|
|
2389
|
-
}
|
|
2390
|
-
if (data.Id !== undefined && data.Id !== null) {
|
|
2391
|
-
contents.Id = __expectString(data.Id);
|
|
2392
|
-
}
|
|
2393
|
-
if (data.LocationUri !== undefined && data.LocationUri !== null) {
|
|
2394
|
-
contents.LocationUri = __expectString(data.LocationUri);
|
|
2395
|
-
}
|
|
2396
|
-
if (data.Name !== undefined && data.Name !== null) {
|
|
2397
|
-
contents.Name = __expectString(data.Name);
|
|
2398
|
-
}
|
|
2399
|
-
if (data.RetrievalRoleArn !== undefined && data.RetrievalRoleArn !== null) {
|
|
2400
|
-
contents.RetrievalRoleArn = __expectString(data.RetrievalRoleArn);
|
|
2401
|
-
}
|
|
2402
|
-
if (data.Validators !== undefined && data.Validators !== null) {
|
|
2403
|
-
contents.Validators = deserializeAws_restJson1ValidatorList(data.Validators, context);
|
|
2404
|
-
}
|
|
2405
|
-
return Promise.resolve(contents);
|
|
2406
|
-
};
|
|
2407
|
-
|
|
2408
|
-
const deserializeAws_restJson1GetConfigurationProfileCommandError = async (
|
|
2409
|
-
output: __HttpResponse,
|
|
2410
|
-
context: __SerdeContext
|
|
2411
|
-
): Promise<GetConfigurationProfileCommandOutput> => {
|
|
2412
|
-
const parsedOutput: any = {
|
|
2413
|
-
...output,
|
|
2414
|
-
body: await parseBody(output.body, context),
|
|
2415
|
-
};
|
|
2416
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2417
|
-
let errorCode = "UnknownError";
|
|
2418
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2419
|
-
switch (errorCode) {
|
|
2420
|
-
case "BadRequestException":
|
|
2421
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
2422
|
-
response = {
|
|
2423
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2424
|
-
name: errorCode,
|
|
2425
|
-
$metadata: deserializeMetadata(output),
|
|
2426
|
-
};
|
|
2427
|
-
break;
|
|
2428
|
-
case "InternalServerException":
|
|
2429
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
2430
|
-
response = {
|
|
2431
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2432
|
-
name: errorCode,
|
|
2433
|
-
$metadata: deserializeMetadata(output),
|
|
2434
|
-
};
|
|
2435
|
-
break;
|
|
2436
|
-
case "ResourceNotFoundException":
|
|
2437
|
-
case "com.amazonaws.appconfig#ResourceNotFoundException":
|
|
2438
|
-
response = {
|
|
2439
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2440
|
-
name: errorCode,
|
|
2441
|
-
$metadata: deserializeMetadata(output),
|
|
2442
|
-
};
|
|
2443
|
-
break;
|
|
2444
|
-
default:
|
|
2445
|
-
const parsedBody = parsedOutput.body;
|
|
2446
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2447
|
-
response = {
|
|
2448
|
-
...parsedBody,
|
|
2449
|
-
name: `${errorCode}`,
|
|
2450
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2451
|
-
$fault: "client",
|
|
2452
|
-
$metadata: deserializeMetadata(output),
|
|
2453
|
-
} as any;
|
|
2454
|
-
}
|
|
2455
|
-
const message = response.message || response.Message || errorCode;
|
|
2456
|
-
response.message = message;
|
|
2457
|
-
delete response.Message;
|
|
2458
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2459
|
-
};
|
|
2460
|
-
|
|
2461
|
-
export const deserializeAws_restJson1GetDeploymentCommand = async (
|
|
2462
|
-
output: __HttpResponse,
|
|
2463
|
-
context: __SerdeContext
|
|
2464
|
-
): Promise<GetDeploymentCommandOutput> => {
|
|
2465
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2466
|
-
return deserializeAws_restJson1GetDeploymentCommandError(output, context);
|
|
2467
|
-
}
|
|
2468
|
-
const contents: GetDeploymentCommandOutput = {
|
|
2469
|
-
$metadata: deserializeMetadata(output),
|
|
2470
|
-
ApplicationId: undefined,
|
|
2471
|
-
CompletedAt: undefined,
|
|
2472
|
-
ConfigurationLocationUri: undefined,
|
|
2473
|
-
ConfigurationName: undefined,
|
|
2474
|
-
ConfigurationProfileId: undefined,
|
|
2475
|
-
ConfigurationVersion: undefined,
|
|
2476
|
-
DeploymentDurationInMinutes: undefined,
|
|
2477
|
-
DeploymentNumber: undefined,
|
|
2478
|
-
DeploymentStrategyId: undefined,
|
|
2479
|
-
Description: undefined,
|
|
2480
|
-
EnvironmentId: undefined,
|
|
2481
|
-
EventLog: undefined,
|
|
2482
|
-
FinalBakeTimeInMinutes: undefined,
|
|
2483
|
-
GrowthFactor: undefined,
|
|
2484
|
-
GrowthType: undefined,
|
|
2485
|
-
PercentageComplete: undefined,
|
|
2486
|
-
StartedAt: undefined,
|
|
2487
|
-
State: undefined,
|
|
2488
|
-
};
|
|
2489
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2490
|
-
if (data.ApplicationId !== undefined && data.ApplicationId !== null) {
|
|
2491
|
-
contents.ApplicationId = __expectString(data.ApplicationId);
|
|
2492
|
-
}
|
|
2493
|
-
if (data.CompletedAt !== undefined && data.CompletedAt !== null) {
|
|
2494
|
-
contents.CompletedAt = __expectNonNull(__parseRfc3339DateTime(data.CompletedAt));
|
|
2495
|
-
}
|
|
2496
|
-
if (data.ConfigurationLocationUri !== undefined && data.ConfigurationLocationUri !== null) {
|
|
2497
|
-
contents.ConfigurationLocationUri = __expectString(data.ConfigurationLocationUri);
|
|
2498
|
-
}
|
|
2499
|
-
if (data.ConfigurationName !== undefined && data.ConfigurationName !== null) {
|
|
2500
|
-
contents.ConfigurationName = __expectString(data.ConfigurationName);
|
|
2501
|
-
}
|
|
2502
|
-
if (data.ConfigurationProfileId !== undefined && data.ConfigurationProfileId !== null) {
|
|
2503
|
-
contents.ConfigurationProfileId = __expectString(data.ConfigurationProfileId);
|
|
2504
|
-
}
|
|
2505
|
-
if (data.ConfigurationVersion !== undefined && data.ConfigurationVersion !== null) {
|
|
2506
|
-
contents.ConfigurationVersion = __expectString(data.ConfigurationVersion);
|
|
2507
|
-
}
|
|
2508
|
-
if (data.DeploymentDurationInMinutes !== undefined && data.DeploymentDurationInMinutes !== null) {
|
|
2509
|
-
contents.DeploymentDurationInMinutes = __expectInt32(data.DeploymentDurationInMinutes);
|
|
2510
|
-
}
|
|
2511
|
-
if (data.DeploymentNumber !== undefined && data.DeploymentNumber !== null) {
|
|
2512
|
-
contents.DeploymentNumber = __expectInt32(data.DeploymentNumber);
|
|
2513
|
-
}
|
|
2514
|
-
if (data.DeploymentStrategyId !== undefined && data.DeploymentStrategyId !== null) {
|
|
2515
|
-
contents.DeploymentStrategyId = __expectString(data.DeploymentStrategyId);
|
|
2516
|
-
}
|
|
2517
|
-
if (data.Description !== undefined && data.Description !== null) {
|
|
2518
|
-
contents.Description = __expectString(data.Description);
|
|
2519
|
-
}
|
|
2520
|
-
if (data.EnvironmentId !== undefined && data.EnvironmentId !== null) {
|
|
2521
|
-
contents.EnvironmentId = __expectString(data.EnvironmentId);
|
|
2522
|
-
}
|
|
2523
|
-
if (data.EventLog !== undefined && data.EventLog !== null) {
|
|
2524
|
-
contents.EventLog = deserializeAws_restJson1DeploymentEvents(data.EventLog, context);
|
|
2525
|
-
}
|
|
2526
|
-
if (data.FinalBakeTimeInMinutes !== undefined && data.FinalBakeTimeInMinutes !== null) {
|
|
2527
|
-
contents.FinalBakeTimeInMinutes = __expectInt32(data.FinalBakeTimeInMinutes);
|
|
2528
|
-
}
|
|
2529
|
-
if (data.GrowthFactor !== undefined && data.GrowthFactor !== null) {
|
|
2530
|
-
contents.GrowthFactor = __limitedParseFloat32(data.GrowthFactor);
|
|
2531
|
-
}
|
|
2532
|
-
if (data.GrowthType !== undefined && data.GrowthType !== null) {
|
|
2533
|
-
contents.GrowthType = __expectString(data.GrowthType);
|
|
2534
|
-
}
|
|
2535
|
-
if (data.PercentageComplete !== undefined && data.PercentageComplete !== null) {
|
|
2536
|
-
contents.PercentageComplete = __limitedParseFloat32(data.PercentageComplete);
|
|
2537
|
-
}
|
|
2538
|
-
if (data.StartedAt !== undefined && data.StartedAt !== null) {
|
|
2539
|
-
contents.StartedAt = __expectNonNull(__parseRfc3339DateTime(data.StartedAt));
|
|
2540
|
-
}
|
|
2541
|
-
if (data.State !== undefined && data.State !== null) {
|
|
2542
|
-
contents.State = __expectString(data.State);
|
|
2543
|
-
}
|
|
2544
|
-
return Promise.resolve(contents);
|
|
2545
|
-
};
|
|
2546
|
-
|
|
2547
|
-
const deserializeAws_restJson1GetDeploymentCommandError = async (
|
|
2548
|
-
output: __HttpResponse,
|
|
2549
|
-
context: __SerdeContext
|
|
2550
|
-
): Promise<GetDeploymentCommandOutput> => {
|
|
2551
|
-
const parsedOutput: any = {
|
|
2552
|
-
...output,
|
|
2553
|
-
body: await parseBody(output.body, context),
|
|
2554
|
-
};
|
|
2555
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2556
|
-
let errorCode = "UnknownError";
|
|
2557
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2558
|
-
switch (errorCode) {
|
|
2559
|
-
case "BadRequestException":
|
|
2560
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
2561
|
-
response = {
|
|
2562
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2563
|
-
name: errorCode,
|
|
2564
|
-
$metadata: deserializeMetadata(output),
|
|
2565
|
-
};
|
|
2566
|
-
break;
|
|
2567
|
-
case "InternalServerException":
|
|
2568
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
2569
|
-
response = {
|
|
2570
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2571
|
-
name: errorCode,
|
|
2572
|
-
$metadata: deserializeMetadata(output),
|
|
2573
|
-
};
|
|
2574
|
-
break;
|
|
2575
|
-
case "ResourceNotFoundException":
|
|
2576
|
-
case "com.amazonaws.appconfig#ResourceNotFoundException":
|
|
2577
|
-
response = {
|
|
2578
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2579
|
-
name: errorCode,
|
|
2580
|
-
$metadata: deserializeMetadata(output),
|
|
2581
|
-
};
|
|
2582
|
-
break;
|
|
2583
|
-
default:
|
|
2584
|
-
const parsedBody = parsedOutput.body;
|
|
2585
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2586
|
-
response = {
|
|
2587
|
-
...parsedBody,
|
|
2588
|
-
name: `${errorCode}`,
|
|
2589
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2590
|
-
$fault: "client",
|
|
2591
|
-
$metadata: deserializeMetadata(output),
|
|
2592
|
-
} as any;
|
|
2593
|
-
}
|
|
2594
|
-
const message = response.message || response.Message || errorCode;
|
|
2595
|
-
response.message = message;
|
|
2596
|
-
delete response.Message;
|
|
2597
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2598
|
-
};
|
|
2599
|
-
|
|
2600
|
-
export const deserializeAws_restJson1GetDeploymentStrategyCommand = async (
|
|
2601
|
-
output: __HttpResponse,
|
|
2602
|
-
context: __SerdeContext
|
|
2603
|
-
): Promise<GetDeploymentStrategyCommandOutput> => {
|
|
2604
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2605
|
-
return deserializeAws_restJson1GetDeploymentStrategyCommandError(output, context);
|
|
2606
|
-
}
|
|
2607
|
-
const contents: GetDeploymentStrategyCommandOutput = {
|
|
2608
|
-
$metadata: deserializeMetadata(output),
|
|
2609
|
-
DeploymentDurationInMinutes: undefined,
|
|
2610
|
-
Description: undefined,
|
|
2611
|
-
FinalBakeTimeInMinutes: undefined,
|
|
2612
|
-
GrowthFactor: undefined,
|
|
2613
|
-
GrowthType: undefined,
|
|
2614
|
-
Id: undefined,
|
|
2615
|
-
Name: undefined,
|
|
2616
|
-
ReplicateTo: undefined,
|
|
2617
|
-
};
|
|
2618
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2619
|
-
if (data.DeploymentDurationInMinutes !== undefined && data.DeploymentDurationInMinutes !== null) {
|
|
2620
|
-
contents.DeploymentDurationInMinutes = __expectInt32(data.DeploymentDurationInMinutes);
|
|
2621
|
-
}
|
|
2622
|
-
if (data.Description !== undefined && data.Description !== null) {
|
|
2623
|
-
contents.Description = __expectString(data.Description);
|
|
2624
|
-
}
|
|
2625
|
-
if (data.FinalBakeTimeInMinutes !== undefined && data.FinalBakeTimeInMinutes !== null) {
|
|
2626
|
-
contents.FinalBakeTimeInMinutes = __expectInt32(data.FinalBakeTimeInMinutes);
|
|
2627
|
-
}
|
|
2628
|
-
if (data.GrowthFactor !== undefined && data.GrowthFactor !== null) {
|
|
2629
|
-
contents.GrowthFactor = __limitedParseFloat32(data.GrowthFactor);
|
|
2630
|
-
}
|
|
2631
|
-
if (data.GrowthType !== undefined && data.GrowthType !== null) {
|
|
2632
|
-
contents.GrowthType = __expectString(data.GrowthType);
|
|
2633
|
-
}
|
|
2634
|
-
if (data.Id !== undefined && data.Id !== null) {
|
|
2635
|
-
contents.Id = __expectString(data.Id);
|
|
2636
|
-
}
|
|
2637
|
-
if (data.Name !== undefined && data.Name !== null) {
|
|
2638
|
-
contents.Name = __expectString(data.Name);
|
|
2639
|
-
}
|
|
2640
|
-
if (data.ReplicateTo !== undefined && data.ReplicateTo !== null) {
|
|
2641
|
-
contents.ReplicateTo = __expectString(data.ReplicateTo);
|
|
2642
|
-
}
|
|
2643
|
-
return Promise.resolve(contents);
|
|
2644
|
-
};
|
|
2645
|
-
|
|
2646
|
-
const deserializeAws_restJson1GetDeploymentStrategyCommandError = async (
|
|
2647
|
-
output: __HttpResponse,
|
|
2648
|
-
context: __SerdeContext
|
|
2649
|
-
): Promise<GetDeploymentStrategyCommandOutput> => {
|
|
2650
|
-
const parsedOutput: any = {
|
|
2651
|
-
...output,
|
|
2652
|
-
body: await parseBody(output.body, context),
|
|
2653
|
-
};
|
|
2654
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2655
|
-
let errorCode = "UnknownError";
|
|
2656
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2657
|
-
switch (errorCode) {
|
|
2658
|
-
case "BadRequestException":
|
|
2659
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
2660
|
-
response = {
|
|
2661
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2662
|
-
name: errorCode,
|
|
2663
|
-
$metadata: deserializeMetadata(output),
|
|
2664
|
-
};
|
|
2665
|
-
break;
|
|
2666
|
-
case "InternalServerException":
|
|
2667
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
2668
|
-
response = {
|
|
2669
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2670
|
-
name: errorCode,
|
|
2671
|
-
$metadata: deserializeMetadata(output),
|
|
2672
|
-
};
|
|
2673
|
-
break;
|
|
2674
|
-
case "ResourceNotFoundException":
|
|
2675
|
-
case "com.amazonaws.appconfig#ResourceNotFoundException":
|
|
2676
|
-
response = {
|
|
2677
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2678
|
-
name: errorCode,
|
|
2679
|
-
$metadata: deserializeMetadata(output),
|
|
2680
|
-
};
|
|
2681
|
-
break;
|
|
2682
|
-
default:
|
|
2683
|
-
const parsedBody = parsedOutput.body;
|
|
2684
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2685
|
-
response = {
|
|
2686
|
-
...parsedBody,
|
|
2687
|
-
name: `${errorCode}`,
|
|
2688
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2689
|
-
$fault: "client",
|
|
2690
|
-
$metadata: deserializeMetadata(output),
|
|
2691
|
-
} as any;
|
|
2692
|
-
}
|
|
2693
|
-
const message = response.message || response.Message || errorCode;
|
|
2694
|
-
response.message = message;
|
|
2695
|
-
delete response.Message;
|
|
2696
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2697
|
-
};
|
|
2698
|
-
|
|
2699
|
-
export const deserializeAws_restJson1GetEnvironmentCommand = async (
|
|
2700
|
-
output: __HttpResponse,
|
|
2701
|
-
context: __SerdeContext
|
|
2702
|
-
): Promise<GetEnvironmentCommandOutput> => {
|
|
2703
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2704
|
-
return deserializeAws_restJson1GetEnvironmentCommandError(output, context);
|
|
2705
|
-
}
|
|
2706
|
-
const contents: GetEnvironmentCommandOutput = {
|
|
2707
|
-
$metadata: deserializeMetadata(output),
|
|
2708
|
-
ApplicationId: undefined,
|
|
2709
|
-
Description: undefined,
|
|
2710
|
-
Id: undefined,
|
|
2711
|
-
Monitors: undefined,
|
|
2712
|
-
Name: undefined,
|
|
2713
|
-
State: undefined,
|
|
2714
|
-
};
|
|
2715
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2716
|
-
if (data.ApplicationId !== undefined && data.ApplicationId !== null) {
|
|
2717
|
-
contents.ApplicationId = __expectString(data.ApplicationId);
|
|
2718
|
-
}
|
|
2719
|
-
if (data.Description !== undefined && data.Description !== null) {
|
|
2720
|
-
contents.Description = __expectString(data.Description);
|
|
2721
|
-
}
|
|
2722
|
-
if (data.Id !== undefined && data.Id !== null) {
|
|
2723
|
-
contents.Id = __expectString(data.Id);
|
|
2724
|
-
}
|
|
2725
|
-
if (data.Monitors !== undefined && data.Monitors !== null) {
|
|
2726
|
-
contents.Monitors = deserializeAws_restJson1MonitorList(data.Monitors, context);
|
|
2727
|
-
}
|
|
2728
|
-
if (data.Name !== undefined && data.Name !== null) {
|
|
2729
|
-
contents.Name = __expectString(data.Name);
|
|
2730
|
-
}
|
|
2731
|
-
if (data.State !== undefined && data.State !== null) {
|
|
2732
|
-
contents.State = __expectString(data.State);
|
|
2733
|
-
}
|
|
2734
|
-
return Promise.resolve(contents);
|
|
2735
|
-
};
|
|
2736
|
-
|
|
2737
|
-
const deserializeAws_restJson1GetEnvironmentCommandError = async (
|
|
2738
|
-
output: __HttpResponse,
|
|
2739
|
-
context: __SerdeContext
|
|
2740
|
-
): Promise<GetEnvironmentCommandOutput> => {
|
|
2741
|
-
const parsedOutput: any = {
|
|
2742
|
-
...output,
|
|
2743
|
-
body: await parseBody(output.body, context),
|
|
2744
|
-
};
|
|
2745
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2746
|
-
let errorCode = "UnknownError";
|
|
2747
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2748
|
-
switch (errorCode) {
|
|
2749
|
-
case "BadRequestException":
|
|
2750
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
2751
|
-
response = {
|
|
2752
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2753
|
-
name: errorCode,
|
|
2754
|
-
$metadata: deserializeMetadata(output),
|
|
2755
|
-
};
|
|
2756
|
-
break;
|
|
2757
|
-
case "InternalServerException":
|
|
2758
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
2759
|
-
response = {
|
|
2760
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2761
|
-
name: errorCode,
|
|
2762
|
-
$metadata: deserializeMetadata(output),
|
|
2763
|
-
};
|
|
2764
|
-
break;
|
|
2765
|
-
case "ResourceNotFoundException":
|
|
2766
|
-
case "com.amazonaws.appconfig#ResourceNotFoundException":
|
|
2767
|
-
response = {
|
|
2768
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2769
|
-
name: errorCode,
|
|
2770
|
-
$metadata: deserializeMetadata(output),
|
|
2771
|
-
};
|
|
2772
|
-
break;
|
|
2773
|
-
default:
|
|
2774
|
-
const parsedBody = parsedOutput.body;
|
|
2775
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2776
|
-
response = {
|
|
2777
|
-
...parsedBody,
|
|
2778
|
-
name: `${errorCode}`,
|
|
2779
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2780
|
-
$fault: "client",
|
|
2781
|
-
$metadata: deserializeMetadata(output),
|
|
2782
|
-
} as any;
|
|
2783
|
-
}
|
|
2784
|
-
const message = response.message || response.Message || errorCode;
|
|
2785
|
-
response.message = message;
|
|
2786
|
-
delete response.Message;
|
|
2787
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2788
|
-
};
|
|
2789
|
-
|
|
2790
|
-
export const deserializeAws_restJson1GetHostedConfigurationVersionCommand = async (
|
|
2791
|
-
output: __HttpResponse,
|
|
2792
|
-
context: __SerdeContext
|
|
2793
|
-
): Promise<GetHostedConfigurationVersionCommandOutput> => {
|
|
2794
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2795
|
-
return deserializeAws_restJson1GetHostedConfigurationVersionCommandError(output, context);
|
|
2796
|
-
}
|
|
2797
|
-
const contents: GetHostedConfigurationVersionCommandOutput = {
|
|
2798
|
-
$metadata: deserializeMetadata(output),
|
|
2799
|
-
ApplicationId: undefined,
|
|
2800
|
-
ConfigurationProfileId: undefined,
|
|
2801
|
-
Content: undefined,
|
|
2802
|
-
ContentType: undefined,
|
|
2803
|
-
Description: undefined,
|
|
2804
|
-
VersionNumber: undefined,
|
|
2805
|
-
};
|
|
2806
|
-
if (output.headers["application-id"] !== undefined) {
|
|
2807
|
-
contents.ApplicationId = output.headers["application-id"];
|
|
2808
|
-
}
|
|
2809
|
-
if (output.headers["configuration-profile-id"] !== undefined) {
|
|
2810
|
-
contents.ConfigurationProfileId = output.headers["configuration-profile-id"];
|
|
2811
|
-
}
|
|
2812
|
-
if (output.headers["version-number"] !== undefined) {
|
|
2813
|
-
contents.VersionNumber = __strictParseInt32(output.headers["version-number"]);
|
|
2814
|
-
}
|
|
2815
|
-
if (output.headers["description"] !== undefined) {
|
|
2816
|
-
contents.Description = output.headers["description"];
|
|
2817
|
-
}
|
|
2818
|
-
if (output.headers["content-type"] !== undefined) {
|
|
2819
|
-
contents.ContentType = output.headers["content-type"];
|
|
2820
|
-
}
|
|
2821
|
-
const data: any = await collectBody(output.body, context);
|
|
2822
|
-
contents.Content = data;
|
|
2823
|
-
return Promise.resolve(contents);
|
|
2824
|
-
};
|
|
2825
|
-
|
|
2826
|
-
const deserializeAws_restJson1GetHostedConfigurationVersionCommandError = async (
|
|
2827
|
-
output: __HttpResponse,
|
|
2828
|
-
context: __SerdeContext
|
|
2829
|
-
): Promise<GetHostedConfigurationVersionCommandOutput> => {
|
|
2830
|
-
const parsedOutput: any = {
|
|
2831
|
-
...output,
|
|
2832
|
-
body: await parseBody(output.body, context),
|
|
2833
|
-
};
|
|
2834
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2835
|
-
let errorCode = "UnknownError";
|
|
2836
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2837
|
-
switch (errorCode) {
|
|
2838
|
-
case "BadRequestException":
|
|
2839
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
2840
|
-
response = {
|
|
2841
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2842
|
-
name: errorCode,
|
|
2843
|
-
$metadata: deserializeMetadata(output),
|
|
2844
|
-
};
|
|
2845
|
-
break;
|
|
2846
|
-
case "InternalServerException":
|
|
2847
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
2848
|
-
response = {
|
|
2849
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2850
|
-
name: errorCode,
|
|
2851
|
-
$metadata: deserializeMetadata(output),
|
|
2852
|
-
};
|
|
2853
|
-
break;
|
|
2854
|
-
case "ResourceNotFoundException":
|
|
2855
|
-
case "com.amazonaws.appconfig#ResourceNotFoundException":
|
|
2856
|
-
response = {
|
|
2857
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2858
|
-
name: errorCode,
|
|
2859
|
-
$metadata: deserializeMetadata(output),
|
|
2860
|
-
};
|
|
2861
|
-
break;
|
|
2862
|
-
default:
|
|
2863
|
-
const parsedBody = parsedOutput.body;
|
|
2864
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2865
|
-
response = {
|
|
2866
|
-
...parsedBody,
|
|
2867
|
-
name: `${errorCode}`,
|
|
2868
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2869
|
-
$fault: "client",
|
|
2870
|
-
$metadata: deserializeMetadata(output),
|
|
2871
|
-
} as any;
|
|
2872
|
-
}
|
|
2873
|
-
const message = response.message || response.Message || errorCode;
|
|
2874
|
-
response.message = message;
|
|
2875
|
-
delete response.Message;
|
|
2876
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2877
|
-
};
|
|
2878
|
-
|
|
2879
|
-
export const deserializeAws_restJson1ListApplicationsCommand = async (
|
|
2880
|
-
output: __HttpResponse,
|
|
2881
|
-
context: __SerdeContext
|
|
2882
|
-
): Promise<ListApplicationsCommandOutput> => {
|
|
2883
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2884
|
-
return deserializeAws_restJson1ListApplicationsCommandError(output, context);
|
|
2885
|
-
}
|
|
2886
|
-
const contents: ListApplicationsCommandOutput = {
|
|
2887
|
-
$metadata: deserializeMetadata(output),
|
|
2888
|
-
Items: undefined,
|
|
2889
|
-
NextToken: undefined,
|
|
2890
|
-
};
|
|
2891
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2892
|
-
if (data.Items !== undefined && data.Items !== null) {
|
|
2893
|
-
contents.Items = deserializeAws_restJson1ApplicationList(data.Items, context);
|
|
2894
|
-
}
|
|
2895
|
-
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
2896
|
-
contents.NextToken = __expectString(data.NextToken);
|
|
2897
|
-
}
|
|
2898
|
-
return Promise.resolve(contents);
|
|
2899
|
-
};
|
|
2900
|
-
|
|
2901
|
-
const deserializeAws_restJson1ListApplicationsCommandError = async (
|
|
2902
|
-
output: __HttpResponse,
|
|
2903
|
-
context: __SerdeContext
|
|
2904
|
-
): Promise<ListApplicationsCommandOutput> => {
|
|
2905
|
-
const parsedOutput: any = {
|
|
2906
|
-
...output,
|
|
2907
|
-
body: await parseBody(output.body, context),
|
|
2908
|
-
};
|
|
2909
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2910
|
-
let errorCode = "UnknownError";
|
|
2911
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2912
|
-
switch (errorCode) {
|
|
2913
|
-
case "BadRequestException":
|
|
2914
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
2915
|
-
response = {
|
|
2916
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2917
|
-
name: errorCode,
|
|
2918
|
-
$metadata: deserializeMetadata(output),
|
|
2919
|
-
};
|
|
2920
|
-
break;
|
|
2921
|
-
case "InternalServerException":
|
|
2922
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
2923
|
-
response = {
|
|
2924
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2925
|
-
name: errorCode,
|
|
2926
|
-
$metadata: deserializeMetadata(output),
|
|
2927
|
-
};
|
|
2928
|
-
break;
|
|
2929
|
-
default:
|
|
2930
|
-
const parsedBody = parsedOutput.body;
|
|
2931
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2932
|
-
response = {
|
|
2933
|
-
...parsedBody,
|
|
2934
|
-
name: `${errorCode}`,
|
|
2935
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2936
|
-
$fault: "client",
|
|
2937
|
-
$metadata: deserializeMetadata(output),
|
|
2938
|
-
} as any;
|
|
2939
|
-
}
|
|
2940
|
-
const message = response.message || response.Message || errorCode;
|
|
2941
|
-
response.message = message;
|
|
2942
|
-
delete response.Message;
|
|
2943
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2944
|
-
};
|
|
2945
|
-
|
|
2946
|
-
export const deserializeAws_restJson1ListConfigurationProfilesCommand = async (
|
|
2947
|
-
output: __HttpResponse,
|
|
2948
|
-
context: __SerdeContext
|
|
2949
|
-
): Promise<ListConfigurationProfilesCommandOutput> => {
|
|
2950
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2951
|
-
return deserializeAws_restJson1ListConfigurationProfilesCommandError(output, context);
|
|
2952
|
-
}
|
|
2953
|
-
const contents: ListConfigurationProfilesCommandOutput = {
|
|
2954
|
-
$metadata: deserializeMetadata(output),
|
|
2955
|
-
Items: undefined,
|
|
2956
|
-
NextToken: undefined,
|
|
2957
|
-
};
|
|
2958
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2959
|
-
if (data.Items !== undefined && data.Items !== null) {
|
|
2960
|
-
contents.Items = deserializeAws_restJson1ConfigurationProfileSummaryList(data.Items, context);
|
|
2961
|
-
}
|
|
2962
|
-
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
2963
|
-
contents.NextToken = __expectString(data.NextToken);
|
|
2964
|
-
}
|
|
2965
|
-
return Promise.resolve(contents);
|
|
2966
|
-
};
|
|
2967
|
-
|
|
2968
|
-
const deserializeAws_restJson1ListConfigurationProfilesCommandError = async (
|
|
2969
|
-
output: __HttpResponse,
|
|
2970
|
-
context: __SerdeContext
|
|
2971
|
-
): Promise<ListConfigurationProfilesCommandOutput> => {
|
|
2972
|
-
const parsedOutput: any = {
|
|
2973
|
-
...output,
|
|
2974
|
-
body: await parseBody(output.body, context),
|
|
2975
|
-
};
|
|
2976
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2977
|
-
let errorCode = "UnknownError";
|
|
2978
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2979
|
-
switch (errorCode) {
|
|
2980
|
-
case "BadRequestException":
|
|
2981
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
2982
|
-
response = {
|
|
2983
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2984
|
-
name: errorCode,
|
|
2985
|
-
$metadata: deserializeMetadata(output),
|
|
2986
|
-
};
|
|
2987
|
-
break;
|
|
2988
|
-
case "InternalServerException":
|
|
2989
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
2990
|
-
response = {
|
|
2991
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2992
|
-
name: errorCode,
|
|
2993
|
-
$metadata: deserializeMetadata(output),
|
|
2994
|
-
};
|
|
2995
|
-
break;
|
|
2996
|
-
case "ResourceNotFoundException":
|
|
2997
|
-
case "com.amazonaws.appconfig#ResourceNotFoundException":
|
|
2998
|
-
response = {
|
|
2999
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
3000
|
-
name: errorCode,
|
|
3001
|
-
$metadata: deserializeMetadata(output),
|
|
3002
|
-
};
|
|
3003
|
-
break;
|
|
3004
|
-
default:
|
|
3005
|
-
const parsedBody = parsedOutput.body;
|
|
3006
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3007
|
-
response = {
|
|
3008
|
-
...parsedBody,
|
|
3009
|
-
name: `${errorCode}`,
|
|
3010
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3011
|
-
$fault: "client",
|
|
3012
|
-
$metadata: deserializeMetadata(output),
|
|
3013
|
-
} as any;
|
|
3014
|
-
}
|
|
3015
|
-
const message = response.message || response.Message || errorCode;
|
|
3016
|
-
response.message = message;
|
|
3017
|
-
delete response.Message;
|
|
3018
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3019
|
-
};
|
|
3020
|
-
|
|
3021
|
-
export const deserializeAws_restJson1ListDeploymentsCommand = async (
|
|
3022
|
-
output: __HttpResponse,
|
|
3023
|
-
context: __SerdeContext
|
|
3024
|
-
): Promise<ListDeploymentsCommandOutput> => {
|
|
3025
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3026
|
-
return deserializeAws_restJson1ListDeploymentsCommandError(output, context);
|
|
3027
|
-
}
|
|
3028
|
-
const contents: ListDeploymentsCommandOutput = {
|
|
3029
|
-
$metadata: deserializeMetadata(output),
|
|
3030
|
-
Items: undefined,
|
|
3031
|
-
NextToken: undefined,
|
|
3032
|
-
};
|
|
3033
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
3034
|
-
if (data.Items !== undefined && data.Items !== null) {
|
|
3035
|
-
contents.Items = deserializeAws_restJson1DeploymentList(data.Items, context);
|
|
3036
|
-
}
|
|
3037
|
-
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
3038
|
-
contents.NextToken = __expectString(data.NextToken);
|
|
3039
|
-
}
|
|
3040
|
-
return Promise.resolve(contents);
|
|
3041
|
-
};
|
|
3042
|
-
|
|
3043
|
-
const deserializeAws_restJson1ListDeploymentsCommandError = async (
|
|
3044
|
-
output: __HttpResponse,
|
|
3045
|
-
context: __SerdeContext
|
|
3046
|
-
): Promise<ListDeploymentsCommandOutput> => {
|
|
3047
|
-
const parsedOutput: any = {
|
|
3048
|
-
...output,
|
|
3049
|
-
body: await parseBody(output.body, context),
|
|
3050
|
-
};
|
|
3051
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3052
|
-
let errorCode = "UnknownError";
|
|
3053
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3054
|
-
switch (errorCode) {
|
|
3055
|
-
case "BadRequestException":
|
|
3056
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
3057
|
-
response = {
|
|
3058
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3059
|
-
name: errorCode,
|
|
3060
|
-
$metadata: deserializeMetadata(output),
|
|
3061
|
-
};
|
|
3062
|
-
break;
|
|
3063
|
-
case "InternalServerException":
|
|
3064
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
3065
|
-
response = {
|
|
3066
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
3067
|
-
name: errorCode,
|
|
3068
|
-
$metadata: deserializeMetadata(output),
|
|
3069
|
-
};
|
|
3070
|
-
break;
|
|
3071
|
-
case "ResourceNotFoundException":
|
|
3072
|
-
case "com.amazonaws.appconfig#ResourceNotFoundException":
|
|
3073
|
-
response = {
|
|
3074
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
3075
|
-
name: errorCode,
|
|
3076
|
-
$metadata: deserializeMetadata(output),
|
|
3077
|
-
};
|
|
3078
|
-
break;
|
|
3079
|
-
default:
|
|
3080
|
-
const parsedBody = parsedOutput.body;
|
|
3081
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3082
|
-
response = {
|
|
3083
|
-
...parsedBody,
|
|
3084
|
-
name: `${errorCode}`,
|
|
3085
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3086
|
-
$fault: "client",
|
|
3087
|
-
$metadata: deserializeMetadata(output),
|
|
3088
|
-
} as any;
|
|
3089
|
-
}
|
|
3090
|
-
const message = response.message || response.Message || errorCode;
|
|
3091
|
-
response.message = message;
|
|
3092
|
-
delete response.Message;
|
|
3093
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3094
|
-
};
|
|
3095
|
-
|
|
3096
|
-
export const deserializeAws_restJson1ListDeploymentStrategiesCommand = async (
|
|
3097
|
-
output: __HttpResponse,
|
|
3098
|
-
context: __SerdeContext
|
|
3099
|
-
): Promise<ListDeploymentStrategiesCommandOutput> => {
|
|
3100
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3101
|
-
return deserializeAws_restJson1ListDeploymentStrategiesCommandError(output, context);
|
|
3102
|
-
}
|
|
3103
|
-
const contents: ListDeploymentStrategiesCommandOutput = {
|
|
3104
|
-
$metadata: deserializeMetadata(output),
|
|
3105
|
-
Items: undefined,
|
|
3106
|
-
NextToken: undefined,
|
|
3107
|
-
};
|
|
3108
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
3109
|
-
if (data.Items !== undefined && data.Items !== null) {
|
|
3110
|
-
contents.Items = deserializeAws_restJson1DeploymentStrategyList(data.Items, context);
|
|
3111
|
-
}
|
|
3112
|
-
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
3113
|
-
contents.NextToken = __expectString(data.NextToken);
|
|
3114
|
-
}
|
|
3115
|
-
return Promise.resolve(contents);
|
|
3116
|
-
};
|
|
3117
|
-
|
|
3118
|
-
const deserializeAws_restJson1ListDeploymentStrategiesCommandError = async (
|
|
3119
|
-
output: __HttpResponse,
|
|
3120
|
-
context: __SerdeContext
|
|
3121
|
-
): Promise<ListDeploymentStrategiesCommandOutput> => {
|
|
3122
|
-
const parsedOutput: any = {
|
|
3123
|
-
...output,
|
|
3124
|
-
body: await parseBody(output.body, context),
|
|
3125
|
-
};
|
|
3126
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3127
|
-
let errorCode = "UnknownError";
|
|
3128
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3129
|
-
switch (errorCode) {
|
|
3130
|
-
case "BadRequestException":
|
|
3131
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
3132
|
-
response = {
|
|
3133
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3134
|
-
name: errorCode,
|
|
3135
|
-
$metadata: deserializeMetadata(output),
|
|
3136
|
-
};
|
|
3137
|
-
break;
|
|
3138
|
-
case "InternalServerException":
|
|
3139
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
3140
|
-
response = {
|
|
3141
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
3142
|
-
name: errorCode,
|
|
3143
|
-
$metadata: deserializeMetadata(output),
|
|
3144
|
-
};
|
|
3145
|
-
break;
|
|
3146
|
-
default:
|
|
3147
|
-
const parsedBody = parsedOutput.body;
|
|
3148
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3149
|
-
response = {
|
|
3150
|
-
...parsedBody,
|
|
3151
|
-
name: `${errorCode}`,
|
|
3152
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3153
|
-
$fault: "client",
|
|
3154
|
-
$metadata: deserializeMetadata(output),
|
|
3155
|
-
} as any;
|
|
3156
|
-
}
|
|
3157
|
-
const message = response.message || response.Message || errorCode;
|
|
3158
|
-
response.message = message;
|
|
3159
|
-
delete response.Message;
|
|
3160
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3161
|
-
};
|
|
3162
|
-
|
|
3163
|
-
export const deserializeAws_restJson1ListEnvironmentsCommand = async (
|
|
3164
|
-
output: __HttpResponse,
|
|
3165
|
-
context: __SerdeContext
|
|
3166
|
-
): Promise<ListEnvironmentsCommandOutput> => {
|
|
3167
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3168
|
-
return deserializeAws_restJson1ListEnvironmentsCommandError(output, context);
|
|
3169
|
-
}
|
|
3170
|
-
const contents: ListEnvironmentsCommandOutput = {
|
|
3171
|
-
$metadata: deserializeMetadata(output),
|
|
3172
|
-
Items: undefined,
|
|
3173
|
-
NextToken: undefined,
|
|
3174
|
-
};
|
|
3175
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
3176
|
-
if (data.Items !== undefined && data.Items !== null) {
|
|
3177
|
-
contents.Items = deserializeAws_restJson1EnvironmentList(data.Items, context);
|
|
3178
|
-
}
|
|
3179
|
-
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
3180
|
-
contents.NextToken = __expectString(data.NextToken);
|
|
3181
|
-
}
|
|
3182
|
-
return Promise.resolve(contents);
|
|
3183
|
-
};
|
|
3184
|
-
|
|
3185
|
-
const deserializeAws_restJson1ListEnvironmentsCommandError = async (
|
|
3186
|
-
output: __HttpResponse,
|
|
3187
|
-
context: __SerdeContext
|
|
3188
|
-
): Promise<ListEnvironmentsCommandOutput> => {
|
|
3189
|
-
const parsedOutput: any = {
|
|
3190
|
-
...output,
|
|
3191
|
-
body: await parseBody(output.body, context),
|
|
3192
|
-
};
|
|
3193
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3194
|
-
let errorCode = "UnknownError";
|
|
3195
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3196
|
-
switch (errorCode) {
|
|
3197
|
-
case "BadRequestException":
|
|
3198
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
3199
|
-
response = {
|
|
3200
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3201
|
-
name: errorCode,
|
|
3202
|
-
$metadata: deserializeMetadata(output),
|
|
3203
|
-
};
|
|
3204
|
-
break;
|
|
3205
|
-
case "InternalServerException":
|
|
3206
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
3207
|
-
response = {
|
|
3208
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
3209
|
-
name: errorCode,
|
|
3210
|
-
$metadata: deserializeMetadata(output),
|
|
3211
|
-
};
|
|
3212
|
-
break;
|
|
3213
|
-
case "ResourceNotFoundException":
|
|
3214
|
-
case "com.amazonaws.appconfig#ResourceNotFoundException":
|
|
3215
|
-
response = {
|
|
3216
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
3217
|
-
name: errorCode,
|
|
3218
|
-
$metadata: deserializeMetadata(output),
|
|
3219
|
-
};
|
|
3220
|
-
break;
|
|
3221
|
-
default:
|
|
3222
|
-
const parsedBody = parsedOutput.body;
|
|
3223
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3224
|
-
response = {
|
|
3225
|
-
...parsedBody,
|
|
3226
|
-
name: `${errorCode}`,
|
|
3227
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3228
|
-
$fault: "client",
|
|
3229
|
-
$metadata: deserializeMetadata(output),
|
|
3230
|
-
} as any;
|
|
3231
|
-
}
|
|
3232
|
-
const message = response.message || response.Message || errorCode;
|
|
3233
|
-
response.message = message;
|
|
3234
|
-
delete response.Message;
|
|
3235
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3236
|
-
};
|
|
3237
|
-
|
|
3238
|
-
export const deserializeAws_restJson1ListHostedConfigurationVersionsCommand = async (
|
|
3239
|
-
output: __HttpResponse,
|
|
3240
|
-
context: __SerdeContext
|
|
3241
|
-
): Promise<ListHostedConfigurationVersionsCommandOutput> => {
|
|
3242
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3243
|
-
return deserializeAws_restJson1ListHostedConfigurationVersionsCommandError(output, context);
|
|
3244
|
-
}
|
|
3245
|
-
const contents: ListHostedConfigurationVersionsCommandOutput = {
|
|
3246
|
-
$metadata: deserializeMetadata(output),
|
|
3247
|
-
Items: undefined,
|
|
3248
|
-
NextToken: undefined,
|
|
3249
|
-
};
|
|
3250
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
3251
|
-
if (data.Items !== undefined && data.Items !== null) {
|
|
3252
|
-
contents.Items = deserializeAws_restJson1HostedConfigurationVersionSummaryList(data.Items, context);
|
|
3253
|
-
}
|
|
3254
|
-
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
3255
|
-
contents.NextToken = __expectString(data.NextToken);
|
|
3256
|
-
}
|
|
3257
|
-
return Promise.resolve(contents);
|
|
3258
|
-
};
|
|
3259
|
-
|
|
3260
|
-
const deserializeAws_restJson1ListHostedConfigurationVersionsCommandError = async (
|
|
3261
|
-
output: __HttpResponse,
|
|
3262
|
-
context: __SerdeContext
|
|
3263
|
-
): Promise<ListHostedConfigurationVersionsCommandOutput> => {
|
|
3264
|
-
const parsedOutput: any = {
|
|
3265
|
-
...output,
|
|
3266
|
-
body: await parseBody(output.body, context),
|
|
3267
|
-
};
|
|
3268
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3269
|
-
let errorCode = "UnknownError";
|
|
3270
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3271
|
-
switch (errorCode) {
|
|
3272
|
-
case "BadRequestException":
|
|
3273
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
3274
|
-
response = {
|
|
3275
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3276
|
-
name: errorCode,
|
|
3277
|
-
$metadata: deserializeMetadata(output),
|
|
3278
|
-
};
|
|
3279
|
-
break;
|
|
3280
|
-
case "InternalServerException":
|
|
3281
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
3282
|
-
response = {
|
|
3283
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
3284
|
-
name: errorCode,
|
|
3285
|
-
$metadata: deserializeMetadata(output),
|
|
3286
|
-
};
|
|
3287
|
-
break;
|
|
3288
|
-
case "ResourceNotFoundException":
|
|
3289
|
-
case "com.amazonaws.appconfig#ResourceNotFoundException":
|
|
3290
|
-
response = {
|
|
3291
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
3292
|
-
name: errorCode,
|
|
3293
|
-
$metadata: deserializeMetadata(output),
|
|
3294
|
-
};
|
|
3295
|
-
break;
|
|
3296
|
-
default:
|
|
3297
|
-
const parsedBody = parsedOutput.body;
|
|
3298
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3299
|
-
response = {
|
|
3300
|
-
...parsedBody,
|
|
3301
|
-
name: `${errorCode}`,
|
|
3302
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3303
|
-
$fault: "client",
|
|
3304
|
-
$metadata: deserializeMetadata(output),
|
|
3305
|
-
} as any;
|
|
3306
|
-
}
|
|
3307
|
-
const message = response.message || response.Message || errorCode;
|
|
3308
|
-
response.message = message;
|
|
3309
|
-
delete response.Message;
|
|
3310
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3311
|
-
};
|
|
3312
|
-
|
|
3313
|
-
export const deserializeAws_restJson1ListTagsForResourceCommand = async (
|
|
3314
|
-
output: __HttpResponse,
|
|
3315
|
-
context: __SerdeContext
|
|
3316
|
-
): Promise<ListTagsForResourceCommandOutput> => {
|
|
3317
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3318
|
-
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
3319
|
-
}
|
|
3320
|
-
const contents: ListTagsForResourceCommandOutput = {
|
|
3321
|
-
$metadata: deserializeMetadata(output),
|
|
3322
|
-
Tags: undefined,
|
|
3323
|
-
};
|
|
3324
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
3325
|
-
if (data.Tags !== undefined && data.Tags !== null) {
|
|
3326
|
-
contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
|
|
3327
|
-
}
|
|
3328
|
-
return Promise.resolve(contents);
|
|
3329
|
-
};
|
|
3330
|
-
|
|
3331
|
-
const deserializeAws_restJson1ListTagsForResourceCommandError = async (
|
|
3332
|
-
output: __HttpResponse,
|
|
3333
|
-
context: __SerdeContext
|
|
3334
|
-
): Promise<ListTagsForResourceCommandOutput> => {
|
|
3335
|
-
const parsedOutput: any = {
|
|
3336
|
-
...output,
|
|
3337
|
-
body: await parseBody(output.body, context),
|
|
3338
|
-
};
|
|
3339
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3340
|
-
let errorCode = "UnknownError";
|
|
3341
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3342
|
-
switch (errorCode) {
|
|
3343
|
-
case "BadRequestException":
|
|
3344
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
3345
|
-
response = {
|
|
3346
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3347
|
-
name: errorCode,
|
|
3348
|
-
$metadata: deserializeMetadata(output),
|
|
3349
|
-
};
|
|
3350
|
-
break;
|
|
3351
|
-
case "InternalServerException":
|
|
3352
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
3353
|
-
response = {
|
|
3354
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
3355
|
-
name: errorCode,
|
|
3356
|
-
$metadata: deserializeMetadata(output),
|
|
3357
|
-
};
|
|
3358
|
-
break;
|
|
3359
|
-
case "ResourceNotFoundException":
|
|
3360
|
-
case "com.amazonaws.appconfig#ResourceNotFoundException":
|
|
3361
|
-
response = {
|
|
3362
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
3363
|
-
name: errorCode,
|
|
3364
|
-
$metadata: deserializeMetadata(output),
|
|
3365
|
-
};
|
|
3366
|
-
break;
|
|
3367
|
-
default:
|
|
3368
|
-
const parsedBody = parsedOutput.body;
|
|
3369
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3370
|
-
response = {
|
|
3371
|
-
...parsedBody,
|
|
3372
|
-
name: `${errorCode}`,
|
|
3373
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3374
|
-
$fault: "client",
|
|
3375
|
-
$metadata: deserializeMetadata(output),
|
|
3376
|
-
} as any;
|
|
3377
|
-
}
|
|
3378
|
-
const message = response.message || response.Message || errorCode;
|
|
3379
|
-
response.message = message;
|
|
3380
|
-
delete response.Message;
|
|
3381
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3382
|
-
};
|
|
3383
|
-
|
|
3384
|
-
export const deserializeAws_restJson1StartDeploymentCommand = async (
|
|
3385
|
-
output: __HttpResponse,
|
|
3386
|
-
context: __SerdeContext
|
|
3387
|
-
): Promise<StartDeploymentCommandOutput> => {
|
|
3388
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
3389
|
-
return deserializeAws_restJson1StartDeploymentCommandError(output, context);
|
|
3390
|
-
}
|
|
3391
|
-
const contents: StartDeploymentCommandOutput = {
|
|
3392
|
-
$metadata: deserializeMetadata(output),
|
|
3393
|
-
ApplicationId: undefined,
|
|
3394
|
-
CompletedAt: undefined,
|
|
3395
|
-
ConfigurationLocationUri: undefined,
|
|
3396
|
-
ConfigurationName: undefined,
|
|
3397
|
-
ConfigurationProfileId: undefined,
|
|
3398
|
-
ConfigurationVersion: undefined,
|
|
3399
|
-
DeploymentDurationInMinutes: undefined,
|
|
3400
|
-
DeploymentNumber: undefined,
|
|
3401
|
-
DeploymentStrategyId: undefined,
|
|
3402
|
-
Description: undefined,
|
|
3403
|
-
EnvironmentId: undefined,
|
|
3404
|
-
EventLog: undefined,
|
|
3405
|
-
FinalBakeTimeInMinutes: undefined,
|
|
3406
|
-
GrowthFactor: undefined,
|
|
3407
|
-
GrowthType: undefined,
|
|
3408
|
-
PercentageComplete: undefined,
|
|
3409
|
-
StartedAt: undefined,
|
|
3410
|
-
State: undefined,
|
|
3411
|
-
};
|
|
3412
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
3413
|
-
if (data.ApplicationId !== undefined && data.ApplicationId !== null) {
|
|
3414
|
-
contents.ApplicationId = __expectString(data.ApplicationId);
|
|
3415
|
-
}
|
|
3416
|
-
if (data.CompletedAt !== undefined && data.CompletedAt !== null) {
|
|
3417
|
-
contents.CompletedAt = __expectNonNull(__parseRfc3339DateTime(data.CompletedAt));
|
|
3418
|
-
}
|
|
3419
|
-
if (data.ConfigurationLocationUri !== undefined && data.ConfigurationLocationUri !== null) {
|
|
3420
|
-
contents.ConfigurationLocationUri = __expectString(data.ConfigurationLocationUri);
|
|
3421
|
-
}
|
|
3422
|
-
if (data.ConfigurationName !== undefined && data.ConfigurationName !== null) {
|
|
3423
|
-
contents.ConfigurationName = __expectString(data.ConfigurationName);
|
|
3424
|
-
}
|
|
3425
|
-
if (data.ConfigurationProfileId !== undefined && data.ConfigurationProfileId !== null) {
|
|
3426
|
-
contents.ConfigurationProfileId = __expectString(data.ConfigurationProfileId);
|
|
3427
|
-
}
|
|
3428
|
-
if (data.ConfigurationVersion !== undefined && data.ConfigurationVersion !== null) {
|
|
3429
|
-
contents.ConfigurationVersion = __expectString(data.ConfigurationVersion);
|
|
3430
|
-
}
|
|
3431
|
-
if (data.DeploymentDurationInMinutes !== undefined && data.DeploymentDurationInMinutes !== null) {
|
|
3432
|
-
contents.DeploymentDurationInMinutes = __expectInt32(data.DeploymentDurationInMinutes);
|
|
3433
|
-
}
|
|
3434
|
-
if (data.DeploymentNumber !== undefined && data.DeploymentNumber !== null) {
|
|
3435
|
-
contents.DeploymentNumber = __expectInt32(data.DeploymentNumber);
|
|
3436
|
-
}
|
|
3437
|
-
if (data.DeploymentStrategyId !== undefined && data.DeploymentStrategyId !== null) {
|
|
3438
|
-
contents.DeploymentStrategyId = __expectString(data.DeploymentStrategyId);
|
|
3439
|
-
}
|
|
3440
|
-
if (data.Description !== undefined && data.Description !== null) {
|
|
3441
|
-
contents.Description = __expectString(data.Description);
|
|
3442
|
-
}
|
|
3443
|
-
if (data.EnvironmentId !== undefined && data.EnvironmentId !== null) {
|
|
3444
|
-
contents.EnvironmentId = __expectString(data.EnvironmentId);
|
|
3445
|
-
}
|
|
3446
|
-
if (data.EventLog !== undefined && data.EventLog !== null) {
|
|
3447
|
-
contents.EventLog = deserializeAws_restJson1DeploymentEvents(data.EventLog, context);
|
|
3448
|
-
}
|
|
3449
|
-
if (data.FinalBakeTimeInMinutes !== undefined && data.FinalBakeTimeInMinutes !== null) {
|
|
3450
|
-
contents.FinalBakeTimeInMinutes = __expectInt32(data.FinalBakeTimeInMinutes);
|
|
3451
|
-
}
|
|
3452
|
-
if (data.GrowthFactor !== undefined && data.GrowthFactor !== null) {
|
|
3453
|
-
contents.GrowthFactor = __limitedParseFloat32(data.GrowthFactor);
|
|
3454
|
-
}
|
|
3455
|
-
if (data.GrowthType !== undefined && data.GrowthType !== null) {
|
|
3456
|
-
contents.GrowthType = __expectString(data.GrowthType);
|
|
3457
|
-
}
|
|
3458
|
-
if (data.PercentageComplete !== undefined && data.PercentageComplete !== null) {
|
|
3459
|
-
contents.PercentageComplete = __limitedParseFloat32(data.PercentageComplete);
|
|
3460
|
-
}
|
|
3461
|
-
if (data.StartedAt !== undefined && data.StartedAt !== null) {
|
|
3462
|
-
contents.StartedAt = __expectNonNull(__parseRfc3339DateTime(data.StartedAt));
|
|
3463
|
-
}
|
|
3464
|
-
if (data.State !== undefined && data.State !== null) {
|
|
3465
|
-
contents.State = __expectString(data.State);
|
|
3466
|
-
}
|
|
3467
|
-
return Promise.resolve(contents);
|
|
3468
|
-
};
|
|
3469
|
-
|
|
3470
|
-
const deserializeAws_restJson1StartDeploymentCommandError = async (
|
|
3471
|
-
output: __HttpResponse,
|
|
3472
|
-
context: __SerdeContext
|
|
3473
|
-
): Promise<StartDeploymentCommandOutput> => {
|
|
3474
|
-
const parsedOutput: any = {
|
|
3475
|
-
...output,
|
|
3476
|
-
body: await parseBody(output.body, context),
|
|
3477
|
-
};
|
|
3478
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3479
|
-
let errorCode = "UnknownError";
|
|
3480
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3481
|
-
switch (errorCode) {
|
|
3482
|
-
case "BadRequestException":
|
|
3483
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
3484
|
-
response = {
|
|
3485
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3486
|
-
name: errorCode,
|
|
3487
|
-
$metadata: deserializeMetadata(output),
|
|
3488
|
-
};
|
|
3489
|
-
break;
|
|
3490
|
-
case "ConflictException":
|
|
3491
|
-
case "com.amazonaws.appconfig#ConflictException":
|
|
3492
|
-
response = {
|
|
3493
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
3494
|
-
name: errorCode,
|
|
3495
|
-
$metadata: deserializeMetadata(output),
|
|
3496
|
-
};
|
|
3497
|
-
break;
|
|
3498
|
-
case "InternalServerException":
|
|
3499
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
3500
|
-
response = {
|
|
3501
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
3502
|
-
name: errorCode,
|
|
3503
|
-
$metadata: deserializeMetadata(output),
|
|
3504
|
-
};
|
|
3505
|
-
break;
|
|
3506
|
-
case "ResourceNotFoundException":
|
|
3507
|
-
case "com.amazonaws.appconfig#ResourceNotFoundException":
|
|
3508
|
-
response = {
|
|
3509
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
3510
|
-
name: errorCode,
|
|
3511
|
-
$metadata: deserializeMetadata(output),
|
|
3512
|
-
};
|
|
3513
|
-
break;
|
|
3514
|
-
default:
|
|
3515
|
-
const parsedBody = parsedOutput.body;
|
|
3516
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3517
|
-
response = {
|
|
3518
|
-
...parsedBody,
|
|
3519
|
-
name: `${errorCode}`,
|
|
3520
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3521
|
-
$fault: "client",
|
|
3522
|
-
$metadata: deserializeMetadata(output),
|
|
3523
|
-
} as any;
|
|
3524
|
-
}
|
|
3525
|
-
const message = response.message || response.Message || errorCode;
|
|
3526
|
-
response.message = message;
|
|
3527
|
-
delete response.Message;
|
|
3528
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3529
|
-
};
|
|
3530
|
-
|
|
3531
|
-
export const deserializeAws_restJson1StopDeploymentCommand = async (
|
|
3532
|
-
output: __HttpResponse,
|
|
3533
|
-
context: __SerdeContext
|
|
3534
|
-
): Promise<StopDeploymentCommandOutput> => {
|
|
3535
|
-
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
3536
|
-
return deserializeAws_restJson1StopDeploymentCommandError(output, context);
|
|
3537
|
-
}
|
|
3538
|
-
const contents: StopDeploymentCommandOutput = {
|
|
3539
|
-
$metadata: deserializeMetadata(output),
|
|
3540
|
-
ApplicationId: undefined,
|
|
3541
|
-
CompletedAt: undefined,
|
|
3542
|
-
ConfigurationLocationUri: undefined,
|
|
3543
|
-
ConfigurationName: undefined,
|
|
3544
|
-
ConfigurationProfileId: undefined,
|
|
3545
|
-
ConfigurationVersion: undefined,
|
|
3546
|
-
DeploymentDurationInMinutes: undefined,
|
|
3547
|
-
DeploymentNumber: undefined,
|
|
3548
|
-
DeploymentStrategyId: undefined,
|
|
3549
|
-
Description: undefined,
|
|
3550
|
-
EnvironmentId: undefined,
|
|
3551
|
-
EventLog: undefined,
|
|
3552
|
-
FinalBakeTimeInMinutes: undefined,
|
|
3553
|
-
GrowthFactor: undefined,
|
|
3554
|
-
GrowthType: undefined,
|
|
3555
|
-
PercentageComplete: undefined,
|
|
3556
|
-
StartedAt: undefined,
|
|
3557
|
-
State: undefined,
|
|
3558
|
-
};
|
|
3559
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
3560
|
-
if (data.ApplicationId !== undefined && data.ApplicationId !== null) {
|
|
3561
|
-
contents.ApplicationId = __expectString(data.ApplicationId);
|
|
3562
|
-
}
|
|
3563
|
-
if (data.CompletedAt !== undefined && data.CompletedAt !== null) {
|
|
3564
|
-
contents.CompletedAt = __expectNonNull(__parseRfc3339DateTime(data.CompletedAt));
|
|
3565
|
-
}
|
|
3566
|
-
if (data.ConfigurationLocationUri !== undefined && data.ConfigurationLocationUri !== null) {
|
|
3567
|
-
contents.ConfigurationLocationUri = __expectString(data.ConfigurationLocationUri);
|
|
3568
|
-
}
|
|
3569
|
-
if (data.ConfigurationName !== undefined && data.ConfigurationName !== null) {
|
|
3570
|
-
contents.ConfigurationName = __expectString(data.ConfigurationName);
|
|
3571
|
-
}
|
|
3572
|
-
if (data.ConfigurationProfileId !== undefined && data.ConfigurationProfileId !== null) {
|
|
3573
|
-
contents.ConfigurationProfileId = __expectString(data.ConfigurationProfileId);
|
|
3574
|
-
}
|
|
3575
|
-
if (data.ConfigurationVersion !== undefined && data.ConfigurationVersion !== null) {
|
|
3576
|
-
contents.ConfigurationVersion = __expectString(data.ConfigurationVersion);
|
|
3577
|
-
}
|
|
3578
|
-
if (data.DeploymentDurationInMinutes !== undefined && data.DeploymentDurationInMinutes !== null) {
|
|
3579
|
-
contents.DeploymentDurationInMinutes = __expectInt32(data.DeploymentDurationInMinutes);
|
|
3580
|
-
}
|
|
3581
|
-
if (data.DeploymentNumber !== undefined && data.DeploymentNumber !== null) {
|
|
3582
|
-
contents.DeploymentNumber = __expectInt32(data.DeploymentNumber);
|
|
3583
|
-
}
|
|
3584
|
-
if (data.DeploymentStrategyId !== undefined && data.DeploymentStrategyId !== null) {
|
|
3585
|
-
contents.DeploymentStrategyId = __expectString(data.DeploymentStrategyId);
|
|
3586
|
-
}
|
|
3587
|
-
if (data.Description !== undefined && data.Description !== null) {
|
|
3588
|
-
contents.Description = __expectString(data.Description);
|
|
3589
|
-
}
|
|
3590
|
-
if (data.EnvironmentId !== undefined && data.EnvironmentId !== null) {
|
|
3591
|
-
contents.EnvironmentId = __expectString(data.EnvironmentId);
|
|
3592
|
-
}
|
|
3593
|
-
if (data.EventLog !== undefined && data.EventLog !== null) {
|
|
3594
|
-
contents.EventLog = deserializeAws_restJson1DeploymentEvents(data.EventLog, context);
|
|
3595
|
-
}
|
|
3596
|
-
if (data.FinalBakeTimeInMinutes !== undefined && data.FinalBakeTimeInMinutes !== null) {
|
|
3597
|
-
contents.FinalBakeTimeInMinutes = __expectInt32(data.FinalBakeTimeInMinutes);
|
|
3598
|
-
}
|
|
3599
|
-
if (data.GrowthFactor !== undefined && data.GrowthFactor !== null) {
|
|
3600
|
-
contents.GrowthFactor = __limitedParseFloat32(data.GrowthFactor);
|
|
3601
|
-
}
|
|
3602
|
-
if (data.GrowthType !== undefined && data.GrowthType !== null) {
|
|
3603
|
-
contents.GrowthType = __expectString(data.GrowthType);
|
|
3604
|
-
}
|
|
3605
|
-
if (data.PercentageComplete !== undefined && data.PercentageComplete !== null) {
|
|
3606
|
-
contents.PercentageComplete = __limitedParseFloat32(data.PercentageComplete);
|
|
3607
|
-
}
|
|
3608
|
-
if (data.StartedAt !== undefined && data.StartedAt !== null) {
|
|
3609
|
-
contents.StartedAt = __expectNonNull(__parseRfc3339DateTime(data.StartedAt));
|
|
3610
|
-
}
|
|
3611
|
-
if (data.State !== undefined && data.State !== null) {
|
|
3612
|
-
contents.State = __expectString(data.State);
|
|
3613
|
-
}
|
|
3614
|
-
return Promise.resolve(contents);
|
|
3615
|
-
};
|
|
3616
|
-
|
|
3617
|
-
const deserializeAws_restJson1StopDeploymentCommandError = async (
|
|
3618
|
-
output: __HttpResponse,
|
|
3619
|
-
context: __SerdeContext
|
|
3620
|
-
): Promise<StopDeploymentCommandOutput> => {
|
|
3621
|
-
const parsedOutput: any = {
|
|
3622
|
-
...output,
|
|
3623
|
-
body: await parseBody(output.body, context),
|
|
3624
|
-
};
|
|
3625
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3626
|
-
let errorCode = "UnknownError";
|
|
3627
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3628
|
-
switch (errorCode) {
|
|
3629
|
-
case "BadRequestException":
|
|
3630
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
3631
|
-
response = {
|
|
3632
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3633
|
-
name: errorCode,
|
|
3634
|
-
$metadata: deserializeMetadata(output),
|
|
3635
|
-
};
|
|
3636
|
-
break;
|
|
3637
|
-
case "InternalServerException":
|
|
3638
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
3639
|
-
response = {
|
|
3640
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
3641
|
-
name: errorCode,
|
|
3642
|
-
$metadata: deserializeMetadata(output),
|
|
3643
|
-
};
|
|
3644
|
-
break;
|
|
3645
|
-
case "ResourceNotFoundException":
|
|
3646
|
-
case "com.amazonaws.appconfig#ResourceNotFoundException":
|
|
3647
|
-
response = {
|
|
3648
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
3649
|
-
name: errorCode,
|
|
3650
|
-
$metadata: deserializeMetadata(output),
|
|
3651
|
-
};
|
|
3652
|
-
break;
|
|
3653
|
-
default:
|
|
3654
|
-
const parsedBody = parsedOutput.body;
|
|
3655
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3656
|
-
response = {
|
|
3657
|
-
...parsedBody,
|
|
3658
|
-
name: `${errorCode}`,
|
|
3659
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3660
|
-
$fault: "client",
|
|
3661
|
-
$metadata: deserializeMetadata(output),
|
|
3662
|
-
} as any;
|
|
3663
|
-
}
|
|
3664
|
-
const message = response.message || response.Message || errorCode;
|
|
3665
|
-
response.message = message;
|
|
3666
|
-
delete response.Message;
|
|
3667
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3668
|
-
};
|
|
3669
|
-
|
|
3670
|
-
export const deserializeAws_restJson1TagResourceCommand = async (
|
|
3671
|
-
output: __HttpResponse,
|
|
3672
|
-
context: __SerdeContext
|
|
3673
|
-
): Promise<TagResourceCommandOutput> => {
|
|
3674
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
3675
|
-
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
3676
|
-
}
|
|
3677
|
-
const contents: TagResourceCommandOutput = {
|
|
3678
|
-
$metadata: deserializeMetadata(output),
|
|
3679
|
-
};
|
|
3680
|
-
await collectBody(output.body, context);
|
|
3681
|
-
return Promise.resolve(contents);
|
|
3682
|
-
};
|
|
3683
|
-
|
|
3684
|
-
const deserializeAws_restJson1TagResourceCommandError = async (
|
|
3685
|
-
output: __HttpResponse,
|
|
3686
|
-
context: __SerdeContext
|
|
3687
|
-
): Promise<TagResourceCommandOutput> => {
|
|
3688
|
-
const parsedOutput: any = {
|
|
3689
|
-
...output,
|
|
3690
|
-
body: await parseBody(output.body, context),
|
|
3691
|
-
};
|
|
3692
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3693
|
-
let errorCode = "UnknownError";
|
|
3694
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3695
|
-
switch (errorCode) {
|
|
3696
|
-
case "BadRequestException":
|
|
3697
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
3698
|
-
response = {
|
|
3699
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3700
|
-
name: errorCode,
|
|
3701
|
-
$metadata: deserializeMetadata(output),
|
|
3702
|
-
};
|
|
3703
|
-
break;
|
|
3704
|
-
case "InternalServerException":
|
|
3705
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
3706
|
-
response = {
|
|
3707
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
3708
|
-
name: errorCode,
|
|
3709
|
-
$metadata: deserializeMetadata(output),
|
|
3710
|
-
};
|
|
3711
|
-
break;
|
|
3712
|
-
case "ResourceNotFoundException":
|
|
3713
|
-
case "com.amazonaws.appconfig#ResourceNotFoundException":
|
|
3714
|
-
response = {
|
|
3715
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
3716
|
-
name: errorCode,
|
|
3717
|
-
$metadata: deserializeMetadata(output),
|
|
3718
|
-
};
|
|
3719
|
-
break;
|
|
3720
|
-
default:
|
|
3721
|
-
const parsedBody = parsedOutput.body;
|
|
3722
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3723
|
-
response = {
|
|
3724
|
-
...parsedBody,
|
|
3725
|
-
name: `${errorCode}`,
|
|
3726
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3727
|
-
$fault: "client",
|
|
3728
|
-
$metadata: deserializeMetadata(output),
|
|
3729
|
-
} as any;
|
|
3730
|
-
}
|
|
3731
|
-
const message = response.message || response.Message || errorCode;
|
|
3732
|
-
response.message = message;
|
|
3733
|
-
delete response.Message;
|
|
3734
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3735
|
-
};
|
|
3736
|
-
|
|
3737
|
-
export const deserializeAws_restJson1UntagResourceCommand = async (
|
|
3738
|
-
output: __HttpResponse,
|
|
3739
|
-
context: __SerdeContext
|
|
3740
|
-
): Promise<UntagResourceCommandOutput> => {
|
|
3741
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
3742
|
-
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
3743
|
-
}
|
|
3744
|
-
const contents: UntagResourceCommandOutput = {
|
|
3745
|
-
$metadata: deserializeMetadata(output),
|
|
3746
|
-
};
|
|
3747
|
-
await collectBody(output.body, context);
|
|
3748
|
-
return Promise.resolve(contents);
|
|
3749
|
-
};
|
|
3750
|
-
|
|
3751
|
-
const deserializeAws_restJson1UntagResourceCommandError = async (
|
|
3752
|
-
output: __HttpResponse,
|
|
3753
|
-
context: __SerdeContext
|
|
3754
|
-
): Promise<UntagResourceCommandOutput> => {
|
|
3755
|
-
const parsedOutput: any = {
|
|
3756
|
-
...output,
|
|
3757
|
-
body: await parseBody(output.body, context),
|
|
3758
|
-
};
|
|
3759
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3760
|
-
let errorCode = "UnknownError";
|
|
3761
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3762
|
-
switch (errorCode) {
|
|
3763
|
-
case "BadRequestException":
|
|
3764
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
3765
|
-
response = {
|
|
3766
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3767
|
-
name: errorCode,
|
|
3768
|
-
$metadata: deserializeMetadata(output),
|
|
3769
|
-
};
|
|
3770
|
-
break;
|
|
3771
|
-
case "InternalServerException":
|
|
3772
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
3773
|
-
response = {
|
|
3774
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
3775
|
-
name: errorCode,
|
|
3776
|
-
$metadata: deserializeMetadata(output),
|
|
3777
|
-
};
|
|
3778
|
-
break;
|
|
3779
|
-
case "ResourceNotFoundException":
|
|
3780
|
-
case "com.amazonaws.appconfig#ResourceNotFoundException":
|
|
3781
|
-
response = {
|
|
3782
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
3783
|
-
name: errorCode,
|
|
3784
|
-
$metadata: deserializeMetadata(output),
|
|
3785
|
-
};
|
|
3786
|
-
break;
|
|
3787
|
-
default:
|
|
3788
|
-
const parsedBody = parsedOutput.body;
|
|
3789
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3790
|
-
response = {
|
|
3791
|
-
...parsedBody,
|
|
3792
|
-
name: `${errorCode}`,
|
|
3793
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3794
|
-
$fault: "client",
|
|
3795
|
-
$metadata: deserializeMetadata(output),
|
|
3796
|
-
} as any;
|
|
3797
|
-
}
|
|
3798
|
-
const message = response.message || response.Message || errorCode;
|
|
3799
|
-
response.message = message;
|
|
3800
|
-
delete response.Message;
|
|
3801
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3802
|
-
};
|
|
3803
|
-
|
|
3804
|
-
export const deserializeAws_restJson1UpdateApplicationCommand = async (
|
|
3805
|
-
output: __HttpResponse,
|
|
3806
|
-
context: __SerdeContext
|
|
3807
|
-
): Promise<UpdateApplicationCommandOutput> => {
|
|
3808
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3809
|
-
return deserializeAws_restJson1UpdateApplicationCommandError(output, context);
|
|
3810
|
-
}
|
|
3811
|
-
const contents: UpdateApplicationCommandOutput = {
|
|
3812
|
-
$metadata: deserializeMetadata(output),
|
|
3813
|
-
Description: undefined,
|
|
3814
|
-
Id: undefined,
|
|
3815
|
-
Name: undefined,
|
|
3816
|
-
};
|
|
3817
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
3818
|
-
if (data.Description !== undefined && data.Description !== null) {
|
|
3819
|
-
contents.Description = __expectString(data.Description);
|
|
3820
|
-
}
|
|
3821
|
-
if (data.Id !== undefined && data.Id !== null) {
|
|
3822
|
-
contents.Id = __expectString(data.Id);
|
|
3823
|
-
}
|
|
3824
|
-
if (data.Name !== undefined && data.Name !== null) {
|
|
3825
|
-
contents.Name = __expectString(data.Name);
|
|
3826
|
-
}
|
|
3827
|
-
return Promise.resolve(contents);
|
|
3828
|
-
};
|
|
3829
|
-
|
|
3830
|
-
const deserializeAws_restJson1UpdateApplicationCommandError = async (
|
|
3831
|
-
output: __HttpResponse,
|
|
3832
|
-
context: __SerdeContext
|
|
3833
|
-
): Promise<UpdateApplicationCommandOutput> => {
|
|
3834
|
-
const parsedOutput: any = {
|
|
3835
|
-
...output,
|
|
3836
|
-
body: await parseBody(output.body, context),
|
|
3837
|
-
};
|
|
3838
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3839
|
-
let errorCode = "UnknownError";
|
|
3840
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3841
|
-
switch (errorCode) {
|
|
3842
|
-
case "BadRequestException":
|
|
3843
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
3844
|
-
response = {
|
|
3845
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3846
|
-
name: errorCode,
|
|
3847
|
-
$metadata: deserializeMetadata(output),
|
|
3848
|
-
};
|
|
3849
|
-
break;
|
|
3850
|
-
case "InternalServerException":
|
|
3851
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
3852
|
-
response = {
|
|
3853
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
3854
|
-
name: errorCode,
|
|
3855
|
-
$metadata: deserializeMetadata(output),
|
|
3856
|
-
};
|
|
3857
|
-
break;
|
|
3858
|
-
case "ResourceNotFoundException":
|
|
3859
|
-
case "com.amazonaws.appconfig#ResourceNotFoundException":
|
|
3860
|
-
response = {
|
|
3861
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
3862
|
-
name: errorCode,
|
|
3863
|
-
$metadata: deserializeMetadata(output),
|
|
3864
|
-
};
|
|
3865
|
-
break;
|
|
3866
|
-
default:
|
|
3867
|
-
const parsedBody = parsedOutput.body;
|
|
3868
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3869
|
-
response = {
|
|
3870
|
-
...parsedBody,
|
|
3871
|
-
name: `${errorCode}`,
|
|
3872
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3873
|
-
$fault: "client",
|
|
3874
|
-
$metadata: deserializeMetadata(output),
|
|
3875
|
-
} as any;
|
|
3876
|
-
}
|
|
3877
|
-
const message = response.message || response.Message || errorCode;
|
|
3878
|
-
response.message = message;
|
|
3879
|
-
delete response.Message;
|
|
3880
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3881
|
-
};
|
|
3882
|
-
|
|
3883
|
-
export const deserializeAws_restJson1UpdateConfigurationProfileCommand = async (
|
|
3884
|
-
output: __HttpResponse,
|
|
3885
|
-
context: __SerdeContext
|
|
3886
|
-
): Promise<UpdateConfigurationProfileCommandOutput> => {
|
|
3887
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3888
|
-
return deserializeAws_restJson1UpdateConfigurationProfileCommandError(output, context);
|
|
3889
|
-
}
|
|
3890
|
-
const contents: UpdateConfigurationProfileCommandOutput = {
|
|
3891
|
-
$metadata: deserializeMetadata(output),
|
|
3892
|
-
ApplicationId: undefined,
|
|
3893
|
-
Description: undefined,
|
|
3894
|
-
Id: undefined,
|
|
3895
|
-
LocationUri: undefined,
|
|
3896
|
-
Name: undefined,
|
|
3897
|
-
RetrievalRoleArn: undefined,
|
|
3898
|
-
Validators: undefined,
|
|
3899
|
-
};
|
|
3900
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
3901
|
-
if (data.ApplicationId !== undefined && data.ApplicationId !== null) {
|
|
3902
|
-
contents.ApplicationId = __expectString(data.ApplicationId);
|
|
3903
|
-
}
|
|
3904
|
-
if (data.Description !== undefined && data.Description !== null) {
|
|
3905
|
-
contents.Description = __expectString(data.Description);
|
|
3906
|
-
}
|
|
3907
|
-
if (data.Id !== undefined && data.Id !== null) {
|
|
3908
|
-
contents.Id = __expectString(data.Id);
|
|
3909
|
-
}
|
|
3910
|
-
if (data.LocationUri !== undefined && data.LocationUri !== null) {
|
|
3911
|
-
contents.LocationUri = __expectString(data.LocationUri);
|
|
3912
|
-
}
|
|
3913
|
-
if (data.Name !== undefined && data.Name !== null) {
|
|
3914
|
-
contents.Name = __expectString(data.Name);
|
|
3915
|
-
}
|
|
3916
|
-
if (data.RetrievalRoleArn !== undefined && data.RetrievalRoleArn !== null) {
|
|
3917
|
-
contents.RetrievalRoleArn = __expectString(data.RetrievalRoleArn);
|
|
3918
|
-
}
|
|
3919
|
-
if (data.Validators !== undefined && data.Validators !== null) {
|
|
3920
|
-
contents.Validators = deserializeAws_restJson1ValidatorList(data.Validators, context);
|
|
3921
|
-
}
|
|
3922
|
-
return Promise.resolve(contents);
|
|
3923
|
-
};
|
|
3924
|
-
|
|
3925
|
-
const deserializeAws_restJson1UpdateConfigurationProfileCommandError = async (
|
|
3926
|
-
output: __HttpResponse,
|
|
3927
|
-
context: __SerdeContext
|
|
3928
|
-
): Promise<UpdateConfigurationProfileCommandOutput> => {
|
|
3929
|
-
const parsedOutput: any = {
|
|
3930
|
-
...output,
|
|
3931
|
-
body: await parseBody(output.body, context),
|
|
3932
|
-
};
|
|
3933
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3934
|
-
let errorCode = "UnknownError";
|
|
3935
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3936
|
-
switch (errorCode) {
|
|
3937
|
-
case "BadRequestException":
|
|
3938
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
3939
|
-
response = {
|
|
3940
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3941
|
-
name: errorCode,
|
|
3942
|
-
$metadata: deserializeMetadata(output),
|
|
3943
|
-
};
|
|
3944
|
-
break;
|
|
3945
|
-
case "InternalServerException":
|
|
3946
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
3947
|
-
response = {
|
|
3948
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
3949
|
-
name: errorCode,
|
|
3950
|
-
$metadata: deserializeMetadata(output),
|
|
3951
|
-
};
|
|
3952
|
-
break;
|
|
3953
|
-
case "ResourceNotFoundException":
|
|
3954
|
-
case "com.amazonaws.appconfig#ResourceNotFoundException":
|
|
3955
|
-
response = {
|
|
3956
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
3957
|
-
name: errorCode,
|
|
3958
|
-
$metadata: deserializeMetadata(output),
|
|
3959
|
-
};
|
|
3960
|
-
break;
|
|
3961
|
-
default:
|
|
3962
|
-
const parsedBody = parsedOutput.body;
|
|
3963
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3964
|
-
response = {
|
|
3965
|
-
...parsedBody,
|
|
3966
|
-
name: `${errorCode}`,
|
|
3967
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3968
|
-
$fault: "client",
|
|
3969
|
-
$metadata: deserializeMetadata(output),
|
|
3970
|
-
} as any;
|
|
3971
|
-
}
|
|
3972
|
-
const message = response.message || response.Message || errorCode;
|
|
3973
|
-
response.message = message;
|
|
3974
|
-
delete response.Message;
|
|
3975
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3976
|
-
};
|
|
3977
|
-
|
|
3978
|
-
export const deserializeAws_restJson1UpdateDeploymentStrategyCommand = async (
|
|
3979
|
-
output: __HttpResponse,
|
|
3980
|
-
context: __SerdeContext
|
|
3981
|
-
): Promise<UpdateDeploymentStrategyCommandOutput> => {
|
|
3982
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3983
|
-
return deserializeAws_restJson1UpdateDeploymentStrategyCommandError(output, context);
|
|
3984
|
-
}
|
|
3985
|
-
const contents: UpdateDeploymentStrategyCommandOutput = {
|
|
3986
|
-
$metadata: deserializeMetadata(output),
|
|
3987
|
-
DeploymentDurationInMinutes: undefined,
|
|
3988
|
-
Description: undefined,
|
|
3989
|
-
FinalBakeTimeInMinutes: undefined,
|
|
3990
|
-
GrowthFactor: undefined,
|
|
3991
|
-
GrowthType: undefined,
|
|
3992
|
-
Id: undefined,
|
|
3993
|
-
Name: undefined,
|
|
3994
|
-
ReplicateTo: undefined,
|
|
3995
|
-
};
|
|
3996
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
3997
|
-
if (data.DeploymentDurationInMinutes !== undefined && data.DeploymentDurationInMinutes !== null) {
|
|
3998
|
-
contents.DeploymentDurationInMinutes = __expectInt32(data.DeploymentDurationInMinutes);
|
|
3999
|
-
}
|
|
4000
|
-
if (data.Description !== undefined && data.Description !== null) {
|
|
4001
|
-
contents.Description = __expectString(data.Description);
|
|
4002
|
-
}
|
|
4003
|
-
if (data.FinalBakeTimeInMinutes !== undefined && data.FinalBakeTimeInMinutes !== null) {
|
|
4004
|
-
contents.FinalBakeTimeInMinutes = __expectInt32(data.FinalBakeTimeInMinutes);
|
|
4005
|
-
}
|
|
4006
|
-
if (data.GrowthFactor !== undefined && data.GrowthFactor !== null) {
|
|
4007
|
-
contents.GrowthFactor = __limitedParseFloat32(data.GrowthFactor);
|
|
4008
|
-
}
|
|
4009
|
-
if (data.GrowthType !== undefined && data.GrowthType !== null) {
|
|
4010
|
-
contents.GrowthType = __expectString(data.GrowthType);
|
|
4011
|
-
}
|
|
4012
|
-
if (data.Id !== undefined && data.Id !== null) {
|
|
4013
|
-
contents.Id = __expectString(data.Id);
|
|
4014
|
-
}
|
|
4015
|
-
if (data.Name !== undefined && data.Name !== null) {
|
|
4016
|
-
contents.Name = __expectString(data.Name);
|
|
4017
|
-
}
|
|
4018
|
-
if (data.ReplicateTo !== undefined && data.ReplicateTo !== null) {
|
|
4019
|
-
contents.ReplicateTo = __expectString(data.ReplicateTo);
|
|
4020
|
-
}
|
|
4021
|
-
return Promise.resolve(contents);
|
|
4022
|
-
};
|
|
4023
|
-
|
|
4024
|
-
const deserializeAws_restJson1UpdateDeploymentStrategyCommandError = async (
|
|
4025
|
-
output: __HttpResponse,
|
|
4026
|
-
context: __SerdeContext
|
|
4027
|
-
): Promise<UpdateDeploymentStrategyCommandOutput> => {
|
|
4028
|
-
const parsedOutput: any = {
|
|
4029
|
-
...output,
|
|
4030
|
-
body: await parseBody(output.body, context),
|
|
4031
|
-
};
|
|
4032
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
4033
|
-
let errorCode = "UnknownError";
|
|
4034
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4035
|
-
switch (errorCode) {
|
|
4036
|
-
case "BadRequestException":
|
|
4037
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
4038
|
-
response = {
|
|
4039
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
4040
|
-
name: errorCode,
|
|
4041
|
-
$metadata: deserializeMetadata(output),
|
|
4042
|
-
};
|
|
4043
|
-
break;
|
|
4044
|
-
case "InternalServerException":
|
|
4045
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
4046
|
-
response = {
|
|
4047
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
4048
|
-
name: errorCode,
|
|
4049
|
-
$metadata: deserializeMetadata(output),
|
|
4050
|
-
};
|
|
4051
|
-
break;
|
|
4052
|
-
case "ResourceNotFoundException":
|
|
4053
|
-
case "com.amazonaws.appconfig#ResourceNotFoundException":
|
|
4054
|
-
response = {
|
|
4055
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
4056
|
-
name: errorCode,
|
|
4057
|
-
$metadata: deserializeMetadata(output),
|
|
4058
|
-
};
|
|
4059
|
-
break;
|
|
4060
|
-
default:
|
|
4061
|
-
const parsedBody = parsedOutput.body;
|
|
4062
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
4063
|
-
response = {
|
|
4064
|
-
...parsedBody,
|
|
4065
|
-
name: `${errorCode}`,
|
|
4066
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
4067
|
-
$fault: "client",
|
|
4068
|
-
$metadata: deserializeMetadata(output),
|
|
4069
|
-
} as any;
|
|
4070
|
-
}
|
|
4071
|
-
const message = response.message || response.Message || errorCode;
|
|
4072
|
-
response.message = message;
|
|
4073
|
-
delete response.Message;
|
|
4074
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
4075
|
-
};
|
|
4076
|
-
|
|
4077
|
-
export const deserializeAws_restJson1UpdateEnvironmentCommand = async (
|
|
4078
|
-
output: __HttpResponse,
|
|
4079
|
-
context: __SerdeContext
|
|
4080
|
-
): Promise<UpdateEnvironmentCommandOutput> => {
|
|
4081
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
4082
|
-
return deserializeAws_restJson1UpdateEnvironmentCommandError(output, context);
|
|
4083
|
-
}
|
|
4084
|
-
const contents: UpdateEnvironmentCommandOutput = {
|
|
4085
|
-
$metadata: deserializeMetadata(output),
|
|
4086
|
-
ApplicationId: undefined,
|
|
4087
|
-
Description: undefined,
|
|
4088
|
-
Id: undefined,
|
|
4089
|
-
Monitors: undefined,
|
|
4090
|
-
Name: undefined,
|
|
4091
|
-
State: undefined,
|
|
4092
|
-
};
|
|
4093
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
4094
|
-
if (data.ApplicationId !== undefined && data.ApplicationId !== null) {
|
|
4095
|
-
contents.ApplicationId = __expectString(data.ApplicationId);
|
|
4096
|
-
}
|
|
4097
|
-
if (data.Description !== undefined && data.Description !== null) {
|
|
4098
|
-
contents.Description = __expectString(data.Description);
|
|
4099
|
-
}
|
|
4100
|
-
if (data.Id !== undefined && data.Id !== null) {
|
|
4101
|
-
contents.Id = __expectString(data.Id);
|
|
4102
|
-
}
|
|
4103
|
-
if (data.Monitors !== undefined && data.Monitors !== null) {
|
|
4104
|
-
contents.Monitors = deserializeAws_restJson1MonitorList(data.Monitors, context);
|
|
4105
|
-
}
|
|
4106
|
-
if (data.Name !== undefined && data.Name !== null) {
|
|
4107
|
-
contents.Name = __expectString(data.Name);
|
|
4108
|
-
}
|
|
4109
|
-
if (data.State !== undefined && data.State !== null) {
|
|
4110
|
-
contents.State = __expectString(data.State);
|
|
4111
|
-
}
|
|
4112
|
-
return Promise.resolve(contents);
|
|
4113
|
-
};
|
|
4114
|
-
|
|
4115
|
-
const deserializeAws_restJson1UpdateEnvironmentCommandError = async (
|
|
4116
|
-
output: __HttpResponse,
|
|
4117
|
-
context: __SerdeContext
|
|
4118
|
-
): Promise<UpdateEnvironmentCommandOutput> => {
|
|
4119
|
-
const parsedOutput: any = {
|
|
4120
|
-
...output,
|
|
4121
|
-
body: await parseBody(output.body, context),
|
|
4122
|
-
};
|
|
4123
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
4124
|
-
let errorCode = "UnknownError";
|
|
4125
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4126
|
-
switch (errorCode) {
|
|
4127
|
-
case "BadRequestException":
|
|
4128
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
4129
|
-
response = {
|
|
4130
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
4131
|
-
name: errorCode,
|
|
4132
|
-
$metadata: deserializeMetadata(output),
|
|
4133
|
-
};
|
|
4134
|
-
break;
|
|
4135
|
-
case "InternalServerException":
|
|
4136
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
4137
|
-
response = {
|
|
4138
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
4139
|
-
name: errorCode,
|
|
4140
|
-
$metadata: deserializeMetadata(output),
|
|
4141
|
-
};
|
|
4142
|
-
break;
|
|
4143
|
-
case "ResourceNotFoundException":
|
|
4144
|
-
case "com.amazonaws.appconfig#ResourceNotFoundException":
|
|
4145
|
-
response = {
|
|
4146
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
4147
|
-
name: errorCode,
|
|
4148
|
-
$metadata: deserializeMetadata(output),
|
|
4149
|
-
};
|
|
4150
|
-
break;
|
|
4151
|
-
default:
|
|
4152
|
-
const parsedBody = parsedOutput.body;
|
|
4153
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
4154
|
-
response = {
|
|
4155
|
-
...parsedBody,
|
|
4156
|
-
name: `${errorCode}`,
|
|
4157
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
4158
|
-
$fault: "client",
|
|
4159
|
-
$metadata: deserializeMetadata(output),
|
|
4160
|
-
} as any;
|
|
4161
|
-
}
|
|
4162
|
-
const message = response.message || response.Message || errorCode;
|
|
4163
|
-
response.message = message;
|
|
4164
|
-
delete response.Message;
|
|
4165
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
4166
|
-
};
|
|
4167
|
-
|
|
4168
|
-
export const deserializeAws_restJson1ValidateConfigurationCommand = async (
|
|
4169
|
-
output: __HttpResponse,
|
|
4170
|
-
context: __SerdeContext
|
|
4171
|
-
): Promise<ValidateConfigurationCommandOutput> => {
|
|
4172
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
4173
|
-
return deserializeAws_restJson1ValidateConfigurationCommandError(output, context);
|
|
4174
|
-
}
|
|
4175
|
-
const contents: ValidateConfigurationCommandOutput = {
|
|
4176
|
-
$metadata: deserializeMetadata(output),
|
|
4177
|
-
};
|
|
4178
|
-
await collectBody(output.body, context);
|
|
4179
|
-
return Promise.resolve(contents);
|
|
4180
|
-
};
|
|
4181
|
-
|
|
4182
|
-
const deserializeAws_restJson1ValidateConfigurationCommandError = async (
|
|
4183
|
-
output: __HttpResponse,
|
|
4184
|
-
context: __SerdeContext
|
|
4185
|
-
): Promise<ValidateConfigurationCommandOutput> => {
|
|
4186
|
-
const parsedOutput: any = {
|
|
4187
|
-
...output,
|
|
4188
|
-
body: await parseBody(output.body, context),
|
|
4189
|
-
};
|
|
4190
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
4191
|
-
let errorCode = "UnknownError";
|
|
4192
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4193
|
-
switch (errorCode) {
|
|
4194
|
-
case "BadRequestException":
|
|
4195
|
-
case "com.amazonaws.appconfig#BadRequestException":
|
|
4196
|
-
response = {
|
|
4197
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
4198
|
-
name: errorCode,
|
|
4199
|
-
$metadata: deserializeMetadata(output),
|
|
4200
|
-
};
|
|
4201
|
-
break;
|
|
4202
|
-
case "InternalServerException":
|
|
4203
|
-
case "com.amazonaws.appconfig#InternalServerException":
|
|
4204
|
-
response = {
|
|
4205
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
4206
|
-
name: errorCode,
|
|
4207
|
-
$metadata: deserializeMetadata(output),
|
|
4208
|
-
};
|
|
4209
|
-
break;
|
|
4210
|
-
case "ResourceNotFoundException":
|
|
4211
|
-
case "com.amazonaws.appconfig#ResourceNotFoundException":
|
|
4212
|
-
response = {
|
|
4213
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
4214
|
-
name: errorCode,
|
|
4215
|
-
$metadata: deserializeMetadata(output),
|
|
4216
|
-
};
|
|
4217
|
-
break;
|
|
4218
|
-
default:
|
|
4219
|
-
const parsedBody = parsedOutput.body;
|
|
4220
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
4221
|
-
response = {
|
|
4222
|
-
...parsedBody,
|
|
4223
|
-
name: `${errorCode}`,
|
|
4224
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
4225
|
-
$fault: "client",
|
|
4226
|
-
$metadata: deserializeMetadata(output),
|
|
4227
|
-
} as any;
|
|
4228
|
-
}
|
|
4229
|
-
const message = response.message || response.Message || errorCode;
|
|
4230
|
-
response.message = message;
|
|
4231
|
-
delete response.Message;
|
|
4232
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
4233
|
-
};
|
|
4234
|
-
|
|
4235
|
-
const deserializeAws_restJson1BadRequestExceptionResponse = async (
|
|
4236
|
-
parsedOutput: any,
|
|
4237
|
-
context: __SerdeContext
|
|
4238
|
-
): Promise<BadRequestException> => {
|
|
4239
|
-
const contents: BadRequestException = {
|
|
4240
|
-
name: "BadRequestException",
|
|
4241
|
-
$fault: "client",
|
|
4242
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
4243
|
-
Message: undefined,
|
|
4244
|
-
};
|
|
4245
|
-
const data: any = parsedOutput.body;
|
|
4246
|
-
if (data.Message !== undefined && data.Message !== null) {
|
|
4247
|
-
contents.Message = __expectString(data.Message);
|
|
4248
|
-
}
|
|
4249
|
-
return contents;
|
|
4250
|
-
};
|
|
4251
|
-
|
|
4252
|
-
const deserializeAws_restJson1ConflictExceptionResponse = async (
|
|
4253
|
-
parsedOutput: any,
|
|
4254
|
-
context: __SerdeContext
|
|
4255
|
-
): Promise<ConflictException> => {
|
|
4256
|
-
const contents: ConflictException = {
|
|
4257
|
-
name: "ConflictException",
|
|
4258
|
-
$fault: "client",
|
|
4259
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
4260
|
-
Message: undefined,
|
|
4261
|
-
};
|
|
4262
|
-
const data: any = parsedOutput.body;
|
|
4263
|
-
if (data.Message !== undefined && data.Message !== null) {
|
|
4264
|
-
contents.Message = __expectString(data.Message);
|
|
4265
|
-
}
|
|
4266
|
-
return contents;
|
|
4267
|
-
};
|
|
4268
|
-
|
|
4269
|
-
const deserializeAws_restJson1InternalServerExceptionResponse = async (
|
|
4270
|
-
parsedOutput: any,
|
|
4271
|
-
context: __SerdeContext
|
|
4272
|
-
): Promise<InternalServerException> => {
|
|
4273
|
-
const contents: InternalServerException = {
|
|
4274
|
-
name: "InternalServerException",
|
|
4275
|
-
$fault: "server",
|
|
4276
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
4277
|
-
Message: undefined,
|
|
4278
|
-
};
|
|
4279
|
-
const data: any = parsedOutput.body;
|
|
4280
|
-
if (data.Message !== undefined && data.Message !== null) {
|
|
4281
|
-
contents.Message = __expectString(data.Message);
|
|
4282
|
-
}
|
|
4283
|
-
return contents;
|
|
4284
|
-
};
|
|
4285
|
-
|
|
4286
|
-
const deserializeAws_restJson1PayloadTooLargeExceptionResponse = async (
|
|
4287
|
-
parsedOutput: any,
|
|
4288
|
-
context: __SerdeContext
|
|
4289
|
-
): Promise<PayloadTooLargeException> => {
|
|
4290
|
-
const contents: PayloadTooLargeException = {
|
|
4291
|
-
name: "PayloadTooLargeException",
|
|
4292
|
-
$fault: "client",
|
|
4293
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
4294
|
-
Limit: undefined,
|
|
4295
|
-
Measure: undefined,
|
|
4296
|
-
Message: undefined,
|
|
4297
|
-
Size: undefined,
|
|
4298
|
-
};
|
|
4299
|
-
const data: any = parsedOutput.body;
|
|
4300
|
-
if (data.Limit !== undefined && data.Limit !== null) {
|
|
4301
|
-
contents.Limit = __limitedParseFloat32(data.Limit);
|
|
4302
|
-
}
|
|
4303
|
-
if (data.Measure !== undefined && data.Measure !== null) {
|
|
4304
|
-
contents.Measure = __expectString(data.Measure);
|
|
4305
|
-
}
|
|
4306
|
-
if (data.Message !== undefined && data.Message !== null) {
|
|
4307
|
-
contents.Message = __expectString(data.Message);
|
|
4308
|
-
}
|
|
4309
|
-
if (data.Size !== undefined && data.Size !== null) {
|
|
4310
|
-
contents.Size = __limitedParseFloat32(data.Size);
|
|
4311
|
-
}
|
|
4312
|
-
return contents;
|
|
4313
|
-
};
|
|
4314
|
-
|
|
4315
|
-
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (
|
|
4316
|
-
parsedOutput: any,
|
|
4317
|
-
context: __SerdeContext
|
|
4318
|
-
): Promise<ResourceNotFoundException> => {
|
|
4319
|
-
const contents: ResourceNotFoundException = {
|
|
4320
|
-
name: "ResourceNotFoundException",
|
|
4321
|
-
$fault: "client",
|
|
4322
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
4323
|
-
Message: undefined,
|
|
4324
|
-
ResourceName: undefined,
|
|
4325
|
-
};
|
|
4326
|
-
const data: any = parsedOutput.body;
|
|
4327
|
-
if (data.Message !== undefined && data.Message !== null) {
|
|
4328
|
-
contents.Message = __expectString(data.Message);
|
|
4329
|
-
}
|
|
4330
|
-
if (data.ResourceName !== undefined && data.ResourceName !== null) {
|
|
4331
|
-
contents.ResourceName = __expectString(data.ResourceName);
|
|
4332
|
-
}
|
|
4333
|
-
return contents;
|
|
4334
|
-
};
|
|
4335
|
-
|
|
4336
|
-
const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (
|
|
4337
|
-
parsedOutput: any,
|
|
4338
|
-
context: __SerdeContext
|
|
4339
|
-
): Promise<ServiceQuotaExceededException> => {
|
|
4340
|
-
const contents: ServiceQuotaExceededException = {
|
|
4341
|
-
name: "ServiceQuotaExceededException",
|
|
4342
|
-
$fault: "client",
|
|
4343
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
4344
|
-
Message: undefined,
|
|
4345
|
-
};
|
|
4346
|
-
const data: any = parsedOutput.body;
|
|
4347
|
-
if (data.Message !== undefined && data.Message !== null) {
|
|
4348
|
-
contents.Message = __expectString(data.Message);
|
|
4349
|
-
}
|
|
4350
|
-
return contents;
|
|
4351
|
-
};
|
|
4352
|
-
|
|
4353
|
-
const serializeAws_restJson1Monitor = (input: Monitor, context: __SerdeContext): any => {
|
|
4354
|
-
return {
|
|
4355
|
-
...(input.AlarmArn !== undefined && input.AlarmArn !== null && { AlarmArn: input.AlarmArn }),
|
|
4356
|
-
...(input.AlarmRoleArn !== undefined && input.AlarmRoleArn !== null && { AlarmRoleArn: input.AlarmRoleArn }),
|
|
4357
|
-
};
|
|
4358
|
-
};
|
|
4359
|
-
|
|
4360
|
-
const serializeAws_restJson1MonitorList = (input: Monitor[], context: __SerdeContext): any => {
|
|
4361
|
-
return input
|
|
4362
|
-
.filter((e: any) => e != null)
|
|
4363
|
-
.map((entry) => {
|
|
4364
|
-
if (entry === null) {
|
|
4365
|
-
return null as any;
|
|
4366
|
-
}
|
|
4367
|
-
return serializeAws_restJson1Monitor(entry, context);
|
|
4368
|
-
});
|
|
4369
|
-
};
|
|
4370
|
-
|
|
4371
|
-
const serializeAws_restJson1TagMap = (input: { [key: string]: string }, context: __SerdeContext): any => {
|
|
4372
|
-
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
|
|
4373
|
-
if (value === null) {
|
|
4374
|
-
return acc;
|
|
4375
|
-
}
|
|
4376
|
-
return {
|
|
4377
|
-
...acc,
|
|
4378
|
-
[key]: value,
|
|
4379
|
-
};
|
|
4380
|
-
}, {});
|
|
4381
|
-
};
|
|
4382
|
-
|
|
4383
|
-
const serializeAws_restJson1Validator = (input: Validator, context: __SerdeContext): any => {
|
|
4384
|
-
return {
|
|
4385
|
-
...(input.Content !== undefined && input.Content !== null && { Content: input.Content }),
|
|
4386
|
-
...(input.Type !== undefined && input.Type !== null && { Type: input.Type }),
|
|
4387
|
-
};
|
|
4388
|
-
};
|
|
4389
|
-
|
|
4390
|
-
const serializeAws_restJson1ValidatorList = (input: Validator[], context: __SerdeContext): any => {
|
|
4391
|
-
return input
|
|
4392
|
-
.filter((e: any) => e != null)
|
|
4393
|
-
.map((entry) => {
|
|
4394
|
-
if (entry === null) {
|
|
4395
|
-
return null as any;
|
|
4396
|
-
}
|
|
4397
|
-
return serializeAws_restJson1Validator(entry, context);
|
|
4398
|
-
});
|
|
4399
|
-
};
|
|
4400
|
-
|
|
4401
|
-
const deserializeAws_restJson1Application = (output: any, context: __SerdeContext): Application => {
|
|
4402
|
-
return {
|
|
4403
|
-
Description: __expectString(output.Description),
|
|
4404
|
-
Id: __expectString(output.Id),
|
|
4405
|
-
Name: __expectString(output.Name),
|
|
4406
|
-
} as any;
|
|
4407
|
-
};
|
|
4408
|
-
|
|
4409
|
-
const deserializeAws_restJson1ApplicationList = (output: any, context: __SerdeContext): Application[] => {
|
|
4410
|
-
return (output || [])
|
|
4411
|
-
.filter((e: any) => e != null)
|
|
4412
|
-
.map((entry: any) => {
|
|
4413
|
-
if (entry === null) {
|
|
4414
|
-
return null as any;
|
|
4415
|
-
}
|
|
4416
|
-
return deserializeAws_restJson1Application(entry, context);
|
|
4417
|
-
});
|
|
4418
|
-
};
|
|
4419
|
-
|
|
4420
|
-
const deserializeAws_restJson1ConfigurationProfileSummary = (
|
|
4421
|
-
output: any,
|
|
4422
|
-
context: __SerdeContext
|
|
4423
|
-
): ConfigurationProfileSummary => {
|
|
4424
|
-
return {
|
|
4425
|
-
ApplicationId: __expectString(output.ApplicationId),
|
|
4426
|
-
Id: __expectString(output.Id),
|
|
4427
|
-
LocationUri: __expectString(output.LocationUri),
|
|
4428
|
-
Name: __expectString(output.Name),
|
|
4429
|
-
ValidatorTypes:
|
|
4430
|
-
output.ValidatorTypes !== undefined && output.ValidatorTypes !== null
|
|
4431
|
-
? deserializeAws_restJson1ValidatorTypeList(output.ValidatorTypes, context)
|
|
4432
|
-
: undefined,
|
|
4433
|
-
} as any;
|
|
4434
|
-
};
|
|
4435
|
-
|
|
4436
|
-
const deserializeAws_restJson1ConfigurationProfileSummaryList = (
|
|
4437
|
-
output: any,
|
|
4438
|
-
context: __SerdeContext
|
|
4439
|
-
): ConfigurationProfileSummary[] => {
|
|
4440
|
-
return (output || [])
|
|
4441
|
-
.filter((e: any) => e != null)
|
|
4442
|
-
.map((entry: any) => {
|
|
4443
|
-
if (entry === null) {
|
|
4444
|
-
return null as any;
|
|
4445
|
-
}
|
|
4446
|
-
return deserializeAws_restJson1ConfigurationProfileSummary(entry, context);
|
|
4447
|
-
});
|
|
4448
|
-
};
|
|
4449
|
-
|
|
4450
|
-
const deserializeAws_restJson1DeploymentEvent = (output: any, context: __SerdeContext): DeploymentEvent => {
|
|
4451
|
-
return {
|
|
4452
|
-
Description: __expectString(output.Description),
|
|
4453
|
-
EventType: __expectString(output.EventType),
|
|
4454
|
-
OccurredAt:
|
|
4455
|
-
output.OccurredAt !== undefined && output.OccurredAt !== null
|
|
4456
|
-
? __expectNonNull(__parseRfc3339DateTime(output.OccurredAt))
|
|
4457
|
-
: undefined,
|
|
4458
|
-
TriggeredBy: __expectString(output.TriggeredBy),
|
|
4459
|
-
} as any;
|
|
4460
|
-
};
|
|
4461
|
-
|
|
4462
|
-
const deserializeAws_restJson1DeploymentEvents = (output: any, context: __SerdeContext): DeploymentEvent[] => {
|
|
4463
|
-
return (output || [])
|
|
4464
|
-
.filter((e: any) => e != null)
|
|
4465
|
-
.map((entry: any) => {
|
|
4466
|
-
if (entry === null) {
|
|
4467
|
-
return null as any;
|
|
4468
|
-
}
|
|
4469
|
-
return deserializeAws_restJson1DeploymentEvent(entry, context);
|
|
4470
|
-
});
|
|
4471
|
-
};
|
|
4472
|
-
|
|
4473
|
-
const deserializeAws_restJson1DeploymentList = (output: any, context: __SerdeContext): DeploymentSummary[] => {
|
|
4474
|
-
return (output || [])
|
|
4475
|
-
.filter((e: any) => e != null)
|
|
4476
|
-
.map((entry: any) => {
|
|
4477
|
-
if (entry === null) {
|
|
4478
|
-
return null as any;
|
|
4479
|
-
}
|
|
4480
|
-
return deserializeAws_restJson1DeploymentSummary(entry, context);
|
|
4481
|
-
});
|
|
4482
|
-
};
|
|
4483
|
-
|
|
4484
|
-
const deserializeAws_restJson1DeploymentStrategy = (output: any, context: __SerdeContext): DeploymentStrategy => {
|
|
4485
|
-
return {
|
|
4486
|
-
DeploymentDurationInMinutes: __expectInt32(output.DeploymentDurationInMinutes),
|
|
4487
|
-
Description: __expectString(output.Description),
|
|
4488
|
-
FinalBakeTimeInMinutes: __expectInt32(output.FinalBakeTimeInMinutes),
|
|
4489
|
-
GrowthFactor: __limitedParseFloat32(output.GrowthFactor),
|
|
4490
|
-
GrowthType: __expectString(output.GrowthType),
|
|
4491
|
-
Id: __expectString(output.Id),
|
|
4492
|
-
Name: __expectString(output.Name),
|
|
4493
|
-
ReplicateTo: __expectString(output.ReplicateTo),
|
|
4494
|
-
} as any;
|
|
4495
|
-
};
|
|
4496
|
-
|
|
4497
|
-
const deserializeAws_restJson1DeploymentStrategyList = (output: any, context: __SerdeContext): DeploymentStrategy[] => {
|
|
4498
|
-
return (output || [])
|
|
4499
|
-
.filter((e: any) => e != null)
|
|
4500
|
-
.map((entry: any) => {
|
|
4501
|
-
if (entry === null) {
|
|
4502
|
-
return null as any;
|
|
4503
|
-
}
|
|
4504
|
-
return deserializeAws_restJson1DeploymentStrategy(entry, context);
|
|
4505
|
-
});
|
|
4506
|
-
};
|
|
4507
|
-
|
|
4508
|
-
const deserializeAws_restJson1DeploymentSummary = (output: any, context: __SerdeContext): DeploymentSummary => {
|
|
4509
|
-
return {
|
|
4510
|
-
CompletedAt:
|
|
4511
|
-
output.CompletedAt !== undefined && output.CompletedAt !== null
|
|
4512
|
-
? __expectNonNull(__parseRfc3339DateTime(output.CompletedAt))
|
|
4513
|
-
: undefined,
|
|
4514
|
-
ConfigurationName: __expectString(output.ConfigurationName),
|
|
4515
|
-
ConfigurationVersion: __expectString(output.ConfigurationVersion),
|
|
4516
|
-
DeploymentDurationInMinutes: __expectInt32(output.DeploymentDurationInMinutes),
|
|
4517
|
-
DeploymentNumber: __expectInt32(output.DeploymentNumber),
|
|
4518
|
-
FinalBakeTimeInMinutes: __expectInt32(output.FinalBakeTimeInMinutes),
|
|
4519
|
-
GrowthFactor: __limitedParseFloat32(output.GrowthFactor),
|
|
4520
|
-
GrowthType: __expectString(output.GrowthType),
|
|
4521
|
-
PercentageComplete: __limitedParseFloat32(output.PercentageComplete),
|
|
4522
|
-
StartedAt:
|
|
4523
|
-
output.StartedAt !== undefined && output.StartedAt !== null
|
|
4524
|
-
? __expectNonNull(__parseRfc3339DateTime(output.StartedAt))
|
|
4525
|
-
: undefined,
|
|
4526
|
-
State: __expectString(output.State),
|
|
4527
|
-
} as any;
|
|
4528
|
-
};
|
|
4529
|
-
|
|
4530
|
-
const deserializeAws_restJson1Environment = (output: any, context: __SerdeContext): Environment => {
|
|
4531
|
-
return {
|
|
4532
|
-
ApplicationId: __expectString(output.ApplicationId),
|
|
4533
|
-
Description: __expectString(output.Description),
|
|
4534
|
-
Id: __expectString(output.Id),
|
|
4535
|
-
Monitors:
|
|
4536
|
-
output.Monitors !== undefined && output.Monitors !== null
|
|
4537
|
-
? deserializeAws_restJson1MonitorList(output.Monitors, context)
|
|
4538
|
-
: undefined,
|
|
4539
|
-
Name: __expectString(output.Name),
|
|
4540
|
-
State: __expectString(output.State),
|
|
4541
|
-
} as any;
|
|
4542
|
-
};
|
|
4543
|
-
|
|
4544
|
-
const deserializeAws_restJson1EnvironmentList = (output: any, context: __SerdeContext): Environment[] => {
|
|
4545
|
-
return (output || [])
|
|
4546
|
-
.filter((e: any) => e != null)
|
|
4547
|
-
.map((entry: any) => {
|
|
4548
|
-
if (entry === null) {
|
|
4549
|
-
return null as any;
|
|
4550
|
-
}
|
|
4551
|
-
return deserializeAws_restJson1Environment(entry, context);
|
|
4552
|
-
});
|
|
4553
|
-
};
|
|
4554
|
-
|
|
4555
|
-
const deserializeAws_restJson1HostedConfigurationVersionSummary = (
|
|
4556
|
-
output: any,
|
|
4557
|
-
context: __SerdeContext
|
|
4558
|
-
): HostedConfigurationVersionSummary => {
|
|
4559
|
-
return {
|
|
4560
|
-
ApplicationId: __expectString(output.ApplicationId),
|
|
4561
|
-
ConfigurationProfileId: __expectString(output.ConfigurationProfileId),
|
|
4562
|
-
ContentType: __expectString(output.ContentType),
|
|
4563
|
-
Description: __expectString(output.Description),
|
|
4564
|
-
VersionNumber: __expectInt32(output.VersionNumber),
|
|
4565
|
-
} as any;
|
|
4566
|
-
};
|
|
4567
|
-
|
|
4568
|
-
const deserializeAws_restJson1HostedConfigurationVersionSummaryList = (
|
|
4569
|
-
output: any,
|
|
4570
|
-
context: __SerdeContext
|
|
4571
|
-
): HostedConfigurationVersionSummary[] => {
|
|
4572
|
-
return (output || [])
|
|
4573
|
-
.filter((e: any) => e != null)
|
|
4574
|
-
.map((entry: any) => {
|
|
4575
|
-
if (entry === null) {
|
|
4576
|
-
return null as any;
|
|
4577
|
-
}
|
|
4578
|
-
return deserializeAws_restJson1HostedConfigurationVersionSummary(entry, context);
|
|
4579
|
-
});
|
|
4580
|
-
};
|
|
4581
|
-
|
|
4582
|
-
const deserializeAws_restJson1Monitor = (output: any, context: __SerdeContext): Monitor => {
|
|
4583
|
-
return {
|
|
4584
|
-
AlarmArn: __expectString(output.AlarmArn),
|
|
4585
|
-
AlarmRoleArn: __expectString(output.AlarmRoleArn),
|
|
4586
|
-
} as any;
|
|
4587
|
-
};
|
|
4588
|
-
|
|
4589
|
-
const deserializeAws_restJson1MonitorList = (output: any, context: __SerdeContext): Monitor[] => {
|
|
4590
|
-
return (output || [])
|
|
4591
|
-
.filter((e: any) => e != null)
|
|
4592
|
-
.map((entry: any) => {
|
|
4593
|
-
if (entry === null) {
|
|
4594
|
-
return null as any;
|
|
4595
|
-
}
|
|
4596
|
-
return deserializeAws_restJson1Monitor(entry, context);
|
|
4597
|
-
});
|
|
4598
|
-
};
|
|
4599
|
-
|
|
4600
|
-
const deserializeAws_restJson1TagMap = (output: any, context: __SerdeContext): { [key: string]: string } => {
|
|
4601
|
-
return Object.entries(output).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
|
|
4602
|
-
if (value === null) {
|
|
4603
|
-
return acc;
|
|
4604
|
-
}
|
|
4605
|
-
return {
|
|
4606
|
-
...acc,
|
|
4607
|
-
[key]: __expectString(value) as any,
|
|
4608
|
-
};
|
|
4609
|
-
}, {});
|
|
4610
|
-
};
|
|
4611
|
-
|
|
4612
|
-
const deserializeAws_restJson1Validator = (output: any, context: __SerdeContext): Validator => {
|
|
4613
|
-
return {
|
|
4614
|
-
Content: __expectString(output.Content),
|
|
4615
|
-
Type: __expectString(output.Type),
|
|
4616
|
-
} as any;
|
|
4617
|
-
};
|
|
4618
|
-
|
|
4619
|
-
const deserializeAws_restJson1ValidatorList = (output: any, context: __SerdeContext): Validator[] => {
|
|
4620
|
-
return (output || [])
|
|
4621
|
-
.filter((e: any) => e != null)
|
|
4622
|
-
.map((entry: any) => {
|
|
4623
|
-
if (entry === null) {
|
|
4624
|
-
return null as any;
|
|
4625
|
-
}
|
|
4626
|
-
return deserializeAws_restJson1Validator(entry, context);
|
|
4627
|
-
});
|
|
4628
|
-
};
|
|
4629
|
-
|
|
4630
|
-
const deserializeAws_restJson1ValidatorTypeList = (
|
|
4631
|
-
output: any,
|
|
4632
|
-
context: __SerdeContext
|
|
4633
|
-
): (ValidatorType | string)[] => {
|
|
4634
|
-
return (output || [])
|
|
4635
|
-
.filter((e: any) => e != null)
|
|
4636
|
-
.map((entry: any) => {
|
|
4637
|
-
if (entry === null) {
|
|
4638
|
-
return null as any;
|
|
4639
|
-
}
|
|
4640
|
-
return __expectString(entry) as any;
|
|
4641
|
-
});
|
|
4642
|
-
};
|
|
4643
|
-
|
|
4644
|
-
const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
|
|
4645
|
-
httpStatusCode: output.statusCode,
|
|
4646
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
4647
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
4648
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
4649
|
-
});
|
|
4650
|
-
|
|
4651
|
-
// Collect low-level response body stream to Uint8Array.
|
|
4652
|
-
const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
|
|
4653
|
-
if (streamBody instanceof Uint8Array) {
|
|
4654
|
-
return Promise.resolve(streamBody);
|
|
4655
|
-
}
|
|
4656
|
-
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
4657
|
-
};
|
|
4658
|
-
|
|
4659
|
-
// Encode Uint8Array data into string with utf-8.
|
|
4660
|
-
const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
|
|
4661
|
-
collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
4662
|
-
|
|
4663
|
-
const isSerializableHeaderValue = (value: any): boolean =>
|
|
4664
|
-
value !== undefined &&
|
|
4665
|
-
value !== null &&
|
|
4666
|
-
value !== "" &&
|
|
4667
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
4668
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
4669
|
-
|
|
4670
|
-
const parseBody = (streamBody: any, context: __SerdeContext): any =>
|
|
4671
|
-
collectBodyString(streamBody, context).then((encoded) => {
|
|
4672
|
-
if (encoded.length) {
|
|
4673
|
-
return JSON.parse(encoded);
|
|
4674
|
-
}
|
|
4675
|
-
return {};
|
|
4676
|
-
});
|
|
4677
|
-
|
|
4678
|
-
/**
|
|
4679
|
-
* Load an error code for the aws.rest-json-1.1 protocol.
|
|
4680
|
-
*/
|
|
4681
|
-
const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => {
|
|
4682
|
-
const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
4683
|
-
|
|
4684
|
-
const sanitizeErrorCode = (rawValue: string): string => {
|
|
4685
|
-
let cleanValue = rawValue;
|
|
4686
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
4687
|
-
cleanValue = cleanValue.split(":")[0];
|
|
4688
|
-
}
|
|
4689
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
4690
|
-
cleanValue = cleanValue.split("#")[1];
|
|
4691
|
-
}
|
|
4692
|
-
return cleanValue;
|
|
4693
|
-
};
|
|
4694
|
-
|
|
4695
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
4696
|
-
if (headerKey !== undefined) {
|
|
4697
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
4698
|
-
}
|
|
4699
|
-
|
|
4700
|
-
if (data.code !== undefined) {
|
|
4701
|
-
return sanitizeErrorCode(data.code);
|
|
4702
|
-
}
|
|
4703
|
-
|
|
4704
|
-
if (data["__type"] !== undefined) {
|
|
4705
|
-
return sanitizeErrorCode(data["__type"]);
|
|
4706
|
-
}
|
|
4707
|
-
|
|
4708
|
-
return "";
|
|
4709
|
-
};
|