@aws-sdk/client-route53-recovery-cluster 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_json1_0.js +2 -2
- package/dist-es/Route53RecoveryCluster.js +25 -18
- package/dist-es/Route53RecoveryClusterClient.js +28 -22
- package/dist-es/commands/GetRoutingControlStateCommand.js +28 -21
- package/dist-es/commands/ListRoutingControlsCommand.js +28 -21
- package/dist-es/commands/UpdateRoutingControlStateCommand.js +28 -21
- package/dist-es/commands/UpdateRoutingControlStatesCommand.js +28 -21
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/Route53RecoveryClusterServiceException.js +10 -5
- package/dist-es/models/models_0.js +112 -133
- package/dist-es/pagination/ListRoutingControlsPaginator.js +68 -25
- package/dist-es/protocols/Aws_json1_0.js +513 -402
- 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,398 +1,486 @@
|
|
|
1
|
+
import { __assign, __awaiter, __generator } from "tslib";
|
|
1
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
3
|
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectString as __expectString, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
3
4
|
import { AccessDeniedException, ConflictException, EndpointTemporarilyUnavailableException, InternalServerException, ResourceNotFoundException, ServiceLimitExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
4
5
|
import { Route53RecoveryClusterServiceException as __BaseException } from "../models/Route53RecoveryClusterServiceException";
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export const serializeAws_json1_0ListRoutingControlsCommand = async (input, context) => {
|
|
15
|
-
const headers = {
|
|
16
|
-
"content-type": "application/x-amz-json-1.0",
|
|
17
|
-
"x-amz-target": "ToggleCustomerAPI.ListRoutingControls",
|
|
18
|
-
};
|
|
19
|
-
let body;
|
|
20
|
-
body = JSON.stringify(serializeAws_json1_0ListRoutingControlsRequest(input, context));
|
|
21
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
22
|
-
};
|
|
23
|
-
export const serializeAws_json1_0UpdateRoutingControlStateCommand = async (input, context) => {
|
|
24
|
-
const headers = {
|
|
25
|
-
"content-type": "application/x-amz-json-1.0",
|
|
26
|
-
"x-amz-target": "ToggleCustomerAPI.UpdateRoutingControlState",
|
|
27
|
-
};
|
|
28
|
-
let body;
|
|
29
|
-
body = JSON.stringify(serializeAws_json1_0UpdateRoutingControlStateRequest(input, context));
|
|
30
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
31
|
-
};
|
|
32
|
-
export const serializeAws_json1_0UpdateRoutingControlStatesCommand = async (input, context) => {
|
|
33
|
-
const headers = {
|
|
34
|
-
"content-type": "application/x-amz-json-1.0",
|
|
35
|
-
"x-amz-target": "ToggleCustomerAPI.UpdateRoutingControlStates",
|
|
36
|
-
};
|
|
37
|
-
let body;
|
|
38
|
-
body = JSON.stringify(serializeAws_json1_0UpdateRoutingControlStatesRequest(input, context));
|
|
39
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
40
|
-
};
|
|
41
|
-
export const deserializeAws_json1_0GetRoutingControlStateCommand = async (output, context) => {
|
|
42
|
-
if (output.statusCode >= 300) {
|
|
43
|
-
return deserializeAws_json1_0GetRoutingControlStateCommandError(output, context);
|
|
44
|
-
}
|
|
45
|
-
const data = await parseBody(output.body, context);
|
|
46
|
-
let contents = {};
|
|
47
|
-
contents = deserializeAws_json1_0GetRoutingControlStateResponse(data, context);
|
|
48
|
-
const response = {
|
|
49
|
-
$metadata: deserializeMetadata(output),
|
|
50
|
-
...contents,
|
|
51
|
-
};
|
|
52
|
-
return Promise.resolve(response);
|
|
53
|
-
};
|
|
54
|
-
const deserializeAws_json1_0GetRoutingControlStateCommandError = async (output, context) => {
|
|
55
|
-
const parsedOutput = {
|
|
56
|
-
...output,
|
|
57
|
-
body: await parseErrorBody(output.body, context),
|
|
58
|
-
};
|
|
59
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
60
|
-
switch (errorCode) {
|
|
61
|
-
case "AccessDeniedException":
|
|
62
|
-
case "com.amazonaws.route53recoverycluster#AccessDeniedException":
|
|
63
|
-
throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
|
|
64
|
-
case "EndpointTemporarilyUnavailableException":
|
|
65
|
-
case "com.amazonaws.route53recoverycluster#EndpointTemporarilyUnavailableException":
|
|
66
|
-
throw await deserializeAws_json1_0EndpointTemporarilyUnavailableExceptionResponse(parsedOutput, context);
|
|
67
|
-
case "InternalServerException":
|
|
68
|
-
case "com.amazonaws.route53recoverycluster#InternalServerException":
|
|
69
|
-
throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
|
|
70
|
-
case "ResourceNotFoundException":
|
|
71
|
-
case "com.amazonaws.route53recoverycluster#ResourceNotFoundException":
|
|
72
|
-
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
73
|
-
case "ThrottlingException":
|
|
74
|
-
case "com.amazonaws.route53recoverycluster#ThrottlingException":
|
|
75
|
-
throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
|
|
76
|
-
case "ValidationException":
|
|
77
|
-
case "com.amazonaws.route53recoverycluster#ValidationException":
|
|
78
|
-
throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
|
|
79
|
-
default:
|
|
80
|
-
const parsedBody = parsedOutput.body;
|
|
81
|
-
throwDefaultError({
|
|
82
|
-
output,
|
|
83
|
-
parsedBody,
|
|
84
|
-
exceptionCtor: __BaseException,
|
|
85
|
-
errorCode,
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
export const deserializeAws_json1_0ListRoutingControlsCommand = async (output, context) => {
|
|
90
|
-
if (output.statusCode >= 300) {
|
|
91
|
-
return deserializeAws_json1_0ListRoutingControlsCommandError(output, context);
|
|
92
|
-
}
|
|
93
|
-
const data = await parseBody(output.body, context);
|
|
94
|
-
let contents = {};
|
|
95
|
-
contents = deserializeAws_json1_0ListRoutingControlsResponse(data, context);
|
|
96
|
-
const response = {
|
|
97
|
-
$metadata: deserializeMetadata(output),
|
|
98
|
-
...contents,
|
|
99
|
-
};
|
|
100
|
-
return Promise.resolve(response);
|
|
101
|
-
};
|
|
102
|
-
const deserializeAws_json1_0ListRoutingControlsCommandError = async (output, context) => {
|
|
103
|
-
const parsedOutput = {
|
|
104
|
-
...output,
|
|
105
|
-
body: await parseErrorBody(output.body, context),
|
|
106
|
-
};
|
|
107
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
108
|
-
switch (errorCode) {
|
|
109
|
-
case "AccessDeniedException":
|
|
110
|
-
case "com.amazonaws.route53recoverycluster#AccessDeniedException":
|
|
111
|
-
throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
|
|
112
|
-
case "EndpointTemporarilyUnavailableException":
|
|
113
|
-
case "com.amazonaws.route53recoverycluster#EndpointTemporarilyUnavailableException":
|
|
114
|
-
throw await deserializeAws_json1_0EndpointTemporarilyUnavailableExceptionResponse(parsedOutput, context);
|
|
115
|
-
case "InternalServerException":
|
|
116
|
-
case "com.amazonaws.route53recoverycluster#InternalServerException":
|
|
117
|
-
throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
|
|
118
|
-
case "ResourceNotFoundException":
|
|
119
|
-
case "com.amazonaws.route53recoverycluster#ResourceNotFoundException":
|
|
120
|
-
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
121
|
-
case "ThrottlingException":
|
|
122
|
-
case "com.amazonaws.route53recoverycluster#ThrottlingException":
|
|
123
|
-
throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
|
|
124
|
-
case "ValidationException":
|
|
125
|
-
case "com.amazonaws.route53recoverycluster#ValidationException":
|
|
126
|
-
throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
|
|
127
|
-
default:
|
|
128
|
-
const parsedBody = parsedOutput.body;
|
|
129
|
-
throwDefaultError({
|
|
130
|
-
output,
|
|
131
|
-
parsedBody,
|
|
132
|
-
exceptionCtor: __BaseException,
|
|
133
|
-
errorCode,
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
};
|
|
137
|
-
export const deserializeAws_json1_0UpdateRoutingControlStateCommand = async (output, context) => {
|
|
138
|
-
if (output.statusCode >= 300) {
|
|
139
|
-
return deserializeAws_json1_0UpdateRoutingControlStateCommandError(output, context);
|
|
140
|
-
}
|
|
141
|
-
const data = await parseBody(output.body, context);
|
|
142
|
-
let contents = {};
|
|
143
|
-
contents = deserializeAws_json1_0UpdateRoutingControlStateResponse(data, context);
|
|
144
|
-
const response = {
|
|
145
|
-
$metadata: deserializeMetadata(output),
|
|
146
|
-
...contents,
|
|
147
|
-
};
|
|
148
|
-
return Promise.resolve(response);
|
|
149
|
-
};
|
|
150
|
-
const deserializeAws_json1_0UpdateRoutingControlStateCommandError = async (output, context) => {
|
|
151
|
-
const parsedOutput = {
|
|
152
|
-
...output,
|
|
153
|
-
body: await parseErrorBody(output.body, context),
|
|
154
|
-
};
|
|
155
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
156
|
-
switch (errorCode) {
|
|
157
|
-
case "AccessDeniedException":
|
|
158
|
-
case "com.amazonaws.route53recoverycluster#AccessDeniedException":
|
|
159
|
-
throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
|
|
160
|
-
case "ConflictException":
|
|
161
|
-
case "com.amazonaws.route53recoverycluster#ConflictException":
|
|
162
|
-
throw await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context);
|
|
163
|
-
case "EndpointTemporarilyUnavailableException":
|
|
164
|
-
case "com.amazonaws.route53recoverycluster#EndpointTemporarilyUnavailableException":
|
|
165
|
-
throw await deserializeAws_json1_0EndpointTemporarilyUnavailableExceptionResponse(parsedOutput, context);
|
|
166
|
-
case "InternalServerException":
|
|
167
|
-
case "com.amazonaws.route53recoverycluster#InternalServerException":
|
|
168
|
-
throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
|
|
169
|
-
case "ResourceNotFoundException":
|
|
170
|
-
case "com.amazonaws.route53recoverycluster#ResourceNotFoundException":
|
|
171
|
-
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
172
|
-
case "ThrottlingException":
|
|
173
|
-
case "com.amazonaws.route53recoverycluster#ThrottlingException":
|
|
174
|
-
throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
|
|
175
|
-
case "ValidationException":
|
|
176
|
-
case "com.amazonaws.route53recoverycluster#ValidationException":
|
|
177
|
-
throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
|
|
178
|
-
default:
|
|
179
|
-
const parsedBody = parsedOutput.body;
|
|
180
|
-
throwDefaultError({
|
|
181
|
-
output,
|
|
182
|
-
parsedBody,
|
|
183
|
-
exceptionCtor: __BaseException,
|
|
184
|
-
errorCode,
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
};
|
|
188
|
-
export const deserializeAws_json1_0UpdateRoutingControlStatesCommand = async (output, context) => {
|
|
189
|
-
if (output.statusCode >= 300) {
|
|
190
|
-
return deserializeAws_json1_0UpdateRoutingControlStatesCommandError(output, context);
|
|
191
|
-
}
|
|
192
|
-
const data = await parseBody(output.body, context);
|
|
193
|
-
let contents = {};
|
|
194
|
-
contents = deserializeAws_json1_0UpdateRoutingControlStatesResponse(data, context);
|
|
195
|
-
const response = {
|
|
196
|
-
$metadata: deserializeMetadata(output),
|
|
197
|
-
...contents,
|
|
198
|
-
};
|
|
199
|
-
return Promise.resolve(response);
|
|
200
|
-
};
|
|
201
|
-
const deserializeAws_json1_0UpdateRoutingControlStatesCommandError = async (output, context) => {
|
|
202
|
-
const parsedOutput = {
|
|
203
|
-
...output,
|
|
204
|
-
body: await parseErrorBody(output.body, context),
|
|
205
|
-
};
|
|
206
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
207
|
-
switch (errorCode) {
|
|
208
|
-
case "AccessDeniedException":
|
|
209
|
-
case "com.amazonaws.route53recoverycluster#AccessDeniedException":
|
|
210
|
-
throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
|
|
211
|
-
case "ConflictException":
|
|
212
|
-
case "com.amazonaws.route53recoverycluster#ConflictException":
|
|
213
|
-
throw await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context);
|
|
214
|
-
case "EndpointTemporarilyUnavailableException":
|
|
215
|
-
case "com.amazonaws.route53recoverycluster#EndpointTemporarilyUnavailableException":
|
|
216
|
-
throw await deserializeAws_json1_0EndpointTemporarilyUnavailableExceptionResponse(parsedOutput, context);
|
|
217
|
-
case "InternalServerException":
|
|
218
|
-
case "com.amazonaws.route53recoverycluster#InternalServerException":
|
|
219
|
-
throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
|
|
220
|
-
case "ResourceNotFoundException":
|
|
221
|
-
case "com.amazonaws.route53recoverycluster#ResourceNotFoundException":
|
|
222
|
-
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
223
|
-
case "ServiceLimitExceededException":
|
|
224
|
-
case "com.amazonaws.route53recoverycluster#ServiceLimitExceededException":
|
|
225
|
-
throw await deserializeAws_json1_0ServiceLimitExceededExceptionResponse(parsedOutput, context);
|
|
226
|
-
case "ThrottlingException":
|
|
227
|
-
case "com.amazonaws.route53recoverycluster#ThrottlingException":
|
|
228
|
-
throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
|
|
229
|
-
case "ValidationException":
|
|
230
|
-
case "com.amazonaws.route53recoverycluster#ValidationException":
|
|
231
|
-
throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
|
|
232
|
-
default:
|
|
233
|
-
const parsedBody = parsedOutput.body;
|
|
234
|
-
throwDefaultError({
|
|
235
|
-
output,
|
|
236
|
-
parsedBody,
|
|
237
|
-
exceptionCtor: __BaseException,
|
|
238
|
-
errorCode,
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
};
|
|
242
|
-
const deserializeAws_json1_0AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
243
|
-
const body = parsedOutput.body;
|
|
244
|
-
const deserialized = deserializeAws_json1_0AccessDeniedException(body, context);
|
|
245
|
-
const exception = new AccessDeniedException({
|
|
246
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
247
|
-
...deserialized,
|
|
6
|
+
export var serializeAws_json1_0GetRoutingControlStateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7
|
+
var headers, body;
|
|
8
|
+
return __generator(this, function (_a) {
|
|
9
|
+
headers = {
|
|
10
|
+
"content-type": "application/x-amz-json-1.0",
|
|
11
|
+
"x-amz-target": "ToggleCustomerAPI.GetRoutingControlState",
|
|
12
|
+
};
|
|
13
|
+
body = JSON.stringify(serializeAws_json1_0GetRoutingControlStateRequest(input, context));
|
|
14
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
248
15
|
});
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
16
|
+
}); };
|
|
17
|
+
export var serializeAws_json1_0ListRoutingControlsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
18
|
+
var headers, body;
|
|
19
|
+
return __generator(this, function (_a) {
|
|
20
|
+
headers = {
|
|
21
|
+
"content-type": "application/x-amz-json-1.0",
|
|
22
|
+
"x-amz-target": "ToggleCustomerAPI.ListRoutingControls",
|
|
23
|
+
};
|
|
24
|
+
body = JSON.stringify(serializeAws_json1_0ListRoutingControlsRequest(input, context));
|
|
25
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
257
26
|
});
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
27
|
+
}); };
|
|
28
|
+
export var serializeAws_json1_0UpdateRoutingControlStateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
29
|
+
var headers, body;
|
|
30
|
+
return __generator(this, function (_a) {
|
|
31
|
+
headers = {
|
|
32
|
+
"content-type": "application/x-amz-json-1.0",
|
|
33
|
+
"x-amz-target": "ToggleCustomerAPI.UpdateRoutingControlState",
|
|
34
|
+
};
|
|
35
|
+
body = JSON.stringify(serializeAws_json1_0UpdateRoutingControlStateRequest(input, context));
|
|
36
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
266
37
|
});
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
38
|
+
}); };
|
|
39
|
+
export var serializeAws_json1_0UpdateRoutingControlStatesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
40
|
+
var headers, body;
|
|
41
|
+
return __generator(this, function (_a) {
|
|
42
|
+
headers = {
|
|
43
|
+
"content-type": "application/x-amz-json-1.0",
|
|
44
|
+
"x-amz-target": "ToggleCustomerAPI.UpdateRoutingControlStates",
|
|
45
|
+
};
|
|
46
|
+
body = JSON.stringify(serializeAws_json1_0UpdateRoutingControlStatesRequest(input, context));
|
|
47
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
275
48
|
});
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
49
|
+
}); };
|
|
50
|
+
export var deserializeAws_json1_0GetRoutingControlStateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
51
|
+
var data, contents, response;
|
|
52
|
+
return __generator(this, function (_a) {
|
|
53
|
+
switch (_a.label) {
|
|
54
|
+
case 0:
|
|
55
|
+
if (output.statusCode >= 300) {
|
|
56
|
+
return [2, deserializeAws_json1_0GetRoutingControlStateCommandError(output, context)];
|
|
57
|
+
}
|
|
58
|
+
return [4, parseBody(output.body, context)];
|
|
59
|
+
case 1:
|
|
60
|
+
data = _a.sent();
|
|
61
|
+
contents = {};
|
|
62
|
+
contents = deserializeAws_json1_0GetRoutingControlStateResponse(data, context);
|
|
63
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
64
|
+
return [2, Promise.resolve(response)];
|
|
65
|
+
}
|
|
284
66
|
});
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
67
|
+
}); };
|
|
68
|
+
var deserializeAws_json1_0GetRoutingControlStateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
69
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
70
|
+
var _c;
|
|
71
|
+
return __generator(this, function (_d) {
|
|
72
|
+
switch (_d.label) {
|
|
73
|
+
case 0:
|
|
74
|
+
_a = [__assign({}, output)];
|
|
75
|
+
_c = {};
|
|
76
|
+
return [4, parseErrorBody(output.body, context)];
|
|
77
|
+
case 1:
|
|
78
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
79
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
80
|
+
_b = errorCode;
|
|
81
|
+
switch (_b) {
|
|
82
|
+
case "AccessDeniedException": return [3, 2];
|
|
83
|
+
case "com.amazonaws.route53recoverycluster#AccessDeniedException": return [3, 2];
|
|
84
|
+
case "EndpointTemporarilyUnavailableException": return [3, 4];
|
|
85
|
+
case "com.amazonaws.route53recoverycluster#EndpointTemporarilyUnavailableException": return [3, 4];
|
|
86
|
+
case "InternalServerException": return [3, 6];
|
|
87
|
+
case "com.amazonaws.route53recoverycluster#InternalServerException": return [3, 6];
|
|
88
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
89
|
+
case "com.amazonaws.route53recoverycluster#ResourceNotFoundException": return [3, 8];
|
|
90
|
+
case "ThrottlingException": return [3, 10];
|
|
91
|
+
case "com.amazonaws.route53recoverycluster#ThrottlingException": return [3, 10];
|
|
92
|
+
case "ValidationException": return [3, 12];
|
|
93
|
+
case "com.amazonaws.route53recoverycluster#ValidationException": return [3, 12];
|
|
94
|
+
}
|
|
95
|
+
return [3, 14];
|
|
96
|
+
case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
97
|
+
case 3: throw _d.sent();
|
|
98
|
+
case 4: return [4, deserializeAws_json1_0EndpointTemporarilyUnavailableExceptionResponse(parsedOutput, context)];
|
|
99
|
+
case 5: throw _d.sent();
|
|
100
|
+
case 6: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
|
|
101
|
+
case 7: throw _d.sent();
|
|
102
|
+
case 8: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
103
|
+
case 9: throw _d.sent();
|
|
104
|
+
case 10: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
|
|
105
|
+
case 11: throw _d.sent();
|
|
106
|
+
case 12: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
|
|
107
|
+
case 13: throw _d.sent();
|
|
108
|
+
case 14:
|
|
109
|
+
parsedBody = parsedOutput.body;
|
|
110
|
+
throwDefaultError({
|
|
111
|
+
output: output,
|
|
112
|
+
parsedBody: parsedBody,
|
|
113
|
+
exceptionCtor: __BaseException,
|
|
114
|
+
errorCode: errorCode,
|
|
115
|
+
});
|
|
116
|
+
_d.label = 15;
|
|
117
|
+
case 15: return [2];
|
|
118
|
+
}
|
|
293
119
|
});
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
120
|
+
}); };
|
|
121
|
+
export var deserializeAws_json1_0ListRoutingControlsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
122
|
+
var data, contents, response;
|
|
123
|
+
return __generator(this, function (_a) {
|
|
124
|
+
switch (_a.label) {
|
|
125
|
+
case 0:
|
|
126
|
+
if (output.statusCode >= 300) {
|
|
127
|
+
return [2, deserializeAws_json1_0ListRoutingControlsCommandError(output, context)];
|
|
128
|
+
}
|
|
129
|
+
return [4, parseBody(output.body, context)];
|
|
130
|
+
case 1:
|
|
131
|
+
data = _a.sent();
|
|
132
|
+
contents = {};
|
|
133
|
+
contents = deserializeAws_json1_0ListRoutingControlsResponse(data, context);
|
|
134
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
135
|
+
return [2, Promise.resolve(response)];
|
|
136
|
+
}
|
|
302
137
|
});
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
138
|
+
}); };
|
|
139
|
+
var deserializeAws_json1_0ListRoutingControlsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
140
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
141
|
+
var _c;
|
|
142
|
+
return __generator(this, function (_d) {
|
|
143
|
+
switch (_d.label) {
|
|
144
|
+
case 0:
|
|
145
|
+
_a = [__assign({}, output)];
|
|
146
|
+
_c = {};
|
|
147
|
+
return [4, parseErrorBody(output.body, context)];
|
|
148
|
+
case 1:
|
|
149
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
150
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
151
|
+
_b = errorCode;
|
|
152
|
+
switch (_b) {
|
|
153
|
+
case "AccessDeniedException": return [3, 2];
|
|
154
|
+
case "com.amazonaws.route53recoverycluster#AccessDeniedException": return [3, 2];
|
|
155
|
+
case "EndpointTemporarilyUnavailableException": return [3, 4];
|
|
156
|
+
case "com.amazonaws.route53recoverycluster#EndpointTemporarilyUnavailableException": return [3, 4];
|
|
157
|
+
case "InternalServerException": return [3, 6];
|
|
158
|
+
case "com.amazonaws.route53recoverycluster#InternalServerException": return [3, 6];
|
|
159
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
160
|
+
case "com.amazonaws.route53recoverycluster#ResourceNotFoundException": return [3, 8];
|
|
161
|
+
case "ThrottlingException": return [3, 10];
|
|
162
|
+
case "com.amazonaws.route53recoverycluster#ThrottlingException": return [3, 10];
|
|
163
|
+
case "ValidationException": return [3, 12];
|
|
164
|
+
case "com.amazonaws.route53recoverycluster#ValidationException": return [3, 12];
|
|
165
|
+
}
|
|
166
|
+
return [3, 14];
|
|
167
|
+
case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
168
|
+
case 3: throw _d.sent();
|
|
169
|
+
case 4: return [4, deserializeAws_json1_0EndpointTemporarilyUnavailableExceptionResponse(parsedOutput, context)];
|
|
170
|
+
case 5: throw _d.sent();
|
|
171
|
+
case 6: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
|
|
172
|
+
case 7: throw _d.sent();
|
|
173
|
+
case 8: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
174
|
+
case 9: throw _d.sent();
|
|
175
|
+
case 10: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
|
|
176
|
+
case 11: throw _d.sent();
|
|
177
|
+
case 12: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
|
|
178
|
+
case 13: throw _d.sent();
|
|
179
|
+
case 14:
|
|
180
|
+
parsedBody = parsedOutput.body;
|
|
181
|
+
throwDefaultError({
|
|
182
|
+
output: output,
|
|
183
|
+
parsedBody: parsedBody,
|
|
184
|
+
exceptionCtor: __BaseException,
|
|
185
|
+
errorCode: errorCode,
|
|
186
|
+
});
|
|
187
|
+
_d.label = 15;
|
|
188
|
+
case 15: return [2];
|
|
189
|
+
}
|
|
311
190
|
});
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
191
|
+
}); };
|
|
192
|
+
export var deserializeAws_json1_0UpdateRoutingControlStateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
193
|
+
var data, contents, response;
|
|
194
|
+
return __generator(this, function (_a) {
|
|
195
|
+
switch (_a.label) {
|
|
196
|
+
case 0:
|
|
197
|
+
if (output.statusCode >= 300) {
|
|
198
|
+
return [2, deserializeAws_json1_0UpdateRoutingControlStateCommandError(output, context)];
|
|
199
|
+
}
|
|
200
|
+
return [4, parseBody(output.body, context)];
|
|
201
|
+
case 1:
|
|
202
|
+
data = _a.sent();
|
|
203
|
+
contents = {};
|
|
204
|
+
contents = deserializeAws_json1_0UpdateRoutingControlStateResponse(data, context);
|
|
205
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
206
|
+
return [2, Promise.resolve(response)];
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
}); };
|
|
210
|
+
var deserializeAws_json1_0UpdateRoutingControlStateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
211
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
212
|
+
var _c;
|
|
213
|
+
return __generator(this, function (_d) {
|
|
214
|
+
switch (_d.label) {
|
|
215
|
+
case 0:
|
|
216
|
+
_a = [__assign({}, output)];
|
|
217
|
+
_c = {};
|
|
218
|
+
return [4, parseErrorBody(output.body, context)];
|
|
219
|
+
case 1:
|
|
220
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
221
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
222
|
+
_b = errorCode;
|
|
223
|
+
switch (_b) {
|
|
224
|
+
case "AccessDeniedException": return [3, 2];
|
|
225
|
+
case "com.amazonaws.route53recoverycluster#AccessDeniedException": return [3, 2];
|
|
226
|
+
case "ConflictException": return [3, 4];
|
|
227
|
+
case "com.amazonaws.route53recoverycluster#ConflictException": return [3, 4];
|
|
228
|
+
case "EndpointTemporarilyUnavailableException": return [3, 6];
|
|
229
|
+
case "com.amazonaws.route53recoverycluster#EndpointTemporarilyUnavailableException": return [3, 6];
|
|
230
|
+
case "InternalServerException": return [3, 8];
|
|
231
|
+
case "com.amazonaws.route53recoverycluster#InternalServerException": return [3, 8];
|
|
232
|
+
case "ResourceNotFoundException": return [3, 10];
|
|
233
|
+
case "com.amazonaws.route53recoverycluster#ResourceNotFoundException": return [3, 10];
|
|
234
|
+
case "ThrottlingException": return [3, 12];
|
|
235
|
+
case "com.amazonaws.route53recoverycluster#ThrottlingException": return [3, 12];
|
|
236
|
+
case "ValidationException": return [3, 14];
|
|
237
|
+
case "com.amazonaws.route53recoverycluster#ValidationException": return [3, 14];
|
|
238
|
+
}
|
|
239
|
+
return [3, 16];
|
|
240
|
+
case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
241
|
+
case 3: throw _d.sent();
|
|
242
|
+
case 4: return [4, deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)];
|
|
243
|
+
case 5: throw _d.sent();
|
|
244
|
+
case 6: return [4, deserializeAws_json1_0EndpointTemporarilyUnavailableExceptionResponse(parsedOutput, context)];
|
|
245
|
+
case 7: throw _d.sent();
|
|
246
|
+
case 8: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
|
|
247
|
+
case 9: throw _d.sent();
|
|
248
|
+
case 10: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
249
|
+
case 11: throw _d.sent();
|
|
250
|
+
case 12: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
|
|
251
|
+
case 13: throw _d.sent();
|
|
252
|
+
case 14: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
|
|
253
|
+
case 15: throw _d.sent();
|
|
254
|
+
case 16:
|
|
255
|
+
parsedBody = parsedOutput.body;
|
|
256
|
+
throwDefaultError({
|
|
257
|
+
output: output,
|
|
258
|
+
parsedBody: parsedBody,
|
|
259
|
+
exceptionCtor: __BaseException,
|
|
260
|
+
errorCode: errorCode,
|
|
261
|
+
});
|
|
262
|
+
_d.label = 17;
|
|
263
|
+
case 17: return [2];
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
}); };
|
|
267
|
+
export var deserializeAws_json1_0UpdateRoutingControlStatesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
268
|
+
var data, contents, response;
|
|
269
|
+
return __generator(this, function (_a) {
|
|
270
|
+
switch (_a.label) {
|
|
271
|
+
case 0:
|
|
272
|
+
if (output.statusCode >= 300) {
|
|
273
|
+
return [2, deserializeAws_json1_0UpdateRoutingControlStatesCommandError(output, context)];
|
|
274
|
+
}
|
|
275
|
+
return [4, parseBody(output.body, context)];
|
|
276
|
+
case 1:
|
|
277
|
+
data = _a.sent();
|
|
278
|
+
contents = {};
|
|
279
|
+
contents = deserializeAws_json1_0UpdateRoutingControlStatesResponse(data, context);
|
|
280
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
281
|
+
return [2, Promise.resolve(response)];
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
}); };
|
|
285
|
+
var deserializeAws_json1_0UpdateRoutingControlStatesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
286
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
287
|
+
var _c;
|
|
288
|
+
return __generator(this, function (_d) {
|
|
289
|
+
switch (_d.label) {
|
|
290
|
+
case 0:
|
|
291
|
+
_a = [__assign({}, output)];
|
|
292
|
+
_c = {};
|
|
293
|
+
return [4, parseErrorBody(output.body, context)];
|
|
294
|
+
case 1:
|
|
295
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
296
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
297
|
+
_b = errorCode;
|
|
298
|
+
switch (_b) {
|
|
299
|
+
case "AccessDeniedException": return [3, 2];
|
|
300
|
+
case "com.amazonaws.route53recoverycluster#AccessDeniedException": return [3, 2];
|
|
301
|
+
case "ConflictException": return [3, 4];
|
|
302
|
+
case "com.amazonaws.route53recoverycluster#ConflictException": return [3, 4];
|
|
303
|
+
case "EndpointTemporarilyUnavailableException": return [3, 6];
|
|
304
|
+
case "com.amazonaws.route53recoverycluster#EndpointTemporarilyUnavailableException": return [3, 6];
|
|
305
|
+
case "InternalServerException": return [3, 8];
|
|
306
|
+
case "com.amazonaws.route53recoverycluster#InternalServerException": return [3, 8];
|
|
307
|
+
case "ResourceNotFoundException": return [3, 10];
|
|
308
|
+
case "com.amazonaws.route53recoverycluster#ResourceNotFoundException": return [3, 10];
|
|
309
|
+
case "ServiceLimitExceededException": return [3, 12];
|
|
310
|
+
case "com.amazonaws.route53recoverycluster#ServiceLimitExceededException": return [3, 12];
|
|
311
|
+
case "ThrottlingException": return [3, 14];
|
|
312
|
+
case "com.amazonaws.route53recoverycluster#ThrottlingException": return [3, 14];
|
|
313
|
+
case "ValidationException": return [3, 16];
|
|
314
|
+
case "com.amazonaws.route53recoverycluster#ValidationException": return [3, 16];
|
|
315
|
+
}
|
|
316
|
+
return [3, 18];
|
|
317
|
+
case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
318
|
+
case 3: throw _d.sent();
|
|
319
|
+
case 4: return [4, deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)];
|
|
320
|
+
case 5: throw _d.sent();
|
|
321
|
+
case 6: return [4, deserializeAws_json1_0EndpointTemporarilyUnavailableExceptionResponse(parsedOutput, context)];
|
|
322
|
+
case 7: throw _d.sent();
|
|
323
|
+
case 8: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
|
|
324
|
+
case 9: throw _d.sent();
|
|
325
|
+
case 10: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
326
|
+
case 11: throw _d.sent();
|
|
327
|
+
case 12: return [4, deserializeAws_json1_0ServiceLimitExceededExceptionResponse(parsedOutput, context)];
|
|
328
|
+
case 13: throw _d.sent();
|
|
329
|
+
case 14: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
|
|
330
|
+
case 15: throw _d.sent();
|
|
331
|
+
case 16: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
|
|
332
|
+
case 17: throw _d.sent();
|
|
333
|
+
case 18:
|
|
334
|
+
parsedBody = parsedOutput.body;
|
|
335
|
+
throwDefaultError({
|
|
336
|
+
output: output,
|
|
337
|
+
parsedBody: parsedBody,
|
|
338
|
+
exceptionCtor: __BaseException,
|
|
339
|
+
errorCode: errorCode,
|
|
340
|
+
});
|
|
341
|
+
_d.label = 19;
|
|
342
|
+
case 19: return [2];
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
}); };
|
|
346
|
+
var deserializeAws_json1_0AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
347
|
+
var body, deserialized, exception;
|
|
348
|
+
return __generator(this, function (_a) {
|
|
349
|
+
body = parsedOutput.body;
|
|
350
|
+
deserialized = deserializeAws_json1_0AccessDeniedException(body, context);
|
|
351
|
+
exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
352
|
+
return [2, __decorateServiceException(exception, body)];
|
|
353
|
+
});
|
|
354
|
+
}); };
|
|
355
|
+
var deserializeAws_json1_0ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
356
|
+
var body, deserialized, exception;
|
|
357
|
+
return __generator(this, function (_a) {
|
|
358
|
+
body = parsedOutput.body;
|
|
359
|
+
deserialized = deserializeAws_json1_0ConflictException(body, context);
|
|
360
|
+
exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
361
|
+
return [2, __decorateServiceException(exception, body)];
|
|
362
|
+
});
|
|
363
|
+
}); };
|
|
364
|
+
var deserializeAws_json1_0EndpointTemporarilyUnavailableExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
365
|
+
var body, deserialized, exception;
|
|
366
|
+
return __generator(this, function (_a) {
|
|
367
|
+
body = parsedOutput.body;
|
|
368
|
+
deserialized = deserializeAws_json1_0EndpointTemporarilyUnavailableException(body, context);
|
|
369
|
+
exception = new EndpointTemporarilyUnavailableException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
370
|
+
return [2, __decorateServiceException(exception, body)];
|
|
371
|
+
});
|
|
372
|
+
}); };
|
|
373
|
+
var deserializeAws_json1_0InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
374
|
+
var body, deserialized, exception;
|
|
375
|
+
return __generator(this, function (_a) {
|
|
376
|
+
body = parsedOutput.body;
|
|
377
|
+
deserialized = deserializeAws_json1_0InternalServerException(body, context);
|
|
378
|
+
exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
379
|
+
return [2, __decorateServiceException(exception, body)];
|
|
380
|
+
});
|
|
381
|
+
}); };
|
|
382
|
+
var deserializeAws_json1_0ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
383
|
+
var body, deserialized, exception;
|
|
384
|
+
return __generator(this, function (_a) {
|
|
385
|
+
body = parsedOutput.body;
|
|
386
|
+
deserialized = deserializeAws_json1_0ResourceNotFoundException(body, context);
|
|
387
|
+
exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
388
|
+
return [2, __decorateServiceException(exception, body)];
|
|
389
|
+
});
|
|
390
|
+
}); };
|
|
391
|
+
var deserializeAws_json1_0ServiceLimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
392
|
+
var body, deserialized, exception;
|
|
393
|
+
return __generator(this, function (_a) {
|
|
394
|
+
body = parsedOutput.body;
|
|
395
|
+
deserialized = deserializeAws_json1_0ServiceLimitExceededException(body, context);
|
|
396
|
+
exception = new ServiceLimitExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
397
|
+
return [2, __decorateServiceException(exception, body)];
|
|
398
|
+
});
|
|
399
|
+
}); };
|
|
400
|
+
var deserializeAws_json1_0ThrottlingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
401
|
+
var body, deserialized, exception;
|
|
402
|
+
return __generator(this, function (_a) {
|
|
403
|
+
body = parsedOutput.body;
|
|
404
|
+
deserialized = deserializeAws_json1_0ThrottlingException(body, context);
|
|
405
|
+
exception = new ThrottlingException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
406
|
+
return [2, __decorateServiceException(exception, body)];
|
|
407
|
+
});
|
|
408
|
+
}); };
|
|
409
|
+
var deserializeAws_json1_0ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
410
|
+
var body, deserialized, exception;
|
|
411
|
+
return __generator(this, function (_a) {
|
|
412
|
+
body = parsedOutput.body;
|
|
413
|
+
deserialized = deserializeAws_json1_0ValidationException(body, context);
|
|
414
|
+
exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
415
|
+
return [2, __decorateServiceException(exception, body)];
|
|
416
|
+
});
|
|
417
|
+
}); };
|
|
418
|
+
var serializeAws_json1_0Arns = function (input, context) {
|
|
315
419
|
return input
|
|
316
|
-
.filter((e)
|
|
317
|
-
.map((entry)
|
|
420
|
+
.filter(function (e) { return e != null; })
|
|
421
|
+
.map(function (entry) {
|
|
318
422
|
return entry;
|
|
319
423
|
});
|
|
320
424
|
};
|
|
321
|
-
|
|
322
|
-
return {
|
|
323
|
-
...(input.RoutingControlArn != null && { RoutingControlArn: input.RoutingControlArn }),
|
|
324
|
-
};
|
|
425
|
+
var serializeAws_json1_0GetRoutingControlStateRequest = function (input, context) {
|
|
426
|
+
return __assign({}, (input.RoutingControlArn != null && { RoutingControlArn: input.RoutingControlArn }));
|
|
325
427
|
};
|
|
326
|
-
|
|
327
|
-
return {
|
|
328
|
-
...(input.ControlPanelArn != null && { ControlPanelArn: input.ControlPanelArn }),
|
|
329
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
330
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
331
|
-
};
|
|
428
|
+
var serializeAws_json1_0ListRoutingControlsRequest = function (input, context) {
|
|
429
|
+
return __assign(__assign(__assign({}, (input.ControlPanelArn != null && { ControlPanelArn: input.ControlPanelArn })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
|
|
332
430
|
};
|
|
333
|
-
|
|
431
|
+
var serializeAws_json1_0UpdateRoutingControlStateEntries = function (input, context) {
|
|
334
432
|
return input
|
|
335
|
-
.filter((e)
|
|
336
|
-
.map((entry)
|
|
433
|
+
.filter(function (e) { return e != null; })
|
|
434
|
+
.map(function (entry) {
|
|
337
435
|
return serializeAws_json1_0UpdateRoutingControlStateEntry(entry, context);
|
|
338
436
|
});
|
|
339
437
|
};
|
|
340
|
-
|
|
341
|
-
return {
|
|
342
|
-
...(input.RoutingControlArn != null && { RoutingControlArn: input.RoutingControlArn }),
|
|
343
|
-
...(input.RoutingControlState != null && { RoutingControlState: input.RoutingControlState }),
|
|
344
|
-
};
|
|
438
|
+
var serializeAws_json1_0UpdateRoutingControlStateEntry = function (input, context) {
|
|
439
|
+
return __assign(__assign({}, (input.RoutingControlArn != null && { RoutingControlArn: input.RoutingControlArn })), (input.RoutingControlState != null && { RoutingControlState: input.RoutingControlState }));
|
|
345
440
|
};
|
|
346
|
-
|
|
347
|
-
return {
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
...(input.SafetyRulesToOverride != null && {
|
|
351
|
-
SafetyRulesToOverride: serializeAws_json1_0Arns(input.SafetyRulesToOverride, context),
|
|
352
|
-
}),
|
|
353
|
-
};
|
|
441
|
+
var serializeAws_json1_0UpdateRoutingControlStateRequest = function (input, context) {
|
|
442
|
+
return __assign(__assign(__assign({}, (input.RoutingControlArn != null && { RoutingControlArn: input.RoutingControlArn })), (input.RoutingControlState != null && { RoutingControlState: input.RoutingControlState })), (input.SafetyRulesToOverride != null && {
|
|
443
|
+
SafetyRulesToOverride: serializeAws_json1_0Arns(input.SafetyRulesToOverride, context),
|
|
444
|
+
}));
|
|
354
445
|
};
|
|
355
|
-
|
|
356
|
-
return {
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
UpdateRoutingControlStateEntries: serializeAws_json1_0UpdateRoutingControlStateEntries(input.UpdateRoutingControlStateEntries, context),
|
|
362
|
-
}),
|
|
363
|
-
};
|
|
446
|
+
var serializeAws_json1_0UpdateRoutingControlStatesRequest = function (input, context) {
|
|
447
|
+
return __assign(__assign({}, (input.SafetyRulesToOverride != null && {
|
|
448
|
+
SafetyRulesToOverride: serializeAws_json1_0Arns(input.SafetyRulesToOverride, context),
|
|
449
|
+
})), (input.UpdateRoutingControlStateEntries != null && {
|
|
450
|
+
UpdateRoutingControlStateEntries: serializeAws_json1_0UpdateRoutingControlStateEntries(input.UpdateRoutingControlStateEntries, context),
|
|
451
|
+
}));
|
|
364
452
|
};
|
|
365
|
-
|
|
453
|
+
var deserializeAws_json1_0AccessDeniedException = function (output, context) {
|
|
366
454
|
return {
|
|
367
455
|
message: __expectString(output.message),
|
|
368
456
|
};
|
|
369
457
|
};
|
|
370
|
-
|
|
458
|
+
var deserializeAws_json1_0ConflictException = function (output, context) {
|
|
371
459
|
return {
|
|
372
460
|
message: __expectString(output.message),
|
|
373
461
|
resourceId: __expectString(output.resourceId),
|
|
374
462
|
resourceType: __expectString(output.resourceType),
|
|
375
463
|
};
|
|
376
464
|
};
|
|
377
|
-
|
|
465
|
+
var deserializeAws_json1_0EndpointTemporarilyUnavailableException = function (output, context) {
|
|
378
466
|
return {
|
|
379
467
|
message: __expectString(output.message),
|
|
380
468
|
};
|
|
381
469
|
};
|
|
382
|
-
|
|
470
|
+
var deserializeAws_json1_0GetRoutingControlStateResponse = function (output, context) {
|
|
383
471
|
return {
|
|
384
472
|
RoutingControlArn: __expectString(output.RoutingControlArn),
|
|
385
473
|
RoutingControlName: __expectString(output.RoutingControlName),
|
|
386
474
|
RoutingControlState: __expectString(output.RoutingControlState),
|
|
387
475
|
};
|
|
388
476
|
};
|
|
389
|
-
|
|
477
|
+
var deserializeAws_json1_0InternalServerException = function (output, context) {
|
|
390
478
|
return {
|
|
391
479
|
message: __expectString(output.message),
|
|
392
480
|
retryAfterSeconds: __expectInt32(output.retryAfterSeconds),
|
|
393
481
|
};
|
|
394
482
|
};
|
|
395
|
-
|
|
483
|
+
var deserializeAws_json1_0ListRoutingControlsResponse = function (output, context) {
|
|
396
484
|
return {
|
|
397
485
|
NextToken: __expectString(output.NextToken),
|
|
398
486
|
RoutingControls: output.RoutingControls != null
|
|
@@ -400,14 +488,14 @@ const deserializeAws_json1_0ListRoutingControlsResponse = (output, context) => {
|
|
|
400
488
|
: undefined,
|
|
401
489
|
};
|
|
402
490
|
};
|
|
403
|
-
|
|
491
|
+
var deserializeAws_json1_0ResourceNotFoundException = function (output, context) {
|
|
404
492
|
return {
|
|
405
493
|
message: __expectString(output.message),
|
|
406
494
|
resourceId: __expectString(output.resourceId),
|
|
407
495
|
resourceType: __expectString(output.resourceType),
|
|
408
496
|
};
|
|
409
497
|
};
|
|
410
|
-
|
|
498
|
+
var deserializeAws_json1_0RoutingControl = function (output, context) {
|
|
411
499
|
return {
|
|
412
500
|
ControlPanelArn: __expectString(output.ControlPanelArn),
|
|
413
501
|
ControlPanelName: __expectString(output.ControlPanelName),
|
|
@@ -416,10 +504,10 @@ const deserializeAws_json1_0RoutingControl = (output, context) => {
|
|
|
416
504
|
RoutingControlState: __expectString(output.RoutingControlState),
|
|
417
505
|
};
|
|
418
506
|
};
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
.filter((e)
|
|
422
|
-
.map((entry)
|
|
507
|
+
var deserializeAws_json1_0RoutingControls = function (output, context) {
|
|
508
|
+
var retVal = (output || [])
|
|
509
|
+
.filter(function (e) { return e != null; })
|
|
510
|
+
.map(function (entry) {
|
|
423
511
|
if (entry === null) {
|
|
424
512
|
return null;
|
|
425
513
|
}
|
|
@@ -427,7 +515,7 @@ const deserializeAws_json1_0RoutingControls = (output, context) => {
|
|
|
427
515
|
});
|
|
428
516
|
return retVal;
|
|
429
517
|
};
|
|
430
|
-
|
|
518
|
+
var deserializeAws_json1_0ServiceLimitExceededException = function (output, context) {
|
|
431
519
|
return {
|
|
432
520
|
limitCode: __expectString(output.limitCode),
|
|
433
521
|
message: __expectString(output.message),
|
|
@@ -436,35 +524,35 @@ const deserializeAws_json1_0ServiceLimitExceededException = (output, context) =>
|
|
|
436
524
|
serviceCode: __expectString(output.serviceCode),
|
|
437
525
|
};
|
|
438
526
|
};
|
|
439
|
-
|
|
527
|
+
var deserializeAws_json1_0ThrottlingException = function (output, context) {
|
|
440
528
|
return {
|
|
441
529
|
message: __expectString(output.message),
|
|
442
530
|
retryAfterSeconds: __expectInt32(output.retryAfterSeconds),
|
|
443
531
|
};
|
|
444
532
|
};
|
|
445
|
-
|
|
533
|
+
var deserializeAws_json1_0UpdateRoutingControlStateResponse = function (output, context) {
|
|
446
534
|
return {};
|
|
447
535
|
};
|
|
448
|
-
|
|
536
|
+
var deserializeAws_json1_0UpdateRoutingControlStatesResponse = function (output, context) {
|
|
449
537
|
return {};
|
|
450
538
|
};
|
|
451
|
-
|
|
539
|
+
var deserializeAws_json1_0ValidationException = function (output, context) {
|
|
452
540
|
return {
|
|
453
541
|
fields: output.fields != null ? deserializeAws_json1_0ValidationExceptionFieldList(output.fields, context) : undefined,
|
|
454
542
|
message: __expectString(output.message),
|
|
455
543
|
reason: __expectString(output.reason),
|
|
456
544
|
};
|
|
457
545
|
};
|
|
458
|
-
|
|
546
|
+
var deserializeAws_json1_0ValidationExceptionField = function (output, context) {
|
|
459
547
|
return {
|
|
460
548
|
message: __expectString(output.message),
|
|
461
549
|
name: __expectString(output.name),
|
|
462
550
|
};
|
|
463
551
|
};
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
.filter((e)
|
|
467
|
-
.map((entry)
|
|
552
|
+
var deserializeAws_json1_0ValidationExceptionFieldList = function (output, context) {
|
|
553
|
+
var retVal = (output || [])
|
|
554
|
+
.filter(function (e) { return e != null; })
|
|
555
|
+
.map(function (entry) {
|
|
468
556
|
if (entry === null) {
|
|
469
557
|
return null;
|
|
470
558
|
}
|
|
@@ -472,52 +560,75 @@ const deserializeAws_json1_0ValidationExceptionFieldList = (output, context) =>
|
|
|
472
560
|
});
|
|
473
561
|
return retVal;
|
|
474
562
|
};
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
563
|
+
var deserializeMetadata = function (output) {
|
|
564
|
+
var _a, _b;
|
|
565
|
+
return ({
|
|
566
|
+
httpStatusCode: output.statusCode,
|
|
567
|
+
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"],
|
|
568
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
569
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
570
|
+
});
|
|
571
|
+
};
|
|
572
|
+
var collectBody = function (streamBody, context) {
|
|
573
|
+
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
482
574
|
if (streamBody instanceof Uint8Array) {
|
|
483
575
|
return Promise.resolve(streamBody);
|
|
484
576
|
}
|
|
485
577
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
486
578
|
};
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
579
|
+
var collectBodyString = function (streamBody, context) {
|
|
580
|
+
return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
|
|
581
|
+
};
|
|
582
|
+
var buildHttpRpcRequest = function (context, headers, path, resolvedHostname, body) { return __awaiter(void 0, void 0, void 0, function () {
|
|
583
|
+
var _a, hostname, _b, protocol, port, basePath, contents;
|
|
584
|
+
return __generator(this, function (_c) {
|
|
585
|
+
switch (_c.label) {
|
|
586
|
+
case 0: return [4, context.endpoint()];
|
|
587
|
+
case 1:
|
|
588
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
589
|
+
contents = {
|
|
590
|
+
protocol: protocol,
|
|
591
|
+
hostname: hostname,
|
|
592
|
+
port: port,
|
|
593
|
+
method: "POST",
|
|
594
|
+
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
595
|
+
headers: headers,
|
|
596
|
+
};
|
|
597
|
+
if (resolvedHostname !== undefined) {
|
|
598
|
+
contents.hostname = resolvedHostname;
|
|
599
|
+
}
|
|
600
|
+
if (body !== undefined) {
|
|
601
|
+
contents.body = body;
|
|
602
|
+
}
|
|
603
|
+
return [2, new __HttpRequest(contents)];
|
|
604
|
+
}
|
|
605
|
+
});
|
|
606
|
+
}); };
|
|
607
|
+
var parseBody = function (streamBody, context) {
|
|
608
|
+
return collectBodyString(streamBody, context).then(function (encoded) {
|
|
609
|
+
if (encoded.length) {
|
|
610
|
+
return JSON.parse(encoded);
|
|
611
|
+
}
|
|
612
|
+
return {};
|
|
613
|
+
});
|
|
516
614
|
};
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
615
|
+
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
616
|
+
var value;
|
|
617
|
+
var _a;
|
|
618
|
+
return __generator(this, function (_b) {
|
|
619
|
+
switch (_b.label) {
|
|
620
|
+
case 0: return [4, parseBody(errorBody, context)];
|
|
621
|
+
case 1:
|
|
622
|
+
value = _b.sent();
|
|
623
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
624
|
+
return [2, value];
|
|
625
|
+
}
|
|
626
|
+
});
|
|
627
|
+
}); };
|
|
628
|
+
var loadRestJsonErrorCode = function (output, data) {
|
|
629
|
+
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
630
|
+
var sanitizeErrorCode = function (rawValue) {
|
|
631
|
+
var cleanValue = rawValue;
|
|
521
632
|
if (typeof cleanValue === "number") {
|
|
522
633
|
cleanValue = cleanValue.toString();
|
|
523
634
|
}
|
|
@@ -532,7 +643,7 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
532
643
|
}
|
|
533
644
|
return cleanValue;
|
|
534
645
|
};
|
|
535
|
-
|
|
646
|
+
var headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
536
647
|
if (headerKey !== undefined) {
|
|
537
648
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
538
649
|
}
|