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