@aws-sdk/client-mpa 3.893.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 (42) hide show
  1. package/dist-cjs/index.js +2063 -10
  2. package/package.json +6 -6
  3. package/dist-cjs/MPA.js +0 -53
  4. package/dist-cjs/MPAClient.js +0 -52
  5. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +0 -43
  6. package/dist-cjs/commands/CancelSessionCommand.js +0 -26
  7. package/dist-cjs/commands/CreateApprovalTeamCommand.js +0 -27
  8. package/dist-cjs/commands/CreateIdentitySourceCommand.js +0 -27
  9. package/dist-cjs/commands/DeleteIdentitySourceCommand.js +0 -26
  10. package/dist-cjs/commands/DeleteInactiveApprovalTeamVersionCommand.js +0 -26
  11. package/dist-cjs/commands/GetApprovalTeamCommand.js +0 -27
  12. package/dist-cjs/commands/GetIdentitySourceCommand.js +0 -26
  13. package/dist-cjs/commands/GetPolicyVersionCommand.js +0 -27
  14. package/dist-cjs/commands/GetResourcePolicyCommand.js +0 -27
  15. package/dist-cjs/commands/GetSessionCommand.js +0 -27
  16. package/dist-cjs/commands/ListApprovalTeamsCommand.js +0 -27
  17. package/dist-cjs/commands/ListIdentitySourcesCommand.js +0 -26
  18. package/dist-cjs/commands/ListPoliciesCommand.js +0 -26
  19. package/dist-cjs/commands/ListPolicyVersionsCommand.js +0 -26
  20. package/dist-cjs/commands/ListResourcePoliciesCommand.js +0 -26
  21. package/dist-cjs/commands/ListSessionsCommand.js +0 -27
  22. package/dist-cjs/commands/ListTagsForResourceCommand.js +0 -27
  23. package/dist-cjs/commands/StartActiveApprovalTeamDeletionCommand.js +0 -26
  24. package/dist-cjs/commands/TagResourceCommand.js +0 -27
  25. package/dist-cjs/commands/UntagResourceCommand.js +0 -27
  26. package/dist-cjs/commands/UpdateApprovalTeamCommand.js +0 -27
  27. package/dist-cjs/commands/index.js +0 -24
  28. package/dist-cjs/endpoint/EndpointParameters.js +0 -15
  29. package/dist-cjs/extensionConfiguration.js +0 -2
  30. package/dist-cjs/models/MPAServiceException.js +0 -12
  31. package/dist-cjs/models/index.js +0 -4
  32. package/dist-cjs/models/models_0.js +0 -354
  33. package/dist-cjs/pagination/Interfaces.js +0 -2
  34. package/dist-cjs/pagination/ListApprovalTeamsPaginator.js +0 -7
  35. package/dist-cjs/pagination/ListIdentitySourcesPaginator.js +0 -7
  36. package/dist-cjs/pagination/ListPoliciesPaginator.js +0 -7
  37. package/dist-cjs/pagination/ListPolicyVersionsPaginator.js +0 -7
  38. package/dist-cjs/pagination/ListResourcePoliciesPaginator.js +0 -7
  39. package/dist-cjs/pagination/ListSessionsPaginator.js +0 -7
  40. package/dist-cjs/pagination/index.js +0 -10
  41. package/dist-cjs/protocols/Aws_restJson1.js +0 -976
  42. package/dist-cjs/runtimeExtensions.js +0 -13
@@ -1,976 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_UpdateApprovalTeamCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StartActiveApprovalTeamDeletionCommand = exports.de_ListTagsForResourceCommand = exports.de_ListSessionsCommand = exports.de_ListResourcePoliciesCommand = exports.de_ListPolicyVersionsCommand = exports.de_ListPoliciesCommand = exports.de_ListIdentitySourcesCommand = exports.de_ListApprovalTeamsCommand = exports.de_GetSessionCommand = exports.de_GetResourcePolicyCommand = exports.de_GetPolicyVersionCommand = exports.de_GetIdentitySourceCommand = exports.de_GetApprovalTeamCommand = exports.de_DeleteInactiveApprovalTeamVersionCommand = exports.de_DeleteIdentitySourceCommand = exports.de_CreateIdentitySourceCommand = exports.de_CreateApprovalTeamCommand = exports.de_CancelSessionCommand = exports.se_UpdateApprovalTeamCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StartActiveApprovalTeamDeletionCommand = exports.se_ListTagsForResourceCommand = exports.se_ListSessionsCommand = exports.se_ListResourcePoliciesCommand = exports.se_ListPolicyVersionsCommand = exports.se_ListPoliciesCommand = exports.se_ListIdentitySourcesCommand = exports.se_ListApprovalTeamsCommand = exports.se_GetSessionCommand = exports.se_GetResourcePolicyCommand = exports.se_GetPolicyVersionCommand = exports.se_GetIdentitySourceCommand = exports.se_GetApprovalTeamCommand = exports.se_DeleteInactiveApprovalTeamVersionCommand = exports.se_DeleteIdentitySourceCommand = exports.se_CreateIdentitySourceCommand = exports.se_CreateApprovalTeamCommand = exports.se_CancelSessionCommand = 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 uuid_1 = require("uuid");
8
- const models_0_1 = require("../models/models_0");
9
- const MPAServiceException_1 = require("../models/MPAServiceException");
10
- const se_CancelSessionCommand = async (input, context) => {
11
- const b = (0, core_2.requestBuilder)(input, context);
12
- const headers = {};
13
- b.bp("/sessions/{SessionArn}");
14
- b.p("SessionArn", () => input.SessionArn, "{SessionArn}", false);
15
- let body;
16
- b.m("PUT").h(headers).b(body);
17
- return b.build();
18
- };
19
- exports.se_CancelSessionCommand = se_CancelSessionCommand;
20
- const se_CreateApprovalTeamCommand = async (input, context) => {
21
- const b = (0, core_2.requestBuilder)(input, context);
22
- const headers = {
23
- "content-type": "application/json",
24
- };
25
- b.bp("/approval-teams");
26
- let body;
27
- body = JSON.stringify((0, smithy_client_1.take)(input, {
28
- ApprovalStrategy: (_) => (0, smithy_client_1._json)(_),
29
- Approvers: (_) => (0, smithy_client_1._json)(_),
30
- ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
31
- Description: [],
32
- Name: [],
33
- Policies: (_) => (0, smithy_client_1._json)(_),
34
- Tags: (_) => (0, smithy_client_1._json)(_),
35
- }));
36
- b.m("POST").h(headers).b(body);
37
- return b.build();
38
- };
39
- exports.se_CreateApprovalTeamCommand = se_CreateApprovalTeamCommand;
40
- const se_CreateIdentitySourceCommand = async (input, context) => {
41
- const b = (0, core_2.requestBuilder)(input, context);
42
- const headers = {
43
- "content-type": "application/json",
44
- };
45
- b.bp("/identity-sources");
46
- let body;
47
- body = JSON.stringify((0, smithy_client_1.take)(input, {
48
- ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
49
- IdentitySourceParameters: (_) => (0, smithy_client_1._json)(_),
50
- Tags: (_) => (0, smithy_client_1._json)(_),
51
- }));
52
- b.m("POST").h(headers).b(body);
53
- return b.build();
54
- };
55
- exports.se_CreateIdentitySourceCommand = se_CreateIdentitySourceCommand;
56
- const se_DeleteIdentitySourceCommand = async (input, context) => {
57
- const b = (0, core_2.requestBuilder)(input, context);
58
- const headers = {};
59
- b.bp("/identity-sources/{IdentitySourceArn}");
60
- b.p("IdentitySourceArn", () => input.IdentitySourceArn, "{IdentitySourceArn}", false);
61
- let body;
62
- b.m("DELETE").h(headers).b(body);
63
- return b.build();
64
- };
65
- exports.se_DeleteIdentitySourceCommand = se_DeleteIdentitySourceCommand;
66
- const se_DeleteInactiveApprovalTeamVersionCommand = async (input, context) => {
67
- const b = (0, core_2.requestBuilder)(input, context);
68
- const headers = {};
69
- b.bp("/approval-teams/{Arn}/{VersionId}");
70
- b.p("Arn", () => input.Arn, "{Arn}", false);
71
- b.p("VersionId", () => input.VersionId, "{VersionId}", false);
72
- let body;
73
- b.m("DELETE").h(headers).b(body);
74
- return b.build();
75
- };
76
- exports.se_DeleteInactiveApprovalTeamVersionCommand = se_DeleteInactiveApprovalTeamVersionCommand;
77
- const se_GetApprovalTeamCommand = async (input, context) => {
78
- const b = (0, core_2.requestBuilder)(input, context);
79
- const headers = {};
80
- b.bp("/approval-teams/{Arn}");
81
- b.p("Arn", () => input.Arn, "{Arn}", false);
82
- let body;
83
- b.m("GET").h(headers).b(body);
84
- return b.build();
85
- };
86
- exports.se_GetApprovalTeamCommand = se_GetApprovalTeamCommand;
87
- const se_GetIdentitySourceCommand = async (input, context) => {
88
- const b = (0, core_2.requestBuilder)(input, context);
89
- const headers = {};
90
- b.bp("/identity-sources/{IdentitySourceArn}");
91
- b.p("IdentitySourceArn", () => input.IdentitySourceArn, "{IdentitySourceArn}", false);
92
- let body;
93
- b.m("GET").h(headers).b(body);
94
- return b.build();
95
- };
96
- exports.se_GetIdentitySourceCommand = se_GetIdentitySourceCommand;
97
- const se_GetPolicyVersionCommand = async (input, context) => {
98
- const b = (0, core_2.requestBuilder)(input, context);
99
- const headers = {};
100
- b.bp("/policy-versions/{PolicyVersionArn}");
101
- b.p("PolicyVersionArn", () => input.PolicyVersionArn, "{PolicyVersionArn}", false);
102
- let body;
103
- b.m("GET").h(headers).b(body);
104
- return b.build();
105
- };
106
- exports.se_GetPolicyVersionCommand = se_GetPolicyVersionCommand;
107
- const se_GetResourcePolicyCommand = async (input, context) => {
108
- const b = (0, core_2.requestBuilder)(input, context);
109
- const headers = {
110
- "content-type": "application/json",
111
- };
112
- b.bp("/GetResourcePolicy");
113
- let body;
114
- body = JSON.stringify((0, smithy_client_1.take)(input, {
115
- PolicyName: [],
116
- PolicyType: [],
117
- ResourceArn: [],
118
- }));
119
- b.m("POST").h(headers).b(body);
120
- return b.build();
121
- };
122
- exports.se_GetResourcePolicyCommand = se_GetResourcePolicyCommand;
123
- const se_GetSessionCommand = async (input, context) => {
124
- const b = (0, core_2.requestBuilder)(input, context);
125
- const headers = {};
126
- b.bp("/sessions/{SessionArn}");
127
- b.p("SessionArn", () => input.SessionArn, "{SessionArn}", false);
128
- let body;
129
- b.m("GET").h(headers).b(body);
130
- return b.build();
131
- };
132
- exports.se_GetSessionCommand = se_GetSessionCommand;
133
- const se_ListApprovalTeamsCommand = async (input, context) => {
134
- const b = (0, core_2.requestBuilder)(input, context);
135
- const headers = {};
136
- b.bp("/approval-teams");
137
- const query = (0, smithy_client_1.map)({
138
- [_L]: [, ""],
139
- [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
140
- [_NT]: [, input[_NT]],
141
- });
142
- let body;
143
- b.m("POST").h(headers).q(query).b(body);
144
- return b.build();
145
- };
146
- exports.se_ListApprovalTeamsCommand = se_ListApprovalTeamsCommand;
147
- const se_ListIdentitySourcesCommand = async (input, context) => {
148
- const b = (0, core_2.requestBuilder)(input, context);
149
- const headers = {};
150
- b.bp("/identity-sources");
151
- const query = (0, smithy_client_1.map)({
152
- [_L]: [, ""],
153
- [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
154
- [_NT]: [, input[_NT]],
155
- });
156
- let body;
157
- b.m("POST").h(headers).q(query).b(body);
158
- return b.build();
159
- };
160
- exports.se_ListIdentitySourcesCommand = se_ListIdentitySourcesCommand;
161
- const se_ListPoliciesCommand = async (input, context) => {
162
- const b = (0, core_2.requestBuilder)(input, context);
163
- const headers = {};
164
- b.bp("/policies");
165
- const query = (0, smithy_client_1.map)({
166
- [_L]: [, ""],
167
- [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
168
- [_NT]: [, input[_NT]],
169
- });
170
- let body;
171
- b.m("POST").h(headers).q(query).b(body);
172
- return b.build();
173
- };
174
- exports.se_ListPoliciesCommand = se_ListPoliciesCommand;
175
- const se_ListPolicyVersionsCommand = async (input, context) => {
176
- const b = (0, core_2.requestBuilder)(input, context);
177
- const headers = {};
178
- b.bp("/policies/{PolicyArn}");
179
- b.p("PolicyArn", () => input.PolicyArn, "{PolicyArn}", false);
180
- const query = (0, smithy_client_1.map)({
181
- [_L]: [, ""],
182
- [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
183
- [_NT]: [, input[_NT]],
184
- });
185
- let body;
186
- b.m("POST").h(headers).q(query).b(body);
187
- return b.build();
188
- };
189
- exports.se_ListPolicyVersionsCommand = se_ListPolicyVersionsCommand;
190
- const se_ListResourcePoliciesCommand = async (input, context) => {
191
- const b = (0, core_2.requestBuilder)(input, context);
192
- const headers = {};
193
- b.bp("/resource-policies/{ResourceArn}");
194
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
195
- const query = (0, smithy_client_1.map)({
196
- [_L]: [, ""],
197
- [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
198
- [_NT]: [, input[_NT]],
199
- });
200
- let body;
201
- b.m("POST").h(headers).q(query).b(body);
202
- return b.build();
203
- };
204
- exports.se_ListResourcePoliciesCommand = se_ListResourcePoliciesCommand;
205
- const se_ListSessionsCommand = async (input, context) => {
206
- const b = (0, core_2.requestBuilder)(input, context);
207
- const headers = {
208
- "content-type": "application/json",
209
- };
210
- b.bp("/approval-teams/{ApprovalTeamArn}/sessions");
211
- b.p("ApprovalTeamArn", () => input.ApprovalTeamArn, "{ApprovalTeamArn}", false);
212
- const query = (0, smithy_client_1.map)({
213
- [_L]: [, ""],
214
- });
215
- let body;
216
- body = JSON.stringify((0, smithy_client_1.take)(input, {
217
- Filters: (_) => (0, smithy_client_1._json)(_),
218
- MaxResults: [],
219
- NextToken: [],
220
- }));
221
- b.m("POST").h(headers).q(query).b(body);
222
- return b.build();
223
- };
224
- exports.se_ListSessionsCommand = se_ListSessionsCommand;
225
- const se_ListTagsForResourceCommand = async (input, context) => {
226
- const b = (0, core_2.requestBuilder)(input, context);
227
- const headers = {};
228
- b.bp("/tags/{ResourceArn}");
229
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
230
- let body;
231
- b.m("GET").h(headers).b(body);
232
- return b.build();
233
- };
234
- exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
235
- const se_StartActiveApprovalTeamDeletionCommand = async (input, context) => {
236
- const b = (0, core_2.requestBuilder)(input, context);
237
- const headers = {
238
- "content-type": "application/json",
239
- };
240
- b.bp("/approval-teams/{Arn}");
241
- b.p("Arn", () => input.Arn, "{Arn}", false);
242
- const query = (0, smithy_client_1.map)({
243
- [_D]: [, ""],
244
- });
245
- let body;
246
- body = JSON.stringify((0, smithy_client_1.take)(input, {
247
- PendingWindowDays: [],
248
- }));
249
- b.m("POST").h(headers).q(query).b(body);
250
- return b.build();
251
- };
252
- exports.se_StartActiveApprovalTeamDeletionCommand = se_StartActiveApprovalTeamDeletionCommand;
253
- const se_TagResourceCommand = async (input, context) => {
254
- const b = (0, core_2.requestBuilder)(input, context);
255
- const headers = {
256
- "content-type": "application/json",
257
- };
258
- b.bp("/tags/{ResourceArn}");
259
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
260
- let body;
261
- body = JSON.stringify((0, smithy_client_1.take)(input, {
262
- Tags: (_) => (0, smithy_client_1._json)(_),
263
- }));
264
- b.m("PUT").h(headers).b(body);
265
- return b.build();
266
- };
267
- exports.se_TagResourceCommand = se_TagResourceCommand;
268
- const se_UntagResourceCommand = async (input, context) => {
269
- const b = (0, core_2.requestBuilder)(input, context);
270
- const headers = {
271
- "content-type": "application/json",
272
- };
273
- b.bp("/tags/{ResourceArn}");
274
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
275
- let body;
276
- body = JSON.stringify((0, smithy_client_1.take)(input, {
277
- TagKeys: (_) => (0, smithy_client_1._json)(_),
278
- }));
279
- b.m("POST").h(headers).b(body);
280
- return b.build();
281
- };
282
- exports.se_UntagResourceCommand = se_UntagResourceCommand;
283
- const se_UpdateApprovalTeamCommand = async (input, context) => {
284
- const b = (0, core_2.requestBuilder)(input, context);
285
- const headers = {
286
- "content-type": "application/json",
287
- };
288
- b.bp("/approval-teams/{Arn}");
289
- b.p("Arn", () => input.Arn, "{Arn}", false);
290
- let body;
291
- body = JSON.stringify((0, smithy_client_1.take)(input, {
292
- ApprovalStrategy: (_) => (0, smithy_client_1._json)(_),
293
- Approvers: (_) => (0, smithy_client_1._json)(_),
294
- Description: [],
295
- }));
296
- b.m("PATCH").h(headers).b(body);
297
- return b.build();
298
- };
299
- exports.se_UpdateApprovalTeamCommand = se_UpdateApprovalTeamCommand;
300
- const de_CancelSessionCommand = async (output, context) => {
301
- if (output.statusCode !== 200 && output.statusCode >= 300) {
302
- return de_CommandError(output, context);
303
- }
304
- const contents = (0, smithy_client_1.map)({
305
- $metadata: deserializeMetadata(output),
306
- });
307
- await (0, smithy_client_1.collectBody)(output.body, context);
308
- return contents;
309
- };
310
- exports.de_CancelSessionCommand = de_CancelSessionCommand;
311
- const de_CreateApprovalTeamCommand = async (output, context) => {
312
- if (output.statusCode !== 200 && output.statusCode >= 300) {
313
- return de_CommandError(output, context);
314
- }
315
- const contents = (0, smithy_client_1.map)({
316
- $metadata: deserializeMetadata(output),
317
- });
318
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
319
- const doc = (0, smithy_client_1.take)(data, {
320
- Arn: smithy_client_1.expectString,
321
- CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
322
- Name: smithy_client_1.expectString,
323
- VersionId: smithy_client_1.expectString,
324
- });
325
- Object.assign(contents, doc);
326
- return contents;
327
- };
328
- exports.de_CreateApprovalTeamCommand = de_CreateApprovalTeamCommand;
329
- const de_CreateIdentitySourceCommand = async (output, context) => {
330
- if (output.statusCode !== 200 && output.statusCode >= 300) {
331
- return de_CommandError(output, context);
332
- }
333
- const contents = (0, smithy_client_1.map)({
334
- $metadata: deserializeMetadata(output),
335
- });
336
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
337
- const doc = (0, smithy_client_1.take)(data, {
338
- CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
339
- IdentitySourceArn: smithy_client_1.expectString,
340
- IdentitySourceType: smithy_client_1.expectString,
341
- });
342
- Object.assign(contents, doc);
343
- return contents;
344
- };
345
- exports.de_CreateIdentitySourceCommand = de_CreateIdentitySourceCommand;
346
- const de_DeleteIdentitySourceCommand = async (output, context) => {
347
- if (output.statusCode !== 200 && output.statusCode >= 300) {
348
- return de_CommandError(output, context);
349
- }
350
- const contents = (0, smithy_client_1.map)({
351
- $metadata: deserializeMetadata(output),
352
- });
353
- await (0, smithy_client_1.collectBody)(output.body, context);
354
- return contents;
355
- };
356
- exports.de_DeleteIdentitySourceCommand = de_DeleteIdentitySourceCommand;
357
- const de_DeleteInactiveApprovalTeamVersionCommand = async (output, context) => {
358
- if (output.statusCode !== 200 && output.statusCode >= 300) {
359
- return de_CommandError(output, context);
360
- }
361
- const contents = (0, smithy_client_1.map)({
362
- $metadata: deserializeMetadata(output),
363
- });
364
- await (0, smithy_client_1.collectBody)(output.body, context);
365
- return contents;
366
- };
367
- exports.de_DeleteInactiveApprovalTeamVersionCommand = de_DeleteInactiveApprovalTeamVersionCommand;
368
- const de_GetApprovalTeamCommand = async (output, context) => {
369
- if (output.statusCode !== 200 && output.statusCode >= 300) {
370
- return de_CommandError(output, context);
371
- }
372
- const contents = (0, smithy_client_1.map)({
373
- $metadata: deserializeMetadata(output),
374
- });
375
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
376
- const doc = (0, smithy_client_1.take)(data, {
377
- ApprovalStrategy: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
378
- Approvers: (_) => de_GetApprovalTeamResponseApprovers(_, context),
379
- Arn: smithy_client_1.expectString,
380
- CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
381
- Description: smithy_client_1.expectString,
382
- LastUpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
383
- Name: smithy_client_1.expectString,
384
- NumberOfApprovers: smithy_client_1.expectInt32,
385
- PendingUpdate: (_) => de_PendingUpdate(_, context),
386
- Policies: smithy_client_1._json,
387
- Status: smithy_client_1.expectString,
388
- StatusCode: smithy_client_1.expectString,
389
- StatusMessage: smithy_client_1.expectString,
390
- UpdateSessionArn: smithy_client_1.expectString,
391
- VersionId: smithy_client_1.expectString,
392
- });
393
- Object.assign(contents, doc);
394
- return contents;
395
- };
396
- exports.de_GetApprovalTeamCommand = de_GetApprovalTeamCommand;
397
- const de_GetIdentitySourceCommand = async (output, context) => {
398
- if (output.statusCode !== 200 && output.statusCode >= 300) {
399
- return de_CommandError(output, context);
400
- }
401
- const contents = (0, smithy_client_1.map)({
402
- $metadata: deserializeMetadata(output),
403
- });
404
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
405
- const doc = (0, smithy_client_1.take)(data, {
406
- CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
407
- IdentitySourceArn: smithy_client_1.expectString,
408
- IdentitySourceParameters: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
409
- IdentitySourceType: smithy_client_1.expectString,
410
- Status: smithy_client_1.expectString,
411
- StatusCode: smithy_client_1.expectString,
412
- StatusMessage: smithy_client_1.expectString,
413
- });
414
- Object.assign(contents, doc);
415
- return contents;
416
- };
417
- exports.de_GetIdentitySourceCommand = de_GetIdentitySourceCommand;
418
- const de_GetPolicyVersionCommand = async (output, context) => {
419
- if (output.statusCode !== 200 && output.statusCode >= 300) {
420
- return de_CommandError(output, context);
421
- }
422
- const contents = (0, smithy_client_1.map)({
423
- $metadata: deserializeMetadata(output),
424
- });
425
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
426
- const doc = (0, smithy_client_1.take)(data, {
427
- PolicyVersion: (_) => de_PolicyVersion(_, context),
428
- });
429
- Object.assign(contents, doc);
430
- return contents;
431
- };
432
- exports.de_GetPolicyVersionCommand = de_GetPolicyVersionCommand;
433
- const de_GetResourcePolicyCommand = async (output, context) => {
434
- if (output.statusCode !== 200 && output.statusCode >= 300) {
435
- return de_CommandError(output, context);
436
- }
437
- const contents = (0, smithy_client_1.map)({
438
- $metadata: deserializeMetadata(output),
439
- });
440
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
441
- const doc = (0, smithy_client_1.take)(data, {
442
- PolicyDocument: smithy_client_1.expectString,
443
- PolicyName: smithy_client_1.expectString,
444
- PolicyType: smithy_client_1.expectString,
445
- PolicyVersionArn: smithy_client_1.expectString,
446
- ResourceArn: smithy_client_1.expectString,
447
- });
448
- Object.assign(contents, doc);
449
- return contents;
450
- };
451
- exports.de_GetResourcePolicyCommand = de_GetResourcePolicyCommand;
452
- const de_GetSessionCommand = async (output, context) => {
453
- if (output.statusCode !== 200 && output.statusCode >= 300) {
454
- return de_CommandError(output, context);
455
- }
456
- const contents = (0, smithy_client_1.map)({
457
- $metadata: deserializeMetadata(output),
458
- });
459
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
460
- const doc = (0, smithy_client_1.take)(data, {
461
- ActionCompletionStrategy: smithy_client_1.expectString,
462
- ActionName: smithy_client_1.expectString,
463
- ApprovalStrategy: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
464
- ApprovalTeamArn: smithy_client_1.expectString,
465
- ApprovalTeamName: smithy_client_1.expectString,
466
- ApproverResponses: (_) => de_GetSessionResponseApproverResponses(_, context),
467
- CompletionTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
468
- Description: smithy_client_1.expectString,
469
- ExecutionStatus: smithy_client_1.expectString,
470
- ExpirationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
471
- InitiationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
472
- Metadata: smithy_client_1._json,
473
- NumberOfApprovers: smithy_client_1.expectInt32,
474
- ProtectedResourceArn: smithy_client_1.expectString,
475
- RequesterAccountId: smithy_client_1.expectString,
476
- RequesterComment: smithy_client_1.expectString,
477
- RequesterPrincipalArn: smithy_client_1.expectString,
478
- RequesterRegion: smithy_client_1.expectString,
479
- RequesterServicePrincipal: smithy_client_1.expectString,
480
- SessionArn: smithy_client_1.expectString,
481
- Status: smithy_client_1.expectString,
482
- StatusCode: smithy_client_1.expectString,
483
- StatusMessage: smithy_client_1.expectString,
484
- });
485
- Object.assign(contents, doc);
486
- return contents;
487
- };
488
- exports.de_GetSessionCommand = de_GetSessionCommand;
489
- const de_ListApprovalTeamsCommand = async (output, context) => {
490
- if (output.statusCode !== 200 && output.statusCode >= 300) {
491
- return de_CommandError(output, context);
492
- }
493
- const contents = (0, smithy_client_1.map)({
494
- $metadata: deserializeMetadata(output),
495
- });
496
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
497
- const doc = (0, smithy_client_1.take)(data, {
498
- ApprovalTeams: (_) => de_ListApprovalTeamsResponseApprovalTeams(_, context),
499
- NextToken: smithy_client_1.expectString,
500
- });
501
- Object.assign(contents, doc);
502
- return contents;
503
- };
504
- exports.de_ListApprovalTeamsCommand = de_ListApprovalTeamsCommand;
505
- const de_ListIdentitySourcesCommand = async (output, context) => {
506
- if (output.statusCode !== 200 && output.statusCode >= 300) {
507
- return de_CommandError(output, context);
508
- }
509
- const contents = (0, smithy_client_1.map)({
510
- $metadata: deserializeMetadata(output),
511
- });
512
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
513
- const doc = (0, smithy_client_1.take)(data, {
514
- IdentitySources: (_) => de_IdentitySources(_, context),
515
- NextToken: smithy_client_1.expectString,
516
- });
517
- Object.assign(contents, doc);
518
- return contents;
519
- };
520
- exports.de_ListIdentitySourcesCommand = de_ListIdentitySourcesCommand;
521
- const de_ListPoliciesCommand = async (output, context) => {
522
- if (output.statusCode !== 200 && output.statusCode >= 300) {
523
- return de_CommandError(output, context);
524
- }
525
- const contents = (0, smithy_client_1.map)({
526
- $metadata: deserializeMetadata(output),
527
- });
528
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
529
- const doc = (0, smithy_client_1.take)(data, {
530
- NextToken: smithy_client_1.expectString,
531
- Policies: smithy_client_1._json,
532
- });
533
- Object.assign(contents, doc);
534
- return contents;
535
- };
536
- exports.de_ListPoliciesCommand = de_ListPoliciesCommand;
537
- const de_ListPolicyVersionsCommand = async (output, context) => {
538
- if (output.statusCode !== 200 && output.statusCode >= 300) {
539
- return de_CommandError(output, context);
540
- }
541
- const contents = (0, smithy_client_1.map)({
542
- $metadata: deserializeMetadata(output),
543
- });
544
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
545
- const doc = (0, smithy_client_1.take)(data, {
546
- NextToken: smithy_client_1.expectString,
547
- PolicyVersions: (_) => de_PolicyVersions(_, context),
548
- });
549
- Object.assign(contents, doc);
550
- return contents;
551
- };
552
- exports.de_ListPolicyVersionsCommand = de_ListPolicyVersionsCommand;
553
- const de_ListResourcePoliciesCommand = async (output, context) => {
554
- if (output.statusCode !== 200 && output.statusCode >= 300) {
555
- return de_CommandError(output, context);
556
- }
557
- const contents = (0, smithy_client_1.map)({
558
- $metadata: deserializeMetadata(output),
559
- });
560
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
561
- const doc = (0, smithy_client_1.take)(data, {
562
- NextToken: smithy_client_1.expectString,
563
- ResourcePolicies: smithy_client_1._json,
564
- });
565
- Object.assign(contents, doc);
566
- return contents;
567
- };
568
- exports.de_ListResourcePoliciesCommand = de_ListResourcePoliciesCommand;
569
- const de_ListSessionsCommand = async (output, context) => {
570
- if (output.statusCode !== 200 && output.statusCode >= 300) {
571
- return de_CommandError(output, context);
572
- }
573
- const contents = (0, smithy_client_1.map)({
574
- $metadata: deserializeMetadata(output),
575
- });
576
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
577
- const doc = (0, smithy_client_1.take)(data, {
578
- NextToken: smithy_client_1.expectString,
579
- Sessions: (_) => de_ListSessionsResponseSessions(_, context),
580
- });
581
- Object.assign(contents, doc);
582
- return contents;
583
- };
584
- exports.de_ListSessionsCommand = de_ListSessionsCommand;
585
- const de_ListTagsForResourceCommand = async (output, context) => {
586
- if (output.statusCode !== 200 && output.statusCode >= 300) {
587
- return de_CommandError(output, context);
588
- }
589
- const contents = (0, smithy_client_1.map)({
590
- $metadata: deserializeMetadata(output),
591
- });
592
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
593
- const doc = (0, smithy_client_1.take)(data, {
594
- Tags: smithy_client_1._json,
595
- });
596
- Object.assign(contents, doc);
597
- return contents;
598
- };
599
- exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
600
- const de_StartActiveApprovalTeamDeletionCommand = async (output, context) => {
601
- if (output.statusCode !== 200 && output.statusCode >= 300) {
602
- return de_CommandError(output, context);
603
- }
604
- const contents = (0, smithy_client_1.map)({
605
- $metadata: deserializeMetadata(output),
606
- });
607
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
608
- const doc = (0, smithy_client_1.take)(data, {
609
- DeletionCompletionTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
610
- DeletionStartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
611
- });
612
- Object.assign(contents, doc);
613
- return contents;
614
- };
615
- exports.de_StartActiveApprovalTeamDeletionCommand = de_StartActiveApprovalTeamDeletionCommand;
616
- const de_TagResourceCommand = async (output, context) => {
617
- if (output.statusCode !== 200 && output.statusCode >= 300) {
618
- return de_CommandError(output, context);
619
- }
620
- const contents = (0, smithy_client_1.map)({
621
- $metadata: deserializeMetadata(output),
622
- });
623
- await (0, smithy_client_1.collectBody)(output.body, context);
624
- return contents;
625
- };
626
- exports.de_TagResourceCommand = de_TagResourceCommand;
627
- const de_UntagResourceCommand = async (output, context) => {
628
- if (output.statusCode !== 200 && output.statusCode >= 300) {
629
- return de_CommandError(output, context);
630
- }
631
- const contents = (0, smithy_client_1.map)({
632
- $metadata: deserializeMetadata(output),
633
- });
634
- await (0, smithy_client_1.collectBody)(output.body, context);
635
- return contents;
636
- };
637
- exports.de_UntagResourceCommand = de_UntagResourceCommand;
638
- const de_UpdateApprovalTeamCommand = async (output, context) => {
639
- if (output.statusCode !== 200 && output.statusCode >= 300) {
640
- return de_CommandError(output, context);
641
- }
642
- const contents = (0, smithy_client_1.map)({
643
- $metadata: deserializeMetadata(output),
644
- });
645
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
646
- const doc = (0, smithy_client_1.take)(data, {
647
- VersionId: smithy_client_1.expectString,
648
- });
649
- Object.assign(contents, doc);
650
- return contents;
651
- };
652
- exports.de_UpdateApprovalTeamCommand = de_UpdateApprovalTeamCommand;
653
- const de_CommandError = async (output, context) => {
654
- const parsedOutput = {
655
- ...output,
656
- body: await (0, core_1.parseJsonErrorBody)(output.body, context),
657
- };
658
- const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
659
- switch (errorCode) {
660
- case "AccessDeniedException":
661
- case "com.amazonaws.mpa#AccessDeniedException":
662
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
663
- case "ConflictException":
664
- case "com.amazonaws.mpa#ConflictException":
665
- throw await de_ConflictExceptionRes(parsedOutput, context);
666
- case "InternalServerException":
667
- case "com.amazonaws.mpa#InternalServerException":
668
- throw await de_InternalServerExceptionRes(parsedOutput, context);
669
- case "ResourceNotFoundException":
670
- case "com.amazonaws.mpa#ResourceNotFoundException":
671
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
672
- case "ThrottlingException":
673
- case "com.amazonaws.mpa#ThrottlingException":
674
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
675
- case "ValidationException":
676
- case "com.amazonaws.mpa#ValidationException":
677
- throw await de_ValidationExceptionRes(parsedOutput, context);
678
- case "ServiceQuotaExceededException":
679
- case "com.amazonaws.mpa#ServiceQuotaExceededException":
680
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
681
- case "InvalidParameterException":
682
- case "com.amazonaws.mpa#InvalidParameterException":
683
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
684
- case "TooManyTagsException":
685
- case "com.amazonaws.mpa#TooManyTagsException":
686
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
687
- default:
688
- const parsedBody = parsedOutput.body;
689
- return throwDefaultError({
690
- output,
691
- parsedBody,
692
- errorCode,
693
- });
694
- }
695
- };
696
- const throwDefaultError = (0, smithy_client_1.withBaseException)(MPAServiceException_1.MPAServiceException);
697
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
698
- const contents = (0, smithy_client_1.map)({});
699
- const data = parsedOutput.body;
700
- const doc = (0, smithy_client_1.take)(data, {
701
- Message: smithy_client_1.expectString,
702
- });
703
- Object.assign(contents, doc);
704
- const exception = new models_0_1.AccessDeniedException({
705
- $metadata: deserializeMetadata(parsedOutput),
706
- ...contents,
707
- });
708
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
709
- };
710
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
711
- const contents = (0, smithy_client_1.map)({});
712
- const data = parsedOutput.body;
713
- const doc = (0, smithy_client_1.take)(data, {
714
- Message: smithy_client_1.expectString,
715
- });
716
- Object.assign(contents, doc);
717
- const exception = new models_0_1.ConflictException({
718
- $metadata: deserializeMetadata(parsedOutput),
719
- ...contents,
720
- });
721
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
722
- };
723
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
724
- const contents = (0, smithy_client_1.map)({});
725
- const data = parsedOutput.body;
726
- const doc = (0, smithy_client_1.take)(data, {
727
- Message: smithy_client_1.expectString,
728
- });
729
- Object.assign(contents, doc);
730
- const exception = new models_0_1.InternalServerException({
731
- $metadata: deserializeMetadata(parsedOutput),
732
- ...contents,
733
- });
734
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
735
- };
736
- const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
737
- const contents = (0, smithy_client_1.map)({});
738
- const data = parsedOutput.body;
739
- const doc = (0, smithy_client_1.take)(data, {
740
- Message: smithy_client_1.expectString,
741
- });
742
- Object.assign(contents, doc);
743
- const exception = new models_0_1.InvalidParameterException({
744
- $metadata: deserializeMetadata(parsedOutput),
745
- ...contents,
746
- });
747
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
748
- };
749
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
750
- const contents = (0, smithy_client_1.map)({});
751
- const data = parsedOutput.body;
752
- const doc = (0, smithy_client_1.take)(data, {
753
- Message: smithy_client_1.expectString,
754
- });
755
- Object.assign(contents, doc);
756
- const exception = new models_0_1.ResourceNotFoundException({
757
- $metadata: deserializeMetadata(parsedOutput),
758
- ...contents,
759
- });
760
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
761
- };
762
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
763
- const contents = (0, smithy_client_1.map)({});
764
- const data = parsedOutput.body;
765
- const doc = (0, smithy_client_1.take)(data, {
766
- Message: smithy_client_1.expectString,
767
- });
768
- Object.assign(contents, doc);
769
- const exception = new models_0_1.ServiceQuotaExceededException({
770
- $metadata: deserializeMetadata(parsedOutput),
771
- ...contents,
772
- });
773
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
774
- };
775
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
776
- const contents = (0, smithy_client_1.map)({});
777
- const data = parsedOutput.body;
778
- const doc = (0, smithy_client_1.take)(data, {
779
- Message: smithy_client_1.expectString,
780
- });
781
- Object.assign(contents, doc);
782
- const exception = new models_0_1.ThrottlingException({
783
- $metadata: deserializeMetadata(parsedOutput),
784
- ...contents,
785
- });
786
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
787
- };
788
- const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
789
- const contents = (0, smithy_client_1.map)({});
790
- const data = parsedOutput.body;
791
- const doc = (0, smithy_client_1.take)(data, {
792
- Message: smithy_client_1.expectString,
793
- ResourceName: smithy_client_1.expectString,
794
- });
795
- Object.assign(contents, doc);
796
- const exception = new models_0_1.TooManyTagsException({
797
- $metadata: deserializeMetadata(parsedOutput),
798
- ...contents,
799
- });
800
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
801
- };
802
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
803
- const contents = (0, smithy_client_1.map)({});
804
- const data = parsedOutput.body;
805
- const doc = (0, smithy_client_1.take)(data, {
806
- Message: smithy_client_1.expectString,
807
- });
808
- Object.assign(contents, doc);
809
- const exception = new models_0_1.ValidationException({
810
- $metadata: deserializeMetadata(parsedOutput),
811
- ...contents,
812
- });
813
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
814
- };
815
- const de_GetApprovalTeamResponseApprover = (output, context) => {
816
- return (0, smithy_client_1.take)(output, {
817
- ApproverId: smithy_client_1.expectString,
818
- PrimaryIdentityId: smithy_client_1.expectString,
819
- PrimaryIdentitySourceArn: smithy_client_1.expectString,
820
- PrimaryIdentityStatus: smithy_client_1.expectString,
821
- ResponseTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
822
- });
823
- };
824
- const de_GetApprovalTeamResponseApprovers = (output, context) => {
825
- const retVal = (output || [])
826
- .filter((e) => e != null)
827
- .map((entry) => {
828
- return de_GetApprovalTeamResponseApprover(entry, context);
829
- });
830
- return retVal;
831
- };
832
- const de_GetSessionResponseApproverResponse = (output, context) => {
833
- return (0, smithy_client_1.take)(output, {
834
- ApproverId: smithy_client_1.expectString,
835
- IdentityId: smithy_client_1.expectString,
836
- IdentitySourceArn: smithy_client_1.expectString,
837
- Response: smithy_client_1.expectString,
838
- ResponseTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
839
- });
840
- };
841
- const de_GetSessionResponseApproverResponses = (output, context) => {
842
- const retVal = (output || [])
843
- .filter((e) => e != null)
844
- .map((entry) => {
845
- return de_GetSessionResponseApproverResponse(entry, context);
846
- });
847
- return retVal;
848
- };
849
- const de_IdentitySourceForList = (output, context) => {
850
- return (0, smithy_client_1.take)(output, {
851
- CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
852
- IdentitySourceArn: smithy_client_1.expectString,
853
- IdentitySourceParameters: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
854
- IdentitySourceType: smithy_client_1.expectString,
855
- Status: smithy_client_1.expectString,
856
- StatusCode: smithy_client_1.expectString,
857
- StatusMessage: smithy_client_1.expectString,
858
- });
859
- };
860
- const de_IdentitySources = (output, context) => {
861
- const retVal = (output || [])
862
- .filter((e) => e != null)
863
- .map((entry) => {
864
- return de_IdentitySourceForList(entry, context);
865
- });
866
- return retVal;
867
- };
868
- const de_ListApprovalTeamsResponseApprovalTeam = (output, context) => {
869
- return (0, smithy_client_1.take)(output, {
870
- ApprovalStrategy: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
871
- Arn: smithy_client_1.expectString,
872
- CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
873
- Description: smithy_client_1.expectString,
874
- Name: smithy_client_1.expectString,
875
- NumberOfApprovers: smithy_client_1.expectInt32,
876
- Status: smithy_client_1.expectString,
877
- StatusCode: smithy_client_1.expectString,
878
- StatusMessage: smithy_client_1.expectString,
879
- });
880
- };
881
- const de_ListApprovalTeamsResponseApprovalTeams = (output, context) => {
882
- const retVal = (output || [])
883
- .filter((e) => e != null)
884
- .map((entry) => {
885
- return de_ListApprovalTeamsResponseApprovalTeam(entry, context);
886
- });
887
- return retVal;
888
- };
889
- const de_ListSessionsResponseSession = (output, context) => {
890
- return (0, smithy_client_1.take)(output, {
891
- ActionCompletionStrategy: smithy_client_1.expectString,
892
- ActionName: smithy_client_1.expectString,
893
- ApprovalTeamArn: smithy_client_1.expectString,
894
- ApprovalTeamName: smithy_client_1.expectString,
895
- CompletionTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
896
- Description: smithy_client_1.expectString,
897
- ExpirationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
898
- InitiationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
899
- ProtectedResourceArn: smithy_client_1.expectString,
900
- RequesterAccountId: smithy_client_1.expectString,
901
- RequesterPrincipalArn: smithy_client_1.expectString,
902
- RequesterRegion: smithy_client_1.expectString,
903
- RequesterServicePrincipal: smithy_client_1.expectString,
904
- SessionArn: smithy_client_1.expectString,
905
- Status: smithy_client_1.expectString,
906
- StatusCode: smithy_client_1.expectString,
907
- StatusMessage: smithy_client_1.expectString,
908
- });
909
- };
910
- const de_ListSessionsResponseSessions = (output, context) => {
911
- const retVal = (output || [])
912
- .filter((e) => e != null)
913
- .map((entry) => {
914
- return de_ListSessionsResponseSession(entry, context);
915
- });
916
- return retVal;
917
- };
918
- const de_PendingUpdate = (output, context) => {
919
- return (0, smithy_client_1.take)(output, {
920
- ApprovalStrategy: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
921
- Approvers: (_) => de_GetApprovalTeamResponseApprovers(_, context),
922
- Description: smithy_client_1.expectString,
923
- NumberOfApprovers: smithy_client_1.expectInt32,
924
- Status: smithy_client_1.expectString,
925
- StatusCode: smithy_client_1.expectString,
926
- StatusMessage: smithy_client_1.expectString,
927
- UpdateInitiationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
928
- VersionId: smithy_client_1.expectString,
929
- });
930
- };
931
- const de_PolicyVersion = (output, context) => {
932
- return (0, smithy_client_1.take)(output, {
933
- Arn: smithy_client_1.expectString,
934
- CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
935
- Document: smithy_client_1.expectString,
936
- IsDefault: smithy_client_1.expectBoolean,
937
- LastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
938
- Name: smithy_client_1.expectString,
939
- PolicyArn: smithy_client_1.expectString,
940
- PolicyType: smithy_client_1.expectString,
941
- Status: smithy_client_1.expectString,
942
- VersionId: smithy_client_1.expectInt32,
943
- });
944
- };
945
- const de_PolicyVersions = (output, context) => {
946
- const retVal = (output || [])
947
- .filter((e) => e != null)
948
- .map((entry) => {
949
- return de_PolicyVersionSummary(entry, context);
950
- });
951
- return retVal;
952
- };
953
- const de_PolicyVersionSummary = (output, context) => {
954
- return (0, smithy_client_1.take)(output, {
955
- Arn: smithy_client_1.expectString,
956
- CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
957
- IsDefault: smithy_client_1.expectBoolean,
958
- LastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
959
- Name: smithy_client_1.expectString,
960
- PolicyArn: smithy_client_1.expectString,
961
- PolicyType: smithy_client_1.expectString,
962
- Status: smithy_client_1.expectString,
963
- VersionId: smithy_client_1.expectInt32,
964
- });
965
- };
966
- const deserializeMetadata = (output) => ({
967
- httpStatusCode: output.statusCode,
968
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
969
- extendedRequestId: output.headers["x-amz-id-2"],
970
- cfId: output.headers["x-amz-cf-id"],
971
- });
972
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
973
- const _D = "Delete";
974
- const _L = "List";
975
- const _MR = "MaxResults";
976
- const _NT = "NextToken";