@aws-sdk/client-iot-jobs-data-plane 3.141.0 → 3.150.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 +27 -0
- package/dist-cjs/protocols/Aws_restJson1.js +64 -135
- package/dist-es/protocols/Aws_restJson1.js +81 -137
- package/package.json +11 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,33 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.150.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.149.0...v3.150.0) (2022-08-15)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-sdk/client-iot-jobs-data-plane
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.145.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.144.0...v3.145.0) (2022-08-08)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @aws-sdk/client-iot-jobs-data-plane
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [3.142.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.141.0...v3.142.0) (2022-08-02)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* **codegen:** general data mapping function ([#3830](https://github.com/aws/aws-sdk-js-v3/issues/3830)) ([9417eae](https://github.com/aws/aws-sdk-js-v3/commit/9417eae722806799fb4c15c07921574268c1165c))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
# [3.141.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.140.0...v3.141.0) (2022-08-01)
|
|
7
34
|
|
|
8
35
|
|
|
@@ -9,30 +9,12 @@ const serializeAws_restJson1DescribeJobExecutionCommand = async (input, context)
|
|
|
9
9
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
10
10
|
const headers = {};
|
|
11
11
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/things/{thingName}/jobs/{jobId}";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
throw new Error("No value provided for input HTTP label: jobId.");
|
|
21
|
-
}
|
|
22
|
-
if (input.thingName !== undefined) {
|
|
23
|
-
const labelValue = input.thingName;
|
|
24
|
-
if (labelValue.length <= 0) {
|
|
25
|
-
throw new Error("Empty value provided for input HTTP label: thingName.");
|
|
26
|
-
}
|
|
27
|
-
resolvedPath = resolvedPath.replace("{thingName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
throw new Error("No value provided for input HTTP label: thingName.");
|
|
31
|
-
}
|
|
32
|
-
const query = {
|
|
33
|
-
...(input.includeJobDocument !== undefined && { includeJobDocument: input.includeJobDocument.toString() }),
|
|
34
|
-
...(input.executionNumber !== undefined && { executionNumber: input.executionNumber.toString() }),
|
|
35
|
-
};
|
|
12
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "jobId", () => input.jobId, "{jobId}", false);
|
|
13
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "thingName", () => input.thingName, "{thingName}", false);
|
|
14
|
+
const query = map({
|
|
15
|
+
includeJobDocument: [() => input.includeJobDocument !== void 0, () => input.includeJobDocument.toString()],
|
|
16
|
+
executionNumber: [() => input.executionNumber !== void 0, () => input.executionNumber.toString()],
|
|
17
|
+
});
|
|
36
18
|
let body;
|
|
37
19
|
return new protocol_http_1.HttpRequest({
|
|
38
20
|
protocol,
|
|
@@ -50,16 +32,7 @@ const serializeAws_restJson1GetPendingJobExecutionsCommand = async (input, conte
|
|
|
50
32
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
51
33
|
const headers = {};
|
|
52
34
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/things/{thingName}/jobs";
|
|
53
|
-
|
|
54
|
-
const labelValue = input.thingName;
|
|
55
|
-
if (labelValue.length <= 0) {
|
|
56
|
-
throw new Error("Empty value provided for input HTTP label: thingName.");
|
|
57
|
-
}
|
|
58
|
-
resolvedPath = resolvedPath.replace("{thingName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
throw new Error("No value provided for input HTTP label: thingName.");
|
|
62
|
-
}
|
|
35
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "thingName", () => input.thingName, "{thingName}", false);
|
|
63
36
|
let body;
|
|
64
37
|
return new protocol_http_1.HttpRequest({
|
|
65
38
|
protocol,
|
|
@@ -78,16 +51,7 @@ const serializeAws_restJson1StartNextPendingJobExecutionCommand = async (input,
|
|
|
78
51
|
"content-type": "application/json",
|
|
79
52
|
};
|
|
80
53
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/things/{thingName}/jobs/$next";
|
|
81
|
-
|
|
82
|
-
const labelValue = input.thingName;
|
|
83
|
-
if (labelValue.length <= 0) {
|
|
84
|
-
throw new Error("Empty value provided for input HTTP label: thingName.");
|
|
85
|
-
}
|
|
86
|
-
resolvedPath = resolvedPath.replace("{thingName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
throw new Error("No value provided for input HTTP label: thingName.");
|
|
90
|
-
}
|
|
54
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "thingName", () => input.thingName, "{thingName}", false);
|
|
91
55
|
let body;
|
|
92
56
|
body = JSON.stringify({
|
|
93
57
|
...(input.statusDetails != null && {
|
|
@@ -112,26 +76,8 @@ const serializeAws_restJson1UpdateJobExecutionCommand = async (input, context) =
|
|
|
112
76
|
"content-type": "application/json",
|
|
113
77
|
};
|
|
114
78
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/things/{thingName}/jobs/{jobId}";
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
if (labelValue.length <= 0) {
|
|
118
|
-
throw new Error("Empty value provided for input HTTP label: jobId.");
|
|
119
|
-
}
|
|
120
|
-
resolvedPath = resolvedPath.replace("{jobId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
121
|
-
}
|
|
122
|
-
else {
|
|
123
|
-
throw new Error("No value provided for input HTTP label: jobId.");
|
|
124
|
-
}
|
|
125
|
-
if (input.thingName !== undefined) {
|
|
126
|
-
const labelValue = input.thingName;
|
|
127
|
-
if (labelValue.length <= 0) {
|
|
128
|
-
throw new Error("Empty value provided for input HTTP label: thingName.");
|
|
129
|
-
}
|
|
130
|
-
resolvedPath = resolvedPath.replace("{thingName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
131
|
-
}
|
|
132
|
-
else {
|
|
133
|
-
throw new Error("No value provided for input HTTP label: thingName.");
|
|
134
|
-
}
|
|
79
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "jobId", () => input.jobId, "{jobId}", false);
|
|
80
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "thingName", () => input.thingName, "{thingName}", false);
|
|
135
81
|
let body;
|
|
136
82
|
body = JSON.stringify({
|
|
137
83
|
...(input.executionNumber != null && { executionNumber: input.executionNumber }),
|
|
@@ -159,15 +105,14 @@ const deserializeAws_restJson1DescribeJobExecutionCommand = async (output, conte
|
|
|
159
105
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
160
106
|
return deserializeAws_restJson1DescribeJobExecutionCommandError(output, context);
|
|
161
107
|
}
|
|
162
|
-
const contents = {
|
|
108
|
+
const contents = map({
|
|
163
109
|
$metadata: deserializeMetadata(output),
|
|
164
|
-
|
|
165
|
-
};
|
|
110
|
+
});
|
|
166
111
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
167
|
-
if (data.execution
|
|
112
|
+
if (data.execution != null) {
|
|
168
113
|
contents.execution = deserializeAws_restJson1JobExecution(data.execution, context);
|
|
169
114
|
}
|
|
170
|
-
return
|
|
115
|
+
return contents;
|
|
171
116
|
};
|
|
172
117
|
exports.deserializeAws_restJson1DescribeJobExecutionCommand = deserializeAws_restJson1DescribeJobExecutionCommand;
|
|
173
118
|
const deserializeAws_restJson1DescribeJobExecutionCommandError = async (output, context) => {
|
|
@@ -175,7 +120,6 @@ const deserializeAws_restJson1DescribeJobExecutionCommandError = async (output,
|
|
|
175
120
|
...output,
|
|
176
121
|
body: await parseBody(output.body, context),
|
|
177
122
|
};
|
|
178
|
-
let response;
|
|
179
123
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
180
124
|
switch (errorCode) {
|
|
181
125
|
case "CertificateValidationException":
|
|
@@ -198,33 +142,29 @@ const deserializeAws_restJson1DescribeJobExecutionCommandError = async (output,
|
|
|
198
142
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
199
143
|
default:
|
|
200
144
|
const parsedBody = parsedOutput.body;
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
$metadata,
|
|
145
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
146
|
+
output,
|
|
147
|
+
parsedBody,
|
|
148
|
+
exceptionCtor: IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException,
|
|
149
|
+
errorCode,
|
|
207
150
|
});
|
|
208
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
209
151
|
}
|
|
210
152
|
};
|
|
211
153
|
const deserializeAws_restJson1GetPendingJobExecutionsCommand = async (output, context) => {
|
|
212
154
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
213
155
|
return deserializeAws_restJson1GetPendingJobExecutionsCommandError(output, context);
|
|
214
156
|
}
|
|
215
|
-
const contents = {
|
|
157
|
+
const contents = map({
|
|
216
158
|
$metadata: deserializeMetadata(output),
|
|
217
|
-
|
|
218
|
-
queuedJobs: undefined,
|
|
219
|
-
};
|
|
159
|
+
});
|
|
220
160
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
221
|
-
if (data.inProgressJobs
|
|
161
|
+
if (data.inProgressJobs != null) {
|
|
222
162
|
contents.inProgressJobs = deserializeAws_restJson1JobExecutionSummaryList(data.inProgressJobs, context);
|
|
223
163
|
}
|
|
224
|
-
if (data.queuedJobs
|
|
164
|
+
if (data.queuedJobs != null) {
|
|
225
165
|
contents.queuedJobs = deserializeAws_restJson1JobExecutionSummaryList(data.queuedJobs, context);
|
|
226
166
|
}
|
|
227
|
-
return
|
|
167
|
+
return contents;
|
|
228
168
|
};
|
|
229
169
|
exports.deserializeAws_restJson1GetPendingJobExecutionsCommand = deserializeAws_restJson1GetPendingJobExecutionsCommand;
|
|
230
170
|
const deserializeAws_restJson1GetPendingJobExecutionsCommandError = async (output, context) => {
|
|
@@ -232,7 +172,6 @@ const deserializeAws_restJson1GetPendingJobExecutionsCommandError = async (outpu
|
|
|
232
172
|
...output,
|
|
233
173
|
body: await parseBody(output.body, context),
|
|
234
174
|
};
|
|
235
|
-
let response;
|
|
236
175
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
237
176
|
switch (errorCode) {
|
|
238
177
|
case "CertificateValidationException":
|
|
@@ -252,29 +191,26 @@ const deserializeAws_restJson1GetPendingJobExecutionsCommandError = async (outpu
|
|
|
252
191
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
253
192
|
default:
|
|
254
193
|
const parsedBody = parsedOutput.body;
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
$metadata,
|
|
194
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
195
|
+
output,
|
|
196
|
+
parsedBody,
|
|
197
|
+
exceptionCtor: IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException,
|
|
198
|
+
errorCode,
|
|
261
199
|
});
|
|
262
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
263
200
|
}
|
|
264
201
|
};
|
|
265
202
|
const deserializeAws_restJson1StartNextPendingJobExecutionCommand = async (output, context) => {
|
|
266
203
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
267
204
|
return deserializeAws_restJson1StartNextPendingJobExecutionCommandError(output, context);
|
|
268
205
|
}
|
|
269
|
-
const contents = {
|
|
206
|
+
const contents = map({
|
|
270
207
|
$metadata: deserializeMetadata(output),
|
|
271
|
-
|
|
272
|
-
};
|
|
208
|
+
});
|
|
273
209
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
274
|
-
if (data.execution
|
|
210
|
+
if (data.execution != null) {
|
|
275
211
|
contents.execution = deserializeAws_restJson1JobExecution(data.execution, context);
|
|
276
212
|
}
|
|
277
|
-
return
|
|
213
|
+
return contents;
|
|
278
214
|
};
|
|
279
215
|
exports.deserializeAws_restJson1StartNextPendingJobExecutionCommand = deserializeAws_restJson1StartNextPendingJobExecutionCommand;
|
|
280
216
|
const deserializeAws_restJson1StartNextPendingJobExecutionCommandError = async (output, context) => {
|
|
@@ -282,7 +218,6 @@ const deserializeAws_restJson1StartNextPendingJobExecutionCommandError = async (
|
|
|
282
218
|
...output,
|
|
283
219
|
body: await parseBody(output.body, context),
|
|
284
220
|
};
|
|
285
|
-
let response;
|
|
286
221
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
287
222
|
switch (errorCode) {
|
|
288
223
|
case "CertificateValidationException":
|
|
@@ -302,33 +237,29 @@ const deserializeAws_restJson1StartNextPendingJobExecutionCommandError = async (
|
|
|
302
237
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
303
238
|
default:
|
|
304
239
|
const parsedBody = parsedOutput.body;
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
$metadata,
|
|
240
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
241
|
+
output,
|
|
242
|
+
parsedBody,
|
|
243
|
+
exceptionCtor: IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException,
|
|
244
|
+
errorCode,
|
|
311
245
|
});
|
|
312
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
313
246
|
}
|
|
314
247
|
};
|
|
315
248
|
const deserializeAws_restJson1UpdateJobExecutionCommand = async (output, context) => {
|
|
316
249
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
317
250
|
return deserializeAws_restJson1UpdateJobExecutionCommandError(output, context);
|
|
318
251
|
}
|
|
319
|
-
const contents = {
|
|
252
|
+
const contents = map({
|
|
320
253
|
$metadata: deserializeMetadata(output),
|
|
321
|
-
|
|
322
|
-
jobDocument: undefined,
|
|
323
|
-
};
|
|
254
|
+
});
|
|
324
255
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
325
|
-
if (data.executionState
|
|
256
|
+
if (data.executionState != null) {
|
|
326
257
|
contents.executionState = deserializeAws_restJson1JobExecutionState(data.executionState, context);
|
|
327
258
|
}
|
|
328
|
-
if (data.jobDocument
|
|
259
|
+
if (data.jobDocument != null) {
|
|
329
260
|
contents.jobDocument = (0, smithy_client_1.expectString)(data.jobDocument);
|
|
330
261
|
}
|
|
331
|
-
return
|
|
262
|
+
return contents;
|
|
332
263
|
};
|
|
333
264
|
exports.deserializeAws_restJson1UpdateJobExecutionCommand = deserializeAws_restJson1UpdateJobExecutionCommand;
|
|
334
265
|
const deserializeAws_restJson1UpdateJobExecutionCommandError = async (output, context) => {
|
|
@@ -336,7 +267,6 @@ const deserializeAws_restJson1UpdateJobExecutionCommandError = async (output, co
|
|
|
336
267
|
...output,
|
|
337
268
|
body: await parseBody(output.body, context),
|
|
338
269
|
};
|
|
339
|
-
let response;
|
|
340
270
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
341
271
|
switch (errorCode) {
|
|
342
272
|
case "CertificateValidationException":
|
|
@@ -359,20 +289,19 @@ const deserializeAws_restJson1UpdateJobExecutionCommandError = async (output, co
|
|
|
359
289
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
360
290
|
default:
|
|
361
291
|
const parsedBody = parsedOutput.body;
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
$metadata,
|
|
292
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
293
|
+
output,
|
|
294
|
+
parsedBody,
|
|
295
|
+
exceptionCtor: IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException,
|
|
296
|
+
errorCode,
|
|
368
297
|
});
|
|
369
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
370
298
|
}
|
|
371
299
|
};
|
|
300
|
+
const map = smithy_client_1.map;
|
|
372
301
|
const deserializeAws_restJson1CertificateValidationExceptionResponse = async (parsedOutput, context) => {
|
|
373
|
-
const contents = {};
|
|
302
|
+
const contents = map({});
|
|
374
303
|
const data = parsedOutput.body;
|
|
375
|
-
if (data.message
|
|
304
|
+
if (data.message != null) {
|
|
376
305
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
377
306
|
}
|
|
378
307
|
const exception = new models_0_1.CertificateValidationException({
|
|
@@ -382,9 +311,9 @@ const deserializeAws_restJson1CertificateValidationExceptionResponse = async (pa
|
|
|
382
311
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
383
312
|
};
|
|
384
313
|
const deserializeAws_restJson1InvalidRequestExceptionResponse = async (parsedOutput, context) => {
|
|
385
|
-
const contents = {};
|
|
314
|
+
const contents = map({});
|
|
386
315
|
const data = parsedOutput.body;
|
|
387
|
-
if (data.message
|
|
316
|
+
if (data.message != null) {
|
|
388
317
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
389
318
|
}
|
|
390
319
|
const exception = new models_0_1.InvalidRequestException({
|
|
@@ -394,9 +323,9 @@ const deserializeAws_restJson1InvalidRequestExceptionResponse = async (parsedOut
|
|
|
394
323
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
395
324
|
};
|
|
396
325
|
const deserializeAws_restJson1InvalidStateTransitionExceptionResponse = async (parsedOutput, context) => {
|
|
397
|
-
const contents = {};
|
|
326
|
+
const contents = map({});
|
|
398
327
|
const data = parsedOutput.body;
|
|
399
|
-
if (data.message
|
|
328
|
+
if (data.message != null) {
|
|
400
329
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
401
330
|
}
|
|
402
331
|
const exception = new models_0_1.InvalidStateTransitionException({
|
|
@@ -406,9 +335,9 @@ const deserializeAws_restJson1InvalidStateTransitionExceptionResponse = async (p
|
|
|
406
335
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
407
336
|
};
|
|
408
337
|
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
409
|
-
const contents = {};
|
|
338
|
+
const contents = map({});
|
|
410
339
|
const data = parsedOutput.body;
|
|
411
|
-
if (data.message
|
|
340
|
+
if (data.message != null) {
|
|
412
341
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
413
342
|
}
|
|
414
343
|
const exception = new models_0_1.ResourceNotFoundException({
|
|
@@ -418,9 +347,9 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
|
|
|
418
347
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
419
348
|
};
|
|
420
349
|
const deserializeAws_restJson1ServiceUnavailableExceptionResponse = async (parsedOutput, context) => {
|
|
421
|
-
const contents = {};
|
|
350
|
+
const contents = map({});
|
|
422
351
|
const data = parsedOutput.body;
|
|
423
|
-
if (data.message
|
|
352
|
+
if (data.message != null) {
|
|
424
353
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
425
354
|
}
|
|
426
355
|
const exception = new models_0_1.ServiceUnavailableException({
|
|
@@ -430,9 +359,9 @@ const deserializeAws_restJson1ServiceUnavailableExceptionResponse = async (parse
|
|
|
430
359
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
431
360
|
};
|
|
432
361
|
const deserializeAws_restJson1TerminalStateExceptionResponse = async (parsedOutput, context) => {
|
|
433
|
-
const contents = {};
|
|
362
|
+
const contents = map({});
|
|
434
363
|
const data = parsedOutput.body;
|
|
435
|
-
if (data.message
|
|
364
|
+
if (data.message != null) {
|
|
436
365
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
437
366
|
}
|
|
438
367
|
const exception = new models_0_1.TerminalStateException({
|
|
@@ -442,12 +371,12 @@ const deserializeAws_restJson1TerminalStateExceptionResponse = async (parsedOutp
|
|
|
442
371
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
443
372
|
};
|
|
444
373
|
const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
|
|
445
|
-
const contents = {};
|
|
374
|
+
const contents = map({});
|
|
446
375
|
const data = parsedOutput.body;
|
|
447
|
-
if (data.message
|
|
376
|
+
if (data.message != null) {
|
|
448
377
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
449
378
|
}
|
|
450
|
-
if (data.payload
|
|
379
|
+
if (data.payload != null) {
|
|
451
380
|
contents.payload = context.base64Decoder(data.payload);
|
|
452
381
|
}
|
|
453
382
|
const exception = new models_0_1.ThrottlingException({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
2
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
|
-
import { decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString,
|
|
3
|
+
import { decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
4
|
import { IoTJobsDataPlaneServiceException as __BaseException } from "../models/IoTJobsDataPlaneServiceException";
|
|
5
5
|
import { CertificateValidationException, InvalidRequestException, InvalidStateTransitionException, ResourceNotFoundException, ServiceUnavailableException, TerminalStateException, ThrottlingException, } from "../models/models_0";
|
|
6
6
|
export var serializeAws_restJson1DescribeJobExecutionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
7
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
8
8
|
return __generator(this, function (_c) {
|
|
9
9
|
switch (_c.label) {
|
|
10
10
|
case 0: return [4, context.endpoint()];
|
|
@@ -12,27 +12,12 @@ export var serializeAws_restJson1DescribeJobExecutionCommand = function (input,
|
|
|
12
12
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
13
13
|
headers = {};
|
|
14
14
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/things/{thingName}/jobs/{jobId}";
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
throw new Error("No value provided for input HTTP label: jobId.");
|
|
24
|
-
}
|
|
25
|
-
if (input.thingName !== undefined) {
|
|
26
|
-
labelValue = input.thingName;
|
|
27
|
-
if (labelValue.length <= 0) {
|
|
28
|
-
throw new Error("Empty value provided for input HTTP label: thingName.");
|
|
29
|
-
}
|
|
30
|
-
resolvedPath = resolvedPath.replace("{thingName}", __extendedEncodeURIComponent(labelValue));
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
throw new Error("No value provided for input HTTP label: thingName.");
|
|
34
|
-
}
|
|
35
|
-
query = __assign(__assign({}, (input.includeJobDocument !== undefined && { includeJobDocument: input.includeJobDocument.toString() })), (input.executionNumber !== undefined && { executionNumber: input.executionNumber.toString() }));
|
|
15
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "jobId", function () { return input.jobId; }, "{jobId}", false);
|
|
16
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "thingName", function () { return input.thingName; }, "{thingName}", false);
|
|
17
|
+
query = map({
|
|
18
|
+
includeJobDocument: [function () { return input.includeJobDocument !== void 0; }, function () { return input.includeJobDocument.toString(); }],
|
|
19
|
+
executionNumber: [function () { return input.executionNumber !== void 0; }, function () { return input.executionNumber.toString(); }],
|
|
20
|
+
});
|
|
36
21
|
return [2, new __HttpRequest({
|
|
37
22
|
protocol: protocol,
|
|
38
23
|
hostname: hostname,
|
|
@@ -47,7 +32,7 @@ export var serializeAws_restJson1DescribeJobExecutionCommand = function (input,
|
|
|
47
32
|
});
|
|
48
33
|
}); };
|
|
49
34
|
export var serializeAws_restJson1GetPendingJobExecutionsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
50
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
35
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
51
36
|
return __generator(this, function (_c) {
|
|
52
37
|
switch (_c.label) {
|
|
53
38
|
case 0: return [4, context.endpoint()];
|
|
@@ -55,16 +40,7 @@ export var serializeAws_restJson1GetPendingJobExecutionsCommand = function (inpu
|
|
|
55
40
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
56
41
|
headers = {};
|
|
57
42
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/things/{thingName}/jobs";
|
|
58
|
-
|
|
59
|
-
labelValue = input.thingName;
|
|
60
|
-
if (labelValue.length <= 0) {
|
|
61
|
-
throw new Error("Empty value provided for input HTTP label: thingName.");
|
|
62
|
-
}
|
|
63
|
-
resolvedPath = resolvedPath.replace("{thingName}", __extendedEncodeURIComponent(labelValue));
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
throw new Error("No value provided for input HTTP label: thingName.");
|
|
67
|
-
}
|
|
43
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "thingName", function () { return input.thingName; }, "{thingName}", false);
|
|
68
44
|
return [2, new __HttpRequest({
|
|
69
45
|
protocol: protocol,
|
|
70
46
|
hostname: hostname,
|
|
@@ -78,7 +54,7 @@ export var serializeAws_restJson1GetPendingJobExecutionsCommand = function (inpu
|
|
|
78
54
|
});
|
|
79
55
|
}); };
|
|
80
56
|
export var serializeAws_restJson1StartNextPendingJobExecutionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
81
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
57
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
82
58
|
return __generator(this, function (_c) {
|
|
83
59
|
switch (_c.label) {
|
|
84
60
|
case 0: return [4, context.endpoint()];
|
|
@@ -88,16 +64,7 @@ export var serializeAws_restJson1StartNextPendingJobExecutionCommand = function
|
|
|
88
64
|
"content-type": "application/json",
|
|
89
65
|
};
|
|
90
66
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/things/{thingName}/jobs/$next";
|
|
91
|
-
|
|
92
|
-
labelValue = input.thingName;
|
|
93
|
-
if (labelValue.length <= 0) {
|
|
94
|
-
throw new Error("Empty value provided for input HTTP label: thingName.");
|
|
95
|
-
}
|
|
96
|
-
resolvedPath = resolvedPath.replace("{thingName}", __extendedEncodeURIComponent(labelValue));
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
throw new Error("No value provided for input HTTP label: thingName.");
|
|
100
|
-
}
|
|
67
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "thingName", function () { return input.thingName; }, "{thingName}", false);
|
|
101
68
|
body = JSON.stringify(__assign(__assign({}, (input.statusDetails != null && {
|
|
102
69
|
statusDetails: serializeAws_restJson1DetailsMap(input.statusDetails, context),
|
|
103
70
|
})), (input.stepTimeoutInMinutes != null && { stepTimeoutInMinutes: input.stepTimeoutInMinutes })));
|
|
@@ -114,7 +81,7 @@ export var serializeAws_restJson1StartNextPendingJobExecutionCommand = function
|
|
|
114
81
|
});
|
|
115
82
|
}); };
|
|
116
83
|
export var serializeAws_restJson1UpdateJobExecutionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
117
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
84
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
118
85
|
return __generator(this, function (_c) {
|
|
119
86
|
switch (_c.label) {
|
|
120
87
|
case 0: return [4, context.endpoint()];
|
|
@@ -124,26 +91,8 @@ export var serializeAws_restJson1UpdateJobExecutionCommand = function (input, co
|
|
|
124
91
|
"content-type": "application/json",
|
|
125
92
|
};
|
|
126
93
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/things/{thingName}/jobs/{jobId}";
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
if (labelValue.length <= 0) {
|
|
130
|
-
throw new Error("Empty value provided for input HTTP label: jobId.");
|
|
131
|
-
}
|
|
132
|
-
resolvedPath = resolvedPath.replace("{jobId}", __extendedEncodeURIComponent(labelValue));
|
|
133
|
-
}
|
|
134
|
-
else {
|
|
135
|
-
throw new Error("No value provided for input HTTP label: jobId.");
|
|
136
|
-
}
|
|
137
|
-
if (input.thingName !== undefined) {
|
|
138
|
-
labelValue = input.thingName;
|
|
139
|
-
if (labelValue.length <= 0) {
|
|
140
|
-
throw new Error("Empty value provided for input HTTP label: thingName.");
|
|
141
|
-
}
|
|
142
|
-
resolvedPath = resolvedPath.replace("{thingName}", __extendedEncodeURIComponent(labelValue));
|
|
143
|
-
}
|
|
144
|
-
else {
|
|
145
|
-
throw new Error("No value provided for input HTTP label: thingName.");
|
|
146
|
-
}
|
|
94
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "jobId", function () { return input.jobId; }, "{jobId}", false);
|
|
95
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "thingName", function () { return input.thingName; }, "{thingName}", false);
|
|
147
96
|
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.executionNumber != null && { executionNumber: input.executionNumber })), (input.expectedVersion != null && { expectedVersion: input.expectedVersion })), (input.includeJobDocument != null && { includeJobDocument: input.includeJobDocument })), (input.includeJobExecutionState != null && { includeJobExecutionState: input.includeJobExecutionState })), (input.status != null && { status: input.status })), (input.statusDetails != null && {
|
|
148
97
|
statusDetails: serializeAws_restJson1DetailsMap(input.statusDetails, context),
|
|
149
98
|
})), (input.stepTimeoutInMinutes != null && { stepTimeoutInMinutes: input.stepTimeoutInMinutes })));
|
|
@@ -167,24 +116,23 @@ export var deserializeAws_restJson1DescribeJobExecutionCommand = function (outpu
|
|
|
167
116
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
168
117
|
return [2, deserializeAws_restJson1DescribeJobExecutionCommandError(output, context)];
|
|
169
118
|
}
|
|
170
|
-
contents = {
|
|
119
|
+
contents = map({
|
|
171
120
|
$metadata: deserializeMetadata(output),
|
|
172
|
-
|
|
173
|
-
};
|
|
121
|
+
});
|
|
174
122
|
_a = __expectNonNull;
|
|
175
123
|
_b = __expectObject;
|
|
176
124
|
return [4, parseBody(output.body, context)];
|
|
177
125
|
case 1:
|
|
178
126
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
179
|
-
if (data.execution
|
|
127
|
+
if (data.execution != null) {
|
|
180
128
|
contents.execution = deserializeAws_restJson1JobExecution(data.execution, context);
|
|
181
129
|
}
|
|
182
|
-
return [2,
|
|
130
|
+
return [2, contents];
|
|
183
131
|
}
|
|
184
132
|
});
|
|
185
133
|
}); };
|
|
186
134
|
var deserializeAws_restJson1DescribeJobExecutionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
187
|
-
var parsedOutput, _a,
|
|
135
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
188
136
|
var _c;
|
|
189
137
|
return __generator(this, function (_d) {
|
|
190
138
|
switch (_d.label) {
|
|
@@ -225,14 +173,14 @@ var deserializeAws_restJson1DescribeJobExecutionCommandError = function (output,
|
|
|
225
173
|
case 13: throw _d.sent();
|
|
226
174
|
case 14:
|
|
227
175
|
parsedBody = parsedOutput.body;
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
$metadata: $metadata,
|
|
176
|
+
throwDefaultError({
|
|
177
|
+
output: output,
|
|
178
|
+
parsedBody: parsedBody,
|
|
179
|
+
exceptionCtor: __BaseException,
|
|
180
|
+
errorCode: errorCode,
|
|
234
181
|
});
|
|
235
|
-
|
|
182
|
+
_d.label = 15;
|
|
183
|
+
case 15: return [2];
|
|
236
184
|
}
|
|
237
185
|
});
|
|
238
186
|
}); };
|
|
@@ -244,28 +192,26 @@ export var deserializeAws_restJson1GetPendingJobExecutionsCommand = function (ou
|
|
|
244
192
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
245
193
|
return [2, deserializeAws_restJson1GetPendingJobExecutionsCommandError(output, context)];
|
|
246
194
|
}
|
|
247
|
-
contents = {
|
|
195
|
+
contents = map({
|
|
248
196
|
$metadata: deserializeMetadata(output),
|
|
249
|
-
|
|
250
|
-
queuedJobs: undefined,
|
|
251
|
-
};
|
|
197
|
+
});
|
|
252
198
|
_a = __expectNonNull;
|
|
253
199
|
_b = __expectObject;
|
|
254
200
|
return [4, parseBody(output.body, context)];
|
|
255
201
|
case 1:
|
|
256
202
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
257
|
-
if (data.inProgressJobs
|
|
203
|
+
if (data.inProgressJobs != null) {
|
|
258
204
|
contents.inProgressJobs = deserializeAws_restJson1JobExecutionSummaryList(data.inProgressJobs, context);
|
|
259
205
|
}
|
|
260
|
-
if (data.queuedJobs
|
|
206
|
+
if (data.queuedJobs != null) {
|
|
261
207
|
contents.queuedJobs = deserializeAws_restJson1JobExecutionSummaryList(data.queuedJobs, context);
|
|
262
208
|
}
|
|
263
|
-
return [2,
|
|
209
|
+
return [2, contents];
|
|
264
210
|
}
|
|
265
211
|
});
|
|
266
212
|
}); };
|
|
267
213
|
var deserializeAws_restJson1GetPendingJobExecutionsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
268
|
-
var parsedOutput, _a,
|
|
214
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
269
215
|
var _c;
|
|
270
216
|
return __generator(this, function (_d) {
|
|
271
217
|
switch (_d.label) {
|
|
@@ -302,14 +248,14 @@ var deserializeAws_restJson1GetPendingJobExecutionsCommandError = function (outp
|
|
|
302
248
|
case 11: throw _d.sent();
|
|
303
249
|
case 12:
|
|
304
250
|
parsedBody = parsedOutput.body;
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
$metadata: $metadata,
|
|
251
|
+
throwDefaultError({
|
|
252
|
+
output: output,
|
|
253
|
+
parsedBody: parsedBody,
|
|
254
|
+
exceptionCtor: __BaseException,
|
|
255
|
+
errorCode: errorCode,
|
|
311
256
|
});
|
|
312
|
-
|
|
257
|
+
_d.label = 13;
|
|
258
|
+
case 13: return [2];
|
|
313
259
|
}
|
|
314
260
|
});
|
|
315
261
|
}); };
|
|
@@ -321,24 +267,23 @@ export var deserializeAws_restJson1StartNextPendingJobExecutionCommand = functio
|
|
|
321
267
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
322
268
|
return [2, deserializeAws_restJson1StartNextPendingJobExecutionCommandError(output, context)];
|
|
323
269
|
}
|
|
324
|
-
contents = {
|
|
270
|
+
contents = map({
|
|
325
271
|
$metadata: deserializeMetadata(output),
|
|
326
|
-
|
|
327
|
-
};
|
|
272
|
+
});
|
|
328
273
|
_a = __expectNonNull;
|
|
329
274
|
_b = __expectObject;
|
|
330
275
|
return [4, parseBody(output.body, context)];
|
|
331
276
|
case 1:
|
|
332
277
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
333
|
-
if (data.execution
|
|
278
|
+
if (data.execution != null) {
|
|
334
279
|
contents.execution = deserializeAws_restJson1JobExecution(data.execution, context);
|
|
335
280
|
}
|
|
336
|
-
return [2,
|
|
281
|
+
return [2, contents];
|
|
337
282
|
}
|
|
338
283
|
});
|
|
339
284
|
}); };
|
|
340
285
|
var deserializeAws_restJson1StartNextPendingJobExecutionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
341
|
-
var parsedOutput, _a,
|
|
286
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
342
287
|
var _c;
|
|
343
288
|
return __generator(this, function (_d) {
|
|
344
289
|
switch (_d.label) {
|
|
@@ -375,14 +320,14 @@ var deserializeAws_restJson1StartNextPendingJobExecutionCommandError = function
|
|
|
375
320
|
case 11: throw _d.sent();
|
|
376
321
|
case 12:
|
|
377
322
|
parsedBody = parsedOutput.body;
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
$metadata: $metadata,
|
|
323
|
+
throwDefaultError({
|
|
324
|
+
output: output,
|
|
325
|
+
parsedBody: parsedBody,
|
|
326
|
+
exceptionCtor: __BaseException,
|
|
327
|
+
errorCode: errorCode,
|
|
384
328
|
});
|
|
385
|
-
|
|
329
|
+
_d.label = 13;
|
|
330
|
+
case 13: return [2];
|
|
386
331
|
}
|
|
387
332
|
});
|
|
388
333
|
}); };
|
|
@@ -394,28 +339,26 @@ export var deserializeAws_restJson1UpdateJobExecutionCommand = function (output,
|
|
|
394
339
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
395
340
|
return [2, deserializeAws_restJson1UpdateJobExecutionCommandError(output, context)];
|
|
396
341
|
}
|
|
397
|
-
contents = {
|
|
342
|
+
contents = map({
|
|
398
343
|
$metadata: deserializeMetadata(output),
|
|
399
|
-
|
|
400
|
-
jobDocument: undefined,
|
|
401
|
-
};
|
|
344
|
+
});
|
|
402
345
|
_a = __expectNonNull;
|
|
403
346
|
_b = __expectObject;
|
|
404
347
|
return [4, parseBody(output.body, context)];
|
|
405
348
|
case 1:
|
|
406
349
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
407
|
-
if (data.executionState
|
|
350
|
+
if (data.executionState != null) {
|
|
408
351
|
contents.executionState = deserializeAws_restJson1JobExecutionState(data.executionState, context);
|
|
409
352
|
}
|
|
410
|
-
if (data.jobDocument
|
|
353
|
+
if (data.jobDocument != null) {
|
|
411
354
|
contents.jobDocument = __expectString(data.jobDocument);
|
|
412
355
|
}
|
|
413
|
-
return [2,
|
|
356
|
+
return [2, contents];
|
|
414
357
|
}
|
|
415
358
|
});
|
|
416
359
|
}); };
|
|
417
360
|
var deserializeAws_restJson1UpdateJobExecutionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
418
|
-
var parsedOutput, _a,
|
|
361
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
419
362
|
var _c;
|
|
420
363
|
return __generator(this, function (_d) {
|
|
421
364
|
switch (_d.label) {
|
|
@@ -456,23 +399,24 @@ var deserializeAws_restJson1UpdateJobExecutionCommandError = function (output, c
|
|
|
456
399
|
case 13: throw _d.sent();
|
|
457
400
|
case 14:
|
|
458
401
|
parsedBody = parsedOutput.body;
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
$metadata: $metadata,
|
|
402
|
+
throwDefaultError({
|
|
403
|
+
output: output,
|
|
404
|
+
parsedBody: parsedBody,
|
|
405
|
+
exceptionCtor: __BaseException,
|
|
406
|
+
errorCode: errorCode,
|
|
465
407
|
});
|
|
466
|
-
|
|
408
|
+
_d.label = 15;
|
|
409
|
+
case 15: return [2];
|
|
467
410
|
}
|
|
468
411
|
});
|
|
469
412
|
}); };
|
|
413
|
+
var map = __map;
|
|
470
414
|
var deserializeAws_restJson1CertificateValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
471
415
|
var contents, data, exception;
|
|
472
416
|
return __generator(this, function (_a) {
|
|
473
|
-
contents = {};
|
|
417
|
+
contents = map({});
|
|
474
418
|
data = parsedOutput.body;
|
|
475
|
-
if (data.message
|
|
419
|
+
if (data.message != null) {
|
|
476
420
|
contents.message = __expectString(data.message);
|
|
477
421
|
}
|
|
478
422
|
exception = new CertificateValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -482,9 +426,9 @@ var deserializeAws_restJson1CertificateValidationExceptionResponse = function (p
|
|
|
482
426
|
var deserializeAws_restJson1InvalidRequestExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
483
427
|
var contents, data, exception;
|
|
484
428
|
return __generator(this, function (_a) {
|
|
485
|
-
contents = {};
|
|
429
|
+
contents = map({});
|
|
486
430
|
data = parsedOutput.body;
|
|
487
|
-
if (data.message
|
|
431
|
+
if (data.message != null) {
|
|
488
432
|
contents.message = __expectString(data.message);
|
|
489
433
|
}
|
|
490
434
|
exception = new InvalidRequestException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -494,9 +438,9 @@ var deserializeAws_restJson1InvalidRequestExceptionResponse = function (parsedOu
|
|
|
494
438
|
var deserializeAws_restJson1InvalidStateTransitionExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
495
439
|
var contents, data, exception;
|
|
496
440
|
return __generator(this, function (_a) {
|
|
497
|
-
contents = {};
|
|
441
|
+
contents = map({});
|
|
498
442
|
data = parsedOutput.body;
|
|
499
|
-
if (data.message
|
|
443
|
+
if (data.message != null) {
|
|
500
444
|
contents.message = __expectString(data.message);
|
|
501
445
|
}
|
|
502
446
|
exception = new InvalidStateTransitionException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -506,9 +450,9 @@ var deserializeAws_restJson1InvalidStateTransitionExceptionResponse = function (
|
|
|
506
450
|
var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
507
451
|
var contents, data, exception;
|
|
508
452
|
return __generator(this, function (_a) {
|
|
509
|
-
contents = {};
|
|
453
|
+
contents = map({});
|
|
510
454
|
data = parsedOutput.body;
|
|
511
|
-
if (data.message
|
|
455
|
+
if (data.message != null) {
|
|
512
456
|
contents.message = __expectString(data.message);
|
|
513
457
|
}
|
|
514
458
|
exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -518,9 +462,9 @@ var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsed
|
|
|
518
462
|
var deserializeAws_restJson1ServiceUnavailableExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
519
463
|
var contents, data, exception;
|
|
520
464
|
return __generator(this, function (_a) {
|
|
521
|
-
contents = {};
|
|
465
|
+
contents = map({});
|
|
522
466
|
data = parsedOutput.body;
|
|
523
|
-
if (data.message
|
|
467
|
+
if (data.message != null) {
|
|
524
468
|
contents.message = __expectString(data.message);
|
|
525
469
|
}
|
|
526
470
|
exception = new ServiceUnavailableException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -530,9 +474,9 @@ var deserializeAws_restJson1ServiceUnavailableExceptionResponse = function (pars
|
|
|
530
474
|
var deserializeAws_restJson1TerminalStateExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
531
475
|
var contents, data, exception;
|
|
532
476
|
return __generator(this, function (_a) {
|
|
533
|
-
contents = {};
|
|
477
|
+
contents = map({});
|
|
534
478
|
data = parsedOutput.body;
|
|
535
|
-
if (data.message
|
|
479
|
+
if (data.message != null) {
|
|
536
480
|
contents.message = __expectString(data.message);
|
|
537
481
|
}
|
|
538
482
|
exception = new TerminalStateException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -542,12 +486,12 @@ var deserializeAws_restJson1TerminalStateExceptionResponse = function (parsedOut
|
|
|
542
486
|
var deserializeAws_restJson1ThrottlingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
543
487
|
var contents, data, exception;
|
|
544
488
|
return __generator(this, function (_a) {
|
|
545
|
-
contents = {};
|
|
489
|
+
contents = map({});
|
|
546
490
|
data = parsedOutput.body;
|
|
547
|
-
if (data.message
|
|
491
|
+
if (data.message != null) {
|
|
548
492
|
contents.message = __expectString(data.message);
|
|
549
493
|
}
|
|
550
|
-
if (data.payload
|
|
494
|
+
if (data.payload != null) {
|
|
551
495
|
contents.payload = context.base64Decoder(data.payload);
|
|
552
496
|
}
|
|
553
497
|
exception = new ThrottlingException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-iot-jobs-data-plane",
|
|
3
3
|
"description": "AWS SDK for JavaScript Iot Jobs Data Plane Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.150.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@aws-crypto/sha256-browser": "2.0.0",
|
|
20
20
|
"@aws-crypto/sha256-js": "2.0.0",
|
|
21
|
-
"@aws-sdk/client-sts": "3.
|
|
21
|
+
"@aws-sdk/client-sts": "3.150.0",
|
|
22
22
|
"@aws-sdk/config-resolver": "3.130.0",
|
|
23
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/credential-provider-node": "3.150.0",
|
|
24
24
|
"@aws-sdk/fetch-http-handler": "3.131.0",
|
|
25
25
|
"@aws-sdk/hash-node": "3.127.0",
|
|
26
26
|
"@aws-sdk/invalid-dependency": "3.127.0",
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
"@aws-sdk/node-config-provider": "3.127.0",
|
|
37
37
|
"@aws-sdk/node-http-handler": "3.127.0",
|
|
38
38
|
"@aws-sdk/protocol-http": "3.127.0",
|
|
39
|
-
"@aws-sdk/smithy-client": "3.
|
|
39
|
+
"@aws-sdk/smithy-client": "3.142.0",
|
|
40
40
|
"@aws-sdk/types": "3.127.0",
|
|
41
41
|
"@aws-sdk/url-parser": "3.127.0",
|
|
42
42
|
"@aws-sdk/util-base64-browser": "3.109.0",
|
|
43
43
|
"@aws-sdk/util-base64-node": "3.55.0",
|
|
44
44
|
"@aws-sdk/util-body-length-browser": "3.55.0",
|
|
45
45
|
"@aws-sdk/util-body-length-node": "3.55.0",
|
|
46
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
47
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
46
|
+
"@aws-sdk/util-defaults-mode-browser": "3.142.0",
|
|
47
|
+
"@aws-sdk/util-defaults-mode-node": "3.142.0",
|
|
48
48
|
"@aws-sdk/util-user-agent-browser": "3.127.0",
|
|
49
49
|
"@aws-sdk/util-user-agent-node": "3.127.0",
|
|
50
50
|
"@aws-sdk/util-utf8-browser": "3.109.0",
|
|
@@ -61,6 +61,11 @@
|
|
|
61
61
|
"typedoc": "0.19.2",
|
|
62
62
|
"typescript": "~4.6.2"
|
|
63
63
|
},
|
|
64
|
+
"overrides": {
|
|
65
|
+
"typedoc": {
|
|
66
|
+
"typescript": "~4.6.2"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
64
69
|
"engines": {
|
|
65
70
|
"node": ">=12.0.0"
|
|
66
71
|
},
|