@aws-sdk/client-cleanroomsml 3.490.0 → 3.496.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 (44) hide show
  1. package/dist-cjs/CleanRoomsML.js +1 -61
  2. package/dist-cjs/CleanRoomsMLClient.js +1 -43
  3. package/dist-cjs/commands/CreateAudienceModelCommand.js +1 -28
  4. package/dist-cjs/commands/CreateConfiguredAudienceModelCommand.js +1 -28
  5. package/dist-cjs/commands/CreateTrainingDatasetCommand.js +1 -28
  6. package/dist-cjs/commands/DeleteAudienceGenerationJobCommand.js +1 -28
  7. package/dist-cjs/commands/DeleteAudienceModelCommand.js +1 -28
  8. package/dist-cjs/commands/DeleteConfiguredAudienceModelCommand.js +1 -28
  9. package/dist-cjs/commands/DeleteConfiguredAudienceModelPolicyCommand.js +1 -28
  10. package/dist-cjs/commands/DeleteTrainingDatasetCommand.js +1 -28
  11. package/dist-cjs/commands/GetAudienceGenerationJobCommand.js +1 -28
  12. package/dist-cjs/commands/GetAudienceModelCommand.js +1 -28
  13. package/dist-cjs/commands/GetConfiguredAudienceModelCommand.js +1 -28
  14. package/dist-cjs/commands/GetConfiguredAudienceModelPolicyCommand.js +1 -28
  15. package/dist-cjs/commands/GetTrainingDatasetCommand.js +1 -28
  16. package/dist-cjs/commands/ListAudienceExportJobsCommand.js +1 -28
  17. package/dist-cjs/commands/ListAudienceGenerationJobsCommand.js +1 -28
  18. package/dist-cjs/commands/ListAudienceModelsCommand.js +1 -28
  19. package/dist-cjs/commands/ListConfiguredAudienceModelsCommand.js +1 -28
  20. package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
  21. package/dist-cjs/commands/ListTrainingDatasetsCommand.js +1 -28
  22. package/dist-cjs/commands/PutConfiguredAudienceModelPolicyCommand.js +1 -28
  23. package/dist-cjs/commands/StartAudienceExportJobCommand.js +1 -28
  24. package/dist-cjs/commands/StartAudienceGenerationJobCommand.js +1 -28
  25. package/dist-cjs/commands/TagResourceCommand.js +1 -28
  26. package/dist-cjs/commands/UntagResourceCommand.js +1 -28
  27. package/dist-cjs/commands/UpdateConfiguredAudienceModelCommand.js +1 -28
  28. package/dist-cjs/commands/index.js +1 -28
  29. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  30. package/dist-cjs/extensionConfiguration.js +1 -2
  31. package/dist-cjs/index.js +2464 -11
  32. package/dist-cjs/models/CleanRoomsMLServiceException.js +1 -12
  33. package/dist-cjs/models/index.js +1 -4
  34. package/dist-cjs/models/models_0.js +1 -131
  35. package/dist-cjs/pagination/Interfaces.js +1 -2
  36. package/dist-cjs/pagination/ListAudienceExportJobsPaginator.js +1 -7
  37. package/dist-cjs/pagination/ListAudienceGenerationJobsPaginator.js +1 -7
  38. package/dist-cjs/pagination/ListAudienceModelsPaginator.js +1 -7
  39. package/dist-cjs/pagination/ListConfiguredAudienceModelsPaginator.js +1 -7
  40. package/dist-cjs/pagination/ListTrainingDatasetsPaginator.js +1 -7
  41. package/dist-cjs/pagination/index.js +1 -9
  42. package/dist-cjs/protocols/Aws_restJson1.js +1 -1652
  43. package/dist-cjs/runtimeExtensions.js +1 -22
  44. package/package.json +40 -40
@@ -1,1652 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_UpdateConfiguredAudienceModelCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StartAudienceGenerationJobCommand = exports.de_StartAudienceExportJobCommand = exports.de_PutConfiguredAudienceModelPolicyCommand = exports.de_ListTrainingDatasetsCommand = exports.de_ListTagsForResourceCommand = exports.de_ListConfiguredAudienceModelsCommand = exports.de_ListAudienceModelsCommand = exports.de_ListAudienceGenerationJobsCommand = exports.de_ListAudienceExportJobsCommand = exports.de_GetTrainingDatasetCommand = exports.de_GetConfiguredAudienceModelPolicyCommand = exports.de_GetConfiguredAudienceModelCommand = exports.de_GetAudienceModelCommand = exports.de_GetAudienceGenerationJobCommand = exports.de_DeleteTrainingDatasetCommand = exports.de_DeleteConfiguredAudienceModelPolicyCommand = exports.de_DeleteConfiguredAudienceModelCommand = exports.de_DeleteAudienceModelCommand = exports.de_DeleteAudienceGenerationJobCommand = exports.de_CreateTrainingDatasetCommand = exports.de_CreateConfiguredAudienceModelCommand = exports.de_CreateAudienceModelCommand = exports.se_UpdateConfiguredAudienceModelCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StartAudienceGenerationJobCommand = exports.se_StartAudienceExportJobCommand = exports.se_PutConfiguredAudienceModelPolicyCommand = exports.se_ListTrainingDatasetsCommand = exports.se_ListTagsForResourceCommand = exports.se_ListConfiguredAudienceModelsCommand = exports.se_ListAudienceModelsCommand = exports.se_ListAudienceGenerationJobsCommand = exports.se_ListAudienceExportJobsCommand = exports.se_GetTrainingDatasetCommand = exports.se_GetConfiguredAudienceModelPolicyCommand = exports.se_GetConfiguredAudienceModelCommand = exports.se_GetAudienceModelCommand = exports.se_GetAudienceGenerationJobCommand = exports.se_DeleteTrainingDatasetCommand = exports.se_DeleteConfiguredAudienceModelPolicyCommand = exports.se_DeleteConfiguredAudienceModelCommand = exports.se_DeleteAudienceModelCommand = exports.se_DeleteAudienceGenerationJobCommand = exports.se_CreateTrainingDatasetCommand = exports.se_CreateConfiguredAudienceModelCommand = exports.se_CreateAudienceModelCommand = void 0;
4
- const core_1 = require("@smithy/core");
5
- const smithy_client_1 = require("@smithy/smithy-client");
6
- const CleanRoomsMLServiceException_1 = require("../models/CleanRoomsMLServiceException");
7
- const models_0_1 = require("../models/models_0");
8
- const se_CreateAudienceModelCommand = async (input, context) => {
9
- const b = (0, core_1.requestBuilder)(input, context);
10
- const headers = {
11
- "content-type": "application/json",
12
- };
13
- b.bp("/audience-model");
14
- let body;
15
- body = JSON.stringify((0, smithy_client_1.take)(input, {
16
- description: [],
17
- kmsKeyArn: [],
18
- name: [],
19
- tags: (_) => (0, smithy_client_1._json)(_),
20
- trainingDataEndTime: (_) => _.toISOString().split(".")[0] + "Z",
21
- trainingDataStartTime: (_) => _.toISOString().split(".")[0] + "Z",
22
- trainingDatasetArn: [],
23
- }));
24
- b.m("POST").h(headers).b(body);
25
- return b.build();
26
- };
27
- exports.se_CreateAudienceModelCommand = se_CreateAudienceModelCommand;
28
- const se_CreateConfiguredAudienceModelCommand = async (input, context) => {
29
- const b = (0, core_1.requestBuilder)(input, context);
30
- const headers = {
31
- "content-type": "application/json",
32
- };
33
- b.bp("/configured-audience-model");
34
- let body;
35
- body = JSON.stringify((0, smithy_client_1.take)(input, {
36
- audienceModelArn: [],
37
- audienceSizeConfig: (_) => (0, smithy_client_1._json)(_),
38
- childResourceTagOnCreatePolicy: [],
39
- description: [],
40
- minMatchingSeedSize: [],
41
- name: [],
42
- outputConfig: (_) => (0, smithy_client_1._json)(_),
43
- sharedAudienceMetrics: (_) => (0, smithy_client_1._json)(_),
44
- tags: (_) => (0, smithy_client_1._json)(_),
45
- }));
46
- b.m("POST").h(headers).b(body);
47
- return b.build();
48
- };
49
- exports.se_CreateConfiguredAudienceModelCommand = se_CreateConfiguredAudienceModelCommand;
50
- const se_CreateTrainingDatasetCommand = async (input, context) => {
51
- const b = (0, core_1.requestBuilder)(input, context);
52
- const headers = {
53
- "content-type": "application/json",
54
- };
55
- b.bp("/training-dataset");
56
- let body;
57
- body = JSON.stringify((0, smithy_client_1.take)(input, {
58
- description: [],
59
- name: [],
60
- roleArn: [],
61
- tags: (_) => (0, smithy_client_1._json)(_),
62
- trainingData: (_) => (0, smithy_client_1._json)(_),
63
- }));
64
- b.m("POST").h(headers).b(body);
65
- return b.build();
66
- };
67
- exports.se_CreateTrainingDatasetCommand = se_CreateTrainingDatasetCommand;
68
- const se_DeleteAudienceGenerationJobCommand = async (input, context) => {
69
- const b = (0, core_1.requestBuilder)(input, context);
70
- const headers = {};
71
- b.bp("/audience-generation-job/{audienceGenerationJobArn}");
72
- b.p("audienceGenerationJobArn", () => input.audienceGenerationJobArn, "{audienceGenerationJobArn}", false);
73
- let body;
74
- b.m("DELETE").h(headers).b(body);
75
- return b.build();
76
- };
77
- exports.se_DeleteAudienceGenerationJobCommand = se_DeleteAudienceGenerationJobCommand;
78
- const se_DeleteAudienceModelCommand = async (input, context) => {
79
- const b = (0, core_1.requestBuilder)(input, context);
80
- const headers = {};
81
- b.bp("/audience-model/{audienceModelArn}");
82
- b.p("audienceModelArn", () => input.audienceModelArn, "{audienceModelArn}", false);
83
- let body;
84
- b.m("DELETE").h(headers).b(body);
85
- return b.build();
86
- };
87
- exports.se_DeleteAudienceModelCommand = se_DeleteAudienceModelCommand;
88
- const se_DeleteConfiguredAudienceModelCommand = async (input, context) => {
89
- const b = (0, core_1.requestBuilder)(input, context);
90
- const headers = {};
91
- b.bp("/configured-audience-model/{configuredAudienceModelArn}");
92
- b.p("configuredAudienceModelArn", () => input.configuredAudienceModelArn, "{configuredAudienceModelArn}", false);
93
- let body;
94
- b.m("DELETE").h(headers).b(body);
95
- return b.build();
96
- };
97
- exports.se_DeleteConfiguredAudienceModelCommand = se_DeleteConfiguredAudienceModelCommand;
98
- const se_DeleteConfiguredAudienceModelPolicyCommand = async (input, context) => {
99
- const b = (0, core_1.requestBuilder)(input, context);
100
- const headers = {};
101
- b.bp("/configured-audience-model/{configuredAudienceModelArn}/policy");
102
- b.p("configuredAudienceModelArn", () => input.configuredAudienceModelArn, "{configuredAudienceModelArn}", false);
103
- let body;
104
- b.m("DELETE").h(headers).b(body);
105
- return b.build();
106
- };
107
- exports.se_DeleteConfiguredAudienceModelPolicyCommand = se_DeleteConfiguredAudienceModelPolicyCommand;
108
- const se_DeleteTrainingDatasetCommand = async (input, context) => {
109
- const b = (0, core_1.requestBuilder)(input, context);
110
- const headers = {};
111
- b.bp("/training-dataset/{trainingDatasetArn}");
112
- b.p("trainingDatasetArn", () => input.trainingDatasetArn, "{trainingDatasetArn}", false);
113
- let body;
114
- b.m("DELETE").h(headers).b(body);
115
- return b.build();
116
- };
117
- exports.se_DeleteTrainingDatasetCommand = se_DeleteTrainingDatasetCommand;
118
- const se_GetAudienceGenerationJobCommand = async (input, context) => {
119
- const b = (0, core_1.requestBuilder)(input, context);
120
- const headers = {};
121
- b.bp("/audience-generation-job/{audienceGenerationJobArn}");
122
- b.p("audienceGenerationJobArn", () => input.audienceGenerationJobArn, "{audienceGenerationJobArn}", false);
123
- let body;
124
- b.m("GET").h(headers).b(body);
125
- return b.build();
126
- };
127
- exports.se_GetAudienceGenerationJobCommand = se_GetAudienceGenerationJobCommand;
128
- const se_GetAudienceModelCommand = async (input, context) => {
129
- const b = (0, core_1.requestBuilder)(input, context);
130
- const headers = {};
131
- b.bp("/audience-model/{audienceModelArn}");
132
- b.p("audienceModelArn", () => input.audienceModelArn, "{audienceModelArn}", false);
133
- let body;
134
- b.m("GET").h(headers).b(body);
135
- return b.build();
136
- };
137
- exports.se_GetAudienceModelCommand = se_GetAudienceModelCommand;
138
- const se_GetConfiguredAudienceModelCommand = async (input, context) => {
139
- const b = (0, core_1.requestBuilder)(input, context);
140
- const headers = {};
141
- b.bp("/configured-audience-model/{configuredAudienceModelArn}");
142
- b.p("configuredAudienceModelArn", () => input.configuredAudienceModelArn, "{configuredAudienceModelArn}", false);
143
- let body;
144
- b.m("GET").h(headers).b(body);
145
- return b.build();
146
- };
147
- exports.se_GetConfiguredAudienceModelCommand = se_GetConfiguredAudienceModelCommand;
148
- const se_GetConfiguredAudienceModelPolicyCommand = async (input, context) => {
149
- const b = (0, core_1.requestBuilder)(input, context);
150
- const headers = {};
151
- b.bp("/configured-audience-model/{configuredAudienceModelArn}/policy");
152
- b.p("configuredAudienceModelArn", () => input.configuredAudienceModelArn, "{configuredAudienceModelArn}", false);
153
- let body;
154
- b.m("GET").h(headers).b(body);
155
- return b.build();
156
- };
157
- exports.se_GetConfiguredAudienceModelPolicyCommand = se_GetConfiguredAudienceModelPolicyCommand;
158
- const se_GetTrainingDatasetCommand = async (input, context) => {
159
- const b = (0, core_1.requestBuilder)(input, context);
160
- const headers = {};
161
- b.bp("/training-dataset/{trainingDatasetArn}");
162
- b.p("trainingDatasetArn", () => input.trainingDatasetArn, "{trainingDatasetArn}", false);
163
- let body;
164
- b.m("GET").h(headers).b(body);
165
- return b.build();
166
- };
167
- exports.se_GetTrainingDatasetCommand = se_GetTrainingDatasetCommand;
168
- const se_ListAudienceExportJobsCommand = async (input, context) => {
169
- const b = (0, core_1.requestBuilder)(input, context);
170
- const headers = {};
171
- b.bp("/audience-export-job");
172
- const query = (0, smithy_client_1.map)({
173
- [_nT]: [, input[_nT]],
174
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
175
- [_aGJA]: [, input[_aGJA]],
176
- });
177
- let body;
178
- b.m("GET").h(headers).q(query).b(body);
179
- return b.build();
180
- };
181
- exports.se_ListAudienceExportJobsCommand = se_ListAudienceExportJobsCommand;
182
- const se_ListAudienceGenerationJobsCommand = async (input, context) => {
183
- const b = (0, core_1.requestBuilder)(input, context);
184
- const headers = {};
185
- b.bp("/audience-generation-job");
186
- const query = (0, smithy_client_1.map)({
187
- [_nT]: [, input[_nT]],
188
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
189
- [_cAMA]: [, input[_cAMA]],
190
- [_cI]: [, input[_cI]],
191
- });
192
- let body;
193
- b.m("GET").h(headers).q(query).b(body);
194
- return b.build();
195
- };
196
- exports.se_ListAudienceGenerationJobsCommand = se_ListAudienceGenerationJobsCommand;
197
- const se_ListAudienceModelsCommand = async (input, context) => {
198
- const b = (0, core_1.requestBuilder)(input, context);
199
- const headers = {};
200
- b.bp("/audience-model");
201
- const query = (0, smithy_client_1.map)({
202
- [_nT]: [, input[_nT]],
203
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
204
- });
205
- let body;
206
- b.m("GET").h(headers).q(query).b(body);
207
- return b.build();
208
- };
209
- exports.se_ListAudienceModelsCommand = se_ListAudienceModelsCommand;
210
- const se_ListConfiguredAudienceModelsCommand = async (input, context) => {
211
- const b = (0, core_1.requestBuilder)(input, context);
212
- const headers = {};
213
- b.bp("/configured-audience-model");
214
- const query = (0, smithy_client_1.map)({
215
- [_nT]: [, input[_nT]],
216
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
217
- });
218
- let body;
219
- b.m("GET").h(headers).q(query).b(body);
220
- return b.build();
221
- };
222
- exports.se_ListConfiguredAudienceModelsCommand = se_ListConfiguredAudienceModelsCommand;
223
- const se_ListTagsForResourceCommand = async (input, context) => {
224
- const b = (0, core_1.requestBuilder)(input, context);
225
- const headers = {};
226
- b.bp("/tags/{resourceArn}");
227
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
228
- let body;
229
- b.m("GET").h(headers).b(body);
230
- return b.build();
231
- };
232
- exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
233
- const se_ListTrainingDatasetsCommand = async (input, context) => {
234
- const b = (0, core_1.requestBuilder)(input, context);
235
- const headers = {};
236
- b.bp("/training-dataset");
237
- const query = (0, smithy_client_1.map)({
238
- [_nT]: [, input[_nT]],
239
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
240
- });
241
- let body;
242
- b.m("GET").h(headers).q(query).b(body);
243
- return b.build();
244
- };
245
- exports.se_ListTrainingDatasetsCommand = se_ListTrainingDatasetsCommand;
246
- const se_PutConfiguredAudienceModelPolicyCommand = async (input, context) => {
247
- const b = (0, core_1.requestBuilder)(input, context);
248
- const headers = {
249
- "content-type": "application/json",
250
- };
251
- b.bp("/configured-audience-model/{configuredAudienceModelArn}/policy");
252
- b.p("configuredAudienceModelArn", () => input.configuredAudienceModelArn, "{configuredAudienceModelArn}", false);
253
- let body;
254
- body = JSON.stringify((0, smithy_client_1.take)(input, {
255
- configuredAudienceModelPolicy: [],
256
- policyExistenceCondition: [],
257
- previousPolicyHash: [],
258
- }));
259
- b.m("PUT").h(headers).b(body);
260
- return b.build();
261
- };
262
- exports.se_PutConfiguredAudienceModelPolicyCommand = se_PutConfiguredAudienceModelPolicyCommand;
263
- const se_StartAudienceExportJobCommand = async (input, context) => {
264
- const b = (0, core_1.requestBuilder)(input, context);
265
- const headers = {
266
- "content-type": "application/json",
267
- };
268
- b.bp("/audience-export-job");
269
- let body;
270
- body = JSON.stringify((0, smithy_client_1.take)(input, {
271
- audienceGenerationJobArn: [],
272
- audienceSize: (_) => (0, smithy_client_1._json)(_),
273
- description: [],
274
- name: [],
275
- }));
276
- b.m("POST").h(headers).b(body);
277
- return b.build();
278
- };
279
- exports.se_StartAudienceExportJobCommand = se_StartAudienceExportJobCommand;
280
- const se_StartAudienceGenerationJobCommand = async (input, context) => {
281
- const b = (0, core_1.requestBuilder)(input, context);
282
- const headers = {
283
- "content-type": "application/json",
284
- };
285
- b.bp("/audience-generation-job");
286
- let body;
287
- body = JSON.stringify((0, smithy_client_1.take)(input, {
288
- collaborationId: [],
289
- configuredAudienceModelArn: [],
290
- description: [],
291
- includeSeedInOutput: [],
292
- name: [],
293
- seedAudience: (_) => (0, smithy_client_1._json)(_),
294
- tags: (_) => (0, smithy_client_1._json)(_),
295
- }));
296
- b.m("POST").h(headers).b(body);
297
- return b.build();
298
- };
299
- exports.se_StartAudienceGenerationJobCommand = se_StartAudienceGenerationJobCommand;
300
- const se_TagResourceCommand = async (input, context) => {
301
- const b = (0, core_1.requestBuilder)(input, context);
302
- const headers = {
303
- "content-type": "application/json",
304
- };
305
- b.bp("/tags/{resourceArn}");
306
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
307
- let body;
308
- body = JSON.stringify((0, smithy_client_1.take)(input, {
309
- tags: (_) => (0, smithy_client_1._json)(_),
310
- }));
311
- b.m("POST").h(headers).b(body);
312
- return b.build();
313
- };
314
- exports.se_TagResourceCommand = se_TagResourceCommand;
315
- const se_UntagResourceCommand = async (input, context) => {
316
- const b = (0, core_1.requestBuilder)(input, context);
317
- const headers = {};
318
- b.bp("/tags/{resourceArn}");
319
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
320
- const query = (0, smithy_client_1.map)({
321
- [_tK]: [
322
- (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
323
- () => (input[_tK] || []).map((_entry) => _entry),
324
- ],
325
- });
326
- let body;
327
- b.m("DELETE").h(headers).q(query).b(body);
328
- return b.build();
329
- };
330
- exports.se_UntagResourceCommand = se_UntagResourceCommand;
331
- const se_UpdateConfiguredAudienceModelCommand = async (input, context) => {
332
- const b = (0, core_1.requestBuilder)(input, context);
333
- const headers = {
334
- "content-type": "application/json",
335
- };
336
- b.bp("/configured-audience-model/{configuredAudienceModelArn}");
337
- b.p("configuredAudienceModelArn", () => input.configuredAudienceModelArn, "{configuredAudienceModelArn}", false);
338
- let body;
339
- body = JSON.stringify((0, smithy_client_1.take)(input, {
340
- audienceModelArn: [],
341
- audienceSizeConfig: (_) => (0, smithy_client_1._json)(_),
342
- description: [],
343
- minMatchingSeedSize: [],
344
- outputConfig: (_) => (0, smithy_client_1._json)(_),
345
- sharedAudienceMetrics: (_) => (0, smithy_client_1._json)(_),
346
- }));
347
- b.m("PATCH").h(headers).b(body);
348
- return b.build();
349
- };
350
- exports.se_UpdateConfiguredAudienceModelCommand = se_UpdateConfiguredAudienceModelCommand;
351
- const de_CreateAudienceModelCommand = async (output, context) => {
352
- if (output.statusCode !== 200 && output.statusCode >= 300) {
353
- return de_CreateAudienceModelCommandError(output, context);
354
- }
355
- const contents = (0, smithy_client_1.map)({
356
- $metadata: deserializeMetadata(output),
357
- });
358
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
359
- const doc = (0, smithy_client_1.take)(data, {
360
- audienceModelArn: smithy_client_1.expectString,
361
- });
362
- Object.assign(contents, doc);
363
- return contents;
364
- };
365
- exports.de_CreateAudienceModelCommand = de_CreateAudienceModelCommand;
366
- const de_CreateAudienceModelCommandError = async (output, context) => {
367
- const parsedOutput = {
368
- ...output,
369
- body: await parseErrorBody(output.body, context),
370
- };
371
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
372
- switch (errorCode) {
373
- case "AccessDeniedException":
374
- case "com.amazonaws.cleanroomsml#AccessDeniedException":
375
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
376
- case "ConflictException":
377
- case "com.amazonaws.cleanroomsml#ConflictException":
378
- throw await de_ConflictExceptionRes(parsedOutput, context);
379
- case "ResourceNotFoundException":
380
- case "com.amazonaws.cleanroomsml#ResourceNotFoundException":
381
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
382
- case "ServiceQuotaExceededException":
383
- case "com.amazonaws.cleanroomsml#ServiceQuotaExceededException":
384
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
385
- case "ValidationException":
386
- case "com.amazonaws.cleanroomsml#ValidationException":
387
- throw await de_ValidationExceptionRes(parsedOutput, context);
388
- default:
389
- const parsedBody = parsedOutput.body;
390
- return throwDefaultError({
391
- output,
392
- parsedBody,
393
- errorCode,
394
- });
395
- }
396
- };
397
- const de_CreateConfiguredAudienceModelCommand = async (output, context) => {
398
- if (output.statusCode !== 200 && output.statusCode >= 300) {
399
- return de_CreateConfiguredAudienceModelCommandError(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 parseBody(output.body, context)), "body");
405
- const doc = (0, smithy_client_1.take)(data, {
406
- configuredAudienceModelArn: smithy_client_1.expectString,
407
- });
408
- Object.assign(contents, doc);
409
- return contents;
410
- };
411
- exports.de_CreateConfiguredAudienceModelCommand = de_CreateConfiguredAudienceModelCommand;
412
- const de_CreateConfiguredAudienceModelCommandError = async (output, context) => {
413
- const parsedOutput = {
414
- ...output,
415
- body: await parseErrorBody(output.body, context),
416
- };
417
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
418
- switch (errorCode) {
419
- case "AccessDeniedException":
420
- case "com.amazonaws.cleanroomsml#AccessDeniedException":
421
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
422
- case "ConflictException":
423
- case "com.amazonaws.cleanroomsml#ConflictException":
424
- throw await de_ConflictExceptionRes(parsedOutput, context);
425
- case "ResourceNotFoundException":
426
- case "com.amazonaws.cleanroomsml#ResourceNotFoundException":
427
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
428
- case "ServiceQuotaExceededException":
429
- case "com.amazonaws.cleanroomsml#ServiceQuotaExceededException":
430
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
431
- case "ValidationException":
432
- case "com.amazonaws.cleanroomsml#ValidationException":
433
- throw await de_ValidationExceptionRes(parsedOutput, context);
434
- default:
435
- const parsedBody = parsedOutput.body;
436
- return throwDefaultError({
437
- output,
438
- parsedBody,
439
- errorCode,
440
- });
441
- }
442
- };
443
- const de_CreateTrainingDatasetCommand = async (output, context) => {
444
- if (output.statusCode !== 200 && output.statusCode >= 300) {
445
- return de_CreateTrainingDatasetCommandError(output, context);
446
- }
447
- const contents = (0, smithy_client_1.map)({
448
- $metadata: deserializeMetadata(output),
449
- });
450
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
451
- const doc = (0, smithy_client_1.take)(data, {
452
- trainingDatasetArn: smithy_client_1.expectString,
453
- });
454
- Object.assign(contents, doc);
455
- return contents;
456
- };
457
- exports.de_CreateTrainingDatasetCommand = de_CreateTrainingDatasetCommand;
458
- const de_CreateTrainingDatasetCommandError = async (output, context) => {
459
- const parsedOutput = {
460
- ...output,
461
- body: await parseErrorBody(output.body, context),
462
- };
463
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
464
- switch (errorCode) {
465
- case "AccessDeniedException":
466
- case "com.amazonaws.cleanroomsml#AccessDeniedException":
467
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
468
- case "ConflictException":
469
- case "com.amazonaws.cleanroomsml#ConflictException":
470
- throw await de_ConflictExceptionRes(parsedOutput, context);
471
- case "ValidationException":
472
- case "com.amazonaws.cleanroomsml#ValidationException":
473
- throw await de_ValidationExceptionRes(parsedOutput, context);
474
- default:
475
- const parsedBody = parsedOutput.body;
476
- return throwDefaultError({
477
- output,
478
- parsedBody,
479
- errorCode,
480
- });
481
- }
482
- };
483
- const de_DeleteAudienceGenerationJobCommand = async (output, context) => {
484
- if (output.statusCode !== 200 && output.statusCode >= 300) {
485
- return de_DeleteAudienceGenerationJobCommandError(output, context);
486
- }
487
- const contents = (0, smithy_client_1.map)({
488
- $metadata: deserializeMetadata(output),
489
- });
490
- await (0, smithy_client_1.collectBody)(output.body, context);
491
- return contents;
492
- };
493
- exports.de_DeleteAudienceGenerationJobCommand = de_DeleteAudienceGenerationJobCommand;
494
- const de_DeleteAudienceGenerationJobCommandError = async (output, context) => {
495
- const parsedOutput = {
496
- ...output,
497
- body: await parseErrorBody(output.body, context),
498
- };
499
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
500
- switch (errorCode) {
501
- case "AccessDeniedException":
502
- case "com.amazonaws.cleanroomsml#AccessDeniedException":
503
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
504
- case "ConflictException":
505
- case "com.amazonaws.cleanroomsml#ConflictException":
506
- throw await de_ConflictExceptionRes(parsedOutput, context);
507
- case "ResourceNotFoundException":
508
- case "com.amazonaws.cleanroomsml#ResourceNotFoundException":
509
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
510
- case "ValidationException":
511
- case "com.amazonaws.cleanroomsml#ValidationException":
512
- throw await de_ValidationExceptionRes(parsedOutput, context);
513
- default:
514
- const parsedBody = parsedOutput.body;
515
- return throwDefaultError({
516
- output,
517
- parsedBody,
518
- errorCode,
519
- });
520
- }
521
- };
522
- const de_DeleteAudienceModelCommand = async (output, context) => {
523
- if (output.statusCode !== 200 && output.statusCode >= 300) {
524
- return de_DeleteAudienceModelCommandError(output, context);
525
- }
526
- const contents = (0, smithy_client_1.map)({
527
- $metadata: deserializeMetadata(output),
528
- });
529
- await (0, smithy_client_1.collectBody)(output.body, context);
530
- return contents;
531
- };
532
- exports.de_DeleteAudienceModelCommand = de_DeleteAudienceModelCommand;
533
- const de_DeleteAudienceModelCommandError = async (output, context) => {
534
- const parsedOutput = {
535
- ...output,
536
- body: await parseErrorBody(output.body, context),
537
- };
538
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
539
- switch (errorCode) {
540
- case "AccessDeniedException":
541
- case "com.amazonaws.cleanroomsml#AccessDeniedException":
542
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
543
- case "ConflictException":
544
- case "com.amazonaws.cleanroomsml#ConflictException":
545
- throw await de_ConflictExceptionRes(parsedOutput, context);
546
- case "ResourceNotFoundException":
547
- case "com.amazonaws.cleanroomsml#ResourceNotFoundException":
548
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
549
- case "ValidationException":
550
- case "com.amazonaws.cleanroomsml#ValidationException":
551
- throw await de_ValidationExceptionRes(parsedOutput, context);
552
- default:
553
- const parsedBody = parsedOutput.body;
554
- return throwDefaultError({
555
- output,
556
- parsedBody,
557
- errorCode,
558
- });
559
- }
560
- };
561
- const de_DeleteConfiguredAudienceModelCommand = async (output, context) => {
562
- if (output.statusCode !== 200 && output.statusCode >= 300) {
563
- return de_DeleteConfiguredAudienceModelCommandError(output, context);
564
- }
565
- const contents = (0, smithy_client_1.map)({
566
- $metadata: deserializeMetadata(output),
567
- });
568
- await (0, smithy_client_1.collectBody)(output.body, context);
569
- return contents;
570
- };
571
- exports.de_DeleteConfiguredAudienceModelCommand = de_DeleteConfiguredAudienceModelCommand;
572
- const de_DeleteConfiguredAudienceModelCommandError = async (output, context) => {
573
- const parsedOutput = {
574
- ...output,
575
- body: await parseErrorBody(output.body, context),
576
- };
577
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
578
- switch (errorCode) {
579
- case "AccessDeniedException":
580
- case "com.amazonaws.cleanroomsml#AccessDeniedException":
581
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
582
- case "ConflictException":
583
- case "com.amazonaws.cleanroomsml#ConflictException":
584
- throw await de_ConflictExceptionRes(parsedOutput, context);
585
- case "ResourceNotFoundException":
586
- case "com.amazonaws.cleanroomsml#ResourceNotFoundException":
587
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
588
- case "ValidationException":
589
- case "com.amazonaws.cleanroomsml#ValidationException":
590
- throw await de_ValidationExceptionRes(parsedOutput, context);
591
- default:
592
- const parsedBody = parsedOutput.body;
593
- return throwDefaultError({
594
- output,
595
- parsedBody,
596
- errorCode,
597
- });
598
- }
599
- };
600
- const de_DeleteConfiguredAudienceModelPolicyCommand = async (output, context) => {
601
- if (output.statusCode !== 200 && output.statusCode >= 300) {
602
- return de_DeleteConfiguredAudienceModelPolicyCommandError(output, context);
603
- }
604
- const contents = (0, smithy_client_1.map)({
605
- $metadata: deserializeMetadata(output),
606
- });
607
- await (0, smithy_client_1.collectBody)(output.body, context);
608
- return contents;
609
- };
610
- exports.de_DeleteConfiguredAudienceModelPolicyCommand = de_DeleteConfiguredAudienceModelPolicyCommand;
611
- const de_DeleteConfiguredAudienceModelPolicyCommandError = async (output, context) => {
612
- const parsedOutput = {
613
- ...output,
614
- body: await parseErrorBody(output.body, context),
615
- };
616
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
617
- switch (errorCode) {
618
- case "AccessDeniedException":
619
- case "com.amazonaws.cleanroomsml#AccessDeniedException":
620
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
621
- case "ResourceNotFoundException":
622
- case "com.amazonaws.cleanroomsml#ResourceNotFoundException":
623
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
624
- case "ValidationException":
625
- case "com.amazonaws.cleanroomsml#ValidationException":
626
- throw await de_ValidationExceptionRes(parsedOutput, context);
627
- default:
628
- const parsedBody = parsedOutput.body;
629
- return throwDefaultError({
630
- output,
631
- parsedBody,
632
- errorCode,
633
- });
634
- }
635
- };
636
- const de_DeleteTrainingDatasetCommand = async (output, context) => {
637
- if (output.statusCode !== 200 && output.statusCode >= 300) {
638
- return de_DeleteTrainingDatasetCommandError(output, context);
639
- }
640
- const contents = (0, smithy_client_1.map)({
641
- $metadata: deserializeMetadata(output),
642
- });
643
- await (0, smithy_client_1.collectBody)(output.body, context);
644
- return contents;
645
- };
646
- exports.de_DeleteTrainingDatasetCommand = de_DeleteTrainingDatasetCommand;
647
- const de_DeleteTrainingDatasetCommandError = async (output, context) => {
648
- const parsedOutput = {
649
- ...output,
650
- body: await parseErrorBody(output.body, context),
651
- };
652
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
653
- switch (errorCode) {
654
- case "AccessDeniedException":
655
- case "com.amazonaws.cleanroomsml#AccessDeniedException":
656
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
657
- case "ConflictException":
658
- case "com.amazonaws.cleanroomsml#ConflictException":
659
- throw await de_ConflictExceptionRes(parsedOutput, context);
660
- case "ResourceNotFoundException":
661
- case "com.amazonaws.cleanroomsml#ResourceNotFoundException":
662
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
663
- case "ValidationException":
664
- case "com.amazonaws.cleanroomsml#ValidationException":
665
- throw await de_ValidationExceptionRes(parsedOutput, context);
666
- default:
667
- const parsedBody = parsedOutput.body;
668
- return throwDefaultError({
669
- output,
670
- parsedBody,
671
- errorCode,
672
- });
673
- }
674
- };
675
- const de_GetAudienceGenerationJobCommand = async (output, context) => {
676
- if (output.statusCode !== 200 && output.statusCode >= 300) {
677
- return de_GetAudienceGenerationJobCommandError(output, context);
678
- }
679
- const contents = (0, smithy_client_1.map)({
680
- $metadata: deserializeMetadata(output),
681
- });
682
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
683
- const doc = (0, smithy_client_1.take)(data, {
684
- audienceGenerationJobArn: smithy_client_1.expectString,
685
- collaborationId: smithy_client_1.expectString,
686
- configuredAudienceModelArn: smithy_client_1.expectString,
687
- createTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
688
- description: smithy_client_1.expectString,
689
- includeSeedInOutput: smithy_client_1.expectBoolean,
690
- metrics: (_) => de_AudienceQualityMetrics(_, context),
691
- name: smithy_client_1.expectString,
692
- seedAudience: smithy_client_1._json,
693
- startedBy: smithy_client_1.expectString,
694
- status: smithy_client_1.expectString,
695
- statusDetails: smithy_client_1._json,
696
- tags: smithy_client_1._json,
697
- updateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
698
- });
699
- Object.assign(contents, doc);
700
- return contents;
701
- };
702
- exports.de_GetAudienceGenerationJobCommand = de_GetAudienceGenerationJobCommand;
703
- const de_GetAudienceGenerationJobCommandError = async (output, context) => {
704
- const parsedOutput = {
705
- ...output,
706
- body: await parseErrorBody(output.body, context),
707
- };
708
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
709
- switch (errorCode) {
710
- case "AccessDeniedException":
711
- case "com.amazonaws.cleanroomsml#AccessDeniedException":
712
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
713
- case "ResourceNotFoundException":
714
- case "com.amazonaws.cleanroomsml#ResourceNotFoundException":
715
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
716
- case "ValidationException":
717
- case "com.amazonaws.cleanroomsml#ValidationException":
718
- throw await de_ValidationExceptionRes(parsedOutput, context);
719
- default:
720
- const parsedBody = parsedOutput.body;
721
- return throwDefaultError({
722
- output,
723
- parsedBody,
724
- errorCode,
725
- });
726
- }
727
- };
728
- const de_GetAudienceModelCommand = async (output, context) => {
729
- if (output.statusCode !== 200 && output.statusCode >= 300) {
730
- return de_GetAudienceModelCommandError(output, context);
731
- }
732
- const contents = (0, smithy_client_1.map)({
733
- $metadata: deserializeMetadata(output),
734
- });
735
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
736
- const doc = (0, smithy_client_1.take)(data, {
737
- audienceModelArn: smithy_client_1.expectString,
738
- createTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
739
- description: smithy_client_1.expectString,
740
- kmsKeyArn: smithy_client_1.expectString,
741
- metrics: (_) => de_AudienceModelMetrics(_, context),
742
- name: smithy_client_1.expectString,
743
- status: smithy_client_1.expectString,
744
- statusDetails: smithy_client_1._json,
745
- tags: smithy_client_1._json,
746
- trainingDataEndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
747
- trainingDataStartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
748
- trainingDatasetArn: smithy_client_1.expectString,
749
- updateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
750
- });
751
- Object.assign(contents, doc);
752
- return contents;
753
- };
754
- exports.de_GetAudienceModelCommand = de_GetAudienceModelCommand;
755
- const de_GetAudienceModelCommandError = async (output, context) => {
756
- const parsedOutput = {
757
- ...output,
758
- body: await parseErrorBody(output.body, context),
759
- };
760
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
761
- switch (errorCode) {
762
- case "AccessDeniedException":
763
- case "com.amazonaws.cleanroomsml#AccessDeniedException":
764
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
765
- case "ResourceNotFoundException":
766
- case "com.amazonaws.cleanroomsml#ResourceNotFoundException":
767
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
768
- case "ValidationException":
769
- case "com.amazonaws.cleanroomsml#ValidationException":
770
- throw await de_ValidationExceptionRes(parsedOutput, context);
771
- default:
772
- const parsedBody = parsedOutput.body;
773
- return throwDefaultError({
774
- output,
775
- parsedBody,
776
- errorCode,
777
- });
778
- }
779
- };
780
- const de_GetConfiguredAudienceModelCommand = async (output, context) => {
781
- if (output.statusCode !== 200 && output.statusCode >= 300) {
782
- return de_GetConfiguredAudienceModelCommandError(output, context);
783
- }
784
- const contents = (0, smithy_client_1.map)({
785
- $metadata: deserializeMetadata(output),
786
- });
787
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
788
- const doc = (0, smithy_client_1.take)(data, {
789
- audienceModelArn: smithy_client_1.expectString,
790
- audienceSizeConfig: smithy_client_1._json,
791
- childResourceTagOnCreatePolicy: smithy_client_1.expectString,
792
- configuredAudienceModelArn: smithy_client_1.expectString,
793
- createTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
794
- description: smithy_client_1.expectString,
795
- minMatchingSeedSize: smithy_client_1.expectInt32,
796
- name: smithy_client_1.expectString,
797
- outputConfig: smithy_client_1._json,
798
- sharedAudienceMetrics: smithy_client_1._json,
799
- status: smithy_client_1.expectString,
800
- tags: smithy_client_1._json,
801
- updateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
802
- });
803
- Object.assign(contents, doc);
804
- return contents;
805
- };
806
- exports.de_GetConfiguredAudienceModelCommand = de_GetConfiguredAudienceModelCommand;
807
- const de_GetConfiguredAudienceModelCommandError = async (output, context) => {
808
- const parsedOutput = {
809
- ...output,
810
- body: await parseErrorBody(output.body, context),
811
- };
812
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
813
- switch (errorCode) {
814
- case "AccessDeniedException":
815
- case "com.amazonaws.cleanroomsml#AccessDeniedException":
816
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
817
- case "ResourceNotFoundException":
818
- case "com.amazonaws.cleanroomsml#ResourceNotFoundException":
819
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
820
- case "ValidationException":
821
- case "com.amazonaws.cleanroomsml#ValidationException":
822
- throw await de_ValidationExceptionRes(parsedOutput, context);
823
- default:
824
- const parsedBody = parsedOutput.body;
825
- return throwDefaultError({
826
- output,
827
- parsedBody,
828
- errorCode,
829
- });
830
- }
831
- };
832
- const de_GetConfiguredAudienceModelPolicyCommand = async (output, context) => {
833
- if (output.statusCode !== 200 && output.statusCode >= 300) {
834
- return de_GetConfiguredAudienceModelPolicyCommandError(output, context);
835
- }
836
- const contents = (0, smithy_client_1.map)({
837
- $metadata: deserializeMetadata(output),
838
- });
839
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
840
- const doc = (0, smithy_client_1.take)(data, {
841
- configuredAudienceModelArn: smithy_client_1.expectString,
842
- configuredAudienceModelPolicy: smithy_client_1.expectString,
843
- policyHash: smithy_client_1.expectString,
844
- });
845
- Object.assign(contents, doc);
846
- return contents;
847
- };
848
- exports.de_GetConfiguredAudienceModelPolicyCommand = de_GetConfiguredAudienceModelPolicyCommand;
849
- const de_GetConfiguredAudienceModelPolicyCommandError = async (output, context) => {
850
- const parsedOutput = {
851
- ...output,
852
- body: await parseErrorBody(output.body, context),
853
- };
854
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
855
- switch (errorCode) {
856
- case "AccessDeniedException":
857
- case "com.amazonaws.cleanroomsml#AccessDeniedException":
858
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
859
- case "ResourceNotFoundException":
860
- case "com.amazonaws.cleanroomsml#ResourceNotFoundException":
861
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
862
- case "ValidationException":
863
- case "com.amazonaws.cleanroomsml#ValidationException":
864
- throw await de_ValidationExceptionRes(parsedOutput, context);
865
- default:
866
- const parsedBody = parsedOutput.body;
867
- return throwDefaultError({
868
- output,
869
- parsedBody,
870
- errorCode,
871
- });
872
- }
873
- };
874
- const de_GetTrainingDatasetCommand = async (output, context) => {
875
- if (output.statusCode !== 200 && output.statusCode >= 300) {
876
- return de_GetTrainingDatasetCommandError(output, context);
877
- }
878
- const contents = (0, smithy_client_1.map)({
879
- $metadata: deserializeMetadata(output),
880
- });
881
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
882
- const doc = (0, smithy_client_1.take)(data, {
883
- createTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
884
- description: smithy_client_1.expectString,
885
- name: smithy_client_1.expectString,
886
- roleArn: smithy_client_1.expectString,
887
- status: smithy_client_1.expectString,
888
- tags: smithy_client_1._json,
889
- trainingData: smithy_client_1._json,
890
- trainingDatasetArn: smithy_client_1.expectString,
891
- updateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
892
- });
893
- Object.assign(contents, doc);
894
- return contents;
895
- };
896
- exports.de_GetTrainingDatasetCommand = de_GetTrainingDatasetCommand;
897
- const de_GetTrainingDatasetCommandError = async (output, context) => {
898
- const parsedOutput = {
899
- ...output,
900
- body: await parseErrorBody(output.body, context),
901
- };
902
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
903
- switch (errorCode) {
904
- case "AccessDeniedException":
905
- case "com.amazonaws.cleanroomsml#AccessDeniedException":
906
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
907
- case "ResourceNotFoundException":
908
- case "com.amazonaws.cleanroomsml#ResourceNotFoundException":
909
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
910
- case "ValidationException":
911
- case "com.amazonaws.cleanroomsml#ValidationException":
912
- throw await de_ValidationExceptionRes(parsedOutput, context);
913
- default:
914
- const parsedBody = parsedOutput.body;
915
- return throwDefaultError({
916
- output,
917
- parsedBody,
918
- errorCode,
919
- });
920
- }
921
- };
922
- const de_ListAudienceExportJobsCommand = async (output, context) => {
923
- if (output.statusCode !== 200 && output.statusCode >= 300) {
924
- return de_ListAudienceExportJobsCommandError(output, context);
925
- }
926
- const contents = (0, smithy_client_1.map)({
927
- $metadata: deserializeMetadata(output),
928
- });
929
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
930
- const doc = (0, smithy_client_1.take)(data, {
931
- audienceExportJobs: (_) => de_AudienceExportJobList(_, context),
932
- nextToken: smithy_client_1.expectString,
933
- });
934
- Object.assign(contents, doc);
935
- return contents;
936
- };
937
- exports.de_ListAudienceExportJobsCommand = de_ListAudienceExportJobsCommand;
938
- const de_ListAudienceExportJobsCommandError = async (output, context) => {
939
- const parsedOutput = {
940
- ...output,
941
- body: await parseErrorBody(output.body, context),
942
- };
943
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
944
- switch (errorCode) {
945
- case "AccessDeniedException":
946
- case "com.amazonaws.cleanroomsml#AccessDeniedException":
947
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
948
- case "ValidationException":
949
- case "com.amazonaws.cleanroomsml#ValidationException":
950
- throw await de_ValidationExceptionRes(parsedOutput, context);
951
- default:
952
- const parsedBody = parsedOutput.body;
953
- return throwDefaultError({
954
- output,
955
- parsedBody,
956
- errorCode,
957
- });
958
- }
959
- };
960
- const de_ListAudienceGenerationJobsCommand = async (output, context) => {
961
- if (output.statusCode !== 200 && output.statusCode >= 300) {
962
- return de_ListAudienceGenerationJobsCommandError(output, context);
963
- }
964
- const contents = (0, smithy_client_1.map)({
965
- $metadata: deserializeMetadata(output),
966
- });
967
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
968
- const doc = (0, smithy_client_1.take)(data, {
969
- audienceGenerationJobs: (_) => de_AudienceGenerationJobList(_, context),
970
- nextToken: smithy_client_1.expectString,
971
- });
972
- Object.assign(contents, doc);
973
- return contents;
974
- };
975
- exports.de_ListAudienceGenerationJobsCommand = de_ListAudienceGenerationJobsCommand;
976
- const de_ListAudienceGenerationJobsCommandError = async (output, context) => {
977
- const parsedOutput = {
978
- ...output,
979
- body: await parseErrorBody(output.body, context),
980
- };
981
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
982
- switch (errorCode) {
983
- case "AccessDeniedException":
984
- case "com.amazonaws.cleanroomsml#AccessDeniedException":
985
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
986
- case "ValidationException":
987
- case "com.amazonaws.cleanroomsml#ValidationException":
988
- throw await de_ValidationExceptionRes(parsedOutput, context);
989
- default:
990
- const parsedBody = parsedOutput.body;
991
- return throwDefaultError({
992
- output,
993
- parsedBody,
994
- errorCode,
995
- });
996
- }
997
- };
998
- const de_ListAudienceModelsCommand = async (output, context) => {
999
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1000
- return de_ListAudienceModelsCommandError(output, context);
1001
- }
1002
- const contents = (0, smithy_client_1.map)({
1003
- $metadata: deserializeMetadata(output),
1004
- });
1005
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1006
- const doc = (0, smithy_client_1.take)(data, {
1007
- audienceModels: (_) => de_AudienceModelList(_, context),
1008
- nextToken: smithy_client_1.expectString,
1009
- });
1010
- Object.assign(contents, doc);
1011
- return contents;
1012
- };
1013
- exports.de_ListAudienceModelsCommand = de_ListAudienceModelsCommand;
1014
- const de_ListAudienceModelsCommandError = async (output, context) => {
1015
- const parsedOutput = {
1016
- ...output,
1017
- body: await parseErrorBody(output.body, context),
1018
- };
1019
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1020
- switch (errorCode) {
1021
- case "AccessDeniedException":
1022
- case "com.amazonaws.cleanroomsml#AccessDeniedException":
1023
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1024
- case "ValidationException":
1025
- case "com.amazonaws.cleanroomsml#ValidationException":
1026
- throw await de_ValidationExceptionRes(parsedOutput, context);
1027
- default:
1028
- const parsedBody = parsedOutput.body;
1029
- return throwDefaultError({
1030
- output,
1031
- parsedBody,
1032
- errorCode,
1033
- });
1034
- }
1035
- };
1036
- const de_ListConfiguredAudienceModelsCommand = async (output, context) => {
1037
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1038
- return de_ListConfiguredAudienceModelsCommandError(output, context);
1039
- }
1040
- const contents = (0, smithy_client_1.map)({
1041
- $metadata: deserializeMetadata(output),
1042
- });
1043
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1044
- const doc = (0, smithy_client_1.take)(data, {
1045
- configuredAudienceModels: (_) => de_ConfiguredAudienceModelList(_, context),
1046
- nextToken: smithy_client_1.expectString,
1047
- });
1048
- Object.assign(contents, doc);
1049
- return contents;
1050
- };
1051
- exports.de_ListConfiguredAudienceModelsCommand = de_ListConfiguredAudienceModelsCommand;
1052
- const de_ListConfiguredAudienceModelsCommandError = async (output, context) => {
1053
- const parsedOutput = {
1054
- ...output,
1055
- body: await parseErrorBody(output.body, context),
1056
- };
1057
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1058
- switch (errorCode) {
1059
- case "AccessDeniedException":
1060
- case "com.amazonaws.cleanroomsml#AccessDeniedException":
1061
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1062
- case "ValidationException":
1063
- case "com.amazonaws.cleanroomsml#ValidationException":
1064
- throw await de_ValidationExceptionRes(parsedOutput, context);
1065
- default:
1066
- const parsedBody = parsedOutput.body;
1067
- return throwDefaultError({
1068
- output,
1069
- parsedBody,
1070
- errorCode,
1071
- });
1072
- }
1073
- };
1074
- const de_ListTagsForResourceCommand = async (output, context) => {
1075
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1076
- return de_ListTagsForResourceCommandError(output, context);
1077
- }
1078
- const contents = (0, smithy_client_1.map)({
1079
- $metadata: deserializeMetadata(output),
1080
- });
1081
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1082
- const doc = (0, smithy_client_1.take)(data, {
1083
- tags: smithy_client_1._json,
1084
- });
1085
- Object.assign(contents, doc);
1086
- return contents;
1087
- };
1088
- exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
1089
- const de_ListTagsForResourceCommandError = async (output, context) => {
1090
- const parsedOutput = {
1091
- ...output,
1092
- body: await parseErrorBody(output.body, context),
1093
- };
1094
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1095
- switch (errorCode) {
1096
- case "AccessDeniedException":
1097
- case "com.amazonaws.cleanroomsml#AccessDeniedException":
1098
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1099
- case "ResourceNotFoundException":
1100
- case "com.amazonaws.cleanroomsml#ResourceNotFoundException":
1101
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1102
- case "ValidationException":
1103
- case "com.amazonaws.cleanroomsml#ValidationException":
1104
- throw await de_ValidationExceptionRes(parsedOutput, context);
1105
- default:
1106
- const parsedBody = parsedOutput.body;
1107
- return throwDefaultError({
1108
- output,
1109
- parsedBody,
1110
- errorCode,
1111
- });
1112
- }
1113
- };
1114
- const de_ListTrainingDatasetsCommand = async (output, context) => {
1115
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1116
- return de_ListTrainingDatasetsCommandError(output, context);
1117
- }
1118
- const contents = (0, smithy_client_1.map)({
1119
- $metadata: deserializeMetadata(output),
1120
- });
1121
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1122
- const doc = (0, smithy_client_1.take)(data, {
1123
- nextToken: smithy_client_1.expectString,
1124
- trainingDatasets: (_) => de_TrainingDatasetList(_, context),
1125
- });
1126
- Object.assign(contents, doc);
1127
- return contents;
1128
- };
1129
- exports.de_ListTrainingDatasetsCommand = de_ListTrainingDatasetsCommand;
1130
- const de_ListTrainingDatasetsCommandError = async (output, context) => {
1131
- const parsedOutput = {
1132
- ...output,
1133
- body: await parseErrorBody(output.body, context),
1134
- };
1135
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1136
- switch (errorCode) {
1137
- case "AccessDeniedException":
1138
- case "com.amazonaws.cleanroomsml#AccessDeniedException":
1139
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1140
- case "ValidationException":
1141
- case "com.amazonaws.cleanroomsml#ValidationException":
1142
- throw await de_ValidationExceptionRes(parsedOutput, context);
1143
- default:
1144
- const parsedBody = parsedOutput.body;
1145
- return throwDefaultError({
1146
- output,
1147
- parsedBody,
1148
- errorCode,
1149
- });
1150
- }
1151
- };
1152
- const de_PutConfiguredAudienceModelPolicyCommand = async (output, context) => {
1153
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1154
- return de_PutConfiguredAudienceModelPolicyCommandError(output, context);
1155
- }
1156
- const contents = (0, smithy_client_1.map)({
1157
- $metadata: deserializeMetadata(output),
1158
- });
1159
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1160
- const doc = (0, smithy_client_1.take)(data, {
1161
- configuredAudienceModelPolicy: smithy_client_1.expectString,
1162
- policyHash: smithy_client_1.expectString,
1163
- });
1164
- Object.assign(contents, doc);
1165
- return contents;
1166
- };
1167
- exports.de_PutConfiguredAudienceModelPolicyCommand = de_PutConfiguredAudienceModelPolicyCommand;
1168
- const de_PutConfiguredAudienceModelPolicyCommandError = async (output, context) => {
1169
- const parsedOutput = {
1170
- ...output,
1171
- body: await parseErrorBody(output.body, context),
1172
- };
1173
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1174
- switch (errorCode) {
1175
- case "AccessDeniedException":
1176
- case "com.amazonaws.cleanroomsml#AccessDeniedException":
1177
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1178
- case "ResourceNotFoundException":
1179
- case "com.amazonaws.cleanroomsml#ResourceNotFoundException":
1180
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1181
- case "ValidationException":
1182
- case "com.amazonaws.cleanroomsml#ValidationException":
1183
- throw await de_ValidationExceptionRes(parsedOutput, context);
1184
- default:
1185
- const parsedBody = parsedOutput.body;
1186
- return throwDefaultError({
1187
- output,
1188
- parsedBody,
1189
- errorCode,
1190
- });
1191
- }
1192
- };
1193
- const de_StartAudienceExportJobCommand = async (output, context) => {
1194
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1195
- return de_StartAudienceExportJobCommandError(output, context);
1196
- }
1197
- const contents = (0, smithy_client_1.map)({
1198
- $metadata: deserializeMetadata(output),
1199
- });
1200
- await (0, smithy_client_1.collectBody)(output.body, context);
1201
- return contents;
1202
- };
1203
- exports.de_StartAudienceExportJobCommand = de_StartAudienceExportJobCommand;
1204
- const de_StartAudienceExportJobCommandError = async (output, context) => {
1205
- const parsedOutput = {
1206
- ...output,
1207
- body: await parseErrorBody(output.body, context),
1208
- };
1209
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1210
- switch (errorCode) {
1211
- case "AccessDeniedException":
1212
- case "com.amazonaws.cleanroomsml#AccessDeniedException":
1213
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1214
- case "ConflictException":
1215
- case "com.amazonaws.cleanroomsml#ConflictException":
1216
- throw await de_ConflictExceptionRes(parsedOutput, context);
1217
- case "ResourceNotFoundException":
1218
- case "com.amazonaws.cleanroomsml#ResourceNotFoundException":
1219
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1220
- case "ServiceQuotaExceededException":
1221
- case "com.amazonaws.cleanroomsml#ServiceQuotaExceededException":
1222
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1223
- case "ValidationException":
1224
- case "com.amazonaws.cleanroomsml#ValidationException":
1225
- throw await de_ValidationExceptionRes(parsedOutput, context);
1226
- default:
1227
- const parsedBody = parsedOutput.body;
1228
- return throwDefaultError({
1229
- output,
1230
- parsedBody,
1231
- errorCode,
1232
- });
1233
- }
1234
- };
1235
- const de_StartAudienceGenerationJobCommand = async (output, context) => {
1236
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1237
- return de_StartAudienceGenerationJobCommandError(output, context);
1238
- }
1239
- const contents = (0, smithy_client_1.map)({
1240
- $metadata: deserializeMetadata(output),
1241
- });
1242
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1243
- const doc = (0, smithy_client_1.take)(data, {
1244
- audienceGenerationJobArn: smithy_client_1.expectString,
1245
- });
1246
- Object.assign(contents, doc);
1247
- return contents;
1248
- };
1249
- exports.de_StartAudienceGenerationJobCommand = de_StartAudienceGenerationJobCommand;
1250
- const de_StartAudienceGenerationJobCommandError = async (output, context) => {
1251
- const parsedOutput = {
1252
- ...output,
1253
- body: await parseErrorBody(output.body, context),
1254
- };
1255
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1256
- switch (errorCode) {
1257
- case "AccessDeniedException":
1258
- case "com.amazonaws.cleanroomsml#AccessDeniedException":
1259
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1260
- case "ConflictException":
1261
- case "com.amazonaws.cleanroomsml#ConflictException":
1262
- throw await de_ConflictExceptionRes(parsedOutput, context);
1263
- case "ResourceNotFoundException":
1264
- case "com.amazonaws.cleanroomsml#ResourceNotFoundException":
1265
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1266
- case "ServiceQuotaExceededException":
1267
- case "com.amazonaws.cleanroomsml#ServiceQuotaExceededException":
1268
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1269
- case "ValidationException":
1270
- case "com.amazonaws.cleanroomsml#ValidationException":
1271
- throw await de_ValidationExceptionRes(parsedOutput, context);
1272
- default:
1273
- const parsedBody = parsedOutput.body;
1274
- return throwDefaultError({
1275
- output,
1276
- parsedBody,
1277
- errorCode,
1278
- });
1279
- }
1280
- };
1281
- const de_TagResourceCommand = async (output, context) => {
1282
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1283
- return de_TagResourceCommandError(output, context);
1284
- }
1285
- const contents = (0, smithy_client_1.map)({
1286
- $metadata: deserializeMetadata(output),
1287
- });
1288
- await (0, smithy_client_1.collectBody)(output.body, context);
1289
- return contents;
1290
- };
1291
- exports.de_TagResourceCommand = de_TagResourceCommand;
1292
- const de_TagResourceCommandError = async (output, context) => {
1293
- const parsedOutput = {
1294
- ...output,
1295
- body: await parseErrorBody(output.body, context),
1296
- };
1297
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1298
- switch (errorCode) {
1299
- case "AccessDeniedException":
1300
- case "com.amazonaws.cleanroomsml#AccessDeniedException":
1301
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1302
- case "ResourceNotFoundException":
1303
- case "com.amazonaws.cleanroomsml#ResourceNotFoundException":
1304
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1305
- case "ValidationException":
1306
- case "com.amazonaws.cleanroomsml#ValidationException":
1307
- throw await de_ValidationExceptionRes(parsedOutput, context);
1308
- default:
1309
- const parsedBody = parsedOutput.body;
1310
- return throwDefaultError({
1311
- output,
1312
- parsedBody,
1313
- errorCode,
1314
- });
1315
- }
1316
- };
1317
- const de_UntagResourceCommand = async (output, context) => {
1318
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1319
- return de_UntagResourceCommandError(output, context);
1320
- }
1321
- const contents = (0, smithy_client_1.map)({
1322
- $metadata: deserializeMetadata(output),
1323
- });
1324
- await (0, smithy_client_1.collectBody)(output.body, context);
1325
- return contents;
1326
- };
1327
- exports.de_UntagResourceCommand = de_UntagResourceCommand;
1328
- const de_UntagResourceCommandError = async (output, context) => {
1329
- const parsedOutput = {
1330
- ...output,
1331
- body: await parseErrorBody(output.body, context),
1332
- };
1333
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1334
- switch (errorCode) {
1335
- case "AccessDeniedException":
1336
- case "com.amazonaws.cleanroomsml#AccessDeniedException":
1337
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1338
- case "ResourceNotFoundException":
1339
- case "com.amazonaws.cleanroomsml#ResourceNotFoundException":
1340
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1341
- case "ValidationException":
1342
- case "com.amazonaws.cleanroomsml#ValidationException":
1343
- throw await de_ValidationExceptionRes(parsedOutput, context);
1344
- default:
1345
- const parsedBody = parsedOutput.body;
1346
- return throwDefaultError({
1347
- output,
1348
- parsedBody,
1349
- errorCode,
1350
- });
1351
- }
1352
- };
1353
- const de_UpdateConfiguredAudienceModelCommand = async (output, context) => {
1354
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1355
- return de_UpdateConfiguredAudienceModelCommandError(output, context);
1356
- }
1357
- const contents = (0, smithy_client_1.map)({
1358
- $metadata: deserializeMetadata(output),
1359
- });
1360
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1361
- const doc = (0, smithy_client_1.take)(data, {
1362
- configuredAudienceModelArn: smithy_client_1.expectString,
1363
- });
1364
- Object.assign(contents, doc);
1365
- return contents;
1366
- };
1367
- exports.de_UpdateConfiguredAudienceModelCommand = de_UpdateConfiguredAudienceModelCommand;
1368
- const de_UpdateConfiguredAudienceModelCommandError = async (output, context) => {
1369
- const parsedOutput = {
1370
- ...output,
1371
- body: await parseErrorBody(output.body, context),
1372
- };
1373
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1374
- switch (errorCode) {
1375
- case "AccessDeniedException":
1376
- case "com.amazonaws.cleanroomsml#AccessDeniedException":
1377
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1378
- case "ConflictException":
1379
- case "com.amazonaws.cleanroomsml#ConflictException":
1380
- throw await de_ConflictExceptionRes(parsedOutput, context);
1381
- case "ResourceNotFoundException":
1382
- case "com.amazonaws.cleanroomsml#ResourceNotFoundException":
1383
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1384
- case "ValidationException":
1385
- case "com.amazonaws.cleanroomsml#ValidationException":
1386
- throw await de_ValidationExceptionRes(parsedOutput, context);
1387
- default:
1388
- const parsedBody = parsedOutput.body;
1389
- return throwDefaultError({
1390
- output,
1391
- parsedBody,
1392
- errorCode,
1393
- });
1394
- }
1395
- };
1396
- const throwDefaultError = (0, smithy_client_1.withBaseException)(CleanRoomsMLServiceException_1.CleanRoomsMLServiceException);
1397
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1398
- const contents = (0, smithy_client_1.map)({});
1399
- const data = parsedOutput.body;
1400
- const doc = (0, smithy_client_1.take)(data, {
1401
- message: smithy_client_1.expectString,
1402
- });
1403
- Object.assign(contents, doc);
1404
- const exception = new models_0_1.AccessDeniedException({
1405
- $metadata: deserializeMetadata(parsedOutput),
1406
- ...contents,
1407
- });
1408
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1409
- };
1410
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
1411
- const contents = (0, smithy_client_1.map)({});
1412
- const data = parsedOutput.body;
1413
- const doc = (0, smithy_client_1.take)(data, {
1414
- message: smithy_client_1.expectString,
1415
- });
1416
- Object.assign(contents, doc);
1417
- const exception = new models_0_1.ConflictException({
1418
- $metadata: deserializeMetadata(parsedOutput),
1419
- ...contents,
1420
- });
1421
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1422
- };
1423
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1424
- const contents = (0, smithy_client_1.map)({});
1425
- const data = parsedOutput.body;
1426
- const doc = (0, smithy_client_1.take)(data, {
1427
- message: smithy_client_1.expectString,
1428
- });
1429
- Object.assign(contents, doc);
1430
- const exception = new models_0_1.ResourceNotFoundException({
1431
- $metadata: deserializeMetadata(parsedOutput),
1432
- ...contents,
1433
- });
1434
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1435
- };
1436
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1437
- const contents = (0, smithy_client_1.map)({});
1438
- const data = parsedOutput.body;
1439
- const doc = (0, smithy_client_1.take)(data, {
1440
- message: smithy_client_1.expectString,
1441
- });
1442
- Object.assign(contents, doc);
1443
- const exception = new models_0_1.ServiceQuotaExceededException({
1444
- $metadata: deserializeMetadata(parsedOutput),
1445
- ...contents,
1446
- });
1447
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1448
- };
1449
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
1450
- const contents = (0, smithy_client_1.map)({});
1451
- const data = parsedOutput.body;
1452
- const doc = (0, smithy_client_1.take)(data, {
1453
- message: smithy_client_1.expectString,
1454
- });
1455
- Object.assign(contents, doc);
1456
- const exception = new models_0_1.ValidationException({
1457
- $metadata: deserializeMetadata(parsedOutput),
1458
- ...contents,
1459
- });
1460
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1461
- };
1462
- const de_AudienceExportJobList = (output, context) => {
1463
- const retVal = (output || [])
1464
- .filter((e) => e != null)
1465
- .map((entry) => {
1466
- return de_AudienceExportJobSummary(entry, context);
1467
- });
1468
- return retVal;
1469
- };
1470
- const de_AudienceExportJobSummary = (output, context) => {
1471
- return (0, smithy_client_1.take)(output, {
1472
- audienceGenerationJobArn: smithy_client_1.expectString,
1473
- audienceSize: smithy_client_1._json,
1474
- createTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1475
- description: smithy_client_1.expectString,
1476
- name: smithy_client_1.expectString,
1477
- outputLocation: smithy_client_1.expectString,
1478
- status: smithy_client_1.expectString,
1479
- statusDetails: smithy_client_1._json,
1480
- updateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1481
- });
1482
- };
1483
- const de_AudienceGenerationJobList = (output, context) => {
1484
- const retVal = (output || [])
1485
- .filter((e) => e != null)
1486
- .map((entry) => {
1487
- return de_AudienceGenerationJobSummary(entry, context);
1488
- });
1489
- return retVal;
1490
- };
1491
- const de_AudienceGenerationJobSummary = (output, context) => {
1492
- return (0, smithy_client_1.take)(output, {
1493
- audienceGenerationJobArn: smithy_client_1.expectString,
1494
- collaborationId: smithy_client_1.expectString,
1495
- configuredAudienceModelArn: smithy_client_1.expectString,
1496
- createTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1497
- description: smithy_client_1.expectString,
1498
- name: smithy_client_1.expectString,
1499
- startedBy: smithy_client_1.expectString,
1500
- status: smithy_client_1.expectString,
1501
- updateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1502
- });
1503
- };
1504
- const de_AudienceModelList = (output, context) => {
1505
- const retVal = (output || [])
1506
- .filter((e) => e != null)
1507
- .map((entry) => {
1508
- return de_AudienceModelSummary(entry, context);
1509
- });
1510
- return retVal;
1511
- };
1512
- const de_AudienceModelMetric = (output, context) => {
1513
- return (0, smithy_client_1.take)(output, {
1514
- forTopKItemPredictions: smithy_client_1.expectInt32,
1515
- type: smithy_client_1.expectString,
1516
- value: smithy_client_1.limitedParseDouble,
1517
- });
1518
- };
1519
- const de_AudienceModelMetrics = (output, context) => {
1520
- const retVal = (output || [])
1521
- .filter((e) => e != null)
1522
- .map((entry) => {
1523
- return de_AudienceModelMetric(entry, context);
1524
- });
1525
- return retVal;
1526
- };
1527
- const de_AudienceModelSummary = (output, context) => {
1528
- return (0, smithy_client_1.take)(output, {
1529
- audienceModelArn: smithy_client_1.expectString,
1530
- createTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1531
- description: smithy_client_1.expectString,
1532
- name: smithy_client_1.expectString,
1533
- status: smithy_client_1.expectString,
1534
- trainingDatasetArn: smithy_client_1.expectString,
1535
- updateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1536
- });
1537
- };
1538
- const de_AudienceQualityMetrics = (output, context) => {
1539
- return (0, smithy_client_1.take)(output, {
1540
- relevanceMetrics: (_) => de_RelevanceMetrics(_, context),
1541
- });
1542
- };
1543
- const de_ConfiguredAudienceModelList = (output, context) => {
1544
- const retVal = (output || [])
1545
- .filter((e) => e != null)
1546
- .map((entry) => {
1547
- return de_ConfiguredAudienceModelSummary(entry, context);
1548
- });
1549
- return retVal;
1550
- };
1551
- const de_ConfiguredAudienceModelSummary = (output, context) => {
1552
- return (0, smithy_client_1.take)(output, {
1553
- audienceModelArn: smithy_client_1.expectString,
1554
- configuredAudienceModelArn: smithy_client_1.expectString,
1555
- createTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1556
- description: smithy_client_1.expectString,
1557
- name: smithy_client_1.expectString,
1558
- outputConfig: smithy_client_1._json,
1559
- status: smithy_client_1.expectString,
1560
- updateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1561
- });
1562
- };
1563
- const de_RelevanceMetric = (output, context) => {
1564
- return (0, smithy_client_1.take)(output, {
1565
- audienceSize: smithy_client_1._json,
1566
- score: smithy_client_1.limitedParseDouble,
1567
- });
1568
- };
1569
- const de_RelevanceMetrics = (output, context) => {
1570
- const retVal = (output || [])
1571
- .filter((e) => e != null)
1572
- .map((entry) => {
1573
- return de_RelevanceMetric(entry, context);
1574
- });
1575
- return retVal;
1576
- };
1577
- const de_TrainingDatasetList = (output, context) => {
1578
- const retVal = (output || [])
1579
- .filter((e) => e != null)
1580
- .map((entry) => {
1581
- return de_TrainingDatasetSummary(entry, context);
1582
- });
1583
- return retVal;
1584
- };
1585
- const de_TrainingDatasetSummary = (output, context) => {
1586
- return (0, smithy_client_1.take)(output, {
1587
- createTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1588
- description: smithy_client_1.expectString,
1589
- name: smithy_client_1.expectString,
1590
- status: smithy_client_1.expectString,
1591
- trainingDatasetArn: smithy_client_1.expectString,
1592
- updateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1593
- });
1594
- };
1595
- const deserializeMetadata = (output) => ({
1596
- httpStatusCode: output.statusCode,
1597
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1598
- extendedRequestId: output.headers["x-amz-id-2"],
1599
- cfId: output.headers["x-amz-cf-id"],
1600
- });
1601
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
1602
- const isSerializableHeaderValue = (value) => value !== undefined &&
1603
- value !== null &&
1604
- value !== "" &&
1605
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1606
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1607
- const _aGJA = "audienceGenerationJobArn";
1608
- const _cAMA = "configuredAudienceModelArn";
1609
- const _cI = "collaborationId";
1610
- const _mR = "maxResults";
1611
- const _nT = "nextToken";
1612
- const _tK = "tagKeys";
1613
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1614
- if (encoded.length) {
1615
- return JSON.parse(encoded);
1616
- }
1617
- return {};
1618
- });
1619
- const parseErrorBody = async (errorBody, context) => {
1620
- const value = await parseBody(errorBody, context);
1621
- value.message = value.message ?? value.Message;
1622
- return value;
1623
- };
1624
- const loadRestJsonErrorCode = (output, data) => {
1625
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1626
- const sanitizeErrorCode = (rawValue) => {
1627
- let cleanValue = rawValue;
1628
- if (typeof cleanValue === "number") {
1629
- cleanValue = cleanValue.toString();
1630
- }
1631
- if (cleanValue.indexOf(",") >= 0) {
1632
- cleanValue = cleanValue.split(",")[0];
1633
- }
1634
- if (cleanValue.indexOf(":") >= 0) {
1635
- cleanValue = cleanValue.split(":")[0];
1636
- }
1637
- if (cleanValue.indexOf("#") >= 0) {
1638
- cleanValue = cleanValue.split("#")[1];
1639
- }
1640
- return cleanValue;
1641
- };
1642
- const headerKey = findKey(output.headers, "x-amzn-errortype");
1643
- if (headerKey !== undefined) {
1644
- return sanitizeErrorCode(output.headers[headerKey]);
1645
- }
1646
- if (data.code !== undefined) {
1647
- return sanitizeErrorCode(data.code);
1648
- }
1649
- if (data["__type"] !== undefined) {
1650
- return sanitizeErrorCode(data["__type"]);
1651
- }
1652
- };
1
+ module.exports = require("../index.js");