@aws-sdk/client-codeguruprofiler 3.476.0 → 3.478.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,99 +1,71 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UpdateProfilingGroupCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_SubmitFeedbackCommand = exports.de_RemovePermissionCommand = exports.de_RemoveNotificationChannelCommand = exports.de_PutPermissionCommand = exports.de_PostAgentProfileCommand = exports.de_ListTagsForResourceCommand = exports.de_ListProfilingGroupsCommand = exports.de_ListProfileTimesCommand = exports.de_ListFindingsReportsCommand = exports.de_GetRecommendationsCommand = exports.de_GetProfileCommand = exports.de_GetPolicyCommand = exports.de_GetNotificationConfigurationCommand = exports.de_GetFindingsReportAccountSummaryCommand = exports.de_DescribeProfilingGroupCommand = exports.de_DeleteProfilingGroupCommand = exports.de_CreateProfilingGroupCommand = exports.de_ConfigureAgentCommand = exports.de_BatchGetFrameMetricDataCommand = exports.de_AddNotificationChannelsCommand = exports.se_UpdateProfilingGroupCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_SubmitFeedbackCommand = exports.se_RemovePermissionCommand = exports.se_RemoveNotificationChannelCommand = exports.se_PutPermissionCommand = exports.se_PostAgentProfileCommand = exports.se_ListTagsForResourceCommand = exports.se_ListProfilingGroupsCommand = exports.se_ListProfileTimesCommand = exports.se_ListFindingsReportsCommand = exports.se_GetRecommendationsCommand = exports.se_GetProfileCommand = exports.se_GetPolicyCommand = exports.se_GetNotificationConfigurationCommand = exports.se_GetFindingsReportAccountSummaryCommand = exports.se_DescribeProfilingGroupCommand = exports.se_DeleteProfilingGroupCommand = exports.se_CreateProfilingGroupCommand = exports.se_ConfigureAgentCommand = exports.se_BatchGetFrameMetricDataCommand = exports.se_AddNotificationChannelsCommand = 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 CodeGuruProfilerServiceException_1 = require("../models/CodeGuruProfilerServiceException");
8
8
  const models_0_1 = require("../models/models_0");
9
9
  const se_AddNotificationChannelsCommand = 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
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
15
- "/profilingGroups/{profilingGroupName}/notificationConfiguration";
16
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
14
+ b.bp("/profilingGroups/{profilingGroupName}/notificationConfiguration");
15
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
17
16
  let body;
18
17
  body = JSON.stringify((0, smithy_client_1.take)(input, {
19
18
  channels: (_) => (0, smithy_client_1._json)(_),
20
19
  }));
21
- return new protocol_http_1.HttpRequest({
22
- protocol,
23
- hostname,
24
- port,
25
- method: "POST",
26
- headers,
27
- path: resolvedPath,
28
- body,
29
- });
20
+ b.m("POST").h(headers).b(body);
21
+ return b.build();
30
22
  };
31
23
  exports.se_AddNotificationChannelsCommand = se_AddNotificationChannelsCommand;
32
24
  const se_BatchGetFrameMetricDataCommand = async (input, context) => {
33
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
25
+ const b = (0, core_1.requestBuilder)(input, context);
34
26
  const headers = {
35
27
  "content-type": "application/json",
36
28
  };
37
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
38
- "/profilingGroups/{profilingGroupName}/frames/-/metrics";
39
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
29
+ b.bp("/profilingGroups/{profilingGroupName}/frames/-/metrics");
30
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
40
31
  const query = (0, smithy_client_1.map)({
41
- startTime: [
42
- () => input.startTime !== void 0,
43
- () => (input.startTime.toISOString().split(".")[0] + "Z").toString(),
44
- ],
45
- endTime: [() => input.endTime !== void 0, () => (input.endTime.toISOString().split(".")[0] + "Z").toString()],
46
- period: [, input.period],
47
- targetResolution: [, input.targetResolution],
32
+ [_sT]: [() => input.startTime !== void 0, () => (input[_sT].toISOString().split(".")[0] + "Z").toString()],
33
+ [_eT]: [() => input.endTime !== void 0, () => (input[_eT].toISOString().split(".")[0] + "Z").toString()],
34
+ [_p]: [, input[_p]],
35
+ [_tR]: [, input[_tR]],
48
36
  });
49
37
  let body;
50
38
  body = JSON.stringify((0, smithy_client_1.take)(input, {
51
39
  frameMetrics: (_) => (0, smithy_client_1._json)(_),
52
40
  }));
53
- return new protocol_http_1.HttpRequest({
54
- protocol,
55
- hostname,
56
- port,
57
- method: "POST",
58
- headers,
59
- path: resolvedPath,
60
- query,
61
- body,
62
- });
41
+ b.m("POST").h(headers).q(query).b(body);
42
+ return b.build();
63
43
  };
64
44
  exports.se_BatchGetFrameMetricDataCommand = se_BatchGetFrameMetricDataCommand;
65
45
  const se_ConfigureAgentCommand = async (input, context) => {
66
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
46
+ const b = (0, core_1.requestBuilder)(input, context);
67
47
  const headers = {
68
48
  "content-type": "application/json",
69
49
  };
70
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
71
- "/profilingGroups/{profilingGroupName}/configureAgent";
72
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
50
+ b.bp("/profilingGroups/{profilingGroupName}/configureAgent");
51
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
73
52
  let body;
74
53
  body = JSON.stringify((0, smithy_client_1.take)(input, {
75
54
  fleetInstanceId: [],
76
55
  metadata: (_) => (0, smithy_client_1._json)(_),
77
56
  }));
78
- return new protocol_http_1.HttpRequest({
79
- protocol,
80
- hostname,
81
- port,
82
- method: "POST",
83
- headers,
84
- path: resolvedPath,
85
- body,
86
- });
57
+ b.m("POST").h(headers).b(body);
58
+ return b.build();
87
59
  };
88
60
  exports.se_ConfigureAgentCommand = se_ConfigureAgentCommand;
89
61
  const se_CreateProfilingGroupCommand = async (input, context) => {
90
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
62
+ const b = (0, core_1.requestBuilder)(input, context);
91
63
  const headers = {
92
64
  "content-type": "application/json",
93
65
  };
94
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/profilingGroups";
66
+ b.bp("/profilingGroups");
95
67
  const query = (0, smithy_client_1.map)({
96
- clientToken: [, (0, smithy_client_1.expectNonNull)(input.clientToken, `clientToken`)],
68
+ [_cT]: [, (0, smithy_client_1.expectNonNull)(input[_cT], `clientToken`)],
97
69
  });
98
70
  let body;
99
71
  body = JSON.stringify((0, smithy_client_1.take)(input, {
@@ -102,459 +74,295 @@ const se_CreateProfilingGroupCommand = async (input, context) => {
102
74
  profilingGroupName: [],
103
75
  tags: (_) => (0, smithy_client_1._json)(_),
104
76
  }));
105
- return new protocol_http_1.HttpRequest({
106
- protocol,
107
- hostname,
108
- port,
109
- method: "POST",
110
- headers,
111
- path: resolvedPath,
112
- query,
113
- body,
114
- });
77
+ b.m("POST").h(headers).q(query).b(body);
78
+ return b.build();
115
79
  };
116
80
  exports.se_CreateProfilingGroupCommand = se_CreateProfilingGroupCommand;
117
81
  const se_DeleteProfilingGroupCommand = async (input, context) => {
118
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
82
+ const b = (0, core_1.requestBuilder)(input, context);
119
83
  const headers = {};
120
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/profilingGroups/{profilingGroupName}";
121
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
84
+ b.bp("/profilingGroups/{profilingGroupName}");
85
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
122
86
  let body;
123
- return new protocol_http_1.HttpRequest({
124
- protocol,
125
- hostname,
126
- port,
127
- method: "DELETE",
128
- headers,
129
- path: resolvedPath,
130
- body,
131
- });
87
+ b.m("DELETE").h(headers).b(body);
88
+ return b.build();
132
89
  };
133
90
  exports.se_DeleteProfilingGroupCommand = se_DeleteProfilingGroupCommand;
134
91
  const se_DescribeProfilingGroupCommand = async (input, context) => {
135
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
92
+ const b = (0, core_1.requestBuilder)(input, context);
136
93
  const headers = {};
137
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/profilingGroups/{profilingGroupName}";
138
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
94
+ b.bp("/profilingGroups/{profilingGroupName}");
95
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
139
96
  let body;
140
- return new protocol_http_1.HttpRequest({
141
- protocol,
142
- hostname,
143
- port,
144
- method: "GET",
145
- headers,
146
- path: resolvedPath,
147
- body,
148
- });
97
+ b.m("GET").h(headers).b(body);
98
+ return b.build();
149
99
  };
150
100
  exports.se_DescribeProfilingGroupCommand = se_DescribeProfilingGroupCommand;
151
101
  const se_GetFindingsReportAccountSummaryCommand = async (input, context) => {
152
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
102
+ const b = (0, core_1.requestBuilder)(input, context);
153
103
  const headers = {};
154
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/internal/findingsReports";
104
+ b.bp("/internal/findingsReports");
155
105
  const query = (0, smithy_client_1.map)({
156
- nextToken: [, input.nextToken],
157
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
158
- dailyReportsOnly: [() => input.dailyReportsOnly !== void 0, () => input.dailyReportsOnly.toString()],
106
+ [_nT]: [, input[_nT]],
107
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
108
+ [_dRO]: [() => input.dailyReportsOnly !== void 0, () => input[_dRO].toString()],
159
109
  });
160
110
  let body;
161
- return new protocol_http_1.HttpRequest({
162
- protocol,
163
- hostname,
164
- port,
165
- method: "GET",
166
- headers,
167
- path: resolvedPath,
168
- query,
169
- body,
170
- });
111
+ b.m("GET").h(headers).q(query).b(body);
112
+ return b.build();
171
113
  };
172
114
  exports.se_GetFindingsReportAccountSummaryCommand = se_GetFindingsReportAccountSummaryCommand;
173
115
  const se_GetNotificationConfigurationCommand = async (input, context) => {
174
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
116
+ const b = (0, core_1.requestBuilder)(input, context);
175
117
  const headers = {};
176
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
177
- "/profilingGroups/{profilingGroupName}/notificationConfiguration";
178
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
118
+ b.bp("/profilingGroups/{profilingGroupName}/notificationConfiguration");
119
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
179
120
  let body;
180
- return new protocol_http_1.HttpRequest({
181
- protocol,
182
- hostname,
183
- port,
184
- method: "GET",
185
- headers,
186
- path: resolvedPath,
187
- body,
188
- });
121
+ b.m("GET").h(headers).b(body);
122
+ return b.build();
189
123
  };
190
124
  exports.se_GetNotificationConfigurationCommand = se_GetNotificationConfigurationCommand;
191
125
  const se_GetPolicyCommand = async (input, context) => {
192
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
126
+ const b = (0, core_1.requestBuilder)(input, context);
193
127
  const headers = {};
194
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
195
- "/profilingGroups/{profilingGroupName}/policy";
196
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
128
+ b.bp("/profilingGroups/{profilingGroupName}/policy");
129
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
197
130
  let body;
198
- return new protocol_http_1.HttpRequest({
199
- protocol,
200
- hostname,
201
- port,
202
- method: "GET",
203
- headers,
204
- path: resolvedPath,
205
- body,
206
- });
131
+ b.m("GET").h(headers).b(body);
132
+ return b.build();
207
133
  };
208
134
  exports.se_GetPolicyCommand = se_GetPolicyCommand;
209
135
  const se_GetProfileCommand = async (input, context) => {
210
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
136
+ const b = (0, core_1.requestBuilder)(input, context);
211
137
  const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
212
- accept: input.accept,
138
+ [_a]: input[_a],
213
139
  });
214
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
215
- "/profilingGroups/{profilingGroupName}/profile";
216
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
140
+ b.bp("/profilingGroups/{profilingGroupName}/profile");
141
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
217
142
  const query = (0, smithy_client_1.map)({
218
- startTime: [
219
- () => input.startTime !== void 0,
220
- () => (input.startTime.toISOString().split(".")[0] + "Z").toString(),
221
- ],
222
- period: [, input.period],
223
- endTime: [() => input.endTime !== void 0, () => (input.endTime.toISOString().split(".")[0] + "Z").toString()],
224
- maxDepth: [() => input.maxDepth !== void 0, () => input.maxDepth.toString()],
143
+ [_sT]: [() => input.startTime !== void 0, () => (input[_sT].toISOString().split(".")[0] + "Z").toString()],
144
+ [_p]: [, input[_p]],
145
+ [_eT]: [() => input.endTime !== void 0, () => (input[_eT].toISOString().split(".")[0] + "Z").toString()],
146
+ [_mD]: [() => input.maxDepth !== void 0, () => input[_mD].toString()],
225
147
  });
226
148
  let body;
227
- return new protocol_http_1.HttpRequest({
228
- protocol,
229
- hostname,
230
- port,
231
- method: "GET",
232
- headers,
233
- path: resolvedPath,
234
- query,
235
- body,
236
- });
149
+ b.m("GET").h(headers).q(query).b(body);
150
+ return b.build();
237
151
  };
238
152
  exports.se_GetProfileCommand = se_GetProfileCommand;
239
153
  const se_GetRecommendationsCommand = async (input, context) => {
240
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
154
+ const b = (0, core_1.requestBuilder)(input, context);
241
155
  const headers = {};
242
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
243
- "/internal/profilingGroups/{profilingGroupName}/recommendations";
244
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
156
+ b.bp("/internal/profilingGroups/{profilingGroupName}/recommendations");
157
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
245
158
  const query = (0, smithy_client_1.map)({
246
- startTime: [
159
+ [_sT]: [
247
160
  (0, smithy_client_1.expectNonNull)(input.startTime, `startTime`) != null,
248
- () => (input.startTime.toISOString().split(".")[0] + "Z").toString(),
161
+ () => (input[_sT].toISOString().split(".")[0] + "Z").toString(),
249
162
  ],
250
- endTime: [
163
+ [_eT]: [
251
164
  (0, smithy_client_1.expectNonNull)(input.endTime, `endTime`) != null,
252
- () => (input.endTime.toISOString().split(".")[0] + "Z").toString(),
165
+ () => (input[_eT].toISOString().split(".")[0] + "Z").toString(),
253
166
  ],
254
- locale: [, input.locale],
167
+ [_l]: [, input[_l]],
255
168
  });
256
169
  let body;
257
- return new protocol_http_1.HttpRequest({
258
- protocol,
259
- hostname,
260
- port,
261
- method: "GET",
262
- headers,
263
- path: resolvedPath,
264
- query,
265
- body,
266
- });
170
+ b.m("GET").h(headers).q(query).b(body);
171
+ return b.build();
267
172
  };
268
173
  exports.se_GetRecommendationsCommand = se_GetRecommendationsCommand;
269
174
  const se_ListFindingsReportsCommand = async (input, context) => {
270
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
175
+ const b = (0, core_1.requestBuilder)(input, context);
271
176
  const headers = {};
272
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
273
- "/internal/profilingGroups/{profilingGroupName}/findingsReports";
274
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
177
+ b.bp("/internal/profilingGroups/{profilingGroupName}/findingsReports");
178
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
275
179
  const query = (0, smithy_client_1.map)({
276
- startTime: [
180
+ [_sT]: [
277
181
  (0, smithy_client_1.expectNonNull)(input.startTime, `startTime`) != null,
278
- () => (input.startTime.toISOString().split(".")[0] + "Z").toString(),
182
+ () => (input[_sT].toISOString().split(".")[0] + "Z").toString(),
279
183
  ],
280
- endTime: [
184
+ [_eT]: [
281
185
  (0, smithy_client_1.expectNonNull)(input.endTime, `endTime`) != null,
282
- () => (input.endTime.toISOString().split(".")[0] + "Z").toString(),
186
+ () => (input[_eT].toISOString().split(".")[0] + "Z").toString(),
283
187
  ],
284
- nextToken: [, input.nextToken],
285
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
286
- dailyReportsOnly: [() => input.dailyReportsOnly !== void 0, () => input.dailyReportsOnly.toString()],
188
+ [_nT]: [, input[_nT]],
189
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
190
+ [_dRO]: [() => input.dailyReportsOnly !== void 0, () => input[_dRO].toString()],
287
191
  });
288
192
  let body;
289
- return new protocol_http_1.HttpRequest({
290
- protocol,
291
- hostname,
292
- port,
293
- method: "GET",
294
- headers,
295
- path: resolvedPath,
296
- query,
297
- body,
298
- });
193
+ b.m("GET").h(headers).q(query).b(body);
194
+ return b.build();
299
195
  };
300
196
  exports.se_ListFindingsReportsCommand = se_ListFindingsReportsCommand;
301
197
  const se_ListProfileTimesCommand = async (input, context) => {
302
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
198
+ const b = (0, core_1.requestBuilder)(input, context);
303
199
  const headers = {};
304
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
305
- "/profilingGroups/{profilingGroupName}/profileTimes";
306
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
200
+ b.bp("/profilingGroups/{profilingGroupName}/profileTimes");
201
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
307
202
  const query = (0, smithy_client_1.map)({
308
- startTime: [
203
+ [_sT]: [
309
204
  (0, smithy_client_1.expectNonNull)(input.startTime, `startTime`) != null,
310
- () => (input.startTime.toISOString().split(".")[0] + "Z").toString(),
205
+ () => (input[_sT].toISOString().split(".")[0] + "Z").toString(),
311
206
  ],
312
- endTime: [
207
+ [_eT]: [
313
208
  (0, smithy_client_1.expectNonNull)(input.endTime, `endTime`) != null,
314
- () => (input.endTime.toISOString().split(".")[0] + "Z").toString(),
209
+ () => (input[_eT].toISOString().split(".")[0] + "Z").toString(),
315
210
  ],
316
- period: [, (0, smithy_client_1.expectNonNull)(input.period, `period`)],
317
- orderBy: [, input.orderBy],
318
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
319
- nextToken: [, input.nextToken],
211
+ [_p]: [, (0, smithy_client_1.expectNonNull)(input[_p], `period`)],
212
+ [_oB]: [, input[_oB]],
213
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
214
+ [_nT]: [, input[_nT]],
320
215
  });
321
216
  let body;
322
- return new protocol_http_1.HttpRequest({
323
- protocol,
324
- hostname,
325
- port,
326
- method: "GET",
327
- headers,
328
- path: resolvedPath,
329
- query,
330
- body,
331
- });
217
+ b.m("GET").h(headers).q(query).b(body);
218
+ return b.build();
332
219
  };
333
220
  exports.se_ListProfileTimesCommand = se_ListProfileTimesCommand;
334
221
  const se_ListProfilingGroupsCommand = async (input, context) => {
335
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
222
+ const b = (0, core_1.requestBuilder)(input, context);
336
223
  const headers = {};
337
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/profilingGroups";
224
+ b.bp("/profilingGroups");
338
225
  const query = (0, smithy_client_1.map)({
339
- nextToken: [, input.nextToken],
340
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
341
- includeDescription: [() => input.includeDescription !== void 0, () => input.includeDescription.toString()],
226
+ [_nT]: [, input[_nT]],
227
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
228
+ [_iD]: [() => input.includeDescription !== void 0, () => input[_iD].toString()],
342
229
  });
343
230
  let body;
344
- return new protocol_http_1.HttpRequest({
345
- protocol,
346
- hostname,
347
- port,
348
- method: "GET",
349
- headers,
350
- path: resolvedPath,
351
- query,
352
- body,
353
- });
231
+ b.m("GET").h(headers).q(query).b(body);
232
+ return b.build();
354
233
  };
355
234
  exports.se_ListProfilingGroupsCommand = se_ListProfilingGroupsCommand;
356
235
  const se_ListTagsForResourceCommand = async (input, context) => {
357
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
236
+ const b = (0, core_1.requestBuilder)(input, context);
358
237
  const headers = {};
359
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
360
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
238
+ b.bp("/tags/{resourceArn}");
239
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
361
240
  let body;
362
- return new protocol_http_1.HttpRequest({
363
- protocol,
364
- hostname,
365
- port,
366
- method: "GET",
367
- headers,
368
- path: resolvedPath,
369
- body,
370
- });
241
+ b.m("GET").h(headers).b(body);
242
+ return b.build();
371
243
  };
372
244
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
373
245
  const se_PostAgentProfileCommand = async (input, context) => {
374
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
246
+ const b = (0, core_1.requestBuilder)(input, context);
375
247
  const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
376
- "content-type": input.contentType || "application/octet-stream",
248
+ [_ct]: input[_cTo] || "application/octet-stream",
377
249
  });
378
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
379
- "/profilingGroups/{profilingGroupName}/agentProfile";
380
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
250
+ b.bp("/profilingGroups/{profilingGroupName}/agentProfile");
251
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
381
252
  const query = (0, smithy_client_1.map)({
382
- profileToken: [, input.profileToken ?? (0, uuid_1.v4)()],
253
+ [_pT]: [, input[_pT] ?? (0, uuid_1.v4)()],
383
254
  });
384
255
  let body;
385
256
  if (input.agentProfile !== undefined) {
386
257
  body = input.agentProfile;
387
258
  }
388
- return new protocol_http_1.HttpRequest({
389
- protocol,
390
- hostname,
391
- port,
392
- method: "POST",
393
- headers,
394
- path: resolvedPath,
395
- query,
396
- body,
397
- });
259
+ b.m("POST").h(headers).q(query).b(body);
260
+ return b.build();
398
261
  };
399
262
  exports.se_PostAgentProfileCommand = se_PostAgentProfileCommand;
400
263
  const se_PutPermissionCommand = async (input, context) => {
401
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
264
+ const b = (0, core_1.requestBuilder)(input, context);
402
265
  const headers = {
403
266
  "content-type": "application/json",
404
267
  };
405
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
406
- "/profilingGroups/{profilingGroupName}/policy/{actionGroup}";
407
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
408
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "actionGroup", () => input.actionGroup, "{actionGroup}", false);
268
+ b.bp("/profilingGroups/{profilingGroupName}/policy/{actionGroup}");
269
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
270
+ b.p("actionGroup", () => input.actionGroup, "{actionGroup}", false);
409
271
  let body;
410
272
  body = JSON.stringify((0, smithy_client_1.take)(input, {
411
273
  principals: (_) => (0, smithy_client_1._json)(_),
412
274
  revisionId: [],
413
275
  }));
414
- return new protocol_http_1.HttpRequest({
415
- protocol,
416
- hostname,
417
- port,
418
- method: "PUT",
419
- headers,
420
- path: resolvedPath,
421
- body,
422
- });
276
+ b.m("PUT").h(headers).b(body);
277
+ return b.build();
423
278
  };
424
279
  exports.se_PutPermissionCommand = se_PutPermissionCommand;
425
280
  const se_RemoveNotificationChannelCommand = async (input, context) => {
426
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
281
+ const b = (0, core_1.requestBuilder)(input, context);
427
282
  const headers = {};
428
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
429
- "/profilingGroups/{profilingGroupName}/notificationConfiguration/{channelId}";
430
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
431
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "channelId", () => input.channelId, "{channelId}", false);
283
+ b.bp("/profilingGroups/{profilingGroupName}/notificationConfiguration/{channelId}");
284
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
285
+ b.p("channelId", () => input.channelId, "{channelId}", false);
432
286
  let body;
433
- return new protocol_http_1.HttpRequest({
434
- protocol,
435
- hostname,
436
- port,
437
- method: "DELETE",
438
- headers,
439
- path: resolvedPath,
440
- body,
441
- });
287
+ b.m("DELETE").h(headers).b(body);
288
+ return b.build();
442
289
  };
443
290
  exports.se_RemoveNotificationChannelCommand = se_RemoveNotificationChannelCommand;
444
291
  const se_RemovePermissionCommand = async (input, context) => {
445
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
292
+ const b = (0, core_1.requestBuilder)(input, context);
446
293
  const headers = {};
447
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
448
- "/profilingGroups/{profilingGroupName}/policy/{actionGroup}";
449
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
450
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "actionGroup", () => input.actionGroup, "{actionGroup}", false);
294
+ b.bp("/profilingGroups/{profilingGroupName}/policy/{actionGroup}");
295
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
296
+ b.p("actionGroup", () => input.actionGroup, "{actionGroup}", false);
451
297
  const query = (0, smithy_client_1.map)({
452
- revisionId: [, (0, smithy_client_1.expectNonNull)(input.revisionId, `revisionId`)],
298
+ [_rI]: [, (0, smithy_client_1.expectNonNull)(input[_rI], `revisionId`)],
453
299
  });
454
300
  let body;
455
- return new protocol_http_1.HttpRequest({
456
- protocol,
457
- hostname,
458
- port,
459
- method: "DELETE",
460
- headers,
461
- path: resolvedPath,
462
- query,
463
- body,
464
- });
301
+ b.m("DELETE").h(headers).q(query).b(body);
302
+ return b.build();
465
303
  };
466
304
  exports.se_RemovePermissionCommand = se_RemovePermissionCommand;
467
305
  const se_SubmitFeedbackCommand = async (input, context) => {
468
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
306
+ const b = (0, core_1.requestBuilder)(input, context);
469
307
  const headers = {
470
308
  "content-type": "application/json",
471
309
  };
472
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
473
- "/internal/profilingGroups/{profilingGroupName}/anomalies/{anomalyInstanceId}/feedback";
474
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
475
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "anomalyInstanceId", () => input.anomalyInstanceId, "{anomalyInstanceId}", false);
310
+ b.bp("/internal/profilingGroups/{profilingGroupName}/anomalies/{anomalyInstanceId}/feedback");
311
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
312
+ b.p("anomalyInstanceId", () => input.anomalyInstanceId, "{anomalyInstanceId}", false);
476
313
  let body;
477
314
  body = JSON.stringify((0, smithy_client_1.take)(input, {
478
315
  comment: [],
479
316
  type: [],
480
317
  }));
481
- return new protocol_http_1.HttpRequest({
482
- protocol,
483
- hostname,
484
- port,
485
- method: "POST",
486
- headers,
487
- path: resolvedPath,
488
- body,
489
- });
318
+ b.m("POST").h(headers).b(body);
319
+ return b.build();
490
320
  };
491
321
  exports.se_SubmitFeedbackCommand = se_SubmitFeedbackCommand;
492
322
  const se_TagResourceCommand = async (input, context) => {
493
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
323
+ const b = (0, core_1.requestBuilder)(input, context);
494
324
  const headers = {
495
325
  "content-type": "application/json",
496
326
  };
497
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
498
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
327
+ b.bp("/tags/{resourceArn}");
328
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
499
329
  let body;
500
330
  body = JSON.stringify((0, smithy_client_1.take)(input, {
501
331
  tags: (_) => (0, smithy_client_1._json)(_),
502
332
  }));
503
- return new protocol_http_1.HttpRequest({
504
- protocol,
505
- hostname,
506
- port,
507
- method: "POST",
508
- headers,
509
- path: resolvedPath,
510
- body,
511
- });
333
+ b.m("POST").h(headers).b(body);
334
+ return b.build();
512
335
  };
513
336
  exports.se_TagResourceCommand = se_TagResourceCommand;
514
337
  const se_UntagResourceCommand = async (input, context) => {
515
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
338
+ const b = (0, core_1.requestBuilder)(input, context);
516
339
  const headers = {};
517
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
518
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
340
+ b.bp("/tags/{resourceArn}");
341
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
519
342
  const query = (0, smithy_client_1.map)({
520
- tagKeys: [
343
+ [_tK]: [
521
344
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
522
- () => (input.tagKeys || []).map((_entry) => _entry),
345
+ () => (input[_tK] || []).map((_entry) => _entry),
523
346
  ],
524
347
  });
525
348
  let body;
526
- return new protocol_http_1.HttpRequest({
527
- protocol,
528
- hostname,
529
- port,
530
- method: "DELETE",
531
- headers,
532
- path: resolvedPath,
533
- query,
534
- body,
535
- });
349
+ b.m("DELETE").h(headers).q(query).b(body);
350
+ return b.build();
536
351
  };
537
352
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
538
353
  const se_UpdateProfilingGroupCommand = async (input, context) => {
539
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
354
+ const b = (0, core_1.requestBuilder)(input, context);
540
355
  const headers = {
541
356
  "content-type": "application/json",
542
357
  };
543
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/profilingGroups/{profilingGroupName}";
544
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
358
+ b.bp("/profilingGroups/{profilingGroupName}");
359
+ b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
545
360
  let body;
546
361
  body = JSON.stringify((0, smithy_client_1.take)(input, {
547
362
  agentOrchestrationConfig: (_) => (0, smithy_client_1._json)(_),
548
363
  }));
549
- return new protocol_http_1.HttpRequest({
550
- protocol,
551
- hostname,
552
- port,
553
- method: "PUT",
554
- headers,
555
- path: resolvedPath,
556
- body,
557
- });
364
+ b.m("PUT").h(headers).b(body);
365
+ return b.build();
558
366
  };
559
367
  exports.se_UpdateProfilingGroupCommand = se_UpdateProfilingGroupCommand;
560
368
  const de_AddNotificationChannelsCommand = async (output, context) => {
@@ -950,8 +758,8 @@ const de_GetProfileCommand = async (output, context) => {
950
758
  }
951
759
  const contents = (0, smithy_client_1.map)({
952
760
  $metadata: deserializeMetadata(output),
953
- contentType: [, output.headers["content-type"]],
954
- contentEncoding: [, output.headers["content-encoding"]],
761
+ [_cTo]: [, output.headers[_ct]],
762
+ [_cE]: [, output.headers[_ce]],
955
763
  });
956
764
  const data = await (0, smithy_client_1.collectBody)(output.body, context);
957
765
  contents.profile = data;
@@ -1803,6 +1611,26 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1803
1611
  value !== "" &&
1804
1612
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1805
1613
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1614
+ const _a = "accept";
1615
+ const _cE = "contentEncoding";
1616
+ const _cT = "clientToken";
1617
+ const _cTo = "contentType";
1618
+ const _ce = "content-encoding";
1619
+ const _ct = "content-type";
1620
+ const _dRO = "dailyReportsOnly";
1621
+ const _eT = "endTime";
1622
+ const _iD = "includeDescription";
1623
+ const _l = "locale";
1624
+ const _mD = "maxDepth";
1625
+ const _mR = "maxResults";
1626
+ const _nT = "nextToken";
1627
+ const _oB = "orderBy";
1628
+ const _p = "period";
1629
+ const _pT = "profileToken";
1630
+ const _rI = "revisionId";
1631
+ const _sT = "startTime";
1632
+ const _tK = "tagKeys";
1633
+ const _tR = "targetResolution";
1806
1634
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1807
1635
  if (encoded.length) {
1808
1636
  return JSON.parse(encoded);