@aws-sdk/client-serverlessapplicationrepository 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/ServerlessApplicationRepository.js +0 -23
- package/dist-cjs/ServerlessApplicationRepositoryClient.js +0 -28
- package/dist-cjs/commands/CreateApplicationCommand.js +0 -25
- package/dist-cjs/commands/CreateApplicationVersionCommand.js +0 -25
- package/dist-cjs/commands/CreateCloudFormationChangeSetCommand.js +0 -25
- package/dist-cjs/commands/CreateCloudFormationTemplateCommand.js +0 -25
- package/dist-cjs/commands/DeleteApplicationCommand.js +0 -25
- package/dist-cjs/commands/GetApplicationCommand.js +0 -25
- package/dist-cjs/commands/GetApplicationPolicyCommand.js +0 -25
- package/dist-cjs/commands/GetCloudFormationTemplateCommand.js +0 -25
- package/dist-cjs/commands/ListApplicationDependenciesCommand.js +0 -25
- package/dist-cjs/commands/ListApplicationVersionsCommand.js +0 -25
- package/dist-cjs/commands/ListApplicationsCommand.js +0 -25
- package/dist-cjs/commands/PutApplicationPolicyCommand.js +0 -28
- package/dist-cjs/commands/UnshareApplicationCommand.js +0 -25
- package/dist-cjs/commands/UpdateApplicationCommand.js +0 -25
- package/dist-cjs/commands/index.js +17 -0
- package/dist-cjs/endpoints.js +1 -2
- package/dist-cjs/index.js +4 -21
- package/dist-cjs/models/index.js +0 -1
- package/dist-cjs/models/models_0.js +0 -127
- package/dist-cjs/pagination/Interfaces.js +0 -1
- package/dist-cjs/pagination/ListApplicationDependenciesPaginator.js +0 -11
- package/dist-cjs/pagination/ListApplicationVersionsPaginator.js +0 -11
- package/dist-cjs/pagination/ListApplicationsPaginator.js +0 -11
- package/dist-cjs/pagination/index.js +7 -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/ServerlessApplicationRepository.js +0 -1
- package/dist-es/ServerlessApplicationRepositoryClient.js +0 -1
- package/dist-es/commands/CreateApplicationCommand.js +0 -1
- package/dist-es/commands/CreateApplicationVersionCommand.js +0 -1
- package/dist-es/commands/CreateCloudFormationChangeSetCommand.js +0 -1
- package/dist-es/commands/CreateCloudFormationTemplateCommand.js +0 -1
- package/dist-es/commands/DeleteApplicationCommand.js +0 -1
- package/dist-es/commands/GetApplicationCommand.js +0 -1
- package/dist-es/commands/GetApplicationPolicyCommand.js +0 -1
- package/dist-es/commands/GetCloudFormationTemplateCommand.js +0 -1
- package/dist-es/commands/ListApplicationDependenciesCommand.js +0 -1
- package/dist-es/commands/ListApplicationVersionsCommand.js +0 -1
- package/dist-es/commands/ListApplicationsCommand.js +0 -1
- package/dist-es/commands/PutApplicationPolicyCommand.js +0 -1
- package/dist-es/commands/UnshareApplicationCommand.js +0 -1
- package/dist-es/commands/UpdateApplicationCommand.js +0 -1
- package/dist-es/commands/index.js +14 -0
- package/dist-es/endpoints.js +1 -2
- package/dist-es/index.js +4 -21
- 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/ListApplicationDependenciesPaginator.js +0 -1
- package/dist-es/pagination/ListApplicationVersionsPaginator.js +0 -1
- package/dist-es/pagination/ListApplicationsPaginator.js +0 -1
- package/dist-es/pagination/index.js +4 -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 +14 -0
- package/dist-types/index.d.ts +4 -20
- package/dist-types/pagination/index.d.ts +4 -0
- package/dist-types/ts3.4/ServerlessApplicationRepository.d.ts +15 -67
- package/dist-types/ts3.4/ServerlessApplicationRepositoryClient.d.ts +24 -108
- package/dist-types/ts3.4/commands/CreateApplicationCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/CreateApplicationVersionCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/CreateCloudFormationChangeSetCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/CreateCloudFormationTemplateCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/DeleteApplicationCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/GetApplicationCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/GetApplicationPolicyCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/GetCloudFormationTemplateCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/ListApplicationDependenciesCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/ListApplicationVersionsCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/ListApplicationsCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/PutApplicationPolicyCommand.d.ts +2 -23
- package/dist-types/ts3.4/commands/UnshareApplicationCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/UpdateApplicationCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/index.d.ts +14 -0
- package/dist-types/ts3.4/index.d.ts +4 -20
- package/dist-types/ts3.4/models/models_0.d.ts +254 -895
- package/dist-types/ts3.4/pagination/index.d.ts +4 -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/ServerlessApplicationRepository.js.map +0 -1
- package/dist-cjs/ServerlessApplicationRepositoryClient.js.map +0 -1
- package/dist-cjs/commands/CreateApplicationCommand.js.map +0 -1
- package/dist-cjs/commands/CreateApplicationVersionCommand.js.map +0 -1
- package/dist-cjs/commands/CreateCloudFormationChangeSetCommand.js.map +0 -1
- package/dist-cjs/commands/CreateCloudFormationTemplateCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteApplicationCommand.js.map +0 -1
- package/dist-cjs/commands/GetApplicationCommand.js.map +0 -1
- package/dist-cjs/commands/GetApplicationPolicyCommand.js.map +0 -1
- package/dist-cjs/commands/GetCloudFormationTemplateCommand.js.map +0 -1
- package/dist-cjs/commands/ListApplicationDependenciesCommand.js.map +0 -1
- package/dist-cjs/commands/ListApplicationVersionsCommand.js.map +0 -1
- package/dist-cjs/commands/ListApplicationsCommand.js.map +0 -1
- package/dist-cjs/commands/PutApplicationPolicyCommand.js.map +0 -1
- package/dist-cjs/commands/UnshareApplicationCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateApplicationCommand.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/ListApplicationDependenciesPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListApplicationVersionsPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListApplicationsPaginator.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/ServerlessApplicationRepository.js.map +0 -1
- package/dist-es/ServerlessApplicationRepositoryClient.js.map +0 -1
- package/dist-es/commands/CreateApplicationCommand.js.map +0 -1
- package/dist-es/commands/CreateApplicationVersionCommand.js.map +0 -1
- package/dist-es/commands/CreateCloudFormationChangeSetCommand.js.map +0 -1
- package/dist-es/commands/CreateCloudFormationTemplateCommand.js.map +0 -1
- package/dist-es/commands/DeleteApplicationCommand.js.map +0 -1
- package/dist-es/commands/GetApplicationCommand.js.map +0 -1
- package/dist-es/commands/GetApplicationPolicyCommand.js.map +0 -1
- package/dist-es/commands/GetCloudFormationTemplateCommand.js.map +0 -1
- package/dist-es/commands/ListApplicationDependenciesCommand.js.map +0 -1
- package/dist-es/commands/ListApplicationVersionsCommand.js.map +0 -1
- package/dist-es/commands/ListApplicationsCommand.js.map +0 -1
- package/dist-es/commands/PutApplicationPolicyCommand.js.map +0 -1
- package/dist-es/commands/UnshareApplicationCommand.js.map +0 -1
- package/dist-es/commands/UpdateApplicationCommand.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/ListApplicationDependenciesPaginator.js.map +0 -1
- package/dist-es/pagination/ListApplicationVersionsPaginator.js.map +0 -1
- package/dist-es/pagination/ListApplicationsPaginator.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/ServerlessApplicationRepository.ts +0 -548
- package/src/ServerlessApplicationRepositoryClient.ts +0 -322
- package/src/commands/CreateApplicationCommand.ts +0 -99
- package/src/commands/CreateApplicationVersionCommand.ts +0 -99
- package/src/commands/CreateCloudFormationChangeSetCommand.ts +0 -104
- package/src/commands/CreateCloudFormationTemplateCommand.ts +0 -104
- package/src/commands/DeleteApplicationCommand.ts +0 -99
- package/src/commands/GetApplicationCommand.ts +0 -99
- package/src/commands/GetApplicationPolicyCommand.ts +0 -99
- package/src/commands/GetCloudFormationTemplateCommand.ts +0 -102
- package/src/commands/ListApplicationDependenciesCommand.ts +0 -104
- package/src/commands/ListApplicationVersionsCommand.ts +0 -99
- package/src/commands/ListApplicationsCommand.ts +0 -99
- package/src/commands/PutApplicationPolicyCommand.ts +0 -102
- package/src/commands/UnshareApplicationCommand.ts +0 -99
- package/src/commands/UpdateApplicationCommand.ts +0 -99
- package/src/endpoints.ts +0 -66
- package/src/index.ts +0 -21
- package/src/models/index.ts +0 -1
- package/src/models/models_0.ts +0 -1649
- package/src/pagination/Interfaces.ts +0 -8
- package/src/pagination/ListApplicationDependenciesPaginator.ts +0 -61
- package/src/pagination/ListApplicationVersionsPaginator.ts +0 -61
- package/src/pagination/ListApplicationsPaginator.ts +0 -61
- package/src/protocols/Aws_restJson1.ts +0 -2546
- 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,2546 +0,0 @@
|
|
|
1
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
|
|
2
|
-
import {
|
|
3
|
-
expectBoolean as __expectBoolean,
|
|
4
|
-
expectInt32 as __expectInt32,
|
|
5
|
-
expectNonNull as __expectNonNull,
|
|
6
|
-
expectObject as __expectObject,
|
|
7
|
-
expectString as __expectString,
|
|
8
|
-
extendedEncodeURIComponent as __extendedEncodeURIComponent,
|
|
9
|
-
} from "@aws-sdk/smithy-client";
|
|
10
|
-
import {
|
|
11
|
-
Endpoint as __Endpoint,
|
|
12
|
-
MetadataBearer as __MetadataBearer,
|
|
13
|
-
ResponseMetadata as __ResponseMetadata,
|
|
14
|
-
SerdeContext as __SerdeContext,
|
|
15
|
-
SmithyException as __SmithyException,
|
|
16
|
-
} from "@aws-sdk/types";
|
|
17
|
-
|
|
18
|
-
import { CreateApplicationCommandInput, CreateApplicationCommandOutput } from "../commands/CreateApplicationCommand";
|
|
19
|
-
import {
|
|
20
|
-
CreateApplicationVersionCommandInput,
|
|
21
|
-
CreateApplicationVersionCommandOutput,
|
|
22
|
-
} from "../commands/CreateApplicationVersionCommand";
|
|
23
|
-
import {
|
|
24
|
-
CreateCloudFormationChangeSetCommandInput,
|
|
25
|
-
CreateCloudFormationChangeSetCommandOutput,
|
|
26
|
-
} from "../commands/CreateCloudFormationChangeSetCommand";
|
|
27
|
-
import {
|
|
28
|
-
CreateCloudFormationTemplateCommandInput,
|
|
29
|
-
CreateCloudFormationTemplateCommandOutput,
|
|
30
|
-
} from "../commands/CreateCloudFormationTemplateCommand";
|
|
31
|
-
import { DeleteApplicationCommandInput, DeleteApplicationCommandOutput } from "../commands/DeleteApplicationCommand";
|
|
32
|
-
import { GetApplicationCommandInput, GetApplicationCommandOutput } from "../commands/GetApplicationCommand";
|
|
33
|
-
import {
|
|
34
|
-
GetApplicationPolicyCommandInput,
|
|
35
|
-
GetApplicationPolicyCommandOutput,
|
|
36
|
-
} from "../commands/GetApplicationPolicyCommand";
|
|
37
|
-
import {
|
|
38
|
-
GetCloudFormationTemplateCommandInput,
|
|
39
|
-
GetCloudFormationTemplateCommandOutput,
|
|
40
|
-
} from "../commands/GetCloudFormationTemplateCommand";
|
|
41
|
-
import {
|
|
42
|
-
ListApplicationDependenciesCommandInput,
|
|
43
|
-
ListApplicationDependenciesCommandOutput,
|
|
44
|
-
} from "../commands/ListApplicationDependenciesCommand";
|
|
45
|
-
import { ListApplicationsCommandInput, ListApplicationsCommandOutput } from "../commands/ListApplicationsCommand";
|
|
46
|
-
import {
|
|
47
|
-
ListApplicationVersionsCommandInput,
|
|
48
|
-
ListApplicationVersionsCommandOutput,
|
|
49
|
-
} from "../commands/ListApplicationVersionsCommand";
|
|
50
|
-
import {
|
|
51
|
-
PutApplicationPolicyCommandInput,
|
|
52
|
-
PutApplicationPolicyCommandOutput,
|
|
53
|
-
} from "../commands/PutApplicationPolicyCommand";
|
|
54
|
-
import { UnshareApplicationCommandInput, UnshareApplicationCommandOutput } from "../commands/UnshareApplicationCommand";
|
|
55
|
-
import { UpdateApplicationCommandInput, UpdateApplicationCommandOutput } from "../commands/UpdateApplicationCommand";
|
|
56
|
-
import {
|
|
57
|
-
ApplicationDependencySummary,
|
|
58
|
-
ApplicationPolicyStatement,
|
|
59
|
-
ApplicationSummary,
|
|
60
|
-
BadRequestException,
|
|
61
|
-
Capability,
|
|
62
|
-
ConflictException,
|
|
63
|
-
ForbiddenException,
|
|
64
|
-
InternalServerErrorException,
|
|
65
|
-
NotFoundException,
|
|
66
|
-
ParameterDefinition,
|
|
67
|
-
ParameterValue,
|
|
68
|
-
RollbackConfiguration,
|
|
69
|
-
RollbackTrigger,
|
|
70
|
-
Tag,
|
|
71
|
-
TooManyRequestsException,
|
|
72
|
-
Version,
|
|
73
|
-
VersionSummary,
|
|
74
|
-
} from "../models/models_0";
|
|
75
|
-
|
|
76
|
-
export const serializeAws_restJson1CreateApplicationCommand = async (
|
|
77
|
-
input: CreateApplicationCommandInput,
|
|
78
|
-
context: __SerdeContext
|
|
79
|
-
): Promise<__HttpRequest> => {
|
|
80
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
81
|
-
const headers: any = {
|
|
82
|
-
"content-type": "application/json",
|
|
83
|
-
};
|
|
84
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications";
|
|
85
|
-
let body: any;
|
|
86
|
-
body = JSON.stringify({
|
|
87
|
-
...(input.Author !== undefined && input.Author !== null && { author: input.Author }),
|
|
88
|
-
...(input.Description !== undefined && input.Description !== null && { description: input.Description }),
|
|
89
|
-
...(input.HomePageUrl !== undefined && input.HomePageUrl !== null && { homePageUrl: input.HomePageUrl }),
|
|
90
|
-
...(input.Labels !== undefined &&
|
|
91
|
-
input.Labels !== null && { labels: serializeAws_restJson1__listOf__string(input.Labels, context) }),
|
|
92
|
-
...(input.LicenseBody !== undefined && input.LicenseBody !== null && { licenseBody: input.LicenseBody }),
|
|
93
|
-
...(input.LicenseUrl !== undefined && input.LicenseUrl !== null && { licenseUrl: input.LicenseUrl }),
|
|
94
|
-
...(input.Name !== undefined && input.Name !== null && { name: input.Name }),
|
|
95
|
-
...(input.ReadmeBody !== undefined && input.ReadmeBody !== null && { readmeBody: input.ReadmeBody }),
|
|
96
|
-
...(input.ReadmeUrl !== undefined && input.ReadmeUrl !== null && { readmeUrl: input.ReadmeUrl }),
|
|
97
|
-
...(input.SemanticVersion !== undefined &&
|
|
98
|
-
input.SemanticVersion !== null && { semanticVersion: input.SemanticVersion }),
|
|
99
|
-
...(input.SourceCodeArchiveUrl !== undefined &&
|
|
100
|
-
input.SourceCodeArchiveUrl !== null && { sourceCodeArchiveUrl: input.SourceCodeArchiveUrl }),
|
|
101
|
-
...(input.SourceCodeUrl !== undefined && input.SourceCodeUrl !== null && { sourceCodeUrl: input.SourceCodeUrl }),
|
|
102
|
-
...(input.SpdxLicenseId !== undefined && input.SpdxLicenseId !== null && { spdxLicenseId: input.SpdxLicenseId }),
|
|
103
|
-
...(input.TemplateBody !== undefined && input.TemplateBody !== null && { templateBody: input.TemplateBody }),
|
|
104
|
-
...(input.TemplateUrl !== undefined && input.TemplateUrl !== null && { templateUrl: input.TemplateUrl }),
|
|
105
|
-
});
|
|
106
|
-
return new __HttpRequest({
|
|
107
|
-
protocol,
|
|
108
|
-
hostname,
|
|
109
|
-
port,
|
|
110
|
-
method: "POST",
|
|
111
|
-
headers,
|
|
112
|
-
path: resolvedPath,
|
|
113
|
-
body,
|
|
114
|
-
});
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
export const serializeAws_restJson1CreateApplicationVersionCommand = async (
|
|
118
|
-
input: CreateApplicationVersionCommandInput,
|
|
119
|
-
context: __SerdeContext
|
|
120
|
-
): Promise<__HttpRequest> => {
|
|
121
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
122
|
-
const headers: any = {
|
|
123
|
-
"content-type": "application/json",
|
|
124
|
-
};
|
|
125
|
-
let resolvedPath =
|
|
126
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
127
|
-
"/applications/{ApplicationId}/versions/{SemanticVersion}";
|
|
128
|
-
if (input.ApplicationId !== undefined) {
|
|
129
|
-
const labelValue: string = input.ApplicationId;
|
|
130
|
-
if (labelValue.length <= 0) {
|
|
131
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
132
|
-
}
|
|
133
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
134
|
-
} else {
|
|
135
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
136
|
-
}
|
|
137
|
-
if (input.SemanticVersion !== undefined) {
|
|
138
|
-
const labelValue: string = input.SemanticVersion;
|
|
139
|
-
if (labelValue.length <= 0) {
|
|
140
|
-
throw new Error("Empty value provided for input HTTP label: SemanticVersion.");
|
|
141
|
-
}
|
|
142
|
-
resolvedPath = resolvedPath.replace("{SemanticVersion}", __extendedEncodeURIComponent(labelValue));
|
|
143
|
-
} else {
|
|
144
|
-
throw new Error("No value provided for input HTTP label: SemanticVersion.");
|
|
145
|
-
}
|
|
146
|
-
let body: any;
|
|
147
|
-
body = JSON.stringify({
|
|
148
|
-
...(input.SourceCodeArchiveUrl !== undefined &&
|
|
149
|
-
input.SourceCodeArchiveUrl !== null && { sourceCodeArchiveUrl: input.SourceCodeArchiveUrl }),
|
|
150
|
-
...(input.SourceCodeUrl !== undefined && input.SourceCodeUrl !== null && { sourceCodeUrl: input.SourceCodeUrl }),
|
|
151
|
-
...(input.TemplateBody !== undefined && input.TemplateBody !== null && { templateBody: input.TemplateBody }),
|
|
152
|
-
...(input.TemplateUrl !== undefined && input.TemplateUrl !== null && { templateUrl: input.TemplateUrl }),
|
|
153
|
-
});
|
|
154
|
-
return new __HttpRequest({
|
|
155
|
-
protocol,
|
|
156
|
-
hostname,
|
|
157
|
-
port,
|
|
158
|
-
method: "PUT",
|
|
159
|
-
headers,
|
|
160
|
-
path: resolvedPath,
|
|
161
|
-
body,
|
|
162
|
-
});
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
export const serializeAws_restJson1CreateCloudFormationChangeSetCommand = async (
|
|
166
|
-
input: CreateCloudFormationChangeSetCommandInput,
|
|
167
|
-
context: __SerdeContext
|
|
168
|
-
): Promise<__HttpRequest> => {
|
|
169
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
170
|
-
const headers: any = {
|
|
171
|
-
"content-type": "application/json",
|
|
172
|
-
};
|
|
173
|
-
let resolvedPath =
|
|
174
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}/changesets";
|
|
175
|
-
if (input.ApplicationId !== undefined) {
|
|
176
|
-
const labelValue: string = input.ApplicationId;
|
|
177
|
-
if (labelValue.length <= 0) {
|
|
178
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
179
|
-
}
|
|
180
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
181
|
-
} else {
|
|
182
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
183
|
-
}
|
|
184
|
-
let body: any;
|
|
185
|
-
body = JSON.stringify({
|
|
186
|
-
...(input.Capabilities !== undefined &&
|
|
187
|
-
input.Capabilities !== null && {
|
|
188
|
-
capabilities: serializeAws_restJson1__listOf__string(input.Capabilities, context),
|
|
189
|
-
}),
|
|
190
|
-
...(input.ChangeSetName !== undefined && input.ChangeSetName !== null && { changeSetName: input.ChangeSetName }),
|
|
191
|
-
...(input.ClientToken !== undefined && input.ClientToken !== null && { clientToken: input.ClientToken }),
|
|
192
|
-
...(input.Description !== undefined && input.Description !== null && { description: input.Description }),
|
|
193
|
-
...(input.NotificationArns !== undefined &&
|
|
194
|
-
input.NotificationArns !== null && {
|
|
195
|
-
notificationArns: serializeAws_restJson1__listOf__string(input.NotificationArns, context),
|
|
196
|
-
}),
|
|
197
|
-
...(input.ParameterOverrides !== undefined &&
|
|
198
|
-
input.ParameterOverrides !== null && {
|
|
199
|
-
parameterOverrides: serializeAws_restJson1__listOfParameterValue(input.ParameterOverrides, context),
|
|
200
|
-
}),
|
|
201
|
-
...(input.ResourceTypes !== undefined &&
|
|
202
|
-
input.ResourceTypes !== null && {
|
|
203
|
-
resourceTypes: serializeAws_restJson1__listOf__string(input.ResourceTypes, context),
|
|
204
|
-
}),
|
|
205
|
-
...(input.RollbackConfiguration !== undefined &&
|
|
206
|
-
input.RollbackConfiguration !== null && {
|
|
207
|
-
rollbackConfiguration: serializeAws_restJson1RollbackConfiguration(input.RollbackConfiguration, context),
|
|
208
|
-
}),
|
|
209
|
-
...(input.SemanticVersion !== undefined &&
|
|
210
|
-
input.SemanticVersion !== null && { semanticVersion: input.SemanticVersion }),
|
|
211
|
-
...(input.StackName !== undefined && input.StackName !== null && { stackName: input.StackName }),
|
|
212
|
-
...(input.Tags !== undefined &&
|
|
213
|
-
input.Tags !== null && { tags: serializeAws_restJson1__listOfTag(input.Tags, context) }),
|
|
214
|
-
...(input.TemplateId !== undefined && input.TemplateId !== null && { templateId: input.TemplateId }),
|
|
215
|
-
});
|
|
216
|
-
return new __HttpRequest({
|
|
217
|
-
protocol,
|
|
218
|
-
hostname,
|
|
219
|
-
port,
|
|
220
|
-
method: "POST",
|
|
221
|
-
headers,
|
|
222
|
-
path: resolvedPath,
|
|
223
|
-
body,
|
|
224
|
-
});
|
|
225
|
-
};
|
|
226
|
-
|
|
227
|
-
export const serializeAws_restJson1CreateCloudFormationTemplateCommand = async (
|
|
228
|
-
input: CreateCloudFormationTemplateCommandInput,
|
|
229
|
-
context: __SerdeContext
|
|
230
|
-
): Promise<__HttpRequest> => {
|
|
231
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
232
|
-
const headers: any = {
|
|
233
|
-
"content-type": "application/json",
|
|
234
|
-
};
|
|
235
|
-
let resolvedPath =
|
|
236
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}/templates";
|
|
237
|
-
if (input.ApplicationId !== undefined) {
|
|
238
|
-
const labelValue: string = input.ApplicationId;
|
|
239
|
-
if (labelValue.length <= 0) {
|
|
240
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
241
|
-
}
|
|
242
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
243
|
-
} else {
|
|
244
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
245
|
-
}
|
|
246
|
-
let body: any;
|
|
247
|
-
body = JSON.stringify({
|
|
248
|
-
...(input.SemanticVersion !== undefined &&
|
|
249
|
-
input.SemanticVersion !== null && { semanticVersion: input.SemanticVersion }),
|
|
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_restJson1DeleteApplicationCommand = async (
|
|
263
|
-
input: DeleteApplicationCommandInput,
|
|
264
|
-
context: __SerdeContext
|
|
265
|
-
): Promise<__HttpRequest> => {
|
|
266
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
267
|
-
const headers: any = {};
|
|
268
|
-
let resolvedPath =
|
|
269
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}";
|
|
270
|
-
if (input.ApplicationId !== undefined) {
|
|
271
|
-
const labelValue: string = input.ApplicationId;
|
|
272
|
-
if (labelValue.length <= 0) {
|
|
273
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
274
|
-
}
|
|
275
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
276
|
-
} else {
|
|
277
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
278
|
-
}
|
|
279
|
-
let body: any;
|
|
280
|
-
return new __HttpRequest({
|
|
281
|
-
protocol,
|
|
282
|
-
hostname,
|
|
283
|
-
port,
|
|
284
|
-
method: "DELETE",
|
|
285
|
-
headers,
|
|
286
|
-
path: resolvedPath,
|
|
287
|
-
body,
|
|
288
|
-
});
|
|
289
|
-
};
|
|
290
|
-
|
|
291
|
-
export const serializeAws_restJson1GetApplicationCommand = async (
|
|
292
|
-
input: GetApplicationCommandInput,
|
|
293
|
-
context: __SerdeContext
|
|
294
|
-
): Promise<__HttpRequest> => {
|
|
295
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
296
|
-
const headers: any = {};
|
|
297
|
-
let resolvedPath =
|
|
298
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}";
|
|
299
|
-
if (input.ApplicationId !== undefined) {
|
|
300
|
-
const labelValue: string = input.ApplicationId;
|
|
301
|
-
if (labelValue.length <= 0) {
|
|
302
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
303
|
-
}
|
|
304
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
305
|
-
} else {
|
|
306
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
307
|
-
}
|
|
308
|
-
const query: any = {
|
|
309
|
-
...(input.SemanticVersion !== undefined && { semanticVersion: input.SemanticVersion }),
|
|
310
|
-
};
|
|
311
|
-
let body: any;
|
|
312
|
-
return new __HttpRequest({
|
|
313
|
-
protocol,
|
|
314
|
-
hostname,
|
|
315
|
-
port,
|
|
316
|
-
method: "GET",
|
|
317
|
-
headers,
|
|
318
|
-
path: resolvedPath,
|
|
319
|
-
query,
|
|
320
|
-
body,
|
|
321
|
-
});
|
|
322
|
-
};
|
|
323
|
-
|
|
324
|
-
export const serializeAws_restJson1GetApplicationPolicyCommand = async (
|
|
325
|
-
input: GetApplicationPolicyCommandInput,
|
|
326
|
-
context: __SerdeContext
|
|
327
|
-
): Promise<__HttpRequest> => {
|
|
328
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
329
|
-
const headers: any = {};
|
|
330
|
-
let resolvedPath =
|
|
331
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}/policy";
|
|
332
|
-
if (input.ApplicationId !== undefined) {
|
|
333
|
-
const labelValue: string = input.ApplicationId;
|
|
334
|
-
if (labelValue.length <= 0) {
|
|
335
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
336
|
-
}
|
|
337
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
338
|
-
} else {
|
|
339
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
340
|
-
}
|
|
341
|
-
let body: any;
|
|
342
|
-
return new __HttpRequest({
|
|
343
|
-
protocol,
|
|
344
|
-
hostname,
|
|
345
|
-
port,
|
|
346
|
-
method: "GET",
|
|
347
|
-
headers,
|
|
348
|
-
path: resolvedPath,
|
|
349
|
-
body,
|
|
350
|
-
});
|
|
351
|
-
};
|
|
352
|
-
|
|
353
|
-
export const serializeAws_restJson1GetCloudFormationTemplateCommand = async (
|
|
354
|
-
input: GetCloudFormationTemplateCommandInput,
|
|
355
|
-
context: __SerdeContext
|
|
356
|
-
): Promise<__HttpRequest> => {
|
|
357
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
358
|
-
const headers: any = {};
|
|
359
|
-
let resolvedPath =
|
|
360
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
361
|
-
"/applications/{ApplicationId}/templates/{TemplateId}";
|
|
362
|
-
if (input.ApplicationId !== undefined) {
|
|
363
|
-
const labelValue: string = input.ApplicationId;
|
|
364
|
-
if (labelValue.length <= 0) {
|
|
365
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
366
|
-
}
|
|
367
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
368
|
-
} else {
|
|
369
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
370
|
-
}
|
|
371
|
-
if (input.TemplateId !== undefined) {
|
|
372
|
-
const labelValue: string = input.TemplateId;
|
|
373
|
-
if (labelValue.length <= 0) {
|
|
374
|
-
throw new Error("Empty value provided for input HTTP label: TemplateId.");
|
|
375
|
-
}
|
|
376
|
-
resolvedPath = resolvedPath.replace("{TemplateId}", __extendedEncodeURIComponent(labelValue));
|
|
377
|
-
} else {
|
|
378
|
-
throw new Error("No value provided for input HTTP label: TemplateId.");
|
|
379
|
-
}
|
|
380
|
-
let body: any;
|
|
381
|
-
return new __HttpRequest({
|
|
382
|
-
protocol,
|
|
383
|
-
hostname,
|
|
384
|
-
port,
|
|
385
|
-
method: "GET",
|
|
386
|
-
headers,
|
|
387
|
-
path: resolvedPath,
|
|
388
|
-
body,
|
|
389
|
-
});
|
|
390
|
-
};
|
|
391
|
-
|
|
392
|
-
export const serializeAws_restJson1ListApplicationDependenciesCommand = async (
|
|
393
|
-
input: ListApplicationDependenciesCommandInput,
|
|
394
|
-
context: __SerdeContext
|
|
395
|
-
): Promise<__HttpRequest> => {
|
|
396
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
397
|
-
const headers: any = {};
|
|
398
|
-
let resolvedPath =
|
|
399
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
400
|
-
"/applications/{ApplicationId}/dependencies";
|
|
401
|
-
if (input.ApplicationId !== undefined) {
|
|
402
|
-
const labelValue: string = input.ApplicationId;
|
|
403
|
-
if (labelValue.length <= 0) {
|
|
404
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
405
|
-
}
|
|
406
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
407
|
-
} else {
|
|
408
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
409
|
-
}
|
|
410
|
-
const query: any = {
|
|
411
|
-
...(input.MaxItems !== undefined && { maxItems: input.MaxItems.toString() }),
|
|
412
|
-
...(input.NextToken !== undefined && { nextToken: input.NextToken }),
|
|
413
|
-
...(input.SemanticVersion !== undefined && { semanticVersion: input.SemanticVersion }),
|
|
414
|
-
};
|
|
415
|
-
let body: any;
|
|
416
|
-
return new __HttpRequest({
|
|
417
|
-
protocol,
|
|
418
|
-
hostname,
|
|
419
|
-
port,
|
|
420
|
-
method: "GET",
|
|
421
|
-
headers,
|
|
422
|
-
path: resolvedPath,
|
|
423
|
-
query,
|
|
424
|
-
body,
|
|
425
|
-
});
|
|
426
|
-
};
|
|
427
|
-
|
|
428
|
-
export const serializeAws_restJson1ListApplicationsCommand = async (
|
|
429
|
-
input: ListApplicationsCommandInput,
|
|
430
|
-
context: __SerdeContext
|
|
431
|
-
): Promise<__HttpRequest> => {
|
|
432
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
433
|
-
const headers: any = {};
|
|
434
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications";
|
|
435
|
-
const query: any = {
|
|
436
|
-
...(input.MaxItems !== undefined && { maxItems: input.MaxItems.toString() }),
|
|
437
|
-
...(input.NextToken !== undefined && { nextToken: input.NextToken }),
|
|
438
|
-
};
|
|
439
|
-
let body: any;
|
|
440
|
-
return new __HttpRequest({
|
|
441
|
-
protocol,
|
|
442
|
-
hostname,
|
|
443
|
-
port,
|
|
444
|
-
method: "GET",
|
|
445
|
-
headers,
|
|
446
|
-
path: resolvedPath,
|
|
447
|
-
query,
|
|
448
|
-
body,
|
|
449
|
-
});
|
|
450
|
-
};
|
|
451
|
-
|
|
452
|
-
export const serializeAws_restJson1ListApplicationVersionsCommand = async (
|
|
453
|
-
input: ListApplicationVersionsCommandInput,
|
|
454
|
-
context: __SerdeContext
|
|
455
|
-
): Promise<__HttpRequest> => {
|
|
456
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
457
|
-
const headers: any = {};
|
|
458
|
-
let resolvedPath =
|
|
459
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}/versions";
|
|
460
|
-
if (input.ApplicationId !== undefined) {
|
|
461
|
-
const labelValue: string = input.ApplicationId;
|
|
462
|
-
if (labelValue.length <= 0) {
|
|
463
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
464
|
-
}
|
|
465
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
466
|
-
} else {
|
|
467
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
468
|
-
}
|
|
469
|
-
const query: any = {
|
|
470
|
-
...(input.MaxItems !== undefined && { maxItems: input.MaxItems.toString() }),
|
|
471
|
-
...(input.NextToken !== undefined && { nextToken: input.NextToken }),
|
|
472
|
-
};
|
|
473
|
-
let body: any;
|
|
474
|
-
return new __HttpRequest({
|
|
475
|
-
protocol,
|
|
476
|
-
hostname,
|
|
477
|
-
port,
|
|
478
|
-
method: "GET",
|
|
479
|
-
headers,
|
|
480
|
-
path: resolvedPath,
|
|
481
|
-
query,
|
|
482
|
-
body,
|
|
483
|
-
});
|
|
484
|
-
};
|
|
485
|
-
|
|
486
|
-
export const serializeAws_restJson1PutApplicationPolicyCommand = async (
|
|
487
|
-
input: PutApplicationPolicyCommandInput,
|
|
488
|
-
context: __SerdeContext
|
|
489
|
-
): Promise<__HttpRequest> => {
|
|
490
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
491
|
-
const headers: any = {
|
|
492
|
-
"content-type": "application/json",
|
|
493
|
-
};
|
|
494
|
-
let resolvedPath =
|
|
495
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}/policy";
|
|
496
|
-
if (input.ApplicationId !== undefined) {
|
|
497
|
-
const labelValue: string = input.ApplicationId;
|
|
498
|
-
if (labelValue.length <= 0) {
|
|
499
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
500
|
-
}
|
|
501
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
502
|
-
} else {
|
|
503
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
504
|
-
}
|
|
505
|
-
let body: any;
|
|
506
|
-
body = JSON.stringify({
|
|
507
|
-
...(input.Statements !== undefined &&
|
|
508
|
-
input.Statements !== null && {
|
|
509
|
-
statements: serializeAws_restJson1__listOfApplicationPolicyStatement(input.Statements, context),
|
|
510
|
-
}),
|
|
511
|
-
});
|
|
512
|
-
return new __HttpRequest({
|
|
513
|
-
protocol,
|
|
514
|
-
hostname,
|
|
515
|
-
port,
|
|
516
|
-
method: "PUT",
|
|
517
|
-
headers,
|
|
518
|
-
path: resolvedPath,
|
|
519
|
-
body,
|
|
520
|
-
});
|
|
521
|
-
};
|
|
522
|
-
|
|
523
|
-
export const serializeAws_restJson1UnshareApplicationCommand = async (
|
|
524
|
-
input: UnshareApplicationCommandInput,
|
|
525
|
-
context: __SerdeContext
|
|
526
|
-
): Promise<__HttpRequest> => {
|
|
527
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
528
|
-
const headers: any = {
|
|
529
|
-
"content-type": "application/json",
|
|
530
|
-
};
|
|
531
|
-
let resolvedPath =
|
|
532
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}/unshare";
|
|
533
|
-
if (input.ApplicationId !== undefined) {
|
|
534
|
-
const labelValue: string = input.ApplicationId;
|
|
535
|
-
if (labelValue.length <= 0) {
|
|
536
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
537
|
-
}
|
|
538
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
539
|
-
} else {
|
|
540
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
541
|
-
}
|
|
542
|
-
let body: any;
|
|
543
|
-
body = JSON.stringify({
|
|
544
|
-
...(input.OrganizationId !== undefined &&
|
|
545
|
-
input.OrganizationId !== null && { organizationId: input.OrganizationId }),
|
|
546
|
-
});
|
|
547
|
-
return new __HttpRequest({
|
|
548
|
-
protocol,
|
|
549
|
-
hostname,
|
|
550
|
-
port,
|
|
551
|
-
method: "POST",
|
|
552
|
-
headers,
|
|
553
|
-
path: resolvedPath,
|
|
554
|
-
body,
|
|
555
|
-
});
|
|
556
|
-
};
|
|
557
|
-
|
|
558
|
-
export const serializeAws_restJson1UpdateApplicationCommand = async (
|
|
559
|
-
input: UpdateApplicationCommandInput,
|
|
560
|
-
context: __SerdeContext
|
|
561
|
-
): Promise<__HttpRequest> => {
|
|
562
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
563
|
-
const headers: any = {
|
|
564
|
-
"content-type": "application/json",
|
|
565
|
-
};
|
|
566
|
-
let resolvedPath =
|
|
567
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}";
|
|
568
|
-
if (input.ApplicationId !== undefined) {
|
|
569
|
-
const labelValue: string = input.ApplicationId;
|
|
570
|
-
if (labelValue.length <= 0) {
|
|
571
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
572
|
-
}
|
|
573
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
574
|
-
} else {
|
|
575
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
576
|
-
}
|
|
577
|
-
let body: any;
|
|
578
|
-
body = JSON.stringify({
|
|
579
|
-
...(input.Author !== undefined && input.Author !== null && { author: input.Author }),
|
|
580
|
-
...(input.Description !== undefined && input.Description !== null && { description: input.Description }),
|
|
581
|
-
...(input.HomePageUrl !== undefined && input.HomePageUrl !== null && { homePageUrl: input.HomePageUrl }),
|
|
582
|
-
...(input.Labels !== undefined &&
|
|
583
|
-
input.Labels !== null && { labels: serializeAws_restJson1__listOf__string(input.Labels, context) }),
|
|
584
|
-
...(input.ReadmeBody !== undefined && input.ReadmeBody !== null && { readmeBody: input.ReadmeBody }),
|
|
585
|
-
...(input.ReadmeUrl !== undefined && input.ReadmeUrl !== null && { readmeUrl: input.ReadmeUrl }),
|
|
586
|
-
});
|
|
587
|
-
return new __HttpRequest({
|
|
588
|
-
protocol,
|
|
589
|
-
hostname,
|
|
590
|
-
port,
|
|
591
|
-
method: "PATCH",
|
|
592
|
-
headers,
|
|
593
|
-
path: resolvedPath,
|
|
594
|
-
body,
|
|
595
|
-
});
|
|
596
|
-
};
|
|
597
|
-
|
|
598
|
-
export const deserializeAws_restJson1CreateApplicationCommand = async (
|
|
599
|
-
output: __HttpResponse,
|
|
600
|
-
context: __SerdeContext
|
|
601
|
-
): Promise<CreateApplicationCommandOutput> => {
|
|
602
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
603
|
-
return deserializeAws_restJson1CreateApplicationCommandError(output, context);
|
|
604
|
-
}
|
|
605
|
-
const contents: CreateApplicationCommandOutput = {
|
|
606
|
-
$metadata: deserializeMetadata(output),
|
|
607
|
-
ApplicationId: undefined,
|
|
608
|
-
Author: undefined,
|
|
609
|
-
CreationTime: undefined,
|
|
610
|
-
Description: undefined,
|
|
611
|
-
HomePageUrl: undefined,
|
|
612
|
-
IsVerifiedAuthor: undefined,
|
|
613
|
-
Labels: undefined,
|
|
614
|
-
LicenseUrl: undefined,
|
|
615
|
-
Name: undefined,
|
|
616
|
-
ReadmeUrl: undefined,
|
|
617
|
-
SpdxLicenseId: undefined,
|
|
618
|
-
VerifiedAuthorUrl: undefined,
|
|
619
|
-
Version: undefined,
|
|
620
|
-
};
|
|
621
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
622
|
-
if (data.applicationId !== undefined && data.applicationId !== null) {
|
|
623
|
-
contents.ApplicationId = __expectString(data.applicationId);
|
|
624
|
-
}
|
|
625
|
-
if (data.author !== undefined && data.author !== null) {
|
|
626
|
-
contents.Author = __expectString(data.author);
|
|
627
|
-
}
|
|
628
|
-
if (data.creationTime !== undefined && data.creationTime !== null) {
|
|
629
|
-
contents.CreationTime = __expectString(data.creationTime);
|
|
630
|
-
}
|
|
631
|
-
if (data.description !== undefined && data.description !== null) {
|
|
632
|
-
contents.Description = __expectString(data.description);
|
|
633
|
-
}
|
|
634
|
-
if (data.homePageUrl !== undefined && data.homePageUrl !== null) {
|
|
635
|
-
contents.HomePageUrl = __expectString(data.homePageUrl);
|
|
636
|
-
}
|
|
637
|
-
if (data.isVerifiedAuthor !== undefined && data.isVerifiedAuthor !== null) {
|
|
638
|
-
contents.IsVerifiedAuthor = __expectBoolean(data.isVerifiedAuthor);
|
|
639
|
-
}
|
|
640
|
-
if (data.labels !== undefined && data.labels !== null) {
|
|
641
|
-
contents.Labels = deserializeAws_restJson1__listOf__string(data.labels, context);
|
|
642
|
-
}
|
|
643
|
-
if (data.licenseUrl !== undefined && data.licenseUrl !== null) {
|
|
644
|
-
contents.LicenseUrl = __expectString(data.licenseUrl);
|
|
645
|
-
}
|
|
646
|
-
if (data.name !== undefined && data.name !== null) {
|
|
647
|
-
contents.Name = __expectString(data.name);
|
|
648
|
-
}
|
|
649
|
-
if (data.readmeUrl !== undefined && data.readmeUrl !== null) {
|
|
650
|
-
contents.ReadmeUrl = __expectString(data.readmeUrl);
|
|
651
|
-
}
|
|
652
|
-
if (data.spdxLicenseId !== undefined && data.spdxLicenseId !== null) {
|
|
653
|
-
contents.SpdxLicenseId = __expectString(data.spdxLicenseId);
|
|
654
|
-
}
|
|
655
|
-
if (data.verifiedAuthorUrl !== undefined && data.verifiedAuthorUrl !== null) {
|
|
656
|
-
contents.VerifiedAuthorUrl = __expectString(data.verifiedAuthorUrl);
|
|
657
|
-
}
|
|
658
|
-
if (data.version !== undefined && data.version !== null) {
|
|
659
|
-
contents.Version = deserializeAws_restJson1Version(data.version, context);
|
|
660
|
-
}
|
|
661
|
-
return Promise.resolve(contents);
|
|
662
|
-
};
|
|
663
|
-
|
|
664
|
-
const deserializeAws_restJson1CreateApplicationCommandError = async (
|
|
665
|
-
output: __HttpResponse,
|
|
666
|
-
context: __SerdeContext
|
|
667
|
-
): Promise<CreateApplicationCommandOutput> => {
|
|
668
|
-
const parsedOutput: any = {
|
|
669
|
-
...output,
|
|
670
|
-
body: await parseBody(output.body, context),
|
|
671
|
-
};
|
|
672
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
673
|
-
let errorCode = "UnknownError";
|
|
674
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
675
|
-
switch (errorCode) {
|
|
676
|
-
case "BadRequestException":
|
|
677
|
-
case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
|
|
678
|
-
response = {
|
|
679
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
680
|
-
name: errorCode,
|
|
681
|
-
$metadata: deserializeMetadata(output),
|
|
682
|
-
};
|
|
683
|
-
break;
|
|
684
|
-
case "ConflictException":
|
|
685
|
-
case "com.amazonaws.serverlessapplicationrepository#ConflictException":
|
|
686
|
-
response = {
|
|
687
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
688
|
-
name: errorCode,
|
|
689
|
-
$metadata: deserializeMetadata(output),
|
|
690
|
-
};
|
|
691
|
-
break;
|
|
692
|
-
case "ForbiddenException":
|
|
693
|
-
case "com.amazonaws.serverlessapplicationrepository#ForbiddenException":
|
|
694
|
-
response = {
|
|
695
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
696
|
-
name: errorCode,
|
|
697
|
-
$metadata: deserializeMetadata(output),
|
|
698
|
-
};
|
|
699
|
-
break;
|
|
700
|
-
case "InternalServerErrorException":
|
|
701
|
-
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
|
|
702
|
-
response = {
|
|
703
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
704
|
-
name: errorCode,
|
|
705
|
-
$metadata: deserializeMetadata(output),
|
|
706
|
-
};
|
|
707
|
-
break;
|
|
708
|
-
case "TooManyRequestsException":
|
|
709
|
-
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
|
|
710
|
-
response = {
|
|
711
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
712
|
-
name: errorCode,
|
|
713
|
-
$metadata: deserializeMetadata(output),
|
|
714
|
-
};
|
|
715
|
-
break;
|
|
716
|
-
default:
|
|
717
|
-
const parsedBody = parsedOutput.body;
|
|
718
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
719
|
-
response = {
|
|
720
|
-
...parsedBody,
|
|
721
|
-
name: `${errorCode}`,
|
|
722
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
723
|
-
$fault: "client",
|
|
724
|
-
$metadata: deserializeMetadata(output),
|
|
725
|
-
} as any;
|
|
726
|
-
}
|
|
727
|
-
const message = response.message || response.Message || errorCode;
|
|
728
|
-
response.message = message;
|
|
729
|
-
delete response.Message;
|
|
730
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
731
|
-
};
|
|
732
|
-
|
|
733
|
-
export const deserializeAws_restJson1CreateApplicationVersionCommand = async (
|
|
734
|
-
output: __HttpResponse,
|
|
735
|
-
context: __SerdeContext
|
|
736
|
-
): Promise<CreateApplicationVersionCommandOutput> => {
|
|
737
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
738
|
-
return deserializeAws_restJson1CreateApplicationVersionCommandError(output, context);
|
|
739
|
-
}
|
|
740
|
-
const contents: CreateApplicationVersionCommandOutput = {
|
|
741
|
-
$metadata: deserializeMetadata(output),
|
|
742
|
-
ApplicationId: undefined,
|
|
743
|
-
CreationTime: undefined,
|
|
744
|
-
ParameterDefinitions: undefined,
|
|
745
|
-
RequiredCapabilities: undefined,
|
|
746
|
-
ResourcesSupported: undefined,
|
|
747
|
-
SemanticVersion: undefined,
|
|
748
|
-
SourceCodeArchiveUrl: undefined,
|
|
749
|
-
SourceCodeUrl: undefined,
|
|
750
|
-
TemplateUrl: undefined,
|
|
751
|
-
};
|
|
752
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
753
|
-
if (data.applicationId !== undefined && data.applicationId !== null) {
|
|
754
|
-
contents.ApplicationId = __expectString(data.applicationId);
|
|
755
|
-
}
|
|
756
|
-
if (data.creationTime !== undefined && data.creationTime !== null) {
|
|
757
|
-
contents.CreationTime = __expectString(data.creationTime);
|
|
758
|
-
}
|
|
759
|
-
if (data.parameterDefinitions !== undefined && data.parameterDefinitions !== null) {
|
|
760
|
-
contents.ParameterDefinitions = deserializeAws_restJson1__listOfParameterDefinition(
|
|
761
|
-
data.parameterDefinitions,
|
|
762
|
-
context
|
|
763
|
-
);
|
|
764
|
-
}
|
|
765
|
-
if (data.requiredCapabilities !== undefined && data.requiredCapabilities !== null) {
|
|
766
|
-
contents.RequiredCapabilities = deserializeAws_restJson1__listOfCapability(data.requiredCapabilities, context);
|
|
767
|
-
}
|
|
768
|
-
if (data.resourcesSupported !== undefined && data.resourcesSupported !== null) {
|
|
769
|
-
contents.ResourcesSupported = __expectBoolean(data.resourcesSupported);
|
|
770
|
-
}
|
|
771
|
-
if (data.semanticVersion !== undefined && data.semanticVersion !== null) {
|
|
772
|
-
contents.SemanticVersion = __expectString(data.semanticVersion);
|
|
773
|
-
}
|
|
774
|
-
if (data.sourceCodeArchiveUrl !== undefined && data.sourceCodeArchiveUrl !== null) {
|
|
775
|
-
contents.SourceCodeArchiveUrl = __expectString(data.sourceCodeArchiveUrl);
|
|
776
|
-
}
|
|
777
|
-
if (data.sourceCodeUrl !== undefined && data.sourceCodeUrl !== null) {
|
|
778
|
-
contents.SourceCodeUrl = __expectString(data.sourceCodeUrl);
|
|
779
|
-
}
|
|
780
|
-
if (data.templateUrl !== undefined && data.templateUrl !== null) {
|
|
781
|
-
contents.TemplateUrl = __expectString(data.templateUrl);
|
|
782
|
-
}
|
|
783
|
-
return Promise.resolve(contents);
|
|
784
|
-
};
|
|
785
|
-
|
|
786
|
-
const deserializeAws_restJson1CreateApplicationVersionCommandError = async (
|
|
787
|
-
output: __HttpResponse,
|
|
788
|
-
context: __SerdeContext
|
|
789
|
-
): Promise<CreateApplicationVersionCommandOutput> => {
|
|
790
|
-
const parsedOutput: any = {
|
|
791
|
-
...output,
|
|
792
|
-
body: await parseBody(output.body, context),
|
|
793
|
-
};
|
|
794
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
795
|
-
let errorCode = "UnknownError";
|
|
796
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
797
|
-
switch (errorCode) {
|
|
798
|
-
case "BadRequestException":
|
|
799
|
-
case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
|
|
800
|
-
response = {
|
|
801
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
802
|
-
name: errorCode,
|
|
803
|
-
$metadata: deserializeMetadata(output),
|
|
804
|
-
};
|
|
805
|
-
break;
|
|
806
|
-
case "ConflictException":
|
|
807
|
-
case "com.amazonaws.serverlessapplicationrepository#ConflictException":
|
|
808
|
-
response = {
|
|
809
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
810
|
-
name: errorCode,
|
|
811
|
-
$metadata: deserializeMetadata(output),
|
|
812
|
-
};
|
|
813
|
-
break;
|
|
814
|
-
case "ForbiddenException":
|
|
815
|
-
case "com.amazonaws.serverlessapplicationrepository#ForbiddenException":
|
|
816
|
-
response = {
|
|
817
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
818
|
-
name: errorCode,
|
|
819
|
-
$metadata: deserializeMetadata(output),
|
|
820
|
-
};
|
|
821
|
-
break;
|
|
822
|
-
case "InternalServerErrorException":
|
|
823
|
-
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
|
|
824
|
-
response = {
|
|
825
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
826
|
-
name: errorCode,
|
|
827
|
-
$metadata: deserializeMetadata(output),
|
|
828
|
-
};
|
|
829
|
-
break;
|
|
830
|
-
case "TooManyRequestsException":
|
|
831
|
-
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
|
|
832
|
-
response = {
|
|
833
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
834
|
-
name: errorCode,
|
|
835
|
-
$metadata: deserializeMetadata(output),
|
|
836
|
-
};
|
|
837
|
-
break;
|
|
838
|
-
default:
|
|
839
|
-
const parsedBody = parsedOutput.body;
|
|
840
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
841
|
-
response = {
|
|
842
|
-
...parsedBody,
|
|
843
|
-
name: `${errorCode}`,
|
|
844
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
845
|
-
$fault: "client",
|
|
846
|
-
$metadata: deserializeMetadata(output),
|
|
847
|
-
} as any;
|
|
848
|
-
}
|
|
849
|
-
const message = response.message || response.Message || errorCode;
|
|
850
|
-
response.message = message;
|
|
851
|
-
delete response.Message;
|
|
852
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
853
|
-
};
|
|
854
|
-
|
|
855
|
-
export const deserializeAws_restJson1CreateCloudFormationChangeSetCommand = async (
|
|
856
|
-
output: __HttpResponse,
|
|
857
|
-
context: __SerdeContext
|
|
858
|
-
): Promise<CreateCloudFormationChangeSetCommandOutput> => {
|
|
859
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
860
|
-
return deserializeAws_restJson1CreateCloudFormationChangeSetCommandError(output, context);
|
|
861
|
-
}
|
|
862
|
-
const contents: CreateCloudFormationChangeSetCommandOutput = {
|
|
863
|
-
$metadata: deserializeMetadata(output),
|
|
864
|
-
ApplicationId: undefined,
|
|
865
|
-
ChangeSetId: undefined,
|
|
866
|
-
SemanticVersion: undefined,
|
|
867
|
-
StackId: undefined,
|
|
868
|
-
};
|
|
869
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
870
|
-
if (data.applicationId !== undefined && data.applicationId !== null) {
|
|
871
|
-
contents.ApplicationId = __expectString(data.applicationId);
|
|
872
|
-
}
|
|
873
|
-
if (data.changeSetId !== undefined && data.changeSetId !== null) {
|
|
874
|
-
contents.ChangeSetId = __expectString(data.changeSetId);
|
|
875
|
-
}
|
|
876
|
-
if (data.semanticVersion !== undefined && data.semanticVersion !== null) {
|
|
877
|
-
contents.SemanticVersion = __expectString(data.semanticVersion);
|
|
878
|
-
}
|
|
879
|
-
if (data.stackId !== undefined && data.stackId !== null) {
|
|
880
|
-
contents.StackId = __expectString(data.stackId);
|
|
881
|
-
}
|
|
882
|
-
return Promise.resolve(contents);
|
|
883
|
-
};
|
|
884
|
-
|
|
885
|
-
const deserializeAws_restJson1CreateCloudFormationChangeSetCommandError = async (
|
|
886
|
-
output: __HttpResponse,
|
|
887
|
-
context: __SerdeContext
|
|
888
|
-
): Promise<CreateCloudFormationChangeSetCommandOutput> => {
|
|
889
|
-
const parsedOutput: any = {
|
|
890
|
-
...output,
|
|
891
|
-
body: await parseBody(output.body, context),
|
|
892
|
-
};
|
|
893
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
894
|
-
let errorCode = "UnknownError";
|
|
895
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
896
|
-
switch (errorCode) {
|
|
897
|
-
case "BadRequestException":
|
|
898
|
-
case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
|
|
899
|
-
response = {
|
|
900
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
901
|
-
name: errorCode,
|
|
902
|
-
$metadata: deserializeMetadata(output),
|
|
903
|
-
};
|
|
904
|
-
break;
|
|
905
|
-
case "ForbiddenException":
|
|
906
|
-
case "com.amazonaws.serverlessapplicationrepository#ForbiddenException":
|
|
907
|
-
response = {
|
|
908
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
909
|
-
name: errorCode,
|
|
910
|
-
$metadata: deserializeMetadata(output),
|
|
911
|
-
};
|
|
912
|
-
break;
|
|
913
|
-
case "InternalServerErrorException":
|
|
914
|
-
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
|
|
915
|
-
response = {
|
|
916
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
917
|
-
name: errorCode,
|
|
918
|
-
$metadata: deserializeMetadata(output),
|
|
919
|
-
};
|
|
920
|
-
break;
|
|
921
|
-
case "TooManyRequestsException":
|
|
922
|
-
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
|
|
923
|
-
response = {
|
|
924
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
925
|
-
name: errorCode,
|
|
926
|
-
$metadata: deserializeMetadata(output),
|
|
927
|
-
};
|
|
928
|
-
break;
|
|
929
|
-
default:
|
|
930
|
-
const parsedBody = parsedOutput.body;
|
|
931
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
932
|
-
response = {
|
|
933
|
-
...parsedBody,
|
|
934
|
-
name: `${errorCode}`,
|
|
935
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
936
|
-
$fault: "client",
|
|
937
|
-
$metadata: deserializeMetadata(output),
|
|
938
|
-
} as any;
|
|
939
|
-
}
|
|
940
|
-
const message = response.message || response.Message || errorCode;
|
|
941
|
-
response.message = message;
|
|
942
|
-
delete response.Message;
|
|
943
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
944
|
-
};
|
|
945
|
-
|
|
946
|
-
export const deserializeAws_restJson1CreateCloudFormationTemplateCommand = async (
|
|
947
|
-
output: __HttpResponse,
|
|
948
|
-
context: __SerdeContext
|
|
949
|
-
): Promise<CreateCloudFormationTemplateCommandOutput> => {
|
|
950
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
951
|
-
return deserializeAws_restJson1CreateCloudFormationTemplateCommandError(output, context);
|
|
952
|
-
}
|
|
953
|
-
const contents: CreateCloudFormationTemplateCommandOutput = {
|
|
954
|
-
$metadata: deserializeMetadata(output),
|
|
955
|
-
ApplicationId: undefined,
|
|
956
|
-
CreationTime: undefined,
|
|
957
|
-
ExpirationTime: undefined,
|
|
958
|
-
SemanticVersion: undefined,
|
|
959
|
-
Status: undefined,
|
|
960
|
-
TemplateId: undefined,
|
|
961
|
-
TemplateUrl: undefined,
|
|
962
|
-
};
|
|
963
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
964
|
-
if (data.applicationId !== undefined && data.applicationId !== null) {
|
|
965
|
-
contents.ApplicationId = __expectString(data.applicationId);
|
|
966
|
-
}
|
|
967
|
-
if (data.creationTime !== undefined && data.creationTime !== null) {
|
|
968
|
-
contents.CreationTime = __expectString(data.creationTime);
|
|
969
|
-
}
|
|
970
|
-
if (data.expirationTime !== undefined && data.expirationTime !== null) {
|
|
971
|
-
contents.ExpirationTime = __expectString(data.expirationTime);
|
|
972
|
-
}
|
|
973
|
-
if (data.semanticVersion !== undefined && data.semanticVersion !== null) {
|
|
974
|
-
contents.SemanticVersion = __expectString(data.semanticVersion);
|
|
975
|
-
}
|
|
976
|
-
if (data.status !== undefined && data.status !== null) {
|
|
977
|
-
contents.Status = __expectString(data.status);
|
|
978
|
-
}
|
|
979
|
-
if (data.templateId !== undefined && data.templateId !== null) {
|
|
980
|
-
contents.TemplateId = __expectString(data.templateId);
|
|
981
|
-
}
|
|
982
|
-
if (data.templateUrl !== undefined && data.templateUrl !== null) {
|
|
983
|
-
contents.TemplateUrl = __expectString(data.templateUrl);
|
|
984
|
-
}
|
|
985
|
-
return Promise.resolve(contents);
|
|
986
|
-
};
|
|
987
|
-
|
|
988
|
-
const deserializeAws_restJson1CreateCloudFormationTemplateCommandError = async (
|
|
989
|
-
output: __HttpResponse,
|
|
990
|
-
context: __SerdeContext
|
|
991
|
-
): Promise<CreateCloudFormationTemplateCommandOutput> => {
|
|
992
|
-
const parsedOutput: any = {
|
|
993
|
-
...output,
|
|
994
|
-
body: await parseBody(output.body, context),
|
|
995
|
-
};
|
|
996
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
997
|
-
let errorCode = "UnknownError";
|
|
998
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
999
|
-
switch (errorCode) {
|
|
1000
|
-
case "BadRequestException":
|
|
1001
|
-
case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
|
|
1002
|
-
response = {
|
|
1003
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1004
|
-
name: errorCode,
|
|
1005
|
-
$metadata: deserializeMetadata(output),
|
|
1006
|
-
};
|
|
1007
|
-
break;
|
|
1008
|
-
case "ForbiddenException":
|
|
1009
|
-
case "com.amazonaws.serverlessapplicationrepository#ForbiddenException":
|
|
1010
|
-
response = {
|
|
1011
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1012
|
-
name: errorCode,
|
|
1013
|
-
$metadata: deserializeMetadata(output),
|
|
1014
|
-
};
|
|
1015
|
-
break;
|
|
1016
|
-
case "InternalServerErrorException":
|
|
1017
|
-
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
|
|
1018
|
-
response = {
|
|
1019
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1020
|
-
name: errorCode,
|
|
1021
|
-
$metadata: deserializeMetadata(output),
|
|
1022
|
-
};
|
|
1023
|
-
break;
|
|
1024
|
-
case "NotFoundException":
|
|
1025
|
-
case "com.amazonaws.serverlessapplicationrepository#NotFoundException":
|
|
1026
|
-
response = {
|
|
1027
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1028
|
-
name: errorCode,
|
|
1029
|
-
$metadata: deserializeMetadata(output),
|
|
1030
|
-
};
|
|
1031
|
-
break;
|
|
1032
|
-
case "TooManyRequestsException":
|
|
1033
|
-
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
|
|
1034
|
-
response = {
|
|
1035
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1036
|
-
name: errorCode,
|
|
1037
|
-
$metadata: deserializeMetadata(output),
|
|
1038
|
-
};
|
|
1039
|
-
break;
|
|
1040
|
-
default:
|
|
1041
|
-
const parsedBody = parsedOutput.body;
|
|
1042
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1043
|
-
response = {
|
|
1044
|
-
...parsedBody,
|
|
1045
|
-
name: `${errorCode}`,
|
|
1046
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1047
|
-
$fault: "client",
|
|
1048
|
-
$metadata: deserializeMetadata(output),
|
|
1049
|
-
} as any;
|
|
1050
|
-
}
|
|
1051
|
-
const message = response.message || response.Message || errorCode;
|
|
1052
|
-
response.message = message;
|
|
1053
|
-
delete response.Message;
|
|
1054
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1055
|
-
};
|
|
1056
|
-
|
|
1057
|
-
export const deserializeAws_restJson1DeleteApplicationCommand = async (
|
|
1058
|
-
output: __HttpResponse,
|
|
1059
|
-
context: __SerdeContext
|
|
1060
|
-
): Promise<DeleteApplicationCommandOutput> => {
|
|
1061
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1062
|
-
return deserializeAws_restJson1DeleteApplicationCommandError(output, context);
|
|
1063
|
-
}
|
|
1064
|
-
const contents: DeleteApplicationCommandOutput = {
|
|
1065
|
-
$metadata: deserializeMetadata(output),
|
|
1066
|
-
};
|
|
1067
|
-
await collectBody(output.body, context);
|
|
1068
|
-
return Promise.resolve(contents);
|
|
1069
|
-
};
|
|
1070
|
-
|
|
1071
|
-
const deserializeAws_restJson1DeleteApplicationCommandError = async (
|
|
1072
|
-
output: __HttpResponse,
|
|
1073
|
-
context: __SerdeContext
|
|
1074
|
-
): Promise<DeleteApplicationCommandOutput> => {
|
|
1075
|
-
const parsedOutput: any = {
|
|
1076
|
-
...output,
|
|
1077
|
-
body: await parseBody(output.body, context),
|
|
1078
|
-
};
|
|
1079
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1080
|
-
let errorCode = "UnknownError";
|
|
1081
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1082
|
-
switch (errorCode) {
|
|
1083
|
-
case "BadRequestException":
|
|
1084
|
-
case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
|
|
1085
|
-
response = {
|
|
1086
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1087
|
-
name: errorCode,
|
|
1088
|
-
$metadata: deserializeMetadata(output),
|
|
1089
|
-
};
|
|
1090
|
-
break;
|
|
1091
|
-
case "ConflictException":
|
|
1092
|
-
case "com.amazonaws.serverlessapplicationrepository#ConflictException":
|
|
1093
|
-
response = {
|
|
1094
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
1095
|
-
name: errorCode,
|
|
1096
|
-
$metadata: deserializeMetadata(output),
|
|
1097
|
-
};
|
|
1098
|
-
break;
|
|
1099
|
-
case "ForbiddenException":
|
|
1100
|
-
case "com.amazonaws.serverlessapplicationrepository#ForbiddenException":
|
|
1101
|
-
response = {
|
|
1102
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1103
|
-
name: errorCode,
|
|
1104
|
-
$metadata: deserializeMetadata(output),
|
|
1105
|
-
};
|
|
1106
|
-
break;
|
|
1107
|
-
case "InternalServerErrorException":
|
|
1108
|
-
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
|
|
1109
|
-
response = {
|
|
1110
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1111
|
-
name: errorCode,
|
|
1112
|
-
$metadata: deserializeMetadata(output),
|
|
1113
|
-
};
|
|
1114
|
-
break;
|
|
1115
|
-
case "NotFoundException":
|
|
1116
|
-
case "com.amazonaws.serverlessapplicationrepository#NotFoundException":
|
|
1117
|
-
response = {
|
|
1118
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1119
|
-
name: errorCode,
|
|
1120
|
-
$metadata: deserializeMetadata(output),
|
|
1121
|
-
};
|
|
1122
|
-
break;
|
|
1123
|
-
case "TooManyRequestsException":
|
|
1124
|
-
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
|
|
1125
|
-
response = {
|
|
1126
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1127
|
-
name: errorCode,
|
|
1128
|
-
$metadata: deserializeMetadata(output),
|
|
1129
|
-
};
|
|
1130
|
-
break;
|
|
1131
|
-
default:
|
|
1132
|
-
const parsedBody = parsedOutput.body;
|
|
1133
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1134
|
-
response = {
|
|
1135
|
-
...parsedBody,
|
|
1136
|
-
name: `${errorCode}`,
|
|
1137
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1138
|
-
$fault: "client",
|
|
1139
|
-
$metadata: deserializeMetadata(output),
|
|
1140
|
-
} as any;
|
|
1141
|
-
}
|
|
1142
|
-
const message = response.message || response.Message || errorCode;
|
|
1143
|
-
response.message = message;
|
|
1144
|
-
delete response.Message;
|
|
1145
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1146
|
-
};
|
|
1147
|
-
|
|
1148
|
-
export const deserializeAws_restJson1GetApplicationCommand = async (
|
|
1149
|
-
output: __HttpResponse,
|
|
1150
|
-
context: __SerdeContext
|
|
1151
|
-
): Promise<GetApplicationCommandOutput> => {
|
|
1152
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1153
|
-
return deserializeAws_restJson1GetApplicationCommandError(output, context);
|
|
1154
|
-
}
|
|
1155
|
-
const contents: GetApplicationCommandOutput = {
|
|
1156
|
-
$metadata: deserializeMetadata(output),
|
|
1157
|
-
ApplicationId: undefined,
|
|
1158
|
-
Author: undefined,
|
|
1159
|
-
CreationTime: undefined,
|
|
1160
|
-
Description: undefined,
|
|
1161
|
-
HomePageUrl: undefined,
|
|
1162
|
-
IsVerifiedAuthor: undefined,
|
|
1163
|
-
Labels: undefined,
|
|
1164
|
-
LicenseUrl: undefined,
|
|
1165
|
-
Name: undefined,
|
|
1166
|
-
ReadmeUrl: undefined,
|
|
1167
|
-
SpdxLicenseId: undefined,
|
|
1168
|
-
VerifiedAuthorUrl: undefined,
|
|
1169
|
-
Version: undefined,
|
|
1170
|
-
};
|
|
1171
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1172
|
-
if (data.applicationId !== undefined && data.applicationId !== null) {
|
|
1173
|
-
contents.ApplicationId = __expectString(data.applicationId);
|
|
1174
|
-
}
|
|
1175
|
-
if (data.author !== undefined && data.author !== null) {
|
|
1176
|
-
contents.Author = __expectString(data.author);
|
|
1177
|
-
}
|
|
1178
|
-
if (data.creationTime !== undefined && data.creationTime !== null) {
|
|
1179
|
-
contents.CreationTime = __expectString(data.creationTime);
|
|
1180
|
-
}
|
|
1181
|
-
if (data.description !== undefined && data.description !== null) {
|
|
1182
|
-
contents.Description = __expectString(data.description);
|
|
1183
|
-
}
|
|
1184
|
-
if (data.homePageUrl !== undefined && data.homePageUrl !== null) {
|
|
1185
|
-
contents.HomePageUrl = __expectString(data.homePageUrl);
|
|
1186
|
-
}
|
|
1187
|
-
if (data.isVerifiedAuthor !== undefined && data.isVerifiedAuthor !== null) {
|
|
1188
|
-
contents.IsVerifiedAuthor = __expectBoolean(data.isVerifiedAuthor);
|
|
1189
|
-
}
|
|
1190
|
-
if (data.labels !== undefined && data.labels !== null) {
|
|
1191
|
-
contents.Labels = deserializeAws_restJson1__listOf__string(data.labels, context);
|
|
1192
|
-
}
|
|
1193
|
-
if (data.licenseUrl !== undefined && data.licenseUrl !== null) {
|
|
1194
|
-
contents.LicenseUrl = __expectString(data.licenseUrl);
|
|
1195
|
-
}
|
|
1196
|
-
if (data.name !== undefined && data.name !== null) {
|
|
1197
|
-
contents.Name = __expectString(data.name);
|
|
1198
|
-
}
|
|
1199
|
-
if (data.readmeUrl !== undefined && data.readmeUrl !== null) {
|
|
1200
|
-
contents.ReadmeUrl = __expectString(data.readmeUrl);
|
|
1201
|
-
}
|
|
1202
|
-
if (data.spdxLicenseId !== undefined && data.spdxLicenseId !== null) {
|
|
1203
|
-
contents.SpdxLicenseId = __expectString(data.spdxLicenseId);
|
|
1204
|
-
}
|
|
1205
|
-
if (data.verifiedAuthorUrl !== undefined && data.verifiedAuthorUrl !== null) {
|
|
1206
|
-
contents.VerifiedAuthorUrl = __expectString(data.verifiedAuthorUrl);
|
|
1207
|
-
}
|
|
1208
|
-
if (data.version !== undefined && data.version !== null) {
|
|
1209
|
-
contents.Version = deserializeAws_restJson1Version(data.version, context);
|
|
1210
|
-
}
|
|
1211
|
-
return Promise.resolve(contents);
|
|
1212
|
-
};
|
|
1213
|
-
|
|
1214
|
-
const deserializeAws_restJson1GetApplicationCommandError = async (
|
|
1215
|
-
output: __HttpResponse,
|
|
1216
|
-
context: __SerdeContext
|
|
1217
|
-
): Promise<GetApplicationCommandOutput> => {
|
|
1218
|
-
const parsedOutput: any = {
|
|
1219
|
-
...output,
|
|
1220
|
-
body: await parseBody(output.body, context),
|
|
1221
|
-
};
|
|
1222
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1223
|
-
let errorCode = "UnknownError";
|
|
1224
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1225
|
-
switch (errorCode) {
|
|
1226
|
-
case "BadRequestException":
|
|
1227
|
-
case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
|
|
1228
|
-
response = {
|
|
1229
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1230
|
-
name: errorCode,
|
|
1231
|
-
$metadata: deserializeMetadata(output),
|
|
1232
|
-
};
|
|
1233
|
-
break;
|
|
1234
|
-
case "ForbiddenException":
|
|
1235
|
-
case "com.amazonaws.serverlessapplicationrepository#ForbiddenException":
|
|
1236
|
-
response = {
|
|
1237
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1238
|
-
name: errorCode,
|
|
1239
|
-
$metadata: deserializeMetadata(output),
|
|
1240
|
-
};
|
|
1241
|
-
break;
|
|
1242
|
-
case "InternalServerErrorException":
|
|
1243
|
-
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
|
|
1244
|
-
response = {
|
|
1245
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1246
|
-
name: errorCode,
|
|
1247
|
-
$metadata: deserializeMetadata(output),
|
|
1248
|
-
};
|
|
1249
|
-
break;
|
|
1250
|
-
case "NotFoundException":
|
|
1251
|
-
case "com.amazonaws.serverlessapplicationrepository#NotFoundException":
|
|
1252
|
-
response = {
|
|
1253
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1254
|
-
name: errorCode,
|
|
1255
|
-
$metadata: deserializeMetadata(output),
|
|
1256
|
-
};
|
|
1257
|
-
break;
|
|
1258
|
-
case "TooManyRequestsException":
|
|
1259
|
-
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
|
|
1260
|
-
response = {
|
|
1261
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1262
|
-
name: errorCode,
|
|
1263
|
-
$metadata: deserializeMetadata(output),
|
|
1264
|
-
};
|
|
1265
|
-
break;
|
|
1266
|
-
default:
|
|
1267
|
-
const parsedBody = parsedOutput.body;
|
|
1268
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1269
|
-
response = {
|
|
1270
|
-
...parsedBody,
|
|
1271
|
-
name: `${errorCode}`,
|
|
1272
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1273
|
-
$fault: "client",
|
|
1274
|
-
$metadata: deserializeMetadata(output),
|
|
1275
|
-
} as any;
|
|
1276
|
-
}
|
|
1277
|
-
const message = response.message || response.Message || errorCode;
|
|
1278
|
-
response.message = message;
|
|
1279
|
-
delete response.Message;
|
|
1280
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1281
|
-
};
|
|
1282
|
-
|
|
1283
|
-
export const deserializeAws_restJson1GetApplicationPolicyCommand = async (
|
|
1284
|
-
output: __HttpResponse,
|
|
1285
|
-
context: __SerdeContext
|
|
1286
|
-
): Promise<GetApplicationPolicyCommandOutput> => {
|
|
1287
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1288
|
-
return deserializeAws_restJson1GetApplicationPolicyCommandError(output, context);
|
|
1289
|
-
}
|
|
1290
|
-
const contents: GetApplicationPolicyCommandOutput = {
|
|
1291
|
-
$metadata: deserializeMetadata(output),
|
|
1292
|
-
Statements: undefined,
|
|
1293
|
-
};
|
|
1294
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1295
|
-
if (data.statements !== undefined && data.statements !== null) {
|
|
1296
|
-
contents.Statements = deserializeAws_restJson1__listOfApplicationPolicyStatement(data.statements, context);
|
|
1297
|
-
}
|
|
1298
|
-
return Promise.resolve(contents);
|
|
1299
|
-
};
|
|
1300
|
-
|
|
1301
|
-
const deserializeAws_restJson1GetApplicationPolicyCommandError = async (
|
|
1302
|
-
output: __HttpResponse,
|
|
1303
|
-
context: __SerdeContext
|
|
1304
|
-
): Promise<GetApplicationPolicyCommandOutput> => {
|
|
1305
|
-
const parsedOutput: any = {
|
|
1306
|
-
...output,
|
|
1307
|
-
body: await parseBody(output.body, context),
|
|
1308
|
-
};
|
|
1309
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1310
|
-
let errorCode = "UnknownError";
|
|
1311
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1312
|
-
switch (errorCode) {
|
|
1313
|
-
case "BadRequestException":
|
|
1314
|
-
case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
|
|
1315
|
-
response = {
|
|
1316
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1317
|
-
name: errorCode,
|
|
1318
|
-
$metadata: deserializeMetadata(output),
|
|
1319
|
-
};
|
|
1320
|
-
break;
|
|
1321
|
-
case "ForbiddenException":
|
|
1322
|
-
case "com.amazonaws.serverlessapplicationrepository#ForbiddenException":
|
|
1323
|
-
response = {
|
|
1324
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1325
|
-
name: errorCode,
|
|
1326
|
-
$metadata: deserializeMetadata(output),
|
|
1327
|
-
};
|
|
1328
|
-
break;
|
|
1329
|
-
case "InternalServerErrorException":
|
|
1330
|
-
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
|
|
1331
|
-
response = {
|
|
1332
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1333
|
-
name: errorCode,
|
|
1334
|
-
$metadata: deserializeMetadata(output),
|
|
1335
|
-
};
|
|
1336
|
-
break;
|
|
1337
|
-
case "NotFoundException":
|
|
1338
|
-
case "com.amazonaws.serverlessapplicationrepository#NotFoundException":
|
|
1339
|
-
response = {
|
|
1340
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1341
|
-
name: errorCode,
|
|
1342
|
-
$metadata: deserializeMetadata(output),
|
|
1343
|
-
};
|
|
1344
|
-
break;
|
|
1345
|
-
case "TooManyRequestsException":
|
|
1346
|
-
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
|
|
1347
|
-
response = {
|
|
1348
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1349
|
-
name: errorCode,
|
|
1350
|
-
$metadata: deserializeMetadata(output),
|
|
1351
|
-
};
|
|
1352
|
-
break;
|
|
1353
|
-
default:
|
|
1354
|
-
const parsedBody = parsedOutput.body;
|
|
1355
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1356
|
-
response = {
|
|
1357
|
-
...parsedBody,
|
|
1358
|
-
name: `${errorCode}`,
|
|
1359
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1360
|
-
$fault: "client",
|
|
1361
|
-
$metadata: deserializeMetadata(output),
|
|
1362
|
-
} as any;
|
|
1363
|
-
}
|
|
1364
|
-
const message = response.message || response.Message || errorCode;
|
|
1365
|
-
response.message = message;
|
|
1366
|
-
delete response.Message;
|
|
1367
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1368
|
-
};
|
|
1369
|
-
|
|
1370
|
-
export const deserializeAws_restJson1GetCloudFormationTemplateCommand = async (
|
|
1371
|
-
output: __HttpResponse,
|
|
1372
|
-
context: __SerdeContext
|
|
1373
|
-
): Promise<GetCloudFormationTemplateCommandOutput> => {
|
|
1374
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1375
|
-
return deserializeAws_restJson1GetCloudFormationTemplateCommandError(output, context);
|
|
1376
|
-
}
|
|
1377
|
-
const contents: GetCloudFormationTemplateCommandOutput = {
|
|
1378
|
-
$metadata: deserializeMetadata(output),
|
|
1379
|
-
ApplicationId: undefined,
|
|
1380
|
-
CreationTime: undefined,
|
|
1381
|
-
ExpirationTime: undefined,
|
|
1382
|
-
SemanticVersion: undefined,
|
|
1383
|
-
Status: undefined,
|
|
1384
|
-
TemplateId: undefined,
|
|
1385
|
-
TemplateUrl: undefined,
|
|
1386
|
-
};
|
|
1387
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1388
|
-
if (data.applicationId !== undefined && data.applicationId !== null) {
|
|
1389
|
-
contents.ApplicationId = __expectString(data.applicationId);
|
|
1390
|
-
}
|
|
1391
|
-
if (data.creationTime !== undefined && data.creationTime !== null) {
|
|
1392
|
-
contents.CreationTime = __expectString(data.creationTime);
|
|
1393
|
-
}
|
|
1394
|
-
if (data.expirationTime !== undefined && data.expirationTime !== null) {
|
|
1395
|
-
contents.ExpirationTime = __expectString(data.expirationTime);
|
|
1396
|
-
}
|
|
1397
|
-
if (data.semanticVersion !== undefined && data.semanticVersion !== null) {
|
|
1398
|
-
contents.SemanticVersion = __expectString(data.semanticVersion);
|
|
1399
|
-
}
|
|
1400
|
-
if (data.status !== undefined && data.status !== null) {
|
|
1401
|
-
contents.Status = __expectString(data.status);
|
|
1402
|
-
}
|
|
1403
|
-
if (data.templateId !== undefined && data.templateId !== null) {
|
|
1404
|
-
contents.TemplateId = __expectString(data.templateId);
|
|
1405
|
-
}
|
|
1406
|
-
if (data.templateUrl !== undefined && data.templateUrl !== null) {
|
|
1407
|
-
contents.TemplateUrl = __expectString(data.templateUrl);
|
|
1408
|
-
}
|
|
1409
|
-
return Promise.resolve(contents);
|
|
1410
|
-
};
|
|
1411
|
-
|
|
1412
|
-
const deserializeAws_restJson1GetCloudFormationTemplateCommandError = async (
|
|
1413
|
-
output: __HttpResponse,
|
|
1414
|
-
context: __SerdeContext
|
|
1415
|
-
): Promise<GetCloudFormationTemplateCommandOutput> => {
|
|
1416
|
-
const parsedOutput: any = {
|
|
1417
|
-
...output,
|
|
1418
|
-
body: await parseBody(output.body, context),
|
|
1419
|
-
};
|
|
1420
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1421
|
-
let errorCode = "UnknownError";
|
|
1422
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1423
|
-
switch (errorCode) {
|
|
1424
|
-
case "BadRequestException":
|
|
1425
|
-
case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
|
|
1426
|
-
response = {
|
|
1427
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1428
|
-
name: errorCode,
|
|
1429
|
-
$metadata: deserializeMetadata(output),
|
|
1430
|
-
};
|
|
1431
|
-
break;
|
|
1432
|
-
case "ForbiddenException":
|
|
1433
|
-
case "com.amazonaws.serverlessapplicationrepository#ForbiddenException":
|
|
1434
|
-
response = {
|
|
1435
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1436
|
-
name: errorCode,
|
|
1437
|
-
$metadata: deserializeMetadata(output),
|
|
1438
|
-
};
|
|
1439
|
-
break;
|
|
1440
|
-
case "InternalServerErrorException":
|
|
1441
|
-
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
|
|
1442
|
-
response = {
|
|
1443
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1444
|
-
name: errorCode,
|
|
1445
|
-
$metadata: deserializeMetadata(output),
|
|
1446
|
-
};
|
|
1447
|
-
break;
|
|
1448
|
-
case "NotFoundException":
|
|
1449
|
-
case "com.amazonaws.serverlessapplicationrepository#NotFoundException":
|
|
1450
|
-
response = {
|
|
1451
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1452
|
-
name: errorCode,
|
|
1453
|
-
$metadata: deserializeMetadata(output),
|
|
1454
|
-
};
|
|
1455
|
-
break;
|
|
1456
|
-
case "TooManyRequestsException":
|
|
1457
|
-
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
|
|
1458
|
-
response = {
|
|
1459
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1460
|
-
name: errorCode,
|
|
1461
|
-
$metadata: deserializeMetadata(output),
|
|
1462
|
-
};
|
|
1463
|
-
break;
|
|
1464
|
-
default:
|
|
1465
|
-
const parsedBody = parsedOutput.body;
|
|
1466
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1467
|
-
response = {
|
|
1468
|
-
...parsedBody,
|
|
1469
|
-
name: `${errorCode}`,
|
|
1470
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1471
|
-
$fault: "client",
|
|
1472
|
-
$metadata: deserializeMetadata(output),
|
|
1473
|
-
} as any;
|
|
1474
|
-
}
|
|
1475
|
-
const message = response.message || response.Message || errorCode;
|
|
1476
|
-
response.message = message;
|
|
1477
|
-
delete response.Message;
|
|
1478
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1479
|
-
};
|
|
1480
|
-
|
|
1481
|
-
export const deserializeAws_restJson1ListApplicationDependenciesCommand = async (
|
|
1482
|
-
output: __HttpResponse,
|
|
1483
|
-
context: __SerdeContext
|
|
1484
|
-
): Promise<ListApplicationDependenciesCommandOutput> => {
|
|
1485
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1486
|
-
return deserializeAws_restJson1ListApplicationDependenciesCommandError(output, context);
|
|
1487
|
-
}
|
|
1488
|
-
const contents: ListApplicationDependenciesCommandOutput = {
|
|
1489
|
-
$metadata: deserializeMetadata(output),
|
|
1490
|
-
Dependencies: undefined,
|
|
1491
|
-
NextToken: undefined,
|
|
1492
|
-
};
|
|
1493
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1494
|
-
if (data.dependencies !== undefined && data.dependencies !== null) {
|
|
1495
|
-
contents.Dependencies = deserializeAws_restJson1__listOfApplicationDependencySummary(data.dependencies, context);
|
|
1496
|
-
}
|
|
1497
|
-
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
1498
|
-
contents.NextToken = __expectString(data.nextToken);
|
|
1499
|
-
}
|
|
1500
|
-
return Promise.resolve(contents);
|
|
1501
|
-
};
|
|
1502
|
-
|
|
1503
|
-
const deserializeAws_restJson1ListApplicationDependenciesCommandError = async (
|
|
1504
|
-
output: __HttpResponse,
|
|
1505
|
-
context: __SerdeContext
|
|
1506
|
-
): Promise<ListApplicationDependenciesCommandOutput> => {
|
|
1507
|
-
const parsedOutput: any = {
|
|
1508
|
-
...output,
|
|
1509
|
-
body: await parseBody(output.body, context),
|
|
1510
|
-
};
|
|
1511
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1512
|
-
let errorCode = "UnknownError";
|
|
1513
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1514
|
-
switch (errorCode) {
|
|
1515
|
-
case "BadRequestException":
|
|
1516
|
-
case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
|
|
1517
|
-
response = {
|
|
1518
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1519
|
-
name: errorCode,
|
|
1520
|
-
$metadata: deserializeMetadata(output),
|
|
1521
|
-
};
|
|
1522
|
-
break;
|
|
1523
|
-
case "ForbiddenException":
|
|
1524
|
-
case "com.amazonaws.serverlessapplicationrepository#ForbiddenException":
|
|
1525
|
-
response = {
|
|
1526
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1527
|
-
name: errorCode,
|
|
1528
|
-
$metadata: deserializeMetadata(output),
|
|
1529
|
-
};
|
|
1530
|
-
break;
|
|
1531
|
-
case "InternalServerErrorException":
|
|
1532
|
-
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
|
|
1533
|
-
response = {
|
|
1534
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1535
|
-
name: errorCode,
|
|
1536
|
-
$metadata: deserializeMetadata(output),
|
|
1537
|
-
};
|
|
1538
|
-
break;
|
|
1539
|
-
case "NotFoundException":
|
|
1540
|
-
case "com.amazonaws.serverlessapplicationrepository#NotFoundException":
|
|
1541
|
-
response = {
|
|
1542
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1543
|
-
name: errorCode,
|
|
1544
|
-
$metadata: deserializeMetadata(output),
|
|
1545
|
-
};
|
|
1546
|
-
break;
|
|
1547
|
-
case "TooManyRequestsException":
|
|
1548
|
-
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
|
|
1549
|
-
response = {
|
|
1550
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1551
|
-
name: errorCode,
|
|
1552
|
-
$metadata: deserializeMetadata(output),
|
|
1553
|
-
};
|
|
1554
|
-
break;
|
|
1555
|
-
default:
|
|
1556
|
-
const parsedBody = parsedOutput.body;
|
|
1557
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1558
|
-
response = {
|
|
1559
|
-
...parsedBody,
|
|
1560
|
-
name: `${errorCode}`,
|
|
1561
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1562
|
-
$fault: "client",
|
|
1563
|
-
$metadata: deserializeMetadata(output),
|
|
1564
|
-
} as any;
|
|
1565
|
-
}
|
|
1566
|
-
const message = response.message || response.Message || errorCode;
|
|
1567
|
-
response.message = message;
|
|
1568
|
-
delete response.Message;
|
|
1569
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1570
|
-
};
|
|
1571
|
-
|
|
1572
|
-
export const deserializeAws_restJson1ListApplicationsCommand = async (
|
|
1573
|
-
output: __HttpResponse,
|
|
1574
|
-
context: __SerdeContext
|
|
1575
|
-
): Promise<ListApplicationsCommandOutput> => {
|
|
1576
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1577
|
-
return deserializeAws_restJson1ListApplicationsCommandError(output, context);
|
|
1578
|
-
}
|
|
1579
|
-
const contents: ListApplicationsCommandOutput = {
|
|
1580
|
-
$metadata: deserializeMetadata(output),
|
|
1581
|
-
Applications: undefined,
|
|
1582
|
-
NextToken: undefined,
|
|
1583
|
-
};
|
|
1584
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1585
|
-
if (data.applications !== undefined && data.applications !== null) {
|
|
1586
|
-
contents.Applications = deserializeAws_restJson1__listOfApplicationSummary(data.applications, context);
|
|
1587
|
-
}
|
|
1588
|
-
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
1589
|
-
contents.NextToken = __expectString(data.nextToken);
|
|
1590
|
-
}
|
|
1591
|
-
return Promise.resolve(contents);
|
|
1592
|
-
};
|
|
1593
|
-
|
|
1594
|
-
const deserializeAws_restJson1ListApplicationsCommandError = async (
|
|
1595
|
-
output: __HttpResponse,
|
|
1596
|
-
context: __SerdeContext
|
|
1597
|
-
): Promise<ListApplicationsCommandOutput> => {
|
|
1598
|
-
const parsedOutput: any = {
|
|
1599
|
-
...output,
|
|
1600
|
-
body: await parseBody(output.body, context),
|
|
1601
|
-
};
|
|
1602
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1603
|
-
let errorCode = "UnknownError";
|
|
1604
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1605
|
-
switch (errorCode) {
|
|
1606
|
-
case "BadRequestException":
|
|
1607
|
-
case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
|
|
1608
|
-
response = {
|
|
1609
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1610
|
-
name: errorCode,
|
|
1611
|
-
$metadata: deserializeMetadata(output),
|
|
1612
|
-
};
|
|
1613
|
-
break;
|
|
1614
|
-
case "ForbiddenException":
|
|
1615
|
-
case "com.amazonaws.serverlessapplicationrepository#ForbiddenException":
|
|
1616
|
-
response = {
|
|
1617
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1618
|
-
name: errorCode,
|
|
1619
|
-
$metadata: deserializeMetadata(output),
|
|
1620
|
-
};
|
|
1621
|
-
break;
|
|
1622
|
-
case "InternalServerErrorException":
|
|
1623
|
-
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
|
|
1624
|
-
response = {
|
|
1625
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1626
|
-
name: errorCode,
|
|
1627
|
-
$metadata: deserializeMetadata(output),
|
|
1628
|
-
};
|
|
1629
|
-
break;
|
|
1630
|
-
case "NotFoundException":
|
|
1631
|
-
case "com.amazonaws.serverlessapplicationrepository#NotFoundException":
|
|
1632
|
-
response = {
|
|
1633
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(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_restJson1ListApplicationVersionsCommand = async (
|
|
1656
|
-
output: __HttpResponse,
|
|
1657
|
-
context: __SerdeContext
|
|
1658
|
-
): Promise<ListApplicationVersionsCommandOutput> => {
|
|
1659
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1660
|
-
return deserializeAws_restJson1ListApplicationVersionsCommandError(output, context);
|
|
1661
|
-
}
|
|
1662
|
-
const contents: ListApplicationVersionsCommandOutput = {
|
|
1663
|
-
$metadata: deserializeMetadata(output),
|
|
1664
|
-
NextToken: undefined,
|
|
1665
|
-
Versions: undefined,
|
|
1666
|
-
};
|
|
1667
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1668
|
-
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
1669
|
-
contents.NextToken = __expectString(data.nextToken);
|
|
1670
|
-
}
|
|
1671
|
-
if (data.versions !== undefined && data.versions !== null) {
|
|
1672
|
-
contents.Versions = deserializeAws_restJson1__listOfVersionSummary(data.versions, context);
|
|
1673
|
-
}
|
|
1674
|
-
return Promise.resolve(contents);
|
|
1675
|
-
};
|
|
1676
|
-
|
|
1677
|
-
const deserializeAws_restJson1ListApplicationVersionsCommandError = async (
|
|
1678
|
-
output: __HttpResponse,
|
|
1679
|
-
context: __SerdeContext
|
|
1680
|
-
): Promise<ListApplicationVersionsCommandOutput> => {
|
|
1681
|
-
const parsedOutput: any = {
|
|
1682
|
-
...output,
|
|
1683
|
-
body: await parseBody(output.body, context),
|
|
1684
|
-
};
|
|
1685
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1686
|
-
let errorCode = "UnknownError";
|
|
1687
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1688
|
-
switch (errorCode) {
|
|
1689
|
-
case "BadRequestException":
|
|
1690
|
-
case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
|
|
1691
|
-
response = {
|
|
1692
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1693
|
-
name: errorCode,
|
|
1694
|
-
$metadata: deserializeMetadata(output),
|
|
1695
|
-
};
|
|
1696
|
-
break;
|
|
1697
|
-
case "ForbiddenException":
|
|
1698
|
-
case "com.amazonaws.serverlessapplicationrepository#ForbiddenException":
|
|
1699
|
-
response = {
|
|
1700
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1701
|
-
name: errorCode,
|
|
1702
|
-
$metadata: deserializeMetadata(output),
|
|
1703
|
-
};
|
|
1704
|
-
break;
|
|
1705
|
-
case "InternalServerErrorException":
|
|
1706
|
-
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
|
|
1707
|
-
response = {
|
|
1708
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1709
|
-
name: errorCode,
|
|
1710
|
-
$metadata: deserializeMetadata(output),
|
|
1711
|
-
};
|
|
1712
|
-
break;
|
|
1713
|
-
case "NotFoundException":
|
|
1714
|
-
case "com.amazonaws.serverlessapplicationrepository#NotFoundException":
|
|
1715
|
-
response = {
|
|
1716
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1717
|
-
name: errorCode,
|
|
1718
|
-
$metadata: deserializeMetadata(output),
|
|
1719
|
-
};
|
|
1720
|
-
break;
|
|
1721
|
-
case "TooManyRequestsException":
|
|
1722
|
-
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
|
|
1723
|
-
response = {
|
|
1724
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(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_restJson1PutApplicationPolicyCommand = async (
|
|
1747
|
-
output: __HttpResponse,
|
|
1748
|
-
context: __SerdeContext
|
|
1749
|
-
): Promise<PutApplicationPolicyCommandOutput> => {
|
|
1750
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1751
|
-
return deserializeAws_restJson1PutApplicationPolicyCommandError(output, context);
|
|
1752
|
-
}
|
|
1753
|
-
const contents: PutApplicationPolicyCommandOutput = {
|
|
1754
|
-
$metadata: deserializeMetadata(output),
|
|
1755
|
-
Statements: undefined,
|
|
1756
|
-
};
|
|
1757
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1758
|
-
if (data.statements !== undefined && data.statements !== null) {
|
|
1759
|
-
contents.Statements = deserializeAws_restJson1__listOfApplicationPolicyStatement(data.statements, context);
|
|
1760
|
-
}
|
|
1761
|
-
return Promise.resolve(contents);
|
|
1762
|
-
};
|
|
1763
|
-
|
|
1764
|
-
const deserializeAws_restJson1PutApplicationPolicyCommandError = async (
|
|
1765
|
-
output: __HttpResponse,
|
|
1766
|
-
context: __SerdeContext
|
|
1767
|
-
): Promise<PutApplicationPolicyCommandOutput> => {
|
|
1768
|
-
const parsedOutput: any = {
|
|
1769
|
-
...output,
|
|
1770
|
-
body: await parseBody(output.body, context),
|
|
1771
|
-
};
|
|
1772
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1773
|
-
let errorCode = "UnknownError";
|
|
1774
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1775
|
-
switch (errorCode) {
|
|
1776
|
-
case "BadRequestException":
|
|
1777
|
-
case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
|
|
1778
|
-
response = {
|
|
1779
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1780
|
-
name: errorCode,
|
|
1781
|
-
$metadata: deserializeMetadata(output),
|
|
1782
|
-
};
|
|
1783
|
-
break;
|
|
1784
|
-
case "ForbiddenException":
|
|
1785
|
-
case "com.amazonaws.serverlessapplicationrepository#ForbiddenException":
|
|
1786
|
-
response = {
|
|
1787
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1788
|
-
name: errorCode,
|
|
1789
|
-
$metadata: deserializeMetadata(output),
|
|
1790
|
-
};
|
|
1791
|
-
break;
|
|
1792
|
-
case "InternalServerErrorException":
|
|
1793
|
-
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
|
|
1794
|
-
response = {
|
|
1795
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1796
|
-
name: errorCode,
|
|
1797
|
-
$metadata: deserializeMetadata(output),
|
|
1798
|
-
};
|
|
1799
|
-
break;
|
|
1800
|
-
case "NotFoundException":
|
|
1801
|
-
case "com.amazonaws.serverlessapplicationrepository#NotFoundException":
|
|
1802
|
-
response = {
|
|
1803
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1804
|
-
name: errorCode,
|
|
1805
|
-
$metadata: deserializeMetadata(output),
|
|
1806
|
-
};
|
|
1807
|
-
break;
|
|
1808
|
-
case "TooManyRequestsException":
|
|
1809
|
-
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
|
|
1810
|
-
response = {
|
|
1811
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1812
|
-
name: errorCode,
|
|
1813
|
-
$metadata: deserializeMetadata(output),
|
|
1814
|
-
};
|
|
1815
|
-
break;
|
|
1816
|
-
default:
|
|
1817
|
-
const parsedBody = parsedOutput.body;
|
|
1818
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1819
|
-
response = {
|
|
1820
|
-
...parsedBody,
|
|
1821
|
-
name: `${errorCode}`,
|
|
1822
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1823
|
-
$fault: "client",
|
|
1824
|
-
$metadata: deserializeMetadata(output),
|
|
1825
|
-
} as any;
|
|
1826
|
-
}
|
|
1827
|
-
const message = response.message || response.Message || errorCode;
|
|
1828
|
-
response.message = message;
|
|
1829
|
-
delete response.Message;
|
|
1830
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1831
|
-
};
|
|
1832
|
-
|
|
1833
|
-
export const deserializeAws_restJson1UnshareApplicationCommand = async (
|
|
1834
|
-
output: __HttpResponse,
|
|
1835
|
-
context: __SerdeContext
|
|
1836
|
-
): Promise<UnshareApplicationCommandOutput> => {
|
|
1837
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1838
|
-
return deserializeAws_restJson1UnshareApplicationCommandError(output, context);
|
|
1839
|
-
}
|
|
1840
|
-
const contents: UnshareApplicationCommandOutput = {
|
|
1841
|
-
$metadata: deserializeMetadata(output),
|
|
1842
|
-
};
|
|
1843
|
-
await collectBody(output.body, context);
|
|
1844
|
-
return Promise.resolve(contents);
|
|
1845
|
-
};
|
|
1846
|
-
|
|
1847
|
-
const deserializeAws_restJson1UnshareApplicationCommandError = async (
|
|
1848
|
-
output: __HttpResponse,
|
|
1849
|
-
context: __SerdeContext
|
|
1850
|
-
): Promise<UnshareApplicationCommandOutput> => {
|
|
1851
|
-
const parsedOutput: any = {
|
|
1852
|
-
...output,
|
|
1853
|
-
body: await parseBody(output.body, context),
|
|
1854
|
-
};
|
|
1855
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1856
|
-
let errorCode = "UnknownError";
|
|
1857
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1858
|
-
switch (errorCode) {
|
|
1859
|
-
case "BadRequestException":
|
|
1860
|
-
case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
|
|
1861
|
-
response = {
|
|
1862
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1863
|
-
name: errorCode,
|
|
1864
|
-
$metadata: deserializeMetadata(output),
|
|
1865
|
-
};
|
|
1866
|
-
break;
|
|
1867
|
-
case "ForbiddenException":
|
|
1868
|
-
case "com.amazonaws.serverlessapplicationrepository#ForbiddenException":
|
|
1869
|
-
response = {
|
|
1870
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1871
|
-
name: errorCode,
|
|
1872
|
-
$metadata: deserializeMetadata(output),
|
|
1873
|
-
};
|
|
1874
|
-
break;
|
|
1875
|
-
case "InternalServerErrorException":
|
|
1876
|
-
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
|
|
1877
|
-
response = {
|
|
1878
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1879
|
-
name: errorCode,
|
|
1880
|
-
$metadata: deserializeMetadata(output),
|
|
1881
|
-
};
|
|
1882
|
-
break;
|
|
1883
|
-
case "NotFoundException":
|
|
1884
|
-
case "com.amazonaws.serverlessapplicationrepository#NotFoundException":
|
|
1885
|
-
response = {
|
|
1886
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1887
|
-
name: errorCode,
|
|
1888
|
-
$metadata: deserializeMetadata(output),
|
|
1889
|
-
};
|
|
1890
|
-
break;
|
|
1891
|
-
case "TooManyRequestsException":
|
|
1892
|
-
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
|
|
1893
|
-
response = {
|
|
1894
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1895
|
-
name: errorCode,
|
|
1896
|
-
$metadata: deserializeMetadata(output),
|
|
1897
|
-
};
|
|
1898
|
-
break;
|
|
1899
|
-
default:
|
|
1900
|
-
const parsedBody = parsedOutput.body;
|
|
1901
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1902
|
-
response = {
|
|
1903
|
-
...parsedBody,
|
|
1904
|
-
name: `${errorCode}`,
|
|
1905
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1906
|
-
$fault: "client",
|
|
1907
|
-
$metadata: deserializeMetadata(output),
|
|
1908
|
-
} as any;
|
|
1909
|
-
}
|
|
1910
|
-
const message = response.message || response.Message || errorCode;
|
|
1911
|
-
response.message = message;
|
|
1912
|
-
delete response.Message;
|
|
1913
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1914
|
-
};
|
|
1915
|
-
|
|
1916
|
-
export const deserializeAws_restJson1UpdateApplicationCommand = async (
|
|
1917
|
-
output: __HttpResponse,
|
|
1918
|
-
context: __SerdeContext
|
|
1919
|
-
): Promise<UpdateApplicationCommandOutput> => {
|
|
1920
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1921
|
-
return deserializeAws_restJson1UpdateApplicationCommandError(output, context);
|
|
1922
|
-
}
|
|
1923
|
-
const contents: UpdateApplicationCommandOutput = {
|
|
1924
|
-
$metadata: deserializeMetadata(output),
|
|
1925
|
-
ApplicationId: undefined,
|
|
1926
|
-
Author: undefined,
|
|
1927
|
-
CreationTime: undefined,
|
|
1928
|
-
Description: undefined,
|
|
1929
|
-
HomePageUrl: undefined,
|
|
1930
|
-
IsVerifiedAuthor: undefined,
|
|
1931
|
-
Labels: undefined,
|
|
1932
|
-
LicenseUrl: undefined,
|
|
1933
|
-
Name: undefined,
|
|
1934
|
-
ReadmeUrl: undefined,
|
|
1935
|
-
SpdxLicenseId: undefined,
|
|
1936
|
-
VerifiedAuthorUrl: undefined,
|
|
1937
|
-
Version: undefined,
|
|
1938
|
-
};
|
|
1939
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1940
|
-
if (data.applicationId !== undefined && data.applicationId !== null) {
|
|
1941
|
-
contents.ApplicationId = __expectString(data.applicationId);
|
|
1942
|
-
}
|
|
1943
|
-
if (data.author !== undefined && data.author !== null) {
|
|
1944
|
-
contents.Author = __expectString(data.author);
|
|
1945
|
-
}
|
|
1946
|
-
if (data.creationTime !== undefined && data.creationTime !== null) {
|
|
1947
|
-
contents.CreationTime = __expectString(data.creationTime);
|
|
1948
|
-
}
|
|
1949
|
-
if (data.description !== undefined && data.description !== null) {
|
|
1950
|
-
contents.Description = __expectString(data.description);
|
|
1951
|
-
}
|
|
1952
|
-
if (data.homePageUrl !== undefined && data.homePageUrl !== null) {
|
|
1953
|
-
contents.HomePageUrl = __expectString(data.homePageUrl);
|
|
1954
|
-
}
|
|
1955
|
-
if (data.isVerifiedAuthor !== undefined && data.isVerifiedAuthor !== null) {
|
|
1956
|
-
contents.IsVerifiedAuthor = __expectBoolean(data.isVerifiedAuthor);
|
|
1957
|
-
}
|
|
1958
|
-
if (data.labels !== undefined && data.labels !== null) {
|
|
1959
|
-
contents.Labels = deserializeAws_restJson1__listOf__string(data.labels, context);
|
|
1960
|
-
}
|
|
1961
|
-
if (data.licenseUrl !== undefined && data.licenseUrl !== null) {
|
|
1962
|
-
contents.LicenseUrl = __expectString(data.licenseUrl);
|
|
1963
|
-
}
|
|
1964
|
-
if (data.name !== undefined && data.name !== null) {
|
|
1965
|
-
contents.Name = __expectString(data.name);
|
|
1966
|
-
}
|
|
1967
|
-
if (data.readmeUrl !== undefined && data.readmeUrl !== null) {
|
|
1968
|
-
contents.ReadmeUrl = __expectString(data.readmeUrl);
|
|
1969
|
-
}
|
|
1970
|
-
if (data.spdxLicenseId !== undefined && data.spdxLicenseId !== null) {
|
|
1971
|
-
contents.SpdxLicenseId = __expectString(data.spdxLicenseId);
|
|
1972
|
-
}
|
|
1973
|
-
if (data.verifiedAuthorUrl !== undefined && data.verifiedAuthorUrl !== null) {
|
|
1974
|
-
contents.VerifiedAuthorUrl = __expectString(data.verifiedAuthorUrl);
|
|
1975
|
-
}
|
|
1976
|
-
if (data.version !== undefined && data.version !== null) {
|
|
1977
|
-
contents.Version = deserializeAws_restJson1Version(data.version, context);
|
|
1978
|
-
}
|
|
1979
|
-
return Promise.resolve(contents);
|
|
1980
|
-
};
|
|
1981
|
-
|
|
1982
|
-
const deserializeAws_restJson1UpdateApplicationCommandError = async (
|
|
1983
|
-
output: __HttpResponse,
|
|
1984
|
-
context: __SerdeContext
|
|
1985
|
-
): Promise<UpdateApplicationCommandOutput> => {
|
|
1986
|
-
const parsedOutput: any = {
|
|
1987
|
-
...output,
|
|
1988
|
-
body: await parseBody(output.body, context),
|
|
1989
|
-
};
|
|
1990
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1991
|
-
let errorCode = "UnknownError";
|
|
1992
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1993
|
-
switch (errorCode) {
|
|
1994
|
-
case "BadRequestException":
|
|
1995
|
-
case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
|
|
1996
|
-
response = {
|
|
1997
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1998
|
-
name: errorCode,
|
|
1999
|
-
$metadata: deserializeMetadata(output),
|
|
2000
|
-
};
|
|
2001
|
-
break;
|
|
2002
|
-
case "ConflictException":
|
|
2003
|
-
case "com.amazonaws.serverlessapplicationrepository#ConflictException":
|
|
2004
|
-
response = {
|
|
2005
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
2006
|
-
name: errorCode,
|
|
2007
|
-
$metadata: deserializeMetadata(output),
|
|
2008
|
-
};
|
|
2009
|
-
break;
|
|
2010
|
-
case "ForbiddenException":
|
|
2011
|
-
case "com.amazonaws.serverlessapplicationrepository#ForbiddenException":
|
|
2012
|
-
response = {
|
|
2013
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
2014
|
-
name: errorCode,
|
|
2015
|
-
$metadata: deserializeMetadata(output),
|
|
2016
|
-
};
|
|
2017
|
-
break;
|
|
2018
|
-
case "InternalServerErrorException":
|
|
2019
|
-
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
|
|
2020
|
-
response = {
|
|
2021
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
2022
|
-
name: errorCode,
|
|
2023
|
-
$metadata: deserializeMetadata(output),
|
|
2024
|
-
};
|
|
2025
|
-
break;
|
|
2026
|
-
case "NotFoundException":
|
|
2027
|
-
case "com.amazonaws.serverlessapplicationrepository#NotFoundException":
|
|
2028
|
-
response = {
|
|
2029
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
2030
|
-
name: errorCode,
|
|
2031
|
-
$metadata: deserializeMetadata(output),
|
|
2032
|
-
};
|
|
2033
|
-
break;
|
|
2034
|
-
case "TooManyRequestsException":
|
|
2035
|
-
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
|
|
2036
|
-
response = {
|
|
2037
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
2038
|
-
name: errorCode,
|
|
2039
|
-
$metadata: deserializeMetadata(output),
|
|
2040
|
-
};
|
|
2041
|
-
break;
|
|
2042
|
-
default:
|
|
2043
|
-
const parsedBody = parsedOutput.body;
|
|
2044
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2045
|
-
response = {
|
|
2046
|
-
...parsedBody,
|
|
2047
|
-
name: `${errorCode}`,
|
|
2048
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2049
|
-
$fault: "client",
|
|
2050
|
-
$metadata: deserializeMetadata(output),
|
|
2051
|
-
} as any;
|
|
2052
|
-
}
|
|
2053
|
-
const message = response.message || response.Message || errorCode;
|
|
2054
|
-
response.message = message;
|
|
2055
|
-
delete response.Message;
|
|
2056
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2057
|
-
};
|
|
2058
|
-
|
|
2059
|
-
const deserializeAws_restJson1BadRequestExceptionResponse = async (
|
|
2060
|
-
parsedOutput: any,
|
|
2061
|
-
context: __SerdeContext
|
|
2062
|
-
): Promise<BadRequestException> => {
|
|
2063
|
-
const contents: BadRequestException = {
|
|
2064
|
-
name: "BadRequestException",
|
|
2065
|
-
$fault: "client",
|
|
2066
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2067
|
-
ErrorCode: undefined,
|
|
2068
|
-
Message: undefined,
|
|
2069
|
-
};
|
|
2070
|
-
const data: any = parsedOutput.body;
|
|
2071
|
-
if (data.errorCode !== undefined && data.errorCode !== null) {
|
|
2072
|
-
contents.ErrorCode = __expectString(data.errorCode);
|
|
2073
|
-
}
|
|
2074
|
-
if (data.message !== undefined && data.message !== null) {
|
|
2075
|
-
contents.Message = __expectString(data.message);
|
|
2076
|
-
}
|
|
2077
|
-
return contents;
|
|
2078
|
-
};
|
|
2079
|
-
|
|
2080
|
-
const deserializeAws_restJson1ConflictExceptionResponse = async (
|
|
2081
|
-
parsedOutput: any,
|
|
2082
|
-
context: __SerdeContext
|
|
2083
|
-
): Promise<ConflictException> => {
|
|
2084
|
-
const contents: ConflictException = {
|
|
2085
|
-
name: "ConflictException",
|
|
2086
|
-
$fault: "client",
|
|
2087
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2088
|
-
ErrorCode: undefined,
|
|
2089
|
-
Message: undefined,
|
|
2090
|
-
};
|
|
2091
|
-
const data: any = parsedOutput.body;
|
|
2092
|
-
if (data.errorCode !== undefined && data.errorCode !== null) {
|
|
2093
|
-
contents.ErrorCode = __expectString(data.errorCode);
|
|
2094
|
-
}
|
|
2095
|
-
if (data.message !== undefined && data.message !== null) {
|
|
2096
|
-
contents.Message = __expectString(data.message);
|
|
2097
|
-
}
|
|
2098
|
-
return contents;
|
|
2099
|
-
};
|
|
2100
|
-
|
|
2101
|
-
const deserializeAws_restJson1ForbiddenExceptionResponse = async (
|
|
2102
|
-
parsedOutput: any,
|
|
2103
|
-
context: __SerdeContext
|
|
2104
|
-
): Promise<ForbiddenException> => {
|
|
2105
|
-
const contents: ForbiddenException = {
|
|
2106
|
-
name: "ForbiddenException",
|
|
2107
|
-
$fault: "client",
|
|
2108
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2109
|
-
ErrorCode: undefined,
|
|
2110
|
-
Message: undefined,
|
|
2111
|
-
};
|
|
2112
|
-
const data: any = parsedOutput.body;
|
|
2113
|
-
if (data.errorCode !== undefined && data.errorCode !== null) {
|
|
2114
|
-
contents.ErrorCode = __expectString(data.errorCode);
|
|
2115
|
-
}
|
|
2116
|
-
if (data.message !== undefined && data.message !== null) {
|
|
2117
|
-
contents.Message = __expectString(data.message);
|
|
2118
|
-
}
|
|
2119
|
-
return contents;
|
|
2120
|
-
};
|
|
2121
|
-
|
|
2122
|
-
const deserializeAws_restJson1InternalServerErrorExceptionResponse = async (
|
|
2123
|
-
parsedOutput: any,
|
|
2124
|
-
context: __SerdeContext
|
|
2125
|
-
): Promise<InternalServerErrorException> => {
|
|
2126
|
-
const contents: InternalServerErrorException = {
|
|
2127
|
-
name: "InternalServerErrorException",
|
|
2128
|
-
$fault: "server",
|
|
2129
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2130
|
-
ErrorCode: undefined,
|
|
2131
|
-
Message: undefined,
|
|
2132
|
-
};
|
|
2133
|
-
const data: any = parsedOutput.body;
|
|
2134
|
-
if (data.errorCode !== undefined && data.errorCode !== null) {
|
|
2135
|
-
contents.ErrorCode = __expectString(data.errorCode);
|
|
2136
|
-
}
|
|
2137
|
-
if (data.message !== undefined && data.message !== null) {
|
|
2138
|
-
contents.Message = __expectString(data.message);
|
|
2139
|
-
}
|
|
2140
|
-
return contents;
|
|
2141
|
-
};
|
|
2142
|
-
|
|
2143
|
-
const deserializeAws_restJson1NotFoundExceptionResponse = async (
|
|
2144
|
-
parsedOutput: any,
|
|
2145
|
-
context: __SerdeContext
|
|
2146
|
-
): Promise<NotFoundException> => {
|
|
2147
|
-
const contents: NotFoundException = {
|
|
2148
|
-
name: "NotFoundException",
|
|
2149
|
-
$fault: "client",
|
|
2150
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2151
|
-
ErrorCode: undefined,
|
|
2152
|
-
Message: undefined,
|
|
2153
|
-
};
|
|
2154
|
-
const data: any = parsedOutput.body;
|
|
2155
|
-
if (data.errorCode !== undefined && data.errorCode !== null) {
|
|
2156
|
-
contents.ErrorCode = __expectString(data.errorCode);
|
|
2157
|
-
}
|
|
2158
|
-
if (data.message !== undefined && data.message !== null) {
|
|
2159
|
-
contents.Message = __expectString(data.message);
|
|
2160
|
-
}
|
|
2161
|
-
return contents;
|
|
2162
|
-
};
|
|
2163
|
-
|
|
2164
|
-
const deserializeAws_restJson1TooManyRequestsExceptionResponse = async (
|
|
2165
|
-
parsedOutput: any,
|
|
2166
|
-
context: __SerdeContext
|
|
2167
|
-
): Promise<TooManyRequestsException> => {
|
|
2168
|
-
const contents: TooManyRequestsException = {
|
|
2169
|
-
name: "TooManyRequestsException",
|
|
2170
|
-
$fault: "client",
|
|
2171
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2172
|
-
ErrorCode: undefined,
|
|
2173
|
-
Message: undefined,
|
|
2174
|
-
};
|
|
2175
|
-
const data: any = parsedOutput.body;
|
|
2176
|
-
if (data.errorCode !== undefined && data.errorCode !== null) {
|
|
2177
|
-
contents.ErrorCode = __expectString(data.errorCode);
|
|
2178
|
-
}
|
|
2179
|
-
if (data.message !== undefined && data.message !== null) {
|
|
2180
|
-
contents.Message = __expectString(data.message);
|
|
2181
|
-
}
|
|
2182
|
-
return contents;
|
|
2183
|
-
};
|
|
2184
|
-
|
|
2185
|
-
const serializeAws_restJson1__listOf__string = (input: string[], context: __SerdeContext): any => {
|
|
2186
|
-
return input
|
|
2187
|
-
.filter((e: any) => e != null)
|
|
2188
|
-
.map((entry) => {
|
|
2189
|
-
if (entry === null) {
|
|
2190
|
-
return null as any;
|
|
2191
|
-
}
|
|
2192
|
-
return entry;
|
|
2193
|
-
});
|
|
2194
|
-
};
|
|
2195
|
-
|
|
2196
|
-
const serializeAws_restJson1__listOfApplicationPolicyStatement = (
|
|
2197
|
-
input: ApplicationPolicyStatement[],
|
|
2198
|
-
context: __SerdeContext
|
|
2199
|
-
): any => {
|
|
2200
|
-
return input
|
|
2201
|
-
.filter((e: any) => e != null)
|
|
2202
|
-
.map((entry) => {
|
|
2203
|
-
if (entry === null) {
|
|
2204
|
-
return null as any;
|
|
2205
|
-
}
|
|
2206
|
-
return serializeAws_restJson1ApplicationPolicyStatement(entry, context);
|
|
2207
|
-
});
|
|
2208
|
-
};
|
|
2209
|
-
|
|
2210
|
-
const serializeAws_restJson1__listOfParameterValue = (input: ParameterValue[], context: __SerdeContext): any => {
|
|
2211
|
-
return input
|
|
2212
|
-
.filter((e: any) => e != null)
|
|
2213
|
-
.map((entry) => {
|
|
2214
|
-
if (entry === null) {
|
|
2215
|
-
return null as any;
|
|
2216
|
-
}
|
|
2217
|
-
return serializeAws_restJson1ParameterValue(entry, context);
|
|
2218
|
-
});
|
|
2219
|
-
};
|
|
2220
|
-
|
|
2221
|
-
const serializeAws_restJson1__listOfRollbackTrigger = (input: RollbackTrigger[], context: __SerdeContext): any => {
|
|
2222
|
-
return input
|
|
2223
|
-
.filter((e: any) => e != null)
|
|
2224
|
-
.map((entry) => {
|
|
2225
|
-
if (entry === null) {
|
|
2226
|
-
return null as any;
|
|
2227
|
-
}
|
|
2228
|
-
return serializeAws_restJson1RollbackTrigger(entry, context);
|
|
2229
|
-
});
|
|
2230
|
-
};
|
|
2231
|
-
|
|
2232
|
-
const serializeAws_restJson1__listOfTag = (input: Tag[], context: __SerdeContext): any => {
|
|
2233
|
-
return input
|
|
2234
|
-
.filter((e: any) => e != null)
|
|
2235
|
-
.map((entry) => {
|
|
2236
|
-
if (entry === null) {
|
|
2237
|
-
return null as any;
|
|
2238
|
-
}
|
|
2239
|
-
return serializeAws_restJson1Tag(entry, context);
|
|
2240
|
-
});
|
|
2241
|
-
};
|
|
2242
|
-
|
|
2243
|
-
const serializeAws_restJson1ApplicationPolicyStatement = (
|
|
2244
|
-
input: ApplicationPolicyStatement,
|
|
2245
|
-
context: __SerdeContext
|
|
2246
|
-
): any => {
|
|
2247
|
-
return {
|
|
2248
|
-
...(input.Actions !== undefined &&
|
|
2249
|
-
input.Actions !== null && { actions: serializeAws_restJson1__listOf__string(input.Actions, context) }),
|
|
2250
|
-
...(input.PrincipalOrgIDs !== undefined &&
|
|
2251
|
-
input.PrincipalOrgIDs !== null && {
|
|
2252
|
-
principalOrgIDs: serializeAws_restJson1__listOf__string(input.PrincipalOrgIDs, context),
|
|
2253
|
-
}),
|
|
2254
|
-
...(input.Principals !== undefined &&
|
|
2255
|
-
input.Principals !== null && { principals: serializeAws_restJson1__listOf__string(input.Principals, context) }),
|
|
2256
|
-
...(input.StatementId !== undefined && input.StatementId !== null && { statementId: input.StatementId }),
|
|
2257
|
-
};
|
|
2258
|
-
};
|
|
2259
|
-
|
|
2260
|
-
const serializeAws_restJson1ParameterValue = (input: ParameterValue, context: __SerdeContext): any => {
|
|
2261
|
-
return {
|
|
2262
|
-
...(input.Name !== undefined && input.Name !== null && { name: input.Name }),
|
|
2263
|
-
...(input.Value !== undefined && input.Value !== null && { value: input.Value }),
|
|
2264
|
-
};
|
|
2265
|
-
};
|
|
2266
|
-
|
|
2267
|
-
const serializeAws_restJson1RollbackConfiguration = (input: RollbackConfiguration, context: __SerdeContext): any => {
|
|
2268
|
-
return {
|
|
2269
|
-
...(input.MonitoringTimeInMinutes !== undefined &&
|
|
2270
|
-
input.MonitoringTimeInMinutes !== null && { monitoringTimeInMinutes: input.MonitoringTimeInMinutes }),
|
|
2271
|
-
...(input.RollbackTriggers !== undefined &&
|
|
2272
|
-
input.RollbackTriggers !== null && {
|
|
2273
|
-
rollbackTriggers: serializeAws_restJson1__listOfRollbackTrigger(input.RollbackTriggers, context),
|
|
2274
|
-
}),
|
|
2275
|
-
};
|
|
2276
|
-
};
|
|
2277
|
-
|
|
2278
|
-
const serializeAws_restJson1RollbackTrigger = (input: RollbackTrigger, context: __SerdeContext): any => {
|
|
2279
|
-
return {
|
|
2280
|
-
...(input.Arn !== undefined && input.Arn !== null && { arn: input.Arn }),
|
|
2281
|
-
...(input.Type !== undefined && input.Type !== null && { type: input.Type }),
|
|
2282
|
-
};
|
|
2283
|
-
};
|
|
2284
|
-
|
|
2285
|
-
const serializeAws_restJson1Tag = (input: Tag, context: __SerdeContext): any => {
|
|
2286
|
-
return {
|
|
2287
|
-
...(input.Key !== undefined && input.Key !== null && { key: input.Key }),
|
|
2288
|
-
...(input.Value !== undefined && input.Value !== null && { value: input.Value }),
|
|
2289
|
-
};
|
|
2290
|
-
};
|
|
2291
|
-
|
|
2292
|
-
const deserializeAws_restJson1__listOf__string = (output: any, context: __SerdeContext): string[] => {
|
|
2293
|
-
return (output || [])
|
|
2294
|
-
.filter((e: any) => e != null)
|
|
2295
|
-
.map((entry: any) => {
|
|
2296
|
-
if (entry === null) {
|
|
2297
|
-
return null as any;
|
|
2298
|
-
}
|
|
2299
|
-
return __expectString(entry) as any;
|
|
2300
|
-
});
|
|
2301
|
-
};
|
|
2302
|
-
|
|
2303
|
-
const deserializeAws_restJson1__listOfApplicationDependencySummary = (
|
|
2304
|
-
output: any,
|
|
2305
|
-
context: __SerdeContext
|
|
2306
|
-
): ApplicationDependencySummary[] => {
|
|
2307
|
-
return (output || [])
|
|
2308
|
-
.filter((e: any) => e != null)
|
|
2309
|
-
.map((entry: any) => {
|
|
2310
|
-
if (entry === null) {
|
|
2311
|
-
return null as any;
|
|
2312
|
-
}
|
|
2313
|
-
return deserializeAws_restJson1ApplicationDependencySummary(entry, context);
|
|
2314
|
-
});
|
|
2315
|
-
};
|
|
2316
|
-
|
|
2317
|
-
const deserializeAws_restJson1__listOfApplicationPolicyStatement = (
|
|
2318
|
-
output: any,
|
|
2319
|
-
context: __SerdeContext
|
|
2320
|
-
): ApplicationPolicyStatement[] => {
|
|
2321
|
-
return (output || [])
|
|
2322
|
-
.filter((e: any) => e != null)
|
|
2323
|
-
.map((entry: any) => {
|
|
2324
|
-
if (entry === null) {
|
|
2325
|
-
return null as any;
|
|
2326
|
-
}
|
|
2327
|
-
return deserializeAws_restJson1ApplicationPolicyStatement(entry, context);
|
|
2328
|
-
});
|
|
2329
|
-
};
|
|
2330
|
-
|
|
2331
|
-
const deserializeAws_restJson1__listOfApplicationSummary = (
|
|
2332
|
-
output: any,
|
|
2333
|
-
context: __SerdeContext
|
|
2334
|
-
): ApplicationSummary[] => {
|
|
2335
|
-
return (output || [])
|
|
2336
|
-
.filter((e: any) => e != null)
|
|
2337
|
-
.map((entry: any) => {
|
|
2338
|
-
if (entry === null) {
|
|
2339
|
-
return null as any;
|
|
2340
|
-
}
|
|
2341
|
-
return deserializeAws_restJson1ApplicationSummary(entry, context);
|
|
2342
|
-
});
|
|
2343
|
-
};
|
|
2344
|
-
|
|
2345
|
-
const deserializeAws_restJson1__listOfCapability = (output: any, context: __SerdeContext): (Capability | string)[] => {
|
|
2346
|
-
return (output || [])
|
|
2347
|
-
.filter((e: any) => e != null)
|
|
2348
|
-
.map((entry: any) => {
|
|
2349
|
-
if (entry === null) {
|
|
2350
|
-
return null as any;
|
|
2351
|
-
}
|
|
2352
|
-
return __expectString(entry) as any;
|
|
2353
|
-
});
|
|
2354
|
-
};
|
|
2355
|
-
|
|
2356
|
-
const deserializeAws_restJson1__listOfParameterDefinition = (
|
|
2357
|
-
output: any,
|
|
2358
|
-
context: __SerdeContext
|
|
2359
|
-
): ParameterDefinition[] => {
|
|
2360
|
-
return (output || [])
|
|
2361
|
-
.filter((e: any) => e != null)
|
|
2362
|
-
.map((entry: any) => {
|
|
2363
|
-
if (entry === null) {
|
|
2364
|
-
return null as any;
|
|
2365
|
-
}
|
|
2366
|
-
return deserializeAws_restJson1ParameterDefinition(entry, context);
|
|
2367
|
-
});
|
|
2368
|
-
};
|
|
2369
|
-
|
|
2370
|
-
const deserializeAws_restJson1__listOfVersionSummary = (output: any, context: __SerdeContext): VersionSummary[] => {
|
|
2371
|
-
return (output || [])
|
|
2372
|
-
.filter((e: any) => e != null)
|
|
2373
|
-
.map((entry: any) => {
|
|
2374
|
-
if (entry === null) {
|
|
2375
|
-
return null as any;
|
|
2376
|
-
}
|
|
2377
|
-
return deserializeAws_restJson1VersionSummary(entry, context);
|
|
2378
|
-
});
|
|
2379
|
-
};
|
|
2380
|
-
|
|
2381
|
-
const deserializeAws_restJson1ApplicationDependencySummary = (
|
|
2382
|
-
output: any,
|
|
2383
|
-
context: __SerdeContext
|
|
2384
|
-
): ApplicationDependencySummary => {
|
|
2385
|
-
return {
|
|
2386
|
-
ApplicationId: __expectString(output.applicationId),
|
|
2387
|
-
SemanticVersion: __expectString(output.semanticVersion),
|
|
2388
|
-
} as any;
|
|
2389
|
-
};
|
|
2390
|
-
|
|
2391
|
-
const deserializeAws_restJson1ApplicationPolicyStatement = (
|
|
2392
|
-
output: any,
|
|
2393
|
-
context: __SerdeContext
|
|
2394
|
-
): ApplicationPolicyStatement => {
|
|
2395
|
-
return {
|
|
2396
|
-
Actions:
|
|
2397
|
-
output.actions !== undefined && output.actions !== null
|
|
2398
|
-
? deserializeAws_restJson1__listOf__string(output.actions, context)
|
|
2399
|
-
: undefined,
|
|
2400
|
-
PrincipalOrgIDs:
|
|
2401
|
-
output.principalOrgIDs !== undefined && output.principalOrgIDs !== null
|
|
2402
|
-
? deserializeAws_restJson1__listOf__string(output.principalOrgIDs, context)
|
|
2403
|
-
: undefined,
|
|
2404
|
-
Principals:
|
|
2405
|
-
output.principals !== undefined && output.principals !== null
|
|
2406
|
-
? deserializeAws_restJson1__listOf__string(output.principals, context)
|
|
2407
|
-
: undefined,
|
|
2408
|
-
StatementId: __expectString(output.statementId),
|
|
2409
|
-
} as any;
|
|
2410
|
-
};
|
|
2411
|
-
|
|
2412
|
-
const deserializeAws_restJson1ApplicationSummary = (output: any, context: __SerdeContext): ApplicationSummary => {
|
|
2413
|
-
return {
|
|
2414
|
-
ApplicationId: __expectString(output.applicationId),
|
|
2415
|
-
Author: __expectString(output.author),
|
|
2416
|
-
CreationTime: __expectString(output.creationTime),
|
|
2417
|
-
Description: __expectString(output.description),
|
|
2418
|
-
HomePageUrl: __expectString(output.homePageUrl),
|
|
2419
|
-
Labels:
|
|
2420
|
-
output.labels !== undefined && output.labels !== null
|
|
2421
|
-
? deserializeAws_restJson1__listOf__string(output.labels, context)
|
|
2422
|
-
: undefined,
|
|
2423
|
-
Name: __expectString(output.name),
|
|
2424
|
-
SpdxLicenseId: __expectString(output.spdxLicenseId),
|
|
2425
|
-
} as any;
|
|
2426
|
-
};
|
|
2427
|
-
|
|
2428
|
-
const deserializeAws_restJson1ParameterDefinition = (output: any, context: __SerdeContext): ParameterDefinition => {
|
|
2429
|
-
return {
|
|
2430
|
-
AllowedPattern: __expectString(output.allowedPattern),
|
|
2431
|
-
AllowedValues:
|
|
2432
|
-
output.allowedValues !== undefined && output.allowedValues !== null
|
|
2433
|
-
? deserializeAws_restJson1__listOf__string(output.allowedValues, context)
|
|
2434
|
-
: undefined,
|
|
2435
|
-
ConstraintDescription: __expectString(output.constraintDescription),
|
|
2436
|
-
DefaultValue: __expectString(output.defaultValue),
|
|
2437
|
-
Description: __expectString(output.description),
|
|
2438
|
-
MaxLength: __expectInt32(output.maxLength),
|
|
2439
|
-
MaxValue: __expectInt32(output.maxValue),
|
|
2440
|
-
MinLength: __expectInt32(output.minLength),
|
|
2441
|
-
MinValue: __expectInt32(output.minValue),
|
|
2442
|
-
Name: __expectString(output.name),
|
|
2443
|
-
NoEcho: __expectBoolean(output.noEcho),
|
|
2444
|
-
ReferencedByResources:
|
|
2445
|
-
output.referencedByResources !== undefined && output.referencedByResources !== null
|
|
2446
|
-
? deserializeAws_restJson1__listOf__string(output.referencedByResources, context)
|
|
2447
|
-
: undefined,
|
|
2448
|
-
Type: __expectString(output.type),
|
|
2449
|
-
} as any;
|
|
2450
|
-
};
|
|
2451
|
-
|
|
2452
|
-
const deserializeAws_restJson1Version = (output: any, context: __SerdeContext): Version => {
|
|
2453
|
-
return {
|
|
2454
|
-
ApplicationId: __expectString(output.applicationId),
|
|
2455
|
-
CreationTime: __expectString(output.creationTime),
|
|
2456
|
-
ParameterDefinitions:
|
|
2457
|
-
output.parameterDefinitions !== undefined && output.parameterDefinitions !== null
|
|
2458
|
-
? deserializeAws_restJson1__listOfParameterDefinition(output.parameterDefinitions, context)
|
|
2459
|
-
: undefined,
|
|
2460
|
-
RequiredCapabilities:
|
|
2461
|
-
output.requiredCapabilities !== undefined && output.requiredCapabilities !== null
|
|
2462
|
-
? deserializeAws_restJson1__listOfCapability(output.requiredCapabilities, context)
|
|
2463
|
-
: undefined,
|
|
2464
|
-
ResourcesSupported: __expectBoolean(output.resourcesSupported),
|
|
2465
|
-
SemanticVersion: __expectString(output.semanticVersion),
|
|
2466
|
-
SourceCodeArchiveUrl: __expectString(output.sourceCodeArchiveUrl),
|
|
2467
|
-
SourceCodeUrl: __expectString(output.sourceCodeUrl),
|
|
2468
|
-
TemplateUrl: __expectString(output.templateUrl),
|
|
2469
|
-
} as any;
|
|
2470
|
-
};
|
|
2471
|
-
|
|
2472
|
-
const deserializeAws_restJson1VersionSummary = (output: any, context: __SerdeContext): VersionSummary => {
|
|
2473
|
-
return {
|
|
2474
|
-
ApplicationId: __expectString(output.applicationId),
|
|
2475
|
-
CreationTime: __expectString(output.creationTime),
|
|
2476
|
-
SemanticVersion: __expectString(output.semanticVersion),
|
|
2477
|
-
SourceCodeUrl: __expectString(output.sourceCodeUrl),
|
|
2478
|
-
} as any;
|
|
2479
|
-
};
|
|
2480
|
-
|
|
2481
|
-
const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
|
|
2482
|
-
httpStatusCode: output.statusCode,
|
|
2483
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
2484
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
2485
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
2486
|
-
});
|
|
2487
|
-
|
|
2488
|
-
// Collect low-level response body stream to Uint8Array.
|
|
2489
|
-
const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
|
|
2490
|
-
if (streamBody instanceof Uint8Array) {
|
|
2491
|
-
return Promise.resolve(streamBody);
|
|
2492
|
-
}
|
|
2493
|
-
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
2494
|
-
};
|
|
2495
|
-
|
|
2496
|
-
// Encode Uint8Array data into string with utf-8.
|
|
2497
|
-
const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
|
|
2498
|
-
collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
2499
|
-
|
|
2500
|
-
const isSerializableHeaderValue = (value: any): boolean =>
|
|
2501
|
-
value !== undefined &&
|
|
2502
|
-
value !== null &&
|
|
2503
|
-
value !== "" &&
|
|
2504
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
2505
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
2506
|
-
|
|
2507
|
-
const parseBody = (streamBody: any, context: __SerdeContext): any =>
|
|
2508
|
-
collectBodyString(streamBody, context).then((encoded) => {
|
|
2509
|
-
if (encoded.length) {
|
|
2510
|
-
return JSON.parse(encoded);
|
|
2511
|
-
}
|
|
2512
|
-
return {};
|
|
2513
|
-
});
|
|
2514
|
-
|
|
2515
|
-
/**
|
|
2516
|
-
* Load an error code for the aws.rest-json-1.1 protocol.
|
|
2517
|
-
*/
|
|
2518
|
-
const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => {
|
|
2519
|
-
const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
2520
|
-
|
|
2521
|
-
const sanitizeErrorCode = (rawValue: string): string => {
|
|
2522
|
-
let cleanValue = rawValue;
|
|
2523
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
2524
|
-
cleanValue = cleanValue.split(":")[0];
|
|
2525
|
-
}
|
|
2526
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
2527
|
-
cleanValue = cleanValue.split("#")[1];
|
|
2528
|
-
}
|
|
2529
|
-
return cleanValue;
|
|
2530
|
-
};
|
|
2531
|
-
|
|
2532
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
2533
|
-
if (headerKey !== undefined) {
|
|
2534
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
2535
|
-
}
|
|
2536
|
-
|
|
2537
|
-
if (data.code !== undefined) {
|
|
2538
|
-
return sanitizeErrorCode(data.code);
|
|
2539
|
-
}
|
|
2540
|
-
|
|
2541
|
-
if (data["__type"] !== undefined) {
|
|
2542
|
-
return sanitizeErrorCode(data["__type"]);
|
|
2543
|
-
}
|
|
2544
|
-
|
|
2545
|
-
return "";
|
|
2546
|
-
};
|