@aws-sdk/client-iotsecuretunneling 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-iotsecuretunneling
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-iotsecuretunneling
@@ -102,7 +102,7 @@ exports.deserializeAws_json1_1CloseTunnelCommand = deserializeAws_json1_1CloseTu
102
102
  const deserializeAws_json1_1CloseTunnelCommandError = async (output, context) => {
103
103
  const parsedOutput = {
104
104
  ...output,
105
- body: await parseBody(output.body, context),
105
+ body: await parseErrorBody(output.body, context),
106
106
  };
107
107
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
108
108
  switch (errorCode) {
@@ -136,7 +136,7 @@ exports.deserializeAws_json1_1DescribeTunnelCommand = deserializeAws_json1_1Desc
136
136
  const deserializeAws_json1_1DescribeTunnelCommandError = async (output, context) => {
137
137
  const parsedOutput = {
138
138
  ...output,
139
- body: await parseBody(output.body, context),
139
+ body: await parseErrorBody(output.body, context),
140
140
  };
141
141
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
142
142
  switch (errorCode) {
@@ -170,7 +170,7 @@ exports.deserializeAws_json1_1ListTagsForResourceCommand = deserializeAws_json1_
170
170
  const deserializeAws_json1_1ListTagsForResourceCommandError = async (output, context) => {
171
171
  const parsedOutput = {
172
172
  ...output,
173
- body: await parseBody(output.body, context),
173
+ body: await parseErrorBody(output.body, context),
174
174
  };
175
175
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
176
176
  switch (errorCode) {
@@ -204,7 +204,7 @@ exports.deserializeAws_json1_1ListTunnelsCommand = deserializeAws_json1_1ListTun
204
204
  const deserializeAws_json1_1ListTunnelsCommandError = async (output, context) => {
205
205
  const parsedOutput = {
206
206
  ...output,
207
- body: await parseBody(output.body, context),
207
+ body: await parseErrorBody(output.body, context),
208
208
  };
209
209
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
210
210
  const parsedBody = parsedOutput.body;
@@ -232,7 +232,7 @@ exports.deserializeAws_json1_1OpenTunnelCommand = deserializeAws_json1_1OpenTunn
232
232
  const deserializeAws_json1_1OpenTunnelCommandError = async (output, context) => {
233
233
  const parsedOutput = {
234
234
  ...output,
235
- body: await parseBody(output.body, context),
235
+ body: await parseErrorBody(output.body, context),
236
236
  };
237
237
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
238
238
  switch (errorCode) {
@@ -266,7 +266,7 @@ exports.deserializeAws_json1_1RotateTunnelAccessTokenCommand = deserializeAws_js
266
266
  const deserializeAws_json1_1RotateTunnelAccessTokenCommandError = async (output, context) => {
267
267
  const parsedOutput = {
268
268
  ...output,
269
- body: await parseBody(output.body, context),
269
+ body: await parseErrorBody(output.body, context),
270
270
  };
271
271
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
272
272
  switch (errorCode) {
@@ -300,7 +300,7 @@ exports.deserializeAws_json1_1TagResourceCommand = deserializeAws_json1_1TagReso
300
300
  const deserializeAws_json1_1TagResourceCommandError = async (output, context) => {
301
301
  const parsedOutput = {
302
302
  ...output,
303
- body: await parseBody(output.body, context),
303
+ body: await parseErrorBody(output.body, context),
304
304
  };
305
305
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
306
306
  switch (errorCode) {
@@ -334,7 +334,7 @@ exports.deserializeAws_json1_1UntagResourceCommand = deserializeAws_json1_1Untag
334
334
  const deserializeAws_json1_1UntagResourceCommandError = async (output, context) => {
335
335
  const parsedOutput = {
336
336
  ...output,
337
- body: await parseBody(output.body, context),
337
+ body: await parseErrorBody(output.body, context),
338
338
  };
339
339
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
340
340
  switch (errorCode) {
@@ -648,6 +648,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
648
648
  }
649
649
  return {};
650
650
  });
651
+ const parseErrorBody = async (errorBody, context) => {
652
+ var _a;
653
+ const value = await parseBody(errorBody, context);
654
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
655
+ return value;
656
+ };
651
657
  const loadRestJsonErrorCode = (output, data) => {
652
658
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
653
659
  const sanitizeErrorCode = (rawValue) => {
@@ -1,4 +1,3 @@
1
- import { __extends } from "tslib";
2
1
  import { CloseTunnelCommand } from "./commands/CloseTunnelCommand";
3
2
  import { DescribeTunnelCommand, } from "./commands/DescribeTunnelCommand";
4
3
  import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
@@ -8,123 +7,117 @@ import { RotateTunnelAccessTokenCommand, } from "./commands/RotateTunnelAccessTo
8
7
  import { TagResourceCommand } from "./commands/TagResourceCommand";
9
8
  import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
10
9
  import { IoTSecureTunnelingClient } from "./IoTSecureTunnelingClient";
11
- var IoTSecureTunneling = (function (_super) {
12
- __extends(IoTSecureTunneling, _super);
13
- function IoTSecureTunneling() {
14
- return _super !== null && _super.apply(this, arguments) || this;
15
- }
16
- IoTSecureTunneling.prototype.closeTunnel = function (args, optionsOrCb, cb) {
17
- var command = new CloseTunnelCommand(args);
10
+ export class IoTSecureTunneling extends IoTSecureTunnelingClient {
11
+ closeTunnel(args, optionsOrCb, cb) {
12
+ const command = new CloseTunnelCommand(args);
18
13
  if (typeof optionsOrCb === "function") {
19
14
  this.send(command, optionsOrCb);
20
15
  }
21
16
  else if (typeof cb === "function") {
22
17
  if (typeof optionsOrCb !== "object")
23
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
18
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
24
19
  this.send(command, optionsOrCb || {}, cb);
25
20
  }
26
21
  else {
27
22
  return this.send(command, optionsOrCb);
28
23
  }
29
- };
30
- IoTSecureTunneling.prototype.describeTunnel = function (args, optionsOrCb, cb) {
31
- var command = new DescribeTunnelCommand(args);
24
+ }
25
+ describeTunnel(args, optionsOrCb, cb) {
26
+ const command = new DescribeTunnelCommand(args);
32
27
  if (typeof optionsOrCb === "function") {
33
28
  this.send(command, optionsOrCb);
34
29
  }
35
30
  else if (typeof cb === "function") {
36
31
  if (typeof optionsOrCb !== "object")
37
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
32
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
38
33
  this.send(command, optionsOrCb || {}, cb);
39
34
  }
40
35
  else {
41
36
  return this.send(command, optionsOrCb);
42
37
  }
43
- };
44
- IoTSecureTunneling.prototype.listTagsForResource = function (args, optionsOrCb, cb) {
45
- var command = new ListTagsForResourceCommand(args);
38
+ }
39
+ listTagsForResource(args, optionsOrCb, cb) {
40
+ const command = new ListTagsForResourceCommand(args);
46
41
  if (typeof optionsOrCb === "function") {
47
42
  this.send(command, optionsOrCb);
48
43
  }
49
44
  else if (typeof cb === "function") {
50
45
  if (typeof optionsOrCb !== "object")
51
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
46
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
52
47
  this.send(command, optionsOrCb || {}, cb);
53
48
  }
54
49
  else {
55
50
  return this.send(command, optionsOrCb);
56
51
  }
57
- };
58
- IoTSecureTunneling.prototype.listTunnels = function (args, optionsOrCb, cb) {
59
- var command = new ListTunnelsCommand(args);
52
+ }
53
+ listTunnels(args, optionsOrCb, cb) {
54
+ const command = new ListTunnelsCommand(args);
60
55
  if (typeof optionsOrCb === "function") {
61
56
  this.send(command, optionsOrCb);
62
57
  }
63
58
  else if (typeof cb === "function") {
64
59
  if (typeof optionsOrCb !== "object")
65
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
60
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
66
61
  this.send(command, optionsOrCb || {}, cb);
67
62
  }
68
63
  else {
69
64
  return this.send(command, optionsOrCb);
70
65
  }
71
- };
72
- IoTSecureTunneling.prototype.openTunnel = function (args, optionsOrCb, cb) {
73
- var command = new OpenTunnelCommand(args);
66
+ }
67
+ openTunnel(args, optionsOrCb, cb) {
68
+ const command = new OpenTunnelCommand(args);
74
69
  if (typeof optionsOrCb === "function") {
75
70
  this.send(command, optionsOrCb);
76
71
  }
77
72
  else if (typeof cb === "function") {
78
73
  if (typeof optionsOrCb !== "object")
79
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
74
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
80
75
  this.send(command, optionsOrCb || {}, cb);
81
76
  }
82
77
  else {
83
78
  return this.send(command, optionsOrCb);
84
79
  }
85
- };
86
- IoTSecureTunneling.prototype.rotateTunnelAccessToken = function (args, optionsOrCb, cb) {
87
- var command = new RotateTunnelAccessTokenCommand(args);
80
+ }
81
+ rotateTunnelAccessToken(args, optionsOrCb, cb) {
82
+ const command = new RotateTunnelAccessTokenCommand(args);
88
83
  if (typeof optionsOrCb === "function") {
89
84
  this.send(command, optionsOrCb);
90
85
  }
91
86
  else if (typeof cb === "function") {
92
87
  if (typeof optionsOrCb !== "object")
93
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
88
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
94
89
  this.send(command, optionsOrCb || {}, cb);
95
90
  }
96
91
  else {
97
92
  return this.send(command, optionsOrCb);
98
93
  }
99
- };
100
- IoTSecureTunneling.prototype.tagResource = function (args, optionsOrCb, cb) {
101
- var command = new TagResourceCommand(args);
94
+ }
95
+ tagResource(args, optionsOrCb, cb) {
96
+ const command = new TagResourceCommand(args);
102
97
  if (typeof optionsOrCb === "function") {
103
98
  this.send(command, optionsOrCb);
104
99
  }
105
100
  else if (typeof cb === "function") {
106
101
  if (typeof optionsOrCb !== "object")
107
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
102
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
108
103
  this.send(command, optionsOrCb || {}, cb);
109
104
  }
110
105
  else {
111
106
  return this.send(command, optionsOrCb);
112
107
  }
113
- };
114
- IoTSecureTunneling.prototype.untagResource = function (args, optionsOrCb, cb) {
115
- var command = new UntagResourceCommand(args);
108
+ }
109
+ untagResource(args, optionsOrCb, cb) {
110
+ const command = new UntagResourceCommand(args);
116
111
  if (typeof optionsOrCb === "function") {
117
112
  this.send(command, optionsOrCb);
118
113
  }
119
114
  else if (typeof cb === "function") {
120
115
  if (typeof optionsOrCb !== "object")
121
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
116
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
122
117
  this.send(command, optionsOrCb || {}, cb);
123
118
  }
124
119
  else {
125
120
  return this.send(command, optionsOrCb);
126
121
  }
127
- };
128
- return IoTSecureTunneling;
129
- }(IoTSecureTunnelingClient));
130
- export { IoTSecureTunneling };
122
+ }
123
+ }
@@ -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 IoTSecureTunnelingClient = (function (_super) {
13
- __extends(IoTSecureTunnelingClient, _super);
14
- function IoTSecureTunnelingClient(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 IoTSecureTunnelingClient 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
- IoTSecureTunnelingClient.prototype.destroy = function () {
35
- _super.prototype.destroy.call(this);
36
- };
37
- return IoTSecureTunnelingClient;
38
- }(__Client));
39
- export { IoTSecureTunnelingClient };
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 { CloseTunnelRequestFilterSensitiveLog, CloseTunnelResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_json1_1CloseTunnelCommand, serializeAws_json1_1CloseTunnelCommand, } from "../protocols/Aws_json1_1";
6
- var CloseTunnelCommand = (function (_super) {
7
- __extends(CloseTunnelCommand, _super);
8
- function CloseTunnelCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class CloseTunnelCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- CloseTunnelCommand.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 = "IoTSecureTunnelingClient";
18
- var commandName = "CloseTunnelCommand";
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 = "IoTSecureTunnelingClient";
15
+ const commandName = "CloseTunnelCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: CloseTunnelRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: CloseTunnelResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- CloseTunnelCommand.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_json1_1CloseTunnelCommand(input, context);
33
- };
34
- CloseTunnelCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_json1_1CloseTunnelCommand(output, context);
36
- };
37
- return CloseTunnelCommand;
38
- }($Command));
39
- export { CloseTunnelCommand };
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 { DescribeTunnelRequestFilterSensitiveLog, DescribeTunnelResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_json1_1DescribeTunnelCommand, serializeAws_json1_1DescribeTunnelCommand, } from "../protocols/Aws_json1_1";
6
- var DescribeTunnelCommand = (function (_super) {
7
- __extends(DescribeTunnelCommand, _super);
8
- function DescribeTunnelCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class DescribeTunnelCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- DescribeTunnelCommand.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 = "IoTSecureTunnelingClient";
18
- var commandName = "DescribeTunnelCommand";
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 = "IoTSecureTunnelingClient";
15
+ const commandName = "DescribeTunnelCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: DescribeTunnelRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: DescribeTunnelResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- DescribeTunnelCommand.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_json1_1DescribeTunnelCommand(input, context);
33
- };
34
- DescribeTunnelCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_json1_1DescribeTunnelCommand(output, context);
36
- };
37
- return DescribeTunnelCommand;
38
- }($Command));
39
- export { DescribeTunnelCommand };
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 { ListTagsForResourceRequestFilterSensitiveLog, ListTagsForResourceResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_json1_1ListTagsForResourceCommand, serializeAws_json1_1ListTagsForResourceCommand, } from "../protocols/Aws_json1_1";
6
- var ListTagsForResourceCommand = (function (_super) {
7
- __extends(ListTagsForResourceCommand, _super);
8
- function ListTagsForResourceCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class ListTagsForResourceCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- ListTagsForResourceCommand.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 = "IoTSecureTunnelingClient";
18
- var commandName = "ListTagsForResourceCommand";
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 = "IoTSecureTunnelingClient";
15
+ const commandName = "ListTagsForResourceCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: ListTagsForResourceRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: ListTagsForResourceResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- ListTagsForResourceCommand.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_json1_1ListTagsForResourceCommand(input, context);
33
- };
34
- ListTagsForResourceCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_json1_1ListTagsForResourceCommand(output, context);
36
- };
37
- return ListTagsForResourceCommand;
38
- }($Command));
39
- export { ListTagsForResourceCommand };
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 { ListTunnelsRequestFilterSensitiveLog, ListTunnelsResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_json1_1ListTunnelsCommand, serializeAws_json1_1ListTunnelsCommand, } from "../protocols/Aws_json1_1";
6
- var ListTunnelsCommand = (function (_super) {
7
- __extends(ListTunnelsCommand, _super);
8
- function ListTunnelsCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class ListTunnelsCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- ListTunnelsCommand.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 = "IoTSecureTunnelingClient";
18
- var commandName = "ListTunnelsCommand";
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 = "IoTSecureTunnelingClient";
15
+ const commandName = "ListTunnelsCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: ListTunnelsRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: ListTunnelsResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- ListTunnelsCommand.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_json1_1ListTunnelsCommand(input, context);
33
- };
34
- ListTunnelsCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_json1_1ListTunnelsCommand(output, context);
36
- };
37
- return ListTunnelsCommand;
38
- }($Command));
39
- export { ListTunnelsCommand };
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 { OpenTunnelRequestFilterSensitiveLog, OpenTunnelResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_json1_1OpenTunnelCommand, serializeAws_json1_1OpenTunnelCommand, } from "../protocols/Aws_json1_1";
6
- var OpenTunnelCommand = (function (_super) {
7
- __extends(OpenTunnelCommand, _super);
8
- function OpenTunnelCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class OpenTunnelCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- OpenTunnelCommand.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 = "IoTSecureTunnelingClient";
18
- var commandName = "OpenTunnelCommand";
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 = "IoTSecureTunnelingClient";
15
+ const commandName = "OpenTunnelCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: OpenTunnelRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: OpenTunnelResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- OpenTunnelCommand.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_json1_1OpenTunnelCommand(input, context);
33
- };
34
- OpenTunnelCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_json1_1OpenTunnelCommand(output, context);
36
- };
37
- return OpenTunnelCommand;
38
- }($Command));
39
- export { OpenTunnelCommand };
31
+ }
32
+ }