@aws-sdk/client-fis 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,17 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UpdateTargetAccountConfigurationCommand = exports.de_UpdateExperimentTemplateCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StopExperimentCommand = exports.de_StartExperimentCommand = exports.de_ListTargetResourceTypesCommand = exports.de_ListTargetAccountConfigurationsCommand = exports.de_ListTagsForResourceCommand = exports.de_ListExperimentTemplatesCommand = exports.de_ListExperimentTargetAccountConfigurationsCommand = exports.de_ListExperimentsCommand = exports.de_ListExperimentResolvedTargetsCommand = exports.de_ListActionsCommand = exports.de_GetTargetResourceTypeCommand = exports.de_GetTargetAccountConfigurationCommand = exports.de_GetExperimentTemplateCommand = exports.de_GetExperimentTargetAccountConfigurationCommand = exports.de_GetExperimentCommand = exports.de_GetActionCommand = exports.de_DeleteTargetAccountConfigurationCommand = exports.de_DeleteExperimentTemplateCommand = exports.de_CreateTargetAccountConfigurationCommand = exports.de_CreateExperimentTemplateCommand = exports.se_UpdateTargetAccountConfigurationCommand = exports.se_UpdateExperimentTemplateCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StopExperimentCommand = exports.se_StartExperimentCommand = exports.se_ListTargetResourceTypesCommand = exports.se_ListTargetAccountConfigurationsCommand = exports.se_ListTagsForResourceCommand = exports.se_ListExperimentTemplatesCommand = exports.se_ListExperimentTargetAccountConfigurationsCommand = exports.se_ListExperimentsCommand = exports.se_ListExperimentResolvedTargetsCommand = exports.se_ListActionsCommand = exports.se_GetTargetResourceTypeCommand = exports.se_GetTargetAccountConfigurationCommand = exports.se_GetExperimentTemplateCommand = exports.se_GetExperimentTargetAccountConfigurationCommand = exports.se_GetExperimentCommand = exports.se_GetActionCommand = exports.se_DeleteTargetAccountConfigurationCommand = exports.se_DeleteExperimentTemplateCommand = exports.se_CreateTargetAccountConfigurationCommand = exports.se_CreateExperimentTemplateCommand = 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 uuid_1 = require("uuid");
7
7
  const FisServiceException_1 = require("../models/FisServiceException");
8
8
  const models_0_1 = require("../models/models_0");
9
9
  const se_CreateExperimentTemplateCommand = async (input, context) => {
10
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
10
+ const b = (0, core_1.requestBuilder)(input, context);
11
11
  const headers = {
12
12
  "content-type": "application/json",
13
13
  };
14
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/experimentTemplates";
14
+ b.bp("/experimentTemplates");
15
15
  let body;
16
16
  body = JSON.stringify((0, smithy_client_1.take)(input, {
17
17
  actions: (_) => (0, smithy_client_1._json)(_),
@@ -24,445 +24,276 @@ const se_CreateExperimentTemplateCommand = async (input, context) => {
24
24
  tags: (_) => (0, smithy_client_1._json)(_),
25
25
  targets: (_) => (0, smithy_client_1._json)(_),
26
26
  }));
27
- return new protocol_http_1.HttpRequest({
28
- protocol,
29
- hostname,
30
- port,
31
- method: "POST",
32
- headers,
33
- path: resolvedPath,
34
- body,
35
- });
27
+ b.m("POST").h(headers).b(body);
28
+ return b.build();
36
29
  };
37
30
  exports.se_CreateExperimentTemplateCommand = se_CreateExperimentTemplateCommand;
38
31
  const se_CreateTargetAccountConfigurationCommand = async (input, context) => {
39
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
32
+ const b = (0, core_1.requestBuilder)(input, context);
40
33
  const headers = {
41
34
  "content-type": "application/json",
42
35
  };
43
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
44
- "/experimentTemplates/{experimentTemplateId}/targetAccountConfigurations/{accountId}";
45
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "experimentTemplateId", () => input.experimentTemplateId, "{experimentTemplateId}", false);
46
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "accountId", () => input.accountId, "{accountId}", false);
36
+ b.bp("/experimentTemplates/{experimentTemplateId}/targetAccountConfigurations/{accountId}");
37
+ b.p("experimentTemplateId", () => input.experimentTemplateId, "{experimentTemplateId}", false);
38
+ b.p("accountId", () => input.accountId, "{accountId}", false);
47
39
  let body;
48
40
  body = JSON.stringify((0, smithy_client_1.take)(input, {
49
41
  clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
50
42
  description: [],
51
43
  roleArn: [],
52
44
  }));
53
- return new protocol_http_1.HttpRequest({
54
- protocol,
55
- hostname,
56
- port,
57
- method: "POST",
58
- headers,
59
- path: resolvedPath,
60
- body,
61
- });
45
+ b.m("POST").h(headers).b(body);
46
+ return b.build();
62
47
  };
63
48
  exports.se_CreateTargetAccountConfigurationCommand = se_CreateTargetAccountConfigurationCommand;
64
49
  const se_DeleteExperimentTemplateCommand = async (input, context) => {
65
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
50
+ const b = (0, core_1.requestBuilder)(input, context);
66
51
  const headers = {};
67
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/experimentTemplates/{id}";
68
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
52
+ b.bp("/experimentTemplates/{id}");
53
+ b.p("id", () => input.id, "{id}", false);
69
54
  let body;
70
- return new protocol_http_1.HttpRequest({
71
- protocol,
72
- hostname,
73
- port,
74
- method: "DELETE",
75
- headers,
76
- path: resolvedPath,
77
- body,
78
- });
55
+ b.m("DELETE").h(headers).b(body);
56
+ return b.build();
79
57
  };
80
58
  exports.se_DeleteExperimentTemplateCommand = se_DeleteExperimentTemplateCommand;
81
59
  const se_DeleteTargetAccountConfigurationCommand = async (input, context) => {
82
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
60
+ const b = (0, core_1.requestBuilder)(input, context);
83
61
  const headers = {};
84
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
85
- "/experimentTemplates/{experimentTemplateId}/targetAccountConfigurations/{accountId}";
86
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "experimentTemplateId", () => input.experimentTemplateId, "{experimentTemplateId}", false);
87
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "accountId", () => input.accountId, "{accountId}", false);
62
+ b.bp("/experimentTemplates/{experimentTemplateId}/targetAccountConfigurations/{accountId}");
63
+ b.p("experimentTemplateId", () => input.experimentTemplateId, "{experimentTemplateId}", false);
64
+ b.p("accountId", () => input.accountId, "{accountId}", false);
88
65
  let body;
89
- return new protocol_http_1.HttpRequest({
90
- protocol,
91
- hostname,
92
- port,
93
- method: "DELETE",
94
- headers,
95
- path: resolvedPath,
96
- body,
97
- });
66
+ b.m("DELETE").h(headers).b(body);
67
+ return b.build();
98
68
  };
99
69
  exports.se_DeleteTargetAccountConfigurationCommand = se_DeleteTargetAccountConfigurationCommand;
100
70
  const se_GetActionCommand = async (input, context) => {
101
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
71
+ const b = (0, core_1.requestBuilder)(input, context);
102
72
  const headers = {};
103
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/actions/{id}";
104
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
73
+ b.bp("/actions/{id}");
74
+ b.p("id", () => input.id, "{id}", false);
105
75
  let body;
106
- return new protocol_http_1.HttpRequest({
107
- protocol,
108
- hostname,
109
- port,
110
- method: "GET",
111
- headers,
112
- path: resolvedPath,
113
- body,
114
- });
76
+ b.m("GET").h(headers).b(body);
77
+ return b.build();
115
78
  };
116
79
  exports.se_GetActionCommand = se_GetActionCommand;
117
80
  const se_GetExperimentCommand = async (input, context) => {
118
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
81
+ const b = (0, core_1.requestBuilder)(input, context);
119
82
  const headers = {};
120
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/experiments/{id}";
121
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
83
+ b.bp("/experiments/{id}");
84
+ b.p("id", () => input.id, "{id}", false);
122
85
  let body;
123
- return new protocol_http_1.HttpRequest({
124
- protocol,
125
- hostname,
126
- port,
127
- method: "GET",
128
- headers,
129
- path: resolvedPath,
130
- body,
131
- });
86
+ b.m("GET").h(headers).b(body);
87
+ return b.build();
132
88
  };
133
89
  exports.se_GetExperimentCommand = se_GetExperimentCommand;
134
90
  const se_GetExperimentTargetAccountConfigurationCommand = async (input, context) => {
135
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
91
+ const b = (0, core_1.requestBuilder)(input, context);
136
92
  const headers = {};
137
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
138
- "/experiments/{experimentId}/targetAccountConfigurations/{accountId}";
139
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "experimentId", () => input.experimentId, "{experimentId}", false);
140
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "accountId", () => input.accountId, "{accountId}", false);
93
+ b.bp("/experiments/{experimentId}/targetAccountConfigurations/{accountId}");
94
+ b.p("experimentId", () => input.experimentId, "{experimentId}", false);
95
+ b.p("accountId", () => input.accountId, "{accountId}", false);
141
96
  let body;
142
- return new protocol_http_1.HttpRequest({
143
- protocol,
144
- hostname,
145
- port,
146
- method: "GET",
147
- headers,
148
- path: resolvedPath,
149
- body,
150
- });
97
+ b.m("GET").h(headers).b(body);
98
+ return b.build();
151
99
  };
152
100
  exports.se_GetExperimentTargetAccountConfigurationCommand = se_GetExperimentTargetAccountConfigurationCommand;
153
101
  const se_GetExperimentTemplateCommand = async (input, context) => {
154
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
102
+ const b = (0, core_1.requestBuilder)(input, context);
155
103
  const headers = {};
156
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/experimentTemplates/{id}";
157
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
104
+ b.bp("/experimentTemplates/{id}");
105
+ b.p("id", () => input.id, "{id}", false);
158
106
  let body;
159
- return new protocol_http_1.HttpRequest({
160
- protocol,
161
- hostname,
162
- port,
163
- method: "GET",
164
- headers,
165
- path: resolvedPath,
166
- body,
167
- });
107
+ b.m("GET").h(headers).b(body);
108
+ return b.build();
168
109
  };
169
110
  exports.se_GetExperimentTemplateCommand = se_GetExperimentTemplateCommand;
170
111
  const se_GetTargetAccountConfigurationCommand = async (input, context) => {
171
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
112
+ const b = (0, core_1.requestBuilder)(input, context);
172
113
  const headers = {};
173
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
174
- "/experimentTemplates/{experimentTemplateId}/targetAccountConfigurations/{accountId}";
175
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "experimentTemplateId", () => input.experimentTemplateId, "{experimentTemplateId}", false);
176
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "accountId", () => input.accountId, "{accountId}", false);
114
+ b.bp("/experimentTemplates/{experimentTemplateId}/targetAccountConfigurations/{accountId}");
115
+ b.p("experimentTemplateId", () => input.experimentTemplateId, "{experimentTemplateId}", false);
116
+ b.p("accountId", () => input.accountId, "{accountId}", false);
177
117
  let body;
178
- return new protocol_http_1.HttpRequest({
179
- protocol,
180
- hostname,
181
- port,
182
- method: "GET",
183
- headers,
184
- path: resolvedPath,
185
- body,
186
- });
118
+ b.m("GET").h(headers).b(body);
119
+ return b.build();
187
120
  };
188
121
  exports.se_GetTargetAccountConfigurationCommand = se_GetTargetAccountConfigurationCommand;
189
122
  const se_GetTargetResourceTypeCommand = async (input, context) => {
190
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
123
+ const b = (0, core_1.requestBuilder)(input, context);
191
124
  const headers = {};
192
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/targetResourceTypes/{resourceType}";
193
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceType", () => input.resourceType, "{resourceType}", false);
125
+ b.bp("/targetResourceTypes/{resourceType}");
126
+ b.p("resourceType", () => input.resourceType, "{resourceType}", false);
194
127
  let body;
195
- return new protocol_http_1.HttpRequest({
196
- protocol,
197
- hostname,
198
- port,
199
- method: "GET",
200
- headers,
201
- path: resolvedPath,
202
- body,
203
- });
128
+ b.m("GET").h(headers).b(body);
129
+ return b.build();
204
130
  };
205
131
  exports.se_GetTargetResourceTypeCommand = se_GetTargetResourceTypeCommand;
206
132
  const se_ListActionsCommand = async (input, context) => {
207
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
133
+ const b = (0, core_1.requestBuilder)(input, context);
208
134
  const headers = {};
209
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/actions";
135
+ b.bp("/actions");
210
136
  const query = (0, smithy_client_1.map)({
211
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
212
- nextToken: [, input.nextToken],
137
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
138
+ [_nT]: [, input[_nT]],
213
139
  });
214
140
  let body;
215
- return new protocol_http_1.HttpRequest({
216
- protocol,
217
- hostname,
218
- port,
219
- method: "GET",
220
- headers,
221
- path: resolvedPath,
222
- query,
223
- body,
224
- });
141
+ b.m("GET").h(headers).q(query).b(body);
142
+ return b.build();
225
143
  };
226
144
  exports.se_ListActionsCommand = se_ListActionsCommand;
227
145
  const se_ListExperimentResolvedTargetsCommand = async (input, context) => {
228
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
146
+ const b = (0, core_1.requestBuilder)(input, context);
229
147
  const headers = {};
230
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
231
- "/experiments/{experimentId}/resolvedTargets";
232
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "experimentId", () => input.experimentId, "{experimentId}", false);
148
+ b.bp("/experiments/{experimentId}/resolvedTargets");
149
+ b.p("experimentId", () => input.experimentId, "{experimentId}", false);
233
150
  const query = (0, smithy_client_1.map)({
234
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
235
- nextToken: [, input.nextToken],
236
- targetName: [, input.targetName],
151
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
152
+ [_nT]: [, input[_nT]],
153
+ [_tN]: [, input[_tN]],
237
154
  });
238
155
  let body;
239
- return new protocol_http_1.HttpRequest({
240
- protocol,
241
- hostname,
242
- port,
243
- method: "GET",
244
- headers,
245
- path: resolvedPath,
246
- query,
247
- body,
248
- });
156
+ b.m("GET").h(headers).q(query).b(body);
157
+ return b.build();
249
158
  };
250
159
  exports.se_ListExperimentResolvedTargetsCommand = se_ListExperimentResolvedTargetsCommand;
251
160
  const se_ListExperimentsCommand = async (input, context) => {
252
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
161
+ const b = (0, core_1.requestBuilder)(input, context);
253
162
  const headers = {};
254
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/experiments";
163
+ b.bp("/experiments");
255
164
  const query = (0, smithy_client_1.map)({
256
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
257
- nextToken: [, input.nextToken],
165
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
166
+ [_nT]: [, input[_nT]],
258
167
  });
259
168
  let body;
260
- return new protocol_http_1.HttpRequest({
261
- protocol,
262
- hostname,
263
- port,
264
- method: "GET",
265
- headers,
266
- path: resolvedPath,
267
- query,
268
- body,
269
- });
169
+ b.m("GET").h(headers).q(query).b(body);
170
+ return b.build();
270
171
  };
271
172
  exports.se_ListExperimentsCommand = se_ListExperimentsCommand;
272
173
  const se_ListExperimentTargetAccountConfigurationsCommand = async (input, context) => {
273
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
174
+ const b = (0, core_1.requestBuilder)(input, context);
274
175
  const headers = {};
275
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
276
- "/experiments/{experimentId}/targetAccountConfigurations";
277
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "experimentId", () => input.experimentId, "{experimentId}", false);
176
+ b.bp("/experiments/{experimentId}/targetAccountConfigurations");
177
+ b.p("experimentId", () => input.experimentId, "{experimentId}", false);
278
178
  const query = (0, smithy_client_1.map)({
279
- nextToken: [, input.nextToken],
179
+ [_nT]: [, input[_nT]],
280
180
  });
281
181
  let body;
282
- return new protocol_http_1.HttpRequest({
283
- protocol,
284
- hostname,
285
- port,
286
- method: "GET",
287
- headers,
288
- path: resolvedPath,
289
- query,
290
- body,
291
- });
182
+ b.m("GET").h(headers).q(query).b(body);
183
+ return b.build();
292
184
  };
293
185
  exports.se_ListExperimentTargetAccountConfigurationsCommand = se_ListExperimentTargetAccountConfigurationsCommand;
294
186
  const se_ListExperimentTemplatesCommand = async (input, context) => {
295
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
187
+ const b = (0, core_1.requestBuilder)(input, context);
296
188
  const headers = {};
297
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/experimentTemplates";
189
+ b.bp("/experimentTemplates");
298
190
  const query = (0, smithy_client_1.map)({
299
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
300
- nextToken: [, input.nextToken],
191
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
192
+ [_nT]: [, input[_nT]],
301
193
  });
302
194
  let body;
303
- return new protocol_http_1.HttpRequest({
304
- protocol,
305
- hostname,
306
- port,
307
- method: "GET",
308
- headers,
309
- path: resolvedPath,
310
- query,
311
- body,
312
- });
195
+ b.m("GET").h(headers).q(query).b(body);
196
+ return b.build();
313
197
  };
314
198
  exports.se_ListExperimentTemplatesCommand = se_ListExperimentTemplatesCommand;
315
199
  const se_ListTagsForResourceCommand = async (input, context) => {
316
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
200
+ const b = (0, core_1.requestBuilder)(input, context);
317
201
  const headers = {};
318
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
319
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
202
+ b.bp("/tags/{resourceArn}");
203
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
320
204
  let body;
321
- return new protocol_http_1.HttpRequest({
322
- protocol,
323
- hostname,
324
- port,
325
- method: "GET",
326
- headers,
327
- path: resolvedPath,
328
- body,
329
- });
205
+ b.m("GET").h(headers).b(body);
206
+ return b.build();
330
207
  };
331
208
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
332
209
  const se_ListTargetAccountConfigurationsCommand = async (input, context) => {
333
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
210
+ const b = (0, core_1.requestBuilder)(input, context);
334
211
  const headers = {};
335
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
336
- "/experimentTemplates/{experimentTemplateId}/targetAccountConfigurations";
337
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "experimentTemplateId", () => input.experimentTemplateId, "{experimentTemplateId}", false);
212
+ b.bp("/experimentTemplates/{experimentTemplateId}/targetAccountConfigurations");
213
+ b.p("experimentTemplateId", () => input.experimentTemplateId, "{experimentTemplateId}", false);
338
214
  const query = (0, smithy_client_1.map)({
339
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
340
- nextToken: [, input.nextToken],
215
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
216
+ [_nT]: [, input[_nT]],
341
217
  });
342
218
  let body;
343
- return new protocol_http_1.HttpRequest({
344
- protocol,
345
- hostname,
346
- port,
347
- method: "GET",
348
- headers,
349
- path: resolvedPath,
350
- query,
351
- body,
352
- });
219
+ b.m("GET").h(headers).q(query).b(body);
220
+ return b.build();
353
221
  };
354
222
  exports.se_ListTargetAccountConfigurationsCommand = se_ListTargetAccountConfigurationsCommand;
355
223
  const se_ListTargetResourceTypesCommand = async (input, context) => {
356
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
224
+ const b = (0, core_1.requestBuilder)(input, context);
357
225
  const headers = {};
358
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/targetResourceTypes";
226
+ b.bp("/targetResourceTypes");
359
227
  const query = (0, smithy_client_1.map)({
360
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
361
- nextToken: [, input.nextToken],
228
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
229
+ [_nT]: [, input[_nT]],
362
230
  });
363
231
  let body;
364
- return new protocol_http_1.HttpRequest({
365
- protocol,
366
- hostname,
367
- port,
368
- method: "GET",
369
- headers,
370
- path: resolvedPath,
371
- query,
372
- body,
373
- });
232
+ b.m("GET").h(headers).q(query).b(body);
233
+ return b.build();
374
234
  };
375
235
  exports.se_ListTargetResourceTypesCommand = se_ListTargetResourceTypesCommand;
376
236
  const se_StartExperimentCommand = async (input, context) => {
377
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
237
+ const b = (0, core_1.requestBuilder)(input, context);
378
238
  const headers = {
379
239
  "content-type": "application/json",
380
240
  };
381
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/experiments";
241
+ b.bp("/experiments");
382
242
  let body;
383
243
  body = JSON.stringify((0, smithy_client_1.take)(input, {
384
244
  clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
385
245
  experimentTemplateId: [],
386
246
  tags: (_) => (0, smithy_client_1._json)(_),
387
247
  }));
388
- return new protocol_http_1.HttpRequest({
389
- protocol,
390
- hostname,
391
- port,
392
- method: "POST",
393
- headers,
394
- path: resolvedPath,
395
- body,
396
- });
248
+ b.m("POST").h(headers).b(body);
249
+ return b.build();
397
250
  };
398
251
  exports.se_StartExperimentCommand = se_StartExperimentCommand;
399
252
  const se_StopExperimentCommand = async (input, context) => {
400
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
253
+ const b = (0, core_1.requestBuilder)(input, context);
401
254
  const headers = {};
402
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/experiments/{id}";
403
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
255
+ b.bp("/experiments/{id}");
256
+ b.p("id", () => input.id, "{id}", false);
404
257
  let body;
405
- return new protocol_http_1.HttpRequest({
406
- protocol,
407
- hostname,
408
- port,
409
- method: "DELETE",
410
- headers,
411
- path: resolvedPath,
412
- body,
413
- });
258
+ b.m("DELETE").h(headers).b(body);
259
+ return b.build();
414
260
  };
415
261
  exports.se_StopExperimentCommand = se_StopExperimentCommand;
416
262
  const se_TagResourceCommand = async (input, context) => {
417
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
263
+ const b = (0, core_1.requestBuilder)(input, context);
418
264
  const headers = {
419
265
  "content-type": "application/json",
420
266
  };
421
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
422
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
267
+ b.bp("/tags/{resourceArn}");
268
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
423
269
  let body;
424
270
  body = JSON.stringify((0, smithy_client_1.take)(input, {
425
271
  tags: (_) => (0, smithy_client_1._json)(_),
426
272
  }));
427
- return new protocol_http_1.HttpRequest({
428
- protocol,
429
- hostname,
430
- port,
431
- method: "POST",
432
- headers,
433
- path: resolvedPath,
434
- body,
435
- });
273
+ b.m("POST").h(headers).b(body);
274
+ return b.build();
436
275
  };
437
276
  exports.se_TagResourceCommand = se_TagResourceCommand;
438
277
  const se_UntagResourceCommand = async (input, context) => {
439
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
278
+ const b = (0, core_1.requestBuilder)(input, context);
440
279
  const headers = {};
441
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
442
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
280
+ b.bp("/tags/{resourceArn}");
281
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
443
282
  const query = (0, smithy_client_1.map)({
444
- tagKeys: [() => input.tagKeys !== void 0, () => (input.tagKeys || []).map((_entry) => _entry)],
283
+ [_tK]: [() => input.tagKeys !== void 0, () => (input[_tK] || []).map((_entry) => _entry)],
445
284
  });
446
285
  let body;
447
- return new protocol_http_1.HttpRequest({
448
- protocol,
449
- hostname,
450
- port,
451
- method: "DELETE",
452
- headers,
453
- path: resolvedPath,
454
- query,
455
- body,
456
- });
286
+ b.m("DELETE").h(headers).q(query).b(body);
287
+ return b.build();
457
288
  };
458
289
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
459
290
  const se_UpdateExperimentTemplateCommand = async (input, context) => {
460
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
291
+ const b = (0, core_1.requestBuilder)(input, context);
461
292
  const headers = {
462
293
  "content-type": "application/json",
463
294
  };
464
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/experimentTemplates/{id}";
465
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
295
+ b.bp("/experimentTemplates/{id}");
296
+ b.p("id", () => input.id, "{id}", false);
466
297
  let body;
467
298
  body = JSON.stringify((0, smithy_client_1.take)(input, {
468
299
  actions: (_) => (0, smithy_client_1._json)(_),
@@ -473,40 +304,25 @@ const se_UpdateExperimentTemplateCommand = async (input, context) => {
473
304
  stopConditions: (_) => (0, smithy_client_1._json)(_),
474
305
  targets: (_) => (0, smithy_client_1._json)(_),
475
306
  }));
476
- return new protocol_http_1.HttpRequest({
477
- protocol,
478
- hostname,
479
- port,
480
- method: "PATCH",
481
- headers,
482
- path: resolvedPath,
483
- body,
484
- });
307
+ b.m("PATCH").h(headers).b(body);
308
+ return b.build();
485
309
  };
486
310
  exports.se_UpdateExperimentTemplateCommand = se_UpdateExperimentTemplateCommand;
487
311
  const se_UpdateTargetAccountConfigurationCommand = async (input, context) => {
488
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
312
+ const b = (0, core_1.requestBuilder)(input, context);
489
313
  const headers = {
490
314
  "content-type": "application/json",
491
315
  };
492
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
493
- "/experimentTemplates/{experimentTemplateId}/targetAccountConfigurations/{accountId}";
494
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "experimentTemplateId", () => input.experimentTemplateId, "{experimentTemplateId}", false);
495
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "accountId", () => input.accountId, "{accountId}", false);
316
+ b.bp("/experimentTemplates/{experimentTemplateId}/targetAccountConfigurations/{accountId}");
317
+ b.p("experimentTemplateId", () => input.experimentTemplateId, "{experimentTemplateId}", false);
318
+ b.p("accountId", () => input.accountId, "{accountId}", false);
496
319
  let body;
497
320
  body = JSON.stringify((0, smithy_client_1.take)(input, {
498
321
  description: [],
499
322
  roleArn: [],
500
323
  }));
501
- return new protocol_http_1.HttpRequest({
502
- protocol,
503
- hostname,
504
- port,
505
- method: "PATCH",
506
- headers,
507
- path: resolvedPath,
508
- body,
509
- });
324
+ b.m("PATCH").h(headers).b(body);
325
+ return b.build();
510
326
  };
511
327
  exports.se_UpdateTargetAccountConfigurationCommand = se_UpdateTargetAccountConfigurationCommand;
512
328
  const de_CreateExperimentTemplateCommand = async (output, context) => {
@@ -1532,6 +1348,10 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1532
1348
  value !== "" &&
1533
1349
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1534
1350
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1351
+ const _mR = "maxResults";
1352
+ const _nT = "nextToken";
1353
+ const _tK = "tagKeys";
1354
+ const _tN = "targetName";
1535
1355
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1536
1356
  if (encoded.length) {
1537
1357
  return JSON.parse(encoded);