@aws-sdk/client-backup-gateway 3.312.0 → 3.316.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.
@@ -1,3 +1,4 @@
1
+ import { createAggregatedClient } from "@aws-sdk/smithy-client";
1
2
  import { BackupGatewayClient } from "./BackupGatewayClient";
2
3
  import { AssociateGatewayToServerCommand, } from "./commands/AssociateGatewayToServerCommand";
3
4
  import { CreateGatewayCommand, } from "./commands/CreateGatewayCommand";
@@ -24,355 +25,33 @@ import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
24
25
  import { UpdateGatewayInformationCommand, } from "./commands/UpdateGatewayInformationCommand";
25
26
  import { UpdateGatewaySoftwareNowCommand, } from "./commands/UpdateGatewaySoftwareNowCommand";
26
27
  import { UpdateHypervisorCommand, } from "./commands/UpdateHypervisorCommand";
28
+ const commands = {
29
+ AssociateGatewayToServerCommand,
30
+ CreateGatewayCommand,
31
+ DeleteGatewayCommand,
32
+ DeleteHypervisorCommand,
33
+ DisassociateGatewayFromServerCommand,
34
+ GetBandwidthRateLimitScheduleCommand,
35
+ GetGatewayCommand,
36
+ GetHypervisorCommand,
37
+ GetHypervisorPropertyMappingsCommand,
38
+ GetVirtualMachineCommand,
39
+ ImportHypervisorConfigurationCommand,
40
+ ListGatewaysCommand,
41
+ ListHypervisorsCommand,
42
+ ListTagsForResourceCommand,
43
+ ListVirtualMachinesCommand,
44
+ PutBandwidthRateLimitScheduleCommand,
45
+ PutHypervisorPropertyMappingsCommand,
46
+ PutMaintenanceStartTimeCommand,
47
+ StartVirtualMachinesMetadataSyncCommand,
48
+ TagResourceCommand,
49
+ TestHypervisorConfigurationCommand,
50
+ UntagResourceCommand,
51
+ UpdateGatewayInformationCommand,
52
+ UpdateGatewaySoftwareNowCommand,
53
+ UpdateHypervisorCommand,
54
+ };
27
55
  export class BackupGateway extends BackupGatewayClient {
28
- associateGatewayToServer(args, optionsOrCb, cb) {
29
- const command = new AssociateGatewayToServerCommand(args);
30
- if (typeof optionsOrCb === "function") {
31
- this.send(command, optionsOrCb);
32
- }
33
- else if (typeof cb === "function") {
34
- if (typeof optionsOrCb !== "object")
35
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
36
- this.send(command, optionsOrCb || {}, cb);
37
- }
38
- else {
39
- return this.send(command, optionsOrCb);
40
- }
41
- }
42
- createGateway(args, optionsOrCb, cb) {
43
- const command = new CreateGatewayCommand(args);
44
- if (typeof optionsOrCb === "function") {
45
- this.send(command, optionsOrCb);
46
- }
47
- else if (typeof cb === "function") {
48
- if (typeof optionsOrCb !== "object")
49
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
50
- this.send(command, optionsOrCb || {}, cb);
51
- }
52
- else {
53
- return this.send(command, optionsOrCb);
54
- }
55
- }
56
- deleteGateway(args, optionsOrCb, cb) {
57
- const command = new DeleteGatewayCommand(args);
58
- if (typeof optionsOrCb === "function") {
59
- this.send(command, optionsOrCb);
60
- }
61
- else if (typeof cb === "function") {
62
- if (typeof optionsOrCb !== "object")
63
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
64
- this.send(command, optionsOrCb || {}, cb);
65
- }
66
- else {
67
- return this.send(command, optionsOrCb);
68
- }
69
- }
70
- deleteHypervisor(args, optionsOrCb, cb) {
71
- const command = new DeleteHypervisorCommand(args);
72
- if (typeof optionsOrCb === "function") {
73
- this.send(command, optionsOrCb);
74
- }
75
- else if (typeof cb === "function") {
76
- if (typeof optionsOrCb !== "object")
77
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
78
- this.send(command, optionsOrCb || {}, cb);
79
- }
80
- else {
81
- return this.send(command, optionsOrCb);
82
- }
83
- }
84
- disassociateGatewayFromServer(args, optionsOrCb, cb) {
85
- const command = new DisassociateGatewayFromServerCommand(args);
86
- if (typeof optionsOrCb === "function") {
87
- this.send(command, optionsOrCb);
88
- }
89
- else if (typeof cb === "function") {
90
- if (typeof optionsOrCb !== "object")
91
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
92
- this.send(command, optionsOrCb || {}, cb);
93
- }
94
- else {
95
- return this.send(command, optionsOrCb);
96
- }
97
- }
98
- getBandwidthRateLimitSchedule(args, optionsOrCb, cb) {
99
- const command = new GetBandwidthRateLimitScheduleCommand(args);
100
- if (typeof optionsOrCb === "function") {
101
- this.send(command, optionsOrCb);
102
- }
103
- else if (typeof cb === "function") {
104
- if (typeof optionsOrCb !== "object")
105
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
106
- this.send(command, optionsOrCb || {}, cb);
107
- }
108
- else {
109
- return this.send(command, optionsOrCb);
110
- }
111
- }
112
- getGateway(args, optionsOrCb, cb) {
113
- const command = new GetGatewayCommand(args);
114
- if (typeof optionsOrCb === "function") {
115
- this.send(command, optionsOrCb);
116
- }
117
- else if (typeof cb === "function") {
118
- if (typeof optionsOrCb !== "object")
119
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
120
- this.send(command, optionsOrCb || {}, cb);
121
- }
122
- else {
123
- return this.send(command, optionsOrCb);
124
- }
125
- }
126
- getHypervisor(args, optionsOrCb, cb) {
127
- const command = new GetHypervisorCommand(args);
128
- if (typeof optionsOrCb === "function") {
129
- this.send(command, optionsOrCb);
130
- }
131
- else if (typeof cb === "function") {
132
- if (typeof optionsOrCb !== "object")
133
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
134
- this.send(command, optionsOrCb || {}, cb);
135
- }
136
- else {
137
- return this.send(command, optionsOrCb);
138
- }
139
- }
140
- getHypervisorPropertyMappings(args, optionsOrCb, cb) {
141
- const command = new GetHypervisorPropertyMappingsCommand(args);
142
- if (typeof optionsOrCb === "function") {
143
- this.send(command, optionsOrCb);
144
- }
145
- else if (typeof cb === "function") {
146
- if (typeof optionsOrCb !== "object")
147
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
148
- this.send(command, optionsOrCb || {}, cb);
149
- }
150
- else {
151
- return this.send(command, optionsOrCb);
152
- }
153
- }
154
- getVirtualMachine(args, optionsOrCb, cb) {
155
- const command = new GetVirtualMachineCommand(args);
156
- if (typeof optionsOrCb === "function") {
157
- this.send(command, optionsOrCb);
158
- }
159
- else if (typeof cb === "function") {
160
- if (typeof optionsOrCb !== "object")
161
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
162
- this.send(command, optionsOrCb || {}, cb);
163
- }
164
- else {
165
- return this.send(command, optionsOrCb);
166
- }
167
- }
168
- importHypervisorConfiguration(args, optionsOrCb, cb) {
169
- const command = new ImportHypervisorConfigurationCommand(args);
170
- if (typeof optionsOrCb === "function") {
171
- this.send(command, optionsOrCb);
172
- }
173
- else if (typeof cb === "function") {
174
- if (typeof optionsOrCb !== "object")
175
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
176
- this.send(command, optionsOrCb || {}, cb);
177
- }
178
- else {
179
- return this.send(command, optionsOrCb);
180
- }
181
- }
182
- listGateways(args, optionsOrCb, cb) {
183
- const command = new ListGatewaysCommand(args);
184
- if (typeof optionsOrCb === "function") {
185
- this.send(command, optionsOrCb);
186
- }
187
- else if (typeof cb === "function") {
188
- if (typeof optionsOrCb !== "object")
189
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
190
- this.send(command, optionsOrCb || {}, cb);
191
- }
192
- else {
193
- return this.send(command, optionsOrCb);
194
- }
195
- }
196
- listHypervisors(args, optionsOrCb, cb) {
197
- const command = new ListHypervisorsCommand(args);
198
- if (typeof optionsOrCb === "function") {
199
- this.send(command, optionsOrCb);
200
- }
201
- else if (typeof cb === "function") {
202
- if (typeof optionsOrCb !== "object")
203
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
204
- this.send(command, optionsOrCb || {}, cb);
205
- }
206
- else {
207
- return this.send(command, optionsOrCb);
208
- }
209
- }
210
- listTagsForResource(args, optionsOrCb, cb) {
211
- const command = new ListTagsForResourceCommand(args);
212
- if (typeof optionsOrCb === "function") {
213
- this.send(command, optionsOrCb);
214
- }
215
- else if (typeof cb === "function") {
216
- if (typeof optionsOrCb !== "object")
217
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
218
- this.send(command, optionsOrCb || {}, cb);
219
- }
220
- else {
221
- return this.send(command, optionsOrCb);
222
- }
223
- }
224
- listVirtualMachines(args, optionsOrCb, cb) {
225
- const command = new ListVirtualMachinesCommand(args);
226
- if (typeof optionsOrCb === "function") {
227
- this.send(command, optionsOrCb);
228
- }
229
- else if (typeof cb === "function") {
230
- if (typeof optionsOrCb !== "object")
231
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
232
- this.send(command, optionsOrCb || {}, cb);
233
- }
234
- else {
235
- return this.send(command, optionsOrCb);
236
- }
237
- }
238
- putBandwidthRateLimitSchedule(args, optionsOrCb, cb) {
239
- const command = new PutBandwidthRateLimitScheduleCommand(args);
240
- if (typeof optionsOrCb === "function") {
241
- this.send(command, optionsOrCb);
242
- }
243
- else if (typeof cb === "function") {
244
- if (typeof optionsOrCb !== "object")
245
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
246
- this.send(command, optionsOrCb || {}, cb);
247
- }
248
- else {
249
- return this.send(command, optionsOrCb);
250
- }
251
- }
252
- putHypervisorPropertyMappings(args, optionsOrCb, cb) {
253
- const command = new PutHypervisorPropertyMappingsCommand(args);
254
- if (typeof optionsOrCb === "function") {
255
- this.send(command, optionsOrCb);
256
- }
257
- else if (typeof cb === "function") {
258
- if (typeof optionsOrCb !== "object")
259
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
260
- this.send(command, optionsOrCb || {}, cb);
261
- }
262
- else {
263
- return this.send(command, optionsOrCb);
264
- }
265
- }
266
- putMaintenanceStartTime(args, optionsOrCb, cb) {
267
- const command = new PutMaintenanceStartTimeCommand(args);
268
- if (typeof optionsOrCb === "function") {
269
- this.send(command, optionsOrCb);
270
- }
271
- else if (typeof cb === "function") {
272
- if (typeof optionsOrCb !== "object")
273
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
274
- this.send(command, optionsOrCb || {}, cb);
275
- }
276
- else {
277
- return this.send(command, optionsOrCb);
278
- }
279
- }
280
- startVirtualMachinesMetadataSync(args, optionsOrCb, cb) {
281
- const command = new StartVirtualMachinesMetadataSyncCommand(args);
282
- if (typeof optionsOrCb === "function") {
283
- this.send(command, optionsOrCb);
284
- }
285
- else if (typeof cb === "function") {
286
- if (typeof optionsOrCb !== "object")
287
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
288
- this.send(command, optionsOrCb || {}, cb);
289
- }
290
- else {
291
- return this.send(command, optionsOrCb);
292
- }
293
- }
294
- tagResource(args, optionsOrCb, cb) {
295
- const command = new TagResourceCommand(args);
296
- if (typeof optionsOrCb === "function") {
297
- this.send(command, optionsOrCb);
298
- }
299
- else if (typeof cb === "function") {
300
- if (typeof optionsOrCb !== "object")
301
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
302
- this.send(command, optionsOrCb || {}, cb);
303
- }
304
- else {
305
- return this.send(command, optionsOrCb);
306
- }
307
- }
308
- testHypervisorConfiguration(args, optionsOrCb, cb) {
309
- const command = new TestHypervisorConfigurationCommand(args);
310
- if (typeof optionsOrCb === "function") {
311
- this.send(command, optionsOrCb);
312
- }
313
- else if (typeof cb === "function") {
314
- if (typeof optionsOrCb !== "object")
315
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
316
- this.send(command, optionsOrCb || {}, cb);
317
- }
318
- else {
319
- return this.send(command, optionsOrCb);
320
- }
321
- }
322
- untagResource(args, optionsOrCb, cb) {
323
- const command = new UntagResourceCommand(args);
324
- if (typeof optionsOrCb === "function") {
325
- this.send(command, optionsOrCb);
326
- }
327
- else if (typeof cb === "function") {
328
- if (typeof optionsOrCb !== "object")
329
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
330
- this.send(command, optionsOrCb || {}, cb);
331
- }
332
- else {
333
- return this.send(command, optionsOrCb);
334
- }
335
- }
336
- updateGatewayInformation(args, optionsOrCb, cb) {
337
- const command = new UpdateGatewayInformationCommand(args);
338
- if (typeof optionsOrCb === "function") {
339
- this.send(command, optionsOrCb);
340
- }
341
- else if (typeof cb === "function") {
342
- if (typeof optionsOrCb !== "object")
343
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
344
- this.send(command, optionsOrCb || {}, cb);
345
- }
346
- else {
347
- return this.send(command, optionsOrCb);
348
- }
349
- }
350
- updateGatewaySoftwareNow(args, optionsOrCb, cb) {
351
- const command = new UpdateGatewaySoftwareNowCommand(args);
352
- if (typeof optionsOrCb === "function") {
353
- this.send(command, optionsOrCb);
354
- }
355
- else if (typeof cb === "function") {
356
- if (typeof optionsOrCb !== "object")
357
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
358
- this.send(command, optionsOrCb || {}, cb);
359
- }
360
- else {
361
- return this.send(command, optionsOrCb);
362
- }
363
- }
364
- updateHypervisor(args, optionsOrCb, cb) {
365
- const command = new UpdateHypervisorCommand(args);
366
- if (typeof optionsOrCb === "function") {
367
- this.send(command, optionsOrCb);
368
- }
369
- else if (typeof cb === "function") {
370
- if (typeof optionsOrCb !== "object")
371
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
372
- this.send(command, optionsOrCb || {}, cb);
373
- }
374
- else {
375
- return this.send(command, optionsOrCb);
376
- }
377
- }
378
56
  }
57
+ createAggregatedClient(commands, BackupGateway);