@aws-sdk/client-backup-gateway 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_0.js +25 -19
  3. package/dist-es/BackupGateway.js +78 -85
  4. package/dist-es/BackupGatewayClient.js +22 -28
  5. package/dist-es/commands/AssociateGatewayToServerCommand.js +21 -28
  6. package/dist-es/commands/CreateGatewayCommand.js +21 -28
  7. package/dist-es/commands/DeleteGatewayCommand.js +21 -28
  8. package/dist-es/commands/DeleteHypervisorCommand.js +21 -28
  9. package/dist-es/commands/DisassociateGatewayFromServerCommand.js +21 -28
  10. package/dist-es/commands/GetGatewayCommand.js +21 -28
  11. package/dist-es/commands/GetVirtualMachineCommand.js +21 -28
  12. package/dist-es/commands/ImportHypervisorConfigurationCommand.js +21 -28
  13. package/dist-es/commands/ListGatewaysCommand.js +21 -28
  14. package/dist-es/commands/ListHypervisorsCommand.js +21 -28
  15. package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
  16. package/dist-es/commands/ListVirtualMachinesCommand.js +21 -28
  17. package/dist-es/commands/PutMaintenanceStartTimeCommand.js +21 -28
  18. package/dist-es/commands/TagResourceCommand.js +21 -28
  19. package/dist-es/commands/TestHypervisorConfigurationCommand.js +21 -28
  20. package/dist-es/commands/UntagResourceCommand.js +21 -28
  21. package/dist-es/commands/UpdateGatewayInformationCommand.js +21 -28
  22. package/dist-es/commands/UpdateGatewaySoftwareNowCommand.js +21 -28
  23. package/dist-es/commands/UpdateHypervisorCommand.js +21 -28
  24. package/dist-es/endpoints.js +8 -8
  25. package/dist-es/models/BackupGatewayServiceException.js +5 -10
  26. package/dist-es/models/models_0.js +219 -124
  27. package/dist-es/pagination/ListGatewaysPaginator.js +25 -68
  28. package/dist-es/pagination/ListHypervisorsPaginator.js +25 -68
  29. package/dist-es/pagination/ListVirtualMachinesPaginator.js +25 -68
  30. package/dist-es/protocols/Aws_json1_0.js +1232 -1614
  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-backup-gateway
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-backup-gateway
@@ -212,7 +212,7 @@ exports.deserializeAws_json1_0AssociateGatewayToServerCommand = deserializeAws_j
212
212
  const deserializeAws_json1_0AssociateGatewayToServerCommandError = async (output, context) => {
213
213
  const parsedOutput = {
214
214
  ...output,
215
- body: await parseBody(output.body, context),
215
+ body: await parseErrorBody(output.body, context),
216
216
  };
217
217
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
218
218
  switch (errorCode) {
@@ -255,7 +255,7 @@ exports.deserializeAws_json1_0CreateGatewayCommand = deserializeAws_json1_0Creat
255
255
  const deserializeAws_json1_0CreateGatewayCommandError = async (output, context) => {
256
256
  const parsedOutput = {
257
257
  ...output,
258
- body: await parseBody(output.body, context),
258
+ body: await parseErrorBody(output.body, context),
259
259
  };
260
260
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
261
261
  switch (errorCode) {
@@ -295,7 +295,7 @@ exports.deserializeAws_json1_0DeleteGatewayCommand = deserializeAws_json1_0Delet
295
295
  const deserializeAws_json1_0DeleteGatewayCommandError = async (output, context) => {
296
296
  const parsedOutput = {
297
297
  ...output,
298
- body: await parseBody(output.body, context),
298
+ body: await parseErrorBody(output.body, context),
299
299
  };
300
300
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
301
301
  switch (errorCode) {
@@ -338,7 +338,7 @@ exports.deserializeAws_json1_0DeleteHypervisorCommand = deserializeAws_json1_0De
338
338
  const deserializeAws_json1_0DeleteHypervisorCommandError = async (output, context) => {
339
339
  const parsedOutput = {
340
340
  ...output,
341
- body: await parseBody(output.body, context),
341
+ body: await parseErrorBody(output.body, context),
342
342
  };
343
343
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
344
344
  switch (errorCode) {
@@ -384,7 +384,7 @@ exports.deserializeAws_json1_0DisassociateGatewayFromServerCommand = deserialize
384
384
  const deserializeAws_json1_0DisassociateGatewayFromServerCommandError = async (output, context) => {
385
385
  const parsedOutput = {
386
386
  ...output,
387
- body: await parseBody(output.body, context),
387
+ body: await parseErrorBody(output.body, context),
388
388
  };
389
389
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
390
390
  switch (errorCode) {
@@ -430,7 +430,7 @@ exports.deserializeAws_json1_0GetGatewayCommand = deserializeAws_json1_0GetGatew
430
430
  const deserializeAws_json1_0GetGatewayCommandError = async (output, context) => {
431
431
  const parsedOutput = {
432
432
  ...output,
433
- body: await parseBody(output.body, context),
433
+ body: await parseErrorBody(output.body, context),
434
434
  };
435
435
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
436
436
  switch (errorCode) {
@@ -473,7 +473,7 @@ exports.deserializeAws_json1_0GetVirtualMachineCommand = deserializeAws_json1_0G
473
473
  const deserializeAws_json1_0GetVirtualMachineCommandError = async (output, context) => {
474
474
  const parsedOutput = {
475
475
  ...output,
476
- body: await parseBody(output.body, context),
476
+ body: await parseErrorBody(output.body, context),
477
477
  };
478
478
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
479
479
  switch (errorCode) {
@@ -516,7 +516,7 @@ exports.deserializeAws_json1_0ImportHypervisorConfigurationCommand = deserialize
516
516
  const deserializeAws_json1_0ImportHypervisorConfigurationCommandError = async (output, context) => {
517
517
  const parsedOutput = {
518
518
  ...output,
519
- body: await parseBody(output.body, context),
519
+ body: await parseErrorBody(output.body, context),
520
520
  };
521
521
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
522
522
  switch (errorCode) {
@@ -559,7 +559,7 @@ exports.deserializeAws_json1_0ListGatewaysCommand = deserializeAws_json1_0ListGa
559
559
  const deserializeAws_json1_0ListGatewaysCommandError = async (output, context) => {
560
560
  const parsedOutput = {
561
561
  ...output,
562
- body: await parseBody(output.body, context),
562
+ body: await parseErrorBody(output.body, context),
563
563
  };
564
564
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
565
565
  switch (errorCode) {
@@ -599,7 +599,7 @@ exports.deserializeAws_json1_0ListHypervisorsCommand = deserializeAws_json1_0Lis
599
599
  const deserializeAws_json1_0ListHypervisorsCommandError = async (output, context) => {
600
600
  const parsedOutput = {
601
601
  ...output,
602
- body: await parseBody(output.body, context),
602
+ body: await parseErrorBody(output.body, context),
603
603
  };
604
604
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
605
605
  switch (errorCode) {
@@ -639,7 +639,7 @@ exports.deserializeAws_json1_0ListTagsForResourceCommand = deserializeAws_json1_
639
639
  const deserializeAws_json1_0ListTagsForResourceCommandError = async (output, context) => {
640
640
  const parsedOutput = {
641
641
  ...output,
642
- body: await parseBody(output.body, context),
642
+ body: await parseErrorBody(output.body, context),
643
643
  };
644
644
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
645
645
  switch (errorCode) {
@@ -682,7 +682,7 @@ exports.deserializeAws_json1_0ListVirtualMachinesCommand = deserializeAws_json1_
682
682
  const deserializeAws_json1_0ListVirtualMachinesCommandError = async (output, context) => {
683
683
  const parsedOutput = {
684
684
  ...output,
685
- body: await parseBody(output.body, context),
685
+ body: await parseErrorBody(output.body, context),
686
686
  };
687
687
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
688
688
  switch (errorCode) {
@@ -722,7 +722,7 @@ exports.deserializeAws_json1_0PutMaintenanceStartTimeCommand = deserializeAws_js
722
722
  const deserializeAws_json1_0PutMaintenanceStartTimeCommandError = async (output, context) => {
723
723
  const parsedOutput = {
724
724
  ...output,
725
- body: await parseBody(output.body, context),
725
+ body: await parseErrorBody(output.body, context),
726
726
  };
727
727
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
728
728
  switch (errorCode) {
@@ -768,7 +768,7 @@ exports.deserializeAws_json1_0TagResourceCommand = deserializeAws_json1_0TagReso
768
768
  const deserializeAws_json1_0TagResourceCommandError = async (output, context) => {
769
769
  const parsedOutput = {
770
770
  ...output,
771
- body: await parseBody(output.body, context),
771
+ body: await parseErrorBody(output.body, context),
772
772
  };
773
773
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
774
774
  switch (errorCode) {
@@ -811,7 +811,7 @@ exports.deserializeAws_json1_0TestHypervisorConfigurationCommand = deserializeAw
811
811
  const deserializeAws_json1_0TestHypervisorConfigurationCommandError = async (output, context) => {
812
812
  const parsedOutput = {
813
813
  ...output,
814
- body: await parseBody(output.body, context),
814
+ body: await parseErrorBody(output.body, context),
815
815
  };
816
816
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
817
817
  switch (errorCode) {
@@ -857,7 +857,7 @@ exports.deserializeAws_json1_0UntagResourceCommand = deserializeAws_json1_0Untag
857
857
  const deserializeAws_json1_0UntagResourceCommandError = async (output, context) => {
858
858
  const parsedOutput = {
859
859
  ...output,
860
- body: await parseBody(output.body, context),
860
+ body: await parseErrorBody(output.body, context),
861
861
  };
862
862
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
863
863
  switch (errorCode) {
@@ -900,7 +900,7 @@ exports.deserializeAws_json1_0UpdateGatewayInformationCommand = deserializeAws_j
900
900
  const deserializeAws_json1_0UpdateGatewayInformationCommandError = 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) {
@@ -946,7 +946,7 @@ exports.deserializeAws_json1_0UpdateGatewaySoftwareNowCommand = deserializeAws_j
946
946
  const deserializeAws_json1_0UpdateGatewaySoftwareNowCommandError = async (output, context) => {
947
947
  const parsedOutput = {
948
948
  ...output,
949
- body: await parseBody(output.body, context),
949
+ body: await parseErrorBody(output.body, context),
950
950
  };
951
951
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
952
952
  switch (errorCode) {
@@ -989,7 +989,7 @@ exports.deserializeAws_json1_0UpdateHypervisorCommand = deserializeAws_json1_0Up
989
989
  const deserializeAws_json1_0UpdateHypervisorCommandError = async (output, context) => {
990
990
  const parsedOutput = {
991
991
  ...output,
992
- body: await parseBody(output.body, context),
992
+ body: await parseErrorBody(output.body, context),
993
993
  };
994
994
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
995
995
  switch (errorCode) {
@@ -1511,6 +1511,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
1511
1511
  }
1512
1512
  return {};
1513
1513
  });
1514
+ const parseErrorBody = async (errorBody, context) => {
1515
+ var _a;
1516
+ const value = await parseBody(errorBody, context);
1517
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
1518
+ return value;
1519
+ };
1514
1520
  const loadRestJsonErrorCode = (output, data) => {
1515
1521
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1516
1522
  const sanitizeErrorCode = (rawValue) => {
@@ -1,4 +1,3 @@
1
- import { __extends } from "tslib";
2
1
  import { BackupGatewayClient } from "./BackupGatewayClient";
3
2
  import { AssociateGatewayToServerCommand, } from "./commands/AssociateGatewayToServerCommand";
4
3
  import { CreateGatewayCommand, } from "./commands/CreateGatewayCommand";
@@ -19,277 +18,271 @@ import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
19
18
  import { UpdateGatewayInformationCommand, } from "./commands/UpdateGatewayInformationCommand";
20
19
  import { UpdateGatewaySoftwareNowCommand, } from "./commands/UpdateGatewaySoftwareNowCommand";
21
20
  import { UpdateHypervisorCommand, } from "./commands/UpdateHypervisorCommand";
22
- var BackupGateway = (function (_super) {
23
- __extends(BackupGateway, _super);
24
- function BackupGateway() {
25
- return _super !== null && _super.apply(this, arguments) || this;
26
- }
27
- BackupGateway.prototype.associateGatewayToServer = function (args, optionsOrCb, cb) {
28
- var command = new AssociateGatewayToServerCommand(args);
21
+ export class BackupGateway extends BackupGatewayClient {
22
+ associateGatewayToServer(args, optionsOrCb, cb) {
23
+ const command = new AssociateGatewayToServerCommand(args);
29
24
  if (typeof optionsOrCb === "function") {
30
25
  this.send(command, optionsOrCb);
31
26
  }
32
27
  else if (typeof cb === "function") {
33
28
  if (typeof optionsOrCb !== "object")
34
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
29
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
35
30
  this.send(command, optionsOrCb || {}, cb);
36
31
  }
37
32
  else {
38
33
  return this.send(command, optionsOrCb);
39
34
  }
40
- };
41
- BackupGateway.prototype.createGateway = function (args, optionsOrCb, cb) {
42
- var command = new CreateGatewayCommand(args);
35
+ }
36
+ createGateway(args, optionsOrCb, cb) {
37
+ const command = new CreateGatewayCommand(args);
43
38
  if (typeof optionsOrCb === "function") {
44
39
  this.send(command, optionsOrCb);
45
40
  }
46
41
  else if (typeof cb === "function") {
47
42
  if (typeof optionsOrCb !== "object")
48
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
43
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
49
44
  this.send(command, optionsOrCb || {}, cb);
50
45
  }
51
46
  else {
52
47
  return this.send(command, optionsOrCb);
53
48
  }
54
- };
55
- BackupGateway.prototype.deleteGateway = function (args, optionsOrCb, cb) {
56
- var command = new DeleteGatewayCommand(args);
49
+ }
50
+ deleteGateway(args, optionsOrCb, cb) {
51
+ const command = new DeleteGatewayCommand(args);
57
52
  if (typeof optionsOrCb === "function") {
58
53
  this.send(command, optionsOrCb);
59
54
  }
60
55
  else if (typeof cb === "function") {
61
56
  if (typeof optionsOrCb !== "object")
62
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
57
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
63
58
  this.send(command, optionsOrCb || {}, cb);
64
59
  }
65
60
  else {
66
61
  return this.send(command, optionsOrCb);
67
62
  }
68
- };
69
- BackupGateway.prototype.deleteHypervisor = function (args, optionsOrCb, cb) {
70
- var command = new DeleteHypervisorCommand(args);
63
+ }
64
+ deleteHypervisor(args, optionsOrCb, cb) {
65
+ const command = new DeleteHypervisorCommand(args);
71
66
  if (typeof optionsOrCb === "function") {
72
67
  this.send(command, optionsOrCb);
73
68
  }
74
69
  else if (typeof cb === "function") {
75
70
  if (typeof optionsOrCb !== "object")
76
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
71
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
77
72
  this.send(command, optionsOrCb || {}, cb);
78
73
  }
79
74
  else {
80
75
  return this.send(command, optionsOrCb);
81
76
  }
82
- };
83
- BackupGateway.prototype.disassociateGatewayFromServer = function (args, optionsOrCb, cb) {
84
- var command = new DisassociateGatewayFromServerCommand(args);
77
+ }
78
+ disassociateGatewayFromServer(args, optionsOrCb, cb) {
79
+ const command = new DisassociateGatewayFromServerCommand(args);
85
80
  if (typeof optionsOrCb === "function") {
86
81
  this.send(command, optionsOrCb);
87
82
  }
88
83
  else if (typeof cb === "function") {
89
84
  if (typeof optionsOrCb !== "object")
90
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
85
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
91
86
  this.send(command, optionsOrCb || {}, cb);
92
87
  }
93
88
  else {
94
89
  return this.send(command, optionsOrCb);
95
90
  }
96
- };
97
- BackupGateway.prototype.getGateway = function (args, optionsOrCb, cb) {
98
- var command = new GetGatewayCommand(args);
91
+ }
92
+ getGateway(args, optionsOrCb, cb) {
93
+ const command = new GetGatewayCommand(args);
99
94
  if (typeof optionsOrCb === "function") {
100
95
  this.send(command, optionsOrCb);
101
96
  }
102
97
  else if (typeof cb === "function") {
103
98
  if (typeof optionsOrCb !== "object")
104
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
99
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
105
100
  this.send(command, optionsOrCb || {}, cb);
106
101
  }
107
102
  else {
108
103
  return this.send(command, optionsOrCb);
109
104
  }
110
- };
111
- BackupGateway.prototype.getVirtualMachine = function (args, optionsOrCb, cb) {
112
- var command = new GetVirtualMachineCommand(args);
105
+ }
106
+ getVirtualMachine(args, optionsOrCb, cb) {
107
+ const command = new GetVirtualMachineCommand(args);
113
108
  if (typeof optionsOrCb === "function") {
114
109
  this.send(command, optionsOrCb);
115
110
  }
116
111
  else if (typeof cb === "function") {
117
112
  if (typeof optionsOrCb !== "object")
118
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
113
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
119
114
  this.send(command, optionsOrCb || {}, cb);
120
115
  }
121
116
  else {
122
117
  return this.send(command, optionsOrCb);
123
118
  }
124
- };
125
- BackupGateway.prototype.importHypervisorConfiguration = function (args, optionsOrCb, cb) {
126
- var command = new ImportHypervisorConfigurationCommand(args);
119
+ }
120
+ importHypervisorConfiguration(args, optionsOrCb, cb) {
121
+ const command = new ImportHypervisorConfigurationCommand(args);
127
122
  if (typeof optionsOrCb === "function") {
128
123
  this.send(command, optionsOrCb);
129
124
  }
130
125
  else if (typeof cb === "function") {
131
126
  if (typeof optionsOrCb !== "object")
132
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
127
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
133
128
  this.send(command, optionsOrCb || {}, cb);
134
129
  }
135
130
  else {
136
131
  return this.send(command, optionsOrCb);
137
132
  }
138
- };
139
- BackupGateway.prototype.listGateways = function (args, optionsOrCb, cb) {
140
- var command = new ListGatewaysCommand(args);
133
+ }
134
+ listGateways(args, optionsOrCb, cb) {
135
+ const command = new ListGatewaysCommand(args);
141
136
  if (typeof optionsOrCb === "function") {
142
137
  this.send(command, optionsOrCb);
143
138
  }
144
139
  else if (typeof cb === "function") {
145
140
  if (typeof optionsOrCb !== "object")
146
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
141
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
147
142
  this.send(command, optionsOrCb || {}, cb);
148
143
  }
149
144
  else {
150
145
  return this.send(command, optionsOrCb);
151
146
  }
152
- };
153
- BackupGateway.prototype.listHypervisors = function (args, optionsOrCb, cb) {
154
- var command = new ListHypervisorsCommand(args);
147
+ }
148
+ listHypervisors(args, optionsOrCb, cb) {
149
+ const command = new ListHypervisorsCommand(args);
155
150
  if (typeof optionsOrCb === "function") {
156
151
  this.send(command, optionsOrCb);
157
152
  }
158
153
  else if (typeof cb === "function") {
159
154
  if (typeof optionsOrCb !== "object")
160
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
155
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
161
156
  this.send(command, optionsOrCb || {}, cb);
162
157
  }
163
158
  else {
164
159
  return this.send(command, optionsOrCb);
165
160
  }
166
- };
167
- BackupGateway.prototype.listTagsForResource = function (args, optionsOrCb, cb) {
168
- var command = new ListTagsForResourceCommand(args);
161
+ }
162
+ listTagsForResource(args, optionsOrCb, cb) {
163
+ const command = new ListTagsForResourceCommand(args);
169
164
  if (typeof optionsOrCb === "function") {
170
165
  this.send(command, optionsOrCb);
171
166
  }
172
167
  else if (typeof cb === "function") {
173
168
  if (typeof optionsOrCb !== "object")
174
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
169
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
175
170
  this.send(command, optionsOrCb || {}, cb);
176
171
  }
177
172
  else {
178
173
  return this.send(command, optionsOrCb);
179
174
  }
180
- };
181
- BackupGateway.prototype.listVirtualMachines = function (args, optionsOrCb, cb) {
182
- var command = new ListVirtualMachinesCommand(args);
175
+ }
176
+ listVirtualMachines(args, optionsOrCb, cb) {
177
+ const command = new ListVirtualMachinesCommand(args);
183
178
  if (typeof optionsOrCb === "function") {
184
179
  this.send(command, optionsOrCb);
185
180
  }
186
181
  else if (typeof cb === "function") {
187
182
  if (typeof optionsOrCb !== "object")
188
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
183
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
189
184
  this.send(command, optionsOrCb || {}, cb);
190
185
  }
191
186
  else {
192
187
  return this.send(command, optionsOrCb);
193
188
  }
194
- };
195
- BackupGateway.prototype.putMaintenanceStartTime = function (args, optionsOrCb, cb) {
196
- var command = new PutMaintenanceStartTimeCommand(args);
189
+ }
190
+ putMaintenanceStartTime(args, optionsOrCb, cb) {
191
+ const command = new PutMaintenanceStartTimeCommand(args);
197
192
  if (typeof optionsOrCb === "function") {
198
193
  this.send(command, optionsOrCb);
199
194
  }
200
195
  else if (typeof cb === "function") {
201
196
  if (typeof optionsOrCb !== "object")
202
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
197
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
203
198
  this.send(command, optionsOrCb || {}, cb);
204
199
  }
205
200
  else {
206
201
  return this.send(command, optionsOrCb);
207
202
  }
208
- };
209
- BackupGateway.prototype.tagResource = function (args, optionsOrCb, cb) {
210
- var command = new TagResourceCommand(args);
203
+ }
204
+ tagResource(args, optionsOrCb, cb) {
205
+ const command = new TagResourceCommand(args);
211
206
  if (typeof optionsOrCb === "function") {
212
207
  this.send(command, optionsOrCb);
213
208
  }
214
209
  else if (typeof cb === "function") {
215
210
  if (typeof optionsOrCb !== "object")
216
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
211
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
217
212
  this.send(command, optionsOrCb || {}, cb);
218
213
  }
219
214
  else {
220
215
  return this.send(command, optionsOrCb);
221
216
  }
222
- };
223
- BackupGateway.prototype.testHypervisorConfiguration = function (args, optionsOrCb, cb) {
224
- var command = new TestHypervisorConfigurationCommand(args);
217
+ }
218
+ testHypervisorConfiguration(args, optionsOrCb, cb) {
219
+ const command = new TestHypervisorConfigurationCommand(args);
225
220
  if (typeof optionsOrCb === "function") {
226
221
  this.send(command, optionsOrCb);
227
222
  }
228
223
  else if (typeof cb === "function") {
229
224
  if (typeof optionsOrCb !== "object")
230
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
225
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
231
226
  this.send(command, optionsOrCb || {}, cb);
232
227
  }
233
228
  else {
234
229
  return this.send(command, optionsOrCb);
235
230
  }
236
- };
237
- BackupGateway.prototype.untagResource = function (args, optionsOrCb, cb) {
238
- var command = new UntagResourceCommand(args);
231
+ }
232
+ untagResource(args, optionsOrCb, cb) {
233
+ const command = new UntagResourceCommand(args);
239
234
  if (typeof optionsOrCb === "function") {
240
235
  this.send(command, optionsOrCb);
241
236
  }
242
237
  else if (typeof cb === "function") {
243
238
  if (typeof optionsOrCb !== "object")
244
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
239
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
245
240
  this.send(command, optionsOrCb || {}, cb);
246
241
  }
247
242
  else {
248
243
  return this.send(command, optionsOrCb);
249
244
  }
250
- };
251
- BackupGateway.prototype.updateGatewayInformation = function (args, optionsOrCb, cb) {
252
- var command = new UpdateGatewayInformationCommand(args);
245
+ }
246
+ updateGatewayInformation(args, optionsOrCb, cb) {
247
+ const command = new UpdateGatewayInformationCommand(args);
253
248
  if (typeof optionsOrCb === "function") {
254
249
  this.send(command, optionsOrCb);
255
250
  }
256
251
  else if (typeof cb === "function") {
257
252
  if (typeof optionsOrCb !== "object")
258
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
253
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
259
254
  this.send(command, optionsOrCb || {}, cb);
260
255
  }
261
256
  else {
262
257
  return this.send(command, optionsOrCb);
263
258
  }
264
- };
265
- BackupGateway.prototype.updateGatewaySoftwareNow = function (args, optionsOrCb, cb) {
266
- var command = new UpdateGatewaySoftwareNowCommand(args);
259
+ }
260
+ updateGatewaySoftwareNow(args, optionsOrCb, cb) {
261
+ const command = new UpdateGatewaySoftwareNowCommand(args);
267
262
  if (typeof optionsOrCb === "function") {
268
263
  this.send(command, optionsOrCb);
269
264
  }
270
265
  else if (typeof cb === "function") {
271
266
  if (typeof optionsOrCb !== "object")
272
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
267
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
273
268
  this.send(command, optionsOrCb || {}, cb);
274
269
  }
275
270
  else {
276
271
  return this.send(command, optionsOrCb);
277
272
  }
278
- };
279
- BackupGateway.prototype.updateHypervisor = function (args, optionsOrCb, cb) {
280
- var command = new UpdateHypervisorCommand(args);
273
+ }
274
+ updateHypervisor(args, optionsOrCb, cb) {
275
+ const command = new UpdateHypervisorCommand(args);
281
276
  if (typeof optionsOrCb === "function") {
282
277
  this.send(command, optionsOrCb);
283
278
  }
284
279
  else if (typeof cb === "function") {
285
280
  if (typeof optionsOrCb !== "object")
286
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
281
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
287
282
  this.send(command, optionsOrCb || {}, cb);
288
283
  }
289
284
  else {
290
285
  return this.send(command, optionsOrCb);
291
286
  }
292
- };
293
- return BackupGateway;
294
- }(BackupGatewayClient));
295
- export { BackupGateway };
287
+ }
288
+ }
@@ -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 BackupGatewayClient = (function (_super) {
13
- __extends(BackupGatewayClient, _super);
14
- function BackupGatewayClient(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 BackupGatewayClient 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
- BackupGatewayClient.prototype.destroy = function () {
35
- _super.prototype.destroy.call(this);
36
- };
37
- return BackupGatewayClient;
38
- }(__Client));
39
- export { BackupGatewayClient };
30
+ destroy() {
31
+ super.destroy();
32
+ }
33
+ }