@aws-sdk/client-rbin 3.490.0 → 3.495.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist-cjs/index.js CHANGED
@@ -1,12 +1,1217 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RbinServiceException = void 0;
4
- const tslib_1 = require("tslib");
5
- tslib_1.__exportStar(require("./RbinClient"), exports);
6
- tslib_1.__exportStar(require("./Rbin"), exports);
7
- tslib_1.__exportStar(require("./commands"), exports);
8
- tslib_1.__exportStar(require("./pagination"), exports);
9
- tslib_1.__exportStar(require("./models"), exports);
10
- require("@aws-sdk/util-endpoints");
11
- var RbinServiceException_1 = require("./models/RbinServiceException");
12
- Object.defineProperty(exports, "RbinServiceException", { enumerable: true, get: function () { return RbinServiceException_1.RbinServiceException; } });
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/index.ts
22
+ var src_exports = {};
23
+ __export(src_exports, {
24
+ ConflictException: () => ConflictException,
25
+ ConflictExceptionReason: () => ConflictExceptionReason,
26
+ CreateRuleCommand: () => CreateRuleCommand,
27
+ DeleteRuleCommand: () => DeleteRuleCommand,
28
+ GetRuleCommand: () => GetRuleCommand,
29
+ InternalServerException: () => InternalServerException,
30
+ ListRulesCommand: () => ListRulesCommand,
31
+ ListTagsForResourceCommand: () => ListTagsForResourceCommand,
32
+ LockRuleCommand: () => LockRuleCommand,
33
+ LockState: () => LockState,
34
+ Rbin: () => Rbin,
35
+ RbinClient: () => RbinClient,
36
+ RbinServiceException: () => RbinServiceException,
37
+ ResourceNotFoundException: () => ResourceNotFoundException,
38
+ ResourceNotFoundExceptionReason: () => ResourceNotFoundExceptionReason,
39
+ ResourceType: () => ResourceType,
40
+ RetentionPeriodUnit: () => RetentionPeriodUnit,
41
+ RuleStatus: () => RuleStatus,
42
+ ServiceQuotaExceededException: () => ServiceQuotaExceededException,
43
+ ServiceQuotaExceededExceptionReason: () => ServiceQuotaExceededExceptionReason,
44
+ TagResourceCommand: () => TagResourceCommand,
45
+ UnlockDelayUnit: () => UnlockDelayUnit,
46
+ UnlockRuleCommand: () => UnlockRuleCommand,
47
+ UntagResourceCommand: () => UntagResourceCommand,
48
+ UpdateRuleCommand: () => UpdateRuleCommand,
49
+ ValidationException: () => ValidationException,
50
+ ValidationExceptionReason: () => ValidationExceptionReason,
51
+ __Client: () => import_smithy_client.Client,
52
+ paginateListRules: () => paginateListRules
53
+ });
54
+ module.exports = __toCommonJS(src_exports);
55
+
56
+ // src/RbinClient.ts
57
+ var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
58
+ var import_middleware_logger = require("@aws-sdk/middleware-logger");
59
+ var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
60
+ var import_middleware_signing = require("@aws-sdk/middleware-signing");
61
+ var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
62
+ var import_config_resolver = require("@smithy/config-resolver");
63
+ var import_middleware_content_length = require("@smithy/middleware-content-length");
64
+ var import_middleware_endpoint = require("@smithy/middleware-endpoint");
65
+ var import_middleware_retry = require("@smithy/middleware-retry");
66
+
67
+
68
+ // src/endpoint/EndpointParameters.ts
69
+ var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
70
+ return {
71
+ ...options,
72
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
73
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
74
+ defaultSigningName: "rbin"
75
+ };
76
+ }, "resolveClientEndpointParameters");
77
+ var commonParams = {
78
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
79
+ Endpoint: { type: "builtInParams", name: "endpoint" },
80
+ Region: { type: "builtInParams", name: "region" },
81
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
82
+ };
83
+
84
+ // src/RbinClient.ts
85
+ var import_runtimeConfig = require("././runtimeConfig");
86
+
87
+ // src/runtimeExtensions.ts
88
+ var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
89
+ var import_protocol_http = require("@smithy/protocol-http");
90
+ var import_smithy_client = require("@smithy/smithy-client");
91
+ var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
92
+ var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
93
+ const extensionConfiguration = {
94
+ ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
95
+ ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
96
+ ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
97
+ };
98
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
99
+ return {
100
+ ...runtimeConfig,
101
+ ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
102
+ ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
103
+ ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
104
+ };
105
+ }, "resolveRuntimeExtensions");
106
+
107
+ // src/RbinClient.ts
108
+ var _RbinClient = class _RbinClient extends import_smithy_client.Client {
109
+ constructor(...[configuration]) {
110
+ const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
111
+ const _config_1 = resolveClientEndpointParameters(_config_0);
112
+ const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);
113
+ const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
114
+ const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
115
+ const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
116
+ const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5);
117
+ const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6);
118
+ const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
119
+ super(_config_8);
120
+ this.config = _config_8;
121
+ this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
122
+ this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
123
+ this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
124
+ this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
125
+ this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
126
+ this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
127
+ this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
128
+ }
129
+ /**
130
+ * Destroy underlying resources, like sockets. It's usually not necessary to do this.
131
+ * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
132
+ * Otherwise, sockets might stay open for quite a long time before the server terminates them.
133
+ */
134
+ destroy() {
135
+ super.destroy();
136
+ }
137
+ };
138
+ __name(_RbinClient, "RbinClient");
139
+ var RbinClient = _RbinClient;
140
+
141
+ // src/Rbin.ts
142
+
143
+
144
+ // src/commands/CreateRuleCommand.ts
145
+
146
+ var import_middleware_serde = require("@smithy/middleware-serde");
147
+
148
+ var import_types = require("@smithy/types");
149
+
150
+ // src/protocols/Aws_restJson1.ts
151
+ var import_core = require("@smithy/core");
152
+
153
+
154
+ // src/models/RbinServiceException.ts
155
+
156
+ var _RbinServiceException = class _RbinServiceException extends import_smithy_client.ServiceException {
157
+ /**
158
+ * @internal
159
+ */
160
+ constructor(options) {
161
+ super(options);
162
+ Object.setPrototypeOf(this, _RbinServiceException.prototype);
163
+ }
164
+ };
165
+ __name(_RbinServiceException, "RbinServiceException");
166
+ var RbinServiceException = _RbinServiceException;
167
+
168
+ // src/models/models_0.ts
169
+ var UnlockDelayUnit = {
170
+ DAYS: "DAYS"
171
+ };
172
+ var ResourceType = {
173
+ EBS_SNAPSHOT: "EBS_SNAPSHOT",
174
+ EC2_IMAGE: "EC2_IMAGE"
175
+ };
176
+ var RetentionPeriodUnit = {
177
+ DAYS: "DAYS"
178
+ };
179
+ var LockState = {
180
+ LOCKED: "locked",
181
+ PENDING_UNLOCK: "pending_unlock",
182
+ UNLOCKED: "unlocked"
183
+ };
184
+ var RuleStatus = {
185
+ AVAILABLE: "available",
186
+ PENDING: "pending"
187
+ };
188
+ var _InternalServerException = class _InternalServerException extends RbinServiceException {
189
+ /**
190
+ * @internal
191
+ */
192
+ constructor(opts) {
193
+ super({
194
+ name: "InternalServerException",
195
+ $fault: "server",
196
+ ...opts
197
+ });
198
+ this.name = "InternalServerException";
199
+ this.$fault = "server";
200
+ Object.setPrototypeOf(this, _InternalServerException.prototype);
201
+ this.Message = opts.Message;
202
+ }
203
+ };
204
+ __name(_InternalServerException, "InternalServerException");
205
+ var InternalServerException = _InternalServerException;
206
+ var ServiceQuotaExceededExceptionReason = {
207
+ SERVICE_QUOTA_EXCEEDED: "SERVICE_QUOTA_EXCEEDED"
208
+ };
209
+ var _ServiceQuotaExceededException = class _ServiceQuotaExceededException extends RbinServiceException {
210
+ /**
211
+ * @internal
212
+ */
213
+ constructor(opts) {
214
+ super({
215
+ name: "ServiceQuotaExceededException",
216
+ $fault: "client",
217
+ ...opts
218
+ });
219
+ this.name = "ServiceQuotaExceededException";
220
+ this.$fault = "client";
221
+ Object.setPrototypeOf(this, _ServiceQuotaExceededException.prototype);
222
+ this.Message = opts.Message;
223
+ this.Reason = opts.Reason;
224
+ }
225
+ };
226
+ __name(_ServiceQuotaExceededException, "ServiceQuotaExceededException");
227
+ var ServiceQuotaExceededException = _ServiceQuotaExceededException;
228
+ var ValidationExceptionReason = {
229
+ INVALID_PAGE_TOKEN: "INVALID_PAGE_TOKEN",
230
+ INVALID_PARAMETER_VALUE: "INVALID_PARAMETER_VALUE"
231
+ };
232
+ var _ValidationException = class _ValidationException extends RbinServiceException {
233
+ /**
234
+ * @internal
235
+ */
236
+ constructor(opts) {
237
+ super({
238
+ name: "ValidationException",
239
+ $fault: "client",
240
+ ...opts
241
+ });
242
+ this.name = "ValidationException";
243
+ this.$fault = "client";
244
+ Object.setPrototypeOf(this, _ValidationException.prototype);
245
+ this.Message = opts.Message;
246
+ this.Reason = opts.Reason;
247
+ }
248
+ };
249
+ __name(_ValidationException, "ValidationException");
250
+ var ValidationException = _ValidationException;
251
+ var ConflictExceptionReason = {
252
+ INVALID_RULE_STATE: "INVALID_RULE_STATE"
253
+ };
254
+ var _ConflictException = class _ConflictException extends RbinServiceException {
255
+ /**
256
+ * @internal
257
+ */
258
+ constructor(opts) {
259
+ super({
260
+ name: "ConflictException",
261
+ $fault: "client",
262
+ ...opts
263
+ });
264
+ this.name = "ConflictException";
265
+ this.$fault = "client";
266
+ Object.setPrototypeOf(this, _ConflictException.prototype);
267
+ this.Message = opts.Message;
268
+ this.Reason = opts.Reason;
269
+ }
270
+ };
271
+ __name(_ConflictException, "ConflictException");
272
+ var ConflictException = _ConflictException;
273
+ var ResourceNotFoundExceptionReason = {
274
+ RULE_NOT_FOUND: "RULE_NOT_FOUND"
275
+ };
276
+ var _ResourceNotFoundException = class _ResourceNotFoundException extends RbinServiceException {
277
+ /**
278
+ * @internal
279
+ */
280
+ constructor(opts) {
281
+ super({
282
+ name: "ResourceNotFoundException",
283
+ $fault: "client",
284
+ ...opts
285
+ });
286
+ this.name = "ResourceNotFoundException";
287
+ this.$fault = "client";
288
+ Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
289
+ this.Message = opts.Message;
290
+ this.Reason = opts.Reason;
291
+ }
292
+ };
293
+ __name(_ResourceNotFoundException, "ResourceNotFoundException");
294
+ var ResourceNotFoundException = _ResourceNotFoundException;
295
+
296
+ // src/protocols/Aws_restJson1.ts
297
+ var se_CreateRuleCommand = /* @__PURE__ */ __name(async (input, context) => {
298
+ const b = (0, import_core.requestBuilder)(input, context);
299
+ const headers = {
300
+ "content-type": "application/json"
301
+ };
302
+ b.bp("/rules");
303
+ let body;
304
+ body = JSON.stringify(
305
+ (0, import_smithy_client.take)(input, {
306
+ Description: [],
307
+ LockConfiguration: (_) => (0, import_smithy_client._json)(_),
308
+ ResourceTags: (_) => (0, import_smithy_client._json)(_),
309
+ ResourceType: [],
310
+ RetentionPeriod: (_) => (0, import_smithy_client._json)(_),
311
+ Tags: (_) => (0, import_smithy_client._json)(_)
312
+ })
313
+ );
314
+ b.m("POST").h(headers).b(body);
315
+ return b.build();
316
+ }, "se_CreateRuleCommand");
317
+ var se_DeleteRuleCommand = /* @__PURE__ */ __name(async (input, context) => {
318
+ const b = (0, import_core.requestBuilder)(input, context);
319
+ const headers = {};
320
+ b.bp("/rules/{Identifier}");
321
+ b.p("Identifier", () => input.Identifier, "{Identifier}", false);
322
+ let body;
323
+ b.m("DELETE").h(headers).b(body);
324
+ return b.build();
325
+ }, "se_DeleteRuleCommand");
326
+ var se_GetRuleCommand = /* @__PURE__ */ __name(async (input, context) => {
327
+ const b = (0, import_core.requestBuilder)(input, context);
328
+ const headers = {};
329
+ b.bp("/rules/{Identifier}");
330
+ b.p("Identifier", () => input.Identifier, "{Identifier}", false);
331
+ let body;
332
+ b.m("GET").h(headers).b(body);
333
+ return b.build();
334
+ }, "se_GetRuleCommand");
335
+ var se_ListRulesCommand = /* @__PURE__ */ __name(async (input, context) => {
336
+ const b = (0, import_core.requestBuilder)(input, context);
337
+ const headers = {
338
+ "content-type": "application/json"
339
+ };
340
+ b.bp("/list-rules");
341
+ let body;
342
+ body = JSON.stringify(
343
+ (0, import_smithy_client.take)(input, {
344
+ LockState: [],
345
+ MaxResults: [],
346
+ NextToken: [],
347
+ ResourceTags: (_) => (0, import_smithy_client._json)(_),
348
+ ResourceType: []
349
+ })
350
+ );
351
+ b.m("POST").h(headers).b(body);
352
+ return b.build();
353
+ }, "se_ListRulesCommand");
354
+ var se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
355
+ const b = (0, import_core.requestBuilder)(input, context);
356
+ const headers = {};
357
+ b.bp("/tags/{ResourceArn}");
358
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
359
+ let body;
360
+ b.m("GET").h(headers).b(body);
361
+ return b.build();
362
+ }, "se_ListTagsForResourceCommand");
363
+ var se_LockRuleCommand = /* @__PURE__ */ __name(async (input, context) => {
364
+ const b = (0, import_core.requestBuilder)(input, context);
365
+ const headers = {
366
+ "content-type": "application/json"
367
+ };
368
+ b.bp("/rules/{Identifier}/lock");
369
+ b.p("Identifier", () => input.Identifier, "{Identifier}", false);
370
+ let body;
371
+ body = JSON.stringify(
372
+ (0, import_smithy_client.take)(input, {
373
+ LockConfiguration: (_) => (0, import_smithy_client._json)(_)
374
+ })
375
+ );
376
+ b.m("PATCH").h(headers).b(body);
377
+ return b.build();
378
+ }, "se_LockRuleCommand");
379
+ var se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
380
+ const b = (0, import_core.requestBuilder)(input, context);
381
+ const headers = {
382
+ "content-type": "application/json"
383
+ };
384
+ b.bp("/tags/{ResourceArn}");
385
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
386
+ let body;
387
+ body = JSON.stringify(
388
+ (0, import_smithy_client.take)(input, {
389
+ Tags: (_) => (0, import_smithy_client._json)(_)
390
+ })
391
+ );
392
+ b.m("POST").h(headers).b(body);
393
+ return b.build();
394
+ }, "se_TagResourceCommand");
395
+ var se_UnlockRuleCommand = /* @__PURE__ */ __name(async (input, context) => {
396
+ const b = (0, import_core.requestBuilder)(input, context);
397
+ const headers = {};
398
+ b.bp("/rules/{Identifier}/unlock");
399
+ b.p("Identifier", () => input.Identifier, "{Identifier}", false);
400
+ let body;
401
+ b.m("PATCH").h(headers).b(body);
402
+ return b.build();
403
+ }, "se_UnlockRuleCommand");
404
+ var se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
405
+ const b = (0, import_core.requestBuilder)(input, context);
406
+ const headers = {};
407
+ b.bp("/tags/{ResourceArn}");
408
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
409
+ const query = (0, import_smithy_client.map)({
410
+ [_tK]: [
411
+ (0, import_smithy_client.expectNonNull)(input.TagKeys, `TagKeys`) != null,
412
+ () => (input[_TK] || []).map((_entry) => _entry)
413
+ ]
414
+ });
415
+ let body;
416
+ b.m("DELETE").h(headers).q(query).b(body);
417
+ return b.build();
418
+ }, "se_UntagResourceCommand");
419
+ var se_UpdateRuleCommand = /* @__PURE__ */ __name(async (input, context) => {
420
+ const b = (0, import_core.requestBuilder)(input, context);
421
+ const headers = {
422
+ "content-type": "application/json"
423
+ };
424
+ b.bp("/rules/{Identifier}");
425
+ b.p("Identifier", () => input.Identifier, "{Identifier}", false);
426
+ let body;
427
+ body = JSON.stringify(
428
+ (0, import_smithy_client.take)(input, {
429
+ Description: [],
430
+ ResourceTags: (_) => (0, import_smithy_client._json)(_),
431
+ ResourceType: [],
432
+ RetentionPeriod: (_) => (0, import_smithy_client._json)(_)
433
+ })
434
+ );
435
+ b.m("PATCH").h(headers).b(body);
436
+ return b.build();
437
+ }, "se_UpdateRuleCommand");
438
+ var de_CreateRuleCommand = /* @__PURE__ */ __name(async (output, context) => {
439
+ if (output.statusCode !== 201 && output.statusCode >= 300) {
440
+ return de_CreateRuleCommandError(output, context);
441
+ }
442
+ const contents = (0, import_smithy_client.map)({
443
+ $metadata: deserializeMetadata(output)
444
+ });
445
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
446
+ const doc = (0, import_smithy_client.take)(data, {
447
+ Description: import_smithy_client.expectString,
448
+ Identifier: import_smithy_client.expectString,
449
+ LockConfiguration: import_smithy_client._json,
450
+ LockState: import_smithy_client.expectString,
451
+ ResourceTags: import_smithy_client._json,
452
+ ResourceType: import_smithy_client.expectString,
453
+ RetentionPeriod: import_smithy_client._json,
454
+ RuleArn: import_smithy_client.expectString,
455
+ Status: import_smithy_client.expectString,
456
+ Tags: import_smithy_client._json
457
+ });
458
+ Object.assign(contents, doc);
459
+ return contents;
460
+ }, "de_CreateRuleCommand");
461
+ var de_CreateRuleCommandError = /* @__PURE__ */ __name(async (output, context) => {
462
+ const parsedOutput = {
463
+ ...output,
464
+ body: await parseErrorBody(output.body, context)
465
+ };
466
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
467
+ switch (errorCode) {
468
+ case "InternalServerException":
469
+ case "com.amazonaws.rbin#InternalServerException":
470
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
471
+ case "ServiceQuotaExceededException":
472
+ case "com.amazonaws.rbin#ServiceQuotaExceededException":
473
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
474
+ case "ValidationException":
475
+ case "com.amazonaws.rbin#ValidationException":
476
+ throw await de_ValidationExceptionRes(parsedOutput, context);
477
+ default:
478
+ const parsedBody = parsedOutput.body;
479
+ return throwDefaultError({
480
+ output,
481
+ parsedBody,
482
+ errorCode
483
+ });
484
+ }
485
+ }, "de_CreateRuleCommandError");
486
+ var de_DeleteRuleCommand = /* @__PURE__ */ __name(async (output, context) => {
487
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
488
+ return de_DeleteRuleCommandError(output, context);
489
+ }
490
+ const contents = (0, import_smithy_client.map)({
491
+ $metadata: deserializeMetadata(output)
492
+ });
493
+ await (0, import_smithy_client.collectBody)(output.body, context);
494
+ return contents;
495
+ }, "de_DeleteRuleCommand");
496
+ var de_DeleteRuleCommandError = /* @__PURE__ */ __name(async (output, context) => {
497
+ const parsedOutput = {
498
+ ...output,
499
+ body: await parseErrorBody(output.body, context)
500
+ };
501
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
502
+ switch (errorCode) {
503
+ case "ConflictException":
504
+ case "com.amazonaws.rbin#ConflictException":
505
+ throw await de_ConflictExceptionRes(parsedOutput, context);
506
+ case "InternalServerException":
507
+ case "com.amazonaws.rbin#InternalServerException":
508
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
509
+ case "ResourceNotFoundException":
510
+ case "com.amazonaws.rbin#ResourceNotFoundException":
511
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
512
+ case "ValidationException":
513
+ case "com.amazonaws.rbin#ValidationException":
514
+ throw await de_ValidationExceptionRes(parsedOutput, context);
515
+ default:
516
+ const parsedBody = parsedOutput.body;
517
+ return throwDefaultError({
518
+ output,
519
+ parsedBody,
520
+ errorCode
521
+ });
522
+ }
523
+ }, "de_DeleteRuleCommandError");
524
+ var de_GetRuleCommand = /* @__PURE__ */ __name(async (output, context) => {
525
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
526
+ return de_GetRuleCommandError(output, context);
527
+ }
528
+ const contents = (0, import_smithy_client.map)({
529
+ $metadata: deserializeMetadata(output)
530
+ });
531
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
532
+ const doc = (0, import_smithy_client.take)(data, {
533
+ Description: import_smithy_client.expectString,
534
+ Identifier: import_smithy_client.expectString,
535
+ LockConfiguration: import_smithy_client._json,
536
+ LockEndTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
537
+ LockState: import_smithy_client.expectString,
538
+ ResourceTags: import_smithy_client._json,
539
+ ResourceType: import_smithy_client.expectString,
540
+ RetentionPeriod: import_smithy_client._json,
541
+ RuleArn: import_smithy_client.expectString,
542
+ Status: import_smithy_client.expectString
543
+ });
544
+ Object.assign(contents, doc);
545
+ return contents;
546
+ }, "de_GetRuleCommand");
547
+ var de_GetRuleCommandError = /* @__PURE__ */ __name(async (output, context) => {
548
+ const parsedOutput = {
549
+ ...output,
550
+ body: await parseErrorBody(output.body, context)
551
+ };
552
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
553
+ switch (errorCode) {
554
+ case "InternalServerException":
555
+ case "com.amazonaws.rbin#InternalServerException":
556
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
557
+ case "ResourceNotFoundException":
558
+ case "com.amazonaws.rbin#ResourceNotFoundException":
559
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
560
+ case "ValidationException":
561
+ case "com.amazonaws.rbin#ValidationException":
562
+ throw await de_ValidationExceptionRes(parsedOutput, context);
563
+ default:
564
+ const parsedBody = parsedOutput.body;
565
+ return throwDefaultError({
566
+ output,
567
+ parsedBody,
568
+ errorCode
569
+ });
570
+ }
571
+ }, "de_GetRuleCommandError");
572
+ var de_ListRulesCommand = /* @__PURE__ */ __name(async (output, context) => {
573
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
574
+ return de_ListRulesCommandError(output, context);
575
+ }
576
+ const contents = (0, import_smithy_client.map)({
577
+ $metadata: deserializeMetadata(output)
578
+ });
579
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
580
+ const doc = (0, import_smithy_client.take)(data, {
581
+ NextToken: import_smithy_client.expectString,
582
+ Rules: import_smithy_client._json
583
+ });
584
+ Object.assign(contents, doc);
585
+ return contents;
586
+ }, "de_ListRulesCommand");
587
+ var de_ListRulesCommandError = /* @__PURE__ */ __name(async (output, context) => {
588
+ const parsedOutput = {
589
+ ...output,
590
+ body: await parseErrorBody(output.body, context)
591
+ };
592
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
593
+ switch (errorCode) {
594
+ case "InternalServerException":
595
+ case "com.amazonaws.rbin#InternalServerException":
596
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
597
+ case "ValidationException":
598
+ case "com.amazonaws.rbin#ValidationException":
599
+ throw await de_ValidationExceptionRes(parsedOutput, context);
600
+ default:
601
+ const parsedBody = parsedOutput.body;
602
+ return throwDefaultError({
603
+ output,
604
+ parsedBody,
605
+ errorCode
606
+ });
607
+ }
608
+ }, "de_ListRulesCommandError");
609
+ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
610
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
611
+ return de_ListTagsForResourceCommandError(output, context);
612
+ }
613
+ const contents = (0, import_smithy_client.map)({
614
+ $metadata: deserializeMetadata(output)
615
+ });
616
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
617
+ const doc = (0, import_smithy_client.take)(data, {
618
+ Tags: import_smithy_client._json
619
+ });
620
+ Object.assign(contents, doc);
621
+ return contents;
622
+ }, "de_ListTagsForResourceCommand");
623
+ var de_ListTagsForResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
624
+ const parsedOutput = {
625
+ ...output,
626
+ body: await parseErrorBody(output.body, context)
627
+ };
628
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
629
+ switch (errorCode) {
630
+ case "InternalServerException":
631
+ case "com.amazonaws.rbin#InternalServerException":
632
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
633
+ case "ResourceNotFoundException":
634
+ case "com.amazonaws.rbin#ResourceNotFoundException":
635
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
636
+ case "ValidationException":
637
+ case "com.amazonaws.rbin#ValidationException":
638
+ throw await de_ValidationExceptionRes(parsedOutput, context);
639
+ default:
640
+ const parsedBody = parsedOutput.body;
641
+ return throwDefaultError({
642
+ output,
643
+ parsedBody,
644
+ errorCode
645
+ });
646
+ }
647
+ }, "de_ListTagsForResourceCommandError");
648
+ var de_LockRuleCommand = /* @__PURE__ */ __name(async (output, context) => {
649
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
650
+ return de_LockRuleCommandError(output, context);
651
+ }
652
+ const contents = (0, import_smithy_client.map)({
653
+ $metadata: deserializeMetadata(output)
654
+ });
655
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
656
+ const doc = (0, import_smithy_client.take)(data, {
657
+ Description: import_smithy_client.expectString,
658
+ Identifier: import_smithy_client.expectString,
659
+ LockConfiguration: import_smithy_client._json,
660
+ LockState: import_smithy_client.expectString,
661
+ ResourceTags: import_smithy_client._json,
662
+ ResourceType: import_smithy_client.expectString,
663
+ RetentionPeriod: import_smithy_client._json,
664
+ RuleArn: import_smithy_client.expectString,
665
+ Status: import_smithy_client.expectString
666
+ });
667
+ Object.assign(contents, doc);
668
+ return contents;
669
+ }, "de_LockRuleCommand");
670
+ var de_LockRuleCommandError = /* @__PURE__ */ __name(async (output, context) => {
671
+ const parsedOutput = {
672
+ ...output,
673
+ body: await parseErrorBody(output.body, context)
674
+ };
675
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
676
+ switch (errorCode) {
677
+ case "ConflictException":
678
+ case "com.amazonaws.rbin#ConflictException":
679
+ throw await de_ConflictExceptionRes(parsedOutput, context);
680
+ case "InternalServerException":
681
+ case "com.amazonaws.rbin#InternalServerException":
682
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
683
+ case "ResourceNotFoundException":
684
+ case "com.amazonaws.rbin#ResourceNotFoundException":
685
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
686
+ case "ValidationException":
687
+ case "com.amazonaws.rbin#ValidationException":
688
+ throw await de_ValidationExceptionRes(parsedOutput, context);
689
+ default:
690
+ const parsedBody = parsedOutput.body;
691
+ return throwDefaultError({
692
+ output,
693
+ parsedBody,
694
+ errorCode
695
+ });
696
+ }
697
+ }, "de_LockRuleCommandError");
698
+ var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
699
+ if (output.statusCode !== 201 && output.statusCode >= 300) {
700
+ return de_TagResourceCommandError(output, context);
701
+ }
702
+ const contents = (0, import_smithy_client.map)({
703
+ $metadata: deserializeMetadata(output)
704
+ });
705
+ await (0, import_smithy_client.collectBody)(output.body, context);
706
+ return contents;
707
+ }, "de_TagResourceCommand");
708
+ var de_TagResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
709
+ const parsedOutput = {
710
+ ...output,
711
+ body: await parseErrorBody(output.body, context)
712
+ };
713
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
714
+ switch (errorCode) {
715
+ case "InternalServerException":
716
+ case "com.amazonaws.rbin#InternalServerException":
717
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
718
+ case "ResourceNotFoundException":
719
+ case "com.amazonaws.rbin#ResourceNotFoundException":
720
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
721
+ case "ServiceQuotaExceededException":
722
+ case "com.amazonaws.rbin#ServiceQuotaExceededException":
723
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
724
+ case "ValidationException":
725
+ case "com.amazonaws.rbin#ValidationException":
726
+ throw await de_ValidationExceptionRes(parsedOutput, context);
727
+ default:
728
+ const parsedBody = parsedOutput.body;
729
+ return throwDefaultError({
730
+ output,
731
+ parsedBody,
732
+ errorCode
733
+ });
734
+ }
735
+ }, "de_TagResourceCommandError");
736
+ var de_UnlockRuleCommand = /* @__PURE__ */ __name(async (output, context) => {
737
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
738
+ return de_UnlockRuleCommandError(output, context);
739
+ }
740
+ const contents = (0, import_smithy_client.map)({
741
+ $metadata: deserializeMetadata(output)
742
+ });
743
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
744
+ const doc = (0, import_smithy_client.take)(data, {
745
+ Description: import_smithy_client.expectString,
746
+ Identifier: import_smithy_client.expectString,
747
+ LockConfiguration: import_smithy_client._json,
748
+ LockEndTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
749
+ LockState: import_smithy_client.expectString,
750
+ ResourceTags: import_smithy_client._json,
751
+ ResourceType: import_smithy_client.expectString,
752
+ RetentionPeriod: import_smithy_client._json,
753
+ RuleArn: import_smithy_client.expectString,
754
+ Status: import_smithy_client.expectString
755
+ });
756
+ Object.assign(contents, doc);
757
+ return contents;
758
+ }, "de_UnlockRuleCommand");
759
+ var de_UnlockRuleCommandError = /* @__PURE__ */ __name(async (output, context) => {
760
+ const parsedOutput = {
761
+ ...output,
762
+ body: await parseErrorBody(output.body, context)
763
+ };
764
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
765
+ switch (errorCode) {
766
+ case "ConflictException":
767
+ case "com.amazonaws.rbin#ConflictException":
768
+ throw await de_ConflictExceptionRes(parsedOutput, context);
769
+ case "InternalServerException":
770
+ case "com.amazonaws.rbin#InternalServerException":
771
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
772
+ case "ResourceNotFoundException":
773
+ case "com.amazonaws.rbin#ResourceNotFoundException":
774
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
775
+ case "ValidationException":
776
+ case "com.amazonaws.rbin#ValidationException":
777
+ throw await de_ValidationExceptionRes(parsedOutput, context);
778
+ default:
779
+ const parsedBody = parsedOutput.body;
780
+ return throwDefaultError({
781
+ output,
782
+ parsedBody,
783
+ errorCode
784
+ });
785
+ }
786
+ }, "de_UnlockRuleCommandError");
787
+ var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
788
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
789
+ return de_UntagResourceCommandError(output, context);
790
+ }
791
+ const contents = (0, import_smithy_client.map)({
792
+ $metadata: deserializeMetadata(output)
793
+ });
794
+ await (0, import_smithy_client.collectBody)(output.body, context);
795
+ return contents;
796
+ }, "de_UntagResourceCommand");
797
+ var de_UntagResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
798
+ const parsedOutput = {
799
+ ...output,
800
+ body: await parseErrorBody(output.body, context)
801
+ };
802
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
803
+ switch (errorCode) {
804
+ case "InternalServerException":
805
+ case "com.amazonaws.rbin#InternalServerException":
806
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
807
+ case "ResourceNotFoundException":
808
+ case "com.amazonaws.rbin#ResourceNotFoundException":
809
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
810
+ case "ValidationException":
811
+ case "com.amazonaws.rbin#ValidationException":
812
+ throw await de_ValidationExceptionRes(parsedOutput, context);
813
+ default:
814
+ const parsedBody = parsedOutput.body;
815
+ return throwDefaultError({
816
+ output,
817
+ parsedBody,
818
+ errorCode
819
+ });
820
+ }
821
+ }, "de_UntagResourceCommandError");
822
+ var de_UpdateRuleCommand = /* @__PURE__ */ __name(async (output, context) => {
823
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
824
+ return de_UpdateRuleCommandError(output, context);
825
+ }
826
+ const contents = (0, import_smithy_client.map)({
827
+ $metadata: deserializeMetadata(output)
828
+ });
829
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
830
+ const doc = (0, import_smithy_client.take)(data, {
831
+ Description: import_smithy_client.expectString,
832
+ Identifier: import_smithy_client.expectString,
833
+ LockEndTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
834
+ LockState: import_smithy_client.expectString,
835
+ ResourceTags: import_smithy_client._json,
836
+ ResourceType: import_smithy_client.expectString,
837
+ RetentionPeriod: import_smithy_client._json,
838
+ RuleArn: import_smithy_client.expectString,
839
+ Status: import_smithy_client.expectString
840
+ });
841
+ Object.assign(contents, doc);
842
+ return contents;
843
+ }, "de_UpdateRuleCommand");
844
+ var de_UpdateRuleCommandError = /* @__PURE__ */ __name(async (output, context) => {
845
+ const parsedOutput = {
846
+ ...output,
847
+ body: await parseErrorBody(output.body, context)
848
+ };
849
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
850
+ switch (errorCode) {
851
+ case "ConflictException":
852
+ case "com.amazonaws.rbin#ConflictException":
853
+ throw await de_ConflictExceptionRes(parsedOutput, context);
854
+ case "InternalServerException":
855
+ case "com.amazonaws.rbin#InternalServerException":
856
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
857
+ case "ResourceNotFoundException":
858
+ case "com.amazonaws.rbin#ResourceNotFoundException":
859
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
860
+ case "ServiceQuotaExceededException":
861
+ case "com.amazonaws.rbin#ServiceQuotaExceededException":
862
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
863
+ case "ValidationException":
864
+ case "com.amazonaws.rbin#ValidationException":
865
+ throw await de_ValidationExceptionRes(parsedOutput, context);
866
+ default:
867
+ const parsedBody = parsedOutput.body;
868
+ return throwDefaultError({
869
+ output,
870
+ parsedBody,
871
+ errorCode
872
+ });
873
+ }
874
+ }, "de_UpdateRuleCommandError");
875
+ var throwDefaultError = (0, import_smithy_client.withBaseException)(RbinServiceException);
876
+ var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
877
+ const contents = (0, import_smithy_client.map)({});
878
+ const data = parsedOutput.body;
879
+ const doc = (0, import_smithy_client.take)(data, {
880
+ Message: import_smithy_client.expectString,
881
+ Reason: import_smithy_client.expectString
882
+ });
883
+ Object.assign(contents, doc);
884
+ const exception = new ConflictException({
885
+ $metadata: deserializeMetadata(parsedOutput),
886
+ ...contents
887
+ });
888
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
889
+ }, "de_ConflictExceptionRes");
890
+ var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
891
+ const contents = (0, import_smithy_client.map)({});
892
+ const data = parsedOutput.body;
893
+ const doc = (0, import_smithy_client.take)(data, {
894
+ Message: import_smithy_client.expectString
895
+ });
896
+ Object.assign(contents, doc);
897
+ const exception = new InternalServerException({
898
+ $metadata: deserializeMetadata(parsedOutput),
899
+ ...contents
900
+ });
901
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
902
+ }, "de_InternalServerExceptionRes");
903
+ var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
904
+ const contents = (0, import_smithy_client.map)({});
905
+ const data = parsedOutput.body;
906
+ const doc = (0, import_smithy_client.take)(data, {
907
+ Message: import_smithy_client.expectString,
908
+ Reason: import_smithy_client.expectString
909
+ });
910
+ Object.assign(contents, doc);
911
+ const exception = new ResourceNotFoundException({
912
+ $metadata: deserializeMetadata(parsedOutput),
913
+ ...contents
914
+ });
915
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
916
+ }, "de_ResourceNotFoundExceptionRes");
917
+ var de_ServiceQuotaExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
918
+ const contents = (0, import_smithy_client.map)({});
919
+ const data = parsedOutput.body;
920
+ const doc = (0, import_smithy_client.take)(data, {
921
+ Message: import_smithy_client.expectString,
922
+ Reason: import_smithy_client.expectString
923
+ });
924
+ Object.assign(contents, doc);
925
+ const exception = new ServiceQuotaExceededException({
926
+ $metadata: deserializeMetadata(parsedOutput),
927
+ ...contents
928
+ });
929
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
930
+ }, "de_ServiceQuotaExceededExceptionRes");
931
+ var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
932
+ const contents = (0, import_smithy_client.map)({});
933
+ const data = parsedOutput.body;
934
+ const doc = (0, import_smithy_client.take)(data, {
935
+ Message: import_smithy_client.expectString,
936
+ Reason: import_smithy_client.expectString
937
+ });
938
+ Object.assign(contents, doc);
939
+ const exception = new ValidationException({
940
+ $metadata: deserializeMetadata(parsedOutput),
941
+ ...contents
942
+ });
943
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
944
+ }, "de_ValidationExceptionRes");
945
+ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
946
+ httpStatusCode: output.statusCode,
947
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
948
+ extendedRequestId: output.headers["x-amz-id-2"],
949
+ cfId: output.headers["x-amz-cf-id"]
950
+ }), "deserializeMetadata");
951
+ var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
952
+ var _TK = "TagKeys";
953
+ var _tK = "tagKeys";
954
+ var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
955
+ if (encoded.length) {
956
+ return JSON.parse(encoded);
957
+ }
958
+ return {};
959
+ }), "parseBody");
960
+ var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
961
+ const value = await parseBody(errorBody, context);
962
+ value.message = value.message ?? value.Message;
963
+ return value;
964
+ }, "parseErrorBody");
965
+ var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
966
+ const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
967
+ const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
968
+ let cleanValue = rawValue;
969
+ if (typeof cleanValue === "number") {
970
+ cleanValue = cleanValue.toString();
971
+ }
972
+ if (cleanValue.indexOf(",") >= 0) {
973
+ cleanValue = cleanValue.split(",")[0];
974
+ }
975
+ if (cleanValue.indexOf(":") >= 0) {
976
+ cleanValue = cleanValue.split(":")[0];
977
+ }
978
+ if (cleanValue.indexOf("#") >= 0) {
979
+ cleanValue = cleanValue.split("#")[1];
980
+ }
981
+ return cleanValue;
982
+ }, "sanitizeErrorCode");
983
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
984
+ if (headerKey !== void 0) {
985
+ return sanitizeErrorCode(output.headers[headerKey]);
986
+ }
987
+ if (data.code !== void 0) {
988
+ return sanitizeErrorCode(data.code);
989
+ }
990
+ if (data["__type"] !== void 0) {
991
+ return sanitizeErrorCode(data["__type"]);
992
+ }
993
+ }, "loadRestJsonErrorCode");
994
+
995
+ // src/commands/CreateRuleCommand.ts
996
+ var _CreateRuleCommand = class _CreateRuleCommand extends import_smithy_client.Command.classBuilder().ep({
997
+ ...commonParams
998
+ }).m(function(Command, cs, config, o) {
999
+ return [
1000
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1001
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1002
+ ];
1003
+ }).s("AmazonRecycleBin", "CreateRule", {}).n("RbinClient", "CreateRuleCommand").f(void 0, void 0).ser(se_CreateRuleCommand).de(de_CreateRuleCommand).build() {
1004
+ };
1005
+ __name(_CreateRuleCommand, "CreateRuleCommand");
1006
+ var CreateRuleCommand = _CreateRuleCommand;
1007
+
1008
+ // src/commands/DeleteRuleCommand.ts
1009
+
1010
+
1011
+
1012
+
1013
+ var _DeleteRuleCommand = class _DeleteRuleCommand extends import_smithy_client.Command.classBuilder().ep({
1014
+ ...commonParams
1015
+ }).m(function(Command, cs, config, o) {
1016
+ return [
1017
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1018
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1019
+ ];
1020
+ }).s("AmazonRecycleBin", "DeleteRule", {}).n("RbinClient", "DeleteRuleCommand").f(void 0, void 0).ser(se_DeleteRuleCommand).de(de_DeleteRuleCommand).build() {
1021
+ };
1022
+ __name(_DeleteRuleCommand, "DeleteRuleCommand");
1023
+ var DeleteRuleCommand = _DeleteRuleCommand;
1024
+
1025
+ // src/commands/GetRuleCommand.ts
1026
+
1027
+
1028
+
1029
+
1030
+ var _GetRuleCommand = class _GetRuleCommand extends import_smithy_client.Command.classBuilder().ep({
1031
+ ...commonParams
1032
+ }).m(function(Command, cs, config, o) {
1033
+ return [
1034
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1035
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1036
+ ];
1037
+ }).s("AmazonRecycleBin", "GetRule", {}).n("RbinClient", "GetRuleCommand").f(void 0, void 0).ser(se_GetRuleCommand).de(de_GetRuleCommand).build() {
1038
+ };
1039
+ __name(_GetRuleCommand, "GetRuleCommand");
1040
+ var GetRuleCommand = _GetRuleCommand;
1041
+
1042
+ // src/commands/ListRulesCommand.ts
1043
+
1044
+
1045
+
1046
+
1047
+ var _ListRulesCommand = class _ListRulesCommand extends import_smithy_client.Command.classBuilder().ep({
1048
+ ...commonParams
1049
+ }).m(function(Command, cs, config, o) {
1050
+ return [
1051
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1052
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1053
+ ];
1054
+ }).s("AmazonRecycleBin", "ListRules", {}).n("RbinClient", "ListRulesCommand").f(void 0, void 0).ser(se_ListRulesCommand).de(de_ListRulesCommand).build() {
1055
+ };
1056
+ __name(_ListRulesCommand, "ListRulesCommand");
1057
+ var ListRulesCommand = _ListRulesCommand;
1058
+
1059
+ // src/commands/ListTagsForResourceCommand.ts
1060
+
1061
+
1062
+
1063
+
1064
+ var _ListTagsForResourceCommand = class _ListTagsForResourceCommand extends import_smithy_client.Command.classBuilder().ep({
1065
+ ...commonParams
1066
+ }).m(function(Command, cs, config, o) {
1067
+ return [
1068
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1069
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1070
+ ];
1071
+ }).s("AmazonRecycleBin", "ListTagsForResource", {}).n("RbinClient", "ListTagsForResourceCommand").f(void 0, void 0).ser(se_ListTagsForResourceCommand).de(de_ListTagsForResourceCommand).build() {
1072
+ };
1073
+ __name(_ListTagsForResourceCommand, "ListTagsForResourceCommand");
1074
+ var ListTagsForResourceCommand = _ListTagsForResourceCommand;
1075
+
1076
+ // src/commands/LockRuleCommand.ts
1077
+
1078
+
1079
+
1080
+
1081
+ var _LockRuleCommand = class _LockRuleCommand extends import_smithy_client.Command.classBuilder().ep({
1082
+ ...commonParams
1083
+ }).m(function(Command, cs, config, o) {
1084
+ return [
1085
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1086
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1087
+ ];
1088
+ }).s("AmazonRecycleBin", "LockRule", {}).n("RbinClient", "LockRuleCommand").f(void 0, void 0).ser(se_LockRuleCommand).de(de_LockRuleCommand).build() {
1089
+ };
1090
+ __name(_LockRuleCommand, "LockRuleCommand");
1091
+ var LockRuleCommand = _LockRuleCommand;
1092
+
1093
+ // src/commands/TagResourceCommand.ts
1094
+
1095
+
1096
+
1097
+
1098
+ var _TagResourceCommand = class _TagResourceCommand extends import_smithy_client.Command.classBuilder().ep({
1099
+ ...commonParams
1100
+ }).m(function(Command, cs, config, o) {
1101
+ return [
1102
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1103
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1104
+ ];
1105
+ }).s("AmazonRecycleBin", "TagResource", {}).n("RbinClient", "TagResourceCommand").f(void 0, void 0).ser(se_TagResourceCommand).de(de_TagResourceCommand).build() {
1106
+ };
1107
+ __name(_TagResourceCommand, "TagResourceCommand");
1108
+ var TagResourceCommand = _TagResourceCommand;
1109
+
1110
+ // src/commands/UnlockRuleCommand.ts
1111
+
1112
+
1113
+
1114
+
1115
+ var _UnlockRuleCommand = class _UnlockRuleCommand extends import_smithy_client.Command.classBuilder().ep({
1116
+ ...commonParams
1117
+ }).m(function(Command, cs, config, o) {
1118
+ return [
1119
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1120
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1121
+ ];
1122
+ }).s("AmazonRecycleBin", "UnlockRule", {}).n("RbinClient", "UnlockRuleCommand").f(void 0, void 0).ser(se_UnlockRuleCommand).de(de_UnlockRuleCommand).build() {
1123
+ };
1124
+ __name(_UnlockRuleCommand, "UnlockRuleCommand");
1125
+ var UnlockRuleCommand = _UnlockRuleCommand;
1126
+
1127
+ // src/commands/UntagResourceCommand.ts
1128
+
1129
+
1130
+
1131
+
1132
+ var _UntagResourceCommand = class _UntagResourceCommand extends import_smithy_client.Command.classBuilder().ep({
1133
+ ...commonParams
1134
+ }).m(function(Command, cs, config, o) {
1135
+ return [
1136
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1137
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1138
+ ];
1139
+ }).s("AmazonRecycleBin", "UntagResource", {}).n("RbinClient", "UntagResourceCommand").f(void 0, void 0).ser(se_UntagResourceCommand).de(de_UntagResourceCommand).build() {
1140
+ };
1141
+ __name(_UntagResourceCommand, "UntagResourceCommand");
1142
+ var UntagResourceCommand = _UntagResourceCommand;
1143
+
1144
+ // src/commands/UpdateRuleCommand.ts
1145
+
1146
+
1147
+
1148
+
1149
+ var _UpdateRuleCommand = class _UpdateRuleCommand extends import_smithy_client.Command.classBuilder().ep({
1150
+ ...commonParams
1151
+ }).m(function(Command, cs, config, o) {
1152
+ return [
1153
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1154
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1155
+ ];
1156
+ }).s("AmazonRecycleBin", "UpdateRule", {}).n("RbinClient", "UpdateRuleCommand").f(void 0, void 0).ser(se_UpdateRuleCommand).de(de_UpdateRuleCommand).build() {
1157
+ };
1158
+ __name(_UpdateRuleCommand, "UpdateRuleCommand");
1159
+ var UpdateRuleCommand = _UpdateRuleCommand;
1160
+
1161
+ // src/Rbin.ts
1162
+ var commands = {
1163
+ CreateRuleCommand,
1164
+ DeleteRuleCommand,
1165
+ GetRuleCommand,
1166
+ ListRulesCommand,
1167
+ ListTagsForResourceCommand,
1168
+ LockRuleCommand,
1169
+ TagResourceCommand,
1170
+ UnlockRuleCommand,
1171
+ UntagResourceCommand,
1172
+ UpdateRuleCommand
1173
+ };
1174
+ var _Rbin = class _Rbin extends RbinClient {
1175
+ };
1176
+ __name(_Rbin, "Rbin");
1177
+ var Rbin = _Rbin;
1178
+ (0, import_smithy_client.createAggregatedClient)(commands, Rbin);
1179
+
1180
+ // src/pagination/ListRulesPaginator.ts
1181
+
1182
+ var paginateListRules = (0, import_core.createPaginator)(RbinClient, ListRulesCommand, "NextToken", "NextToken", "MaxResults");
1183
+
1184
+ // src/index.ts
1185
+ var import_util_endpoints = require("@aws-sdk/util-endpoints");
1186
+ // Annotate the CommonJS export names for ESM import in node:
1187
+ 0 && (module.exports = {
1188
+ ConflictException,
1189
+ ConflictExceptionReason,
1190
+ CreateRuleCommand,
1191
+ DeleteRuleCommand,
1192
+ GetRuleCommand,
1193
+ InternalServerException,
1194
+ ListRulesCommand,
1195
+ ListTagsForResourceCommand,
1196
+ LockRuleCommand,
1197
+ LockState,
1198
+ Rbin,
1199
+ RbinClient,
1200
+ RbinServiceException,
1201
+ ResourceNotFoundException,
1202
+ ResourceNotFoundExceptionReason,
1203
+ ResourceType,
1204
+ RetentionPeriodUnit,
1205
+ RuleStatus,
1206
+ ServiceQuotaExceededException,
1207
+ ServiceQuotaExceededExceptionReason,
1208
+ TagResourceCommand,
1209
+ UnlockDelayUnit,
1210
+ UnlockRuleCommand,
1211
+ UntagResourceCommand,
1212
+ UpdateRuleCommand,
1213
+ ValidationException,
1214
+ ValidationExceptionReason,
1215
+ __Client,
1216
+ paginateListRules
1217
+ });