@aws-sdk/client-backupsearch 3.891.0 → 3.894.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 (31) hide show
  1. package/dist-cjs/index.js +1500 -10
  2. package/package.json +19 -19
  3. package/dist-cjs/BackupSearch.js +0 -35
  4. package/dist-cjs/BackupSearchClient.js +0 -52
  5. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +0 -43
  6. package/dist-cjs/commands/GetSearchJobCommand.js +0 -26
  7. package/dist-cjs/commands/GetSearchResultExportJobCommand.js +0 -26
  8. package/dist-cjs/commands/ListSearchJobBackupsCommand.js +0 -26
  9. package/dist-cjs/commands/ListSearchJobResultsCommand.js +0 -27
  10. package/dist-cjs/commands/ListSearchJobsCommand.js +0 -26
  11. package/dist-cjs/commands/ListSearchResultExportJobsCommand.js +0 -26
  12. package/dist-cjs/commands/ListTagsForResourceCommand.js +0 -26
  13. package/dist-cjs/commands/StartSearchJobCommand.js +0 -26
  14. package/dist-cjs/commands/StartSearchResultExportJobCommand.js +0 -26
  15. package/dist-cjs/commands/StopSearchJobCommand.js +0 -26
  16. package/dist-cjs/commands/TagResourceCommand.js +0 -26
  17. package/dist-cjs/commands/UntagResourceCommand.js +0 -26
  18. package/dist-cjs/commands/index.js +0 -15
  19. package/dist-cjs/endpoint/EndpointParameters.js +0 -15
  20. package/dist-cjs/extensionConfiguration.js +0 -2
  21. package/dist-cjs/models/BackupSearchServiceException.js +0 -12
  22. package/dist-cjs/models/index.js +0 -4
  23. package/dist-cjs/models/models_0.js +0 -204
  24. package/dist-cjs/pagination/Interfaces.js +0 -2
  25. package/dist-cjs/pagination/ListSearchJobBackupsPaginator.js +0 -7
  26. package/dist-cjs/pagination/ListSearchJobResultsPaginator.js +0 -7
  27. package/dist-cjs/pagination/ListSearchJobsPaginator.js +0 -7
  28. package/dist-cjs/pagination/ListSearchResultExportJobsPaginator.js +0 -7
  29. package/dist-cjs/pagination/index.js +0 -8
  30. package/dist-cjs/protocols/Aws_restJson1.js +0 -780
  31. package/dist-cjs/runtimeExtensions.js +0 -13
@@ -1,780 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StopSearchJobCommand = exports.de_StartSearchResultExportJobCommand = exports.de_StartSearchJobCommand = exports.de_ListTagsForResourceCommand = exports.de_ListSearchResultExportJobsCommand = exports.de_ListSearchJobsCommand = exports.de_ListSearchJobResultsCommand = exports.de_ListSearchJobBackupsCommand = exports.de_GetSearchResultExportJobCommand = exports.de_GetSearchJobCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StopSearchJobCommand = exports.se_StartSearchResultExportJobCommand = exports.se_StartSearchJobCommand = exports.se_ListTagsForResourceCommand = exports.se_ListSearchResultExportJobsCommand = exports.se_ListSearchJobsCommand = exports.se_ListSearchJobResultsCommand = exports.se_ListSearchJobBackupsCommand = exports.se_GetSearchResultExportJobCommand = exports.se_GetSearchJobCommand = void 0;
4
- const core_1 = require("@aws-sdk/core");
5
- const core_2 = require("@smithy/core");
6
- const smithy_client_1 = require("@smithy/smithy-client");
7
- const BackupSearchServiceException_1 = require("../models/BackupSearchServiceException");
8
- const models_0_1 = require("../models/models_0");
9
- const se_GetSearchJobCommand = async (input, context) => {
10
- const b = (0, core_2.requestBuilder)(input, context);
11
- const headers = {};
12
- b.bp("/search-jobs/{SearchJobIdentifier}");
13
- b.p("SearchJobIdentifier", () => input.SearchJobIdentifier, "{SearchJobIdentifier}", false);
14
- let body;
15
- b.m("GET").h(headers).b(body);
16
- return b.build();
17
- };
18
- exports.se_GetSearchJobCommand = se_GetSearchJobCommand;
19
- const se_GetSearchResultExportJobCommand = async (input, context) => {
20
- const b = (0, core_2.requestBuilder)(input, context);
21
- const headers = {};
22
- b.bp("/export-search-jobs/{ExportJobIdentifier}");
23
- b.p("ExportJobIdentifier", () => input.ExportJobIdentifier, "{ExportJobIdentifier}", false);
24
- let body;
25
- b.m("GET").h(headers).b(body);
26
- return b.build();
27
- };
28
- exports.se_GetSearchResultExportJobCommand = se_GetSearchResultExportJobCommand;
29
- const se_ListSearchJobBackupsCommand = async (input, context) => {
30
- const b = (0, core_2.requestBuilder)(input, context);
31
- const headers = {};
32
- b.bp("/search-jobs/{SearchJobIdentifier}/backups");
33
- b.p("SearchJobIdentifier", () => input.SearchJobIdentifier, "{SearchJobIdentifier}", false);
34
- const query = (0, smithy_client_1.map)({
35
- [_nT]: [, input[_NT]],
36
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
37
- });
38
- let body;
39
- b.m("GET").h(headers).q(query).b(body);
40
- return b.build();
41
- };
42
- exports.se_ListSearchJobBackupsCommand = se_ListSearchJobBackupsCommand;
43
- const se_ListSearchJobResultsCommand = async (input, context) => {
44
- const b = (0, core_2.requestBuilder)(input, context);
45
- const headers = {};
46
- b.bp("/search-jobs/{SearchJobIdentifier}/search-results");
47
- b.p("SearchJobIdentifier", () => input.SearchJobIdentifier, "{SearchJobIdentifier}", false);
48
- const query = (0, smithy_client_1.map)({
49
- [_nT]: [, input[_NT]],
50
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
51
- });
52
- let body;
53
- b.m("GET").h(headers).q(query).b(body);
54
- return b.build();
55
- };
56
- exports.se_ListSearchJobResultsCommand = se_ListSearchJobResultsCommand;
57
- const se_ListSearchJobsCommand = async (input, context) => {
58
- const b = (0, core_2.requestBuilder)(input, context);
59
- const headers = {};
60
- b.bp("/search-jobs");
61
- const query = (0, smithy_client_1.map)({
62
- [_S]: [, input[_BS]],
63
- [_NT]: [, input[_NT]],
64
- [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
65
- });
66
- let body;
67
- b.m("GET").h(headers).q(query).b(body);
68
- return b.build();
69
- };
70
- exports.se_ListSearchJobsCommand = se_ListSearchJobsCommand;
71
- const se_ListSearchResultExportJobsCommand = async (input, context) => {
72
- const b = (0, core_2.requestBuilder)(input, context);
73
- const headers = {};
74
- b.bp("/export-search-jobs");
75
- const query = (0, smithy_client_1.map)({
76
- [_S]: [, input[_S]],
77
- [_SJI]: [, input[_SJI]],
78
- [_NT]: [, input[_NT]],
79
- [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
80
- });
81
- let body;
82
- b.m("GET").h(headers).q(query).b(body);
83
- return b.build();
84
- };
85
- exports.se_ListSearchResultExportJobsCommand = se_ListSearchResultExportJobsCommand;
86
- const se_ListTagsForResourceCommand = async (input, context) => {
87
- const b = (0, core_2.requestBuilder)(input, context);
88
- const headers = {};
89
- b.bp("/tags/{ResourceArn}");
90
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
91
- let body;
92
- b.m("GET").h(headers).b(body);
93
- return b.build();
94
- };
95
- exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
96
- const se_StartSearchJobCommand = async (input, context) => {
97
- const b = (0, core_2.requestBuilder)(input, context);
98
- const headers = {
99
- "content-type": "application/json",
100
- };
101
- b.bp("/search-jobs");
102
- let body;
103
- body = JSON.stringify((0, smithy_client_1.take)(input, {
104
- ClientToken: [],
105
- EncryptionKeyArn: [],
106
- ItemFilters: (_) => se_ItemFilters(_, context),
107
- Name: [],
108
- SearchScope: (_) => se_SearchScope(_, context),
109
- Tags: (_) => se_TagMap(_, context),
110
- }));
111
- b.m("PUT").h(headers).b(body);
112
- return b.build();
113
- };
114
- exports.se_StartSearchJobCommand = se_StartSearchJobCommand;
115
- const se_StartSearchResultExportJobCommand = async (input, context) => {
116
- const b = (0, core_2.requestBuilder)(input, context);
117
- const headers = {
118
- "content-type": "application/json",
119
- };
120
- b.bp("/export-search-jobs");
121
- let body;
122
- body = JSON.stringify((0, smithy_client_1.take)(input, {
123
- ClientToken: [],
124
- ExportSpecification: (_) => (0, smithy_client_1._json)(_),
125
- RoleArn: [],
126
- SearchJobIdentifier: [],
127
- Tags: (_) => se_TagMap(_, context),
128
- }));
129
- b.m("PUT").h(headers).b(body);
130
- return b.build();
131
- };
132
- exports.se_StartSearchResultExportJobCommand = se_StartSearchResultExportJobCommand;
133
- const se_StopSearchJobCommand = async (input, context) => {
134
- const b = (0, core_2.requestBuilder)(input, context);
135
- const headers = {};
136
- b.bp("/search-jobs/{SearchJobIdentifier}/actions/cancel");
137
- b.p("SearchJobIdentifier", () => input.SearchJobIdentifier, "{SearchJobIdentifier}", false);
138
- let body;
139
- b.m("PUT").h(headers).b(body);
140
- return b.build();
141
- };
142
- exports.se_StopSearchJobCommand = se_StopSearchJobCommand;
143
- const se_TagResourceCommand = async (input, context) => {
144
- const b = (0, core_2.requestBuilder)(input, context);
145
- const headers = {
146
- "content-type": "application/json",
147
- };
148
- b.bp("/tags/{ResourceArn}");
149
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
150
- let body;
151
- body = JSON.stringify((0, smithy_client_1.take)(input, {
152
- Tags: (_) => se_TagMap(_, context),
153
- }));
154
- b.m("POST").h(headers).b(body);
155
- return b.build();
156
- };
157
- exports.se_TagResourceCommand = se_TagResourceCommand;
158
- const se_UntagResourceCommand = async (input, context) => {
159
- const b = (0, core_2.requestBuilder)(input, context);
160
- const headers = {};
161
- b.bp("/tags/{ResourceArn}");
162
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
163
- const query = (0, smithy_client_1.map)({
164
- [_tK]: [(0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null, () => input[_TK] || []],
165
- });
166
- let body;
167
- b.m("DELETE").h(headers).q(query).b(body);
168
- return b.build();
169
- };
170
- exports.se_UntagResourceCommand = se_UntagResourceCommand;
171
- const de_GetSearchJobCommand = async (output, context) => {
172
- if (output.statusCode !== 200 && output.statusCode >= 300) {
173
- return de_CommandError(output, context);
174
- }
175
- const contents = (0, smithy_client_1.map)({
176
- $metadata: deserializeMetadata(output),
177
- });
178
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
179
- const doc = (0, smithy_client_1.take)(data, {
180
- CompletionTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
181
- CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
182
- CurrentSearchProgress: smithy_client_1._json,
183
- EncryptionKeyArn: smithy_client_1.expectString,
184
- ItemFilters: (_) => de_ItemFilters(_, context),
185
- Name: smithy_client_1.expectString,
186
- SearchJobArn: smithy_client_1.expectString,
187
- SearchJobIdentifier: smithy_client_1.expectString,
188
- SearchScope: (_) => de_SearchScope(_, context),
189
- SearchScopeSummary: smithy_client_1._json,
190
- Status: smithy_client_1.expectString,
191
- StatusMessage: smithy_client_1.expectString,
192
- });
193
- Object.assign(contents, doc);
194
- return contents;
195
- };
196
- exports.de_GetSearchJobCommand = de_GetSearchJobCommand;
197
- const de_GetSearchResultExportJobCommand = async (output, context) => {
198
- if (output.statusCode !== 200 && output.statusCode >= 300) {
199
- return de_CommandError(output, context);
200
- }
201
- const contents = (0, smithy_client_1.map)({
202
- $metadata: deserializeMetadata(output),
203
- });
204
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
205
- const doc = (0, smithy_client_1.take)(data, {
206
- CompletionTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
207
- CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
208
- ExportJobArn: smithy_client_1.expectString,
209
- ExportJobIdentifier: smithy_client_1.expectString,
210
- ExportSpecification: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
211
- SearchJobArn: smithy_client_1.expectString,
212
- Status: smithy_client_1.expectString,
213
- StatusMessage: smithy_client_1.expectString,
214
- });
215
- Object.assign(contents, doc);
216
- return contents;
217
- };
218
- exports.de_GetSearchResultExportJobCommand = de_GetSearchResultExportJobCommand;
219
- const de_ListSearchJobBackupsCommand = async (output, context) => {
220
- if (output.statusCode !== 200 && output.statusCode >= 300) {
221
- return de_CommandError(output, context);
222
- }
223
- const contents = (0, smithy_client_1.map)({
224
- $metadata: deserializeMetadata(output),
225
- });
226
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
227
- const doc = (0, smithy_client_1.take)(data, {
228
- NextToken: smithy_client_1.expectString,
229
- Results: (_) => de_SearchJobBackupsResults(_, context),
230
- });
231
- Object.assign(contents, doc);
232
- return contents;
233
- };
234
- exports.de_ListSearchJobBackupsCommand = de_ListSearchJobBackupsCommand;
235
- const de_ListSearchJobResultsCommand = async (output, context) => {
236
- if (output.statusCode !== 200 && output.statusCode >= 300) {
237
- return de_CommandError(output, context);
238
- }
239
- const contents = (0, smithy_client_1.map)({
240
- $metadata: deserializeMetadata(output),
241
- });
242
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
243
- const doc = (0, smithy_client_1.take)(data, {
244
- NextToken: smithy_client_1.expectString,
245
- Results: (_) => de_Results(_, context),
246
- });
247
- Object.assign(contents, doc);
248
- return contents;
249
- };
250
- exports.de_ListSearchJobResultsCommand = de_ListSearchJobResultsCommand;
251
- const de_ListSearchJobsCommand = async (output, context) => {
252
- if (output.statusCode !== 200 && output.statusCode >= 300) {
253
- return de_CommandError(output, context);
254
- }
255
- const contents = (0, smithy_client_1.map)({
256
- $metadata: deserializeMetadata(output),
257
- });
258
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
259
- const doc = (0, smithy_client_1.take)(data, {
260
- NextToken: smithy_client_1.expectString,
261
- SearchJobs: (_) => de_SearchJobs(_, context),
262
- });
263
- Object.assign(contents, doc);
264
- return contents;
265
- };
266
- exports.de_ListSearchJobsCommand = de_ListSearchJobsCommand;
267
- const de_ListSearchResultExportJobsCommand = async (output, context) => {
268
- if (output.statusCode !== 200 && output.statusCode >= 300) {
269
- return de_CommandError(output, context);
270
- }
271
- const contents = (0, smithy_client_1.map)({
272
- $metadata: deserializeMetadata(output),
273
- });
274
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
275
- const doc = (0, smithy_client_1.take)(data, {
276
- ExportJobs: (_) => de_ExportJobSummaries(_, context),
277
- NextToken: smithy_client_1.expectString,
278
- });
279
- Object.assign(contents, doc);
280
- return contents;
281
- };
282
- exports.de_ListSearchResultExportJobsCommand = de_ListSearchResultExportJobsCommand;
283
- const de_ListTagsForResourceCommand = async (output, context) => {
284
- if (output.statusCode !== 200 && output.statusCode >= 300) {
285
- return de_CommandError(output, context);
286
- }
287
- const contents = (0, smithy_client_1.map)({
288
- $metadata: deserializeMetadata(output),
289
- });
290
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
291
- const doc = (0, smithy_client_1.take)(data, {
292
- Tags: (_) => de_TagMap(_, context),
293
- });
294
- Object.assign(contents, doc);
295
- return contents;
296
- };
297
- exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
298
- const de_StartSearchJobCommand = async (output, context) => {
299
- if (output.statusCode !== 200 && output.statusCode >= 300) {
300
- return de_CommandError(output, context);
301
- }
302
- const contents = (0, smithy_client_1.map)({
303
- $metadata: deserializeMetadata(output),
304
- });
305
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
306
- const doc = (0, smithy_client_1.take)(data, {
307
- CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
308
- SearchJobArn: smithy_client_1.expectString,
309
- SearchJobIdentifier: smithy_client_1.expectString,
310
- });
311
- Object.assign(contents, doc);
312
- return contents;
313
- };
314
- exports.de_StartSearchJobCommand = de_StartSearchJobCommand;
315
- const de_StartSearchResultExportJobCommand = async (output, context) => {
316
- if (output.statusCode !== 200 && output.statusCode >= 300) {
317
- return de_CommandError(output, context);
318
- }
319
- const contents = (0, smithy_client_1.map)({
320
- $metadata: deserializeMetadata(output),
321
- });
322
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
323
- const doc = (0, smithy_client_1.take)(data, {
324
- ExportJobArn: smithy_client_1.expectString,
325
- ExportJobIdentifier: smithy_client_1.expectString,
326
- });
327
- Object.assign(contents, doc);
328
- return contents;
329
- };
330
- exports.de_StartSearchResultExportJobCommand = de_StartSearchResultExportJobCommand;
331
- const de_StopSearchJobCommand = async (output, context) => {
332
- if (output.statusCode !== 200 && output.statusCode >= 300) {
333
- return de_CommandError(output, context);
334
- }
335
- const contents = (0, smithy_client_1.map)({
336
- $metadata: deserializeMetadata(output),
337
- });
338
- await (0, smithy_client_1.collectBody)(output.body, context);
339
- return contents;
340
- };
341
- exports.de_StopSearchJobCommand = de_StopSearchJobCommand;
342
- const de_TagResourceCommand = async (output, context) => {
343
- if (output.statusCode !== 200 && output.statusCode >= 300) {
344
- return de_CommandError(output, context);
345
- }
346
- const contents = (0, smithy_client_1.map)({
347
- $metadata: deserializeMetadata(output),
348
- });
349
- await (0, smithy_client_1.collectBody)(output.body, context);
350
- return contents;
351
- };
352
- exports.de_TagResourceCommand = de_TagResourceCommand;
353
- const de_UntagResourceCommand = async (output, context) => {
354
- if (output.statusCode !== 200 && output.statusCode >= 300) {
355
- return de_CommandError(output, context);
356
- }
357
- const contents = (0, smithy_client_1.map)({
358
- $metadata: deserializeMetadata(output),
359
- });
360
- await (0, smithy_client_1.collectBody)(output.body, context);
361
- return contents;
362
- };
363
- exports.de_UntagResourceCommand = de_UntagResourceCommand;
364
- const de_CommandError = async (output, context) => {
365
- const parsedOutput = {
366
- ...output,
367
- body: await (0, core_1.parseJsonErrorBody)(output.body, context),
368
- };
369
- const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
370
- switch (errorCode) {
371
- case "AccessDeniedException":
372
- case "com.amazonaws.backupsearch#AccessDeniedException":
373
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
374
- case "InternalServerException":
375
- case "com.amazonaws.backupsearch#InternalServerException":
376
- throw await de_InternalServerExceptionRes(parsedOutput, context);
377
- case "ResourceNotFoundException":
378
- case "com.amazonaws.backupsearch#ResourceNotFoundException":
379
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
380
- case "ThrottlingException":
381
- case "com.amazonaws.backupsearch#ThrottlingException":
382
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
383
- case "ValidationException":
384
- case "com.amazonaws.backupsearch#ValidationException":
385
- throw await de_ValidationExceptionRes(parsedOutput, context);
386
- case "ServiceQuotaExceededException":
387
- case "com.amazonaws.backupsearch#ServiceQuotaExceededException":
388
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
389
- case "ConflictException":
390
- case "com.amazonaws.backupsearch#ConflictException":
391
- throw await de_ConflictExceptionRes(parsedOutput, context);
392
- default:
393
- const parsedBody = parsedOutput.body;
394
- return throwDefaultError({
395
- output,
396
- parsedBody,
397
- errorCode,
398
- });
399
- }
400
- };
401
- const throwDefaultError = (0, smithy_client_1.withBaseException)(BackupSearchServiceException_1.BackupSearchServiceException);
402
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
403
- const contents = (0, smithy_client_1.map)({});
404
- const data = parsedOutput.body;
405
- const doc = (0, smithy_client_1.take)(data, {
406
- message: smithy_client_1.expectString,
407
- });
408
- Object.assign(contents, doc);
409
- const exception = new models_0_1.AccessDeniedException({
410
- $metadata: deserializeMetadata(parsedOutput),
411
- ...contents,
412
- });
413
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
414
- };
415
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
416
- const contents = (0, smithy_client_1.map)({});
417
- const data = parsedOutput.body;
418
- const doc = (0, smithy_client_1.take)(data, {
419
- message: smithy_client_1.expectString,
420
- resourceId: smithy_client_1.expectString,
421
- resourceType: smithy_client_1.expectString,
422
- });
423
- Object.assign(contents, doc);
424
- const exception = new models_0_1.ConflictException({
425
- $metadata: deserializeMetadata(parsedOutput),
426
- ...contents,
427
- });
428
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
429
- };
430
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
431
- const contents = (0, smithy_client_1.map)({
432
- [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
433
- });
434
- const data = parsedOutput.body;
435
- const doc = (0, smithy_client_1.take)(data, {
436
- message: smithy_client_1.expectString,
437
- });
438
- Object.assign(contents, doc);
439
- const exception = new models_0_1.InternalServerException({
440
- $metadata: deserializeMetadata(parsedOutput),
441
- ...contents,
442
- });
443
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
444
- };
445
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
446
- const contents = (0, smithy_client_1.map)({});
447
- const data = parsedOutput.body;
448
- const doc = (0, smithy_client_1.take)(data, {
449
- message: smithy_client_1.expectString,
450
- resourceId: smithy_client_1.expectString,
451
- resourceType: smithy_client_1.expectString,
452
- });
453
- Object.assign(contents, doc);
454
- const exception = new models_0_1.ResourceNotFoundException({
455
- $metadata: deserializeMetadata(parsedOutput),
456
- ...contents,
457
- });
458
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
459
- };
460
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
461
- const contents = (0, smithy_client_1.map)({});
462
- const data = parsedOutput.body;
463
- const doc = (0, smithy_client_1.take)(data, {
464
- message: smithy_client_1.expectString,
465
- quotaCode: smithy_client_1.expectString,
466
- resourceId: smithy_client_1.expectString,
467
- resourceType: smithy_client_1.expectString,
468
- serviceCode: smithy_client_1.expectString,
469
- });
470
- Object.assign(contents, doc);
471
- const exception = new models_0_1.ServiceQuotaExceededException({
472
- $metadata: deserializeMetadata(parsedOutput),
473
- ...contents,
474
- });
475
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
476
- };
477
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
478
- const contents = (0, smithy_client_1.map)({
479
- [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
480
- });
481
- const data = parsedOutput.body;
482
- const doc = (0, smithy_client_1.take)(data, {
483
- message: smithy_client_1.expectString,
484
- quotaCode: smithy_client_1.expectString,
485
- serviceCode: smithy_client_1.expectString,
486
- });
487
- Object.assign(contents, doc);
488
- const exception = new models_0_1.ThrottlingException({
489
- $metadata: deserializeMetadata(parsedOutput),
490
- ...contents,
491
- });
492
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
493
- };
494
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
495
- const contents = (0, smithy_client_1.map)({});
496
- const data = parsedOutput.body;
497
- const doc = (0, smithy_client_1.take)(data, {
498
- message: smithy_client_1.expectString,
499
- });
500
- Object.assign(contents, doc);
501
- const exception = new models_0_1.ValidationException({
502
- $metadata: deserializeMetadata(parsedOutput),
503
- ...contents,
504
- });
505
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
506
- };
507
- const se_BackupCreationTimeFilter = (input, context) => {
508
- return (0, smithy_client_1.take)(input, {
509
- CreatedAfter: (_) => _.getTime() / 1_000,
510
- CreatedBefore: (_) => _.getTime() / 1_000,
511
- });
512
- };
513
- const se_EBSItemFilter = (input, context) => {
514
- return (0, smithy_client_1.take)(input, {
515
- CreationTimes: (_) => se_TimeConditionList(_, context),
516
- FilePaths: smithy_client_1._json,
517
- LastModificationTimes: (_) => se_TimeConditionList(_, context),
518
- Sizes: smithy_client_1._json,
519
- });
520
- };
521
- const se_EBSItemFilters = (input, context) => {
522
- return input
523
- .filter((e) => e != null)
524
- .map((entry) => {
525
- return se_EBSItemFilter(entry, context);
526
- });
527
- };
528
- const se_ItemFilters = (input, context) => {
529
- return (0, smithy_client_1.take)(input, {
530
- EBSItemFilters: (_) => se_EBSItemFilters(_, context),
531
- S3ItemFilters: (_) => se_S3ItemFilters(_, context),
532
- });
533
- };
534
- const se_S3ItemFilter = (input, context) => {
535
- return (0, smithy_client_1.take)(input, {
536
- CreationTimes: (_) => se_TimeConditionList(_, context),
537
- ETags: smithy_client_1._json,
538
- ObjectKeys: smithy_client_1._json,
539
- Sizes: smithy_client_1._json,
540
- VersionIds: smithy_client_1._json,
541
- });
542
- };
543
- const se_S3ItemFilters = (input, context) => {
544
- return input
545
- .filter((e) => e != null)
546
- .map((entry) => {
547
- return se_S3ItemFilter(entry, context);
548
- });
549
- };
550
- const se_SearchScope = (input, context) => {
551
- return (0, smithy_client_1.take)(input, {
552
- BackupResourceArns: smithy_client_1._json,
553
- BackupResourceCreationTime: (_) => se_BackupCreationTimeFilter(_, context),
554
- BackupResourceTags: (_) => se_TagMap(_, context),
555
- BackupResourceTypes: smithy_client_1._json,
556
- SourceResourceArns: smithy_client_1._json,
557
- });
558
- };
559
- const se_TagMap = (input, context) => {
560
- return Object.entries(input).reduce((acc, [key, value]) => {
561
- if (value === null) {
562
- acc[key] = null;
563
- return acc;
564
- }
565
- acc[key] = value;
566
- return acc;
567
- }, {});
568
- };
569
- const se_TimeCondition = (input, context) => {
570
- return (0, smithy_client_1.take)(input, {
571
- Operator: [],
572
- Value: (_) => _.getTime() / 1_000,
573
- });
574
- };
575
- const se_TimeConditionList = (input, context) => {
576
- return input
577
- .filter((e) => e != null)
578
- .map((entry) => {
579
- return se_TimeCondition(entry, context);
580
- });
581
- };
582
- const de_BackupCreationTimeFilter = (output, context) => {
583
- return (0, smithy_client_1.take)(output, {
584
- CreatedAfter: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
585
- CreatedBefore: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
586
- });
587
- };
588
- const de_EBSItemFilter = (output, context) => {
589
- return (0, smithy_client_1.take)(output, {
590
- CreationTimes: (_) => de_TimeConditionList(_, context),
591
- FilePaths: smithy_client_1._json,
592
- LastModificationTimes: (_) => de_TimeConditionList(_, context),
593
- Sizes: smithy_client_1._json,
594
- });
595
- };
596
- const de_EBSItemFilters = (output, context) => {
597
- const retVal = (output || [])
598
- .filter((e) => e != null)
599
- .map((entry) => {
600
- return de_EBSItemFilter(entry, context);
601
- });
602
- return retVal;
603
- };
604
- const de_EBSResultItem = (output, context) => {
605
- return (0, smithy_client_1.take)(output, {
606
- BackupResourceArn: smithy_client_1.expectString,
607
- BackupVaultName: smithy_client_1.expectString,
608
- CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
609
- FilePath: smithy_client_1.expectString,
610
- FileSize: smithy_client_1.expectLong,
611
- FileSystemIdentifier: smithy_client_1.expectString,
612
- LastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
613
- SourceResourceArn: smithy_client_1.expectString,
614
- });
615
- };
616
- const de_ExportJobSummaries = (output, context) => {
617
- const retVal = (output || [])
618
- .filter((e) => e != null)
619
- .map((entry) => {
620
- return de_ExportJobSummary(entry, context);
621
- });
622
- return retVal;
623
- };
624
- const de_ExportJobSummary = (output, context) => {
625
- return (0, smithy_client_1.take)(output, {
626
- CompletionTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
627
- CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
628
- ExportJobArn: smithy_client_1.expectString,
629
- ExportJobIdentifier: smithy_client_1.expectString,
630
- SearchJobArn: smithy_client_1.expectString,
631
- Status: smithy_client_1.expectString,
632
- StatusMessage: smithy_client_1.expectString,
633
- });
634
- };
635
- const de_ItemFilters = (output, context) => {
636
- return (0, smithy_client_1.take)(output, {
637
- EBSItemFilters: (_) => de_EBSItemFilters(_, context),
638
- S3ItemFilters: (_) => de_S3ItemFilters(_, context),
639
- });
640
- };
641
- const de_ResultItem = (output, context) => {
642
- if (output.EBSResultItem != null) {
643
- return {
644
- EBSResultItem: de_EBSResultItem(output.EBSResultItem, context),
645
- };
646
- }
647
- if (output.S3ResultItem != null) {
648
- return {
649
- S3ResultItem: de_S3ResultItem(output.S3ResultItem, context),
650
- };
651
- }
652
- return { $unknown: Object.entries(output)[0] };
653
- };
654
- const de_Results = (output, context) => {
655
- const retVal = (output || [])
656
- .filter((e) => e != null)
657
- .map((entry) => {
658
- return de_ResultItem((0, core_1.awsExpectUnion)(entry), context);
659
- });
660
- return retVal;
661
- };
662
- const de_S3ItemFilter = (output, context) => {
663
- return (0, smithy_client_1.take)(output, {
664
- CreationTimes: (_) => de_TimeConditionList(_, context),
665
- ETags: smithy_client_1._json,
666
- ObjectKeys: smithy_client_1._json,
667
- Sizes: smithy_client_1._json,
668
- VersionIds: smithy_client_1._json,
669
- });
670
- };
671
- const de_S3ItemFilters = (output, context) => {
672
- const retVal = (output || [])
673
- .filter((e) => e != null)
674
- .map((entry) => {
675
- return de_S3ItemFilter(entry, context);
676
- });
677
- return retVal;
678
- };
679
- const de_S3ResultItem = (output, context) => {
680
- return (0, smithy_client_1.take)(output, {
681
- BackupResourceArn: smithy_client_1.expectString,
682
- BackupVaultName: smithy_client_1.expectString,
683
- CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
684
- ETag: smithy_client_1.expectString,
685
- ObjectKey: smithy_client_1.expectString,
686
- ObjectSize: smithy_client_1.expectLong,
687
- SourceResourceArn: smithy_client_1.expectString,
688
- VersionId: smithy_client_1.expectString,
689
- });
690
- };
691
- const de_SearchJobBackupsResult = (output, context) => {
692
- return (0, smithy_client_1.take)(output, {
693
- BackupCreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
694
- BackupResourceArn: smithy_client_1.expectString,
695
- IndexCreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
696
- ResourceType: smithy_client_1.expectString,
697
- SourceResourceArn: smithy_client_1.expectString,
698
- Status: smithy_client_1.expectString,
699
- StatusMessage: smithy_client_1.expectString,
700
- });
701
- };
702
- const de_SearchJobBackupsResults = (output, context) => {
703
- const retVal = (output || [])
704
- .filter((e) => e != null)
705
- .map((entry) => {
706
- return de_SearchJobBackupsResult(entry, context);
707
- });
708
- return retVal;
709
- };
710
- const de_SearchJobs = (output, context) => {
711
- const retVal = (output || [])
712
- .filter((e) => e != null)
713
- .map((entry) => {
714
- return de_SearchJobSummary(entry, context);
715
- });
716
- return retVal;
717
- };
718
- const de_SearchJobSummary = (output, context) => {
719
- return (0, smithy_client_1.take)(output, {
720
- CompletionTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
721
- CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
722
- Name: smithy_client_1.expectString,
723
- SearchJobArn: smithy_client_1.expectString,
724
- SearchJobIdentifier: smithy_client_1.expectString,
725
- SearchScopeSummary: smithy_client_1._json,
726
- Status: smithy_client_1.expectString,
727
- StatusMessage: smithy_client_1.expectString,
728
- });
729
- };
730
- const de_SearchScope = (output, context) => {
731
- return (0, smithy_client_1.take)(output, {
732
- BackupResourceArns: smithy_client_1._json,
733
- BackupResourceCreationTime: (_) => de_BackupCreationTimeFilter(_, context),
734
- BackupResourceTags: (_) => de_TagMap(_, context),
735
- BackupResourceTypes: smithy_client_1._json,
736
- SourceResourceArns: smithy_client_1._json,
737
- });
738
- };
739
- const de_TagMap = (output, context) => {
740
- return Object.entries(output).reduce((acc, [key, value]) => {
741
- if (value === null) {
742
- acc[key] = null;
743
- return acc;
744
- }
745
- acc[key] = (0, smithy_client_1.expectString)(value);
746
- return acc;
747
- }, {});
748
- };
749
- const de_TimeCondition = (output, context) => {
750
- return (0, smithy_client_1.take)(output, {
751
- Operator: smithy_client_1.expectString,
752
- Value: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
753
- });
754
- };
755
- const de_TimeConditionList = (output, context) => {
756
- const retVal = (output || [])
757
- .filter((e) => e != null)
758
- .map((entry) => {
759
- return de_TimeCondition(entry, context);
760
- });
761
- return retVal;
762
- };
763
- const deserializeMetadata = (output) => ({
764
- httpStatusCode: output.statusCode,
765
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
766
- extendedRequestId: output.headers["x-amz-id-2"],
767
- cfId: output.headers["x-amz-cf-id"],
768
- });
769
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
770
- const _BS = "ByStatus";
771
- const _MR = "MaxResults";
772
- const _NT = "NextToken";
773
- const _S = "Status";
774
- const _SJI = "SearchJobIdentifier";
775
- const _TK = "TagKeys";
776
- const _mR = "maxResults";
777
- const _nT = "nextToken";
778
- const _rAS = "retryAfterSeconds";
779
- const _ra = "retry-after";
780
- const _tK = "tagKeys";