@aws-sdk/client-iotdeviceadvisor 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.
Files changed (29) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist-cjs/protocols/Aws_restJson1.js +20 -14
  3. package/dist-es/IotDeviceAdvisor.js +58 -65
  4. package/dist-es/IotDeviceAdvisorClient.js +22 -28
  5. package/dist-es/commands/CreateSuiteDefinitionCommand.js +21 -28
  6. package/dist-es/commands/DeleteSuiteDefinitionCommand.js +21 -28
  7. package/dist-es/commands/GetEndpointCommand.js +21 -28
  8. package/dist-es/commands/GetSuiteDefinitionCommand.js +21 -28
  9. package/dist-es/commands/GetSuiteRunCommand.js +21 -28
  10. package/dist-es/commands/GetSuiteRunReportCommand.js +21 -28
  11. package/dist-es/commands/ListSuiteDefinitionsCommand.js +21 -28
  12. package/dist-es/commands/ListSuiteRunsCommand.js +21 -28
  13. package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
  14. package/dist-es/commands/StartSuiteRunCommand.js +21 -28
  15. package/dist-es/commands/StopSuiteRunCommand.js +21 -28
  16. package/dist-es/commands/TagResourceCommand.js +21 -28
  17. package/dist-es/commands/UntagResourceCommand.js +21 -28
  18. package/dist-es/commands/UpdateSuiteDefinitionCommand.js +21 -28
  19. package/dist-es/endpoints.js +8 -8
  20. package/dist-es/models/IotDeviceAdvisorServiceException.js +5 -10
  21. package/dist-es/models/models_0.js +155 -82
  22. package/dist-es/pagination/ListSuiteDefinitionsPaginator.js +25 -68
  23. package/dist-es/pagination/ListSuiteRunsPaginator.js +25 -68
  24. package/dist-es/protocols/Aws_restJson1.js +1003 -1402
  25. package/dist-es/runtimeConfig.browser.js +26 -12
  26. package/dist-es/runtimeConfig.js +30 -12
  27. package/dist-es/runtimeConfig.native.js +8 -5
  28. package/dist-es/runtimeConfig.shared.js +8 -11
  29. package/package.json +33 -33
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-iotdeviceadvisor
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-iotdeviceadvisor
@@ -326,7 +326,7 @@ exports.deserializeAws_restJson1CreateSuiteDefinitionCommand = deserializeAws_re
326
326
  const deserializeAws_restJson1CreateSuiteDefinitionCommandError = async (output, context) => {
327
327
  const parsedOutput = {
328
328
  ...output,
329
- body: await parseBody(output.body, context),
329
+ body: await parseErrorBody(output.body, context),
330
330
  };
331
331
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
332
332
  switch (errorCode) {
@@ -360,7 +360,7 @@ exports.deserializeAws_restJson1DeleteSuiteDefinitionCommand = deserializeAws_re
360
360
  const deserializeAws_restJson1DeleteSuiteDefinitionCommandError = async (output, context) => {
361
361
  const parsedOutput = {
362
362
  ...output,
363
- body: await parseBody(output.body, context),
363
+ body: await parseErrorBody(output.body, context),
364
364
  };
365
365
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
366
366
  switch (errorCode) {
@@ -397,7 +397,7 @@ exports.deserializeAws_restJson1GetEndpointCommand = deserializeAws_restJson1Get
397
397
  const deserializeAws_restJson1GetEndpointCommandError = async (output, context) => {
398
398
  const parsedOutput = {
399
399
  ...output,
400
- body: await parseBody(output.body, context),
400
+ body: await parseErrorBody(output.body, context),
401
401
  };
402
402
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
403
403
  switch (errorCode) {
@@ -458,7 +458,7 @@ exports.deserializeAws_restJson1GetSuiteDefinitionCommand = deserializeAws_restJ
458
458
  const deserializeAws_restJson1GetSuiteDefinitionCommandError = async (output, context) => {
459
459
  const parsedOutput = {
460
460
  ...output,
461
- body: await parseBody(output.body, context),
461
+ body: await parseErrorBody(output.body, context),
462
462
  };
463
463
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
464
464
  switch (errorCode) {
@@ -528,7 +528,7 @@ exports.deserializeAws_restJson1GetSuiteRunCommand = deserializeAws_restJson1Get
528
528
  const deserializeAws_restJson1GetSuiteRunCommandError = async (output, context) => {
529
529
  const parsedOutput = {
530
530
  ...output,
531
- body: await parseBody(output.body, context),
531
+ body: await parseErrorBody(output.body, context),
532
532
  };
533
533
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
534
534
  switch (errorCode) {
@@ -568,7 +568,7 @@ exports.deserializeAws_restJson1GetSuiteRunReportCommand = deserializeAws_restJs
568
568
  const deserializeAws_restJson1GetSuiteRunReportCommandError = async (output, context) => {
569
569
  const parsedOutput = {
570
570
  ...output,
571
- body: await parseBody(output.body, context),
571
+ body: await parseErrorBody(output.body, context),
572
572
  };
573
573
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
574
574
  switch (errorCode) {
@@ -611,7 +611,7 @@ exports.deserializeAws_restJson1ListSuiteDefinitionsCommand = deserializeAws_res
611
611
  const deserializeAws_restJson1ListSuiteDefinitionsCommandError = async (output, context) => {
612
612
  const parsedOutput = {
613
613
  ...output,
614
- body: await parseBody(output.body, context),
614
+ body: await parseErrorBody(output.body, context),
615
615
  };
616
616
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
617
617
  switch (errorCode) {
@@ -651,7 +651,7 @@ exports.deserializeAws_restJson1ListSuiteRunsCommand = deserializeAws_restJson1L
651
651
  const deserializeAws_restJson1ListSuiteRunsCommandError = async (output, context) => {
652
652
  const parsedOutput = {
653
653
  ...output,
654
- body: await parseBody(output.body, context),
654
+ body: await parseErrorBody(output.body, context),
655
655
  };
656
656
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
657
657
  switch (errorCode) {
@@ -688,7 +688,7 @@ exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_rest
688
688
  const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
689
689
  const parsedOutput = {
690
690
  ...output,
691
- body: await parseBody(output.body, context),
691
+ body: await parseErrorBody(output.body, context),
692
692
  };
693
693
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
694
694
  switch (errorCode) {
@@ -734,7 +734,7 @@ exports.deserializeAws_restJson1StartSuiteRunCommand = deserializeAws_restJson1S
734
734
  const deserializeAws_restJson1StartSuiteRunCommandError = async (output, context) => {
735
735
  const parsedOutput = {
736
736
  ...output,
737
- body: await parseBody(output.body, context),
737
+ body: await parseErrorBody(output.body, context),
738
738
  };
739
739
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
740
740
  switch (errorCode) {
@@ -771,7 +771,7 @@ exports.deserializeAws_restJson1StopSuiteRunCommand = deserializeAws_restJson1St
771
771
  const deserializeAws_restJson1StopSuiteRunCommandError = async (output, context) => {
772
772
  const parsedOutput = {
773
773
  ...output,
774
- body: await parseBody(output.body, context),
774
+ body: await parseErrorBody(output.body, context),
775
775
  };
776
776
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
777
777
  switch (errorCode) {
@@ -808,7 +808,7 @@ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1Tag
808
808
  const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
809
809
  const parsedOutput = {
810
810
  ...output,
811
- body: await parseBody(output.body, context),
811
+ body: await parseErrorBody(output.body, context),
812
812
  };
813
813
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
814
814
  switch (errorCode) {
@@ -845,7 +845,7 @@ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1U
845
845
  const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
846
846
  const parsedOutput = {
847
847
  ...output,
848
- body: await parseBody(output.body, context),
848
+ body: await parseErrorBody(output.body, context),
849
849
  };
850
850
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
851
851
  switch (errorCode) {
@@ -900,7 +900,7 @@ exports.deserializeAws_restJson1UpdateSuiteDefinitionCommand = deserializeAws_re
900
900
  const deserializeAws_restJson1UpdateSuiteDefinitionCommandError = async (output, context) => {
901
901
  const parsedOutput = {
902
902
  ...output,
903
- body: await parseBody(output.body, context),
903
+ body: await parseErrorBody(output.body, context),
904
904
  };
905
905
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
906
906
  switch (errorCode) {
@@ -1227,6 +1227,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
1227
1227
  }
1228
1228
  return {};
1229
1229
  });
1230
+ const parseErrorBody = async (errorBody, context) => {
1231
+ var _a;
1232
+ const value = await parseBody(errorBody, context);
1233
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
1234
+ return value;
1235
+ };
1230
1236
  const loadRestJsonErrorCode = (output, data) => {
1231
1237
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1232
1238
  const sanitizeErrorCode = (rawValue) => {
@@ -1,4 +1,3 @@
1
- import { __extends } from "tslib";
2
1
  import { CreateSuiteDefinitionCommand, } from "./commands/CreateSuiteDefinitionCommand";
3
2
  import { DeleteSuiteDefinitionCommand, } from "./commands/DeleteSuiteDefinitionCommand";
4
3
  import { GetEndpointCommand } from "./commands/GetEndpointCommand";
@@ -14,207 +13,201 @@ import { TagResourceCommand } from "./commands/TagResourceCommand";
14
13
  import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
15
14
  import { UpdateSuiteDefinitionCommand, } from "./commands/UpdateSuiteDefinitionCommand";
16
15
  import { IotDeviceAdvisorClient } from "./IotDeviceAdvisorClient";
17
- var IotDeviceAdvisor = (function (_super) {
18
- __extends(IotDeviceAdvisor, _super);
19
- function IotDeviceAdvisor() {
20
- return _super !== null && _super.apply(this, arguments) || this;
21
- }
22
- IotDeviceAdvisor.prototype.createSuiteDefinition = function (args, optionsOrCb, cb) {
23
- var command = new CreateSuiteDefinitionCommand(args);
16
+ export class IotDeviceAdvisor extends IotDeviceAdvisorClient {
17
+ createSuiteDefinition(args, optionsOrCb, cb) {
18
+ const command = new CreateSuiteDefinitionCommand(args);
24
19
  if (typeof optionsOrCb === "function") {
25
20
  this.send(command, optionsOrCb);
26
21
  }
27
22
  else if (typeof cb === "function") {
28
23
  if (typeof optionsOrCb !== "object")
29
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
24
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
30
25
  this.send(command, optionsOrCb || {}, cb);
31
26
  }
32
27
  else {
33
28
  return this.send(command, optionsOrCb);
34
29
  }
35
- };
36
- IotDeviceAdvisor.prototype.deleteSuiteDefinition = function (args, optionsOrCb, cb) {
37
- var command = new DeleteSuiteDefinitionCommand(args);
30
+ }
31
+ deleteSuiteDefinition(args, optionsOrCb, cb) {
32
+ const command = new DeleteSuiteDefinitionCommand(args);
38
33
  if (typeof optionsOrCb === "function") {
39
34
  this.send(command, optionsOrCb);
40
35
  }
41
36
  else if (typeof cb === "function") {
42
37
  if (typeof optionsOrCb !== "object")
43
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
38
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
44
39
  this.send(command, optionsOrCb || {}, cb);
45
40
  }
46
41
  else {
47
42
  return this.send(command, optionsOrCb);
48
43
  }
49
- };
50
- IotDeviceAdvisor.prototype.getEndpoint = function (args, optionsOrCb, cb) {
51
- var command = new GetEndpointCommand(args);
44
+ }
45
+ getEndpoint(args, optionsOrCb, cb) {
46
+ const command = new GetEndpointCommand(args);
52
47
  if (typeof optionsOrCb === "function") {
53
48
  this.send(command, optionsOrCb);
54
49
  }
55
50
  else if (typeof cb === "function") {
56
51
  if (typeof optionsOrCb !== "object")
57
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
52
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
58
53
  this.send(command, optionsOrCb || {}, cb);
59
54
  }
60
55
  else {
61
56
  return this.send(command, optionsOrCb);
62
57
  }
63
- };
64
- IotDeviceAdvisor.prototype.getSuiteDefinition = function (args, optionsOrCb, cb) {
65
- var command = new GetSuiteDefinitionCommand(args);
58
+ }
59
+ getSuiteDefinition(args, optionsOrCb, cb) {
60
+ const command = new GetSuiteDefinitionCommand(args);
66
61
  if (typeof optionsOrCb === "function") {
67
62
  this.send(command, optionsOrCb);
68
63
  }
69
64
  else if (typeof cb === "function") {
70
65
  if (typeof optionsOrCb !== "object")
71
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
66
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
72
67
  this.send(command, optionsOrCb || {}, cb);
73
68
  }
74
69
  else {
75
70
  return this.send(command, optionsOrCb);
76
71
  }
77
- };
78
- IotDeviceAdvisor.prototype.getSuiteRun = function (args, optionsOrCb, cb) {
79
- var command = new GetSuiteRunCommand(args);
72
+ }
73
+ getSuiteRun(args, optionsOrCb, cb) {
74
+ const command = new GetSuiteRunCommand(args);
80
75
  if (typeof optionsOrCb === "function") {
81
76
  this.send(command, optionsOrCb);
82
77
  }
83
78
  else if (typeof cb === "function") {
84
79
  if (typeof optionsOrCb !== "object")
85
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
80
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
86
81
  this.send(command, optionsOrCb || {}, cb);
87
82
  }
88
83
  else {
89
84
  return this.send(command, optionsOrCb);
90
85
  }
91
- };
92
- IotDeviceAdvisor.prototype.getSuiteRunReport = function (args, optionsOrCb, cb) {
93
- var command = new GetSuiteRunReportCommand(args);
86
+ }
87
+ getSuiteRunReport(args, optionsOrCb, cb) {
88
+ const command = new GetSuiteRunReportCommand(args);
94
89
  if (typeof optionsOrCb === "function") {
95
90
  this.send(command, optionsOrCb);
96
91
  }
97
92
  else if (typeof cb === "function") {
98
93
  if (typeof optionsOrCb !== "object")
99
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
94
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
100
95
  this.send(command, optionsOrCb || {}, cb);
101
96
  }
102
97
  else {
103
98
  return this.send(command, optionsOrCb);
104
99
  }
105
- };
106
- IotDeviceAdvisor.prototype.listSuiteDefinitions = function (args, optionsOrCb, cb) {
107
- var command = new ListSuiteDefinitionsCommand(args);
100
+ }
101
+ listSuiteDefinitions(args, optionsOrCb, cb) {
102
+ const command = new ListSuiteDefinitionsCommand(args);
108
103
  if (typeof optionsOrCb === "function") {
109
104
  this.send(command, optionsOrCb);
110
105
  }
111
106
  else if (typeof cb === "function") {
112
107
  if (typeof optionsOrCb !== "object")
113
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
108
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
114
109
  this.send(command, optionsOrCb || {}, cb);
115
110
  }
116
111
  else {
117
112
  return this.send(command, optionsOrCb);
118
113
  }
119
- };
120
- IotDeviceAdvisor.prototype.listSuiteRuns = function (args, optionsOrCb, cb) {
121
- var command = new ListSuiteRunsCommand(args);
114
+ }
115
+ listSuiteRuns(args, optionsOrCb, cb) {
116
+ const command = new ListSuiteRunsCommand(args);
122
117
  if (typeof optionsOrCb === "function") {
123
118
  this.send(command, optionsOrCb);
124
119
  }
125
120
  else if (typeof cb === "function") {
126
121
  if (typeof optionsOrCb !== "object")
127
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
122
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
128
123
  this.send(command, optionsOrCb || {}, cb);
129
124
  }
130
125
  else {
131
126
  return this.send(command, optionsOrCb);
132
127
  }
133
- };
134
- IotDeviceAdvisor.prototype.listTagsForResource = function (args, optionsOrCb, cb) {
135
- var command = new ListTagsForResourceCommand(args);
128
+ }
129
+ listTagsForResource(args, optionsOrCb, cb) {
130
+ const command = new ListTagsForResourceCommand(args);
136
131
  if (typeof optionsOrCb === "function") {
137
132
  this.send(command, optionsOrCb);
138
133
  }
139
134
  else if (typeof cb === "function") {
140
135
  if (typeof optionsOrCb !== "object")
141
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
136
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
142
137
  this.send(command, optionsOrCb || {}, cb);
143
138
  }
144
139
  else {
145
140
  return this.send(command, optionsOrCb);
146
141
  }
147
- };
148
- IotDeviceAdvisor.prototype.startSuiteRun = function (args, optionsOrCb, cb) {
149
- var command = new StartSuiteRunCommand(args);
142
+ }
143
+ startSuiteRun(args, optionsOrCb, cb) {
144
+ const command = new StartSuiteRunCommand(args);
150
145
  if (typeof optionsOrCb === "function") {
151
146
  this.send(command, optionsOrCb);
152
147
  }
153
148
  else if (typeof cb === "function") {
154
149
  if (typeof optionsOrCb !== "object")
155
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
150
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
156
151
  this.send(command, optionsOrCb || {}, cb);
157
152
  }
158
153
  else {
159
154
  return this.send(command, optionsOrCb);
160
155
  }
161
- };
162
- IotDeviceAdvisor.prototype.stopSuiteRun = function (args, optionsOrCb, cb) {
163
- var command = new StopSuiteRunCommand(args);
156
+ }
157
+ stopSuiteRun(args, optionsOrCb, cb) {
158
+ const command = new StopSuiteRunCommand(args);
164
159
  if (typeof optionsOrCb === "function") {
165
160
  this.send(command, optionsOrCb);
166
161
  }
167
162
  else if (typeof cb === "function") {
168
163
  if (typeof optionsOrCb !== "object")
169
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
164
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
170
165
  this.send(command, optionsOrCb || {}, cb);
171
166
  }
172
167
  else {
173
168
  return this.send(command, optionsOrCb);
174
169
  }
175
- };
176
- IotDeviceAdvisor.prototype.tagResource = function (args, optionsOrCb, cb) {
177
- var command = new TagResourceCommand(args);
170
+ }
171
+ tagResource(args, optionsOrCb, cb) {
172
+ const command = new TagResourceCommand(args);
178
173
  if (typeof optionsOrCb === "function") {
179
174
  this.send(command, optionsOrCb);
180
175
  }
181
176
  else if (typeof cb === "function") {
182
177
  if (typeof optionsOrCb !== "object")
183
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
178
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
184
179
  this.send(command, optionsOrCb || {}, cb);
185
180
  }
186
181
  else {
187
182
  return this.send(command, optionsOrCb);
188
183
  }
189
- };
190
- IotDeviceAdvisor.prototype.untagResource = function (args, optionsOrCb, cb) {
191
- var command = new UntagResourceCommand(args);
184
+ }
185
+ untagResource(args, optionsOrCb, cb) {
186
+ const command = new UntagResourceCommand(args);
192
187
  if (typeof optionsOrCb === "function") {
193
188
  this.send(command, optionsOrCb);
194
189
  }
195
190
  else if (typeof cb === "function") {
196
191
  if (typeof optionsOrCb !== "object")
197
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
192
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
198
193
  this.send(command, optionsOrCb || {}, cb);
199
194
  }
200
195
  else {
201
196
  return this.send(command, optionsOrCb);
202
197
  }
203
- };
204
- IotDeviceAdvisor.prototype.updateSuiteDefinition = function (args, optionsOrCb, cb) {
205
- var command = new UpdateSuiteDefinitionCommand(args);
198
+ }
199
+ updateSuiteDefinition(args, optionsOrCb, cb) {
200
+ const command = new UpdateSuiteDefinitionCommand(args);
206
201
  if (typeof optionsOrCb === "function") {
207
202
  this.send(command, optionsOrCb);
208
203
  }
209
204
  else if (typeof cb === "function") {
210
205
  if (typeof optionsOrCb !== "object")
211
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
206
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
212
207
  this.send(command, optionsOrCb || {}, cb);
213
208
  }
214
209
  else {
215
210
  return this.send(command, optionsOrCb);
216
211
  }
217
- };
218
- return IotDeviceAdvisor;
219
- }(IotDeviceAdvisorClient));
220
- export { IotDeviceAdvisor };
212
+ }
213
+ }
@@ -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 IotDeviceAdvisorClient = (function (_super) {
13
- __extends(IotDeviceAdvisorClient, _super);
14
- function IotDeviceAdvisorClient(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 IotDeviceAdvisorClient 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
- IotDeviceAdvisorClient.prototype.destroy = function () {
35
- _super.prototype.destroy.call(this);
36
- };
37
- return IotDeviceAdvisorClient;
38
- }(__Client));
39
- export { IotDeviceAdvisorClient };
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 { CreateSuiteDefinitionRequestFilterSensitiveLog, CreateSuiteDefinitionResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1CreateSuiteDefinitionCommand, serializeAws_restJson1CreateSuiteDefinitionCommand, } from "../protocols/Aws_restJson1";
6
- var CreateSuiteDefinitionCommand = (function (_super) {
7
- __extends(CreateSuiteDefinitionCommand, _super);
8
- function CreateSuiteDefinitionCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class CreateSuiteDefinitionCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- CreateSuiteDefinitionCommand.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 = "IotDeviceAdvisorClient";
18
- var commandName = "CreateSuiteDefinitionCommand";
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 = "IotDeviceAdvisorClient";
15
+ const commandName = "CreateSuiteDefinitionCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: CreateSuiteDefinitionRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: CreateSuiteDefinitionResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- CreateSuiteDefinitionCommand.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_restJson1CreateSuiteDefinitionCommand(input, context);
33
- };
34
- CreateSuiteDefinitionCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1CreateSuiteDefinitionCommand(output, context);
36
- };
37
- return CreateSuiteDefinitionCommand;
38
- }($Command));
39
- export { CreateSuiteDefinitionCommand };
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 { DeleteSuiteDefinitionRequestFilterSensitiveLog, DeleteSuiteDefinitionResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1DeleteSuiteDefinitionCommand, serializeAws_restJson1DeleteSuiteDefinitionCommand, } from "../protocols/Aws_restJson1";
6
- var DeleteSuiteDefinitionCommand = (function (_super) {
7
- __extends(DeleteSuiteDefinitionCommand, _super);
8
- function DeleteSuiteDefinitionCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class DeleteSuiteDefinitionCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- DeleteSuiteDefinitionCommand.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 = "IotDeviceAdvisorClient";
18
- var commandName = "DeleteSuiteDefinitionCommand";
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 = "IotDeviceAdvisorClient";
15
+ const commandName = "DeleteSuiteDefinitionCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: DeleteSuiteDefinitionRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: DeleteSuiteDefinitionResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- DeleteSuiteDefinitionCommand.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_restJson1DeleteSuiteDefinitionCommand(input, context);
33
- };
34
- DeleteSuiteDefinitionCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1DeleteSuiteDefinitionCommand(output, context);
36
- };
37
- return DeleteSuiteDefinitionCommand;
38
- }($Command));
39
- export { DeleteSuiteDefinitionCommand };
31
+ }
32
+ }