@aws-sdk/client-codeguruprofiler 3.927.0 → 3.929.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.
Files changed (44) hide show
  1. package/dist-cjs/index.js +1138 -1110
  2. package/dist-cjs/runtimeConfig.shared.js +2 -0
  3. package/dist-es/CodeGuruProfilerClient.js +2 -0
  4. package/dist-es/commands/AddNotificationChannelsCommand.js +3 -9
  5. package/dist-es/commands/BatchGetFrameMetricDataCommand.js +3 -9
  6. package/dist-es/commands/ConfigureAgentCommand.js +3 -9
  7. package/dist-es/commands/CreateProfilingGroupCommand.js +3 -9
  8. package/dist-es/commands/DeleteProfilingGroupCommand.js +3 -9
  9. package/dist-es/commands/DescribeProfilingGroupCommand.js +3 -9
  10. package/dist-es/commands/GetFindingsReportAccountSummaryCommand.js +3 -9
  11. package/dist-es/commands/GetNotificationConfigurationCommand.js +3 -9
  12. package/dist-es/commands/GetPolicyCommand.js +3 -9
  13. package/dist-es/commands/GetProfileCommand.js +3 -9
  14. package/dist-es/commands/GetRecommendationsCommand.js +3 -9
  15. package/dist-es/commands/ListFindingsReportsCommand.js +3 -9
  16. package/dist-es/commands/ListProfileTimesCommand.js +3 -9
  17. package/dist-es/commands/ListProfilingGroupsCommand.js +3 -9
  18. package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
  19. package/dist-es/commands/PostAgentProfileCommand.js +3 -9
  20. package/dist-es/commands/PutPermissionCommand.js +3 -9
  21. package/dist-es/commands/RemoveNotificationChannelCommand.js +3 -9
  22. package/dist-es/commands/RemovePermissionCommand.js +3 -9
  23. package/dist-es/commands/SubmitFeedbackCommand.js +3 -9
  24. package/dist-es/commands/TagResourceCommand.js +3 -9
  25. package/dist-es/commands/UntagResourceCommand.js +3 -9
  26. package/dist-es/commands/UpdateProfilingGroupCommand.js +3 -9
  27. package/dist-es/runtimeConfig.shared.js +2 -0
  28. package/dist-es/schemas/schemas_0.js +1101 -0
  29. package/dist-types/CodeGuruProfilerClient.d.ts +10 -1
  30. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  31. package/dist-types/runtimeConfig.d.ts +1 -0
  32. package/dist-types/runtimeConfig.native.d.ts +1 -0
  33. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  34. package/dist-types/schemas/schemas_0.d.ts +120 -0
  35. package/dist-types/ts3.4/CodeGuruProfilerClient.d.ts +4 -0
  36. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  37. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  38. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  39. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  40. package/dist-types/ts3.4/schemas/schemas_0.d.ts +126 -0
  41. package/package.json +5 -6
  42. package/dist-es/protocols/Aws_restJson1.js +0 -949
  43. package/dist-types/protocols/Aws_restJson1.d.ts +0 -209
  44. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -281
@@ -1,949 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { requestBuilder as rb } from "@smithy/core";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, isSerializableHeaderValue, limitedParseDouble as __limitedParseDouble, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, serializeDateTime as __serializeDateTime, take, withBaseException, } from "@smithy/smithy-client";
4
- import { v4 as generateIdempotencyToken } from "@smithy/uuid";
5
- import { CodeGuruProfilerServiceException as __BaseException } from "../models/CodeGuruProfilerServiceException";
6
- import { ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
7
- export const se_AddNotificationChannelsCommand = async (input, context) => {
8
- const b = rb(input, context);
9
- const headers = {
10
- "content-type": "application/json",
11
- };
12
- b.bp("/profilingGroups/{profilingGroupName}/notificationConfiguration");
13
- b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
14
- let body;
15
- body = JSON.stringify(take(input, {
16
- channels: (_) => _json(_),
17
- }));
18
- b.m("POST").h(headers).b(body);
19
- return b.build();
20
- };
21
- export const se_BatchGetFrameMetricDataCommand = async (input, context) => {
22
- const b = rb(input, context);
23
- const headers = {
24
- "content-type": "application/json",
25
- };
26
- b.bp("/profilingGroups/{profilingGroupName}/frames/-/metrics");
27
- b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
28
- const query = map({
29
- [_sT]: [() => input.startTime !== void 0, () => __serializeDateTime(input[_sT]).toString()],
30
- [_eT]: [() => input.endTime !== void 0, () => __serializeDateTime(input[_eT]).toString()],
31
- [_p]: [, input[_p]],
32
- [_tR]: [, input[_tR]],
33
- });
34
- let body;
35
- body = JSON.stringify(take(input, {
36
- frameMetrics: (_) => _json(_),
37
- }));
38
- b.m("POST").h(headers).q(query).b(body);
39
- return b.build();
40
- };
41
- export const se_ConfigureAgentCommand = async (input, context) => {
42
- const b = rb(input, context);
43
- const headers = {
44
- "content-type": "application/json",
45
- };
46
- b.bp("/profilingGroups/{profilingGroupName}/configureAgent");
47
- b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
48
- let body;
49
- body = JSON.stringify(take(input, {
50
- fleetInstanceId: [],
51
- metadata: (_) => _json(_),
52
- }));
53
- b.m("POST").h(headers).b(body);
54
- return b.build();
55
- };
56
- export const se_CreateProfilingGroupCommand = async (input, context) => {
57
- const b = rb(input, context);
58
- const headers = {
59
- "content-type": "application/json",
60
- };
61
- b.bp("/profilingGroups");
62
- const query = map({
63
- [_cT]: [, __expectNonNull(input[_cT], `clientToken`)],
64
- });
65
- let body;
66
- body = JSON.stringify(take(input, {
67
- agentOrchestrationConfig: (_) => _json(_),
68
- computePlatform: [],
69
- profilingGroupName: [],
70
- tags: (_) => _json(_),
71
- }));
72
- b.m("POST").h(headers).q(query).b(body);
73
- return b.build();
74
- };
75
- export const se_DeleteProfilingGroupCommand = async (input, context) => {
76
- const b = rb(input, context);
77
- const headers = {};
78
- b.bp("/profilingGroups/{profilingGroupName}");
79
- b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
80
- let body;
81
- b.m("DELETE").h(headers).b(body);
82
- return b.build();
83
- };
84
- export const se_DescribeProfilingGroupCommand = async (input, context) => {
85
- const b = rb(input, context);
86
- const headers = {};
87
- b.bp("/profilingGroups/{profilingGroupName}");
88
- b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
89
- let body;
90
- b.m("GET").h(headers).b(body);
91
- return b.build();
92
- };
93
- export const se_GetFindingsReportAccountSummaryCommand = async (input, context) => {
94
- const b = rb(input, context);
95
- const headers = {};
96
- b.bp("/internal/findingsReports");
97
- const query = map({
98
- [_nT]: [, input[_nT]],
99
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
100
- [_dRO]: [() => input.dailyReportsOnly !== void 0, () => input[_dRO].toString()],
101
- });
102
- let body;
103
- b.m("GET").h(headers).q(query).b(body);
104
- return b.build();
105
- };
106
- export const se_GetNotificationConfigurationCommand = async (input, context) => {
107
- const b = rb(input, context);
108
- const headers = {};
109
- b.bp("/profilingGroups/{profilingGroupName}/notificationConfiguration");
110
- b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
111
- let body;
112
- b.m("GET").h(headers).b(body);
113
- return b.build();
114
- };
115
- export const se_GetPolicyCommand = async (input, context) => {
116
- const b = rb(input, context);
117
- const headers = {};
118
- b.bp("/profilingGroups/{profilingGroupName}/policy");
119
- b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
120
- let body;
121
- b.m("GET").h(headers).b(body);
122
- return b.build();
123
- };
124
- export const se_GetProfileCommand = async (input, context) => {
125
- const b = rb(input, context);
126
- const headers = map({}, isSerializableHeaderValue, {
127
- [_a]: input[_a],
128
- });
129
- b.bp("/profilingGroups/{profilingGroupName}/profile");
130
- b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
131
- const query = map({
132
- [_sT]: [() => input.startTime !== void 0, () => __serializeDateTime(input[_sT]).toString()],
133
- [_p]: [, input[_p]],
134
- [_eT]: [() => input.endTime !== void 0, () => __serializeDateTime(input[_eT]).toString()],
135
- [_mD]: [() => input.maxDepth !== void 0, () => input[_mD].toString()],
136
- });
137
- let body;
138
- b.m("GET").h(headers).q(query).b(body);
139
- return b.build();
140
- };
141
- export const se_GetRecommendationsCommand = async (input, context) => {
142
- const b = rb(input, context);
143
- const headers = {};
144
- b.bp("/internal/profilingGroups/{profilingGroupName}/recommendations");
145
- b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
146
- const query = map({
147
- [_sT]: [__expectNonNull(input.startTime, `startTime`) != null, () => __serializeDateTime(input[_sT]).toString()],
148
- [_eT]: [__expectNonNull(input.endTime, `endTime`) != null, () => __serializeDateTime(input[_eT]).toString()],
149
- [_l]: [, input[_l]],
150
- });
151
- let body;
152
- b.m("GET").h(headers).q(query).b(body);
153
- return b.build();
154
- };
155
- export const se_ListFindingsReportsCommand = async (input, context) => {
156
- const b = rb(input, context);
157
- const headers = {};
158
- b.bp("/internal/profilingGroups/{profilingGroupName}/findingsReports");
159
- b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
160
- const query = map({
161
- [_sT]: [__expectNonNull(input.startTime, `startTime`) != null, () => __serializeDateTime(input[_sT]).toString()],
162
- [_eT]: [__expectNonNull(input.endTime, `endTime`) != null, () => __serializeDateTime(input[_eT]).toString()],
163
- [_nT]: [, input[_nT]],
164
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
165
- [_dRO]: [() => input.dailyReportsOnly !== void 0, () => input[_dRO].toString()],
166
- });
167
- let body;
168
- b.m("GET").h(headers).q(query).b(body);
169
- return b.build();
170
- };
171
- export const se_ListProfileTimesCommand = async (input, context) => {
172
- const b = rb(input, context);
173
- const headers = {};
174
- b.bp("/profilingGroups/{profilingGroupName}/profileTimes");
175
- b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
176
- const query = map({
177
- [_sT]: [__expectNonNull(input.startTime, `startTime`) != null, () => __serializeDateTime(input[_sT]).toString()],
178
- [_eT]: [__expectNonNull(input.endTime, `endTime`) != null, () => __serializeDateTime(input[_eT]).toString()],
179
- [_p]: [, __expectNonNull(input[_p], `period`)],
180
- [_oB]: [, input[_oB]],
181
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
182
- [_nT]: [, input[_nT]],
183
- });
184
- let body;
185
- b.m("GET").h(headers).q(query).b(body);
186
- return b.build();
187
- };
188
- export const se_ListProfilingGroupsCommand = async (input, context) => {
189
- const b = rb(input, context);
190
- const headers = {};
191
- b.bp("/profilingGroups");
192
- const query = map({
193
- [_nT]: [, input[_nT]],
194
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
195
- [_iD]: [() => input.includeDescription !== void 0, () => input[_iD].toString()],
196
- });
197
- let body;
198
- b.m("GET").h(headers).q(query).b(body);
199
- return b.build();
200
- };
201
- export const se_ListTagsForResourceCommand = async (input, context) => {
202
- const b = rb(input, context);
203
- const headers = {};
204
- b.bp("/tags/{resourceArn}");
205
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
206
- let body;
207
- b.m("GET").h(headers).b(body);
208
- return b.build();
209
- };
210
- export const se_PostAgentProfileCommand = async (input, context) => {
211
- const b = rb(input, context);
212
- const headers = map({}, isSerializableHeaderValue, {
213
- [_ct]: input[_cTo] || "application/octet-stream",
214
- });
215
- b.bp("/profilingGroups/{profilingGroupName}/agentProfile");
216
- b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
217
- const query = map({
218
- [_pT]: [, input[_pT] ?? generateIdempotencyToken()],
219
- });
220
- let body;
221
- if (input.agentProfile !== undefined) {
222
- body = input.agentProfile;
223
- }
224
- b.m("POST").h(headers).q(query).b(body);
225
- return b.build();
226
- };
227
- export const se_PutPermissionCommand = async (input, context) => {
228
- const b = rb(input, context);
229
- const headers = {
230
- "content-type": "application/json",
231
- };
232
- b.bp("/profilingGroups/{profilingGroupName}/policy/{actionGroup}");
233
- b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
234
- b.p("actionGroup", () => input.actionGroup, "{actionGroup}", false);
235
- let body;
236
- body = JSON.stringify(take(input, {
237
- principals: (_) => _json(_),
238
- revisionId: [],
239
- }));
240
- b.m("PUT").h(headers).b(body);
241
- return b.build();
242
- };
243
- export const se_RemoveNotificationChannelCommand = async (input, context) => {
244
- const b = rb(input, context);
245
- const headers = {};
246
- b.bp("/profilingGroups/{profilingGroupName}/notificationConfiguration/{channelId}");
247
- b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
248
- b.p("channelId", () => input.channelId, "{channelId}", false);
249
- let body;
250
- b.m("DELETE").h(headers).b(body);
251
- return b.build();
252
- };
253
- export const se_RemovePermissionCommand = async (input, context) => {
254
- const b = rb(input, context);
255
- const headers = {};
256
- b.bp("/profilingGroups/{profilingGroupName}/policy/{actionGroup}");
257
- b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
258
- b.p("actionGroup", () => input.actionGroup, "{actionGroup}", false);
259
- const query = map({
260
- [_rI]: [, __expectNonNull(input[_rI], `revisionId`)],
261
- });
262
- let body;
263
- b.m("DELETE").h(headers).q(query).b(body);
264
- return b.build();
265
- };
266
- export const se_SubmitFeedbackCommand = async (input, context) => {
267
- const b = rb(input, context);
268
- const headers = {
269
- "content-type": "application/json",
270
- };
271
- b.bp("/internal/profilingGroups/{profilingGroupName}/anomalies/{anomalyInstanceId}/feedback");
272
- b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
273
- b.p("anomalyInstanceId", () => input.anomalyInstanceId, "{anomalyInstanceId}", false);
274
- let body;
275
- body = JSON.stringify(take(input, {
276
- comment: [],
277
- type: [],
278
- }));
279
- b.m("POST").h(headers).b(body);
280
- return b.build();
281
- };
282
- export const se_TagResourceCommand = async (input, context) => {
283
- const b = rb(input, context);
284
- const headers = {
285
- "content-type": "application/json",
286
- };
287
- b.bp("/tags/{resourceArn}");
288
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
289
- let body;
290
- body = JSON.stringify(take(input, {
291
- tags: (_) => _json(_),
292
- }));
293
- b.m("POST").h(headers).b(body);
294
- return b.build();
295
- };
296
- export const se_UntagResourceCommand = async (input, context) => {
297
- const b = rb(input, context);
298
- const headers = {};
299
- b.bp("/tags/{resourceArn}");
300
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
301
- const query = map({
302
- [_tK]: [__expectNonNull(input.tagKeys, `tagKeys`) != null, () => input[_tK] || []],
303
- });
304
- let body;
305
- b.m("DELETE").h(headers).q(query).b(body);
306
- return b.build();
307
- };
308
- export const se_UpdateProfilingGroupCommand = async (input, context) => {
309
- const b = rb(input, context);
310
- const headers = {
311
- "content-type": "application/json",
312
- };
313
- b.bp("/profilingGroups/{profilingGroupName}");
314
- b.p("profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
315
- let body;
316
- body = JSON.stringify(take(input, {
317
- agentOrchestrationConfig: (_) => _json(_),
318
- }));
319
- b.m("PUT").h(headers).b(body);
320
- return b.build();
321
- };
322
- export const de_AddNotificationChannelsCommand = async (output, context) => {
323
- if (output.statusCode !== 200 && output.statusCode >= 300) {
324
- return de_CommandError(output, context);
325
- }
326
- const contents = map({
327
- $metadata: deserializeMetadata(output),
328
- });
329
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
330
- const doc = take(data, {
331
- notificationConfiguration: _json,
332
- });
333
- Object.assign(contents, doc);
334
- return contents;
335
- };
336
- export const de_BatchGetFrameMetricDataCommand = async (output, context) => {
337
- if (output.statusCode !== 200 && output.statusCode >= 300) {
338
- return de_CommandError(output, context);
339
- }
340
- const contents = map({
341
- $metadata: deserializeMetadata(output),
342
- });
343
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
344
- const doc = take(data, {
345
- endTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
346
- endTimes: (_) => de_ListOfTimestamps(_, context),
347
- frameMetricData: (_) => de_FrameMetricData(_, context),
348
- resolution: __expectString,
349
- startTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
350
- unprocessedEndTimes: (_) => de_UnprocessedEndTimeMap(_, context),
351
- });
352
- Object.assign(contents, doc);
353
- return contents;
354
- };
355
- export const de_ConfigureAgentCommand = async (output, context) => {
356
- if (output.statusCode !== 200 && output.statusCode >= 300) {
357
- return de_CommandError(output, context);
358
- }
359
- const contents = map({
360
- $metadata: deserializeMetadata(output),
361
- });
362
- const data = __expectObject(await parseBody(output.body, context));
363
- contents.configuration = _json(data);
364
- return contents;
365
- };
366
- export const de_CreateProfilingGroupCommand = async (output, context) => {
367
- if (output.statusCode !== 201 && output.statusCode >= 300) {
368
- return de_CommandError(output, context);
369
- }
370
- const contents = map({
371
- $metadata: deserializeMetadata(output),
372
- });
373
- const data = __expectObject(await parseBody(output.body, context));
374
- contents.profilingGroup = de_ProfilingGroupDescription(data, context);
375
- return contents;
376
- };
377
- export const de_DeleteProfilingGroupCommand = async (output, context) => {
378
- if (output.statusCode !== 204 && output.statusCode >= 300) {
379
- return de_CommandError(output, context);
380
- }
381
- const contents = map({
382
- $metadata: deserializeMetadata(output),
383
- });
384
- await collectBody(output.body, context);
385
- return contents;
386
- };
387
- export const de_DescribeProfilingGroupCommand = async (output, context) => {
388
- if (output.statusCode !== 200 && output.statusCode >= 300) {
389
- return de_CommandError(output, context);
390
- }
391
- const contents = map({
392
- $metadata: deserializeMetadata(output),
393
- });
394
- const data = __expectObject(await parseBody(output.body, context));
395
- contents.profilingGroup = de_ProfilingGroupDescription(data, context);
396
- return contents;
397
- };
398
- export const de_GetFindingsReportAccountSummaryCommand = async (output, context) => {
399
- if (output.statusCode !== 200 && output.statusCode >= 300) {
400
- return de_CommandError(output, context);
401
- }
402
- const contents = map({
403
- $metadata: deserializeMetadata(output),
404
- });
405
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
406
- const doc = take(data, {
407
- nextToken: __expectString,
408
- reportSummaries: (_) => de_FindingsReportSummaries(_, context),
409
- });
410
- Object.assign(contents, doc);
411
- return contents;
412
- };
413
- export const de_GetNotificationConfigurationCommand = async (output, context) => {
414
- if (output.statusCode !== 200 && output.statusCode >= 300) {
415
- return de_CommandError(output, context);
416
- }
417
- const contents = map({
418
- $metadata: deserializeMetadata(output),
419
- });
420
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
421
- const doc = take(data, {
422
- notificationConfiguration: _json,
423
- });
424
- Object.assign(contents, doc);
425
- return contents;
426
- };
427
- export const de_GetPolicyCommand = async (output, context) => {
428
- if (output.statusCode !== 200 && output.statusCode >= 300) {
429
- return de_CommandError(output, context);
430
- }
431
- const contents = map({
432
- $metadata: deserializeMetadata(output),
433
- });
434
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
435
- const doc = take(data, {
436
- policy: __expectString,
437
- revisionId: __expectString,
438
- });
439
- Object.assign(contents, doc);
440
- return contents;
441
- };
442
- export const de_GetProfileCommand = async (output, context) => {
443
- if (output.statusCode !== 200 && output.statusCode >= 300) {
444
- return de_CommandError(output, context);
445
- }
446
- const contents = map({
447
- $metadata: deserializeMetadata(output),
448
- [_cTo]: [, output.headers[_ct]],
449
- [_cE]: [, output.headers[_ce]],
450
- });
451
- const data = await collectBody(output.body, context);
452
- contents.profile = data;
453
- return contents;
454
- };
455
- export const de_GetRecommendationsCommand = async (output, context) => {
456
- if (output.statusCode !== 200 && output.statusCode >= 300) {
457
- return de_CommandError(output, context);
458
- }
459
- const contents = map({
460
- $metadata: deserializeMetadata(output),
461
- });
462
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
463
- const doc = take(data, {
464
- anomalies: (_) => de_Anomalies(_, context),
465
- profileEndTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
466
- profileStartTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
467
- profilingGroupName: __expectString,
468
- recommendations: (_) => de_Recommendations(_, context),
469
- });
470
- Object.assign(contents, doc);
471
- return contents;
472
- };
473
- export const de_ListFindingsReportsCommand = async (output, context) => {
474
- if (output.statusCode !== 200 && output.statusCode >= 300) {
475
- return de_CommandError(output, context);
476
- }
477
- const contents = map({
478
- $metadata: deserializeMetadata(output),
479
- });
480
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
481
- const doc = take(data, {
482
- findingsReportSummaries: (_) => de_FindingsReportSummaries(_, context),
483
- nextToken: __expectString,
484
- });
485
- Object.assign(contents, doc);
486
- return contents;
487
- };
488
- export const de_ListProfileTimesCommand = async (output, context) => {
489
- if (output.statusCode !== 200 && output.statusCode >= 300) {
490
- return de_CommandError(output, context);
491
- }
492
- const contents = map({
493
- $metadata: deserializeMetadata(output),
494
- });
495
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
496
- const doc = take(data, {
497
- nextToken: __expectString,
498
- profileTimes: (_) => de_ProfileTimes(_, context),
499
- });
500
- Object.assign(contents, doc);
501
- return contents;
502
- };
503
- export const de_ListProfilingGroupsCommand = async (output, context) => {
504
- if (output.statusCode !== 200 && output.statusCode >= 300) {
505
- return de_CommandError(output, context);
506
- }
507
- const contents = map({
508
- $metadata: deserializeMetadata(output),
509
- });
510
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
511
- const doc = take(data, {
512
- nextToken: __expectString,
513
- profilingGroupNames: _json,
514
- profilingGroups: (_) => de_ProfilingGroupDescriptions(_, context),
515
- });
516
- Object.assign(contents, doc);
517
- return contents;
518
- };
519
- export const de_ListTagsForResourceCommand = async (output, context) => {
520
- if (output.statusCode !== 200 && output.statusCode >= 300) {
521
- return de_CommandError(output, context);
522
- }
523
- const contents = map({
524
- $metadata: deserializeMetadata(output),
525
- });
526
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
527
- const doc = take(data, {
528
- tags: _json,
529
- });
530
- Object.assign(contents, doc);
531
- return contents;
532
- };
533
- export const de_PostAgentProfileCommand = async (output, context) => {
534
- if (output.statusCode !== 204 && output.statusCode >= 300) {
535
- return de_CommandError(output, context);
536
- }
537
- const contents = map({
538
- $metadata: deserializeMetadata(output),
539
- });
540
- await collectBody(output.body, context);
541
- return contents;
542
- };
543
- export const de_PutPermissionCommand = async (output, context) => {
544
- if (output.statusCode !== 200 && output.statusCode >= 300) {
545
- return de_CommandError(output, context);
546
- }
547
- const contents = map({
548
- $metadata: deserializeMetadata(output),
549
- });
550
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
551
- const doc = take(data, {
552
- policy: __expectString,
553
- revisionId: __expectString,
554
- });
555
- Object.assign(contents, doc);
556
- return contents;
557
- };
558
- export const de_RemoveNotificationChannelCommand = async (output, context) => {
559
- if (output.statusCode !== 200 && output.statusCode >= 300) {
560
- return de_CommandError(output, context);
561
- }
562
- const contents = map({
563
- $metadata: deserializeMetadata(output),
564
- });
565
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
566
- const doc = take(data, {
567
- notificationConfiguration: _json,
568
- });
569
- Object.assign(contents, doc);
570
- return contents;
571
- };
572
- export const de_RemovePermissionCommand = async (output, context) => {
573
- if (output.statusCode !== 200 && output.statusCode >= 300) {
574
- return de_CommandError(output, context);
575
- }
576
- const contents = map({
577
- $metadata: deserializeMetadata(output),
578
- });
579
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
580
- const doc = take(data, {
581
- policy: __expectString,
582
- revisionId: __expectString,
583
- });
584
- Object.assign(contents, doc);
585
- return contents;
586
- };
587
- export const de_SubmitFeedbackCommand = async (output, context) => {
588
- if (output.statusCode !== 204 && output.statusCode >= 300) {
589
- return de_CommandError(output, context);
590
- }
591
- const contents = map({
592
- $metadata: deserializeMetadata(output),
593
- });
594
- await collectBody(output.body, context);
595
- return contents;
596
- };
597
- export const de_TagResourceCommand = async (output, context) => {
598
- if (output.statusCode !== 204 && output.statusCode >= 300) {
599
- return de_CommandError(output, context);
600
- }
601
- const contents = map({
602
- $metadata: deserializeMetadata(output),
603
- });
604
- await collectBody(output.body, context);
605
- return contents;
606
- };
607
- export const de_UntagResourceCommand = async (output, context) => {
608
- if (output.statusCode !== 204 && output.statusCode >= 300) {
609
- return de_CommandError(output, context);
610
- }
611
- const contents = map({
612
- $metadata: deserializeMetadata(output),
613
- });
614
- await collectBody(output.body, context);
615
- return contents;
616
- };
617
- export const de_UpdateProfilingGroupCommand = async (output, context) => {
618
- if (output.statusCode !== 200 && output.statusCode >= 300) {
619
- return de_CommandError(output, context);
620
- }
621
- const contents = map({
622
- $metadata: deserializeMetadata(output),
623
- });
624
- const data = __expectObject(await parseBody(output.body, context));
625
- contents.profilingGroup = de_ProfilingGroupDescription(data, context);
626
- return contents;
627
- };
628
- const de_CommandError = async (output, context) => {
629
- const parsedOutput = {
630
- ...output,
631
- body: await parseErrorBody(output.body, context),
632
- };
633
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
634
- switch (errorCode) {
635
- case "ConflictException":
636
- case "com.amazonaws.codeguruprofiler#ConflictException":
637
- throw await de_ConflictExceptionRes(parsedOutput, context);
638
- case "InternalServerException":
639
- case "com.amazonaws.codeguruprofiler#InternalServerException":
640
- throw await de_InternalServerExceptionRes(parsedOutput, context);
641
- case "ResourceNotFoundException":
642
- case "com.amazonaws.codeguruprofiler#ResourceNotFoundException":
643
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
644
- case "ServiceQuotaExceededException":
645
- case "com.amazonaws.codeguruprofiler#ServiceQuotaExceededException":
646
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
647
- case "ThrottlingException":
648
- case "com.amazonaws.codeguruprofiler#ThrottlingException":
649
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
650
- case "ValidationException":
651
- case "com.amazonaws.codeguruprofiler#ValidationException":
652
- throw await de_ValidationExceptionRes(parsedOutput, context);
653
- default:
654
- const parsedBody = parsedOutput.body;
655
- return throwDefaultError({
656
- output,
657
- parsedBody,
658
- errorCode,
659
- });
660
- }
661
- };
662
- const throwDefaultError = withBaseException(__BaseException);
663
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
664
- const contents = map({});
665
- const data = parsedOutput.body;
666
- const doc = take(data, {
667
- message: __expectString,
668
- });
669
- Object.assign(contents, doc);
670
- const exception = new ConflictException({
671
- $metadata: deserializeMetadata(parsedOutput),
672
- ...contents,
673
- });
674
- return __decorateServiceException(exception, parsedOutput.body);
675
- };
676
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
677
- const contents = map({});
678
- const data = parsedOutput.body;
679
- const doc = take(data, {
680
- message: __expectString,
681
- });
682
- Object.assign(contents, doc);
683
- const exception = new InternalServerException({
684
- $metadata: deserializeMetadata(parsedOutput),
685
- ...contents,
686
- });
687
- return __decorateServiceException(exception, parsedOutput.body);
688
- };
689
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
690
- const contents = map({});
691
- const data = parsedOutput.body;
692
- const doc = take(data, {
693
- message: __expectString,
694
- });
695
- Object.assign(contents, doc);
696
- const exception = new ResourceNotFoundException({
697
- $metadata: deserializeMetadata(parsedOutput),
698
- ...contents,
699
- });
700
- return __decorateServiceException(exception, parsedOutput.body);
701
- };
702
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
703
- const contents = map({});
704
- const data = parsedOutput.body;
705
- const doc = take(data, {
706
- message: __expectString,
707
- });
708
- Object.assign(contents, doc);
709
- const exception = new ServiceQuotaExceededException({
710
- $metadata: deserializeMetadata(parsedOutput),
711
- ...contents,
712
- });
713
- return __decorateServiceException(exception, parsedOutput.body);
714
- };
715
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
716
- const contents = map({});
717
- const data = parsedOutput.body;
718
- const doc = take(data, {
719
- message: __expectString,
720
- });
721
- Object.assign(contents, doc);
722
- const exception = new ThrottlingException({
723
- $metadata: deserializeMetadata(parsedOutput),
724
- ...contents,
725
- });
726
- return __decorateServiceException(exception, parsedOutput.body);
727
- };
728
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
729
- const contents = map({});
730
- const data = parsedOutput.body;
731
- const doc = take(data, {
732
- message: __expectString,
733
- });
734
- Object.assign(contents, doc);
735
- const exception = new ValidationException({
736
- $metadata: deserializeMetadata(parsedOutput),
737
- ...contents,
738
- });
739
- return __decorateServiceException(exception, parsedOutput.body);
740
- };
741
- const de_AggregatedProfileTime = (output, context) => {
742
- return take(output, {
743
- period: __expectString,
744
- start: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
745
- });
746
- };
747
- const de_Anomalies = (output, context) => {
748
- const retVal = (output || [])
749
- .filter((e) => e != null)
750
- .map((entry) => {
751
- return de_Anomaly(entry, context);
752
- });
753
- return retVal;
754
- };
755
- const de_Anomaly = (output, context) => {
756
- return take(output, {
757
- instances: (_) => de_AnomalyInstances(_, context),
758
- metric: _json,
759
- reason: __expectString,
760
- });
761
- };
762
- const de_AnomalyInstance = (output, context) => {
763
- return take(output, {
764
- endTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
765
- id: __expectString,
766
- startTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
767
- userFeedback: _json,
768
- });
769
- };
770
- const de_AnomalyInstances = (output, context) => {
771
- const retVal = (output || [])
772
- .filter((e) => e != null)
773
- .map((entry) => {
774
- return de_AnomalyInstance(entry, context);
775
- });
776
- return retVal;
777
- };
778
- const de_FindingsReportSummaries = (output, context) => {
779
- const retVal = (output || [])
780
- .filter((e) => e != null)
781
- .map((entry) => {
782
- return de_FindingsReportSummary(entry, context);
783
- });
784
- return retVal;
785
- };
786
- const de_FindingsReportSummary = (output, context) => {
787
- return take(output, {
788
- id: __expectString,
789
- profileEndTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
790
- profileStartTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
791
- profilingGroupName: __expectString,
792
- totalNumberOfFindings: __expectInt32,
793
- });
794
- };
795
- const de_FrameMetricData = (output, context) => {
796
- const retVal = (output || [])
797
- .filter((e) => e != null)
798
- .map((entry) => {
799
- return de_FrameMetricDatum(entry, context);
800
- });
801
- return retVal;
802
- };
803
- const de_FrameMetricDatum = (output, context) => {
804
- return take(output, {
805
- frameMetric: _json,
806
- values: (_) => de_FrameMetricValues(_, context),
807
- });
808
- };
809
- const de_FrameMetricValues = (output, context) => {
810
- const retVal = (output || [])
811
- .filter((e) => e != null)
812
- .map((entry) => {
813
- return __limitedParseDouble(entry);
814
- });
815
- return retVal;
816
- };
817
- const de_ListOfTimestamps = (output, context) => {
818
- const retVal = (output || [])
819
- .filter((e) => e != null)
820
- .map((entry) => {
821
- return de_TimestampStructure(entry, context);
822
- });
823
- return retVal;
824
- };
825
- const de_Match = (output, context) => {
826
- return take(output, {
827
- frameAddress: __expectString,
828
- targetFramesIndex: __expectInt32,
829
- thresholdBreachValue: __limitedParseDouble,
830
- });
831
- };
832
- const de_Matches = (output, context) => {
833
- const retVal = (output || [])
834
- .filter((e) => e != null)
835
- .map((entry) => {
836
- return de_Match(entry, context);
837
- });
838
- return retVal;
839
- };
840
- const de_Pattern = (output, context) => {
841
- return take(output, {
842
- countersToAggregate: _json,
843
- description: __expectString,
844
- id: __expectString,
845
- name: __expectString,
846
- resolutionSteps: __expectString,
847
- targetFrames: _json,
848
- thresholdPercent: __limitedParseDouble,
849
- });
850
- };
851
- const de_ProfileTime = (output, context) => {
852
- return take(output, {
853
- start: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
854
- });
855
- };
856
- const de_ProfileTimes = (output, context) => {
857
- const retVal = (output || [])
858
- .filter((e) => e != null)
859
- .map((entry) => {
860
- return de_ProfileTime(entry, context);
861
- });
862
- return retVal;
863
- };
864
- const de_ProfilingGroupDescription = (output, context) => {
865
- return take(output, {
866
- agentOrchestrationConfig: _json,
867
- arn: __expectString,
868
- computePlatform: __expectString,
869
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
870
- name: __expectString,
871
- profilingStatus: (_) => de_ProfilingStatus(_, context),
872
- tags: _json,
873
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
874
- });
875
- };
876
- const de_ProfilingGroupDescriptions = (output, context) => {
877
- const retVal = (output || [])
878
- .filter((e) => e != null)
879
- .map((entry) => {
880
- return de_ProfilingGroupDescription(entry, context);
881
- });
882
- return retVal;
883
- };
884
- const de_ProfilingStatus = (output, context) => {
885
- return take(output, {
886
- latestAgentOrchestratedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
887
- latestAgentProfileReportedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
888
- latestAggregatedProfile: (_) => de_AggregatedProfileTime(_, context),
889
- });
890
- };
891
- const de_Recommendation = (output, context) => {
892
- return take(output, {
893
- allMatchesCount: __expectInt32,
894
- allMatchesSum: __limitedParseDouble,
895
- endTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
896
- pattern: (_) => de_Pattern(_, context),
897
- startTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
898
- topMatches: (_) => de_Matches(_, context),
899
- });
900
- };
901
- const de_Recommendations = (output, context) => {
902
- const retVal = (output || [])
903
- .filter((e) => e != null)
904
- .map((entry) => {
905
- return de_Recommendation(entry, context);
906
- });
907
- return retVal;
908
- };
909
- const de_TimestampStructure = (output, context) => {
910
- return take(output, {
911
- value: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
912
- });
913
- };
914
- const de_UnprocessedEndTimeMap = (output, context) => {
915
- return Object.entries(output).reduce((acc, [key, value]) => {
916
- if (value === null) {
917
- return acc;
918
- }
919
- acc[key] = de_ListOfTimestamps(value, context);
920
- return acc;
921
- }, {});
922
- };
923
- const deserializeMetadata = (output) => ({
924
- httpStatusCode: output.statusCode,
925
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
926
- extendedRequestId: output.headers["x-amz-id-2"],
927
- cfId: output.headers["x-amz-cf-id"],
928
- });
929
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
930
- const _a = "accept";
931
- const _cE = "contentEncoding";
932
- const _cT = "clientToken";
933
- const _cTo = "contentType";
934
- const _ce = "content-encoding";
935
- const _ct = "content-type";
936
- const _dRO = "dailyReportsOnly";
937
- const _eT = "endTime";
938
- const _iD = "includeDescription";
939
- const _l = "locale";
940
- const _mD = "maxDepth";
941
- const _mR = "maxResults";
942
- const _nT = "nextToken";
943
- const _oB = "orderBy";
944
- const _p = "period";
945
- const _pT = "profileToken";
946
- const _rI = "revisionId";
947
- const _sT = "startTime";
948
- const _tK = "tagKeys";
949
- const _tR = "targetResolution";