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