@aws-sdk/client-iot-data-plane 3.180.0 → 3.183.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 CHANGED
@@ -3,6 +3,26 @@
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.183.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.182.0...v3.183.0) (2022-10-03)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/client-iot-data-plane
9
+
10
+
11
+
12
+
13
+
14
+ # [3.181.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.180.0...v3.181.0) (2022-09-29)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **clients:** make parseErrorBody async ([#3999](https://github.com/aws/aws-sdk-js-v3/issues/3999)) ([2558c93](https://github.com/aws/aws-sdk-js-v3/commit/2558c93c050357ac6dc47aa0452b15b12ebfd676))
20
+ * **clients:** populate message field when parsing errors ([#3995](https://github.com/aws/aws-sdk-js-v3/issues/3995)) ([02e47f1](https://github.com/aws/aws-sdk-js-v3/commit/02e47f14397ae0a5d2e2883350d038b307fdcdb4))
21
+
22
+
23
+
24
+
25
+
6
26
  # [3.180.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.179.0...v3.180.0) (2022-09-27)
7
27
 
8
28
  **Note:** Version bump only for package @aws-sdk/client-iot-data-plane
@@ -176,7 +176,7 @@ exports.deserializeAws_restJson1DeleteThingShadowCommand = deserializeAws_restJs
176
176
  const deserializeAws_restJson1DeleteThingShadowCommandError = async (output, context) => {
177
177
  const parsedOutput = {
178
178
  ...output,
179
- body: await parseBody(output.body, context),
179
+ body: await parseErrorBody(output.body, context),
180
180
  };
181
181
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
182
182
  switch (errorCode) {
@@ -240,7 +240,7 @@ exports.deserializeAws_restJson1GetRetainedMessageCommand = deserializeAws_restJ
240
240
  const deserializeAws_restJson1GetRetainedMessageCommandError = async (output, context) => {
241
241
  const parsedOutput = {
242
242
  ...output,
243
- body: await parseBody(output.body, context),
243
+ body: await parseErrorBody(output.body, context),
244
244
  };
245
245
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
246
246
  switch (errorCode) {
@@ -290,7 +290,7 @@ exports.deserializeAws_restJson1GetThingShadowCommand = deserializeAws_restJson1
290
290
  const deserializeAws_restJson1GetThingShadowCommandError = async (output, context) => {
291
291
  const parsedOutput = {
292
292
  ...output,
293
- body: await parseBody(output.body, context),
293
+ body: await parseErrorBody(output.body, context),
294
294
  };
295
295
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
296
296
  switch (errorCode) {
@@ -351,7 +351,7 @@ exports.deserializeAws_restJson1ListNamedShadowsForThingCommand = deserializeAws
351
351
  const deserializeAws_restJson1ListNamedShadowsForThingCommandError = async (output, context) => {
352
352
  const parsedOutput = {
353
353
  ...output,
354
- body: await parseBody(output.body, context),
354
+ body: await parseErrorBody(output.body, context),
355
355
  };
356
356
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
357
357
  switch (errorCode) {
@@ -406,7 +406,7 @@ exports.deserializeAws_restJson1ListRetainedMessagesCommand = deserializeAws_res
406
406
  const deserializeAws_restJson1ListRetainedMessagesCommandError = async (output, context) => {
407
407
  const parsedOutput = {
408
408
  ...output,
409
- body: await parseBody(output.body, context),
409
+ body: await parseErrorBody(output.body, context),
410
410
  };
411
411
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
412
412
  switch (errorCode) {
@@ -452,7 +452,7 @@ exports.deserializeAws_restJson1PublishCommand = deserializeAws_restJson1Publish
452
452
  const deserializeAws_restJson1PublishCommandError = async (output, context) => {
453
453
  const parsedOutput = {
454
454
  ...output,
455
- body: await parseBody(output.body, context),
455
+ body: await parseErrorBody(output.body, context),
456
456
  };
457
457
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
458
458
  switch (errorCode) {
@@ -493,7 +493,7 @@ exports.deserializeAws_restJson1UpdateThingShadowCommand = deserializeAws_restJs
493
493
  const deserializeAws_restJson1UpdateThingShadowCommandError = async (output, context) => {
494
494
  const parsedOutput = {
495
495
  ...output,
496
- body: await parseBody(output.body, context),
496
+ body: await parseErrorBody(output.body, context),
497
497
  };
498
498
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
499
499
  switch (errorCode) {
@@ -712,6 +712,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
712
712
  }
713
713
  return {};
714
714
  });
715
+ const parseErrorBody = async (errorBody, context) => {
716
+ var _a;
717
+ const value = await parseBody(errorBody, context);
718
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
719
+ return value;
720
+ };
715
721
  const loadRestJsonErrorCode = (output, data) => {
716
722
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
717
723
  const sanitizeErrorCode = (rawValue) => {
@@ -1,4 +1,3 @@
1
- import { __extends } from "tslib";
2
1
  import { DeleteThingShadowCommand, } from "./commands/DeleteThingShadowCommand";
3
2
  import { GetRetainedMessageCommand, } from "./commands/GetRetainedMessageCommand";
4
3
  import { GetThingShadowCommand, } from "./commands/GetThingShadowCommand";
@@ -7,109 +6,103 @@ import { ListRetainedMessagesCommand, } from "./commands/ListRetainedMessagesCom
7
6
  import { PublishCommand } from "./commands/PublishCommand";
8
7
  import { UpdateThingShadowCommand, } from "./commands/UpdateThingShadowCommand";
9
8
  import { IoTDataPlaneClient } from "./IoTDataPlaneClient";
10
- var IoTDataPlane = (function (_super) {
11
- __extends(IoTDataPlane, _super);
12
- function IoTDataPlane() {
13
- return _super !== null && _super.apply(this, arguments) || this;
14
- }
15
- IoTDataPlane.prototype.deleteThingShadow = function (args, optionsOrCb, cb) {
16
- var command = new DeleteThingShadowCommand(args);
9
+ export class IoTDataPlane extends IoTDataPlaneClient {
10
+ deleteThingShadow(args, optionsOrCb, cb) {
11
+ const command = new DeleteThingShadowCommand(args);
17
12
  if (typeof optionsOrCb === "function") {
18
13
  this.send(command, optionsOrCb);
19
14
  }
20
15
  else if (typeof cb === "function") {
21
16
  if (typeof optionsOrCb !== "object")
22
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
17
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
23
18
  this.send(command, optionsOrCb || {}, cb);
24
19
  }
25
20
  else {
26
21
  return this.send(command, optionsOrCb);
27
22
  }
28
- };
29
- IoTDataPlane.prototype.getRetainedMessage = function (args, optionsOrCb, cb) {
30
- var command = new GetRetainedMessageCommand(args);
23
+ }
24
+ getRetainedMessage(args, optionsOrCb, cb) {
25
+ const command = new GetRetainedMessageCommand(args);
31
26
  if (typeof optionsOrCb === "function") {
32
27
  this.send(command, optionsOrCb);
33
28
  }
34
29
  else if (typeof cb === "function") {
35
30
  if (typeof optionsOrCb !== "object")
36
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
31
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
37
32
  this.send(command, optionsOrCb || {}, cb);
38
33
  }
39
34
  else {
40
35
  return this.send(command, optionsOrCb);
41
36
  }
42
- };
43
- IoTDataPlane.prototype.getThingShadow = function (args, optionsOrCb, cb) {
44
- var command = new GetThingShadowCommand(args);
37
+ }
38
+ getThingShadow(args, optionsOrCb, cb) {
39
+ const command = new GetThingShadowCommand(args);
45
40
  if (typeof optionsOrCb === "function") {
46
41
  this.send(command, optionsOrCb);
47
42
  }
48
43
  else if (typeof cb === "function") {
49
44
  if (typeof optionsOrCb !== "object")
50
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
45
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
51
46
  this.send(command, optionsOrCb || {}, cb);
52
47
  }
53
48
  else {
54
49
  return this.send(command, optionsOrCb);
55
50
  }
56
- };
57
- IoTDataPlane.prototype.listNamedShadowsForThing = function (args, optionsOrCb, cb) {
58
- var command = new ListNamedShadowsForThingCommand(args);
51
+ }
52
+ listNamedShadowsForThing(args, optionsOrCb, cb) {
53
+ const command = new ListNamedShadowsForThingCommand(args);
59
54
  if (typeof optionsOrCb === "function") {
60
55
  this.send(command, optionsOrCb);
61
56
  }
62
57
  else if (typeof cb === "function") {
63
58
  if (typeof optionsOrCb !== "object")
64
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
59
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
65
60
  this.send(command, optionsOrCb || {}, cb);
66
61
  }
67
62
  else {
68
63
  return this.send(command, optionsOrCb);
69
64
  }
70
- };
71
- IoTDataPlane.prototype.listRetainedMessages = function (args, optionsOrCb, cb) {
72
- var command = new ListRetainedMessagesCommand(args);
65
+ }
66
+ listRetainedMessages(args, optionsOrCb, cb) {
67
+ const command = new ListRetainedMessagesCommand(args);
73
68
  if (typeof optionsOrCb === "function") {
74
69
  this.send(command, optionsOrCb);
75
70
  }
76
71
  else if (typeof cb === "function") {
77
72
  if (typeof optionsOrCb !== "object")
78
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
73
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
79
74
  this.send(command, optionsOrCb || {}, cb);
80
75
  }
81
76
  else {
82
77
  return this.send(command, optionsOrCb);
83
78
  }
84
- };
85
- IoTDataPlane.prototype.publish = function (args, optionsOrCb, cb) {
86
- var command = new PublishCommand(args);
79
+ }
80
+ publish(args, optionsOrCb, cb) {
81
+ const command = new PublishCommand(args);
87
82
  if (typeof optionsOrCb === "function") {
88
83
  this.send(command, optionsOrCb);
89
84
  }
90
85
  else if (typeof cb === "function") {
91
86
  if (typeof optionsOrCb !== "object")
92
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
87
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
93
88
  this.send(command, optionsOrCb || {}, cb);
94
89
  }
95
90
  else {
96
91
  return this.send(command, optionsOrCb);
97
92
  }
98
- };
99
- IoTDataPlane.prototype.updateThingShadow = function (args, optionsOrCb, cb) {
100
- var command = new UpdateThingShadowCommand(args);
93
+ }
94
+ updateThingShadow(args, optionsOrCb, cb) {
95
+ const command = new UpdateThingShadowCommand(args);
101
96
  if (typeof optionsOrCb === "function") {
102
97
  this.send(command, optionsOrCb);
103
98
  }
104
99
  else if (typeof cb === "function") {
105
100
  if (typeof optionsOrCb !== "object")
106
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
101
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
107
102
  this.send(command, optionsOrCb || {}, cb);
108
103
  }
109
104
  else {
110
105
  return this.send(command, optionsOrCb);
111
106
  }
112
- };
113
- return IoTDataPlane;
114
- }(IoTDataPlaneClient));
115
- export { IoTDataPlane };
107
+ }
108
+ }
@@ -1,4 +1,3 @@
1
- import { __extends } from "tslib";
2
1
  import { resolveEndpointsConfig, resolveRegionConfig, } from "@aws-sdk/config-resolver";
3
2
  import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
4
3
  import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
@@ -9,31 +8,26 @@ import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-sig
9
8
  import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
10
9
  import { Client as __Client, } from "@aws-sdk/smithy-client";
11
10
  import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
12
- var IoTDataPlaneClient = (function (_super) {
13
- __extends(IoTDataPlaneClient, _super);
14
- function IoTDataPlaneClient(configuration) {
15
- var _this = this;
16
- var _config_0 = __getRuntimeConfig(configuration);
17
- var _config_1 = resolveRegionConfig(_config_0);
18
- var _config_2 = resolveEndpointsConfig(_config_1);
19
- var _config_3 = resolveRetryConfig(_config_2);
20
- var _config_4 = resolveHostHeaderConfig(_config_3);
21
- var _config_5 = resolveAwsAuthConfig(_config_4);
22
- var _config_6 = resolveUserAgentConfig(_config_5);
23
- _this = _super.call(this, _config_6) || this;
24
- _this.config = _config_6;
25
- _this.middlewareStack.use(getRetryPlugin(_this.config));
26
- _this.middlewareStack.use(getContentLengthPlugin(_this.config));
27
- _this.middlewareStack.use(getHostHeaderPlugin(_this.config));
28
- _this.middlewareStack.use(getLoggerPlugin(_this.config));
29
- _this.middlewareStack.use(getRecursionDetectionPlugin(_this.config));
30
- _this.middlewareStack.use(getAwsAuthPlugin(_this.config));
31
- _this.middlewareStack.use(getUserAgentPlugin(_this.config));
32
- return _this;
11
+ export class IoTDataPlaneClient extends __Client {
12
+ constructor(configuration) {
13
+ const _config_0 = __getRuntimeConfig(configuration);
14
+ const _config_1 = resolveRegionConfig(_config_0);
15
+ const _config_2 = resolveEndpointsConfig(_config_1);
16
+ const _config_3 = resolveRetryConfig(_config_2);
17
+ const _config_4 = resolveHostHeaderConfig(_config_3);
18
+ const _config_5 = resolveAwsAuthConfig(_config_4);
19
+ const _config_6 = resolveUserAgentConfig(_config_5);
20
+ super(_config_6);
21
+ this.config = _config_6;
22
+ this.middlewareStack.use(getRetryPlugin(this.config));
23
+ this.middlewareStack.use(getContentLengthPlugin(this.config));
24
+ this.middlewareStack.use(getHostHeaderPlugin(this.config));
25
+ this.middlewareStack.use(getLoggerPlugin(this.config));
26
+ this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
27
+ this.middlewareStack.use(getAwsAuthPlugin(this.config));
28
+ this.middlewareStack.use(getUserAgentPlugin(this.config));
33
29
  }
34
- IoTDataPlaneClient.prototype.destroy = function () {
35
- _super.prototype.destroy.call(this);
36
- };
37
- return IoTDataPlaneClient;
38
- }(__Client));
39
- export { IoTDataPlaneClient };
30
+ destroy() {
31
+ super.destroy();
32
+ }
33
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { DeleteThingShadowRequestFilterSensitiveLog, DeleteThingShadowResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1DeleteThingShadowCommand, serializeAws_restJson1DeleteThingShadowCommand, } from "../protocols/Aws_restJson1";
6
- var DeleteThingShadowCommand = (function (_super) {
7
- __extends(DeleteThingShadowCommand, _super);
8
- function DeleteThingShadowCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class DeleteThingShadowCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- DeleteThingShadowCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "IoTDataPlaneClient";
18
- var commandName = "DeleteThingShadowCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "IoTDataPlaneClient";
15
+ const commandName = "DeleteThingShadowCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: DeleteThingShadowRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: DeleteThingShadowResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- DeleteThingShadowCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_restJson1DeleteThingShadowCommand(input, context);
33
- };
34
- DeleteThingShadowCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1DeleteThingShadowCommand(output, context);
36
- };
37
- return DeleteThingShadowCommand;
38
- }($Command));
39
- export { DeleteThingShadowCommand };
31
+ }
32
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { GetRetainedMessageRequestFilterSensitiveLog, GetRetainedMessageResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1GetRetainedMessageCommand, serializeAws_restJson1GetRetainedMessageCommand, } from "../protocols/Aws_restJson1";
6
- var GetRetainedMessageCommand = (function (_super) {
7
- __extends(GetRetainedMessageCommand, _super);
8
- function GetRetainedMessageCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class GetRetainedMessageCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- GetRetainedMessageCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "IoTDataPlaneClient";
18
- var commandName = "GetRetainedMessageCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "IoTDataPlaneClient";
15
+ const commandName = "GetRetainedMessageCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: GetRetainedMessageRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: GetRetainedMessageResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- GetRetainedMessageCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_restJson1GetRetainedMessageCommand(input, context);
33
- };
34
- GetRetainedMessageCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1GetRetainedMessageCommand(output, context);
36
- };
37
- return GetRetainedMessageCommand;
38
- }($Command));
39
- export { GetRetainedMessageCommand };
31
+ }
32
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { GetThingShadowRequestFilterSensitiveLog, GetThingShadowResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1GetThingShadowCommand, serializeAws_restJson1GetThingShadowCommand, } from "../protocols/Aws_restJson1";
6
- var GetThingShadowCommand = (function (_super) {
7
- __extends(GetThingShadowCommand, _super);
8
- function GetThingShadowCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class GetThingShadowCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- GetThingShadowCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "IoTDataPlaneClient";
18
- var commandName = "GetThingShadowCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "IoTDataPlaneClient";
15
+ const commandName = "GetThingShadowCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: GetThingShadowRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: GetThingShadowResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- GetThingShadowCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_restJson1GetThingShadowCommand(input, context);
33
- };
34
- GetThingShadowCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1GetThingShadowCommand(output, context);
36
- };
37
- return GetThingShadowCommand;
38
- }($Command));
39
- export { GetThingShadowCommand };
31
+ }
32
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { ListNamedShadowsForThingRequestFilterSensitiveLog, ListNamedShadowsForThingResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1ListNamedShadowsForThingCommand, serializeAws_restJson1ListNamedShadowsForThingCommand, } from "../protocols/Aws_restJson1";
6
- var ListNamedShadowsForThingCommand = (function (_super) {
7
- __extends(ListNamedShadowsForThingCommand, _super);
8
- function ListNamedShadowsForThingCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class ListNamedShadowsForThingCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- ListNamedShadowsForThingCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "IoTDataPlaneClient";
18
- var commandName = "ListNamedShadowsForThingCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "IoTDataPlaneClient";
15
+ const commandName = "ListNamedShadowsForThingCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: ListNamedShadowsForThingRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: ListNamedShadowsForThingResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- ListNamedShadowsForThingCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_restJson1ListNamedShadowsForThingCommand(input, context);
33
- };
34
- ListNamedShadowsForThingCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1ListNamedShadowsForThingCommand(output, context);
36
- };
37
- return ListNamedShadowsForThingCommand;
38
- }($Command));
39
- export { ListNamedShadowsForThingCommand };
31
+ }
32
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { ListRetainedMessagesRequestFilterSensitiveLog, ListRetainedMessagesResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1ListRetainedMessagesCommand, serializeAws_restJson1ListRetainedMessagesCommand, } from "../protocols/Aws_restJson1";
6
- var ListRetainedMessagesCommand = (function (_super) {
7
- __extends(ListRetainedMessagesCommand, _super);
8
- function ListRetainedMessagesCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class ListRetainedMessagesCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- ListRetainedMessagesCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "IoTDataPlaneClient";
18
- var commandName = "ListRetainedMessagesCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "IoTDataPlaneClient";
15
+ const commandName = "ListRetainedMessagesCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: ListRetainedMessagesRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: ListRetainedMessagesResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- ListRetainedMessagesCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_restJson1ListRetainedMessagesCommand(input, context);
33
- };
34
- ListRetainedMessagesCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1ListRetainedMessagesCommand(output, context);
36
- };
37
- return ListRetainedMessagesCommand;
38
- }($Command));
39
- export { ListRetainedMessagesCommand };
31
+ }
32
+ }