@aws-sdk/client-migration-hub 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 (35) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist-cjs/protocols/Aws_json1_1.js +23 -17
  3. package/dist-es/MigrationHub.js +70 -77
  4. package/dist-es/MigrationHubClient.js +22 -28
  5. package/dist-es/commands/AssociateCreatedArtifactCommand.js +21 -28
  6. package/dist-es/commands/AssociateDiscoveredResourceCommand.js +21 -28
  7. package/dist-es/commands/CreateProgressUpdateStreamCommand.js +21 -28
  8. package/dist-es/commands/DeleteProgressUpdateStreamCommand.js +21 -28
  9. package/dist-es/commands/DescribeApplicationStateCommand.js +21 -28
  10. package/dist-es/commands/DescribeMigrationTaskCommand.js +21 -28
  11. package/dist-es/commands/DisassociateCreatedArtifactCommand.js +21 -28
  12. package/dist-es/commands/DisassociateDiscoveredResourceCommand.js +21 -28
  13. package/dist-es/commands/ImportMigrationTaskCommand.js +21 -28
  14. package/dist-es/commands/ListApplicationStatesCommand.js +21 -28
  15. package/dist-es/commands/ListCreatedArtifactsCommand.js +21 -28
  16. package/dist-es/commands/ListDiscoveredResourcesCommand.js +21 -28
  17. package/dist-es/commands/ListMigrationTasksCommand.js +21 -28
  18. package/dist-es/commands/ListProgressUpdateStreamsCommand.js +21 -28
  19. package/dist-es/commands/NotifyApplicationStateCommand.js +21 -28
  20. package/dist-es/commands/NotifyMigrationTaskStateCommand.js +21 -28
  21. package/dist-es/commands/PutResourceAttributesCommand.js +21 -28
  22. package/dist-es/endpoints.js +8 -8
  23. package/dist-es/models/MigrationHubServiceException.js +5 -10
  24. package/dist-es/models/models_0.js +247 -164
  25. package/dist-es/pagination/ListApplicationStatesPaginator.js +25 -68
  26. package/dist-es/pagination/ListCreatedArtifactsPaginator.js +25 -68
  27. package/dist-es/pagination/ListDiscoveredResourcesPaginator.js +25 -68
  28. package/dist-es/pagination/ListMigrationTasksPaginator.js +25 -68
  29. package/dist-es/pagination/ListProgressUpdateStreamsPaginator.js +25 -68
  30. package/dist-es/protocols/Aws_json1_1.js +1415 -1803
  31. package/dist-es/runtimeConfig.browser.js +26 -12
  32. package/dist-es/runtimeConfig.js +30 -12
  33. package/dist-es/runtimeConfig.native.js +8 -5
  34. package/dist-es/runtimeConfig.shared.js +8 -11
  35. 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-migration-hub
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-migration-hub
@@ -192,7 +192,7 @@ exports.deserializeAws_json1_1AssociateCreatedArtifactCommand = deserializeAws_j
192
192
  const deserializeAws_json1_1AssociateCreatedArtifactCommandError = async (output, context) => {
193
193
  const parsedOutput = {
194
194
  ...output,
195
- body: await parseBody(output.body, context),
195
+ body: await parseErrorBody(output.body, context),
196
196
  };
197
197
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
198
198
  switch (errorCode) {
@@ -250,7 +250,7 @@ exports.deserializeAws_json1_1AssociateDiscoveredResourceCommand = deserializeAw
250
250
  const deserializeAws_json1_1AssociateDiscoveredResourceCommandError = async (output, context) => {
251
251
  const parsedOutput = {
252
252
  ...output,
253
- body: await parseBody(output.body, context),
253
+ body: await parseErrorBody(output.body, context),
254
254
  };
255
255
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
256
256
  switch (errorCode) {
@@ -311,7 +311,7 @@ exports.deserializeAws_json1_1CreateProgressUpdateStreamCommand = deserializeAws
311
311
  const deserializeAws_json1_1CreateProgressUpdateStreamCommandError = async (output, context) => {
312
312
  const parsedOutput = {
313
313
  ...output,
314
- body: await parseBody(output.body, context),
314
+ body: await parseErrorBody(output.body, context),
315
315
  };
316
316
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
317
317
  switch (errorCode) {
@@ -366,7 +366,7 @@ exports.deserializeAws_json1_1DeleteProgressUpdateStreamCommand = deserializeAws
366
366
  const deserializeAws_json1_1DeleteProgressUpdateStreamCommandError = async (output, context) => {
367
367
  const parsedOutput = {
368
368
  ...output,
369
- body: await parseBody(output.body, context),
369
+ body: await parseErrorBody(output.body, context),
370
370
  };
371
371
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
372
372
  switch (errorCode) {
@@ -424,7 +424,7 @@ exports.deserializeAws_json1_1DescribeApplicationStateCommand = deserializeAws_j
424
424
  const deserializeAws_json1_1DescribeApplicationStateCommandError = async (output, context) => {
425
425
  const parsedOutput = {
426
426
  ...output,
427
- body: await parseBody(output.body, context),
427
+ body: await parseErrorBody(output.body, context),
428
428
  };
429
429
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
430
430
  switch (errorCode) {
@@ -479,7 +479,7 @@ exports.deserializeAws_json1_1DescribeMigrationTaskCommand = deserializeAws_json
479
479
  const deserializeAws_json1_1DescribeMigrationTaskCommandError = async (output, context) => {
480
480
  const parsedOutput = {
481
481
  ...output,
482
- body: await parseBody(output.body, context),
482
+ body: await parseErrorBody(output.body, context),
483
483
  };
484
484
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
485
485
  switch (errorCode) {
@@ -531,7 +531,7 @@ exports.deserializeAws_json1_1DisassociateCreatedArtifactCommand = deserializeAw
531
531
  const deserializeAws_json1_1DisassociateCreatedArtifactCommandError = async (output, context) => {
532
532
  const parsedOutput = {
533
533
  ...output,
534
- body: await parseBody(output.body, context),
534
+ body: await parseErrorBody(output.body, context),
535
535
  };
536
536
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
537
537
  switch (errorCode) {
@@ -589,7 +589,7 @@ exports.deserializeAws_json1_1DisassociateDiscoveredResourceCommand = deserializ
589
589
  const deserializeAws_json1_1DisassociateDiscoveredResourceCommandError = async (output, context) => {
590
590
  const parsedOutput = {
591
591
  ...output,
592
- body: await parseBody(output.body, context),
592
+ body: await parseErrorBody(output.body, context),
593
593
  };
594
594
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
595
595
  switch (errorCode) {
@@ -647,7 +647,7 @@ exports.deserializeAws_json1_1ImportMigrationTaskCommand = deserializeAws_json1_
647
647
  const deserializeAws_json1_1ImportMigrationTaskCommandError = async (output, context) => {
648
648
  const parsedOutput = {
649
649
  ...output,
650
- body: await parseBody(output.body, context),
650
+ body: await parseErrorBody(output.body, context),
651
651
  };
652
652
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
653
653
  switch (errorCode) {
@@ -705,7 +705,7 @@ exports.deserializeAws_json1_1ListApplicationStatesCommand = deserializeAws_json
705
705
  const deserializeAws_json1_1ListApplicationStatesCommandError = async (output, context) => {
706
706
  const parsedOutput = {
707
707
  ...output,
708
- body: await parseBody(output.body, context),
708
+ body: await parseErrorBody(output.body, context),
709
709
  };
710
710
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
711
711
  switch (errorCode) {
@@ -754,7 +754,7 @@ exports.deserializeAws_json1_1ListCreatedArtifactsCommand = deserializeAws_json1
754
754
  const deserializeAws_json1_1ListCreatedArtifactsCommandError = async (output, context) => {
755
755
  const parsedOutput = {
756
756
  ...output,
757
- body: await parseBody(output.body, context),
757
+ body: await parseErrorBody(output.body, context),
758
758
  };
759
759
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
760
760
  switch (errorCode) {
@@ -806,7 +806,7 @@ exports.deserializeAws_json1_1ListDiscoveredResourcesCommand = deserializeAws_js
806
806
  const deserializeAws_json1_1ListDiscoveredResourcesCommandError = async (output, context) => {
807
807
  const parsedOutput = {
808
808
  ...output,
809
- body: await parseBody(output.body, context),
809
+ body: await parseErrorBody(output.body, context),
810
810
  };
811
811
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
812
812
  switch (errorCode) {
@@ -858,7 +858,7 @@ exports.deserializeAws_json1_1ListMigrationTasksCommand = deserializeAws_json1_1
858
858
  const deserializeAws_json1_1ListMigrationTasksCommandError = async (output, context) => {
859
859
  const parsedOutput = {
860
860
  ...output,
861
- body: await parseBody(output.body, context),
861
+ body: await parseErrorBody(output.body, context),
862
862
  };
863
863
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
864
864
  switch (errorCode) {
@@ -913,7 +913,7 @@ exports.deserializeAws_json1_1ListProgressUpdateStreamsCommand = deserializeAws_
913
913
  const deserializeAws_json1_1ListProgressUpdateStreamsCommandError = async (output, context) => {
914
914
  const parsedOutput = {
915
915
  ...output,
916
- body: await parseBody(output.body, context),
916
+ body: await parseErrorBody(output.body, context),
917
917
  };
918
918
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
919
919
  switch (errorCode) {
@@ -962,7 +962,7 @@ exports.deserializeAws_json1_1NotifyApplicationStateCommand = deserializeAws_jso
962
962
  const deserializeAws_json1_1NotifyApplicationStateCommandError = async (output, context) => {
963
963
  const parsedOutput = {
964
964
  ...output,
965
- body: await parseBody(output.body, context),
965
+ body: await parseErrorBody(output.body, context),
966
966
  };
967
967
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
968
968
  switch (errorCode) {
@@ -1023,7 +1023,7 @@ exports.deserializeAws_json1_1NotifyMigrationTaskStateCommand = deserializeAws_j
1023
1023
  const deserializeAws_json1_1NotifyMigrationTaskStateCommandError = async (output, context) => {
1024
1024
  const parsedOutput = {
1025
1025
  ...output,
1026
- body: await parseBody(output.body, context),
1026
+ body: await parseErrorBody(output.body, context),
1027
1027
  };
1028
1028
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1029
1029
  switch (errorCode) {
@@ -1081,7 +1081,7 @@ exports.deserializeAws_json1_1PutResourceAttributesCommand = deserializeAws_json
1081
1081
  const deserializeAws_json1_1PutResourceAttributesCommandError = async (output, context) => {
1082
1082
  const parsedOutput = {
1083
1083
  ...output,
1084
- body: await parseBody(output.body, context),
1084
+ body: await parseErrorBody(output.body, context),
1085
1085
  };
1086
1086
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1087
1087
  switch (errorCode) {
@@ -1687,6 +1687,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
1687
1687
  }
1688
1688
  return {};
1689
1689
  });
1690
+ const parseErrorBody = async (errorBody, context) => {
1691
+ var _a;
1692
+ const value = await parseBody(errorBody, context);
1693
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
1694
+ return value;
1695
+ };
1690
1696
  const loadRestJsonErrorCode = (output, data) => {
1691
1697
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1692
1698
  const sanitizeErrorCode = (rawValue) => {
@@ -1,4 +1,3 @@
1
- import { __extends } from "tslib";
2
1
  import { AssociateCreatedArtifactCommand, } from "./commands/AssociateCreatedArtifactCommand";
3
2
  import { AssociateDiscoveredResourceCommand, } from "./commands/AssociateDiscoveredResourceCommand";
4
3
  import { CreateProgressUpdateStreamCommand, } from "./commands/CreateProgressUpdateStreamCommand";
@@ -17,249 +16,243 @@ import { NotifyApplicationStateCommand, } from "./commands/NotifyApplicationStat
17
16
  import { NotifyMigrationTaskStateCommand, } from "./commands/NotifyMigrationTaskStateCommand";
18
17
  import { PutResourceAttributesCommand, } from "./commands/PutResourceAttributesCommand";
19
18
  import { MigrationHubClient } from "./MigrationHubClient";
20
- var MigrationHub = (function (_super) {
21
- __extends(MigrationHub, _super);
22
- function MigrationHub() {
23
- return _super !== null && _super.apply(this, arguments) || this;
24
- }
25
- MigrationHub.prototype.associateCreatedArtifact = function (args, optionsOrCb, cb) {
26
- var command = new AssociateCreatedArtifactCommand(args);
19
+ export class MigrationHub extends MigrationHubClient {
20
+ associateCreatedArtifact(args, optionsOrCb, cb) {
21
+ const command = new AssociateCreatedArtifactCommand(args);
27
22
  if (typeof optionsOrCb === "function") {
28
23
  this.send(command, optionsOrCb);
29
24
  }
30
25
  else if (typeof cb === "function") {
31
26
  if (typeof optionsOrCb !== "object")
32
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
27
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
33
28
  this.send(command, optionsOrCb || {}, cb);
34
29
  }
35
30
  else {
36
31
  return this.send(command, optionsOrCb);
37
32
  }
38
- };
39
- MigrationHub.prototype.associateDiscoveredResource = function (args, optionsOrCb, cb) {
40
- var command = new AssociateDiscoveredResourceCommand(args);
33
+ }
34
+ associateDiscoveredResource(args, optionsOrCb, cb) {
35
+ const command = new AssociateDiscoveredResourceCommand(args);
41
36
  if (typeof optionsOrCb === "function") {
42
37
  this.send(command, optionsOrCb);
43
38
  }
44
39
  else if (typeof cb === "function") {
45
40
  if (typeof optionsOrCb !== "object")
46
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
41
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
47
42
  this.send(command, optionsOrCb || {}, cb);
48
43
  }
49
44
  else {
50
45
  return this.send(command, optionsOrCb);
51
46
  }
52
- };
53
- MigrationHub.prototype.createProgressUpdateStream = function (args, optionsOrCb, cb) {
54
- var command = new CreateProgressUpdateStreamCommand(args);
47
+ }
48
+ createProgressUpdateStream(args, optionsOrCb, cb) {
49
+ const command = new CreateProgressUpdateStreamCommand(args);
55
50
  if (typeof optionsOrCb === "function") {
56
51
  this.send(command, optionsOrCb);
57
52
  }
58
53
  else if (typeof cb === "function") {
59
54
  if (typeof optionsOrCb !== "object")
60
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
55
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
61
56
  this.send(command, optionsOrCb || {}, cb);
62
57
  }
63
58
  else {
64
59
  return this.send(command, optionsOrCb);
65
60
  }
66
- };
67
- MigrationHub.prototype.deleteProgressUpdateStream = function (args, optionsOrCb, cb) {
68
- var command = new DeleteProgressUpdateStreamCommand(args);
61
+ }
62
+ deleteProgressUpdateStream(args, optionsOrCb, cb) {
63
+ const command = new DeleteProgressUpdateStreamCommand(args);
69
64
  if (typeof optionsOrCb === "function") {
70
65
  this.send(command, optionsOrCb);
71
66
  }
72
67
  else if (typeof cb === "function") {
73
68
  if (typeof optionsOrCb !== "object")
74
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
69
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
75
70
  this.send(command, optionsOrCb || {}, cb);
76
71
  }
77
72
  else {
78
73
  return this.send(command, optionsOrCb);
79
74
  }
80
- };
81
- MigrationHub.prototype.describeApplicationState = function (args, optionsOrCb, cb) {
82
- var command = new DescribeApplicationStateCommand(args);
75
+ }
76
+ describeApplicationState(args, optionsOrCb, cb) {
77
+ const command = new DescribeApplicationStateCommand(args);
83
78
  if (typeof optionsOrCb === "function") {
84
79
  this.send(command, optionsOrCb);
85
80
  }
86
81
  else if (typeof cb === "function") {
87
82
  if (typeof optionsOrCb !== "object")
88
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
83
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
89
84
  this.send(command, optionsOrCb || {}, cb);
90
85
  }
91
86
  else {
92
87
  return this.send(command, optionsOrCb);
93
88
  }
94
- };
95
- MigrationHub.prototype.describeMigrationTask = function (args, optionsOrCb, cb) {
96
- var command = new DescribeMigrationTaskCommand(args);
89
+ }
90
+ describeMigrationTask(args, optionsOrCb, cb) {
91
+ const command = new DescribeMigrationTaskCommand(args);
97
92
  if (typeof optionsOrCb === "function") {
98
93
  this.send(command, optionsOrCb);
99
94
  }
100
95
  else if (typeof cb === "function") {
101
96
  if (typeof optionsOrCb !== "object")
102
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
97
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
103
98
  this.send(command, optionsOrCb || {}, cb);
104
99
  }
105
100
  else {
106
101
  return this.send(command, optionsOrCb);
107
102
  }
108
- };
109
- MigrationHub.prototype.disassociateCreatedArtifact = function (args, optionsOrCb, cb) {
110
- var command = new DisassociateCreatedArtifactCommand(args);
103
+ }
104
+ disassociateCreatedArtifact(args, optionsOrCb, cb) {
105
+ const command = new DisassociateCreatedArtifactCommand(args);
111
106
  if (typeof optionsOrCb === "function") {
112
107
  this.send(command, optionsOrCb);
113
108
  }
114
109
  else if (typeof cb === "function") {
115
110
  if (typeof optionsOrCb !== "object")
116
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
111
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
117
112
  this.send(command, optionsOrCb || {}, cb);
118
113
  }
119
114
  else {
120
115
  return this.send(command, optionsOrCb);
121
116
  }
122
- };
123
- MigrationHub.prototype.disassociateDiscoveredResource = function (args, optionsOrCb, cb) {
124
- var command = new DisassociateDiscoveredResourceCommand(args);
117
+ }
118
+ disassociateDiscoveredResource(args, optionsOrCb, cb) {
119
+ const command = new DisassociateDiscoveredResourceCommand(args);
125
120
  if (typeof optionsOrCb === "function") {
126
121
  this.send(command, optionsOrCb);
127
122
  }
128
123
  else if (typeof cb === "function") {
129
124
  if (typeof optionsOrCb !== "object")
130
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
125
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
131
126
  this.send(command, optionsOrCb || {}, cb);
132
127
  }
133
128
  else {
134
129
  return this.send(command, optionsOrCb);
135
130
  }
136
- };
137
- MigrationHub.prototype.importMigrationTask = function (args, optionsOrCb, cb) {
138
- var command = new ImportMigrationTaskCommand(args);
131
+ }
132
+ importMigrationTask(args, optionsOrCb, cb) {
133
+ const command = new ImportMigrationTaskCommand(args);
139
134
  if (typeof optionsOrCb === "function") {
140
135
  this.send(command, optionsOrCb);
141
136
  }
142
137
  else if (typeof cb === "function") {
143
138
  if (typeof optionsOrCb !== "object")
144
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
139
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
145
140
  this.send(command, optionsOrCb || {}, cb);
146
141
  }
147
142
  else {
148
143
  return this.send(command, optionsOrCb);
149
144
  }
150
- };
151
- MigrationHub.prototype.listApplicationStates = function (args, optionsOrCb, cb) {
152
- var command = new ListApplicationStatesCommand(args);
145
+ }
146
+ listApplicationStates(args, optionsOrCb, cb) {
147
+ const command = new ListApplicationStatesCommand(args);
153
148
  if (typeof optionsOrCb === "function") {
154
149
  this.send(command, optionsOrCb);
155
150
  }
156
151
  else if (typeof cb === "function") {
157
152
  if (typeof optionsOrCb !== "object")
158
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
153
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
159
154
  this.send(command, optionsOrCb || {}, cb);
160
155
  }
161
156
  else {
162
157
  return this.send(command, optionsOrCb);
163
158
  }
164
- };
165
- MigrationHub.prototype.listCreatedArtifacts = function (args, optionsOrCb, cb) {
166
- var command = new ListCreatedArtifactsCommand(args);
159
+ }
160
+ listCreatedArtifacts(args, optionsOrCb, cb) {
161
+ const command = new ListCreatedArtifactsCommand(args);
167
162
  if (typeof optionsOrCb === "function") {
168
163
  this.send(command, optionsOrCb);
169
164
  }
170
165
  else if (typeof cb === "function") {
171
166
  if (typeof optionsOrCb !== "object")
172
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
167
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
173
168
  this.send(command, optionsOrCb || {}, cb);
174
169
  }
175
170
  else {
176
171
  return this.send(command, optionsOrCb);
177
172
  }
178
- };
179
- MigrationHub.prototype.listDiscoveredResources = function (args, optionsOrCb, cb) {
180
- var command = new ListDiscoveredResourcesCommand(args);
173
+ }
174
+ listDiscoveredResources(args, optionsOrCb, cb) {
175
+ const command = new ListDiscoveredResourcesCommand(args);
181
176
  if (typeof optionsOrCb === "function") {
182
177
  this.send(command, optionsOrCb);
183
178
  }
184
179
  else if (typeof cb === "function") {
185
180
  if (typeof optionsOrCb !== "object")
186
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
181
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
187
182
  this.send(command, optionsOrCb || {}, cb);
188
183
  }
189
184
  else {
190
185
  return this.send(command, optionsOrCb);
191
186
  }
192
- };
193
- MigrationHub.prototype.listMigrationTasks = function (args, optionsOrCb, cb) {
194
- var command = new ListMigrationTasksCommand(args);
187
+ }
188
+ listMigrationTasks(args, optionsOrCb, cb) {
189
+ const command = new ListMigrationTasksCommand(args);
195
190
  if (typeof optionsOrCb === "function") {
196
191
  this.send(command, optionsOrCb);
197
192
  }
198
193
  else if (typeof cb === "function") {
199
194
  if (typeof optionsOrCb !== "object")
200
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
195
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
201
196
  this.send(command, optionsOrCb || {}, cb);
202
197
  }
203
198
  else {
204
199
  return this.send(command, optionsOrCb);
205
200
  }
206
- };
207
- MigrationHub.prototype.listProgressUpdateStreams = function (args, optionsOrCb, cb) {
208
- var command = new ListProgressUpdateStreamsCommand(args);
201
+ }
202
+ listProgressUpdateStreams(args, optionsOrCb, cb) {
203
+ const command = new ListProgressUpdateStreamsCommand(args);
209
204
  if (typeof optionsOrCb === "function") {
210
205
  this.send(command, optionsOrCb);
211
206
  }
212
207
  else if (typeof cb === "function") {
213
208
  if (typeof optionsOrCb !== "object")
214
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
209
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
215
210
  this.send(command, optionsOrCb || {}, cb);
216
211
  }
217
212
  else {
218
213
  return this.send(command, optionsOrCb);
219
214
  }
220
- };
221
- MigrationHub.prototype.notifyApplicationState = function (args, optionsOrCb, cb) {
222
- var command = new NotifyApplicationStateCommand(args);
215
+ }
216
+ notifyApplicationState(args, optionsOrCb, cb) {
217
+ const command = new NotifyApplicationStateCommand(args);
223
218
  if (typeof optionsOrCb === "function") {
224
219
  this.send(command, optionsOrCb);
225
220
  }
226
221
  else if (typeof cb === "function") {
227
222
  if (typeof optionsOrCb !== "object")
228
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
223
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
229
224
  this.send(command, optionsOrCb || {}, cb);
230
225
  }
231
226
  else {
232
227
  return this.send(command, optionsOrCb);
233
228
  }
234
- };
235
- MigrationHub.prototype.notifyMigrationTaskState = function (args, optionsOrCb, cb) {
236
- var command = new NotifyMigrationTaskStateCommand(args);
229
+ }
230
+ notifyMigrationTaskState(args, optionsOrCb, cb) {
231
+ const command = new NotifyMigrationTaskStateCommand(args);
237
232
  if (typeof optionsOrCb === "function") {
238
233
  this.send(command, optionsOrCb);
239
234
  }
240
235
  else if (typeof cb === "function") {
241
236
  if (typeof optionsOrCb !== "object")
242
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
237
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
243
238
  this.send(command, optionsOrCb || {}, cb);
244
239
  }
245
240
  else {
246
241
  return this.send(command, optionsOrCb);
247
242
  }
248
- };
249
- MigrationHub.prototype.putResourceAttributes = function (args, optionsOrCb, cb) {
250
- var command = new PutResourceAttributesCommand(args);
243
+ }
244
+ putResourceAttributes(args, optionsOrCb, cb) {
245
+ const command = new PutResourceAttributesCommand(args);
251
246
  if (typeof optionsOrCb === "function") {
252
247
  this.send(command, optionsOrCb);
253
248
  }
254
249
  else if (typeof cb === "function") {
255
250
  if (typeof optionsOrCb !== "object")
256
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
251
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
257
252
  this.send(command, optionsOrCb || {}, cb);
258
253
  }
259
254
  else {
260
255
  return this.send(command, optionsOrCb);
261
256
  }
262
- };
263
- return MigrationHub;
264
- }(MigrationHubClient));
265
- export { MigrationHub };
257
+ }
258
+ }
@@ -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 MigrationHubClient = (function (_super) {
13
- __extends(MigrationHubClient, _super);
14
- function MigrationHubClient(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 MigrationHubClient 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
- MigrationHubClient.prototype.destroy = function () {
35
- _super.prototype.destroy.call(this);
36
- };
37
- return MigrationHubClient;
38
- }(__Client));
39
- export { MigrationHubClient };
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 { AssociateCreatedArtifactRequestFilterSensitiveLog, AssociateCreatedArtifactResultFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_json1_1AssociateCreatedArtifactCommand, serializeAws_json1_1AssociateCreatedArtifactCommand, } from "../protocols/Aws_json1_1";
6
- var AssociateCreatedArtifactCommand = (function (_super) {
7
- __extends(AssociateCreatedArtifactCommand, _super);
8
- function AssociateCreatedArtifactCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class AssociateCreatedArtifactCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- AssociateCreatedArtifactCommand.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 = "MigrationHubClient";
18
- var commandName = "AssociateCreatedArtifactCommand";
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 = "MigrationHubClient";
15
+ const commandName = "AssociateCreatedArtifactCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: AssociateCreatedArtifactRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: AssociateCreatedArtifactResultFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- AssociateCreatedArtifactCommand.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_1AssociateCreatedArtifactCommand(input, context);
33
- };
34
- AssociateCreatedArtifactCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_json1_1AssociateCreatedArtifactCommand(output, context);
36
- };
37
- return AssociateCreatedArtifactCommand;
38
- }($Command));
39
- export { AssociateCreatedArtifactCommand };
31
+ }
32
+ }