@aws-sdk/client-codeguruprofiler 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,93 +1,65 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, take, withBaseException, } from "@smithy/smithy-client";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { CodeGuruProfilerServiceException as __BaseException } from "../models/CodeGuruProfilerServiceException";
5
5
  import { ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
6
6
  export const se_AddNotificationChannelsCommand = async (input, context) => {
7
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
+ const b = rb(input, context);
8
8
  const headers = {
9
9
  "content-type": "application/json",
10
10
  };
11
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
12
- "/profilingGroups/{profilingGroupName}/notificationConfiguration";
13
- resolvedPath = __resolvedPath(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
11
+ b.bp("/profilingGroups/{profilingGroupName}/notificationConfiguration");
12
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
14
13
  let body;
15
14
  body = JSON.stringify(take(input, {
16
15
  channels: (_) => _json(_),
17
16
  }));
18
- return new __HttpRequest({
19
- protocol,
20
- hostname,
21
- port,
22
- method: "POST",
23
- headers,
24
- path: resolvedPath,
25
- body,
26
- });
17
+ b.m("POST").h(headers).b(body);
18
+ return b.build();
27
19
  };
28
20
  export const se_BatchGetFrameMetricDataCommand = async (input, context) => {
29
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
21
+ const b = rb(input, context);
30
22
  const headers = {
31
23
  "content-type": "application/json",
32
24
  };
33
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
34
- "/profilingGroups/{profilingGroupName}/frames/-/metrics";
35
- resolvedPath = __resolvedPath(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
25
+ b.bp("/profilingGroups/{profilingGroupName}/frames/-/metrics");
26
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
36
27
  const query = map({
37
- startTime: [
38
- () => input.startTime !== void 0,
39
- () => (input.startTime.toISOString().split(".")[0] + "Z").toString(),
40
- ],
41
- endTime: [() => input.endTime !== void 0, () => (input.endTime.toISOString().split(".")[0] + "Z").toString()],
42
- period: [, input.period],
43
- targetResolution: [, input.targetResolution],
28
+ [_sT]: [() => input.startTime !== void 0, () => (input[_sT].toISOString().split(".")[0] + "Z").toString()],
29
+ [_eT]: [() => input.endTime !== void 0, () => (input[_eT].toISOString().split(".")[0] + "Z").toString()],
30
+ [_p]: [, input[_p]],
31
+ [_tR]: [, input[_tR]],
44
32
  });
45
33
  let body;
46
34
  body = JSON.stringify(take(input, {
47
35
  frameMetrics: (_) => _json(_),
48
36
  }));
49
- return new __HttpRequest({
50
- protocol,
51
- hostname,
52
- port,
53
- method: "POST",
54
- headers,
55
- path: resolvedPath,
56
- query,
57
- body,
58
- });
37
+ b.m("POST").h(headers).q(query).b(body);
38
+ return b.build();
59
39
  };
60
40
  export const se_ConfigureAgentCommand = async (input, context) => {
61
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
41
+ const b = rb(input, context);
62
42
  const headers = {
63
43
  "content-type": "application/json",
64
44
  };
65
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
66
- "/profilingGroups/{profilingGroupName}/configureAgent";
67
- resolvedPath = __resolvedPath(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
45
+ b.bp("/profilingGroups/{profilingGroupName}/configureAgent");
46
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
68
47
  let body;
69
48
  body = JSON.stringify(take(input, {
70
49
  fleetInstanceId: [],
71
50
  metadata: (_) => _json(_),
72
51
  }));
73
- return new __HttpRequest({
74
- protocol,
75
- hostname,
76
- port,
77
- method: "POST",
78
- headers,
79
- path: resolvedPath,
80
- body,
81
- });
52
+ b.m("POST").h(headers).b(body);
53
+ return b.build();
82
54
  };
83
55
  export const se_CreateProfilingGroupCommand = async (input, context) => {
84
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
56
+ const b = rb(input, context);
85
57
  const headers = {
86
58
  "content-type": "application/json",
87
59
  };
88
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/profilingGroups";
60
+ b.bp("/profilingGroups");
89
61
  const query = map({
90
- clientToken: [, __expectNonNull(input.clientToken, `clientToken`)],
62
+ [_cT]: [, __expectNonNull(input[_cT], `clientToken`)],
91
63
  });
92
64
  let body;
93
65
  body = JSON.stringify(take(input, {
@@ -96,440 +68,276 @@ export const se_CreateProfilingGroupCommand = async (input, context) => {
96
68
  profilingGroupName: [],
97
69
  tags: (_) => _json(_),
98
70
  }));
99
- return new __HttpRequest({
100
- protocol,
101
- hostname,
102
- port,
103
- method: "POST",
104
- headers,
105
- path: resolvedPath,
106
- query,
107
- body,
108
- });
71
+ b.m("POST").h(headers).q(query).b(body);
72
+ return b.build();
109
73
  };
110
74
  export const se_DeleteProfilingGroupCommand = async (input, context) => {
111
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
75
+ const b = rb(input, context);
112
76
  const headers = {};
113
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/profilingGroups/{profilingGroupName}";
114
- resolvedPath = __resolvedPath(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
77
+ b.bp("/profilingGroups/{profilingGroupName}");
78
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
115
79
  let body;
116
- return new __HttpRequest({
117
- protocol,
118
- hostname,
119
- port,
120
- method: "DELETE",
121
- headers,
122
- path: resolvedPath,
123
- body,
124
- });
80
+ b.m("DELETE").h(headers).b(body);
81
+ return b.build();
125
82
  };
126
83
  export const se_DescribeProfilingGroupCommand = async (input, context) => {
127
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
84
+ const b = rb(input, context);
128
85
  const headers = {};
129
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/profilingGroups/{profilingGroupName}";
130
- resolvedPath = __resolvedPath(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
86
+ b.bp("/profilingGroups/{profilingGroupName}");
87
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
131
88
  let body;
132
- return new __HttpRequest({
133
- protocol,
134
- hostname,
135
- port,
136
- method: "GET",
137
- headers,
138
- path: resolvedPath,
139
- body,
140
- });
89
+ b.m("GET").h(headers).b(body);
90
+ return b.build();
141
91
  };
142
92
  export const se_GetFindingsReportAccountSummaryCommand = async (input, context) => {
143
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
93
+ const b = rb(input, context);
144
94
  const headers = {};
145
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/internal/findingsReports";
95
+ b.bp("/internal/findingsReports");
146
96
  const query = map({
147
- nextToken: [, input.nextToken],
148
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
149
- dailyReportsOnly: [() => input.dailyReportsOnly !== void 0, () => input.dailyReportsOnly.toString()],
97
+ [_nT]: [, input[_nT]],
98
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
99
+ [_dRO]: [() => input.dailyReportsOnly !== void 0, () => input[_dRO].toString()],
150
100
  });
151
101
  let body;
152
- return new __HttpRequest({
153
- protocol,
154
- hostname,
155
- port,
156
- method: "GET",
157
- headers,
158
- path: resolvedPath,
159
- query,
160
- body,
161
- });
102
+ b.m("GET").h(headers).q(query).b(body);
103
+ return b.build();
162
104
  };
163
105
  export const se_GetNotificationConfigurationCommand = async (input, context) => {
164
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
106
+ const b = rb(input, context);
165
107
  const headers = {};
166
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
167
- "/profilingGroups/{profilingGroupName}/notificationConfiguration";
168
- resolvedPath = __resolvedPath(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
108
+ b.bp("/profilingGroups/{profilingGroupName}/notificationConfiguration");
109
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
169
110
  let body;
170
- return new __HttpRequest({
171
- protocol,
172
- hostname,
173
- port,
174
- method: "GET",
175
- headers,
176
- path: resolvedPath,
177
- body,
178
- });
111
+ b.m("GET").h(headers).b(body);
112
+ return b.build();
179
113
  };
180
114
  export const se_GetPolicyCommand = async (input, context) => {
181
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
115
+ const b = rb(input, context);
182
116
  const headers = {};
183
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
184
- "/profilingGroups/{profilingGroupName}/policy";
185
- resolvedPath = __resolvedPath(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
117
+ b.bp("/profilingGroups/{profilingGroupName}/policy");
118
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
186
119
  let body;
187
- return new __HttpRequest({
188
- protocol,
189
- hostname,
190
- port,
191
- method: "GET",
192
- headers,
193
- path: resolvedPath,
194
- body,
195
- });
120
+ b.m("GET").h(headers).b(body);
121
+ return b.build();
196
122
  };
197
123
  export const se_GetProfileCommand = async (input, context) => {
198
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
124
+ const b = rb(input, context);
199
125
  const headers = map({}, isSerializableHeaderValue, {
200
- accept: input.accept,
126
+ [_a]: input[_a],
201
127
  });
202
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
203
- "/profilingGroups/{profilingGroupName}/profile";
204
- resolvedPath = __resolvedPath(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
128
+ b.bp("/profilingGroups/{profilingGroupName}/profile");
129
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
205
130
  const query = map({
206
- startTime: [
207
- () => input.startTime !== void 0,
208
- () => (input.startTime.toISOString().split(".")[0] + "Z").toString(),
209
- ],
210
- period: [, input.period],
211
- endTime: [() => input.endTime !== void 0, () => (input.endTime.toISOString().split(".")[0] + "Z").toString()],
212
- maxDepth: [() => input.maxDepth !== void 0, () => input.maxDepth.toString()],
131
+ [_sT]: [() => input.startTime !== void 0, () => (input[_sT].toISOString().split(".")[0] + "Z").toString()],
132
+ [_p]: [, input[_p]],
133
+ [_eT]: [() => input.endTime !== void 0, () => (input[_eT].toISOString().split(".")[0] + "Z").toString()],
134
+ [_mD]: [() => input.maxDepth !== void 0, () => input[_mD].toString()],
213
135
  });
214
136
  let body;
215
- return new __HttpRequest({
216
- protocol,
217
- hostname,
218
- port,
219
- method: "GET",
220
- headers,
221
- path: resolvedPath,
222
- query,
223
- body,
224
- });
137
+ b.m("GET").h(headers).q(query).b(body);
138
+ return b.build();
225
139
  };
226
140
  export const se_GetRecommendationsCommand = async (input, context) => {
227
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
141
+ const b = rb(input, context);
228
142
  const headers = {};
229
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
230
- "/internal/profilingGroups/{profilingGroupName}/recommendations";
231
- resolvedPath = __resolvedPath(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
143
+ b.bp("/internal/profilingGroups/{profilingGroupName}/recommendations");
144
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
232
145
  const query = map({
233
- startTime: [
146
+ [_sT]: [
234
147
  __expectNonNull(input.startTime, `startTime`) != null,
235
- () => (input.startTime.toISOString().split(".")[0] + "Z").toString(),
148
+ () => (input[_sT].toISOString().split(".")[0] + "Z").toString(),
236
149
  ],
237
- endTime: [
150
+ [_eT]: [
238
151
  __expectNonNull(input.endTime, `endTime`) != null,
239
- () => (input.endTime.toISOString().split(".")[0] + "Z").toString(),
152
+ () => (input[_eT].toISOString().split(".")[0] + "Z").toString(),
240
153
  ],
241
- locale: [, input.locale],
154
+ [_l]: [, input[_l]],
242
155
  });
243
156
  let body;
244
- return new __HttpRequest({
245
- protocol,
246
- hostname,
247
- port,
248
- method: "GET",
249
- headers,
250
- path: resolvedPath,
251
- query,
252
- body,
253
- });
157
+ b.m("GET").h(headers).q(query).b(body);
158
+ return b.build();
254
159
  };
255
160
  export const se_ListFindingsReportsCommand = async (input, context) => {
256
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
161
+ const b = rb(input, context);
257
162
  const headers = {};
258
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
259
- "/internal/profilingGroups/{profilingGroupName}/findingsReports";
260
- resolvedPath = __resolvedPath(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
163
+ b.bp("/internal/profilingGroups/{profilingGroupName}/findingsReports");
164
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
261
165
  const query = map({
262
- startTime: [
166
+ [_sT]: [
263
167
  __expectNonNull(input.startTime, `startTime`) != null,
264
- () => (input.startTime.toISOString().split(".")[0] + "Z").toString(),
168
+ () => (input[_sT].toISOString().split(".")[0] + "Z").toString(),
265
169
  ],
266
- endTime: [
170
+ [_eT]: [
267
171
  __expectNonNull(input.endTime, `endTime`) != null,
268
- () => (input.endTime.toISOString().split(".")[0] + "Z").toString(),
172
+ () => (input[_eT].toISOString().split(".")[0] + "Z").toString(),
269
173
  ],
270
- nextToken: [, input.nextToken],
271
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
272
- dailyReportsOnly: [() => input.dailyReportsOnly !== void 0, () => input.dailyReportsOnly.toString()],
174
+ [_nT]: [, input[_nT]],
175
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
176
+ [_dRO]: [() => input.dailyReportsOnly !== void 0, () => input[_dRO].toString()],
273
177
  });
274
178
  let body;
275
- return new __HttpRequest({
276
- protocol,
277
- hostname,
278
- port,
279
- method: "GET",
280
- headers,
281
- path: resolvedPath,
282
- query,
283
- body,
284
- });
179
+ b.m("GET").h(headers).q(query).b(body);
180
+ return b.build();
285
181
  };
286
182
  export const se_ListProfileTimesCommand = async (input, context) => {
287
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
183
+ const b = rb(input, context);
288
184
  const headers = {};
289
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
290
- "/profilingGroups/{profilingGroupName}/profileTimes";
291
- resolvedPath = __resolvedPath(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
185
+ b.bp("/profilingGroups/{profilingGroupName}/profileTimes");
186
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
292
187
  const query = map({
293
- startTime: [
188
+ [_sT]: [
294
189
  __expectNonNull(input.startTime, `startTime`) != null,
295
- () => (input.startTime.toISOString().split(".")[0] + "Z").toString(),
190
+ () => (input[_sT].toISOString().split(".")[0] + "Z").toString(),
296
191
  ],
297
- endTime: [
192
+ [_eT]: [
298
193
  __expectNonNull(input.endTime, `endTime`) != null,
299
- () => (input.endTime.toISOString().split(".")[0] + "Z").toString(),
194
+ () => (input[_eT].toISOString().split(".")[0] + "Z").toString(),
300
195
  ],
301
- period: [, __expectNonNull(input.period, `period`)],
302
- orderBy: [, input.orderBy],
303
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
304
- nextToken: [, input.nextToken],
196
+ [_p]: [, __expectNonNull(input[_p], `period`)],
197
+ [_oB]: [, input[_oB]],
198
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
199
+ [_nT]: [, input[_nT]],
305
200
  });
306
201
  let body;
307
- return new __HttpRequest({
308
- protocol,
309
- hostname,
310
- port,
311
- method: "GET",
312
- headers,
313
- path: resolvedPath,
314
- query,
315
- body,
316
- });
202
+ b.m("GET").h(headers).q(query).b(body);
203
+ return b.build();
317
204
  };
318
205
  export const se_ListProfilingGroupsCommand = async (input, context) => {
319
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
206
+ const b = rb(input, context);
320
207
  const headers = {};
321
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/profilingGroups";
208
+ b.bp("/profilingGroups");
322
209
  const query = map({
323
- nextToken: [, input.nextToken],
324
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
325
- includeDescription: [() => input.includeDescription !== void 0, () => input.includeDescription.toString()],
210
+ [_nT]: [, input[_nT]],
211
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
212
+ [_iD]: [() => input.includeDescription !== void 0, () => input[_iD].toString()],
326
213
  });
327
214
  let body;
328
- return new __HttpRequest({
329
- protocol,
330
- hostname,
331
- port,
332
- method: "GET",
333
- headers,
334
- path: resolvedPath,
335
- query,
336
- body,
337
- });
215
+ b.m("GET").h(headers).q(query).b(body);
216
+ return b.build();
338
217
  };
339
218
  export const se_ListTagsForResourceCommand = async (input, context) => {
340
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
219
+ const b = rb(input, context);
341
220
  const headers = {};
342
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
343
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
221
+ b.bp("/tags/{resourceArn}");
222
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
344
223
  let body;
345
- return new __HttpRequest({
346
- protocol,
347
- hostname,
348
- port,
349
- method: "GET",
350
- headers,
351
- path: resolvedPath,
352
- body,
353
- });
224
+ b.m("GET").h(headers).b(body);
225
+ return b.build();
354
226
  };
355
227
  export const se_PostAgentProfileCommand = async (input, context) => {
356
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
228
+ const b = rb(input, context);
357
229
  const headers = map({}, isSerializableHeaderValue, {
358
- "content-type": input.contentType || "application/octet-stream",
230
+ [_ct]: input[_cTo] || "application/octet-stream",
359
231
  });
360
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
361
- "/profilingGroups/{profilingGroupName}/agentProfile";
362
- resolvedPath = __resolvedPath(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
232
+ b.bp("/profilingGroups/{profilingGroupName}/agentProfile");
233
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
363
234
  const query = map({
364
- profileToken: [, input.profileToken ?? generateIdempotencyToken()],
235
+ [_pT]: [, input[_pT] ?? generateIdempotencyToken()],
365
236
  });
366
237
  let body;
367
238
  if (input.agentProfile !== undefined) {
368
239
  body = input.agentProfile;
369
240
  }
370
- return new __HttpRequest({
371
- protocol,
372
- hostname,
373
- port,
374
- method: "POST",
375
- headers,
376
- path: resolvedPath,
377
- query,
378
- body,
379
- });
241
+ b.m("POST").h(headers).q(query).b(body);
242
+ return b.build();
380
243
  };
381
244
  export const se_PutPermissionCommand = async (input, context) => {
382
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
245
+ const b = rb(input, context);
383
246
  const headers = {
384
247
  "content-type": "application/json",
385
248
  };
386
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
387
- "/profilingGroups/{profilingGroupName}/policy/{actionGroup}";
388
- resolvedPath = __resolvedPath(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
389
- resolvedPath = __resolvedPath(resolvedPath, input, "actionGroup", () => input.actionGroup, "{actionGroup}", false);
249
+ b.bp("/profilingGroups/{profilingGroupName}/policy/{actionGroup}");
250
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
251
+ b.p("actionGroup", () => input.actionGroup, "{actionGroup}", false);
390
252
  let body;
391
253
  body = JSON.stringify(take(input, {
392
254
  principals: (_) => _json(_),
393
255
  revisionId: [],
394
256
  }));
395
- return new __HttpRequest({
396
- protocol,
397
- hostname,
398
- port,
399
- method: "PUT",
400
- headers,
401
- path: resolvedPath,
402
- body,
403
- });
257
+ b.m("PUT").h(headers).b(body);
258
+ return b.build();
404
259
  };
405
260
  export const se_RemoveNotificationChannelCommand = async (input, context) => {
406
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
261
+ const b = rb(input, context);
407
262
  const headers = {};
408
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
409
- "/profilingGroups/{profilingGroupName}/notificationConfiguration/{channelId}";
410
- resolvedPath = __resolvedPath(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
411
- resolvedPath = __resolvedPath(resolvedPath, input, "channelId", () => input.channelId, "{channelId}", false);
263
+ b.bp("/profilingGroups/{profilingGroupName}/notificationConfiguration/{channelId}");
264
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
265
+ b.p("channelId", () => input.channelId, "{channelId}", false);
412
266
  let body;
413
- return new __HttpRequest({
414
- protocol,
415
- hostname,
416
- port,
417
- method: "DELETE",
418
- headers,
419
- path: resolvedPath,
420
- body,
421
- });
267
+ b.m("DELETE").h(headers).b(body);
268
+ return b.build();
422
269
  };
423
270
  export const se_RemovePermissionCommand = async (input, context) => {
424
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
271
+ const b = rb(input, context);
425
272
  const headers = {};
426
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
427
- "/profilingGroups/{profilingGroupName}/policy/{actionGroup}";
428
- resolvedPath = __resolvedPath(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
429
- resolvedPath = __resolvedPath(resolvedPath, input, "actionGroup", () => input.actionGroup, "{actionGroup}", false);
273
+ b.bp("/profilingGroups/{profilingGroupName}/policy/{actionGroup}");
274
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
275
+ b.p("actionGroup", () => input.actionGroup, "{actionGroup}", false);
430
276
  const query = map({
431
- revisionId: [, __expectNonNull(input.revisionId, `revisionId`)],
277
+ [_rI]: [, __expectNonNull(input[_rI], `revisionId`)],
432
278
  });
433
279
  let body;
434
- return new __HttpRequest({
435
- protocol,
436
- hostname,
437
- port,
438
- method: "DELETE",
439
- headers,
440
- path: resolvedPath,
441
- query,
442
- body,
443
- });
280
+ b.m("DELETE").h(headers).q(query).b(body);
281
+ return b.build();
444
282
  };
445
283
  export const se_SubmitFeedbackCommand = async (input, context) => {
446
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
284
+ const b = rb(input, context);
447
285
  const headers = {
448
286
  "content-type": "application/json",
449
287
  };
450
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
451
- "/internal/profilingGroups/{profilingGroupName}/anomalies/{anomalyInstanceId}/feedback";
452
- resolvedPath = __resolvedPath(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
453
- resolvedPath = __resolvedPath(resolvedPath, input, "anomalyInstanceId", () => input.anomalyInstanceId, "{anomalyInstanceId}", false);
288
+ b.bp("/internal/profilingGroups/{profilingGroupName}/anomalies/{anomalyInstanceId}/feedback");
289
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
290
+ b.p("anomalyInstanceId", () => input.anomalyInstanceId, "{anomalyInstanceId}", false);
454
291
  let body;
455
292
  body = JSON.stringify(take(input, {
456
293
  comment: [],
457
294
  type: [],
458
295
  }));
459
- return new __HttpRequest({
460
- protocol,
461
- hostname,
462
- port,
463
- method: "POST",
464
- headers,
465
- path: resolvedPath,
466
- body,
467
- });
296
+ b.m("POST").h(headers).b(body);
297
+ return b.build();
468
298
  };
469
299
  export const se_TagResourceCommand = async (input, context) => {
470
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
300
+ const b = rb(input, context);
471
301
  const headers = {
472
302
  "content-type": "application/json",
473
303
  };
474
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
475
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
304
+ b.bp("/tags/{resourceArn}");
305
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
476
306
  let body;
477
307
  body = JSON.stringify(take(input, {
478
308
  tags: (_) => _json(_),
479
309
  }));
480
- return new __HttpRequest({
481
- protocol,
482
- hostname,
483
- port,
484
- method: "POST",
485
- headers,
486
- path: resolvedPath,
487
- body,
488
- });
310
+ b.m("POST").h(headers).b(body);
311
+ return b.build();
489
312
  };
490
313
  export const se_UntagResourceCommand = async (input, context) => {
491
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
314
+ const b = rb(input, context);
492
315
  const headers = {};
493
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
494
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
316
+ b.bp("/tags/{resourceArn}");
317
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
495
318
  const query = map({
496
- tagKeys: [
319
+ [_tK]: [
497
320
  __expectNonNull(input.tagKeys, `tagKeys`) != null,
498
- () => (input.tagKeys || []).map((_entry) => _entry),
321
+ () => (input[_tK] || []).map((_entry) => _entry),
499
322
  ],
500
323
  });
501
324
  let body;
502
- return new __HttpRequest({
503
- protocol,
504
- hostname,
505
- port,
506
- method: "DELETE",
507
- headers,
508
- path: resolvedPath,
509
- query,
510
- body,
511
- });
325
+ b.m("DELETE").h(headers).q(query).b(body);
326
+ return b.build();
512
327
  };
513
328
  export const se_UpdateProfilingGroupCommand = async (input, context) => {
514
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
329
+ const b = rb(input, context);
515
330
  const headers = {
516
331
  "content-type": "application/json",
517
332
  };
518
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/profilingGroups/{profilingGroupName}";
519
- resolvedPath = __resolvedPath(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
333
+ b.bp("/profilingGroups/{profilingGroupName}");
334
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
520
335
  let body;
521
336
  body = JSON.stringify(take(input, {
522
337
  agentOrchestrationConfig: (_) => _json(_),
523
338
  }));
524
- return new __HttpRequest({
525
- protocol,
526
- hostname,
527
- port,
528
- method: "PUT",
529
- headers,
530
- path: resolvedPath,
531
- body,
532
- });
339
+ b.m("PUT").h(headers).b(body);
340
+ return b.build();
533
341
  };
534
342
  export const de_AddNotificationChannelsCommand = async (output, context) => {
535
343
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -915,8 +723,8 @@ export const de_GetProfileCommand = async (output, context) => {
915
723
  }
916
724
  const contents = map({
917
725
  $metadata: deserializeMetadata(output),
918
- contentType: [, output.headers["content-type"]],
919
- contentEncoding: [, output.headers["content-encoding"]],
726
+ [_cTo]: [, output.headers[_ct]],
727
+ [_cE]: [, output.headers[_ce]],
920
728
  });
921
729
  const data = await collectBody(output.body, context);
922
730
  contents.profile = data;
@@ -1754,6 +1562,26 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1754
1562
  value !== "" &&
1755
1563
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1756
1564
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1565
+ const _a = "accept";
1566
+ const _cE = "contentEncoding";
1567
+ const _cT = "clientToken";
1568
+ const _cTo = "contentType";
1569
+ const _ce = "content-encoding";
1570
+ const _ct = "content-type";
1571
+ const _dRO = "dailyReportsOnly";
1572
+ const _eT = "endTime";
1573
+ const _iD = "includeDescription";
1574
+ const _l = "locale";
1575
+ const _mD = "maxDepth";
1576
+ const _mR = "maxResults";
1577
+ const _nT = "nextToken";
1578
+ const _oB = "orderBy";
1579
+ const _p = "period";
1580
+ const _pT = "profileToken";
1581
+ const _rI = "revisionId";
1582
+ const _sT = "startTime";
1583
+ const _tK = "tagKeys";
1584
+ const _tR = "targetResolution";
1757
1585
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1758
1586
  if (encoded.length) {
1759
1587
  return JSON.parse(encoded);