@aws-sdk/client-cleanroomsml 3.474.0 → 3.477.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.
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
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");
4
+ const core_1 = require("@smithy/core");
5
5
  const smithy_client_1 = require("@smithy/smithy-client");
6
6
  const CleanRoomsMLServiceException_1 = require("../models/CleanRoomsMLServiceException");
7
7
  const models_0_1 = require("../models/models_0");
8
8
  const se_CreateAudienceModelCommand = async (input, context) => {
9
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
9
+ const b = (0, core_1.requestBuilder)(input, context);
10
10
  const headers = {
11
11
  "content-type": "application/json",
12
12
  };
13
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/audience-model";
13
+ b.bp("/audience-model");
14
14
  let body;
15
15
  body = JSON.stringify((0, smithy_client_1.take)(input, {
16
16
  description: [],
@@ -21,23 +21,16 @@ const se_CreateAudienceModelCommand = async (input, context) => {
21
21
  trainingDataStartTime: (_) => _.toISOString().split(".")[0] + "Z",
22
22
  trainingDatasetArn: [],
23
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
- });
24
+ b.m("POST").h(headers).b(body);
25
+ return b.build();
33
26
  };
34
27
  exports.se_CreateAudienceModelCommand = se_CreateAudienceModelCommand;
35
28
  const se_CreateConfiguredAudienceModelCommand = async (input, context) => {
36
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
29
+ const b = (0, core_1.requestBuilder)(input, context);
37
30
  const headers = {
38
31
  "content-type": "application/json",
39
32
  };
40
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/configured-audience-model";
33
+ b.bp("/configured-audience-model");
41
34
  let body;
42
35
  body = JSON.stringify((0, smithy_client_1.take)(input, {
43
36
  audienceModelArn: [],
@@ -50,23 +43,16 @@ const se_CreateConfiguredAudienceModelCommand = async (input, context) => {
50
43
  sharedAudienceMetrics: (_) => (0, smithy_client_1._json)(_),
51
44
  tags: (_) => (0, smithy_client_1._json)(_),
52
45
  }));
53
- return new protocol_http_1.HttpRequest({
54
- protocol,
55
- hostname,
56
- port,
57
- method: "POST",
58
- headers,
59
- path: resolvedPath,
60
- body,
61
- });
46
+ b.m("POST").h(headers).b(body);
47
+ return b.build();
62
48
  };
63
49
  exports.se_CreateConfiguredAudienceModelCommand = se_CreateConfiguredAudienceModelCommand;
64
50
  const se_CreateTrainingDatasetCommand = async (input, context) => {
65
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
51
+ const b = (0, core_1.requestBuilder)(input, context);
66
52
  const headers = {
67
53
  "content-type": "application/json",
68
54
  };
69
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/training-dataset";
55
+ b.bp("/training-dataset");
70
56
  let body;
71
57
  body = JSON.stringify((0, smithy_client_1.take)(input, {
72
58
  description: [],
@@ -75,349 +61,211 @@ const se_CreateTrainingDatasetCommand = async (input, context) => {
75
61
  tags: (_) => (0, smithy_client_1._json)(_),
76
62
  trainingData: (_) => (0, smithy_client_1._json)(_),
77
63
  }));
78
- return new protocol_http_1.HttpRequest({
79
- protocol,
80
- hostname,
81
- port,
82
- method: "POST",
83
- headers,
84
- path: resolvedPath,
85
- body,
86
- });
64
+ b.m("POST").h(headers).b(body);
65
+ return b.build();
87
66
  };
88
67
  exports.se_CreateTrainingDatasetCommand = se_CreateTrainingDatasetCommand;
89
68
  const se_DeleteAudienceGenerationJobCommand = async (input, context) => {
90
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
69
+ const b = (0, core_1.requestBuilder)(input, context);
91
70
  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);
71
+ b.bp("/audience-generation-job/{audienceGenerationJobArn}");
72
+ b.p("audienceGenerationJobArn", () => input.audienceGenerationJobArn, "{audienceGenerationJobArn}", false);
95
73
  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
- });
74
+ b.m("DELETE").h(headers).b(body);
75
+ return b.build();
105
76
  };
106
77
  exports.se_DeleteAudienceGenerationJobCommand = se_DeleteAudienceGenerationJobCommand;
107
78
  const se_DeleteAudienceModelCommand = async (input, context) => {
108
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
79
+ const b = (0, core_1.requestBuilder)(input, context);
109
80
  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);
81
+ b.bp("/audience-model/{audienceModelArn}");
82
+ b.p("audienceModelArn", () => input.audienceModelArn, "{audienceModelArn}", false);
112
83
  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
- });
84
+ b.m("DELETE").h(headers).b(body);
85
+ return b.build();
122
86
  };
123
87
  exports.se_DeleteAudienceModelCommand = se_DeleteAudienceModelCommand;
124
88
  const se_DeleteConfiguredAudienceModelCommand = async (input, context) => {
125
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
89
+ const b = (0, core_1.requestBuilder)(input, context);
126
90
  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);
91
+ b.bp("/configured-audience-model/{configuredAudienceModelArn}");
92
+ b.p("configuredAudienceModelArn", () => input.configuredAudienceModelArn, "{configuredAudienceModelArn}", false);
130
93
  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
- });
94
+ b.m("DELETE").h(headers).b(body);
95
+ return b.build();
140
96
  };
141
97
  exports.se_DeleteConfiguredAudienceModelCommand = se_DeleteConfiguredAudienceModelCommand;
142
98
  const se_DeleteConfiguredAudienceModelPolicyCommand = async (input, context) => {
143
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
99
+ const b = (0, core_1.requestBuilder)(input, context);
144
100
  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);
101
+ b.bp("/configured-audience-model/{configuredAudienceModelArn}/policy");
102
+ b.p("configuredAudienceModelArn", () => input.configuredAudienceModelArn, "{configuredAudienceModelArn}", false);
148
103
  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
- });
104
+ b.m("DELETE").h(headers).b(body);
105
+ return b.build();
158
106
  };
159
107
  exports.se_DeleteConfiguredAudienceModelPolicyCommand = se_DeleteConfiguredAudienceModelPolicyCommand;
160
108
  const se_DeleteTrainingDatasetCommand = async (input, context) => {
161
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
109
+ const b = (0, core_1.requestBuilder)(input, context);
162
110
  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);
111
+ b.bp("/training-dataset/{trainingDatasetArn}");
112
+ b.p("trainingDatasetArn", () => input.trainingDatasetArn, "{trainingDatasetArn}", false);
165
113
  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
- });
114
+ b.m("DELETE").h(headers).b(body);
115
+ return b.build();
175
116
  };
176
117
  exports.se_DeleteTrainingDatasetCommand = se_DeleteTrainingDatasetCommand;
177
118
  const se_GetAudienceGenerationJobCommand = async (input, context) => {
178
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
119
+ const b = (0, core_1.requestBuilder)(input, context);
179
120
  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);
121
+ b.bp("/audience-generation-job/{audienceGenerationJobArn}");
122
+ b.p("audienceGenerationJobArn", () => input.audienceGenerationJobArn, "{audienceGenerationJobArn}", false);
183
123
  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
- });
124
+ b.m("GET").h(headers).b(body);
125
+ return b.build();
193
126
  };
194
127
  exports.se_GetAudienceGenerationJobCommand = se_GetAudienceGenerationJobCommand;
195
128
  const se_GetAudienceModelCommand = async (input, context) => {
196
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
129
+ const b = (0, core_1.requestBuilder)(input, context);
197
130
  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);
131
+ b.bp("/audience-model/{audienceModelArn}");
132
+ b.p("audienceModelArn", () => input.audienceModelArn, "{audienceModelArn}", false);
200
133
  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
- });
134
+ b.m("GET").h(headers).b(body);
135
+ return b.build();
210
136
  };
211
137
  exports.se_GetAudienceModelCommand = se_GetAudienceModelCommand;
212
138
  const se_GetConfiguredAudienceModelCommand = async (input, context) => {
213
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
139
+ const b = (0, core_1.requestBuilder)(input, context);
214
140
  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);
141
+ b.bp("/configured-audience-model/{configuredAudienceModelArn}");
142
+ b.p("configuredAudienceModelArn", () => input.configuredAudienceModelArn, "{configuredAudienceModelArn}", false);
218
143
  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
- });
144
+ b.m("GET").h(headers).b(body);
145
+ return b.build();
228
146
  };
229
147
  exports.se_GetConfiguredAudienceModelCommand = se_GetConfiguredAudienceModelCommand;
230
148
  const se_GetConfiguredAudienceModelPolicyCommand = async (input, context) => {
231
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
149
+ const b = (0, core_1.requestBuilder)(input, context);
232
150
  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);
151
+ b.bp("/configured-audience-model/{configuredAudienceModelArn}/policy");
152
+ b.p("configuredAudienceModelArn", () => input.configuredAudienceModelArn, "{configuredAudienceModelArn}", false);
236
153
  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
- });
154
+ b.m("GET").h(headers).b(body);
155
+ return b.build();
246
156
  };
247
157
  exports.se_GetConfiguredAudienceModelPolicyCommand = se_GetConfiguredAudienceModelPolicyCommand;
248
158
  const se_GetTrainingDatasetCommand = async (input, context) => {
249
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
159
+ const b = (0, core_1.requestBuilder)(input, context);
250
160
  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);
161
+ b.bp("/training-dataset/{trainingDatasetArn}");
162
+ b.p("trainingDatasetArn", () => input.trainingDatasetArn, "{trainingDatasetArn}", false);
253
163
  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
- });
164
+ b.m("GET").h(headers).b(body);
165
+ return b.build();
263
166
  };
264
167
  exports.se_GetTrainingDatasetCommand = se_GetTrainingDatasetCommand;
265
168
  const se_ListAudienceExportJobsCommand = async (input, context) => {
266
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
169
+ const b = (0, core_1.requestBuilder)(input, context);
267
170
  const headers = {};
268
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/audience-export-job";
171
+ b.bp("/audience-export-job");
269
172
  const query = (0, smithy_client_1.map)({
270
- nextToken: [, input.nextToken],
271
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
272
- audienceGenerationJobArn: [, input.audienceGenerationJobArn],
173
+ [_nT]: [, input[_nT]],
174
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
175
+ [_aGJA]: [, input[_aGJA]],
273
176
  });
274
177
  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
- });
178
+ b.m("GET").h(headers).q(query).b(body);
179
+ return b.build();
285
180
  };
286
181
  exports.se_ListAudienceExportJobsCommand = se_ListAudienceExportJobsCommand;
287
182
  const se_ListAudienceGenerationJobsCommand = async (input, context) => {
288
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
183
+ const b = (0, core_1.requestBuilder)(input, context);
289
184
  const headers = {};
290
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/audience-generation-job";
185
+ b.bp("/audience-generation-job");
291
186
  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],
187
+ [_nT]: [, input[_nT]],
188
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
189
+ [_cAMA]: [, input[_cAMA]],
190
+ [_cI]: [, input[_cI]],
296
191
  });
297
192
  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
- });
193
+ b.m("GET").h(headers).q(query).b(body);
194
+ return b.build();
308
195
  };
309
196
  exports.se_ListAudienceGenerationJobsCommand = se_ListAudienceGenerationJobsCommand;
310
197
  const se_ListAudienceModelsCommand = async (input, context) => {
311
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
198
+ const b = (0, core_1.requestBuilder)(input, context);
312
199
  const headers = {};
313
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/audience-model";
200
+ b.bp("/audience-model");
314
201
  const query = (0, smithy_client_1.map)({
315
- nextToken: [, input.nextToken],
316
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
202
+ [_nT]: [, input[_nT]],
203
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
317
204
  });
318
205
  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
- });
206
+ b.m("GET").h(headers).q(query).b(body);
207
+ return b.build();
329
208
  };
330
209
  exports.se_ListAudienceModelsCommand = se_ListAudienceModelsCommand;
331
210
  const se_ListConfiguredAudienceModelsCommand = async (input, context) => {
332
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
211
+ const b = (0, core_1.requestBuilder)(input, context);
333
212
  const headers = {};
334
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/configured-audience-model";
213
+ b.bp("/configured-audience-model");
335
214
  const query = (0, smithy_client_1.map)({
336
- nextToken: [, input.nextToken],
337
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
215
+ [_nT]: [, input[_nT]],
216
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
338
217
  });
339
218
  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
- });
219
+ b.m("GET").h(headers).q(query).b(body);
220
+ return b.build();
350
221
  };
351
222
  exports.se_ListConfiguredAudienceModelsCommand = se_ListConfiguredAudienceModelsCommand;
352
223
  const se_ListTagsForResourceCommand = async (input, context) => {
353
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
224
+ const b = (0, core_1.requestBuilder)(input, context);
354
225
  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);
226
+ b.bp("/tags/{resourceArn}");
227
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
357
228
  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
- });
229
+ b.m("GET").h(headers).b(body);
230
+ return b.build();
367
231
  };
368
232
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
369
233
  const se_ListTrainingDatasetsCommand = async (input, context) => {
370
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
234
+ const b = (0, core_1.requestBuilder)(input, context);
371
235
  const headers = {};
372
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/training-dataset";
236
+ b.bp("/training-dataset");
373
237
  const query = (0, smithy_client_1.map)({
374
- nextToken: [, input.nextToken],
375
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
238
+ [_nT]: [, input[_nT]],
239
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
376
240
  });
377
241
  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
- });
242
+ b.m("GET").h(headers).q(query).b(body);
243
+ return b.build();
388
244
  };
389
245
  exports.se_ListTrainingDatasetsCommand = se_ListTrainingDatasetsCommand;
390
246
  const se_PutConfiguredAudienceModelPolicyCommand = async (input, context) => {
391
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
247
+ const b = (0, core_1.requestBuilder)(input, context);
392
248
  const headers = {
393
249
  "content-type": "application/json",
394
250
  };
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);
251
+ b.bp("/configured-audience-model/{configuredAudienceModelArn}/policy");
252
+ b.p("configuredAudienceModelArn", () => input.configuredAudienceModelArn, "{configuredAudienceModelArn}", false);
398
253
  let body;
399
254
  body = JSON.stringify((0, smithy_client_1.take)(input, {
400
255
  configuredAudienceModelPolicy: [],
401
256
  policyExistenceCondition: [],
402
257
  previousPolicyHash: [],
403
258
  }));
404
- return new protocol_http_1.HttpRequest({
405
- protocol,
406
- hostname,
407
- port,
408
- method: "PUT",
409
- headers,
410
- path: resolvedPath,
411
- body,
412
- });
259
+ b.m("PUT").h(headers).b(body);
260
+ return b.build();
413
261
  };
414
262
  exports.se_PutConfiguredAudienceModelPolicyCommand = se_PutConfiguredAudienceModelPolicyCommand;
415
263
  const se_StartAudienceExportJobCommand = async (input, context) => {
416
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
264
+ const b = (0, core_1.requestBuilder)(input, context);
417
265
  const headers = {
418
266
  "content-type": "application/json",
419
267
  };
420
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/audience-export-job";
268
+ b.bp("/audience-export-job");
421
269
  let body;
422
270
  body = JSON.stringify((0, smithy_client_1.take)(input, {
423
271
  audienceGenerationJobArn: [],
@@ -425,23 +273,16 @@ const se_StartAudienceExportJobCommand = async (input, context) => {
425
273
  description: [],
426
274
  name: [],
427
275
  }));
428
- return new protocol_http_1.HttpRequest({
429
- protocol,
430
- hostname,
431
- port,
432
- method: "POST",
433
- headers,
434
- path: resolvedPath,
435
- body,
436
- });
276
+ b.m("POST").h(headers).b(body);
277
+ return b.build();
437
278
  };
438
279
  exports.se_StartAudienceExportJobCommand = se_StartAudienceExportJobCommand;
439
280
  const se_StartAudienceGenerationJobCommand = async (input, context) => {
440
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
281
+ const b = (0, core_1.requestBuilder)(input, context);
441
282
  const headers = {
442
283
  "content-type": "application/json",
443
284
  };
444
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/audience-generation-job";
285
+ b.bp("/audience-generation-job");
445
286
  let body;
446
287
  body = JSON.stringify((0, smithy_client_1.take)(input, {
447
288
  collaborationId: [],
@@ -452,71 +293,48 @@ const se_StartAudienceGenerationJobCommand = async (input, context) => {
452
293
  seedAudience: (_) => (0, smithy_client_1._json)(_),
453
294
  tags: (_) => (0, smithy_client_1._json)(_),
454
295
  }));
455
- return new protocol_http_1.HttpRequest({
456
- protocol,
457
- hostname,
458
- port,
459
- method: "POST",
460
- headers,
461
- path: resolvedPath,
462
- body,
463
- });
296
+ b.m("POST").h(headers).b(body);
297
+ return b.build();
464
298
  };
465
299
  exports.se_StartAudienceGenerationJobCommand = se_StartAudienceGenerationJobCommand;
466
300
  const se_TagResourceCommand = async (input, context) => {
467
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
301
+ const b = (0, core_1.requestBuilder)(input, context);
468
302
  const headers = {
469
303
  "content-type": "application/json",
470
304
  };
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);
305
+ b.bp("/tags/{resourceArn}");
306
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
473
307
  let body;
474
308
  body = JSON.stringify((0, smithy_client_1.take)(input, {
475
309
  tags: (_) => (0, smithy_client_1._json)(_),
476
310
  }));
477
- return new protocol_http_1.HttpRequest({
478
- protocol,
479
- hostname,
480
- port,
481
- method: "POST",
482
- headers,
483
- path: resolvedPath,
484
- body,
485
- });
311
+ b.m("POST").h(headers).b(body);
312
+ return b.build();
486
313
  };
487
314
  exports.se_TagResourceCommand = se_TagResourceCommand;
488
315
  const se_UntagResourceCommand = async (input, context) => {
489
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
316
+ const b = (0, core_1.requestBuilder)(input, context);
490
317
  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);
318
+ b.bp("/tags/{resourceArn}");
319
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
493
320
  const query = (0, smithy_client_1.map)({
494
- tagKeys: [
321
+ [_tK]: [
495
322
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
496
- () => (input.tagKeys || []).map((_entry) => _entry),
323
+ () => (input[_tK] || []).map((_entry) => _entry),
497
324
  ],
498
325
  });
499
326
  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
- });
327
+ b.m("DELETE").h(headers).q(query).b(body);
328
+ return b.build();
510
329
  };
511
330
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
512
331
  const se_UpdateConfiguredAudienceModelCommand = async (input, context) => {
513
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
332
+ const b = (0, core_1.requestBuilder)(input, context);
514
333
  const headers = {
515
334
  "content-type": "application/json",
516
335
  };
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);
336
+ b.bp("/configured-audience-model/{configuredAudienceModelArn}");
337
+ b.p("configuredAudienceModelArn", () => input.configuredAudienceModelArn, "{configuredAudienceModelArn}", false);
520
338
  let body;
521
339
  body = JSON.stringify((0, smithy_client_1.take)(input, {
522
340
  audienceModelArn: [],
@@ -526,15 +344,8 @@ const se_UpdateConfiguredAudienceModelCommand = async (input, context) => {
526
344
  outputConfig: (_) => (0, smithy_client_1._json)(_),
527
345
  sharedAudienceMetrics: (_) => (0, smithy_client_1._json)(_),
528
346
  }));
529
- return new protocol_http_1.HttpRequest({
530
- protocol,
531
- hostname,
532
- port,
533
- method: "PATCH",
534
- headers,
535
- path: resolvedPath,
536
- body,
537
- });
347
+ b.m("PATCH").h(headers).b(body);
348
+ return b.build();
538
349
  };
539
350
  exports.se_UpdateConfiguredAudienceModelCommand = se_UpdateConfiguredAudienceModelCommand;
540
351
  const de_CreateAudienceModelCommand = async (output, context) => {
@@ -1793,6 +1604,12 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1793
1604
  value !== "" &&
1794
1605
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1795
1606
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1607
+ const _aGJA = "audienceGenerationJobArn";
1608
+ const _cAMA = "configuredAudienceModelArn";
1609
+ const _cI = "collaborationId";
1610
+ const _mR = "maxResults";
1611
+ const _nT = "nextToken";
1612
+ const _tK = "tagKeys";
1796
1613
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1797
1614
  if (encoded.length) {
1798
1615
  return JSON.parse(encoded);