@aws-sdk/client-appfabric 3.927.0 → 3.929.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 (50) hide show
  1. package/dist-cjs/index.js +1127 -1145
  2. package/dist-cjs/runtimeConfig.shared.js +2 -0
  3. package/dist-es/AppFabricClient.js +2 -0
  4. package/dist-es/commands/BatchGetUserAccessTasksCommand.js +3 -10
  5. package/dist-es/commands/ConnectAppAuthorizationCommand.js +3 -10
  6. package/dist-es/commands/CreateAppAuthorizationCommand.js +3 -10
  7. package/dist-es/commands/CreateAppBundleCommand.js +3 -9
  8. package/dist-es/commands/CreateIngestionCommand.js +3 -9
  9. package/dist-es/commands/CreateIngestionDestinationCommand.js +3 -9
  10. package/dist-es/commands/DeleteAppAuthorizationCommand.js +3 -9
  11. package/dist-es/commands/DeleteAppBundleCommand.js +3 -9
  12. package/dist-es/commands/DeleteIngestionCommand.js +3 -9
  13. package/dist-es/commands/DeleteIngestionDestinationCommand.js +3 -9
  14. package/dist-es/commands/GetAppAuthorizationCommand.js +3 -9
  15. package/dist-es/commands/GetAppBundleCommand.js +3 -9
  16. package/dist-es/commands/GetIngestionCommand.js +3 -9
  17. package/dist-es/commands/GetIngestionDestinationCommand.js +3 -9
  18. package/dist-es/commands/ListAppAuthorizationsCommand.js +3 -9
  19. package/dist-es/commands/ListAppBundlesCommand.js +3 -9
  20. package/dist-es/commands/ListIngestionDestinationsCommand.js +3 -9
  21. package/dist-es/commands/ListIngestionsCommand.js +3 -9
  22. package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
  23. package/dist-es/commands/StartIngestionCommand.js +3 -9
  24. package/dist-es/commands/StartUserAccessTasksCommand.js +3 -10
  25. package/dist-es/commands/StopIngestionCommand.js +3 -9
  26. package/dist-es/commands/TagResourceCommand.js +3 -9
  27. package/dist-es/commands/UntagResourceCommand.js +3 -9
  28. package/dist-es/commands/UpdateAppAuthorizationCommand.js +3 -10
  29. package/dist-es/commands/UpdateIngestionDestinationCommand.js +3 -9
  30. package/dist-es/models/models_0.js +0 -51
  31. package/dist-es/runtimeConfig.shared.js +2 -0
  32. package/dist-es/schemas/schemas_0.js +1059 -0
  33. package/dist-types/AppFabricClient.d.ts +10 -1
  34. package/dist-types/models/models_0.d.ts +0 -40
  35. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  36. package/dist-types/runtimeConfig.d.ts +1 -0
  37. package/dist-types/runtimeConfig.native.d.ts +1 -0
  38. package/dist-types/runtimeConfig.shared.d.ts +2 -5
  39. package/dist-types/schemas/schemas_0.d.ts +125 -0
  40. package/dist-types/ts3.4/AppFabricClient.d.ts +4 -0
  41. package/dist-types/ts3.4/models/models_0.d.ts +0 -26
  42. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  43. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  44. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  45. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  46. package/dist-types/ts3.4/schemas/schemas_0.d.ts +131 -0
  47. package/package.json +5 -6
  48. package/dist-es/protocols/Aws_restJson1.js +0 -887
  49. package/dist-types/protocols/Aws_restJson1.d.ts +0 -236
  50. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -317
@@ -1,887 +0,0 @@
1
- import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
2
- import { requestBuilder as rb } from "@smithy/core";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
4
- import { v4 as generateIdempotencyToken } from "@smithy/uuid";
5
- import { AppFabricServiceException as __BaseException } from "../models/AppFabricServiceException";
6
- import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
7
- export const se_BatchGetUserAccessTasksCommand = async (input, context) => {
8
- const b = rb(input, context);
9
- const headers = {
10
- "content-type": "application/json",
11
- };
12
- b.bp("/useraccess/batchget");
13
- let body;
14
- body = JSON.stringify(take(input, {
15
- appBundleIdentifier: [],
16
- taskIdList: (_) => _json(_),
17
- }));
18
- b.m("POST").h(headers).b(body);
19
- return b.build();
20
- };
21
- export const se_ConnectAppAuthorizationCommand = async (input, context) => {
22
- const b = rb(input, context);
23
- const headers = {
24
- "content-type": "application/json",
25
- };
26
- b.bp("/appbundles/{appBundleIdentifier}/appauthorizations/{appAuthorizationIdentifier}/connect");
27
- b.p("appBundleIdentifier", () => input.appBundleIdentifier, "{appBundleIdentifier}", false);
28
- b.p("appAuthorizationIdentifier", () => input.appAuthorizationIdentifier, "{appAuthorizationIdentifier}", false);
29
- let body;
30
- body = JSON.stringify(take(input, {
31
- authRequest: (_) => _json(_),
32
- }));
33
- b.m("POST").h(headers).b(body);
34
- return b.build();
35
- };
36
- export const se_CreateAppAuthorizationCommand = async (input, context) => {
37
- const b = rb(input, context);
38
- const headers = {
39
- "content-type": "application/json",
40
- };
41
- b.bp("/appbundles/{appBundleIdentifier}/appauthorizations");
42
- b.p("appBundleIdentifier", () => input.appBundleIdentifier, "{appBundleIdentifier}", false);
43
- let body;
44
- body = JSON.stringify(take(input, {
45
- app: [],
46
- authType: [],
47
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
48
- credential: (_) => _json(_),
49
- tags: (_) => _json(_),
50
- tenant: (_) => _json(_),
51
- }));
52
- b.m("POST").h(headers).b(body);
53
- return b.build();
54
- };
55
- export const se_CreateAppBundleCommand = async (input, context) => {
56
- const b = rb(input, context);
57
- const headers = {
58
- "content-type": "application/json",
59
- };
60
- b.bp("/appbundles");
61
- let body;
62
- body = JSON.stringify(take(input, {
63
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
64
- customerManagedKeyIdentifier: [],
65
- tags: (_) => _json(_),
66
- }));
67
- b.m("POST").h(headers).b(body);
68
- return b.build();
69
- };
70
- export const se_CreateIngestionCommand = async (input, context) => {
71
- const b = rb(input, context);
72
- const headers = {
73
- "content-type": "application/json",
74
- };
75
- b.bp("/appbundles/{appBundleIdentifier}/ingestions");
76
- b.p("appBundleIdentifier", () => input.appBundleIdentifier, "{appBundleIdentifier}", false);
77
- let body;
78
- body = JSON.stringify(take(input, {
79
- app: [],
80
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
81
- ingestionType: [],
82
- tags: (_) => _json(_),
83
- tenantId: [],
84
- }));
85
- b.m("POST").h(headers).b(body);
86
- return b.build();
87
- };
88
- export const se_CreateIngestionDestinationCommand = async (input, context) => {
89
- const b = rb(input, context);
90
- const headers = {
91
- "content-type": "application/json",
92
- };
93
- b.bp("/appbundles/{appBundleIdentifier}/ingestions/{ingestionIdentifier}/ingestiondestinations");
94
- b.p("appBundleIdentifier", () => input.appBundleIdentifier, "{appBundleIdentifier}", false);
95
- b.p("ingestionIdentifier", () => input.ingestionIdentifier, "{ingestionIdentifier}", false);
96
- let body;
97
- body = JSON.stringify(take(input, {
98
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
99
- destinationConfiguration: (_) => _json(_),
100
- processingConfiguration: (_) => _json(_),
101
- tags: (_) => _json(_),
102
- }));
103
- b.m("POST").h(headers).b(body);
104
- return b.build();
105
- };
106
- export const se_DeleteAppAuthorizationCommand = async (input, context) => {
107
- const b = rb(input, context);
108
- const headers = {};
109
- b.bp("/appbundles/{appBundleIdentifier}/appauthorizations/{appAuthorizationIdentifier}");
110
- b.p("appBundleIdentifier", () => input.appBundleIdentifier, "{appBundleIdentifier}", false);
111
- b.p("appAuthorizationIdentifier", () => input.appAuthorizationIdentifier, "{appAuthorizationIdentifier}", false);
112
- let body;
113
- b.m("DELETE").h(headers).b(body);
114
- return b.build();
115
- };
116
- export const se_DeleteAppBundleCommand = async (input, context) => {
117
- const b = rb(input, context);
118
- const headers = {};
119
- b.bp("/appbundles/{appBundleIdentifier}");
120
- b.p("appBundleIdentifier", () => input.appBundleIdentifier, "{appBundleIdentifier}", false);
121
- let body;
122
- b.m("DELETE").h(headers).b(body);
123
- return b.build();
124
- };
125
- export const se_DeleteIngestionCommand = async (input, context) => {
126
- const b = rb(input, context);
127
- const headers = {};
128
- b.bp("/appbundles/{appBundleIdentifier}/ingestions/{ingestionIdentifier}");
129
- b.p("appBundleIdentifier", () => input.appBundleIdentifier, "{appBundleIdentifier}", false);
130
- b.p("ingestionIdentifier", () => input.ingestionIdentifier, "{ingestionIdentifier}", false);
131
- let body;
132
- b.m("DELETE").h(headers).b(body);
133
- return b.build();
134
- };
135
- export const se_DeleteIngestionDestinationCommand = async (input, context) => {
136
- const b = rb(input, context);
137
- const headers = {};
138
- b.bp("/appbundles/{appBundleIdentifier}/ingestions/{ingestionIdentifier}/ingestiondestinations/{ingestionDestinationIdentifier}");
139
- b.p("appBundleIdentifier", () => input.appBundleIdentifier, "{appBundleIdentifier}", false);
140
- b.p("ingestionIdentifier", () => input.ingestionIdentifier, "{ingestionIdentifier}", false);
141
- b.p("ingestionDestinationIdentifier", () => input.ingestionDestinationIdentifier, "{ingestionDestinationIdentifier}", false);
142
- let body;
143
- b.m("DELETE").h(headers).b(body);
144
- return b.build();
145
- };
146
- export const se_GetAppAuthorizationCommand = async (input, context) => {
147
- const b = rb(input, context);
148
- const headers = {};
149
- b.bp("/appbundles/{appBundleIdentifier}/appauthorizations/{appAuthorizationIdentifier}");
150
- b.p("appBundleIdentifier", () => input.appBundleIdentifier, "{appBundleIdentifier}", false);
151
- b.p("appAuthorizationIdentifier", () => input.appAuthorizationIdentifier, "{appAuthorizationIdentifier}", false);
152
- let body;
153
- b.m("GET").h(headers).b(body);
154
- return b.build();
155
- };
156
- export const se_GetAppBundleCommand = async (input, context) => {
157
- const b = rb(input, context);
158
- const headers = {};
159
- b.bp("/appbundles/{appBundleIdentifier}");
160
- b.p("appBundleIdentifier", () => input.appBundleIdentifier, "{appBundleIdentifier}", false);
161
- let body;
162
- b.m("GET").h(headers).b(body);
163
- return b.build();
164
- };
165
- export const se_GetIngestionCommand = async (input, context) => {
166
- const b = rb(input, context);
167
- const headers = {};
168
- b.bp("/appbundles/{appBundleIdentifier}/ingestions/{ingestionIdentifier}");
169
- b.p("appBundleIdentifier", () => input.appBundleIdentifier, "{appBundleIdentifier}", false);
170
- b.p("ingestionIdentifier", () => input.ingestionIdentifier, "{ingestionIdentifier}", false);
171
- let body;
172
- b.m("GET").h(headers).b(body);
173
- return b.build();
174
- };
175
- export const se_GetIngestionDestinationCommand = async (input, context) => {
176
- const b = rb(input, context);
177
- const headers = {};
178
- b.bp("/appbundles/{appBundleIdentifier}/ingestions/{ingestionIdentifier}/ingestiondestinations/{ingestionDestinationIdentifier}");
179
- b.p("appBundleIdentifier", () => input.appBundleIdentifier, "{appBundleIdentifier}", false);
180
- b.p("ingestionIdentifier", () => input.ingestionIdentifier, "{ingestionIdentifier}", false);
181
- b.p("ingestionDestinationIdentifier", () => input.ingestionDestinationIdentifier, "{ingestionDestinationIdentifier}", false);
182
- let body;
183
- b.m("GET").h(headers).b(body);
184
- return b.build();
185
- };
186
- export const se_ListAppAuthorizationsCommand = async (input, context) => {
187
- const b = rb(input, context);
188
- const headers = {};
189
- b.bp("/appbundles/{appBundleIdentifier}/appauthorizations");
190
- b.p("appBundleIdentifier", () => input.appBundleIdentifier, "{appBundleIdentifier}", false);
191
- const query = map({
192
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
193
- [_nT]: [, input[_nT]],
194
- });
195
- let body;
196
- b.m("GET").h(headers).q(query).b(body);
197
- return b.build();
198
- };
199
- export const se_ListAppBundlesCommand = async (input, context) => {
200
- const b = rb(input, context);
201
- const headers = {};
202
- b.bp("/appbundles");
203
- const query = map({
204
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
205
- [_nT]: [, input[_nT]],
206
- });
207
- let body;
208
- b.m("GET").h(headers).q(query).b(body);
209
- return b.build();
210
- };
211
- export const se_ListIngestionDestinationsCommand = async (input, context) => {
212
- const b = rb(input, context);
213
- const headers = {};
214
- b.bp("/appbundles/{appBundleIdentifier}/ingestions/{ingestionIdentifier}/ingestiondestinations");
215
- b.p("appBundleIdentifier", () => input.appBundleIdentifier, "{appBundleIdentifier}", false);
216
- b.p("ingestionIdentifier", () => input.ingestionIdentifier, "{ingestionIdentifier}", false);
217
- const query = map({
218
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
219
- [_nT]: [, input[_nT]],
220
- });
221
- let body;
222
- b.m("GET").h(headers).q(query).b(body);
223
- return b.build();
224
- };
225
- export const se_ListIngestionsCommand = async (input, context) => {
226
- const b = rb(input, context);
227
- const headers = {};
228
- b.bp("/appbundles/{appBundleIdentifier}/ingestions");
229
- b.p("appBundleIdentifier", () => input.appBundleIdentifier, "{appBundleIdentifier}", false);
230
- const query = map({
231
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
232
- [_nT]: [, input[_nT]],
233
- });
234
- let body;
235
- b.m("GET").h(headers).q(query).b(body);
236
- return b.build();
237
- };
238
- export const se_ListTagsForResourceCommand = async (input, context) => {
239
- const b = rb(input, context);
240
- const headers = {};
241
- b.bp("/tags/{resourceArn}");
242
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
243
- let body;
244
- b.m("GET").h(headers).b(body);
245
- return b.build();
246
- };
247
- export const se_StartIngestionCommand = async (input, context) => {
248
- const b = rb(input, context);
249
- const headers = {};
250
- b.bp("/appbundles/{appBundleIdentifier}/ingestions/{ingestionIdentifier}/start");
251
- b.p("ingestionIdentifier", () => input.ingestionIdentifier, "{ingestionIdentifier}", false);
252
- b.p("appBundleIdentifier", () => input.appBundleIdentifier, "{appBundleIdentifier}", false);
253
- let body;
254
- b.m("POST").h(headers).b(body);
255
- return b.build();
256
- };
257
- export const se_StartUserAccessTasksCommand = async (input, context) => {
258
- const b = rb(input, context);
259
- const headers = {
260
- "content-type": "application/json",
261
- };
262
- b.bp("/useraccess/start");
263
- let body;
264
- body = JSON.stringify(take(input, {
265
- appBundleIdentifier: [],
266
- email: [],
267
- }));
268
- b.m("POST").h(headers).b(body);
269
- return b.build();
270
- };
271
- export const se_StopIngestionCommand = async (input, context) => {
272
- const b = rb(input, context);
273
- const headers = {};
274
- b.bp("/appbundles/{appBundleIdentifier}/ingestions/{ingestionIdentifier}/stop");
275
- b.p("ingestionIdentifier", () => input.ingestionIdentifier, "{ingestionIdentifier}", false);
276
- b.p("appBundleIdentifier", () => input.appBundleIdentifier, "{appBundleIdentifier}", false);
277
- let body;
278
- b.m("POST").h(headers).b(body);
279
- return b.build();
280
- };
281
- export const se_TagResourceCommand = async (input, context) => {
282
- const b = rb(input, context);
283
- const headers = {
284
- "content-type": "application/json",
285
- };
286
- b.bp("/tags/{resourceArn}");
287
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
288
- let body;
289
- body = JSON.stringify(take(input, {
290
- tags: (_) => _json(_),
291
- }));
292
- b.m("POST").h(headers).b(body);
293
- return b.build();
294
- };
295
- export const se_UntagResourceCommand = async (input, context) => {
296
- const b = rb(input, context);
297
- const headers = {};
298
- b.bp("/tags/{resourceArn}");
299
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
300
- const query = map({
301
- [_tK]: [__expectNonNull(input.tagKeys, `tagKeys`) != null, () => input[_tK] || []],
302
- });
303
- let body;
304
- b.m("DELETE").h(headers).q(query).b(body);
305
- return b.build();
306
- };
307
- export const se_UpdateAppAuthorizationCommand = async (input, context) => {
308
- const b = rb(input, context);
309
- const headers = {
310
- "content-type": "application/json",
311
- };
312
- b.bp("/appbundles/{appBundleIdentifier}/appauthorizations/{appAuthorizationIdentifier}");
313
- b.p("appBundleIdentifier", () => input.appBundleIdentifier, "{appBundleIdentifier}", false);
314
- b.p("appAuthorizationIdentifier", () => input.appAuthorizationIdentifier, "{appAuthorizationIdentifier}", false);
315
- let body;
316
- body = JSON.stringify(take(input, {
317
- credential: (_) => _json(_),
318
- tenant: (_) => _json(_),
319
- }));
320
- b.m("PATCH").h(headers).b(body);
321
- return b.build();
322
- };
323
- export const se_UpdateIngestionDestinationCommand = async (input, context) => {
324
- const b = rb(input, context);
325
- const headers = {
326
- "content-type": "application/json",
327
- };
328
- b.bp("/appbundles/{appBundleIdentifier}/ingestions/{ingestionIdentifier}/ingestiondestinations/{ingestionDestinationIdentifier}");
329
- b.p("appBundleIdentifier", () => input.appBundleIdentifier, "{appBundleIdentifier}", false);
330
- b.p("ingestionIdentifier", () => input.ingestionIdentifier, "{ingestionIdentifier}", false);
331
- b.p("ingestionDestinationIdentifier", () => input.ingestionDestinationIdentifier, "{ingestionDestinationIdentifier}", false);
332
- let body;
333
- body = JSON.stringify(take(input, {
334
- destinationConfiguration: (_) => _json(_),
335
- }));
336
- b.m("PATCH").h(headers).b(body);
337
- return b.build();
338
- };
339
- export const de_BatchGetUserAccessTasksCommand = async (output, context) => {
340
- if (output.statusCode !== 200 && output.statusCode >= 300) {
341
- return de_CommandError(output, context);
342
- }
343
- const contents = map({
344
- $metadata: deserializeMetadata(output),
345
- });
346
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
347
- const doc = take(data, {
348
- userAccessResultsList: _json,
349
- });
350
- Object.assign(contents, doc);
351
- return contents;
352
- };
353
- export const de_ConnectAppAuthorizationCommand = async (output, context) => {
354
- if (output.statusCode !== 200 && output.statusCode >= 300) {
355
- return de_CommandError(output, context);
356
- }
357
- const contents = map({
358
- $metadata: deserializeMetadata(output),
359
- });
360
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
361
- const doc = take(data, {
362
- appAuthorizationSummary: (_) => de_AppAuthorizationSummary(_, context),
363
- });
364
- Object.assign(contents, doc);
365
- return contents;
366
- };
367
- export const de_CreateAppAuthorizationCommand = async (output, context) => {
368
- if (output.statusCode !== 201 && output.statusCode >= 300) {
369
- return de_CommandError(output, context);
370
- }
371
- const contents = map({
372
- $metadata: deserializeMetadata(output),
373
- });
374
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
375
- const doc = take(data, {
376
- appAuthorization: (_) => de_AppAuthorization(_, context),
377
- });
378
- Object.assign(contents, doc);
379
- return contents;
380
- };
381
- export const de_CreateAppBundleCommand = async (output, context) => {
382
- if (output.statusCode !== 201 && output.statusCode >= 300) {
383
- return de_CommandError(output, context);
384
- }
385
- const contents = map({
386
- $metadata: deserializeMetadata(output),
387
- });
388
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
389
- const doc = take(data, {
390
- appBundle: _json,
391
- });
392
- Object.assign(contents, doc);
393
- return contents;
394
- };
395
- export const de_CreateIngestionCommand = async (output, context) => {
396
- if (output.statusCode !== 201 && output.statusCode >= 300) {
397
- return de_CommandError(output, context);
398
- }
399
- const contents = map({
400
- $metadata: deserializeMetadata(output),
401
- });
402
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
403
- const doc = take(data, {
404
- ingestion: (_) => de_Ingestion(_, context),
405
- });
406
- Object.assign(contents, doc);
407
- return contents;
408
- };
409
- export const de_CreateIngestionDestinationCommand = async (output, context) => {
410
- if (output.statusCode !== 201 && output.statusCode >= 300) {
411
- return de_CommandError(output, context);
412
- }
413
- const contents = map({
414
- $metadata: deserializeMetadata(output),
415
- });
416
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
417
- const doc = take(data, {
418
- ingestionDestination: (_) => de_IngestionDestination(_, context),
419
- });
420
- Object.assign(contents, doc);
421
- return contents;
422
- };
423
- export const de_DeleteAppAuthorizationCommand = async (output, context) => {
424
- if (output.statusCode !== 204 && output.statusCode >= 300) {
425
- return de_CommandError(output, context);
426
- }
427
- const contents = map({
428
- $metadata: deserializeMetadata(output),
429
- });
430
- await collectBody(output.body, context);
431
- return contents;
432
- };
433
- export const de_DeleteAppBundleCommand = async (output, context) => {
434
- if (output.statusCode !== 204 && output.statusCode >= 300) {
435
- return de_CommandError(output, context);
436
- }
437
- const contents = map({
438
- $metadata: deserializeMetadata(output),
439
- });
440
- await collectBody(output.body, context);
441
- return contents;
442
- };
443
- export const de_DeleteIngestionCommand = async (output, context) => {
444
- if (output.statusCode !== 204 && output.statusCode >= 300) {
445
- return de_CommandError(output, context);
446
- }
447
- const contents = map({
448
- $metadata: deserializeMetadata(output),
449
- });
450
- await collectBody(output.body, context);
451
- return contents;
452
- };
453
- export const de_DeleteIngestionDestinationCommand = async (output, context) => {
454
- if (output.statusCode !== 204 && output.statusCode >= 300) {
455
- return de_CommandError(output, context);
456
- }
457
- const contents = map({
458
- $metadata: deserializeMetadata(output),
459
- });
460
- await collectBody(output.body, context);
461
- return contents;
462
- };
463
- export const de_GetAppAuthorizationCommand = async (output, context) => {
464
- if (output.statusCode !== 200 && output.statusCode >= 300) {
465
- return de_CommandError(output, context);
466
- }
467
- const contents = map({
468
- $metadata: deserializeMetadata(output),
469
- });
470
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
471
- const doc = take(data, {
472
- appAuthorization: (_) => de_AppAuthorization(_, context),
473
- });
474
- Object.assign(contents, doc);
475
- return contents;
476
- };
477
- export const de_GetAppBundleCommand = async (output, context) => {
478
- if (output.statusCode !== 200 && output.statusCode >= 300) {
479
- return de_CommandError(output, context);
480
- }
481
- const contents = map({
482
- $metadata: deserializeMetadata(output),
483
- });
484
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
485
- const doc = take(data, {
486
- appBundle: _json,
487
- });
488
- Object.assign(contents, doc);
489
- return contents;
490
- };
491
- export const de_GetIngestionCommand = async (output, context) => {
492
- if (output.statusCode !== 200 && output.statusCode >= 300) {
493
- return de_CommandError(output, context);
494
- }
495
- const contents = map({
496
- $metadata: deserializeMetadata(output),
497
- });
498
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
499
- const doc = take(data, {
500
- ingestion: (_) => de_Ingestion(_, context),
501
- });
502
- Object.assign(contents, doc);
503
- return contents;
504
- };
505
- export const de_GetIngestionDestinationCommand = async (output, context) => {
506
- if (output.statusCode !== 200 && output.statusCode >= 300) {
507
- return de_CommandError(output, context);
508
- }
509
- const contents = map({
510
- $metadata: deserializeMetadata(output),
511
- });
512
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
513
- const doc = take(data, {
514
- ingestionDestination: (_) => de_IngestionDestination(_, context),
515
- });
516
- Object.assign(contents, doc);
517
- return contents;
518
- };
519
- export const de_ListAppAuthorizationsCommand = async (output, context) => {
520
- if (output.statusCode !== 200 && output.statusCode >= 300) {
521
- return de_CommandError(output, context);
522
- }
523
- const contents = map({
524
- $metadata: deserializeMetadata(output),
525
- });
526
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
527
- const doc = take(data, {
528
- appAuthorizationSummaryList: (_) => de_AppAuthorizationSummaryList(_, context),
529
- nextToken: __expectString,
530
- });
531
- Object.assign(contents, doc);
532
- return contents;
533
- };
534
- export const de_ListAppBundlesCommand = async (output, context) => {
535
- if (output.statusCode !== 200 && output.statusCode >= 300) {
536
- return de_CommandError(output, context);
537
- }
538
- const contents = map({
539
- $metadata: deserializeMetadata(output),
540
- });
541
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
542
- const doc = take(data, {
543
- appBundleSummaryList: _json,
544
- nextToken: __expectString,
545
- });
546
- Object.assign(contents, doc);
547
- return contents;
548
- };
549
- export const de_ListIngestionDestinationsCommand = async (output, context) => {
550
- if (output.statusCode !== 200 && output.statusCode >= 300) {
551
- return de_CommandError(output, context);
552
- }
553
- const contents = map({
554
- $metadata: deserializeMetadata(output),
555
- });
556
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
557
- const doc = take(data, {
558
- ingestionDestinations: _json,
559
- nextToken: __expectString,
560
- });
561
- Object.assign(contents, doc);
562
- return contents;
563
- };
564
- export const de_ListIngestionsCommand = async (output, context) => {
565
- if (output.statusCode !== 200 && output.statusCode >= 300) {
566
- return de_CommandError(output, context);
567
- }
568
- const contents = map({
569
- $metadata: deserializeMetadata(output),
570
- });
571
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
572
- const doc = take(data, {
573
- ingestions: _json,
574
- nextToken: __expectString,
575
- });
576
- Object.assign(contents, doc);
577
- return contents;
578
- };
579
- export const de_ListTagsForResourceCommand = async (output, context) => {
580
- if (output.statusCode !== 200 && output.statusCode >= 300) {
581
- return de_CommandError(output, context);
582
- }
583
- const contents = map({
584
- $metadata: deserializeMetadata(output),
585
- });
586
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
587
- const doc = take(data, {
588
- tags: _json,
589
- });
590
- Object.assign(contents, doc);
591
- return contents;
592
- };
593
- export const de_StartIngestionCommand = async (output, context) => {
594
- if (output.statusCode !== 200 && output.statusCode >= 300) {
595
- return de_CommandError(output, context);
596
- }
597
- const contents = map({
598
- $metadata: deserializeMetadata(output),
599
- });
600
- await collectBody(output.body, context);
601
- return contents;
602
- };
603
- export const de_StartUserAccessTasksCommand = async (output, context) => {
604
- if (output.statusCode !== 201 && output.statusCode >= 300) {
605
- return de_CommandError(output, context);
606
- }
607
- const contents = map({
608
- $metadata: deserializeMetadata(output),
609
- });
610
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
611
- const doc = take(data, {
612
- userAccessTasksList: _json,
613
- });
614
- Object.assign(contents, doc);
615
- return contents;
616
- };
617
- export const de_StopIngestionCommand = async (output, context) => {
618
- if (output.statusCode !== 200 && output.statusCode >= 300) {
619
- return de_CommandError(output, context);
620
- }
621
- const contents = map({
622
- $metadata: deserializeMetadata(output),
623
- });
624
- await collectBody(output.body, context);
625
- return contents;
626
- };
627
- export const de_TagResourceCommand = async (output, context) => {
628
- if (output.statusCode !== 200 && output.statusCode >= 300) {
629
- return de_CommandError(output, context);
630
- }
631
- const contents = map({
632
- $metadata: deserializeMetadata(output),
633
- });
634
- await collectBody(output.body, context);
635
- return contents;
636
- };
637
- export const de_UntagResourceCommand = async (output, context) => {
638
- if (output.statusCode !== 200 && output.statusCode >= 300) {
639
- return de_CommandError(output, context);
640
- }
641
- const contents = map({
642
- $metadata: deserializeMetadata(output),
643
- });
644
- await collectBody(output.body, context);
645
- return contents;
646
- };
647
- export const de_UpdateAppAuthorizationCommand = async (output, context) => {
648
- if (output.statusCode !== 200 && output.statusCode >= 300) {
649
- return de_CommandError(output, context);
650
- }
651
- const contents = map({
652
- $metadata: deserializeMetadata(output),
653
- });
654
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
655
- const doc = take(data, {
656
- appAuthorization: (_) => de_AppAuthorization(_, context),
657
- });
658
- Object.assign(contents, doc);
659
- return contents;
660
- };
661
- export const de_UpdateIngestionDestinationCommand = async (output, context) => {
662
- if (output.statusCode !== 200 && output.statusCode >= 300) {
663
- return de_CommandError(output, context);
664
- }
665
- const contents = map({
666
- $metadata: deserializeMetadata(output),
667
- });
668
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
669
- const doc = take(data, {
670
- ingestionDestination: (_) => de_IngestionDestination(_, context),
671
- });
672
- Object.assign(contents, doc);
673
- return contents;
674
- };
675
- const de_CommandError = async (output, context) => {
676
- const parsedOutput = {
677
- ...output,
678
- body: await parseErrorBody(output.body, context),
679
- };
680
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
681
- switch (errorCode) {
682
- case "AccessDeniedException":
683
- case "com.amazonaws.appfabric#AccessDeniedException":
684
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
685
- case "InternalServerException":
686
- case "com.amazonaws.appfabric#InternalServerException":
687
- throw await de_InternalServerExceptionRes(parsedOutput, context);
688
- case "ResourceNotFoundException":
689
- case "com.amazonaws.appfabric#ResourceNotFoundException":
690
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
691
- case "ThrottlingException":
692
- case "com.amazonaws.appfabric#ThrottlingException":
693
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
694
- case "ValidationException":
695
- case "com.amazonaws.appfabric#ValidationException":
696
- throw await de_ValidationExceptionRes(parsedOutput, context);
697
- case "ConflictException":
698
- case "com.amazonaws.appfabric#ConflictException":
699
- throw await de_ConflictExceptionRes(parsedOutput, context);
700
- case "ServiceQuotaExceededException":
701
- case "com.amazonaws.appfabric#ServiceQuotaExceededException":
702
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
703
- default:
704
- const parsedBody = parsedOutput.body;
705
- return throwDefaultError({
706
- output,
707
- parsedBody,
708
- errorCode,
709
- });
710
- }
711
- };
712
- const throwDefaultError = withBaseException(__BaseException);
713
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
714
- const contents = map({});
715
- const data = parsedOutput.body;
716
- const doc = take(data, {
717
- message: __expectString,
718
- });
719
- Object.assign(contents, doc);
720
- const exception = new AccessDeniedException({
721
- $metadata: deserializeMetadata(parsedOutput),
722
- ...contents,
723
- });
724
- return __decorateServiceException(exception, parsedOutput.body);
725
- };
726
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
727
- const contents = map({});
728
- const data = parsedOutput.body;
729
- const doc = take(data, {
730
- message: __expectString,
731
- resourceId: __expectString,
732
- resourceType: __expectString,
733
- });
734
- Object.assign(contents, doc);
735
- const exception = new ConflictException({
736
- $metadata: deserializeMetadata(parsedOutput),
737
- ...contents,
738
- });
739
- return __decorateServiceException(exception, parsedOutput.body);
740
- };
741
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
742
- const contents = map({
743
- [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
744
- });
745
- const data = parsedOutput.body;
746
- const doc = take(data, {
747
- message: __expectString,
748
- });
749
- Object.assign(contents, doc);
750
- const exception = new InternalServerException({
751
- $metadata: deserializeMetadata(parsedOutput),
752
- ...contents,
753
- });
754
- return __decorateServiceException(exception, parsedOutput.body);
755
- };
756
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
757
- const contents = map({});
758
- const data = parsedOutput.body;
759
- const doc = take(data, {
760
- message: __expectString,
761
- resourceId: __expectString,
762
- resourceType: __expectString,
763
- });
764
- Object.assign(contents, doc);
765
- const exception = new ResourceNotFoundException({
766
- $metadata: deserializeMetadata(parsedOutput),
767
- ...contents,
768
- });
769
- return __decorateServiceException(exception, parsedOutput.body);
770
- };
771
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
772
- const contents = map({});
773
- const data = parsedOutput.body;
774
- const doc = take(data, {
775
- message: __expectString,
776
- quotaCode: __expectString,
777
- resourceId: __expectString,
778
- resourceType: __expectString,
779
- serviceCode: __expectString,
780
- });
781
- Object.assign(contents, doc);
782
- const exception = new ServiceQuotaExceededException({
783
- $metadata: deserializeMetadata(parsedOutput),
784
- ...contents,
785
- });
786
- return __decorateServiceException(exception, parsedOutput.body);
787
- };
788
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
789
- const contents = map({
790
- [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
791
- });
792
- const data = parsedOutput.body;
793
- const doc = take(data, {
794
- message: __expectString,
795
- quotaCode: __expectString,
796
- serviceCode: __expectString,
797
- });
798
- Object.assign(contents, doc);
799
- const exception = new ThrottlingException({
800
- $metadata: deserializeMetadata(parsedOutput),
801
- ...contents,
802
- });
803
- return __decorateServiceException(exception, parsedOutput.body);
804
- };
805
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
806
- const contents = map({});
807
- const data = parsedOutput.body;
808
- const doc = take(data, {
809
- fieldList: _json,
810
- message: __expectString,
811
- reason: __expectString,
812
- });
813
- Object.assign(contents, doc);
814
- const exception = new ValidationException({
815
- $metadata: deserializeMetadata(parsedOutput),
816
- ...contents,
817
- });
818
- return __decorateServiceException(exception, parsedOutput.body);
819
- };
820
- const de_AppAuthorization = (output, context) => {
821
- return take(output, {
822
- app: __expectString,
823
- appAuthorizationArn: __expectString,
824
- appBundleArn: __expectString,
825
- authType: __expectString,
826
- authUrl: __expectString,
827
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
828
- persona: __expectString,
829
- status: __expectString,
830
- tenant: _json,
831
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
832
- });
833
- };
834
- const de_AppAuthorizationSummary = (output, context) => {
835
- return take(output, {
836
- app: __expectString,
837
- appAuthorizationArn: __expectString,
838
- appBundleArn: __expectString,
839
- status: __expectString,
840
- tenant: _json,
841
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
842
- });
843
- };
844
- const de_AppAuthorizationSummaryList = (output, context) => {
845
- const retVal = (output || [])
846
- .filter((e) => e != null)
847
- .map((entry) => {
848
- return de_AppAuthorizationSummary(entry, context);
849
- });
850
- return retVal;
851
- };
852
- const de_Ingestion = (output, context) => {
853
- return take(output, {
854
- app: __expectString,
855
- appBundleArn: __expectString,
856
- arn: __expectString,
857
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
858
- ingestionType: __expectString,
859
- state: __expectString,
860
- tenantId: __expectString,
861
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
862
- });
863
- };
864
- const de_IngestionDestination = (output, context) => {
865
- return take(output, {
866
- arn: __expectString,
867
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
868
- destinationConfiguration: (_) => _json(__expectUnion(_)),
869
- ingestionArn: __expectString,
870
- processingConfiguration: (_) => _json(__expectUnion(_)),
871
- status: __expectString,
872
- statusReason: __expectString,
873
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
874
- });
875
- };
876
- const deserializeMetadata = (output) => ({
877
- httpStatusCode: output.statusCode,
878
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
879
- extendedRequestId: output.headers["x-amz-id-2"],
880
- cfId: output.headers["x-amz-cf-id"],
881
- });
882
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
883
- const _mR = "maxResults";
884
- const _nT = "nextToken";
885
- const _rAS = "retryAfterSeconds";
886
- const _ra = "retry-after";
887
- const _tK = "tagKeys";