@aws-sdk/client-iot-data-plane 3.303.0 → 3.309.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/dist-cjs/commands/DeleteThingShadowCommand.js +2 -2
- package/dist-cjs/commands/GetRetainedMessageCommand.js +2 -2
- package/dist-cjs/commands/GetThingShadowCommand.js +2 -2
- package/dist-cjs/commands/ListNamedShadowsForThingCommand.js +2 -2
- package/dist-cjs/commands/ListRetainedMessagesCommand.js +2 -2
- package/dist-cjs/commands/PublishCommand.js +2 -2
- package/dist-cjs/commands/UpdateThingShadowCommand.js +2 -2
- package/dist-cjs/protocols/Aws_restJson1.js +109 -109
- package/dist-es/commands/DeleteThingShadowCommand.js +3 -3
- package/dist-es/commands/GetRetainedMessageCommand.js +3 -3
- package/dist-es/commands/GetThingShadowCommand.js +3 -3
- package/dist-es/commands/ListNamedShadowsForThingCommand.js +3 -3
- package/dist-es/commands/ListRetainedMessagesCommand.js +3 -3
- package/dist-es/commands/PublishCommand.js +3 -3
- package/dist-es/commands/UpdateThingShadowCommand.js +3 -3
- package/dist-es/protocols/Aws_restJson1.js +94 -94
- package/dist-types/protocols/Aws_restJson1.d.ts +56 -14
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +14 -14
- package/package.json +29 -29
|
@@ -2,7 +2,7 @@ import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
|
2
2
|
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, LazyJsonString as __LazyJsonString, map as __map, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
3
3
|
import { IoTDataPlaneServiceException as __BaseException } from "../models/IoTDataPlaneServiceException";
|
|
4
4
|
import { ConflictException, InternalFailureException, InvalidRequestException, MethodNotAllowedException, RequestEntityTooLargeException, ResourceNotFoundException, ServiceUnavailableException, ThrottlingException, UnauthorizedException, UnsupportedDocumentEncodingException, } from "../models/models_0";
|
|
5
|
-
export const
|
|
5
|
+
export const se_DeleteThingShadowCommand = async (input, context) => {
|
|
6
6
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
7
7
|
const headers = {};
|
|
8
8
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/things/{thingName}/shadow";
|
|
@@ -22,7 +22,7 @@ export const serializeAws_restJson1DeleteThingShadowCommand = async (input, cont
|
|
|
22
22
|
body,
|
|
23
23
|
});
|
|
24
24
|
};
|
|
25
|
-
export const
|
|
25
|
+
export const se_GetRetainedMessageCommand = async (input, context) => {
|
|
26
26
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
27
27
|
const headers = {};
|
|
28
28
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/retainedMessage/{topic}";
|
|
@@ -38,7 +38,7 @@ export const serializeAws_restJson1GetRetainedMessageCommand = async (input, con
|
|
|
38
38
|
body,
|
|
39
39
|
});
|
|
40
40
|
};
|
|
41
|
-
export const
|
|
41
|
+
export const se_GetThingShadowCommand = async (input, context) => {
|
|
42
42
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
43
43
|
const headers = {};
|
|
44
44
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/things/{thingName}/shadow";
|
|
@@ -58,7 +58,7 @@ export const serializeAws_restJson1GetThingShadowCommand = async (input, context
|
|
|
58
58
|
body,
|
|
59
59
|
});
|
|
60
60
|
};
|
|
61
|
-
export const
|
|
61
|
+
export const se_ListNamedShadowsForThingCommand = async (input, context) => {
|
|
62
62
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
63
63
|
const headers = {};
|
|
64
64
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
@@ -80,7 +80,7 @@ export const serializeAws_restJson1ListNamedShadowsForThingCommand = async (inpu
|
|
|
80
80
|
body,
|
|
81
81
|
});
|
|
82
82
|
};
|
|
83
|
-
export const
|
|
83
|
+
export const se_ListRetainedMessagesCommand = async (input, context) => {
|
|
84
84
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
85
85
|
const headers = {};
|
|
86
86
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/retainedMessage";
|
|
@@ -100,7 +100,7 @@ export const serializeAws_restJson1ListRetainedMessagesCommand = async (input, c
|
|
|
100
100
|
body,
|
|
101
101
|
});
|
|
102
102
|
};
|
|
103
|
-
export const
|
|
103
|
+
export const se_PublishCommand = async (input, context) => {
|
|
104
104
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
105
105
|
const headers = map({}, isSerializableHeaderValue, {
|
|
106
106
|
"content-type": "application/octet-stream",
|
|
@@ -135,7 +135,7 @@ export const serializeAws_restJson1PublishCommand = async (input, context) => {
|
|
|
135
135
|
body,
|
|
136
136
|
});
|
|
137
137
|
};
|
|
138
|
-
export const
|
|
138
|
+
export const se_UpdateThingShadowCommand = async (input, context) => {
|
|
139
139
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
140
140
|
const headers = {
|
|
141
141
|
"content-type": "application/octet-stream",
|
|
@@ -160,9 +160,9 @@ export const serializeAws_restJson1UpdateThingShadowCommand = async (input, cont
|
|
|
160
160
|
body,
|
|
161
161
|
});
|
|
162
162
|
};
|
|
163
|
-
export const
|
|
163
|
+
export const de_DeleteThingShadowCommand = async (output, context) => {
|
|
164
164
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
165
|
-
return
|
|
165
|
+
return de_DeleteThingShadowCommandError(output, context);
|
|
166
166
|
}
|
|
167
167
|
const contents = map({
|
|
168
168
|
$metadata: deserializeMetadata(output),
|
|
@@ -171,7 +171,7 @@ export const deserializeAws_restJson1DeleteThingShadowCommand = async (output, c
|
|
|
171
171
|
contents.payload = data;
|
|
172
172
|
return contents;
|
|
173
173
|
};
|
|
174
|
-
const
|
|
174
|
+
const de_DeleteThingShadowCommandError = async (output, context) => {
|
|
175
175
|
const parsedOutput = {
|
|
176
176
|
...output,
|
|
177
177
|
body: await parseErrorBody(output.body, context),
|
|
@@ -180,28 +180,28 @@ const deserializeAws_restJson1DeleteThingShadowCommandError = async (output, con
|
|
|
180
180
|
switch (errorCode) {
|
|
181
181
|
case "InternalFailureException":
|
|
182
182
|
case "com.amazonaws.iotdataplane#InternalFailureException":
|
|
183
|
-
throw await
|
|
183
|
+
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
184
184
|
case "InvalidRequestException":
|
|
185
185
|
case "com.amazonaws.iotdataplane#InvalidRequestException":
|
|
186
|
-
throw await
|
|
186
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
187
187
|
case "MethodNotAllowedException":
|
|
188
188
|
case "com.amazonaws.iotdataplane#MethodNotAllowedException":
|
|
189
|
-
throw await
|
|
189
|
+
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
190
190
|
case "ResourceNotFoundException":
|
|
191
191
|
case "com.amazonaws.iotdataplane#ResourceNotFoundException":
|
|
192
|
-
throw await
|
|
192
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
193
193
|
case "ServiceUnavailableException":
|
|
194
194
|
case "com.amazonaws.iotdataplane#ServiceUnavailableException":
|
|
195
|
-
throw await
|
|
195
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
196
196
|
case "ThrottlingException":
|
|
197
197
|
case "com.amazonaws.iotdataplane#ThrottlingException":
|
|
198
|
-
throw await
|
|
198
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
199
199
|
case "UnauthorizedException":
|
|
200
200
|
case "com.amazonaws.iotdataplane#UnauthorizedException":
|
|
201
|
-
throw await
|
|
201
|
+
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
202
202
|
case "UnsupportedDocumentEncodingException":
|
|
203
203
|
case "com.amazonaws.iotdataplane#UnsupportedDocumentEncodingException":
|
|
204
|
-
throw await
|
|
204
|
+
throw await de_UnsupportedDocumentEncodingExceptionRes(parsedOutput, context);
|
|
205
205
|
default:
|
|
206
206
|
const parsedBody = parsedOutput.body;
|
|
207
207
|
throwDefaultError({
|
|
@@ -212,9 +212,9 @@ const deserializeAws_restJson1DeleteThingShadowCommandError = async (output, con
|
|
|
212
212
|
});
|
|
213
213
|
}
|
|
214
214
|
};
|
|
215
|
-
export const
|
|
215
|
+
export const de_GetRetainedMessageCommand = async (output, context) => {
|
|
216
216
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
217
|
-
return
|
|
217
|
+
return de_GetRetainedMessageCommandError(output, context);
|
|
218
218
|
}
|
|
219
219
|
const contents = map({
|
|
220
220
|
$metadata: deserializeMetadata(output),
|
|
@@ -234,7 +234,7 @@ export const deserializeAws_restJson1GetRetainedMessageCommand = async (output,
|
|
|
234
234
|
}
|
|
235
235
|
return contents;
|
|
236
236
|
};
|
|
237
|
-
const
|
|
237
|
+
const de_GetRetainedMessageCommandError = async (output, context) => {
|
|
238
238
|
const parsedOutput = {
|
|
239
239
|
...output,
|
|
240
240
|
body: await parseErrorBody(output.body, context),
|
|
@@ -243,25 +243,25 @@ const deserializeAws_restJson1GetRetainedMessageCommandError = async (output, co
|
|
|
243
243
|
switch (errorCode) {
|
|
244
244
|
case "InternalFailureException":
|
|
245
245
|
case "com.amazonaws.iotdataplane#InternalFailureException":
|
|
246
|
-
throw await
|
|
246
|
+
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
247
247
|
case "InvalidRequestException":
|
|
248
248
|
case "com.amazonaws.iotdataplane#InvalidRequestException":
|
|
249
|
-
throw await
|
|
249
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
250
250
|
case "MethodNotAllowedException":
|
|
251
251
|
case "com.amazonaws.iotdataplane#MethodNotAllowedException":
|
|
252
|
-
throw await
|
|
252
|
+
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
253
253
|
case "ResourceNotFoundException":
|
|
254
254
|
case "com.amazonaws.iotdataplane#ResourceNotFoundException":
|
|
255
|
-
throw await
|
|
255
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
256
256
|
case "ServiceUnavailableException":
|
|
257
257
|
case "com.amazonaws.iotdataplane#ServiceUnavailableException":
|
|
258
|
-
throw await
|
|
258
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
259
259
|
case "ThrottlingException":
|
|
260
260
|
case "com.amazonaws.iotdataplane#ThrottlingException":
|
|
261
|
-
throw await
|
|
261
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
262
262
|
case "UnauthorizedException":
|
|
263
263
|
case "com.amazonaws.iotdataplane#UnauthorizedException":
|
|
264
|
-
throw await
|
|
264
|
+
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
265
265
|
default:
|
|
266
266
|
const parsedBody = parsedOutput.body;
|
|
267
267
|
throwDefaultError({
|
|
@@ -272,9 +272,9 @@ const deserializeAws_restJson1GetRetainedMessageCommandError = async (output, co
|
|
|
272
272
|
});
|
|
273
273
|
}
|
|
274
274
|
};
|
|
275
|
-
export const
|
|
275
|
+
export const de_GetThingShadowCommand = async (output, context) => {
|
|
276
276
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
277
|
-
return
|
|
277
|
+
return de_GetThingShadowCommandError(output, context);
|
|
278
278
|
}
|
|
279
279
|
const contents = map({
|
|
280
280
|
$metadata: deserializeMetadata(output),
|
|
@@ -283,7 +283,7 @@ export const deserializeAws_restJson1GetThingShadowCommand = async (output, cont
|
|
|
283
283
|
contents.payload = data;
|
|
284
284
|
return contents;
|
|
285
285
|
};
|
|
286
|
-
const
|
|
286
|
+
const de_GetThingShadowCommandError = async (output, context) => {
|
|
287
287
|
const parsedOutput = {
|
|
288
288
|
...output,
|
|
289
289
|
body: await parseErrorBody(output.body, context),
|
|
@@ -292,28 +292,28 @@ const deserializeAws_restJson1GetThingShadowCommandError = async (output, contex
|
|
|
292
292
|
switch (errorCode) {
|
|
293
293
|
case "InternalFailureException":
|
|
294
294
|
case "com.amazonaws.iotdataplane#InternalFailureException":
|
|
295
|
-
throw await
|
|
295
|
+
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
296
296
|
case "InvalidRequestException":
|
|
297
297
|
case "com.amazonaws.iotdataplane#InvalidRequestException":
|
|
298
|
-
throw await
|
|
298
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
299
299
|
case "MethodNotAllowedException":
|
|
300
300
|
case "com.amazonaws.iotdataplane#MethodNotAllowedException":
|
|
301
|
-
throw await
|
|
301
|
+
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
302
302
|
case "ResourceNotFoundException":
|
|
303
303
|
case "com.amazonaws.iotdataplane#ResourceNotFoundException":
|
|
304
|
-
throw await
|
|
304
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
305
305
|
case "ServiceUnavailableException":
|
|
306
306
|
case "com.amazonaws.iotdataplane#ServiceUnavailableException":
|
|
307
|
-
throw await
|
|
307
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
308
308
|
case "ThrottlingException":
|
|
309
309
|
case "com.amazonaws.iotdataplane#ThrottlingException":
|
|
310
|
-
throw await
|
|
310
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
311
311
|
case "UnauthorizedException":
|
|
312
312
|
case "com.amazonaws.iotdataplane#UnauthorizedException":
|
|
313
|
-
throw await
|
|
313
|
+
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
314
314
|
case "UnsupportedDocumentEncodingException":
|
|
315
315
|
case "com.amazonaws.iotdataplane#UnsupportedDocumentEncodingException":
|
|
316
|
-
throw await
|
|
316
|
+
throw await de_UnsupportedDocumentEncodingExceptionRes(parsedOutput, context);
|
|
317
317
|
default:
|
|
318
318
|
const parsedBody = parsedOutput.body;
|
|
319
319
|
throwDefaultError({
|
|
@@ -324,9 +324,9 @@ const deserializeAws_restJson1GetThingShadowCommandError = async (output, contex
|
|
|
324
324
|
});
|
|
325
325
|
}
|
|
326
326
|
};
|
|
327
|
-
export const
|
|
327
|
+
export const de_ListNamedShadowsForThingCommand = async (output, context) => {
|
|
328
328
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
329
|
-
return
|
|
329
|
+
return de_ListNamedShadowsForThingCommandError(output, context);
|
|
330
330
|
}
|
|
331
331
|
const contents = map({
|
|
332
332
|
$metadata: deserializeMetadata(output),
|
|
@@ -336,14 +336,14 @@ export const deserializeAws_restJson1ListNamedShadowsForThingCommand = async (ou
|
|
|
336
336
|
contents.nextToken = __expectString(data.nextToken);
|
|
337
337
|
}
|
|
338
338
|
if (data.results != null) {
|
|
339
|
-
contents.results =
|
|
339
|
+
contents.results = de_NamedShadowList(data.results, context);
|
|
340
340
|
}
|
|
341
341
|
if (data.timestamp != null) {
|
|
342
342
|
contents.timestamp = __expectLong(data.timestamp);
|
|
343
343
|
}
|
|
344
344
|
return contents;
|
|
345
345
|
};
|
|
346
|
-
const
|
|
346
|
+
const de_ListNamedShadowsForThingCommandError = async (output, context) => {
|
|
347
347
|
const parsedOutput = {
|
|
348
348
|
...output,
|
|
349
349
|
body: await parseErrorBody(output.body, context),
|
|
@@ -352,25 +352,25 @@ const deserializeAws_restJson1ListNamedShadowsForThingCommandError = async (outp
|
|
|
352
352
|
switch (errorCode) {
|
|
353
353
|
case "InternalFailureException":
|
|
354
354
|
case "com.amazonaws.iotdataplane#InternalFailureException":
|
|
355
|
-
throw await
|
|
355
|
+
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
356
356
|
case "InvalidRequestException":
|
|
357
357
|
case "com.amazonaws.iotdataplane#InvalidRequestException":
|
|
358
|
-
throw await
|
|
358
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
359
359
|
case "MethodNotAllowedException":
|
|
360
360
|
case "com.amazonaws.iotdataplane#MethodNotAllowedException":
|
|
361
|
-
throw await
|
|
361
|
+
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
362
362
|
case "ResourceNotFoundException":
|
|
363
363
|
case "com.amazonaws.iotdataplane#ResourceNotFoundException":
|
|
364
|
-
throw await
|
|
364
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
365
365
|
case "ServiceUnavailableException":
|
|
366
366
|
case "com.amazonaws.iotdataplane#ServiceUnavailableException":
|
|
367
|
-
throw await
|
|
367
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
368
368
|
case "ThrottlingException":
|
|
369
369
|
case "com.amazonaws.iotdataplane#ThrottlingException":
|
|
370
|
-
throw await
|
|
370
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
371
371
|
case "UnauthorizedException":
|
|
372
372
|
case "com.amazonaws.iotdataplane#UnauthorizedException":
|
|
373
|
-
throw await
|
|
373
|
+
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
374
374
|
default:
|
|
375
375
|
const parsedBody = parsedOutput.body;
|
|
376
376
|
throwDefaultError({
|
|
@@ -381,9 +381,9 @@ const deserializeAws_restJson1ListNamedShadowsForThingCommandError = async (outp
|
|
|
381
381
|
});
|
|
382
382
|
}
|
|
383
383
|
};
|
|
384
|
-
export const
|
|
384
|
+
export const de_ListRetainedMessagesCommand = async (output, context) => {
|
|
385
385
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
386
|
-
return
|
|
386
|
+
return de_ListRetainedMessagesCommandError(output, context);
|
|
387
387
|
}
|
|
388
388
|
const contents = map({
|
|
389
389
|
$metadata: deserializeMetadata(output),
|
|
@@ -393,11 +393,11 @@ export const deserializeAws_restJson1ListRetainedMessagesCommand = async (output
|
|
|
393
393
|
contents.nextToken = __expectString(data.nextToken);
|
|
394
394
|
}
|
|
395
395
|
if (data.retainedTopics != null) {
|
|
396
|
-
contents.retainedTopics =
|
|
396
|
+
contents.retainedTopics = de_RetainedMessageList(data.retainedTopics, context);
|
|
397
397
|
}
|
|
398
398
|
return contents;
|
|
399
399
|
};
|
|
400
|
-
const
|
|
400
|
+
const de_ListRetainedMessagesCommandError = async (output, context) => {
|
|
401
401
|
const parsedOutput = {
|
|
402
402
|
...output,
|
|
403
403
|
body: await parseErrorBody(output.body, context),
|
|
@@ -406,22 +406,22 @@ const deserializeAws_restJson1ListRetainedMessagesCommandError = async (output,
|
|
|
406
406
|
switch (errorCode) {
|
|
407
407
|
case "InternalFailureException":
|
|
408
408
|
case "com.amazonaws.iotdataplane#InternalFailureException":
|
|
409
|
-
throw await
|
|
409
|
+
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
410
410
|
case "InvalidRequestException":
|
|
411
411
|
case "com.amazonaws.iotdataplane#InvalidRequestException":
|
|
412
|
-
throw await
|
|
412
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
413
413
|
case "MethodNotAllowedException":
|
|
414
414
|
case "com.amazonaws.iotdataplane#MethodNotAllowedException":
|
|
415
|
-
throw await
|
|
415
|
+
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
416
416
|
case "ServiceUnavailableException":
|
|
417
417
|
case "com.amazonaws.iotdataplane#ServiceUnavailableException":
|
|
418
|
-
throw await
|
|
418
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
419
419
|
case "ThrottlingException":
|
|
420
420
|
case "com.amazonaws.iotdataplane#ThrottlingException":
|
|
421
|
-
throw await
|
|
421
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
422
422
|
case "UnauthorizedException":
|
|
423
423
|
case "com.amazonaws.iotdataplane#UnauthorizedException":
|
|
424
|
-
throw await
|
|
424
|
+
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
425
425
|
default:
|
|
426
426
|
const parsedBody = parsedOutput.body;
|
|
427
427
|
throwDefaultError({
|
|
@@ -432,9 +432,9 @@ const deserializeAws_restJson1ListRetainedMessagesCommandError = async (output,
|
|
|
432
432
|
});
|
|
433
433
|
}
|
|
434
434
|
};
|
|
435
|
-
export const
|
|
435
|
+
export const de_PublishCommand = async (output, context) => {
|
|
436
436
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
437
|
-
return
|
|
437
|
+
return de_PublishCommandError(output, context);
|
|
438
438
|
}
|
|
439
439
|
const contents = map({
|
|
440
440
|
$metadata: deserializeMetadata(output),
|
|
@@ -442,7 +442,7 @@ export const deserializeAws_restJson1PublishCommand = async (output, context) =>
|
|
|
442
442
|
await collectBody(output.body, context);
|
|
443
443
|
return contents;
|
|
444
444
|
};
|
|
445
|
-
const
|
|
445
|
+
const de_PublishCommandError = async (output, context) => {
|
|
446
446
|
const parsedOutput = {
|
|
447
447
|
...output,
|
|
448
448
|
body: await parseErrorBody(output.body, context),
|
|
@@ -451,19 +451,19 @@ const deserializeAws_restJson1PublishCommandError = async (output, context) => {
|
|
|
451
451
|
switch (errorCode) {
|
|
452
452
|
case "InternalFailureException":
|
|
453
453
|
case "com.amazonaws.iotdataplane#InternalFailureException":
|
|
454
|
-
throw await
|
|
454
|
+
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
455
455
|
case "InvalidRequestException":
|
|
456
456
|
case "com.amazonaws.iotdataplane#InvalidRequestException":
|
|
457
|
-
throw await
|
|
457
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
458
458
|
case "MethodNotAllowedException":
|
|
459
459
|
case "com.amazonaws.iotdataplane#MethodNotAllowedException":
|
|
460
|
-
throw await
|
|
460
|
+
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
461
461
|
case "ThrottlingException":
|
|
462
462
|
case "com.amazonaws.iotdataplane#ThrottlingException":
|
|
463
|
-
throw await
|
|
463
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
464
464
|
case "UnauthorizedException":
|
|
465
465
|
case "com.amazonaws.iotdataplane#UnauthorizedException":
|
|
466
|
-
throw await
|
|
466
|
+
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
467
467
|
default:
|
|
468
468
|
const parsedBody = parsedOutput.body;
|
|
469
469
|
throwDefaultError({
|
|
@@ -474,9 +474,9 @@ const deserializeAws_restJson1PublishCommandError = async (output, context) => {
|
|
|
474
474
|
});
|
|
475
475
|
}
|
|
476
476
|
};
|
|
477
|
-
export const
|
|
477
|
+
export const de_UpdateThingShadowCommand = async (output, context) => {
|
|
478
478
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
479
|
-
return
|
|
479
|
+
return de_UpdateThingShadowCommandError(output, context);
|
|
480
480
|
}
|
|
481
481
|
const contents = map({
|
|
482
482
|
$metadata: deserializeMetadata(output),
|
|
@@ -485,7 +485,7 @@ export const deserializeAws_restJson1UpdateThingShadowCommand = async (output, c
|
|
|
485
485
|
contents.payload = data;
|
|
486
486
|
return contents;
|
|
487
487
|
};
|
|
488
|
-
const
|
|
488
|
+
const de_UpdateThingShadowCommandError = async (output, context) => {
|
|
489
489
|
const parsedOutput = {
|
|
490
490
|
...output,
|
|
491
491
|
body: await parseErrorBody(output.body, context),
|
|
@@ -494,31 +494,31 @@ const deserializeAws_restJson1UpdateThingShadowCommandError = async (output, con
|
|
|
494
494
|
switch (errorCode) {
|
|
495
495
|
case "ConflictException":
|
|
496
496
|
case "com.amazonaws.iotdataplane#ConflictException":
|
|
497
|
-
throw await
|
|
497
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
498
498
|
case "InternalFailureException":
|
|
499
499
|
case "com.amazonaws.iotdataplane#InternalFailureException":
|
|
500
|
-
throw await
|
|
500
|
+
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
501
501
|
case "InvalidRequestException":
|
|
502
502
|
case "com.amazonaws.iotdataplane#InvalidRequestException":
|
|
503
|
-
throw await
|
|
503
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
504
504
|
case "MethodNotAllowedException":
|
|
505
505
|
case "com.amazonaws.iotdataplane#MethodNotAllowedException":
|
|
506
|
-
throw await
|
|
506
|
+
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
507
507
|
case "RequestEntityTooLargeException":
|
|
508
508
|
case "com.amazonaws.iotdataplane#RequestEntityTooLargeException":
|
|
509
|
-
throw await
|
|
509
|
+
throw await de_RequestEntityTooLargeExceptionRes(parsedOutput, context);
|
|
510
510
|
case "ServiceUnavailableException":
|
|
511
511
|
case "com.amazonaws.iotdataplane#ServiceUnavailableException":
|
|
512
|
-
throw await
|
|
512
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
513
513
|
case "ThrottlingException":
|
|
514
514
|
case "com.amazonaws.iotdataplane#ThrottlingException":
|
|
515
|
-
throw await
|
|
515
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
516
516
|
case "UnauthorizedException":
|
|
517
517
|
case "com.amazonaws.iotdataplane#UnauthorizedException":
|
|
518
|
-
throw await
|
|
518
|
+
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
519
519
|
case "UnsupportedDocumentEncodingException":
|
|
520
520
|
case "com.amazonaws.iotdataplane#UnsupportedDocumentEncodingException":
|
|
521
|
-
throw await
|
|
521
|
+
throw await de_UnsupportedDocumentEncodingExceptionRes(parsedOutput, context);
|
|
522
522
|
default:
|
|
523
523
|
const parsedBody = parsedOutput.body;
|
|
524
524
|
throwDefaultError({
|
|
@@ -530,7 +530,7 @@ const deserializeAws_restJson1UpdateThingShadowCommandError = async (output, con
|
|
|
530
530
|
}
|
|
531
531
|
};
|
|
532
532
|
const map = __map;
|
|
533
|
-
const
|
|
533
|
+
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
534
534
|
const contents = map({});
|
|
535
535
|
const data = parsedOutput.body;
|
|
536
536
|
if (data.message != null) {
|
|
@@ -542,7 +542,7 @@ const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, c
|
|
|
542
542
|
});
|
|
543
543
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
544
544
|
};
|
|
545
|
-
const
|
|
545
|
+
const de_InternalFailureExceptionRes = async (parsedOutput, context) => {
|
|
546
546
|
const contents = map({});
|
|
547
547
|
const data = parsedOutput.body;
|
|
548
548
|
if (data.message != null) {
|
|
@@ -554,7 +554,7 @@ const deserializeAws_restJson1InternalFailureExceptionResponse = async (parsedOu
|
|
|
554
554
|
});
|
|
555
555
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
556
556
|
};
|
|
557
|
-
const
|
|
557
|
+
const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
|
|
558
558
|
const contents = map({});
|
|
559
559
|
const data = parsedOutput.body;
|
|
560
560
|
if (data.message != null) {
|
|
@@ -566,7 +566,7 @@ const deserializeAws_restJson1InvalidRequestExceptionResponse = async (parsedOut
|
|
|
566
566
|
});
|
|
567
567
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
568
568
|
};
|
|
569
|
-
const
|
|
569
|
+
const de_MethodNotAllowedExceptionRes = async (parsedOutput, context) => {
|
|
570
570
|
const contents = map({});
|
|
571
571
|
const data = parsedOutput.body;
|
|
572
572
|
if (data.message != null) {
|
|
@@ -578,7 +578,7 @@ const deserializeAws_restJson1MethodNotAllowedExceptionResponse = async (parsedO
|
|
|
578
578
|
});
|
|
579
579
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
580
580
|
};
|
|
581
|
-
const
|
|
581
|
+
const de_RequestEntityTooLargeExceptionRes = async (parsedOutput, context) => {
|
|
582
582
|
const contents = map({});
|
|
583
583
|
const data = parsedOutput.body;
|
|
584
584
|
if (data.message != null) {
|
|
@@ -590,7 +590,7 @@ const deserializeAws_restJson1RequestEntityTooLargeExceptionResponse = async (pa
|
|
|
590
590
|
});
|
|
591
591
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
592
592
|
};
|
|
593
|
-
const
|
|
593
|
+
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
594
594
|
const contents = map({});
|
|
595
595
|
const data = parsedOutput.body;
|
|
596
596
|
if (data.message != null) {
|
|
@@ -602,7 +602,7 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
|
|
|
602
602
|
});
|
|
603
603
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
604
604
|
};
|
|
605
|
-
const
|
|
605
|
+
const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
606
606
|
const contents = map({});
|
|
607
607
|
const data = parsedOutput.body;
|
|
608
608
|
if (data.message != null) {
|
|
@@ -614,7 +614,7 @@ const deserializeAws_restJson1ServiceUnavailableExceptionResponse = async (parse
|
|
|
614
614
|
});
|
|
615
615
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
616
616
|
};
|
|
617
|
-
const
|
|
617
|
+
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
618
618
|
const contents = map({});
|
|
619
619
|
const data = parsedOutput.body;
|
|
620
620
|
if (data.message != null) {
|
|
@@ -626,7 +626,7 @@ const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput,
|
|
|
626
626
|
});
|
|
627
627
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
628
628
|
};
|
|
629
|
-
const
|
|
629
|
+
const de_UnauthorizedExceptionRes = async (parsedOutput, context) => {
|
|
630
630
|
const contents = map({});
|
|
631
631
|
const data = parsedOutput.body;
|
|
632
632
|
if (data.message != null) {
|
|
@@ -638,7 +638,7 @@ const deserializeAws_restJson1UnauthorizedExceptionResponse = async (parsedOutpu
|
|
|
638
638
|
});
|
|
639
639
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
640
640
|
};
|
|
641
|
-
const
|
|
641
|
+
const de_UnsupportedDocumentEncodingExceptionRes = async (parsedOutput, context) => {
|
|
642
642
|
const contents = map({});
|
|
643
643
|
const data = parsedOutput.body;
|
|
644
644
|
if (data.message != null) {
|
|
@@ -650,7 +650,7 @@ const deserializeAws_restJson1UnsupportedDocumentEncodingExceptionResponse = asy
|
|
|
650
650
|
});
|
|
651
651
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
652
652
|
};
|
|
653
|
-
const
|
|
653
|
+
const de_NamedShadowList = (output, context) => {
|
|
654
654
|
const retVal = (output || [])
|
|
655
655
|
.filter((e) => e != null)
|
|
656
656
|
.map((entry) => {
|
|
@@ -661,18 +661,18 @@ const deserializeAws_restJson1NamedShadowList = (output, context) => {
|
|
|
661
661
|
});
|
|
662
662
|
return retVal;
|
|
663
663
|
};
|
|
664
|
-
const
|
|
664
|
+
const de_RetainedMessageList = (output, context) => {
|
|
665
665
|
const retVal = (output || [])
|
|
666
666
|
.filter((e) => e != null)
|
|
667
667
|
.map((entry) => {
|
|
668
668
|
if (entry === null) {
|
|
669
669
|
return null;
|
|
670
670
|
}
|
|
671
|
-
return
|
|
671
|
+
return de_RetainedMessageSummary(entry, context);
|
|
672
672
|
});
|
|
673
673
|
return retVal;
|
|
674
674
|
};
|
|
675
|
-
const
|
|
675
|
+
const de_RetainedMessageSummary = (output, context) => {
|
|
676
676
|
return {
|
|
677
677
|
lastModifiedTime: __expectLong(output.lastModifiedTime),
|
|
678
678
|
payloadSize: __expectLong(output.payloadSize),
|
|
@@ -7,17 +7,59 @@ import { ListNamedShadowsForThingCommandInput, ListNamedShadowsForThingCommandOu
|
|
|
7
7
|
import { ListRetainedMessagesCommandInput, ListRetainedMessagesCommandOutput } from "../commands/ListRetainedMessagesCommand";
|
|
8
8
|
import { PublishCommandInput, PublishCommandOutput } from "../commands/PublishCommand";
|
|
9
9
|
import { UpdateThingShadowCommandInput, UpdateThingShadowCommandOutput } from "../commands/UpdateThingShadowCommand";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export declare const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export declare const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
export declare const
|
|
22
|
-
|
|
23
|
-
|
|
10
|
+
/**
|
|
11
|
+
* serializeAws_restJson1DeleteThingShadowCommand
|
|
12
|
+
*/
|
|
13
|
+
export declare const se_DeleteThingShadowCommand: (input: DeleteThingShadowCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
14
|
+
/**
|
|
15
|
+
* serializeAws_restJson1GetRetainedMessageCommand
|
|
16
|
+
*/
|
|
17
|
+
export declare const se_GetRetainedMessageCommand: (input: GetRetainedMessageCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
18
|
+
/**
|
|
19
|
+
* serializeAws_restJson1GetThingShadowCommand
|
|
20
|
+
*/
|
|
21
|
+
export declare const se_GetThingShadowCommand: (input: GetThingShadowCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
22
|
+
/**
|
|
23
|
+
* serializeAws_restJson1ListNamedShadowsForThingCommand
|
|
24
|
+
*/
|
|
25
|
+
export declare const se_ListNamedShadowsForThingCommand: (input: ListNamedShadowsForThingCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
26
|
+
/**
|
|
27
|
+
* serializeAws_restJson1ListRetainedMessagesCommand
|
|
28
|
+
*/
|
|
29
|
+
export declare const se_ListRetainedMessagesCommand: (input: ListRetainedMessagesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
30
|
+
/**
|
|
31
|
+
* serializeAws_restJson1PublishCommand
|
|
32
|
+
*/
|
|
33
|
+
export declare const se_PublishCommand: (input: PublishCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
34
|
+
/**
|
|
35
|
+
* serializeAws_restJson1UpdateThingShadowCommand
|
|
36
|
+
*/
|
|
37
|
+
export declare const se_UpdateThingShadowCommand: (input: UpdateThingShadowCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
38
|
+
/**
|
|
39
|
+
* deserializeAws_restJson1DeleteThingShadowCommand
|
|
40
|
+
*/
|
|
41
|
+
export declare const de_DeleteThingShadowCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DeleteThingShadowCommandOutput>;
|
|
42
|
+
/**
|
|
43
|
+
* deserializeAws_restJson1GetRetainedMessageCommand
|
|
44
|
+
*/
|
|
45
|
+
export declare const de_GetRetainedMessageCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetRetainedMessageCommandOutput>;
|
|
46
|
+
/**
|
|
47
|
+
* deserializeAws_restJson1GetThingShadowCommand
|
|
48
|
+
*/
|
|
49
|
+
export declare const de_GetThingShadowCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetThingShadowCommandOutput>;
|
|
50
|
+
/**
|
|
51
|
+
* deserializeAws_restJson1ListNamedShadowsForThingCommand
|
|
52
|
+
*/
|
|
53
|
+
export declare const de_ListNamedShadowsForThingCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListNamedShadowsForThingCommandOutput>;
|
|
54
|
+
/**
|
|
55
|
+
* deserializeAws_restJson1ListRetainedMessagesCommand
|
|
56
|
+
*/
|
|
57
|
+
export declare const de_ListRetainedMessagesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListRetainedMessagesCommandOutput>;
|
|
58
|
+
/**
|
|
59
|
+
* deserializeAws_restJson1PublishCommand
|
|
60
|
+
*/
|
|
61
|
+
export declare const de_PublishCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<PublishCommandOutput>;
|
|
62
|
+
/**
|
|
63
|
+
* deserializeAws_restJson1UpdateThingShadowCommand
|
|
64
|
+
*/
|
|
65
|
+
export declare const de_UpdateThingShadowCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<UpdateThingShadowCommandOutput>;
|