@aws-sdk/client-iot-data-plane 3.306.0 → 3.310.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 +35 -35
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.de_UpdateThingShadowCommand = exports.de_PublishCommand = exports.de_ListRetainedMessagesCommand = exports.de_ListNamedShadowsForThingCommand = exports.de_GetThingShadowCommand = exports.de_GetRetainedMessageCommand = exports.de_DeleteThingShadowCommand = exports.se_UpdateThingShadowCommand = exports.se_PublishCommand = exports.se_ListRetainedMessagesCommand = exports.se_ListNamedShadowsForThingCommand = exports.se_GetThingShadowCommand = exports.se_GetRetainedMessageCommand = exports.se_DeleteThingShadowCommand = void 0;
|
|
4
4
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
const IoTDataPlaneServiceException_1 = require("../models/IoTDataPlaneServiceException");
|
|
7
7
|
const models_0_1 = require("../models/models_0");
|
|
8
|
-
const
|
|
8
|
+
const se_DeleteThingShadowCommand = async (input, context) => {
|
|
9
9
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
10
10
|
const headers = {};
|
|
11
11
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/things/{thingName}/shadow";
|
|
@@ -25,8 +25,8 @@ const serializeAws_restJson1DeleteThingShadowCommand = async (input, context) =>
|
|
|
25
25
|
body,
|
|
26
26
|
});
|
|
27
27
|
};
|
|
28
|
-
exports.
|
|
29
|
-
const
|
|
28
|
+
exports.se_DeleteThingShadowCommand = se_DeleteThingShadowCommand;
|
|
29
|
+
const se_GetRetainedMessageCommand = async (input, context) => {
|
|
30
30
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
31
31
|
const headers = {};
|
|
32
32
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/retainedMessage/{topic}";
|
|
@@ -42,8 +42,8 @@ const serializeAws_restJson1GetRetainedMessageCommand = async (input, context) =
|
|
|
42
42
|
body,
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
|
-
exports.
|
|
46
|
-
const
|
|
45
|
+
exports.se_GetRetainedMessageCommand = se_GetRetainedMessageCommand;
|
|
46
|
+
const se_GetThingShadowCommand = async (input, context) => {
|
|
47
47
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
48
48
|
const headers = {};
|
|
49
49
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/things/{thingName}/shadow";
|
|
@@ -63,8 +63,8 @@ const serializeAws_restJson1GetThingShadowCommand = async (input, context) => {
|
|
|
63
63
|
body,
|
|
64
64
|
});
|
|
65
65
|
};
|
|
66
|
-
exports.
|
|
67
|
-
const
|
|
66
|
+
exports.se_GetThingShadowCommand = se_GetThingShadowCommand;
|
|
67
|
+
const se_ListNamedShadowsForThingCommand = async (input, context) => {
|
|
68
68
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
69
69
|
const headers = {};
|
|
70
70
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
@@ -86,8 +86,8 @@ const serializeAws_restJson1ListNamedShadowsForThingCommand = async (input, cont
|
|
|
86
86
|
body,
|
|
87
87
|
});
|
|
88
88
|
};
|
|
89
|
-
exports.
|
|
90
|
-
const
|
|
89
|
+
exports.se_ListNamedShadowsForThingCommand = se_ListNamedShadowsForThingCommand;
|
|
90
|
+
const se_ListRetainedMessagesCommand = async (input, context) => {
|
|
91
91
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
92
92
|
const headers = {};
|
|
93
93
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/retainedMessage";
|
|
@@ -107,8 +107,8 @@ const serializeAws_restJson1ListRetainedMessagesCommand = async (input, context)
|
|
|
107
107
|
body,
|
|
108
108
|
});
|
|
109
109
|
};
|
|
110
|
-
exports.
|
|
111
|
-
const
|
|
110
|
+
exports.se_ListRetainedMessagesCommand = se_ListRetainedMessagesCommand;
|
|
111
|
+
const se_PublishCommand = async (input, context) => {
|
|
112
112
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
113
113
|
const headers = map({}, isSerializableHeaderValue, {
|
|
114
114
|
"content-type": "application/octet-stream",
|
|
@@ -143,8 +143,8 @@ const serializeAws_restJson1PublishCommand = async (input, context) => {
|
|
|
143
143
|
body,
|
|
144
144
|
});
|
|
145
145
|
};
|
|
146
|
-
exports.
|
|
147
|
-
const
|
|
146
|
+
exports.se_PublishCommand = se_PublishCommand;
|
|
147
|
+
const se_UpdateThingShadowCommand = async (input, context) => {
|
|
148
148
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
149
149
|
const headers = {
|
|
150
150
|
"content-type": "application/octet-stream",
|
|
@@ -169,10 +169,10 @@ const serializeAws_restJson1UpdateThingShadowCommand = async (input, context) =>
|
|
|
169
169
|
body,
|
|
170
170
|
});
|
|
171
171
|
};
|
|
172
|
-
exports.
|
|
173
|
-
const
|
|
172
|
+
exports.se_UpdateThingShadowCommand = se_UpdateThingShadowCommand;
|
|
173
|
+
const de_DeleteThingShadowCommand = async (output, context) => {
|
|
174
174
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
175
|
-
return
|
|
175
|
+
return de_DeleteThingShadowCommandError(output, context);
|
|
176
176
|
}
|
|
177
177
|
const contents = map({
|
|
178
178
|
$metadata: deserializeMetadata(output),
|
|
@@ -181,8 +181,8 @@ const deserializeAws_restJson1DeleteThingShadowCommand = async (output, context)
|
|
|
181
181
|
contents.payload = data;
|
|
182
182
|
return contents;
|
|
183
183
|
};
|
|
184
|
-
exports.
|
|
185
|
-
const
|
|
184
|
+
exports.de_DeleteThingShadowCommand = de_DeleteThingShadowCommand;
|
|
185
|
+
const de_DeleteThingShadowCommandError = async (output, context) => {
|
|
186
186
|
const parsedOutput = {
|
|
187
187
|
...output,
|
|
188
188
|
body: await parseErrorBody(output.body, context),
|
|
@@ -191,28 +191,28 @@ const deserializeAws_restJson1DeleteThingShadowCommandError = async (output, con
|
|
|
191
191
|
switch (errorCode) {
|
|
192
192
|
case "InternalFailureException":
|
|
193
193
|
case "com.amazonaws.iotdataplane#InternalFailureException":
|
|
194
|
-
throw await
|
|
194
|
+
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
195
195
|
case "InvalidRequestException":
|
|
196
196
|
case "com.amazonaws.iotdataplane#InvalidRequestException":
|
|
197
|
-
throw await
|
|
197
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
198
198
|
case "MethodNotAllowedException":
|
|
199
199
|
case "com.amazonaws.iotdataplane#MethodNotAllowedException":
|
|
200
|
-
throw await
|
|
200
|
+
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
201
201
|
case "ResourceNotFoundException":
|
|
202
202
|
case "com.amazonaws.iotdataplane#ResourceNotFoundException":
|
|
203
|
-
throw await
|
|
203
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
204
204
|
case "ServiceUnavailableException":
|
|
205
205
|
case "com.amazonaws.iotdataplane#ServiceUnavailableException":
|
|
206
|
-
throw await
|
|
206
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
207
207
|
case "ThrottlingException":
|
|
208
208
|
case "com.amazonaws.iotdataplane#ThrottlingException":
|
|
209
|
-
throw await
|
|
209
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
210
210
|
case "UnauthorizedException":
|
|
211
211
|
case "com.amazonaws.iotdataplane#UnauthorizedException":
|
|
212
|
-
throw await
|
|
212
|
+
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
213
213
|
case "UnsupportedDocumentEncodingException":
|
|
214
214
|
case "com.amazonaws.iotdataplane#UnsupportedDocumentEncodingException":
|
|
215
|
-
throw await
|
|
215
|
+
throw await de_UnsupportedDocumentEncodingExceptionRes(parsedOutput, context);
|
|
216
216
|
default:
|
|
217
217
|
const parsedBody = parsedOutput.body;
|
|
218
218
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -223,9 +223,9 @@ const deserializeAws_restJson1DeleteThingShadowCommandError = async (output, con
|
|
|
223
223
|
});
|
|
224
224
|
}
|
|
225
225
|
};
|
|
226
|
-
const
|
|
226
|
+
const de_GetRetainedMessageCommand = async (output, context) => {
|
|
227
227
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
228
|
-
return
|
|
228
|
+
return de_GetRetainedMessageCommandError(output, context);
|
|
229
229
|
}
|
|
230
230
|
const contents = map({
|
|
231
231
|
$metadata: deserializeMetadata(output),
|
|
@@ -245,8 +245,8 @@ const deserializeAws_restJson1GetRetainedMessageCommand = async (output, context
|
|
|
245
245
|
}
|
|
246
246
|
return contents;
|
|
247
247
|
};
|
|
248
|
-
exports.
|
|
249
|
-
const
|
|
248
|
+
exports.de_GetRetainedMessageCommand = de_GetRetainedMessageCommand;
|
|
249
|
+
const de_GetRetainedMessageCommandError = async (output, context) => {
|
|
250
250
|
const parsedOutput = {
|
|
251
251
|
...output,
|
|
252
252
|
body: await parseErrorBody(output.body, context),
|
|
@@ -255,25 +255,25 @@ const deserializeAws_restJson1GetRetainedMessageCommandError = async (output, co
|
|
|
255
255
|
switch (errorCode) {
|
|
256
256
|
case "InternalFailureException":
|
|
257
257
|
case "com.amazonaws.iotdataplane#InternalFailureException":
|
|
258
|
-
throw await
|
|
258
|
+
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
259
259
|
case "InvalidRequestException":
|
|
260
260
|
case "com.amazonaws.iotdataplane#InvalidRequestException":
|
|
261
|
-
throw await
|
|
261
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
262
262
|
case "MethodNotAllowedException":
|
|
263
263
|
case "com.amazonaws.iotdataplane#MethodNotAllowedException":
|
|
264
|
-
throw await
|
|
264
|
+
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
265
265
|
case "ResourceNotFoundException":
|
|
266
266
|
case "com.amazonaws.iotdataplane#ResourceNotFoundException":
|
|
267
|
-
throw await
|
|
267
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
268
268
|
case "ServiceUnavailableException":
|
|
269
269
|
case "com.amazonaws.iotdataplane#ServiceUnavailableException":
|
|
270
|
-
throw await
|
|
270
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
271
271
|
case "ThrottlingException":
|
|
272
272
|
case "com.amazonaws.iotdataplane#ThrottlingException":
|
|
273
|
-
throw await
|
|
273
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
274
274
|
case "UnauthorizedException":
|
|
275
275
|
case "com.amazonaws.iotdataplane#UnauthorizedException":
|
|
276
|
-
throw await
|
|
276
|
+
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
277
277
|
default:
|
|
278
278
|
const parsedBody = parsedOutput.body;
|
|
279
279
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -284,9 +284,9 @@ const deserializeAws_restJson1GetRetainedMessageCommandError = async (output, co
|
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
286
|
};
|
|
287
|
-
const
|
|
287
|
+
const de_GetThingShadowCommand = async (output, context) => {
|
|
288
288
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
289
|
-
return
|
|
289
|
+
return de_GetThingShadowCommandError(output, context);
|
|
290
290
|
}
|
|
291
291
|
const contents = map({
|
|
292
292
|
$metadata: deserializeMetadata(output),
|
|
@@ -295,8 +295,8 @@ const deserializeAws_restJson1GetThingShadowCommand = async (output, context) =>
|
|
|
295
295
|
contents.payload = data;
|
|
296
296
|
return contents;
|
|
297
297
|
};
|
|
298
|
-
exports.
|
|
299
|
-
const
|
|
298
|
+
exports.de_GetThingShadowCommand = de_GetThingShadowCommand;
|
|
299
|
+
const de_GetThingShadowCommandError = async (output, context) => {
|
|
300
300
|
const parsedOutput = {
|
|
301
301
|
...output,
|
|
302
302
|
body: await parseErrorBody(output.body, context),
|
|
@@ -305,28 +305,28 @@ const deserializeAws_restJson1GetThingShadowCommandError = async (output, contex
|
|
|
305
305
|
switch (errorCode) {
|
|
306
306
|
case "InternalFailureException":
|
|
307
307
|
case "com.amazonaws.iotdataplane#InternalFailureException":
|
|
308
|
-
throw await
|
|
308
|
+
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
309
309
|
case "InvalidRequestException":
|
|
310
310
|
case "com.amazonaws.iotdataplane#InvalidRequestException":
|
|
311
|
-
throw await
|
|
311
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
312
312
|
case "MethodNotAllowedException":
|
|
313
313
|
case "com.amazonaws.iotdataplane#MethodNotAllowedException":
|
|
314
|
-
throw await
|
|
314
|
+
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
315
315
|
case "ResourceNotFoundException":
|
|
316
316
|
case "com.amazonaws.iotdataplane#ResourceNotFoundException":
|
|
317
|
-
throw await
|
|
317
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
318
318
|
case "ServiceUnavailableException":
|
|
319
319
|
case "com.amazonaws.iotdataplane#ServiceUnavailableException":
|
|
320
|
-
throw await
|
|
320
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
321
321
|
case "ThrottlingException":
|
|
322
322
|
case "com.amazonaws.iotdataplane#ThrottlingException":
|
|
323
|
-
throw await
|
|
323
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
324
324
|
case "UnauthorizedException":
|
|
325
325
|
case "com.amazonaws.iotdataplane#UnauthorizedException":
|
|
326
|
-
throw await
|
|
326
|
+
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
327
327
|
case "UnsupportedDocumentEncodingException":
|
|
328
328
|
case "com.amazonaws.iotdataplane#UnsupportedDocumentEncodingException":
|
|
329
|
-
throw await
|
|
329
|
+
throw await de_UnsupportedDocumentEncodingExceptionRes(parsedOutput, context);
|
|
330
330
|
default:
|
|
331
331
|
const parsedBody = parsedOutput.body;
|
|
332
332
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -337,9 +337,9 @@ const deserializeAws_restJson1GetThingShadowCommandError = async (output, contex
|
|
|
337
337
|
});
|
|
338
338
|
}
|
|
339
339
|
};
|
|
340
|
-
const
|
|
340
|
+
const de_ListNamedShadowsForThingCommand = async (output, context) => {
|
|
341
341
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
342
|
-
return
|
|
342
|
+
return de_ListNamedShadowsForThingCommandError(output, context);
|
|
343
343
|
}
|
|
344
344
|
const contents = map({
|
|
345
345
|
$metadata: deserializeMetadata(output),
|
|
@@ -349,15 +349,15 @@ const deserializeAws_restJson1ListNamedShadowsForThingCommand = async (output, c
|
|
|
349
349
|
contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
|
|
350
350
|
}
|
|
351
351
|
if (data.results != null) {
|
|
352
|
-
contents.results =
|
|
352
|
+
contents.results = de_NamedShadowList(data.results, context);
|
|
353
353
|
}
|
|
354
354
|
if (data.timestamp != null) {
|
|
355
355
|
contents.timestamp = (0, smithy_client_1.expectLong)(data.timestamp);
|
|
356
356
|
}
|
|
357
357
|
return contents;
|
|
358
358
|
};
|
|
359
|
-
exports.
|
|
360
|
-
const
|
|
359
|
+
exports.de_ListNamedShadowsForThingCommand = de_ListNamedShadowsForThingCommand;
|
|
360
|
+
const de_ListNamedShadowsForThingCommandError = async (output, context) => {
|
|
361
361
|
const parsedOutput = {
|
|
362
362
|
...output,
|
|
363
363
|
body: await parseErrorBody(output.body, context),
|
|
@@ -366,25 +366,25 @@ const deserializeAws_restJson1ListNamedShadowsForThingCommandError = async (outp
|
|
|
366
366
|
switch (errorCode) {
|
|
367
367
|
case "InternalFailureException":
|
|
368
368
|
case "com.amazonaws.iotdataplane#InternalFailureException":
|
|
369
|
-
throw await
|
|
369
|
+
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
370
370
|
case "InvalidRequestException":
|
|
371
371
|
case "com.amazonaws.iotdataplane#InvalidRequestException":
|
|
372
|
-
throw await
|
|
372
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
373
373
|
case "MethodNotAllowedException":
|
|
374
374
|
case "com.amazonaws.iotdataplane#MethodNotAllowedException":
|
|
375
|
-
throw await
|
|
375
|
+
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
376
376
|
case "ResourceNotFoundException":
|
|
377
377
|
case "com.amazonaws.iotdataplane#ResourceNotFoundException":
|
|
378
|
-
throw await
|
|
378
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
379
379
|
case "ServiceUnavailableException":
|
|
380
380
|
case "com.amazonaws.iotdataplane#ServiceUnavailableException":
|
|
381
|
-
throw await
|
|
381
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
382
382
|
case "ThrottlingException":
|
|
383
383
|
case "com.amazonaws.iotdataplane#ThrottlingException":
|
|
384
|
-
throw await
|
|
384
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
385
385
|
case "UnauthorizedException":
|
|
386
386
|
case "com.amazonaws.iotdataplane#UnauthorizedException":
|
|
387
|
-
throw await
|
|
387
|
+
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
388
388
|
default:
|
|
389
389
|
const parsedBody = parsedOutput.body;
|
|
390
390
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -395,9 +395,9 @@ const deserializeAws_restJson1ListNamedShadowsForThingCommandError = async (outp
|
|
|
395
395
|
});
|
|
396
396
|
}
|
|
397
397
|
};
|
|
398
|
-
const
|
|
398
|
+
const de_ListRetainedMessagesCommand = async (output, context) => {
|
|
399
399
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
400
|
-
return
|
|
400
|
+
return de_ListRetainedMessagesCommandError(output, context);
|
|
401
401
|
}
|
|
402
402
|
const contents = map({
|
|
403
403
|
$metadata: deserializeMetadata(output),
|
|
@@ -407,12 +407,12 @@ const deserializeAws_restJson1ListRetainedMessagesCommand = async (output, conte
|
|
|
407
407
|
contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
|
|
408
408
|
}
|
|
409
409
|
if (data.retainedTopics != null) {
|
|
410
|
-
contents.retainedTopics =
|
|
410
|
+
contents.retainedTopics = de_RetainedMessageList(data.retainedTopics, context);
|
|
411
411
|
}
|
|
412
412
|
return contents;
|
|
413
413
|
};
|
|
414
|
-
exports.
|
|
415
|
-
const
|
|
414
|
+
exports.de_ListRetainedMessagesCommand = de_ListRetainedMessagesCommand;
|
|
415
|
+
const de_ListRetainedMessagesCommandError = async (output, context) => {
|
|
416
416
|
const parsedOutput = {
|
|
417
417
|
...output,
|
|
418
418
|
body: await parseErrorBody(output.body, context),
|
|
@@ -421,22 +421,22 @@ const deserializeAws_restJson1ListRetainedMessagesCommandError = async (output,
|
|
|
421
421
|
switch (errorCode) {
|
|
422
422
|
case "InternalFailureException":
|
|
423
423
|
case "com.amazonaws.iotdataplane#InternalFailureException":
|
|
424
|
-
throw await
|
|
424
|
+
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
425
425
|
case "InvalidRequestException":
|
|
426
426
|
case "com.amazonaws.iotdataplane#InvalidRequestException":
|
|
427
|
-
throw await
|
|
427
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
428
428
|
case "MethodNotAllowedException":
|
|
429
429
|
case "com.amazonaws.iotdataplane#MethodNotAllowedException":
|
|
430
|
-
throw await
|
|
430
|
+
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
431
431
|
case "ServiceUnavailableException":
|
|
432
432
|
case "com.amazonaws.iotdataplane#ServiceUnavailableException":
|
|
433
|
-
throw await
|
|
433
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
434
434
|
case "ThrottlingException":
|
|
435
435
|
case "com.amazonaws.iotdataplane#ThrottlingException":
|
|
436
|
-
throw await
|
|
436
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
437
437
|
case "UnauthorizedException":
|
|
438
438
|
case "com.amazonaws.iotdataplane#UnauthorizedException":
|
|
439
|
-
throw await
|
|
439
|
+
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
440
440
|
default:
|
|
441
441
|
const parsedBody = parsedOutput.body;
|
|
442
442
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -447,9 +447,9 @@ const deserializeAws_restJson1ListRetainedMessagesCommandError = async (output,
|
|
|
447
447
|
});
|
|
448
448
|
}
|
|
449
449
|
};
|
|
450
|
-
const
|
|
450
|
+
const de_PublishCommand = async (output, context) => {
|
|
451
451
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
452
|
-
return
|
|
452
|
+
return de_PublishCommandError(output, context);
|
|
453
453
|
}
|
|
454
454
|
const contents = map({
|
|
455
455
|
$metadata: deserializeMetadata(output),
|
|
@@ -457,8 +457,8 @@ const deserializeAws_restJson1PublishCommand = async (output, context) => {
|
|
|
457
457
|
await collectBody(output.body, context);
|
|
458
458
|
return contents;
|
|
459
459
|
};
|
|
460
|
-
exports.
|
|
461
|
-
const
|
|
460
|
+
exports.de_PublishCommand = de_PublishCommand;
|
|
461
|
+
const de_PublishCommandError = async (output, context) => {
|
|
462
462
|
const parsedOutput = {
|
|
463
463
|
...output,
|
|
464
464
|
body: await parseErrorBody(output.body, context),
|
|
@@ -467,19 +467,19 @@ const deserializeAws_restJson1PublishCommandError = async (output, context) => {
|
|
|
467
467
|
switch (errorCode) {
|
|
468
468
|
case "InternalFailureException":
|
|
469
469
|
case "com.amazonaws.iotdataplane#InternalFailureException":
|
|
470
|
-
throw await
|
|
470
|
+
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
471
471
|
case "InvalidRequestException":
|
|
472
472
|
case "com.amazonaws.iotdataplane#InvalidRequestException":
|
|
473
|
-
throw await
|
|
473
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
474
474
|
case "MethodNotAllowedException":
|
|
475
475
|
case "com.amazonaws.iotdataplane#MethodNotAllowedException":
|
|
476
|
-
throw await
|
|
476
|
+
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
477
477
|
case "ThrottlingException":
|
|
478
478
|
case "com.amazonaws.iotdataplane#ThrottlingException":
|
|
479
|
-
throw await
|
|
479
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
480
480
|
case "UnauthorizedException":
|
|
481
481
|
case "com.amazonaws.iotdataplane#UnauthorizedException":
|
|
482
|
-
throw await
|
|
482
|
+
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
483
483
|
default:
|
|
484
484
|
const parsedBody = parsedOutput.body;
|
|
485
485
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -490,9 +490,9 @@ const deserializeAws_restJson1PublishCommandError = async (output, context) => {
|
|
|
490
490
|
});
|
|
491
491
|
}
|
|
492
492
|
};
|
|
493
|
-
const
|
|
493
|
+
const de_UpdateThingShadowCommand = async (output, context) => {
|
|
494
494
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
495
|
-
return
|
|
495
|
+
return de_UpdateThingShadowCommandError(output, context);
|
|
496
496
|
}
|
|
497
497
|
const contents = map({
|
|
498
498
|
$metadata: deserializeMetadata(output),
|
|
@@ -501,8 +501,8 @@ const deserializeAws_restJson1UpdateThingShadowCommand = async (output, context)
|
|
|
501
501
|
contents.payload = data;
|
|
502
502
|
return contents;
|
|
503
503
|
};
|
|
504
|
-
exports.
|
|
505
|
-
const
|
|
504
|
+
exports.de_UpdateThingShadowCommand = de_UpdateThingShadowCommand;
|
|
505
|
+
const de_UpdateThingShadowCommandError = async (output, context) => {
|
|
506
506
|
const parsedOutput = {
|
|
507
507
|
...output,
|
|
508
508
|
body: await parseErrorBody(output.body, context),
|
|
@@ -511,31 +511,31 @@ const deserializeAws_restJson1UpdateThingShadowCommandError = async (output, con
|
|
|
511
511
|
switch (errorCode) {
|
|
512
512
|
case "ConflictException":
|
|
513
513
|
case "com.amazonaws.iotdataplane#ConflictException":
|
|
514
|
-
throw await
|
|
514
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
515
515
|
case "InternalFailureException":
|
|
516
516
|
case "com.amazonaws.iotdataplane#InternalFailureException":
|
|
517
|
-
throw await
|
|
517
|
+
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
518
518
|
case "InvalidRequestException":
|
|
519
519
|
case "com.amazonaws.iotdataplane#InvalidRequestException":
|
|
520
|
-
throw await
|
|
520
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
521
521
|
case "MethodNotAllowedException":
|
|
522
522
|
case "com.amazonaws.iotdataplane#MethodNotAllowedException":
|
|
523
|
-
throw await
|
|
523
|
+
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
524
524
|
case "RequestEntityTooLargeException":
|
|
525
525
|
case "com.amazonaws.iotdataplane#RequestEntityTooLargeException":
|
|
526
|
-
throw await
|
|
526
|
+
throw await de_RequestEntityTooLargeExceptionRes(parsedOutput, context);
|
|
527
527
|
case "ServiceUnavailableException":
|
|
528
528
|
case "com.amazonaws.iotdataplane#ServiceUnavailableException":
|
|
529
|
-
throw await
|
|
529
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
530
530
|
case "ThrottlingException":
|
|
531
531
|
case "com.amazonaws.iotdataplane#ThrottlingException":
|
|
532
|
-
throw await
|
|
532
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
533
533
|
case "UnauthorizedException":
|
|
534
534
|
case "com.amazonaws.iotdataplane#UnauthorizedException":
|
|
535
|
-
throw await
|
|
535
|
+
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
536
536
|
case "UnsupportedDocumentEncodingException":
|
|
537
537
|
case "com.amazonaws.iotdataplane#UnsupportedDocumentEncodingException":
|
|
538
|
-
throw await
|
|
538
|
+
throw await de_UnsupportedDocumentEncodingExceptionRes(parsedOutput, context);
|
|
539
539
|
default:
|
|
540
540
|
const parsedBody = parsedOutput.body;
|
|
541
541
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -547,7 +547,7 @@ const deserializeAws_restJson1UpdateThingShadowCommandError = async (output, con
|
|
|
547
547
|
}
|
|
548
548
|
};
|
|
549
549
|
const map = smithy_client_1.map;
|
|
550
|
-
const
|
|
550
|
+
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
551
551
|
const contents = map({});
|
|
552
552
|
const data = parsedOutput.body;
|
|
553
553
|
if (data.message != null) {
|
|
@@ -559,7 +559,7 @@ const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, c
|
|
|
559
559
|
});
|
|
560
560
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
561
561
|
};
|
|
562
|
-
const
|
|
562
|
+
const de_InternalFailureExceptionRes = async (parsedOutput, context) => {
|
|
563
563
|
const contents = map({});
|
|
564
564
|
const data = parsedOutput.body;
|
|
565
565
|
if (data.message != null) {
|
|
@@ -571,7 +571,7 @@ const deserializeAws_restJson1InternalFailureExceptionResponse = async (parsedOu
|
|
|
571
571
|
});
|
|
572
572
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
573
573
|
};
|
|
574
|
-
const
|
|
574
|
+
const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
|
|
575
575
|
const contents = map({});
|
|
576
576
|
const data = parsedOutput.body;
|
|
577
577
|
if (data.message != null) {
|
|
@@ -583,7 +583,7 @@ const deserializeAws_restJson1InvalidRequestExceptionResponse = async (parsedOut
|
|
|
583
583
|
});
|
|
584
584
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
585
585
|
};
|
|
586
|
-
const
|
|
586
|
+
const de_MethodNotAllowedExceptionRes = async (parsedOutput, context) => {
|
|
587
587
|
const contents = map({});
|
|
588
588
|
const data = parsedOutput.body;
|
|
589
589
|
if (data.message != null) {
|
|
@@ -595,7 +595,7 @@ const deserializeAws_restJson1MethodNotAllowedExceptionResponse = async (parsedO
|
|
|
595
595
|
});
|
|
596
596
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
597
597
|
};
|
|
598
|
-
const
|
|
598
|
+
const de_RequestEntityTooLargeExceptionRes = async (parsedOutput, context) => {
|
|
599
599
|
const contents = map({});
|
|
600
600
|
const data = parsedOutput.body;
|
|
601
601
|
if (data.message != null) {
|
|
@@ -607,7 +607,7 @@ const deserializeAws_restJson1RequestEntityTooLargeExceptionResponse = async (pa
|
|
|
607
607
|
});
|
|
608
608
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
609
609
|
};
|
|
610
|
-
const
|
|
610
|
+
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
611
611
|
const contents = map({});
|
|
612
612
|
const data = parsedOutput.body;
|
|
613
613
|
if (data.message != null) {
|
|
@@ -619,7 +619,7 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
|
|
|
619
619
|
});
|
|
620
620
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
621
621
|
};
|
|
622
|
-
const
|
|
622
|
+
const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
623
623
|
const contents = map({});
|
|
624
624
|
const data = parsedOutput.body;
|
|
625
625
|
if (data.message != null) {
|
|
@@ -631,7 +631,7 @@ const deserializeAws_restJson1ServiceUnavailableExceptionResponse = async (parse
|
|
|
631
631
|
});
|
|
632
632
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
633
633
|
};
|
|
634
|
-
const
|
|
634
|
+
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
635
635
|
const contents = map({});
|
|
636
636
|
const data = parsedOutput.body;
|
|
637
637
|
if (data.message != null) {
|
|
@@ -643,7 +643,7 @@ const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput,
|
|
|
643
643
|
});
|
|
644
644
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
645
645
|
};
|
|
646
|
-
const
|
|
646
|
+
const de_UnauthorizedExceptionRes = async (parsedOutput, context) => {
|
|
647
647
|
const contents = map({});
|
|
648
648
|
const data = parsedOutput.body;
|
|
649
649
|
if (data.message != null) {
|
|
@@ -655,7 +655,7 @@ const deserializeAws_restJson1UnauthorizedExceptionResponse = async (parsedOutpu
|
|
|
655
655
|
});
|
|
656
656
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
657
657
|
};
|
|
658
|
-
const
|
|
658
|
+
const de_UnsupportedDocumentEncodingExceptionRes = async (parsedOutput, context) => {
|
|
659
659
|
const contents = map({});
|
|
660
660
|
const data = parsedOutput.body;
|
|
661
661
|
if (data.message != null) {
|
|
@@ -667,7 +667,7 @@ const deserializeAws_restJson1UnsupportedDocumentEncodingExceptionResponse = asy
|
|
|
667
667
|
});
|
|
668
668
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
669
669
|
};
|
|
670
|
-
const
|
|
670
|
+
const de_NamedShadowList = (output, context) => {
|
|
671
671
|
const retVal = (output || [])
|
|
672
672
|
.filter((e) => e != null)
|
|
673
673
|
.map((entry) => {
|
|
@@ -678,18 +678,18 @@ const deserializeAws_restJson1NamedShadowList = (output, context) => {
|
|
|
678
678
|
});
|
|
679
679
|
return retVal;
|
|
680
680
|
};
|
|
681
|
-
const
|
|
681
|
+
const de_RetainedMessageList = (output, context) => {
|
|
682
682
|
const retVal = (output || [])
|
|
683
683
|
.filter((e) => e != null)
|
|
684
684
|
.map((entry) => {
|
|
685
685
|
if (entry === null) {
|
|
686
686
|
return null;
|
|
687
687
|
}
|
|
688
|
-
return
|
|
688
|
+
return de_RetainedMessageSummary(entry, context);
|
|
689
689
|
});
|
|
690
690
|
return retVal;
|
|
691
691
|
};
|
|
692
|
-
const
|
|
692
|
+
const de_RetainedMessageSummary = (output, context) => {
|
|
693
693
|
return {
|
|
694
694
|
lastModifiedTime: (0, smithy_client_1.expectLong)(output.lastModifiedTime),
|
|
695
695
|
payloadSize: (0, smithy_client_1.expectLong)(output.payloadSize),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
|
|
2
2
|
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
3
|
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
-
import {
|
|
4
|
+
import { de_DeleteThingShadowCommand, se_DeleteThingShadowCommand } from "../protocols/Aws_restJson1";
|
|
5
5
|
export class DeleteThingShadowCommand extends $Command {
|
|
6
6
|
static getEndpointParameterInstructions() {
|
|
7
7
|
return {
|
|
@@ -33,9 +33,9 @@ export class DeleteThingShadowCommand extends $Command {
|
|
|
33
33
|
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
34
34
|
}
|
|
35
35
|
serialize(input, context) {
|
|
36
|
-
return
|
|
36
|
+
return se_DeleteThingShadowCommand(input, context);
|
|
37
37
|
}
|
|
38
38
|
deserialize(output, context) {
|
|
39
|
-
return
|
|
39
|
+
return de_DeleteThingShadowCommand(output, context);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
|
|
2
2
|
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
3
|
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
-
import {
|
|
4
|
+
import { de_GetRetainedMessageCommand, se_GetRetainedMessageCommand } from "../protocols/Aws_restJson1";
|
|
5
5
|
export class GetRetainedMessageCommand extends $Command {
|
|
6
6
|
static getEndpointParameterInstructions() {
|
|
7
7
|
return {
|
|
@@ -33,9 +33,9 @@ export class GetRetainedMessageCommand extends $Command {
|
|
|
33
33
|
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
34
34
|
}
|
|
35
35
|
serialize(input, context) {
|
|
36
|
-
return
|
|
36
|
+
return se_GetRetainedMessageCommand(input, context);
|
|
37
37
|
}
|
|
38
38
|
deserialize(output, context) {
|
|
39
|
-
return
|
|
39
|
+
return de_GetRetainedMessageCommand(output, context);
|
|
40
40
|
}
|
|
41
41
|
}
|