@aws-sdk/client-dlm 3.183.0 → 3.185.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 +11 -0
- package/dist-cjs/protocols/Aws_restJson1.js +2 -2
- package/dist-es/DLM.js +41 -34
- package/dist-es/DLMClient.js +28 -22
- package/dist-es/commands/CreateLifecyclePolicyCommand.js +28 -21
- package/dist-es/commands/DeleteLifecyclePolicyCommand.js +28 -21
- package/dist-es/commands/GetLifecyclePoliciesCommand.js +28 -21
- package/dist-es/commands/GetLifecyclePolicyCommand.js +28 -21
- package/dist-es/commands/ListTagsForResourceCommand.js +28 -21
- package/dist-es/commands/TagResourceCommand.js +28 -21
- package/dist-es/commands/UntagResourceCommand.js +28 -21
- package/dist-es/commands/UpdateLifecyclePolicyCommand.js +28 -21
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/DLMServiceException.js +10 -5
- package/dist-es/models/models_0.js +96 -171
- package/dist-es/protocols/Aws_restJson1.js +1035 -879
- package/dist-es/runtimeConfig.browser.js +12 -26
- package/dist-es/runtimeConfig.js +12 -30
- package/dist-es/runtimeConfig.native.js +5 -8
- package/dist-es/runtimeConfig.shared.js +11 -8
- package/package.json +5 -5
|
@@ -1,855 +1,994 @@
|
|
|
1
|
+
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
1
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
3
|
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
3
4
|
import { DLMServiceException as __BaseException } from "../models/DLMServiceException";
|
|
4
5
|
import { InternalServerException, InvalidRequestException, LimitExceededException, ResourceNotFoundException, } from "../models/models_0";
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
export const serializeAws_restJson1DeleteLifecyclePolicyCommand = async (input, context) => {
|
|
32
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
33
|
-
const headers = {};
|
|
34
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/policies/{PolicyId}";
|
|
35
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "PolicyId", () => input.PolicyId, "{PolicyId}", false);
|
|
36
|
-
let body;
|
|
37
|
-
return new __HttpRequest({
|
|
38
|
-
protocol,
|
|
39
|
-
hostname,
|
|
40
|
-
port,
|
|
41
|
-
method: "DELETE",
|
|
42
|
-
headers,
|
|
43
|
-
path: resolvedPath,
|
|
44
|
-
body,
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
export const serializeAws_restJson1GetLifecyclePoliciesCommand = async (input, context) => {
|
|
48
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
49
|
-
const headers = {};
|
|
50
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/policies";
|
|
51
|
-
const query = map({
|
|
52
|
-
policyIds: [() => input.PolicyIds !== void 0, () => (input.PolicyIds || []).map((_entry) => _entry)],
|
|
53
|
-
state: [, input.State],
|
|
54
|
-
resourceTypes: [
|
|
55
|
-
() => input.ResourceTypes !== void 0,
|
|
56
|
-
() => (input.ResourceTypes || []).map((_entry) => _entry),
|
|
57
|
-
],
|
|
58
|
-
targetTags: [() => input.TargetTags !== void 0, () => (input.TargetTags || []).map((_entry) => _entry)],
|
|
59
|
-
tagsToAdd: [() => input.TagsToAdd !== void 0, () => (input.TagsToAdd || []).map((_entry) => _entry)],
|
|
60
|
-
});
|
|
61
|
-
let body;
|
|
62
|
-
return new __HttpRequest({
|
|
63
|
-
protocol,
|
|
64
|
-
hostname,
|
|
65
|
-
port,
|
|
66
|
-
method: "GET",
|
|
67
|
-
headers,
|
|
68
|
-
path: resolvedPath,
|
|
69
|
-
query,
|
|
70
|
-
body,
|
|
71
|
-
});
|
|
72
|
-
};
|
|
73
|
-
export const serializeAws_restJson1GetLifecyclePolicyCommand = async (input, context) => {
|
|
74
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
75
|
-
const headers = {};
|
|
76
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/policies/{PolicyId}";
|
|
77
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "PolicyId", () => input.PolicyId, "{PolicyId}", false);
|
|
78
|
-
let body;
|
|
79
|
-
return new __HttpRequest({
|
|
80
|
-
protocol,
|
|
81
|
-
hostname,
|
|
82
|
-
port,
|
|
83
|
-
method: "GET",
|
|
84
|
-
headers,
|
|
85
|
-
path: resolvedPath,
|
|
86
|
-
body,
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
export const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
|
|
90
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
91
|
-
const headers = {};
|
|
92
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
93
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
94
|
-
let body;
|
|
95
|
-
return new __HttpRequest({
|
|
96
|
-
protocol,
|
|
97
|
-
hostname,
|
|
98
|
-
port,
|
|
99
|
-
method: "GET",
|
|
100
|
-
headers,
|
|
101
|
-
path: resolvedPath,
|
|
102
|
-
body,
|
|
103
|
-
});
|
|
104
|
-
};
|
|
105
|
-
export const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
106
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
107
|
-
const headers = {
|
|
108
|
-
"content-type": "application/json",
|
|
109
|
-
};
|
|
110
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
111
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
112
|
-
let body;
|
|
113
|
-
body = JSON.stringify({
|
|
114
|
-
...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
|
|
115
|
-
});
|
|
116
|
-
return new __HttpRequest({
|
|
117
|
-
protocol,
|
|
118
|
-
hostname,
|
|
119
|
-
port,
|
|
120
|
-
method: "POST",
|
|
121
|
-
headers,
|
|
122
|
-
path: resolvedPath,
|
|
123
|
-
body,
|
|
124
|
-
});
|
|
125
|
-
};
|
|
126
|
-
export const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
|
|
127
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
128
|
-
const headers = {};
|
|
129
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
130
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
131
|
-
const query = map({
|
|
132
|
-
tagKeys: [() => input.TagKeys !== void 0, () => (input.TagKeys || []).map((_entry) => _entry)],
|
|
133
|
-
});
|
|
134
|
-
let body;
|
|
135
|
-
return new __HttpRequest({
|
|
136
|
-
protocol,
|
|
137
|
-
hostname,
|
|
138
|
-
port,
|
|
139
|
-
method: "DELETE",
|
|
140
|
-
headers,
|
|
141
|
-
path: resolvedPath,
|
|
142
|
-
query,
|
|
143
|
-
body,
|
|
144
|
-
});
|
|
145
|
-
};
|
|
146
|
-
export const serializeAws_restJson1UpdateLifecyclePolicyCommand = async (input, context) => {
|
|
147
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
148
|
-
const headers = {
|
|
149
|
-
"content-type": "application/json",
|
|
150
|
-
};
|
|
151
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/policies/{PolicyId}";
|
|
152
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "PolicyId", () => input.PolicyId, "{PolicyId}", false);
|
|
153
|
-
let body;
|
|
154
|
-
body = JSON.stringify({
|
|
155
|
-
...(input.Description != null && { Description: input.Description }),
|
|
156
|
-
...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }),
|
|
157
|
-
...(input.PolicyDetails != null && {
|
|
158
|
-
PolicyDetails: serializeAws_restJson1PolicyDetails(input.PolicyDetails, context),
|
|
159
|
-
}),
|
|
160
|
-
...(input.State != null && { State: input.State }),
|
|
161
|
-
});
|
|
162
|
-
return new __HttpRequest({
|
|
163
|
-
protocol,
|
|
164
|
-
hostname,
|
|
165
|
-
port,
|
|
166
|
-
method: "PATCH",
|
|
167
|
-
headers,
|
|
168
|
-
path: resolvedPath,
|
|
169
|
-
body,
|
|
170
|
-
});
|
|
171
|
-
};
|
|
172
|
-
export const deserializeAws_restJson1CreateLifecyclePolicyCommand = async (output, context) => {
|
|
173
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
174
|
-
return deserializeAws_restJson1CreateLifecyclePolicyCommandError(output, context);
|
|
175
|
-
}
|
|
176
|
-
const contents = map({
|
|
177
|
-
$metadata: deserializeMetadata(output),
|
|
6
|
+
export var serializeAws_restJson1CreateLifecyclePolicyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
8
|
+
return __generator(this, function (_c) {
|
|
9
|
+
switch (_c.label) {
|
|
10
|
+
case 0: return [4, context.endpoint()];
|
|
11
|
+
case 1:
|
|
12
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
13
|
+
headers = {
|
|
14
|
+
"content-type": "application/json",
|
|
15
|
+
};
|
|
16
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/policies";
|
|
17
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.Description != null && { Description: input.Description })), (input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn })), (input.PolicyDetails != null && {
|
|
18
|
+
PolicyDetails: serializeAws_restJson1PolicyDetails(input.PolicyDetails, context),
|
|
19
|
+
})), (input.State != null && { State: input.State })), (input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
|
|
20
|
+
return [2, new __HttpRequest({
|
|
21
|
+
protocol: protocol,
|
|
22
|
+
hostname: hostname,
|
|
23
|
+
port: port,
|
|
24
|
+
method: "POST",
|
|
25
|
+
headers: headers,
|
|
26
|
+
path: resolvedPath,
|
|
27
|
+
body: body,
|
|
28
|
+
})];
|
|
29
|
+
}
|
|
178
30
|
});
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
201
|
-
default:
|
|
202
|
-
const parsedBody = parsedOutput.body;
|
|
203
|
-
throwDefaultError({
|
|
204
|
-
output,
|
|
205
|
-
parsedBody,
|
|
206
|
-
exceptionCtor: __BaseException,
|
|
207
|
-
errorCode,
|
|
208
|
-
});
|
|
209
|
-
}
|
|
210
|
-
};
|
|
211
|
-
export const deserializeAws_restJson1DeleteLifecyclePolicyCommand = async (output, context) => {
|
|
212
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
213
|
-
return deserializeAws_restJson1DeleteLifecyclePolicyCommandError(output, context);
|
|
214
|
-
}
|
|
215
|
-
const contents = map({
|
|
216
|
-
$metadata: deserializeMetadata(output),
|
|
31
|
+
}); };
|
|
32
|
+
export var serializeAws_restJson1DeleteLifecyclePolicyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
33
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
34
|
+
return __generator(this, function (_c) {
|
|
35
|
+
switch (_c.label) {
|
|
36
|
+
case 0: return [4, context.endpoint()];
|
|
37
|
+
case 1:
|
|
38
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
39
|
+
headers = {};
|
|
40
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/policies/{PolicyId}";
|
|
41
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "PolicyId", function () { return input.PolicyId; }, "{PolicyId}", false);
|
|
42
|
+
return [2, new __HttpRequest({
|
|
43
|
+
protocol: protocol,
|
|
44
|
+
hostname: hostname,
|
|
45
|
+
port: port,
|
|
46
|
+
method: "DELETE",
|
|
47
|
+
headers: headers,
|
|
48
|
+
path: resolvedPath,
|
|
49
|
+
body: body,
|
|
50
|
+
})];
|
|
51
|
+
}
|
|
217
52
|
});
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
return deserializeAws_restJson1GetLifecyclePoliciesCommandError(output, context);
|
|
250
|
-
}
|
|
251
|
-
const contents = map({
|
|
252
|
-
$metadata: deserializeMetadata(output),
|
|
53
|
+
}); };
|
|
54
|
+
export var serializeAws_restJson1GetLifecyclePoliciesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
55
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
56
|
+
return __generator(this, function (_c) {
|
|
57
|
+
switch (_c.label) {
|
|
58
|
+
case 0: return [4, context.endpoint()];
|
|
59
|
+
case 1:
|
|
60
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
61
|
+
headers = {};
|
|
62
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/policies";
|
|
63
|
+
query = map({
|
|
64
|
+
policyIds: [function () { return input.PolicyIds !== void 0; }, function () { return (input.PolicyIds || []).map(function (_entry) { return _entry; }); }],
|
|
65
|
+
state: [, input.State],
|
|
66
|
+
resourceTypes: [
|
|
67
|
+
function () { return input.ResourceTypes !== void 0; },
|
|
68
|
+
function () { return (input.ResourceTypes || []).map(function (_entry) { return _entry; }); },
|
|
69
|
+
],
|
|
70
|
+
targetTags: [function () { return input.TargetTags !== void 0; }, function () { return (input.TargetTags || []).map(function (_entry) { return _entry; }); }],
|
|
71
|
+
tagsToAdd: [function () { return input.TagsToAdd !== void 0; }, function () { return (input.TagsToAdd || []).map(function (_entry) { return _entry; }); }],
|
|
72
|
+
});
|
|
73
|
+
return [2, new __HttpRequest({
|
|
74
|
+
protocol: protocol,
|
|
75
|
+
hostname: hostname,
|
|
76
|
+
port: port,
|
|
77
|
+
method: "GET",
|
|
78
|
+
headers: headers,
|
|
79
|
+
path: resolvedPath,
|
|
80
|
+
query: query,
|
|
81
|
+
body: body,
|
|
82
|
+
})];
|
|
83
|
+
}
|
|
253
84
|
});
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
276
|
-
case "ResourceNotFoundException":
|
|
277
|
-
case "com.amazonaws.dlm#ResourceNotFoundException":
|
|
278
|
-
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
279
|
-
default:
|
|
280
|
-
const parsedBody = parsedOutput.body;
|
|
281
|
-
throwDefaultError({
|
|
282
|
-
output,
|
|
283
|
-
parsedBody,
|
|
284
|
-
exceptionCtor: __BaseException,
|
|
285
|
-
errorCode,
|
|
286
|
-
});
|
|
287
|
-
}
|
|
288
|
-
};
|
|
289
|
-
export const deserializeAws_restJson1GetLifecyclePolicyCommand = async (output, context) => {
|
|
290
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
291
|
-
return deserializeAws_restJson1GetLifecyclePolicyCommandError(output, context);
|
|
292
|
-
}
|
|
293
|
-
const contents = map({
|
|
294
|
-
$metadata: deserializeMetadata(output),
|
|
85
|
+
}); };
|
|
86
|
+
export var serializeAws_restJson1GetLifecyclePolicyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
87
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
88
|
+
return __generator(this, function (_c) {
|
|
89
|
+
switch (_c.label) {
|
|
90
|
+
case 0: return [4, context.endpoint()];
|
|
91
|
+
case 1:
|
|
92
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
93
|
+
headers = {};
|
|
94
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/policies/{PolicyId}";
|
|
95
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "PolicyId", function () { return input.PolicyId; }, "{PolicyId}", false);
|
|
96
|
+
return [2, new __HttpRequest({
|
|
97
|
+
protocol: protocol,
|
|
98
|
+
hostname: hostname,
|
|
99
|
+
port: port,
|
|
100
|
+
method: "GET",
|
|
101
|
+
headers: headers,
|
|
102
|
+
path: resolvedPath,
|
|
103
|
+
body: body,
|
|
104
|
+
})];
|
|
105
|
+
}
|
|
295
106
|
});
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
318
|
-
default:
|
|
319
|
-
const parsedBody = parsedOutput.body;
|
|
320
|
-
throwDefaultError({
|
|
321
|
-
output,
|
|
322
|
-
parsedBody,
|
|
323
|
-
exceptionCtor: __BaseException,
|
|
324
|
-
errorCode,
|
|
325
|
-
});
|
|
326
|
-
}
|
|
327
|
-
};
|
|
328
|
-
export const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
|
|
329
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
330
|
-
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
331
|
-
}
|
|
332
|
-
const contents = map({
|
|
333
|
-
$metadata: deserializeMetadata(output),
|
|
107
|
+
}); };
|
|
108
|
+
export var serializeAws_restJson1ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
109
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
110
|
+
return __generator(this, function (_c) {
|
|
111
|
+
switch (_c.label) {
|
|
112
|
+
case 0: return [4, context.endpoint()];
|
|
113
|
+
case 1:
|
|
114
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
115
|
+
headers = {};
|
|
116
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{ResourceArn}";
|
|
117
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", function () { return input.ResourceArn; }, "{ResourceArn}", false);
|
|
118
|
+
return [2, new __HttpRequest({
|
|
119
|
+
protocol: protocol,
|
|
120
|
+
hostname: hostname,
|
|
121
|
+
port: port,
|
|
122
|
+
method: "GET",
|
|
123
|
+
headers: headers,
|
|
124
|
+
path: resolvedPath,
|
|
125
|
+
body: body,
|
|
126
|
+
})];
|
|
127
|
+
}
|
|
334
128
|
});
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
throwDefaultError({
|
|
360
|
-
output,
|
|
361
|
-
parsedBody,
|
|
362
|
-
exceptionCtor: __BaseException,
|
|
363
|
-
errorCode,
|
|
364
|
-
});
|
|
365
|
-
}
|
|
366
|
-
};
|
|
367
|
-
export const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
368
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
369
|
-
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
370
|
-
}
|
|
371
|
-
const contents = map({
|
|
372
|
-
$metadata: deserializeMetadata(output),
|
|
129
|
+
}); };
|
|
130
|
+
export var serializeAws_restJson1TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
131
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
132
|
+
return __generator(this, function (_c) {
|
|
133
|
+
switch (_c.label) {
|
|
134
|
+
case 0: return [4, context.endpoint()];
|
|
135
|
+
case 1:
|
|
136
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
137
|
+
headers = {
|
|
138
|
+
"content-type": "application/json",
|
|
139
|
+
};
|
|
140
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{ResourceArn}";
|
|
141
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", function () { return input.ResourceArn; }, "{ResourceArn}", false);
|
|
142
|
+
body = JSON.stringify(__assign({}, (input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
|
|
143
|
+
return [2, new __HttpRequest({
|
|
144
|
+
protocol: protocol,
|
|
145
|
+
hostname: hostname,
|
|
146
|
+
port: port,
|
|
147
|
+
method: "POST",
|
|
148
|
+
headers: headers,
|
|
149
|
+
path: resolvedPath,
|
|
150
|
+
body: body,
|
|
151
|
+
})];
|
|
152
|
+
}
|
|
373
153
|
});
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
errorCode,
|
|
400
|
-
});
|
|
401
|
-
}
|
|
402
|
-
};
|
|
403
|
-
export const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
|
|
404
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
405
|
-
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
406
|
-
}
|
|
407
|
-
const contents = map({
|
|
408
|
-
$metadata: deserializeMetadata(output),
|
|
154
|
+
}); };
|
|
155
|
+
export var serializeAws_restJson1UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
156
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
157
|
+
return __generator(this, function (_c) {
|
|
158
|
+
switch (_c.label) {
|
|
159
|
+
case 0: return [4, context.endpoint()];
|
|
160
|
+
case 1:
|
|
161
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
162
|
+
headers = {};
|
|
163
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{ResourceArn}";
|
|
164
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", function () { return input.ResourceArn; }, "{ResourceArn}", false);
|
|
165
|
+
query = map({
|
|
166
|
+
tagKeys: [function () { return input.TagKeys !== void 0; }, function () { return (input.TagKeys || []).map(function (_entry) { return _entry; }); }],
|
|
167
|
+
});
|
|
168
|
+
return [2, new __HttpRequest({
|
|
169
|
+
protocol: protocol,
|
|
170
|
+
hostname: hostname,
|
|
171
|
+
port: port,
|
|
172
|
+
method: "DELETE",
|
|
173
|
+
headers: headers,
|
|
174
|
+
path: resolvedPath,
|
|
175
|
+
query: query,
|
|
176
|
+
body: body,
|
|
177
|
+
})];
|
|
178
|
+
}
|
|
409
179
|
});
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
});
|
|
437
|
-
}
|
|
438
|
-
};
|
|
439
|
-
export const deserializeAws_restJson1UpdateLifecyclePolicyCommand = async (output, context) => {
|
|
440
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
441
|
-
return deserializeAws_restJson1UpdateLifecyclePolicyCommandError(output, context);
|
|
442
|
-
}
|
|
443
|
-
const contents = map({
|
|
444
|
-
$metadata: deserializeMetadata(output),
|
|
180
|
+
}); };
|
|
181
|
+
export var serializeAws_restJson1UpdateLifecyclePolicyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
182
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
183
|
+
return __generator(this, function (_c) {
|
|
184
|
+
switch (_c.label) {
|
|
185
|
+
case 0: return [4, context.endpoint()];
|
|
186
|
+
case 1:
|
|
187
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
188
|
+
headers = {
|
|
189
|
+
"content-type": "application/json",
|
|
190
|
+
};
|
|
191
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/policies/{PolicyId}";
|
|
192
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "PolicyId", function () { return input.PolicyId; }, "{PolicyId}", false);
|
|
193
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.Description != null && { Description: input.Description })), (input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn })), (input.PolicyDetails != null && {
|
|
194
|
+
PolicyDetails: serializeAws_restJson1PolicyDetails(input.PolicyDetails, context),
|
|
195
|
+
})), (input.State != null && { State: input.State })));
|
|
196
|
+
return [2, new __HttpRequest({
|
|
197
|
+
protocol: protocol,
|
|
198
|
+
hostname: hostname,
|
|
199
|
+
port: port,
|
|
200
|
+
method: "PATCH",
|
|
201
|
+
headers: headers,
|
|
202
|
+
path: resolvedPath,
|
|
203
|
+
body: body,
|
|
204
|
+
})];
|
|
205
|
+
}
|
|
445
206
|
});
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
default:
|
|
469
|
-
const parsedBody = parsedOutput.body;
|
|
470
|
-
throwDefaultError({
|
|
471
|
-
output,
|
|
472
|
-
parsedBody,
|
|
473
|
-
exceptionCtor: __BaseException,
|
|
474
|
-
errorCode,
|
|
475
|
-
});
|
|
476
|
-
}
|
|
477
|
-
};
|
|
478
|
-
const map = __map;
|
|
479
|
-
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
480
|
-
const contents = map({});
|
|
481
|
-
const data = parsedOutput.body;
|
|
482
|
-
if (data.Code != null) {
|
|
483
|
-
contents.Code = __expectString(data.Code);
|
|
484
|
-
}
|
|
485
|
-
if (data.Message != null) {
|
|
486
|
-
contents.Message = __expectString(data.Message);
|
|
487
|
-
}
|
|
488
|
-
const exception = new InternalServerException({
|
|
489
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
490
|
-
...contents,
|
|
207
|
+
}); };
|
|
208
|
+
export var deserializeAws_restJson1CreateLifecyclePolicyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
209
|
+
var contents, data, _a, _b;
|
|
210
|
+
return __generator(this, function (_c) {
|
|
211
|
+
switch (_c.label) {
|
|
212
|
+
case 0:
|
|
213
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
214
|
+
return [2, deserializeAws_restJson1CreateLifecyclePolicyCommandError(output, context)];
|
|
215
|
+
}
|
|
216
|
+
contents = map({
|
|
217
|
+
$metadata: deserializeMetadata(output),
|
|
218
|
+
});
|
|
219
|
+
_a = __expectNonNull;
|
|
220
|
+
_b = __expectObject;
|
|
221
|
+
return [4, parseBody(output.body, context)];
|
|
222
|
+
case 1:
|
|
223
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
224
|
+
if (data.PolicyId != null) {
|
|
225
|
+
contents.PolicyId = __expectString(data.PolicyId);
|
|
226
|
+
}
|
|
227
|
+
return [2, contents];
|
|
228
|
+
}
|
|
491
229
|
});
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
230
|
+
}); };
|
|
231
|
+
var deserializeAws_restJson1CreateLifecyclePolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
232
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
233
|
+
var _c;
|
|
234
|
+
return __generator(this, function (_d) {
|
|
235
|
+
switch (_d.label) {
|
|
236
|
+
case 0:
|
|
237
|
+
_a = [__assign({}, output)];
|
|
238
|
+
_c = {};
|
|
239
|
+
return [4, parseErrorBody(output.body, context)];
|
|
240
|
+
case 1:
|
|
241
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
242
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
243
|
+
_b = errorCode;
|
|
244
|
+
switch (_b) {
|
|
245
|
+
case "InternalServerException": return [3, 2];
|
|
246
|
+
case "com.amazonaws.dlm#InternalServerException": return [3, 2];
|
|
247
|
+
case "InvalidRequestException": return [3, 4];
|
|
248
|
+
case "com.amazonaws.dlm#InvalidRequestException": return [3, 4];
|
|
249
|
+
case "LimitExceededException": return [3, 6];
|
|
250
|
+
case "com.amazonaws.dlm#LimitExceededException": return [3, 6];
|
|
251
|
+
}
|
|
252
|
+
return [3, 8];
|
|
253
|
+
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
254
|
+
case 3: throw _d.sent();
|
|
255
|
+
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
256
|
+
case 5: throw _d.sent();
|
|
257
|
+
case 6: return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
258
|
+
case 7: throw _d.sent();
|
|
259
|
+
case 8:
|
|
260
|
+
parsedBody = parsedOutput.body;
|
|
261
|
+
throwDefaultError({
|
|
262
|
+
output: output,
|
|
263
|
+
parsedBody: parsedBody,
|
|
264
|
+
exceptionCtor: __BaseException,
|
|
265
|
+
errorCode: errorCode,
|
|
266
|
+
});
|
|
267
|
+
_d.label = 9;
|
|
268
|
+
case 9: return [2];
|
|
269
|
+
}
|
|
512
270
|
});
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
271
|
+
}); };
|
|
272
|
+
export var deserializeAws_restJson1DeleteLifecyclePolicyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
273
|
+
var contents;
|
|
274
|
+
return __generator(this, function (_a) {
|
|
275
|
+
switch (_a.label) {
|
|
276
|
+
case 0:
|
|
277
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
278
|
+
return [2, deserializeAws_restJson1DeleteLifecyclePolicyCommandError(output, context)];
|
|
279
|
+
}
|
|
280
|
+
contents = map({
|
|
281
|
+
$metadata: deserializeMetadata(output),
|
|
282
|
+
});
|
|
283
|
+
return [4, collectBody(output.body, context)];
|
|
284
|
+
case 1:
|
|
285
|
+
_a.sent();
|
|
286
|
+
return [2, contents];
|
|
287
|
+
}
|
|
530
288
|
});
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
289
|
+
}); };
|
|
290
|
+
var deserializeAws_restJson1DeleteLifecyclePolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
291
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
292
|
+
var _c;
|
|
293
|
+
return __generator(this, function (_d) {
|
|
294
|
+
switch (_d.label) {
|
|
295
|
+
case 0:
|
|
296
|
+
_a = [__assign({}, output)];
|
|
297
|
+
_c = {};
|
|
298
|
+
return [4, parseErrorBody(output.body, context)];
|
|
299
|
+
case 1:
|
|
300
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
301
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
302
|
+
_b = errorCode;
|
|
303
|
+
switch (_b) {
|
|
304
|
+
case "InternalServerException": return [3, 2];
|
|
305
|
+
case "com.amazonaws.dlm#InternalServerException": return [3, 2];
|
|
306
|
+
case "LimitExceededException": return [3, 4];
|
|
307
|
+
case "com.amazonaws.dlm#LimitExceededException": return [3, 4];
|
|
308
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
309
|
+
case "com.amazonaws.dlm#ResourceNotFoundException": return [3, 6];
|
|
310
|
+
}
|
|
311
|
+
return [3, 8];
|
|
312
|
+
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
313
|
+
case 3: throw _d.sent();
|
|
314
|
+
case 4: return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
315
|
+
case 5: throw _d.sent();
|
|
316
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
317
|
+
case 7: throw _d.sent();
|
|
318
|
+
case 8:
|
|
319
|
+
parsedBody = parsedOutput.body;
|
|
320
|
+
throwDefaultError({
|
|
321
|
+
output: output,
|
|
322
|
+
parsedBody: parsedBody,
|
|
323
|
+
exceptionCtor: __BaseException,
|
|
324
|
+
errorCode: errorCode,
|
|
325
|
+
});
|
|
326
|
+
_d.label = 9;
|
|
327
|
+
case 9: return [2];
|
|
328
|
+
}
|
|
551
329
|
});
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
return {
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
330
|
+
}); };
|
|
331
|
+
export var deserializeAws_restJson1GetLifecyclePoliciesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
332
|
+
var contents, data, _a, _b;
|
|
333
|
+
return __generator(this, function (_c) {
|
|
334
|
+
switch (_c.label) {
|
|
335
|
+
case 0:
|
|
336
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
337
|
+
return [2, deserializeAws_restJson1GetLifecyclePoliciesCommandError(output, context)];
|
|
338
|
+
}
|
|
339
|
+
contents = map({
|
|
340
|
+
$metadata: deserializeMetadata(output),
|
|
341
|
+
});
|
|
342
|
+
_a = __expectNonNull;
|
|
343
|
+
_b = __expectObject;
|
|
344
|
+
return [4, parseBody(output.body, context)];
|
|
345
|
+
case 1:
|
|
346
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
347
|
+
if (data.Policies != null) {
|
|
348
|
+
contents.Policies = deserializeAws_restJson1LifecyclePolicySummaryList(data.Policies, context);
|
|
349
|
+
}
|
|
350
|
+
return [2, contents];
|
|
351
|
+
}
|
|
352
|
+
});
|
|
353
|
+
}); };
|
|
354
|
+
var deserializeAws_restJson1GetLifecyclePoliciesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
355
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
356
|
+
var _c;
|
|
357
|
+
return __generator(this, function (_d) {
|
|
358
|
+
switch (_d.label) {
|
|
359
|
+
case 0:
|
|
360
|
+
_a = [__assign({}, output)];
|
|
361
|
+
_c = {};
|
|
362
|
+
return [4, parseErrorBody(output.body, context)];
|
|
363
|
+
case 1:
|
|
364
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
365
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
366
|
+
_b = errorCode;
|
|
367
|
+
switch (_b) {
|
|
368
|
+
case "InternalServerException": return [3, 2];
|
|
369
|
+
case "com.amazonaws.dlm#InternalServerException": return [3, 2];
|
|
370
|
+
case "InvalidRequestException": return [3, 4];
|
|
371
|
+
case "com.amazonaws.dlm#InvalidRequestException": return [3, 4];
|
|
372
|
+
case "LimitExceededException": return [3, 6];
|
|
373
|
+
case "com.amazonaws.dlm#LimitExceededException": return [3, 6];
|
|
374
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
375
|
+
case "com.amazonaws.dlm#ResourceNotFoundException": return [3, 8];
|
|
376
|
+
}
|
|
377
|
+
return [3, 10];
|
|
378
|
+
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
379
|
+
case 3: throw _d.sent();
|
|
380
|
+
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
381
|
+
case 5: throw _d.sent();
|
|
382
|
+
case 6: return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
383
|
+
case 7: throw _d.sent();
|
|
384
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
385
|
+
case 9: throw _d.sent();
|
|
386
|
+
case 10:
|
|
387
|
+
parsedBody = parsedOutput.body;
|
|
388
|
+
throwDefaultError({
|
|
389
|
+
output: output,
|
|
390
|
+
parsedBody: parsedBody,
|
|
391
|
+
exceptionCtor: __BaseException,
|
|
392
|
+
errorCode: errorCode,
|
|
393
|
+
});
|
|
394
|
+
_d.label = 11;
|
|
395
|
+
case 11: return [2];
|
|
396
|
+
}
|
|
397
|
+
});
|
|
398
|
+
}); };
|
|
399
|
+
export var deserializeAws_restJson1GetLifecyclePolicyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
400
|
+
var contents, data, _a, _b;
|
|
401
|
+
return __generator(this, function (_c) {
|
|
402
|
+
switch (_c.label) {
|
|
403
|
+
case 0:
|
|
404
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
405
|
+
return [2, deserializeAws_restJson1GetLifecyclePolicyCommandError(output, context)];
|
|
406
|
+
}
|
|
407
|
+
contents = map({
|
|
408
|
+
$metadata: deserializeMetadata(output),
|
|
409
|
+
});
|
|
410
|
+
_a = __expectNonNull;
|
|
411
|
+
_b = __expectObject;
|
|
412
|
+
return [4, parseBody(output.body, context)];
|
|
413
|
+
case 1:
|
|
414
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
415
|
+
if (data.Policy != null) {
|
|
416
|
+
contents.Policy = deserializeAws_restJson1LifecyclePolicy(data.Policy, context);
|
|
417
|
+
}
|
|
418
|
+
return [2, contents];
|
|
419
|
+
}
|
|
420
|
+
});
|
|
421
|
+
}); };
|
|
422
|
+
var deserializeAws_restJson1GetLifecyclePolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
423
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
424
|
+
var _c;
|
|
425
|
+
return __generator(this, function (_d) {
|
|
426
|
+
switch (_d.label) {
|
|
427
|
+
case 0:
|
|
428
|
+
_a = [__assign({}, output)];
|
|
429
|
+
_c = {};
|
|
430
|
+
return [4, parseErrorBody(output.body, context)];
|
|
431
|
+
case 1:
|
|
432
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
433
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
434
|
+
_b = errorCode;
|
|
435
|
+
switch (_b) {
|
|
436
|
+
case "InternalServerException": return [3, 2];
|
|
437
|
+
case "com.amazonaws.dlm#InternalServerException": return [3, 2];
|
|
438
|
+
case "LimitExceededException": return [3, 4];
|
|
439
|
+
case "com.amazonaws.dlm#LimitExceededException": return [3, 4];
|
|
440
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
441
|
+
case "com.amazonaws.dlm#ResourceNotFoundException": return [3, 6];
|
|
442
|
+
}
|
|
443
|
+
return [3, 8];
|
|
444
|
+
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
445
|
+
case 3: throw _d.sent();
|
|
446
|
+
case 4: return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
447
|
+
case 5: throw _d.sent();
|
|
448
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
449
|
+
case 7: throw _d.sent();
|
|
450
|
+
case 8:
|
|
451
|
+
parsedBody = parsedOutput.body;
|
|
452
|
+
throwDefaultError({
|
|
453
|
+
output: output,
|
|
454
|
+
parsedBody: parsedBody,
|
|
455
|
+
exceptionCtor: __BaseException,
|
|
456
|
+
errorCode: errorCode,
|
|
457
|
+
});
|
|
458
|
+
_d.label = 9;
|
|
459
|
+
case 9: return [2];
|
|
460
|
+
}
|
|
461
|
+
});
|
|
462
|
+
}); };
|
|
463
|
+
export var deserializeAws_restJson1ListTagsForResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
464
|
+
var contents, data, _a, _b;
|
|
465
|
+
return __generator(this, function (_c) {
|
|
466
|
+
switch (_c.label) {
|
|
467
|
+
case 0:
|
|
468
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
469
|
+
return [2, deserializeAws_restJson1ListTagsForResourceCommandError(output, context)];
|
|
470
|
+
}
|
|
471
|
+
contents = map({
|
|
472
|
+
$metadata: deserializeMetadata(output),
|
|
473
|
+
});
|
|
474
|
+
_a = __expectNonNull;
|
|
475
|
+
_b = __expectObject;
|
|
476
|
+
return [4, parseBody(output.body, context)];
|
|
477
|
+
case 1:
|
|
478
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
479
|
+
if (data.Tags != null) {
|
|
480
|
+
contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
|
|
481
|
+
}
|
|
482
|
+
return [2, contents];
|
|
483
|
+
}
|
|
484
|
+
});
|
|
485
|
+
}); };
|
|
486
|
+
var deserializeAws_restJson1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
487
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
488
|
+
var _c;
|
|
489
|
+
return __generator(this, function (_d) {
|
|
490
|
+
switch (_d.label) {
|
|
491
|
+
case 0:
|
|
492
|
+
_a = [__assign({}, output)];
|
|
493
|
+
_c = {};
|
|
494
|
+
return [4, parseErrorBody(output.body, context)];
|
|
495
|
+
case 1:
|
|
496
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
497
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
498
|
+
_b = errorCode;
|
|
499
|
+
switch (_b) {
|
|
500
|
+
case "InternalServerException": return [3, 2];
|
|
501
|
+
case "com.amazonaws.dlm#InternalServerException": return [3, 2];
|
|
502
|
+
case "InvalidRequestException": return [3, 4];
|
|
503
|
+
case "com.amazonaws.dlm#InvalidRequestException": return [3, 4];
|
|
504
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
505
|
+
case "com.amazonaws.dlm#ResourceNotFoundException": return [3, 6];
|
|
506
|
+
}
|
|
507
|
+
return [3, 8];
|
|
508
|
+
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
509
|
+
case 3: throw _d.sent();
|
|
510
|
+
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
511
|
+
case 5: throw _d.sent();
|
|
512
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
513
|
+
case 7: throw _d.sent();
|
|
514
|
+
case 8:
|
|
515
|
+
parsedBody = parsedOutput.body;
|
|
516
|
+
throwDefaultError({
|
|
517
|
+
output: output,
|
|
518
|
+
parsedBody: parsedBody,
|
|
519
|
+
exceptionCtor: __BaseException,
|
|
520
|
+
errorCode: errorCode,
|
|
521
|
+
});
|
|
522
|
+
_d.label = 9;
|
|
523
|
+
case 9: return [2];
|
|
524
|
+
}
|
|
525
|
+
});
|
|
526
|
+
}); };
|
|
527
|
+
export var deserializeAws_restJson1TagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
528
|
+
var contents;
|
|
529
|
+
return __generator(this, function (_a) {
|
|
530
|
+
switch (_a.label) {
|
|
531
|
+
case 0:
|
|
532
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
533
|
+
return [2, deserializeAws_restJson1TagResourceCommandError(output, context)];
|
|
534
|
+
}
|
|
535
|
+
contents = map({
|
|
536
|
+
$metadata: deserializeMetadata(output),
|
|
537
|
+
});
|
|
538
|
+
return [4, collectBody(output.body, context)];
|
|
539
|
+
case 1:
|
|
540
|
+
_a.sent();
|
|
541
|
+
return [2, contents];
|
|
542
|
+
}
|
|
543
|
+
});
|
|
544
|
+
}); };
|
|
545
|
+
var deserializeAws_restJson1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
546
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
547
|
+
var _c;
|
|
548
|
+
return __generator(this, function (_d) {
|
|
549
|
+
switch (_d.label) {
|
|
550
|
+
case 0:
|
|
551
|
+
_a = [__assign({}, output)];
|
|
552
|
+
_c = {};
|
|
553
|
+
return [4, parseErrorBody(output.body, context)];
|
|
554
|
+
case 1:
|
|
555
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
556
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
557
|
+
_b = errorCode;
|
|
558
|
+
switch (_b) {
|
|
559
|
+
case "InternalServerException": return [3, 2];
|
|
560
|
+
case "com.amazonaws.dlm#InternalServerException": return [3, 2];
|
|
561
|
+
case "InvalidRequestException": return [3, 4];
|
|
562
|
+
case "com.amazonaws.dlm#InvalidRequestException": return [3, 4];
|
|
563
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
564
|
+
case "com.amazonaws.dlm#ResourceNotFoundException": return [3, 6];
|
|
565
|
+
}
|
|
566
|
+
return [3, 8];
|
|
567
|
+
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
568
|
+
case 3: throw _d.sent();
|
|
569
|
+
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
570
|
+
case 5: throw _d.sent();
|
|
571
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
572
|
+
case 7: throw _d.sent();
|
|
573
|
+
case 8:
|
|
574
|
+
parsedBody = parsedOutput.body;
|
|
575
|
+
throwDefaultError({
|
|
576
|
+
output: output,
|
|
577
|
+
parsedBody: parsedBody,
|
|
578
|
+
exceptionCtor: __BaseException,
|
|
579
|
+
errorCode: errorCode,
|
|
580
|
+
});
|
|
581
|
+
_d.label = 9;
|
|
582
|
+
case 9: return [2];
|
|
583
|
+
}
|
|
584
|
+
});
|
|
585
|
+
}); };
|
|
586
|
+
export var deserializeAws_restJson1UntagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
587
|
+
var contents;
|
|
588
|
+
return __generator(this, function (_a) {
|
|
589
|
+
switch (_a.label) {
|
|
590
|
+
case 0:
|
|
591
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
592
|
+
return [2, deserializeAws_restJson1UntagResourceCommandError(output, context)];
|
|
593
|
+
}
|
|
594
|
+
contents = map({
|
|
595
|
+
$metadata: deserializeMetadata(output),
|
|
596
|
+
});
|
|
597
|
+
return [4, collectBody(output.body, context)];
|
|
598
|
+
case 1:
|
|
599
|
+
_a.sent();
|
|
600
|
+
return [2, contents];
|
|
601
|
+
}
|
|
602
|
+
});
|
|
603
|
+
}); };
|
|
604
|
+
var deserializeAws_restJson1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
605
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
606
|
+
var _c;
|
|
607
|
+
return __generator(this, function (_d) {
|
|
608
|
+
switch (_d.label) {
|
|
609
|
+
case 0:
|
|
610
|
+
_a = [__assign({}, output)];
|
|
611
|
+
_c = {};
|
|
612
|
+
return [4, parseErrorBody(output.body, context)];
|
|
613
|
+
case 1:
|
|
614
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
615
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
616
|
+
_b = errorCode;
|
|
617
|
+
switch (_b) {
|
|
618
|
+
case "InternalServerException": return [3, 2];
|
|
619
|
+
case "com.amazonaws.dlm#InternalServerException": return [3, 2];
|
|
620
|
+
case "InvalidRequestException": return [3, 4];
|
|
621
|
+
case "com.amazonaws.dlm#InvalidRequestException": return [3, 4];
|
|
622
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
623
|
+
case "com.amazonaws.dlm#ResourceNotFoundException": return [3, 6];
|
|
624
|
+
}
|
|
625
|
+
return [3, 8];
|
|
626
|
+
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
627
|
+
case 3: throw _d.sent();
|
|
628
|
+
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
629
|
+
case 5: throw _d.sent();
|
|
630
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
631
|
+
case 7: throw _d.sent();
|
|
632
|
+
case 8:
|
|
633
|
+
parsedBody = parsedOutput.body;
|
|
634
|
+
throwDefaultError({
|
|
635
|
+
output: output,
|
|
636
|
+
parsedBody: parsedBody,
|
|
637
|
+
exceptionCtor: __BaseException,
|
|
638
|
+
errorCode: errorCode,
|
|
639
|
+
});
|
|
640
|
+
_d.label = 9;
|
|
641
|
+
case 9: return [2];
|
|
642
|
+
}
|
|
643
|
+
});
|
|
644
|
+
}); };
|
|
645
|
+
export var deserializeAws_restJson1UpdateLifecyclePolicyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
646
|
+
var contents;
|
|
647
|
+
return __generator(this, function (_a) {
|
|
648
|
+
switch (_a.label) {
|
|
649
|
+
case 0:
|
|
650
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
651
|
+
return [2, deserializeAws_restJson1UpdateLifecyclePolicyCommandError(output, context)];
|
|
652
|
+
}
|
|
653
|
+
contents = map({
|
|
654
|
+
$metadata: deserializeMetadata(output),
|
|
655
|
+
});
|
|
656
|
+
return [4, collectBody(output.body, context)];
|
|
657
|
+
case 1:
|
|
658
|
+
_a.sent();
|
|
659
|
+
return [2, contents];
|
|
660
|
+
}
|
|
661
|
+
});
|
|
662
|
+
}); };
|
|
663
|
+
var deserializeAws_restJson1UpdateLifecyclePolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
664
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
665
|
+
var _c;
|
|
666
|
+
return __generator(this, function (_d) {
|
|
667
|
+
switch (_d.label) {
|
|
668
|
+
case 0:
|
|
669
|
+
_a = [__assign({}, output)];
|
|
670
|
+
_c = {};
|
|
671
|
+
return [4, parseErrorBody(output.body, context)];
|
|
672
|
+
case 1:
|
|
673
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
674
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
675
|
+
_b = errorCode;
|
|
676
|
+
switch (_b) {
|
|
677
|
+
case "InternalServerException": return [3, 2];
|
|
678
|
+
case "com.amazonaws.dlm#InternalServerException": return [3, 2];
|
|
679
|
+
case "InvalidRequestException": return [3, 4];
|
|
680
|
+
case "com.amazonaws.dlm#InvalidRequestException": return [3, 4];
|
|
681
|
+
case "LimitExceededException": return [3, 6];
|
|
682
|
+
case "com.amazonaws.dlm#LimitExceededException": return [3, 6];
|
|
683
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
684
|
+
case "com.amazonaws.dlm#ResourceNotFoundException": return [3, 8];
|
|
685
|
+
}
|
|
686
|
+
return [3, 10];
|
|
687
|
+
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
688
|
+
case 3: throw _d.sent();
|
|
689
|
+
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
690
|
+
case 5: throw _d.sent();
|
|
691
|
+
case 6: return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
692
|
+
case 7: throw _d.sent();
|
|
693
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
694
|
+
case 9: throw _d.sent();
|
|
695
|
+
case 10:
|
|
696
|
+
parsedBody = parsedOutput.body;
|
|
697
|
+
throwDefaultError({
|
|
698
|
+
output: output,
|
|
699
|
+
parsedBody: parsedBody,
|
|
700
|
+
exceptionCtor: __BaseException,
|
|
701
|
+
errorCode: errorCode,
|
|
702
|
+
});
|
|
703
|
+
_d.label = 11;
|
|
704
|
+
case 11: return [2];
|
|
705
|
+
}
|
|
706
|
+
});
|
|
707
|
+
}); };
|
|
708
|
+
var map = __map;
|
|
709
|
+
var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
710
|
+
var contents, data, exception;
|
|
711
|
+
return __generator(this, function (_a) {
|
|
712
|
+
contents = map({});
|
|
713
|
+
data = parsedOutput.body;
|
|
714
|
+
if (data.Code != null) {
|
|
715
|
+
contents.Code = __expectString(data.Code);
|
|
716
|
+
}
|
|
717
|
+
if (data.Message != null) {
|
|
718
|
+
contents.Message = __expectString(data.Message);
|
|
719
|
+
}
|
|
720
|
+
exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
721
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
722
|
+
});
|
|
723
|
+
}); };
|
|
724
|
+
var deserializeAws_restJson1InvalidRequestExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
725
|
+
var contents, data, exception;
|
|
726
|
+
return __generator(this, function (_a) {
|
|
727
|
+
contents = map({});
|
|
728
|
+
data = parsedOutput.body;
|
|
729
|
+
if (data.Code != null) {
|
|
730
|
+
contents.Code = __expectString(data.Code);
|
|
731
|
+
}
|
|
732
|
+
if (data.Message != null) {
|
|
733
|
+
contents.Message = __expectString(data.Message);
|
|
734
|
+
}
|
|
735
|
+
if (data.MutuallyExclusiveParameters != null) {
|
|
736
|
+
contents.MutuallyExclusiveParameters = deserializeAws_restJson1ParameterList(data.MutuallyExclusiveParameters, context);
|
|
737
|
+
}
|
|
738
|
+
if (data.RequiredParameters != null) {
|
|
739
|
+
contents.RequiredParameters = deserializeAws_restJson1ParameterList(data.RequiredParameters, context);
|
|
740
|
+
}
|
|
741
|
+
exception = new InvalidRequestException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
742
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
743
|
+
});
|
|
744
|
+
}); };
|
|
745
|
+
var deserializeAws_restJson1LimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
746
|
+
var contents, data, exception;
|
|
747
|
+
return __generator(this, function (_a) {
|
|
748
|
+
contents = map({});
|
|
749
|
+
data = parsedOutput.body;
|
|
750
|
+
if (data.Code != null) {
|
|
751
|
+
contents.Code = __expectString(data.Code);
|
|
752
|
+
}
|
|
753
|
+
if (data.Message != null) {
|
|
754
|
+
contents.Message = __expectString(data.Message);
|
|
755
|
+
}
|
|
756
|
+
if (data.ResourceType != null) {
|
|
757
|
+
contents.ResourceType = __expectString(data.ResourceType);
|
|
758
|
+
}
|
|
759
|
+
exception = new LimitExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
760
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
761
|
+
});
|
|
762
|
+
}); };
|
|
763
|
+
var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
764
|
+
var contents, data, exception;
|
|
765
|
+
return __generator(this, function (_a) {
|
|
766
|
+
contents = map({});
|
|
767
|
+
data = parsedOutput.body;
|
|
768
|
+
if (data.Code != null) {
|
|
769
|
+
contents.Code = __expectString(data.Code);
|
|
770
|
+
}
|
|
771
|
+
if (data.Message != null) {
|
|
772
|
+
contents.Message = __expectString(data.Message);
|
|
773
|
+
}
|
|
774
|
+
if (data.ResourceIds != null) {
|
|
775
|
+
contents.ResourceIds = deserializeAws_restJson1PolicyIdList(data.ResourceIds, context);
|
|
776
|
+
}
|
|
777
|
+
if (data.ResourceType != null) {
|
|
778
|
+
contents.ResourceType = __expectString(data.ResourceType);
|
|
779
|
+
}
|
|
780
|
+
exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
781
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
782
|
+
});
|
|
783
|
+
}); };
|
|
784
|
+
var serializeAws_restJson1Action = function (input, context) {
|
|
785
|
+
return __assign(__assign({}, (input.CrossRegionCopy != null && {
|
|
786
|
+
CrossRegionCopy: serializeAws_restJson1CrossRegionCopyActionList(input.CrossRegionCopy, context),
|
|
787
|
+
})), (input.Name != null && { Name: input.Name }));
|
|
561
788
|
};
|
|
562
|
-
|
|
789
|
+
var serializeAws_restJson1ActionList = function (input, context) {
|
|
563
790
|
return input
|
|
564
|
-
.filter((e)
|
|
565
|
-
.map((entry)
|
|
791
|
+
.filter(function (e) { return e != null; })
|
|
792
|
+
.map(function (entry) {
|
|
566
793
|
return serializeAws_restJson1Action(entry, context);
|
|
567
794
|
});
|
|
568
795
|
};
|
|
569
|
-
|
|
570
|
-
return {
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
}),
|
|
574
|
-
};
|
|
796
|
+
var serializeAws_restJson1ArchiveRetainRule = function (input, context) {
|
|
797
|
+
return __assign({}, (input.RetentionArchiveTier != null && {
|
|
798
|
+
RetentionArchiveTier: serializeAws_restJson1RetentionArchiveTier(input.RetentionArchiveTier, context),
|
|
799
|
+
}));
|
|
575
800
|
};
|
|
576
|
-
|
|
577
|
-
return {
|
|
578
|
-
...(input.RetainRule != null && { RetainRule: serializeAws_restJson1ArchiveRetainRule(input.RetainRule, context) }),
|
|
579
|
-
};
|
|
801
|
+
var serializeAws_restJson1ArchiveRule = function (input, context) {
|
|
802
|
+
return __assign({}, (input.RetainRule != null && { RetainRule: serializeAws_restJson1ArchiveRetainRule(input.RetainRule, context) }));
|
|
580
803
|
};
|
|
581
|
-
|
|
804
|
+
var serializeAws_restJson1AvailabilityZoneList = function (input, context) {
|
|
582
805
|
return input
|
|
583
|
-
.filter((e)
|
|
584
|
-
.map((entry)
|
|
806
|
+
.filter(function (e) { return e != null; })
|
|
807
|
+
.map(function (entry) {
|
|
585
808
|
return entry;
|
|
586
809
|
});
|
|
587
810
|
};
|
|
588
|
-
|
|
589
|
-
return {
|
|
590
|
-
...(input.CronExpression != null && { CronExpression: input.CronExpression }),
|
|
591
|
-
...(input.Interval != null && { Interval: input.Interval }),
|
|
592
|
-
...(input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }),
|
|
593
|
-
...(input.Location != null && { Location: input.Location }),
|
|
594
|
-
...(input.Times != null && { Times: serializeAws_restJson1TimesList(input.Times, context) }),
|
|
595
|
-
};
|
|
811
|
+
var serializeAws_restJson1CreateRule = function (input, context) {
|
|
812
|
+
return __assign(__assign(__assign(__assign(__assign({}, (input.CronExpression != null && { CronExpression: input.CronExpression })), (input.Interval != null && { Interval: input.Interval })), (input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit })), (input.Location != null && { Location: input.Location })), (input.Times != null && { Times: serializeAws_restJson1TimesList(input.Times, context) }));
|
|
596
813
|
};
|
|
597
|
-
|
|
598
|
-
return {
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
RetainRule: serializeAws_restJson1CrossRegionCopyRetainRule(input.RetainRule, context),
|
|
604
|
-
}),
|
|
605
|
-
...(input.Target != null && { Target: input.Target }),
|
|
606
|
-
};
|
|
814
|
+
var serializeAws_restJson1CrossRegionCopyAction = function (input, context) {
|
|
815
|
+
return __assign(__assign(__assign({}, (input.EncryptionConfiguration != null && {
|
|
816
|
+
EncryptionConfiguration: serializeAws_restJson1EncryptionConfiguration(input.EncryptionConfiguration, context),
|
|
817
|
+
})), (input.RetainRule != null && {
|
|
818
|
+
RetainRule: serializeAws_restJson1CrossRegionCopyRetainRule(input.RetainRule, context),
|
|
819
|
+
})), (input.Target != null && { Target: input.Target }));
|
|
607
820
|
};
|
|
608
|
-
|
|
821
|
+
var serializeAws_restJson1CrossRegionCopyActionList = function (input, context) {
|
|
609
822
|
return input
|
|
610
|
-
.filter((e)
|
|
611
|
-
.map((entry)
|
|
823
|
+
.filter(function (e) { return e != null; })
|
|
824
|
+
.map(function (entry) {
|
|
612
825
|
return serializeAws_restJson1CrossRegionCopyAction(entry, context);
|
|
613
826
|
});
|
|
614
827
|
};
|
|
615
|
-
|
|
616
|
-
return {
|
|
617
|
-
...(input.Interval != null && { Interval: input.Interval }),
|
|
618
|
-
...(input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }),
|
|
619
|
-
};
|
|
828
|
+
var serializeAws_restJson1CrossRegionCopyDeprecateRule = function (input, context) {
|
|
829
|
+
return __assign(__assign({}, (input.Interval != null && { Interval: input.Interval })), (input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }));
|
|
620
830
|
};
|
|
621
|
-
|
|
622
|
-
return {
|
|
623
|
-
...(input.Interval != null && { Interval: input.Interval }),
|
|
624
|
-
...(input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }),
|
|
625
|
-
};
|
|
831
|
+
var serializeAws_restJson1CrossRegionCopyRetainRule = function (input, context) {
|
|
832
|
+
return __assign(__assign({}, (input.Interval != null && { Interval: input.Interval })), (input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }));
|
|
626
833
|
};
|
|
627
|
-
|
|
628
|
-
return {
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
}),
|
|
634
|
-
...(input.Encrypted != null && { Encrypted: input.Encrypted }),
|
|
635
|
-
...(input.RetainRule != null && {
|
|
636
|
-
RetainRule: serializeAws_restJson1CrossRegionCopyRetainRule(input.RetainRule, context),
|
|
637
|
-
}),
|
|
638
|
-
...(input.Target != null && { Target: input.Target }),
|
|
639
|
-
...(input.TargetRegion != null && { TargetRegion: input.TargetRegion }),
|
|
640
|
-
};
|
|
834
|
+
var serializeAws_restJson1CrossRegionCopyRule = function (input, context) {
|
|
835
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.CmkArn != null && { CmkArn: input.CmkArn })), (input.CopyTags != null && { CopyTags: input.CopyTags })), (input.DeprecateRule != null && {
|
|
836
|
+
DeprecateRule: serializeAws_restJson1CrossRegionCopyDeprecateRule(input.DeprecateRule, context),
|
|
837
|
+
})), (input.Encrypted != null && { Encrypted: input.Encrypted })), (input.RetainRule != null && {
|
|
838
|
+
RetainRule: serializeAws_restJson1CrossRegionCopyRetainRule(input.RetainRule, context),
|
|
839
|
+
})), (input.Target != null && { Target: input.Target })), (input.TargetRegion != null && { TargetRegion: input.TargetRegion }));
|
|
641
840
|
};
|
|
642
|
-
|
|
841
|
+
var serializeAws_restJson1CrossRegionCopyRules = function (input, context) {
|
|
643
842
|
return input
|
|
644
|
-
.filter((e)
|
|
645
|
-
.map((entry)
|
|
843
|
+
.filter(function (e) { return e != null; })
|
|
844
|
+
.map(function (entry) {
|
|
646
845
|
return serializeAws_restJson1CrossRegionCopyRule(entry, context);
|
|
647
846
|
});
|
|
648
847
|
};
|
|
649
|
-
|
|
650
|
-
return {
|
|
651
|
-
...(input.Count != null && { Count: input.Count }),
|
|
652
|
-
...(input.Interval != null && { Interval: input.Interval }),
|
|
653
|
-
...(input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }),
|
|
654
|
-
};
|
|
848
|
+
var serializeAws_restJson1DeprecateRule = function (input, context) {
|
|
849
|
+
return __assign(__assign(__assign({}, (input.Count != null && { Count: input.Count })), (input.Interval != null && { Interval: input.Interval })), (input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }));
|
|
655
850
|
};
|
|
656
|
-
|
|
657
|
-
return {
|
|
658
|
-
...(input.CmkArn != null && { CmkArn: input.CmkArn }),
|
|
659
|
-
...(input.Encrypted != null && { Encrypted: input.Encrypted }),
|
|
660
|
-
};
|
|
851
|
+
var serializeAws_restJson1EncryptionConfiguration = function (input, context) {
|
|
852
|
+
return __assign(__assign({}, (input.CmkArn != null && { CmkArn: input.CmkArn })), (input.Encrypted != null && { Encrypted: input.Encrypted }));
|
|
661
853
|
};
|
|
662
|
-
|
|
663
|
-
return {
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
...(input.SnapshotOwner != null && {
|
|
667
|
-
SnapshotOwner: serializeAws_restJson1SnapshotOwnerList(input.SnapshotOwner, context),
|
|
668
|
-
}),
|
|
669
|
-
};
|
|
854
|
+
var serializeAws_restJson1EventParameters = function (input, context) {
|
|
855
|
+
return __assign(__assign(__assign({}, (input.DescriptionRegex != null && { DescriptionRegex: input.DescriptionRegex })), (input.EventType != null && { EventType: input.EventType })), (input.SnapshotOwner != null && {
|
|
856
|
+
SnapshotOwner: serializeAws_restJson1SnapshotOwnerList(input.SnapshotOwner, context),
|
|
857
|
+
}));
|
|
670
858
|
};
|
|
671
|
-
|
|
672
|
-
return {
|
|
673
|
-
...(input.Parameters != null && { Parameters: serializeAws_restJson1EventParameters(input.Parameters, context) }),
|
|
674
|
-
...(input.Type != null && { Type: input.Type }),
|
|
675
|
-
};
|
|
859
|
+
var serializeAws_restJson1EventSource = function (input, context) {
|
|
860
|
+
return __assign(__assign({}, (input.Parameters != null && { Parameters: serializeAws_restJson1EventParameters(input.Parameters, context) })), (input.Type != null && { Type: input.Type }));
|
|
676
861
|
};
|
|
677
|
-
|
|
862
|
+
var serializeAws_restJson1ExcludeDataVolumeTagList = function (input, context) {
|
|
678
863
|
return input
|
|
679
|
-
.filter((e)
|
|
680
|
-
.map((entry)
|
|
864
|
+
.filter(function (e) { return e != null; })
|
|
865
|
+
.map(function (entry) {
|
|
681
866
|
return serializeAws_restJson1Tag(entry, context);
|
|
682
867
|
});
|
|
683
868
|
};
|
|
684
|
-
|
|
685
|
-
return {
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
}),
|
|
689
|
-
...(input.Count != null && { Count: input.Count }),
|
|
690
|
-
...(input.Interval != null && { Interval: input.Interval }),
|
|
691
|
-
...(input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }),
|
|
692
|
-
};
|
|
869
|
+
var serializeAws_restJson1FastRestoreRule = function (input, context) {
|
|
870
|
+
return __assign(__assign(__assign(__assign({}, (input.AvailabilityZones != null && {
|
|
871
|
+
AvailabilityZones: serializeAws_restJson1AvailabilityZoneList(input.AvailabilityZones, context),
|
|
872
|
+
})), (input.Count != null && { Count: input.Count })), (input.Interval != null && { Interval: input.Interval })), (input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }));
|
|
693
873
|
};
|
|
694
|
-
|
|
695
|
-
return {
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
ExcludeDataVolumeTags: serializeAws_restJson1ExcludeDataVolumeTagList(input.ExcludeDataVolumeTags, context),
|
|
699
|
-
}),
|
|
700
|
-
...(input.NoReboot != null && { NoReboot: input.NoReboot }),
|
|
701
|
-
};
|
|
874
|
+
var serializeAws_restJson1_Parameters = function (input, context) {
|
|
875
|
+
return __assign(__assign(__assign({}, (input.ExcludeBootVolume != null && { ExcludeBootVolume: input.ExcludeBootVolume })), (input.ExcludeDataVolumeTags != null && {
|
|
876
|
+
ExcludeDataVolumeTags: serializeAws_restJson1ExcludeDataVolumeTagList(input.ExcludeDataVolumeTags, context),
|
|
877
|
+
})), (input.NoReboot != null && { NoReboot: input.NoReboot }));
|
|
702
878
|
};
|
|
703
|
-
|
|
704
|
-
return {
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
...(input.ResourceLocations != null && {
|
|
710
|
-
ResourceLocations: serializeAws_restJson1ResourceLocationList(input.ResourceLocations, context),
|
|
711
|
-
}),
|
|
712
|
-
...(input.ResourceTypes != null && {
|
|
713
|
-
ResourceTypes: serializeAws_restJson1ResourceTypeValuesList(input.ResourceTypes, context),
|
|
714
|
-
}),
|
|
715
|
-
...(input.Schedules != null && { Schedules: serializeAws_restJson1ScheduleList(input.Schedules, context) }),
|
|
716
|
-
...(input.TargetTags != null && { TargetTags: serializeAws_restJson1TargetTagList(input.TargetTags, context) }),
|
|
717
|
-
};
|
|
879
|
+
var serializeAws_restJson1PolicyDetails = function (input, context) {
|
|
880
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Actions != null && { Actions: serializeAws_restJson1ActionList(input.Actions, context) })), (input.EventSource != null && { EventSource: serializeAws_restJson1EventSource(input.EventSource, context) })), (input.Parameters != null && { Parameters: serializeAws_restJson1_Parameters(input.Parameters, context) })), (input.PolicyType != null && { PolicyType: input.PolicyType })), (input.ResourceLocations != null && {
|
|
881
|
+
ResourceLocations: serializeAws_restJson1ResourceLocationList(input.ResourceLocations, context),
|
|
882
|
+
})), (input.ResourceTypes != null && {
|
|
883
|
+
ResourceTypes: serializeAws_restJson1ResourceTypeValuesList(input.ResourceTypes, context),
|
|
884
|
+
})), (input.Schedules != null && { Schedules: serializeAws_restJson1ScheduleList(input.Schedules, context) })), (input.TargetTags != null && { TargetTags: serializeAws_restJson1TargetTagList(input.TargetTags, context) }));
|
|
718
885
|
};
|
|
719
|
-
|
|
886
|
+
var serializeAws_restJson1ResourceLocationList = function (input, context) {
|
|
720
887
|
return input
|
|
721
|
-
.filter((e)
|
|
722
|
-
.map((entry)
|
|
888
|
+
.filter(function (e) { return e != null; })
|
|
889
|
+
.map(function (entry) {
|
|
723
890
|
return entry;
|
|
724
891
|
});
|
|
725
892
|
};
|
|
726
|
-
|
|
893
|
+
var serializeAws_restJson1ResourceTypeValuesList = function (input, context) {
|
|
727
894
|
return input
|
|
728
|
-
.filter((e)
|
|
729
|
-
.map((entry)
|
|
895
|
+
.filter(function (e) { return e != null; })
|
|
896
|
+
.map(function (entry) {
|
|
730
897
|
return entry;
|
|
731
898
|
});
|
|
732
899
|
};
|
|
733
|
-
|
|
734
|
-
return {
|
|
735
|
-
...(input.Count != null && { Count: input.Count }),
|
|
736
|
-
...(input.Interval != null && { Interval: input.Interval }),
|
|
737
|
-
...(input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }),
|
|
738
|
-
};
|
|
900
|
+
var serializeAws_restJson1RetainRule = function (input, context) {
|
|
901
|
+
return __assign(__assign(__assign({}, (input.Count != null && { Count: input.Count })), (input.Interval != null && { Interval: input.Interval })), (input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }));
|
|
739
902
|
};
|
|
740
|
-
|
|
741
|
-
return {
|
|
742
|
-
...(input.Count != null && { Count: input.Count }),
|
|
743
|
-
...(input.Interval != null && { Interval: input.Interval }),
|
|
744
|
-
...(input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }),
|
|
745
|
-
};
|
|
903
|
+
var serializeAws_restJson1RetentionArchiveTier = function (input, context) {
|
|
904
|
+
return __assign(__assign(__assign({}, (input.Count != null && { Count: input.Count })), (input.Interval != null && { Interval: input.Interval })), (input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }));
|
|
746
905
|
};
|
|
747
|
-
|
|
748
|
-
return {
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
}),
|
|
758
|
-
...(input.FastRestoreRule != null && {
|
|
759
|
-
FastRestoreRule: serializeAws_restJson1FastRestoreRule(input.FastRestoreRule, context),
|
|
760
|
-
}),
|
|
761
|
-
...(input.Name != null && { Name: input.Name }),
|
|
762
|
-
...(input.RetainRule != null && { RetainRule: serializeAws_restJson1RetainRule(input.RetainRule, context) }),
|
|
763
|
-
...(input.ShareRules != null && { ShareRules: serializeAws_restJson1ShareRules(input.ShareRules, context) }),
|
|
764
|
-
...(input.TagsToAdd != null && { TagsToAdd: serializeAws_restJson1TagsToAddList(input.TagsToAdd, context) }),
|
|
765
|
-
...(input.VariableTags != null && {
|
|
766
|
-
VariableTags: serializeAws_restJson1VariableTagsList(input.VariableTags, context),
|
|
767
|
-
}),
|
|
768
|
-
};
|
|
906
|
+
var serializeAws_restJson1Schedule = function (input, context) {
|
|
907
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.ArchiveRule != null && { ArchiveRule: serializeAws_restJson1ArchiveRule(input.ArchiveRule, context) })), (input.CopyTags != null && { CopyTags: input.CopyTags })), (input.CreateRule != null && { CreateRule: serializeAws_restJson1CreateRule(input.CreateRule, context) })), (input.CrossRegionCopyRules != null && {
|
|
908
|
+
CrossRegionCopyRules: serializeAws_restJson1CrossRegionCopyRules(input.CrossRegionCopyRules, context),
|
|
909
|
+
})), (input.DeprecateRule != null && {
|
|
910
|
+
DeprecateRule: serializeAws_restJson1DeprecateRule(input.DeprecateRule, context),
|
|
911
|
+
})), (input.FastRestoreRule != null && {
|
|
912
|
+
FastRestoreRule: serializeAws_restJson1FastRestoreRule(input.FastRestoreRule, context),
|
|
913
|
+
})), (input.Name != null && { Name: input.Name })), (input.RetainRule != null && { RetainRule: serializeAws_restJson1RetainRule(input.RetainRule, context) })), (input.ShareRules != null && { ShareRules: serializeAws_restJson1ShareRules(input.ShareRules, context) })), (input.TagsToAdd != null && { TagsToAdd: serializeAws_restJson1TagsToAddList(input.TagsToAdd, context) })), (input.VariableTags != null && {
|
|
914
|
+
VariableTags: serializeAws_restJson1VariableTagsList(input.VariableTags, context),
|
|
915
|
+
}));
|
|
769
916
|
};
|
|
770
|
-
|
|
917
|
+
var serializeAws_restJson1ScheduleList = function (input, context) {
|
|
771
918
|
return input
|
|
772
|
-
.filter((e)
|
|
773
|
-
.map((entry)
|
|
919
|
+
.filter(function (e) { return e != null; })
|
|
920
|
+
.map(function (entry) {
|
|
774
921
|
return serializeAws_restJson1Schedule(entry, context);
|
|
775
922
|
});
|
|
776
923
|
};
|
|
777
|
-
|
|
778
|
-
return {
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
}),
|
|
782
|
-
...(input.UnshareInterval != null && { UnshareInterval: input.UnshareInterval }),
|
|
783
|
-
...(input.UnshareIntervalUnit != null && { UnshareIntervalUnit: input.UnshareIntervalUnit }),
|
|
784
|
-
};
|
|
924
|
+
var serializeAws_restJson1ShareRule = function (input, context) {
|
|
925
|
+
return __assign(__assign(__assign({}, (input.TargetAccounts != null && {
|
|
926
|
+
TargetAccounts: serializeAws_restJson1ShareTargetAccountList(input.TargetAccounts, context),
|
|
927
|
+
})), (input.UnshareInterval != null && { UnshareInterval: input.UnshareInterval })), (input.UnshareIntervalUnit != null && { UnshareIntervalUnit: input.UnshareIntervalUnit }));
|
|
785
928
|
};
|
|
786
|
-
|
|
929
|
+
var serializeAws_restJson1ShareRules = function (input, context) {
|
|
787
930
|
return input
|
|
788
|
-
.filter((e)
|
|
789
|
-
.map((entry)
|
|
931
|
+
.filter(function (e) { return e != null; })
|
|
932
|
+
.map(function (entry) {
|
|
790
933
|
return serializeAws_restJson1ShareRule(entry, context);
|
|
791
934
|
});
|
|
792
935
|
};
|
|
793
|
-
|
|
936
|
+
var serializeAws_restJson1ShareTargetAccountList = function (input, context) {
|
|
794
937
|
return input
|
|
795
|
-
.filter((e)
|
|
796
|
-
.map((entry)
|
|
938
|
+
.filter(function (e) { return e != null; })
|
|
939
|
+
.map(function (entry) {
|
|
797
940
|
return entry;
|
|
798
941
|
});
|
|
799
942
|
};
|
|
800
|
-
|
|
943
|
+
var serializeAws_restJson1SnapshotOwnerList = function (input, context) {
|
|
801
944
|
return input
|
|
802
|
-
.filter((e)
|
|
803
|
-
.map((entry)
|
|
945
|
+
.filter(function (e) { return e != null; })
|
|
946
|
+
.map(function (entry) {
|
|
804
947
|
return entry;
|
|
805
948
|
});
|
|
806
949
|
};
|
|
807
|
-
|
|
808
|
-
return {
|
|
809
|
-
...(input.Key != null && { Key: input.Key }),
|
|
810
|
-
...(input.Value != null && { Value: input.Value }),
|
|
811
|
-
};
|
|
950
|
+
var serializeAws_restJson1Tag = function (input, context) {
|
|
951
|
+
return __assign(__assign({}, (input.Key != null && { Key: input.Key })), (input.Value != null && { Value: input.Value }));
|
|
812
952
|
};
|
|
813
|
-
|
|
814
|
-
return Object.entries(input).reduce((acc,
|
|
953
|
+
var serializeAws_restJson1TagMap = function (input, context) {
|
|
954
|
+
return Object.entries(input).reduce(function (acc, _a) {
|
|
955
|
+
var _b;
|
|
956
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
815
957
|
if (value === null) {
|
|
816
958
|
return acc;
|
|
817
959
|
}
|
|
818
|
-
return {
|
|
819
|
-
...acc,
|
|
820
|
-
[key]: value,
|
|
821
|
-
};
|
|
960
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));
|
|
822
961
|
}, {});
|
|
823
962
|
};
|
|
824
|
-
|
|
963
|
+
var serializeAws_restJson1TagsToAddList = function (input, context) {
|
|
825
964
|
return input
|
|
826
|
-
.filter((e)
|
|
827
|
-
.map((entry)
|
|
965
|
+
.filter(function (e) { return e != null; })
|
|
966
|
+
.map(function (entry) {
|
|
828
967
|
return serializeAws_restJson1Tag(entry, context);
|
|
829
968
|
});
|
|
830
969
|
};
|
|
831
|
-
|
|
970
|
+
var serializeAws_restJson1TargetTagList = function (input, context) {
|
|
832
971
|
return input
|
|
833
|
-
.filter((e)
|
|
834
|
-
.map((entry)
|
|
972
|
+
.filter(function (e) { return e != null; })
|
|
973
|
+
.map(function (entry) {
|
|
835
974
|
return serializeAws_restJson1Tag(entry, context);
|
|
836
975
|
});
|
|
837
976
|
};
|
|
838
|
-
|
|
977
|
+
var serializeAws_restJson1TimesList = function (input, context) {
|
|
839
978
|
return input
|
|
840
|
-
.filter((e)
|
|
841
|
-
.map((entry)
|
|
979
|
+
.filter(function (e) { return e != null; })
|
|
980
|
+
.map(function (entry) {
|
|
842
981
|
return entry;
|
|
843
982
|
});
|
|
844
983
|
};
|
|
845
|
-
|
|
984
|
+
var serializeAws_restJson1VariableTagsList = function (input, context) {
|
|
846
985
|
return input
|
|
847
|
-
.filter((e)
|
|
848
|
-
.map((entry)
|
|
986
|
+
.filter(function (e) { return e != null; })
|
|
987
|
+
.map(function (entry) {
|
|
849
988
|
return serializeAws_restJson1Tag(entry, context);
|
|
850
989
|
});
|
|
851
990
|
};
|
|
852
|
-
|
|
991
|
+
var deserializeAws_restJson1Action = function (output, context) {
|
|
853
992
|
return {
|
|
854
993
|
CrossRegionCopy: output.CrossRegionCopy != null
|
|
855
994
|
? deserializeAws_restJson1CrossRegionCopyActionList(output.CrossRegionCopy, context)
|
|
@@ -857,10 +996,10 @@ const deserializeAws_restJson1Action = (output, context) => {
|
|
|
857
996
|
Name: __expectString(output.Name),
|
|
858
997
|
};
|
|
859
998
|
};
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
.filter((e)
|
|
863
|
-
.map((entry)
|
|
999
|
+
var deserializeAws_restJson1ActionList = function (output, context) {
|
|
1000
|
+
var retVal = (output || [])
|
|
1001
|
+
.filter(function (e) { return e != null; })
|
|
1002
|
+
.map(function (entry) {
|
|
864
1003
|
if (entry === null) {
|
|
865
1004
|
return null;
|
|
866
1005
|
}
|
|
@@ -868,22 +1007,22 @@ const deserializeAws_restJson1ActionList = (output, context) => {
|
|
|
868
1007
|
});
|
|
869
1008
|
return retVal;
|
|
870
1009
|
};
|
|
871
|
-
|
|
1010
|
+
var deserializeAws_restJson1ArchiveRetainRule = function (output, context) {
|
|
872
1011
|
return {
|
|
873
1012
|
RetentionArchiveTier: output.RetentionArchiveTier != null
|
|
874
1013
|
? deserializeAws_restJson1RetentionArchiveTier(output.RetentionArchiveTier, context)
|
|
875
1014
|
: undefined,
|
|
876
1015
|
};
|
|
877
1016
|
};
|
|
878
|
-
|
|
1017
|
+
var deserializeAws_restJson1ArchiveRule = function (output, context) {
|
|
879
1018
|
return {
|
|
880
1019
|
RetainRule: output.RetainRule != null ? deserializeAws_restJson1ArchiveRetainRule(output.RetainRule, context) : undefined,
|
|
881
1020
|
};
|
|
882
1021
|
};
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
.filter((e)
|
|
886
|
-
.map((entry)
|
|
1022
|
+
var deserializeAws_restJson1AvailabilityZoneList = function (output, context) {
|
|
1023
|
+
var retVal = (output || [])
|
|
1024
|
+
.filter(function (e) { return e != null; })
|
|
1025
|
+
.map(function (entry) {
|
|
887
1026
|
if (entry === null) {
|
|
888
1027
|
return null;
|
|
889
1028
|
}
|
|
@@ -891,7 +1030,7 @@ const deserializeAws_restJson1AvailabilityZoneList = (output, context) => {
|
|
|
891
1030
|
});
|
|
892
1031
|
return retVal;
|
|
893
1032
|
};
|
|
894
|
-
|
|
1033
|
+
var deserializeAws_restJson1CreateRule = function (output, context) {
|
|
895
1034
|
return {
|
|
896
1035
|
CronExpression: __expectString(output.CronExpression),
|
|
897
1036
|
Interval: __expectInt32(output.Interval),
|
|
@@ -900,7 +1039,7 @@ const deserializeAws_restJson1CreateRule = (output, context) => {
|
|
|
900
1039
|
Times: output.Times != null ? deserializeAws_restJson1TimesList(output.Times, context) : undefined,
|
|
901
1040
|
};
|
|
902
1041
|
};
|
|
903
|
-
|
|
1042
|
+
var deserializeAws_restJson1CrossRegionCopyAction = function (output, context) {
|
|
904
1043
|
return {
|
|
905
1044
|
EncryptionConfiguration: output.EncryptionConfiguration != null
|
|
906
1045
|
? deserializeAws_restJson1EncryptionConfiguration(output.EncryptionConfiguration, context)
|
|
@@ -911,10 +1050,10 @@ const deserializeAws_restJson1CrossRegionCopyAction = (output, context) => {
|
|
|
911
1050
|
Target: __expectString(output.Target),
|
|
912
1051
|
};
|
|
913
1052
|
};
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
.filter((e)
|
|
917
|
-
.map((entry)
|
|
1053
|
+
var deserializeAws_restJson1CrossRegionCopyActionList = function (output, context) {
|
|
1054
|
+
var retVal = (output || [])
|
|
1055
|
+
.filter(function (e) { return e != null; })
|
|
1056
|
+
.map(function (entry) {
|
|
918
1057
|
if (entry === null) {
|
|
919
1058
|
return null;
|
|
920
1059
|
}
|
|
@@ -922,19 +1061,19 @@ const deserializeAws_restJson1CrossRegionCopyActionList = (output, context) => {
|
|
|
922
1061
|
});
|
|
923
1062
|
return retVal;
|
|
924
1063
|
};
|
|
925
|
-
|
|
1064
|
+
var deserializeAws_restJson1CrossRegionCopyDeprecateRule = function (output, context) {
|
|
926
1065
|
return {
|
|
927
1066
|
Interval: __expectInt32(output.Interval),
|
|
928
1067
|
IntervalUnit: __expectString(output.IntervalUnit),
|
|
929
1068
|
};
|
|
930
1069
|
};
|
|
931
|
-
|
|
1070
|
+
var deserializeAws_restJson1CrossRegionCopyRetainRule = function (output, context) {
|
|
932
1071
|
return {
|
|
933
1072
|
Interval: __expectInt32(output.Interval),
|
|
934
1073
|
IntervalUnit: __expectString(output.IntervalUnit),
|
|
935
1074
|
};
|
|
936
1075
|
};
|
|
937
|
-
|
|
1076
|
+
var deserializeAws_restJson1CrossRegionCopyRule = function (output, context) {
|
|
938
1077
|
return {
|
|
939
1078
|
CmkArn: __expectString(output.CmkArn),
|
|
940
1079
|
CopyTags: __expectBoolean(output.CopyTags),
|
|
@@ -949,10 +1088,10 @@ const deserializeAws_restJson1CrossRegionCopyRule = (output, context) => {
|
|
|
949
1088
|
TargetRegion: __expectString(output.TargetRegion),
|
|
950
1089
|
};
|
|
951
1090
|
};
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
.filter((e)
|
|
955
|
-
.map((entry)
|
|
1091
|
+
var deserializeAws_restJson1CrossRegionCopyRules = function (output, context) {
|
|
1092
|
+
var retVal = (output || [])
|
|
1093
|
+
.filter(function (e) { return e != null; })
|
|
1094
|
+
.map(function (entry) {
|
|
956
1095
|
if (entry === null) {
|
|
957
1096
|
return null;
|
|
958
1097
|
}
|
|
@@ -960,20 +1099,20 @@ const deserializeAws_restJson1CrossRegionCopyRules = (output, context) => {
|
|
|
960
1099
|
});
|
|
961
1100
|
return retVal;
|
|
962
1101
|
};
|
|
963
|
-
|
|
1102
|
+
var deserializeAws_restJson1DeprecateRule = function (output, context) {
|
|
964
1103
|
return {
|
|
965
1104
|
Count: __expectInt32(output.Count),
|
|
966
1105
|
Interval: __expectInt32(output.Interval),
|
|
967
1106
|
IntervalUnit: __expectString(output.IntervalUnit),
|
|
968
1107
|
};
|
|
969
1108
|
};
|
|
970
|
-
|
|
1109
|
+
var deserializeAws_restJson1EncryptionConfiguration = function (output, context) {
|
|
971
1110
|
return {
|
|
972
1111
|
CmkArn: __expectString(output.CmkArn),
|
|
973
1112
|
Encrypted: __expectBoolean(output.Encrypted),
|
|
974
1113
|
};
|
|
975
1114
|
};
|
|
976
|
-
|
|
1115
|
+
var deserializeAws_restJson1EventParameters = function (output, context) {
|
|
977
1116
|
return {
|
|
978
1117
|
DescriptionRegex: __expectString(output.DescriptionRegex),
|
|
979
1118
|
EventType: __expectString(output.EventType),
|
|
@@ -982,16 +1121,16 @@ const deserializeAws_restJson1EventParameters = (output, context) => {
|
|
|
982
1121
|
: undefined,
|
|
983
1122
|
};
|
|
984
1123
|
};
|
|
985
|
-
|
|
1124
|
+
var deserializeAws_restJson1EventSource = function (output, context) {
|
|
986
1125
|
return {
|
|
987
1126
|
Parameters: output.Parameters != null ? deserializeAws_restJson1EventParameters(output.Parameters, context) : undefined,
|
|
988
1127
|
Type: __expectString(output.Type),
|
|
989
1128
|
};
|
|
990
1129
|
};
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
.filter((e)
|
|
994
|
-
.map((entry)
|
|
1130
|
+
var deserializeAws_restJson1ExcludeDataVolumeTagList = function (output, context) {
|
|
1131
|
+
var retVal = (output || [])
|
|
1132
|
+
.filter(function (e) { return e != null; })
|
|
1133
|
+
.map(function (entry) {
|
|
995
1134
|
if (entry === null) {
|
|
996
1135
|
return null;
|
|
997
1136
|
}
|
|
@@ -999,7 +1138,7 @@ const deserializeAws_restJson1ExcludeDataVolumeTagList = (output, context) => {
|
|
|
999
1138
|
});
|
|
1000
1139
|
return retVal;
|
|
1001
1140
|
};
|
|
1002
|
-
|
|
1141
|
+
var deserializeAws_restJson1FastRestoreRule = function (output, context) {
|
|
1003
1142
|
return {
|
|
1004
1143
|
AvailabilityZones: output.AvailabilityZones != null
|
|
1005
1144
|
? deserializeAws_restJson1AvailabilityZoneList(output.AvailabilityZones, context)
|
|
@@ -1009,7 +1148,7 @@ const deserializeAws_restJson1FastRestoreRule = (output, context) => {
|
|
|
1009
1148
|
IntervalUnit: __expectString(output.IntervalUnit),
|
|
1010
1149
|
};
|
|
1011
1150
|
};
|
|
1012
|
-
|
|
1151
|
+
var deserializeAws_restJson1LifecyclePolicy = function (output, context) {
|
|
1013
1152
|
return {
|
|
1014
1153
|
DateCreated: output.DateCreated != null
|
|
1015
1154
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DateCreated)))
|
|
@@ -1027,7 +1166,7 @@ const deserializeAws_restJson1LifecyclePolicy = (output, context) => {
|
|
|
1027
1166
|
Tags: output.Tags != null ? deserializeAws_restJson1TagMap(output.Tags, context) : undefined,
|
|
1028
1167
|
};
|
|
1029
1168
|
};
|
|
1030
|
-
|
|
1169
|
+
var deserializeAws_restJson1LifecyclePolicySummary = function (output, context) {
|
|
1031
1170
|
return {
|
|
1032
1171
|
Description: __expectString(output.Description),
|
|
1033
1172
|
PolicyId: __expectString(output.PolicyId),
|
|
@@ -1036,10 +1175,10 @@ const deserializeAws_restJson1LifecyclePolicySummary = (output, context) => {
|
|
|
1036
1175
|
Tags: output.Tags != null ? deserializeAws_restJson1TagMap(output.Tags, context) : undefined,
|
|
1037
1176
|
};
|
|
1038
1177
|
};
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
.filter((e)
|
|
1042
|
-
.map((entry)
|
|
1178
|
+
var deserializeAws_restJson1LifecyclePolicySummaryList = function (output, context) {
|
|
1179
|
+
var retVal = (output || [])
|
|
1180
|
+
.filter(function (e) { return e != null; })
|
|
1181
|
+
.map(function (entry) {
|
|
1043
1182
|
if (entry === null) {
|
|
1044
1183
|
return null;
|
|
1045
1184
|
}
|
|
@@ -1047,10 +1186,10 @@ const deserializeAws_restJson1LifecyclePolicySummaryList = (output, context) =>
|
|
|
1047
1186
|
});
|
|
1048
1187
|
return retVal;
|
|
1049
1188
|
};
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
.filter((e)
|
|
1053
|
-
.map((entry)
|
|
1189
|
+
var deserializeAws_restJson1ParameterList = function (output, context) {
|
|
1190
|
+
var retVal = (output || [])
|
|
1191
|
+
.filter(function (e) { return e != null; })
|
|
1192
|
+
.map(function (entry) {
|
|
1054
1193
|
if (entry === null) {
|
|
1055
1194
|
return null;
|
|
1056
1195
|
}
|
|
@@ -1058,7 +1197,7 @@ const deserializeAws_restJson1ParameterList = (output, context) => {
|
|
|
1058
1197
|
});
|
|
1059
1198
|
return retVal;
|
|
1060
1199
|
};
|
|
1061
|
-
|
|
1200
|
+
var deserializeAws_restJson1_Parameters = function (output, context) {
|
|
1062
1201
|
return {
|
|
1063
1202
|
ExcludeBootVolume: __expectBoolean(output.ExcludeBootVolume),
|
|
1064
1203
|
ExcludeDataVolumeTags: output.ExcludeDataVolumeTags != null
|
|
@@ -1067,7 +1206,7 @@ const deserializeAws_restJson1_Parameters = (output, context) => {
|
|
|
1067
1206
|
NoReboot: __expectBoolean(output.NoReboot),
|
|
1068
1207
|
};
|
|
1069
1208
|
};
|
|
1070
|
-
|
|
1209
|
+
var deserializeAws_restJson1PolicyDetails = function (output, context) {
|
|
1071
1210
|
return {
|
|
1072
1211
|
Actions: output.Actions != null ? deserializeAws_restJson1ActionList(output.Actions, context) : undefined,
|
|
1073
1212
|
EventSource: output.EventSource != null ? deserializeAws_restJson1EventSource(output.EventSource, context) : undefined,
|
|
@@ -1083,10 +1222,10 @@ const deserializeAws_restJson1PolicyDetails = (output, context) => {
|
|
|
1083
1222
|
TargetTags: output.TargetTags != null ? deserializeAws_restJson1TargetTagList(output.TargetTags, context) : undefined,
|
|
1084
1223
|
};
|
|
1085
1224
|
};
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
.filter((e)
|
|
1089
|
-
.map((entry)
|
|
1225
|
+
var deserializeAws_restJson1PolicyIdList = function (output, context) {
|
|
1226
|
+
var retVal = (output || [])
|
|
1227
|
+
.filter(function (e) { return e != null; })
|
|
1228
|
+
.map(function (entry) {
|
|
1090
1229
|
if (entry === null) {
|
|
1091
1230
|
return null;
|
|
1092
1231
|
}
|
|
@@ -1094,10 +1233,10 @@ const deserializeAws_restJson1PolicyIdList = (output, context) => {
|
|
|
1094
1233
|
});
|
|
1095
1234
|
return retVal;
|
|
1096
1235
|
};
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
.filter((e)
|
|
1100
|
-
.map((entry)
|
|
1236
|
+
var deserializeAws_restJson1ResourceLocationList = function (output, context) {
|
|
1237
|
+
var retVal = (output || [])
|
|
1238
|
+
.filter(function (e) { return e != null; })
|
|
1239
|
+
.map(function (entry) {
|
|
1101
1240
|
if (entry === null) {
|
|
1102
1241
|
return null;
|
|
1103
1242
|
}
|
|
@@ -1105,10 +1244,10 @@ const deserializeAws_restJson1ResourceLocationList = (output, context) => {
|
|
|
1105
1244
|
});
|
|
1106
1245
|
return retVal;
|
|
1107
1246
|
};
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
.filter((e)
|
|
1111
|
-
.map((entry)
|
|
1247
|
+
var deserializeAws_restJson1ResourceTypeValuesList = function (output, context) {
|
|
1248
|
+
var retVal = (output || [])
|
|
1249
|
+
.filter(function (e) { return e != null; })
|
|
1250
|
+
.map(function (entry) {
|
|
1112
1251
|
if (entry === null) {
|
|
1113
1252
|
return null;
|
|
1114
1253
|
}
|
|
@@ -1116,21 +1255,21 @@ const deserializeAws_restJson1ResourceTypeValuesList = (output, context) => {
|
|
|
1116
1255
|
});
|
|
1117
1256
|
return retVal;
|
|
1118
1257
|
};
|
|
1119
|
-
|
|
1258
|
+
var deserializeAws_restJson1RetainRule = function (output, context) {
|
|
1120
1259
|
return {
|
|
1121
1260
|
Count: __expectInt32(output.Count),
|
|
1122
1261
|
Interval: __expectInt32(output.Interval),
|
|
1123
1262
|
IntervalUnit: __expectString(output.IntervalUnit),
|
|
1124
1263
|
};
|
|
1125
1264
|
};
|
|
1126
|
-
|
|
1265
|
+
var deserializeAws_restJson1RetentionArchiveTier = function (output, context) {
|
|
1127
1266
|
return {
|
|
1128
1267
|
Count: __expectInt32(output.Count),
|
|
1129
1268
|
Interval: __expectInt32(output.Interval),
|
|
1130
1269
|
IntervalUnit: __expectString(output.IntervalUnit),
|
|
1131
1270
|
};
|
|
1132
1271
|
};
|
|
1133
|
-
|
|
1272
|
+
var deserializeAws_restJson1Schedule = function (output, context) {
|
|
1134
1273
|
return {
|
|
1135
1274
|
ArchiveRule: output.ArchiveRule != null ? deserializeAws_restJson1ArchiveRule(output.ArchiveRule, context) : undefined,
|
|
1136
1275
|
CopyTags: __expectBoolean(output.CopyTags),
|
|
@@ -1149,10 +1288,10 @@ const deserializeAws_restJson1Schedule = (output, context) => {
|
|
|
1149
1288
|
VariableTags: output.VariableTags != null ? deserializeAws_restJson1VariableTagsList(output.VariableTags, context) : undefined,
|
|
1150
1289
|
};
|
|
1151
1290
|
};
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
.filter((e)
|
|
1155
|
-
.map((entry)
|
|
1291
|
+
var deserializeAws_restJson1ScheduleList = function (output, context) {
|
|
1292
|
+
var retVal = (output || [])
|
|
1293
|
+
.filter(function (e) { return e != null; })
|
|
1294
|
+
.map(function (entry) {
|
|
1156
1295
|
if (entry === null) {
|
|
1157
1296
|
return null;
|
|
1158
1297
|
}
|
|
@@ -1160,7 +1299,7 @@ const deserializeAws_restJson1ScheduleList = (output, context) => {
|
|
|
1160
1299
|
});
|
|
1161
1300
|
return retVal;
|
|
1162
1301
|
};
|
|
1163
|
-
|
|
1302
|
+
var deserializeAws_restJson1ShareRule = function (output, context) {
|
|
1164
1303
|
return {
|
|
1165
1304
|
TargetAccounts: output.TargetAccounts != null
|
|
1166
1305
|
? deserializeAws_restJson1ShareTargetAccountList(output.TargetAccounts, context)
|
|
@@ -1169,10 +1308,10 @@ const deserializeAws_restJson1ShareRule = (output, context) => {
|
|
|
1169
1308
|
UnshareIntervalUnit: __expectString(output.UnshareIntervalUnit),
|
|
1170
1309
|
};
|
|
1171
1310
|
};
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
.filter((e)
|
|
1175
|
-
.map((entry)
|
|
1311
|
+
var deserializeAws_restJson1ShareRules = function (output, context) {
|
|
1312
|
+
var retVal = (output || [])
|
|
1313
|
+
.filter(function (e) { return e != null; })
|
|
1314
|
+
.map(function (entry) {
|
|
1176
1315
|
if (entry === null) {
|
|
1177
1316
|
return null;
|
|
1178
1317
|
}
|
|
@@ -1180,10 +1319,10 @@ const deserializeAws_restJson1ShareRules = (output, context) => {
|
|
|
1180
1319
|
});
|
|
1181
1320
|
return retVal;
|
|
1182
1321
|
};
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
.filter((e)
|
|
1186
|
-
.map((entry)
|
|
1322
|
+
var deserializeAws_restJson1ShareTargetAccountList = function (output, context) {
|
|
1323
|
+
var retVal = (output || [])
|
|
1324
|
+
.filter(function (e) { return e != null; })
|
|
1325
|
+
.map(function (entry) {
|
|
1187
1326
|
if (entry === null) {
|
|
1188
1327
|
return null;
|
|
1189
1328
|
}
|
|
@@ -1191,10 +1330,10 @@ const deserializeAws_restJson1ShareTargetAccountList = (output, context) => {
|
|
|
1191
1330
|
});
|
|
1192
1331
|
return retVal;
|
|
1193
1332
|
};
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
.filter((e)
|
|
1197
|
-
.map((entry)
|
|
1333
|
+
var deserializeAws_restJson1SnapshotOwnerList = function (output, context) {
|
|
1334
|
+
var retVal = (output || [])
|
|
1335
|
+
.filter(function (e) { return e != null; })
|
|
1336
|
+
.map(function (entry) {
|
|
1198
1337
|
if (entry === null) {
|
|
1199
1338
|
return null;
|
|
1200
1339
|
}
|
|
@@ -1202,27 +1341,26 @@ const deserializeAws_restJson1SnapshotOwnerList = (output, context) => {
|
|
|
1202
1341
|
});
|
|
1203
1342
|
return retVal;
|
|
1204
1343
|
};
|
|
1205
|
-
|
|
1344
|
+
var deserializeAws_restJson1Tag = function (output, context) {
|
|
1206
1345
|
return {
|
|
1207
1346
|
Key: __expectString(output.Key),
|
|
1208
1347
|
Value: __expectString(output.Value),
|
|
1209
1348
|
};
|
|
1210
1349
|
};
|
|
1211
|
-
|
|
1212
|
-
return Object.entries(output).reduce((acc,
|
|
1350
|
+
var deserializeAws_restJson1TagMap = function (output, context) {
|
|
1351
|
+
return Object.entries(output).reduce(function (acc, _a) {
|
|
1352
|
+
var _b;
|
|
1353
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1213
1354
|
if (value === null) {
|
|
1214
1355
|
return acc;
|
|
1215
1356
|
}
|
|
1216
|
-
return {
|
|
1217
|
-
...acc,
|
|
1218
|
-
[key]: __expectString(value),
|
|
1219
|
-
};
|
|
1357
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
|
|
1220
1358
|
}, {});
|
|
1221
1359
|
};
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
.filter((e)
|
|
1225
|
-
.map((entry)
|
|
1360
|
+
var deserializeAws_restJson1TagsToAddList = function (output, context) {
|
|
1361
|
+
var retVal = (output || [])
|
|
1362
|
+
.filter(function (e) { return e != null; })
|
|
1363
|
+
.map(function (entry) {
|
|
1226
1364
|
if (entry === null) {
|
|
1227
1365
|
return null;
|
|
1228
1366
|
}
|
|
@@ -1230,10 +1368,10 @@ const deserializeAws_restJson1TagsToAddList = (output, context) => {
|
|
|
1230
1368
|
});
|
|
1231
1369
|
return retVal;
|
|
1232
1370
|
};
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
.filter((e)
|
|
1236
|
-
.map((entry)
|
|
1371
|
+
var deserializeAws_restJson1TargetTagList = function (output, context) {
|
|
1372
|
+
var retVal = (output || [])
|
|
1373
|
+
.filter(function (e) { return e != null; })
|
|
1374
|
+
.map(function (entry) {
|
|
1237
1375
|
if (entry === null) {
|
|
1238
1376
|
return null;
|
|
1239
1377
|
}
|
|
@@ -1241,10 +1379,10 @@ const deserializeAws_restJson1TargetTagList = (output, context) => {
|
|
|
1241
1379
|
});
|
|
1242
1380
|
return retVal;
|
|
1243
1381
|
};
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
.filter((e)
|
|
1247
|
-
.map((entry)
|
|
1382
|
+
var deserializeAws_restJson1TimesList = function (output, context) {
|
|
1383
|
+
var retVal = (output || [])
|
|
1384
|
+
.filter(function (e) { return e != null; })
|
|
1385
|
+
.map(function (entry) {
|
|
1248
1386
|
if (entry === null) {
|
|
1249
1387
|
return null;
|
|
1250
1388
|
}
|
|
@@ -1252,10 +1390,10 @@ const deserializeAws_restJson1TimesList = (output, context) => {
|
|
|
1252
1390
|
});
|
|
1253
1391
|
return retVal;
|
|
1254
1392
|
};
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
.filter((e)
|
|
1258
|
-
.map((entry)
|
|
1393
|
+
var deserializeAws_restJson1VariableTagsList = function (output, context) {
|
|
1394
|
+
var retVal = (output || [])
|
|
1395
|
+
.filter(function (e) { return e != null; })
|
|
1396
|
+
.map(function (entry) {
|
|
1259
1397
|
if (entry === null) {
|
|
1260
1398
|
return null;
|
|
1261
1399
|
}
|
|
@@ -1263,39 +1401,57 @@ const deserializeAws_restJson1VariableTagsList = (output, context) => {
|
|
|
1263
1401
|
});
|
|
1264
1402
|
return retVal;
|
|
1265
1403
|
};
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1404
|
+
var deserializeMetadata = function (output) {
|
|
1405
|
+
var _a, _b;
|
|
1406
|
+
return ({
|
|
1407
|
+
httpStatusCode: output.statusCode,
|
|
1408
|
+
requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"],
|
|
1409
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1410
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1411
|
+
});
|
|
1412
|
+
};
|
|
1413
|
+
var collectBody = function (streamBody, context) {
|
|
1414
|
+
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
1273
1415
|
if (streamBody instanceof Uint8Array) {
|
|
1274
1416
|
return Promise.resolve(streamBody);
|
|
1275
1417
|
}
|
|
1276
1418
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1277
1419
|
};
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
};
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1420
|
+
var collectBodyString = function (streamBody, context) {
|
|
1421
|
+
return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
|
|
1422
|
+
};
|
|
1423
|
+
var isSerializableHeaderValue = function (value) {
|
|
1424
|
+
return value !== undefined &&
|
|
1425
|
+
value !== null &&
|
|
1426
|
+
value !== "" &&
|
|
1427
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1428
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1429
|
+
};
|
|
1430
|
+
var parseBody = function (streamBody, context) {
|
|
1431
|
+
return collectBodyString(streamBody, context).then(function (encoded) {
|
|
1432
|
+
if (encoded.length) {
|
|
1433
|
+
return JSON.parse(encoded);
|
|
1434
|
+
}
|
|
1435
|
+
return {};
|
|
1436
|
+
});
|
|
1437
|
+
};
|
|
1438
|
+
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1439
|
+
var value;
|
|
1440
|
+
var _a;
|
|
1441
|
+
return __generator(this, function (_b) {
|
|
1442
|
+
switch (_b.label) {
|
|
1443
|
+
case 0: return [4, parseBody(errorBody, context)];
|
|
1444
|
+
case 1:
|
|
1445
|
+
value = _b.sent();
|
|
1446
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
1447
|
+
return [2, value];
|
|
1448
|
+
}
|
|
1449
|
+
});
|
|
1450
|
+
}); };
|
|
1451
|
+
var loadRestJsonErrorCode = function (output, data) {
|
|
1452
|
+
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
1453
|
+
var sanitizeErrorCode = function (rawValue) {
|
|
1454
|
+
var cleanValue = rawValue;
|
|
1299
1455
|
if (typeof cleanValue === "number") {
|
|
1300
1456
|
cleanValue = cleanValue.toString();
|
|
1301
1457
|
}
|
|
@@ -1310,7 +1466,7 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
1310
1466
|
}
|
|
1311
1467
|
return cleanValue;
|
|
1312
1468
|
};
|
|
1313
|
-
|
|
1469
|
+
var headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1314
1470
|
if (headerKey !== undefined) {
|
|
1315
1471
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1316
1472
|
}
|