@aws-sdk/client-cloudwatch-logs 3.310.0 → 3.315.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,437 +1,293 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectString as __expectString, limitedParseDouble as __limitedParseDouble, serializeFloat as __serializeFloat, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectString as __expectString, limitedParseDouble as __limitedParseDouble, serializeFloat as __serializeFloat, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { CloudWatchLogsServiceException as __BaseException } from "../models/CloudWatchLogsServiceException";
4
4
  import { DataAlreadyAcceptedException, InvalidOperationException, InvalidParameterException, InvalidSequenceTokenException, LimitExceededException, MalformedQueryException, OperationAbortedException, ResourceAlreadyExistsException, ResourceNotFoundException, ServiceUnavailableException, TooManyTagsException, UnrecognizedClientException, } from "../models/models_0";
5
5
  export const se_AssociateKmsKeyCommand = async (input, context) => {
6
- const headers = {
7
- "content-type": "application/x-amz-json-1.1",
8
- "x-amz-target": "Logs_20140328.AssociateKmsKey",
9
- };
6
+ const headers = sharedHeaders("AssociateKmsKey");
10
7
  let body;
11
- body = JSON.stringify(se_AssociateKmsKeyRequest(input, context));
8
+ body = JSON.stringify(_json(input));
12
9
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
13
10
  };
14
11
  export const se_CancelExportTaskCommand = async (input, context) => {
15
- const headers = {
16
- "content-type": "application/x-amz-json-1.1",
17
- "x-amz-target": "Logs_20140328.CancelExportTask",
18
- };
12
+ const headers = sharedHeaders("CancelExportTask");
19
13
  let body;
20
- body = JSON.stringify(se_CancelExportTaskRequest(input, context));
14
+ body = JSON.stringify(_json(input));
21
15
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
16
  };
23
17
  export const se_CreateExportTaskCommand = async (input, context) => {
24
- const headers = {
25
- "content-type": "application/x-amz-json-1.1",
26
- "x-amz-target": "Logs_20140328.CreateExportTask",
27
- };
18
+ const headers = sharedHeaders("CreateExportTask");
28
19
  let body;
29
- body = JSON.stringify(se_CreateExportTaskRequest(input, context));
20
+ body = JSON.stringify(_json(input));
30
21
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
31
22
  };
32
23
  export const se_CreateLogGroupCommand = async (input, context) => {
33
- const headers = {
34
- "content-type": "application/x-amz-json-1.1",
35
- "x-amz-target": "Logs_20140328.CreateLogGroup",
36
- };
24
+ const headers = sharedHeaders("CreateLogGroup");
37
25
  let body;
38
- body = JSON.stringify(se_CreateLogGroupRequest(input, context));
26
+ body = JSON.stringify(_json(input));
39
27
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
40
28
  };
41
29
  export const se_CreateLogStreamCommand = async (input, context) => {
42
- const headers = {
43
- "content-type": "application/x-amz-json-1.1",
44
- "x-amz-target": "Logs_20140328.CreateLogStream",
45
- };
30
+ const headers = sharedHeaders("CreateLogStream");
46
31
  let body;
47
- body = JSON.stringify(se_CreateLogStreamRequest(input, context));
32
+ body = JSON.stringify(_json(input));
48
33
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
49
34
  };
50
35
  export const se_DeleteDataProtectionPolicyCommand = async (input, context) => {
51
- const headers = {
52
- "content-type": "application/x-amz-json-1.1",
53
- "x-amz-target": "Logs_20140328.DeleteDataProtectionPolicy",
54
- };
36
+ const headers = sharedHeaders("DeleteDataProtectionPolicy");
55
37
  let body;
56
- body = JSON.stringify(se_DeleteDataProtectionPolicyRequest(input, context));
38
+ body = JSON.stringify(_json(input));
57
39
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
40
  };
59
41
  export const se_DeleteDestinationCommand = async (input, context) => {
60
- const headers = {
61
- "content-type": "application/x-amz-json-1.1",
62
- "x-amz-target": "Logs_20140328.DeleteDestination",
63
- };
42
+ const headers = sharedHeaders("DeleteDestination");
64
43
  let body;
65
- body = JSON.stringify(se_DeleteDestinationRequest(input, context));
44
+ body = JSON.stringify(_json(input));
66
45
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
67
46
  };
68
47
  export const se_DeleteLogGroupCommand = async (input, context) => {
69
- const headers = {
70
- "content-type": "application/x-amz-json-1.1",
71
- "x-amz-target": "Logs_20140328.DeleteLogGroup",
72
- };
48
+ const headers = sharedHeaders("DeleteLogGroup");
73
49
  let body;
74
- body = JSON.stringify(se_DeleteLogGroupRequest(input, context));
50
+ body = JSON.stringify(_json(input));
75
51
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
52
  };
77
53
  export const se_DeleteLogStreamCommand = async (input, context) => {
78
- const headers = {
79
- "content-type": "application/x-amz-json-1.1",
80
- "x-amz-target": "Logs_20140328.DeleteLogStream",
81
- };
54
+ const headers = sharedHeaders("DeleteLogStream");
82
55
  let body;
83
- body = JSON.stringify(se_DeleteLogStreamRequest(input, context));
56
+ body = JSON.stringify(_json(input));
84
57
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
85
58
  };
86
59
  export const se_DeleteMetricFilterCommand = async (input, context) => {
87
- const headers = {
88
- "content-type": "application/x-amz-json-1.1",
89
- "x-amz-target": "Logs_20140328.DeleteMetricFilter",
90
- };
60
+ const headers = sharedHeaders("DeleteMetricFilter");
91
61
  let body;
92
- body = JSON.stringify(se_DeleteMetricFilterRequest(input, context));
62
+ body = JSON.stringify(_json(input));
93
63
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
94
64
  };
95
65
  export const se_DeleteQueryDefinitionCommand = async (input, context) => {
96
- const headers = {
97
- "content-type": "application/x-amz-json-1.1",
98
- "x-amz-target": "Logs_20140328.DeleteQueryDefinition",
99
- };
66
+ const headers = sharedHeaders("DeleteQueryDefinition");
100
67
  let body;
101
- body = JSON.stringify(se_DeleteQueryDefinitionRequest(input, context));
68
+ body = JSON.stringify(_json(input));
102
69
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
103
70
  };
104
71
  export const se_DeleteResourcePolicyCommand = async (input, context) => {
105
- const headers = {
106
- "content-type": "application/x-amz-json-1.1",
107
- "x-amz-target": "Logs_20140328.DeleteResourcePolicy",
108
- };
72
+ const headers = sharedHeaders("DeleteResourcePolicy");
109
73
  let body;
110
- body = JSON.stringify(se_DeleteResourcePolicyRequest(input, context));
74
+ body = JSON.stringify(_json(input));
111
75
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
76
  };
113
77
  export const se_DeleteRetentionPolicyCommand = async (input, context) => {
114
- const headers = {
115
- "content-type": "application/x-amz-json-1.1",
116
- "x-amz-target": "Logs_20140328.DeleteRetentionPolicy",
117
- };
78
+ const headers = sharedHeaders("DeleteRetentionPolicy");
118
79
  let body;
119
- body = JSON.stringify(se_DeleteRetentionPolicyRequest(input, context));
80
+ body = JSON.stringify(_json(input));
120
81
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
121
82
  };
122
83
  export const se_DeleteSubscriptionFilterCommand = async (input, context) => {
123
- const headers = {
124
- "content-type": "application/x-amz-json-1.1",
125
- "x-amz-target": "Logs_20140328.DeleteSubscriptionFilter",
126
- };
84
+ const headers = sharedHeaders("DeleteSubscriptionFilter");
127
85
  let body;
128
- body = JSON.stringify(se_DeleteSubscriptionFilterRequest(input, context));
86
+ body = JSON.stringify(_json(input));
129
87
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
130
88
  };
131
89
  export const se_DescribeDestinationsCommand = async (input, context) => {
132
- const headers = {
133
- "content-type": "application/x-amz-json-1.1",
134
- "x-amz-target": "Logs_20140328.DescribeDestinations",
135
- };
90
+ const headers = sharedHeaders("DescribeDestinations");
136
91
  let body;
137
- body = JSON.stringify(se_DescribeDestinationsRequest(input, context));
92
+ body = JSON.stringify(_json(input));
138
93
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
139
94
  };
140
95
  export const se_DescribeExportTasksCommand = async (input, context) => {
141
- const headers = {
142
- "content-type": "application/x-amz-json-1.1",
143
- "x-amz-target": "Logs_20140328.DescribeExportTasks",
144
- };
96
+ const headers = sharedHeaders("DescribeExportTasks");
145
97
  let body;
146
- body = JSON.stringify(se_DescribeExportTasksRequest(input, context));
98
+ body = JSON.stringify(_json(input));
147
99
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
148
100
  };
149
101
  export const se_DescribeLogGroupsCommand = async (input, context) => {
150
- const headers = {
151
- "content-type": "application/x-amz-json-1.1",
152
- "x-amz-target": "Logs_20140328.DescribeLogGroups",
153
- };
102
+ const headers = sharedHeaders("DescribeLogGroups");
154
103
  let body;
155
- body = JSON.stringify(se_DescribeLogGroupsRequest(input, context));
104
+ body = JSON.stringify(_json(input));
156
105
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
157
106
  };
158
107
  export const se_DescribeLogStreamsCommand = async (input, context) => {
159
- const headers = {
160
- "content-type": "application/x-amz-json-1.1",
161
- "x-amz-target": "Logs_20140328.DescribeLogStreams",
162
- };
108
+ const headers = sharedHeaders("DescribeLogStreams");
163
109
  let body;
164
- body = JSON.stringify(se_DescribeLogStreamsRequest(input, context));
110
+ body = JSON.stringify(_json(input));
165
111
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
166
112
  };
167
113
  export const se_DescribeMetricFiltersCommand = async (input, context) => {
168
- const headers = {
169
- "content-type": "application/x-amz-json-1.1",
170
- "x-amz-target": "Logs_20140328.DescribeMetricFilters",
171
- };
114
+ const headers = sharedHeaders("DescribeMetricFilters");
172
115
  let body;
173
- body = JSON.stringify(se_DescribeMetricFiltersRequest(input, context));
116
+ body = JSON.stringify(_json(input));
174
117
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
175
118
  };
176
119
  export const se_DescribeQueriesCommand = async (input, context) => {
177
- const headers = {
178
- "content-type": "application/x-amz-json-1.1",
179
- "x-amz-target": "Logs_20140328.DescribeQueries",
180
- };
120
+ const headers = sharedHeaders("DescribeQueries");
181
121
  let body;
182
- body = JSON.stringify(se_DescribeQueriesRequest(input, context));
122
+ body = JSON.stringify(_json(input));
183
123
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
184
124
  };
185
125
  export const se_DescribeQueryDefinitionsCommand = async (input, context) => {
186
- const headers = {
187
- "content-type": "application/x-amz-json-1.1",
188
- "x-amz-target": "Logs_20140328.DescribeQueryDefinitions",
189
- };
126
+ const headers = sharedHeaders("DescribeQueryDefinitions");
190
127
  let body;
191
- body = JSON.stringify(se_DescribeQueryDefinitionsRequest(input, context));
128
+ body = JSON.stringify(_json(input));
192
129
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
193
130
  };
194
131
  export const se_DescribeResourcePoliciesCommand = async (input, context) => {
195
- const headers = {
196
- "content-type": "application/x-amz-json-1.1",
197
- "x-amz-target": "Logs_20140328.DescribeResourcePolicies",
198
- };
132
+ const headers = sharedHeaders("DescribeResourcePolicies");
199
133
  let body;
200
- body = JSON.stringify(se_DescribeResourcePoliciesRequest(input, context));
134
+ body = JSON.stringify(_json(input));
201
135
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
202
136
  };
203
137
  export const se_DescribeSubscriptionFiltersCommand = async (input, context) => {
204
- const headers = {
205
- "content-type": "application/x-amz-json-1.1",
206
- "x-amz-target": "Logs_20140328.DescribeSubscriptionFilters",
207
- };
138
+ const headers = sharedHeaders("DescribeSubscriptionFilters");
208
139
  let body;
209
- body = JSON.stringify(se_DescribeSubscriptionFiltersRequest(input, context));
140
+ body = JSON.stringify(_json(input));
210
141
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
211
142
  };
212
143
  export const se_DisassociateKmsKeyCommand = async (input, context) => {
213
- const headers = {
214
- "content-type": "application/x-amz-json-1.1",
215
- "x-amz-target": "Logs_20140328.DisassociateKmsKey",
216
- };
144
+ const headers = sharedHeaders("DisassociateKmsKey");
217
145
  let body;
218
- body = JSON.stringify(se_DisassociateKmsKeyRequest(input, context));
146
+ body = JSON.stringify(_json(input));
219
147
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
220
148
  };
221
149
  export const se_FilterLogEventsCommand = async (input, context) => {
222
- const headers = {
223
- "content-type": "application/x-amz-json-1.1",
224
- "x-amz-target": "Logs_20140328.FilterLogEvents",
225
- };
150
+ const headers = sharedHeaders("FilterLogEvents");
226
151
  let body;
227
- body = JSON.stringify(se_FilterLogEventsRequest(input, context));
152
+ body = JSON.stringify(_json(input));
228
153
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
229
154
  };
230
155
  export const se_GetDataProtectionPolicyCommand = async (input, context) => {
231
- const headers = {
232
- "content-type": "application/x-amz-json-1.1",
233
- "x-amz-target": "Logs_20140328.GetDataProtectionPolicy",
234
- };
156
+ const headers = sharedHeaders("GetDataProtectionPolicy");
235
157
  let body;
236
- body = JSON.stringify(se_GetDataProtectionPolicyRequest(input, context));
158
+ body = JSON.stringify(_json(input));
237
159
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
238
160
  };
239
161
  export const se_GetLogEventsCommand = async (input, context) => {
240
- const headers = {
241
- "content-type": "application/x-amz-json-1.1",
242
- "x-amz-target": "Logs_20140328.GetLogEvents",
243
- };
162
+ const headers = sharedHeaders("GetLogEvents");
244
163
  let body;
245
- body = JSON.stringify(se_GetLogEventsRequest(input, context));
164
+ body = JSON.stringify(_json(input));
246
165
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
247
166
  };
248
167
  export const se_GetLogGroupFieldsCommand = async (input, context) => {
249
- const headers = {
250
- "content-type": "application/x-amz-json-1.1",
251
- "x-amz-target": "Logs_20140328.GetLogGroupFields",
252
- };
168
+ const headers = sharedHeaders("GetLogGroupFields");
253
169
  let body;
254
- body = JSON.stringify(se_GetLogGroupFieldsRequest(input, context));
170
+ body = JSON.stringify(_json(input));
255
171
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
256
172
  };
257
173
  export const se_GetLogRecordCommand = async (input, context) => {
258
- const headers = {
259
- "content-type": "application/x-amz-json-1.1",
260
- "x-amz-target": "Logs_20140328.GetLogRecord",
261
- };
174
+ const headers = sharedHeaders("GetLogRecord");
262
175
  let body;
263
- body = JSON.stringify(se_GetLogRecordRequest(input, context));
176
+ body = JSON.stringify(_json(input));
264
177
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
265
178
  };
266
179
  export const se_GetQueryResultsCommand = async (input, context) => {
267
- const headers = {
268
- "content-type": "application/x-amz-json-1.1",
269
- "x-amz-target": "Logs_20140328.GetQueryResults",
270
- };
180
+ const headers = sharedHeaders("GetQueryResults");
271
181
  let body;
272
- body = JSON.stringify(se_GetQueryResultsRequest(input, context));
182
+ body = JSON.stringify(_json(input));
273
183
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
274
184
  };
275
185
  export const se_ListTagsForResourceCommand = async (input, context) => {
276
- const headers = {
277
- "content-type": "application/x-amz-json-1.1",
278
- "x-amz-target": "Logs_20140328.ListTagsForResource",
279
- };
186
+ const headers = sharedHeaders("ListTagsForResource");
280
187
  let body;
281
- body = JSON.stringify(se_ListTagsForResourceRequest(input, context));
188
+ body = JSON.stringify(_json(input));
282
189
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
283
190
  };
284
191
  export const se_ListTagsLogGroupCommand = async (input, context) => {
285
- const headers = {
286
- "content-type": "application/x-amz-json-1.1",
287
- "x-amz-target": "Logs_20140328.ListTagsLogGroup",
288
- };
192
+ const headers = sharedHeaders("ListTagsLogGroup");
289
193
  let body;
290
- body = JSON.stringify(se_ListTagsLogGroupRequest(input, context));
194
+ body = JSON.stringify(_json(input));
291
195
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
292
196
  };
293
197
  export const se_PutDataProtectionPolicyCommand = async (input, context) => {
294
- const headers = {
295
- "content-type": "application/x-amz-json-1.1",
296
- "x-amz-target": "Logs_20140328.PutDataProtectionPolicy",
297
- };
198
+ const headers = sharedHeaders("PutDataProtectionPolicy");
298
199
  let body;
299
- body = JSON.stringify(se_PutDataProtectionPolicyRequest(input, context));
200
+ body = JSON.stringify(_json(input));
300
201
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
301
202
  };
302
203
  export const se_PutDestinationCommand = async (input, context) => {
303
- const headers = {
304
- "content-type": "application/x-amz-json-1.1",
305
- "x-amz-target": "Logs_20140328.PutDestination",
306
- };
204
+ const headers = sharedHeaders("PutDestination");
307
205
  let body;
308
- body = JSON.stringify(se_PutDestinationRequest(input, context));
206
+ body = JSON.stringify(_json(input));
309
207
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
310
208
  };
311
209
  export const se_PutDestinationPolicyCommand = async (input, context) => {
312
- const headers = {
313
- "content-type": "application/x-amz-json-1.1",
314
- "x-amz-target": "Logs_20140328.PutDestinationPolicy",
315
- };
210
+ const headers = sharedHeaders("PutDestinationPolicy");
316
211
  let body;
317
- body = JSON.stringify(se_PutDestinationPolicyRequest(input, context));
212
+ body = JSON.stringify(_json(input));
318
213
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
319
214
  };
320
215
  export const se_PutLogEventsCommand = async (input, context) => {
321
- const headers = {
322
- "content-type": "application/x-amz-json-1.1",
323
- "x-amz-target": "Logs_20140328.PutLogEvents",
324
- };
216
+ const headers = sharedHeaders("PutLogEvents");
325
217
  let body;
326
- body = JSON.stringify(se_PutLogEventsRequest(input, context));
218
+ body = JSON.stringify(_json(input));
327
219
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
328
220
  };
329
221
  export const se_PutMetricFilterCommand = async (input, context) => {
330
- const headers = {
331
- "content-type": "application/x-amz-json-1.1",
332
- "x-amz-target": "Logs_20140328.PutMetricFilter",
333
- };
222
+ const headers = sharedHeaders("PutMetricFilter");
334
223
  let body;
335
224
  body = JSON.stringify(se_PutMetricFilterRequest(input, context));
336
225
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
337
226
  };
338
227
  export const se_PutQueryDefinitionCommand = async (input, context) => {
339
- const headers = {
340
- "content-type": "application/x-amz-json-1.1",
341
- "x-amz-target": "Logs_20140328.PutQueryDefinition",
342
- };
228
+ const headers = sharedHeaders("PutQueryDefinition");
343
229
  let body;
344
- body = JSON.stringify(se_PutQueryDefinitionRequest(input, context));
230
+ body = JSON.stringify(_json(input));
345
231
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
346
232
  };
347
233
  export const se_PutResourcePolicyCommand = async (input, context) => {
348
- const headers = {
349
- "content-type": "application/x-amz-json-1.1",
350
- "x-amz-target": "Logs_20140328.PutResourcePolicy",
351
- };
234
+ const headers = sharedHeaders("PutResourcePolicy");
352
235
  let body;
353
- body = JSON.stringify(se_PutResourcePolicyRequest(input, context));
236
+ body = JSON.stringify(_json(input));
354
237
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
355
238
  };
356
239
  export const se_PutRetentionPolicyCommand = async (input, context) => {
357
- const headers = {
358
- "content-type": "application/x-amz-json-1.1",
359
- "x-amz-target": "Logs_20140328.PutRetentionPolicy",
360
- };
240
+ const headers = sharedHeaders("PutRetentionPolicy");
361
241
  let body;
362
- body = JSON.stringify(se_PutRetentionPolicyRequest(input, context));
242
+ body = JSON.stringify(_json(input));
363
243
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
364
244
  };
365
245
  export const se_PutSubscriptionFilterCommand = async (input, context) => {
366
- const headers = {
367
- "content-type": "application/x-amz-json-1.1",
368
- "x-amz-target": "Logs_20140328.PutSubscriptionFilter",
369
- };
246
+ const headers = sharedHeaders("PutSubscriptionFilter");
370
247
  let body;
371
- body = JSON.stringify(se_PutSubscriptionFilterRequest(input, context));
248
+ body = JSON.stringify(_json(input));
372
249
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
373
250
  };
374
251
  export const se_StartQueryCommand = async (input, context) => {
375
- const headers = {
376
- "content-type": "application/x-amz-json-1.1",
377
- "x-amz-target": "Logs_20140328.StartQuery",
378
- };
252
+ const headers = sharedHeaders("StartQuery");
379
253
  let body;
380
- body = JSON.stringify(se_StartQueryRequest(input, context));
254
+ body = JSON.stringify(_json(input));
381
255
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
382
256
  };
383
257
  export const se_StopQueryCommand = async (input, context) => {
384
- const headers = {
385
- "content-type": "application/x-amz-json-1.1",
386
- "x-amz-target": "Logs_20140328.StopQuery",
387
- };
258
+ const headers = sharedHeaders("StopQuery");
388
259
  let body;
389
- body = JSON.stringify(se_StopQueryRequest(input, context));
260
+ body = JSON.stringify(_json(input));
390
261
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
391
262
  };
392
263
  export const se_TagLogGroupCommand = async (input, context) => {
393
- const headers = {
394
- "content-type": "application/x-amz-json-1.1",
395
- "x-amz-target": "Logs_20140328.TagLogGroup",
396
- };
264
+ const headers = sharedHeaders("TagLogGroup");
397
265
  let body;
398
- body = JSON.stringify(se_TagLogGroupRequest(input, context));
266
+ body = JSON.stringify(_json(input));
399
267
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
400
268
  };
401
269
  export const se_TagResourceCommand = async (input, context) => {
402
- const headers = {
403
- "content-type": "application/x-amz-json-1.1",
404
- "x-amz-target": "Logs_20140328.TagResource",
405
- };
270
+ const headers = sharedHeaders("TagResource");
406
271
  let body;
407
- body = JSON.stringify(se_TagResourceRequest(input, context));
272
+ body = JSON.stringify(_json(input));
408
273
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
409
274
  };
410
275
  export const se_TestMetricFilterCommand = async (input, context) => {
411
- const headers = {
412
- "content-type": "application/x-amz-json-1.1",
413
- "x-amz-target": "Logs_20140328.TestMetricFilter",
414
- };
276
+ const headers = sharedHeaders("TestMetricFilter");
415
277
  let body;
416
- body = JSON.stringify(se_TestMetricFilterRequest(input, context));
278
+ body = JSON.stringify(_json(input));
417
279
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
418
280
  };
419
281
  export const se_UntagLogGroupCommand = async (input, context) => {
420
- const headers = {
421
- "content-type": "application/x-amz-json-1.1",
422
- "x-amz-target": "Logs_20140328.UntagLogGroup",
423
- };
282
+ const headers = sharedHeaders("UntagLogGroup");
424
283
  let body;
425
- body = JSON.stringify(se_UntagLogGroupRequest(input, context));
284
+ body = JSON.stringify(_json(input));
426
285
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
427
286
  };
428
287
  export const se_UntagResourceCommand = async (input, context) => {
429
- const headers = {
430
- "content-type": "application/x-amz-json-1.1",
431
- "x-amz-target": "Logs_20140328.UntagResource",
432
- };
288
+ const headers = sharedHeaders("UntagResource");
433
289
  let body;
434
- body = JSON.stringify(se_UntagResourceRequest(input, context));
290
+ body = JSON.stringify(_json(input));
435
291
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
436
292
  };
437
293
  export const de_AssociateKmsKeyCommand = async (output, context) => {
@@ -442,7 +298,7 @@ export const de_AssociateKmsKeyCommand = async (output, context) => {
442
298
  const response = {
443
299
  $metadata: deserializeMetadata(output),
444
300
  };
445
- return Promise.resolve(response);
301
+ return response;
446
302
  };
447
303
  const de_AssociateKmsKeyCommandError = async (output, context) => {
448
304
  const parsedOutput = {
@@ -465,10 +321,9 @@ const de_AssociateKmsKeyCommandError = async (output, context) => {
465
321
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
466
322
  default:
467
323
  const parsedBody = parsedOutput.body;
468
- throwDefaultError({
324
+ return throwDefaultError({
469
325
  output,
470
326
  parsedBody,
471
- exceptionCtor: __BaseException,
472
327
  errorCode,
473
328
  });
474
329
  }
@@ -481,7 +336,7 @@ export const de_CancelExportTaskCommand = async (output, context) => {
481
336
  const response = {
482
337
  $metadata: deserializeMetadata(output),
483
338
  };
484
- return Promise.resolve(response);
339
+ return response;
485
340
  };
486
341
  const de_CancelExportTaskCommandError = async (output, context) => {
487
342
  const parsedOutput = {
@@ -504,10 +359,9 @@ const de_CancelExportTaskCommandError = async (output, context) => {
504
359
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
505
360
  default:
506
361
  const parsedBody = parsedOutput.body;
507
- throwDefaultError({
362
+ return throwDefaultError({
508
363
  output,
509
364
  parsedBody,
510
- exceptionCtor: __BaseException,
511
365
  errorCode,
512
366
  });
513
367
  }
@@ -518,12 +372,12 @@ export const de_CreateExportTaskCommand = async (output, context) => {
518
372
  }
519
373
  const data = await parseBody(output.body, context);
520
374
  let contents = {};
521
- contents = de_CreateExportTaskResponse(data, context);
375
+ contents = _json(data);
522
376
  const response = {
523
377
  $metadata: deserializeMetadata(output),
524
378
  ...contents,
525
379
  };
526
- return Promise.resolve(response);
380
+ return response;
527
381
  };
528
382
  const de_CreateExportTaskCommandError = async (output, context) => {
529
383
  const parsedOutput = {
@@ -552,10 +406,9 @@ const de_CreateExportTaskCommandError = async (output, context) => {
552
406
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
553
407
  default:
554
408
  const parsedBody = parsedOutput.body;
555
- throwDefaultError({
409
+ return throwDefaultError({
556
410
  output,
557
411
  parsedBody,
558
- exceptionCtor: __BaseException,
559
412
  errorCode,
560
413
  });
561
414
  }
@@ -568,7 +421,7 @@ export const de_CreateLogGroupCommand = async (output, context) => {
568
421
  const response = {
569
422
  $metadata: deserializeMetadata(output),
570
423
  };
571
- return Promise.resolve(response);
424
+ return response;
572
425
  };
573
426
  const de_CreateLogGroupCommandError = async (output, context) => {
574
427
  const parsedOutput = {
@@ -594,10 +447,9 @@ const de_CreateLogGroupCommandError = async (output, context) => {
594
447
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
595
448
  default:
596
449
  const parsedBody = parsedOutput.body;
597
- throwDefaultError({
450
+ return throwDefaultError({
598
451
  output,
599
452
  parsedBody,
600
- exceptionCtor: __BaseException,
601
453
  errorCode,
602
454
  });
603
455
  }
@@ -610,7 +462,7 @@ export const de_CreateLogStreamCommand = async (output, context) => {
610
462
  const response = {
611
463
  $metadata: deserializeMetadata(output),
612
464
  };
613
- return Promise.resolve(response);
465
+ return response;
614
466
  };
615
467
  const de_CreateLogStreamCommandError = async (output, context) => {
616
468
  const parsedOutput = {
@@ -633,10 +485,9 @@ const de_CreateLogStreamCommandError = async (output, context) => {
633
485
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
634
486
  default:
635
487
  const parsedBody = parsedOutput.body;
636
- throwDefaultError({
488
+ return throwDefaultError({
637
489
  output,
638
490
  parsedBody,
639
- exceptionCtor: __BaseException,
640
491
  errorCode,
641
492
  });
642
493
  }
@@ -649,7 +500,7 @@ export const de_DeleteDataProtectionPolicyCommand = async (output, context) => {
649
500
  const response = {
650
501
  $metadata: deserializeMetadata(output),
651
502
  };
652
- return Promise.resolve(response);
503
+ return response;
653
504
  };
654
505
  const de_DeleteDataProtectionPolicyCommandError = async (output, context) => {
655
506
  const parsedOutput = {
@@ -672,10 +523,9 @@ const de_DeleteDataProtectionPolicyCommandError = async (output, context) => {
672
523
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
673
524
  default:
674
525
  const parsedBody = parsedOutput.body;
675
- throwDefaultError({
526
+ return throwDefaultError({
676
527
  output,
677
528
  parsedBody,
678
- exceptionCtor: __BaseException,
679
529
  errorCode,
680
530
  });
681
531
  }
@@ -688,7 +538,7 @@ export const de_DeleteDestinationCommand = async (output, context) => {
688
538
  const response = {
689
539
  $metadata: deserializeMetadata(output),
690
540
  };
691
- return Promise.resolve(response);
541
+ return response;
692
542
  };
693
543
  const de_DeleteDestinationCommandError = async (output, context) => {
694
544
  const parsedOutput = {
@@ -711,10 +561,9 @@ const de_DeleteDestinationCommandError = async (output, context) => {
711
561
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
712
562
  default:
713
563
  const parsedBody = parsedOutput.body;
714
- throwDefaultError({
564
+ return throwDefaultError({
715
565
  output,
716
566
  parsedBody,
717
- exceptionCtor: __BaseException,
718
567
  errorCode,
719
568
  });
720
569
  }
@@ -727,7 +576,7 @@ export const de_DeleteLogGroupCommand = async (output, context) => {
727
576
  const response = {
728
577
  $metadata: deserializeMetadata(output),
729
578
  };
730
- return Promise.resolve(response);
579
+ return response;
731
580
  };
732
581
  const de_DeleteLogGroupCommandError = async (output, context) => {
733
582
  const parsedOutput = {
@@ -750,10 +599,9 @@ const de_DeleteLogGroupCommandError = async (output, context) => {
750
599
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
751
600
  default:
752
601
  const parsedBody = parsedOutput.body;
753
- throwDefaultError({
602
+ return throwDefaultError({
754
603
  output,
755
604
  parsedBody,
756
- exceptionCtor: __BaseException,
757
605
  errorCode,
758
606
  });
759
607
  }
@@ -766,7 +614,7 @@ export const de_DeleteLogStreamCommand = async (output, context) => {
766
614
  const response = {
767
615
  $metadata: deserializeMetadata(output),
768
616
  };
769
- return Promise.resolve(response);
617
+ return response;
770
618
  };
771
619
  const de_DeleteLogStreamCommandError = async (output, context) => {
772
620
  const parsedOutput = {
@@ -789,10 +637,9 @@ const de_DeleteLogStreamCommandError = async (output, context) => {
789
637
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
790
638
  default:
791
639
  const parsedBody = parsedOutput.body;
792
- throwDefaultError({
640
+ return throwDefaultError({
793
641
  output,
794
642
  parsedBody,
795
- exceptionCtor: __BaseException,
796
643
  errorCode,
797
644
  });
798
645
  }
@@ -805,7 +652,7 @@ export const de_DeleteMetricFilterCommand = async (output, context) => {
805
652
  const response = {
806
653
  $metadata: deserializeMetadata(output),
807
654
  };
808
- return Promise.resolve(response);
655
+ return response;
809
656
  };
810
657
  const de_DeleteMetricFilterCommandError = async (output, context) => {
811
658
  const parsedOutput = {
@@ -828,10 +675,9 @@ const de_DeleteMetricFilterCommandError = async (output, context) => {
828
675
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
829
676
  default:
830
677
  const parsedBody = parsedOutput.body;
831
- throwDefaultError({
678
+ return throwDefaultError({
832
679
  output,
833
680
  parsedBody,
834
- exceptionCtor: __BaseException,
835
681
  errorCode,
836
682
  });
837
683
  }
@@ -842,12 +688,12 @@ export const de_DeleteQueryDefinitionCommand = async (output, context) => {
842
688
  }
843
689
  const data = await parseBody(output.body, context);
844
690
  let contents = {};
845
- contents = de_DeleteQueryDefinitionResponse(data, context);
691
+ contents = _json(data);
846
692
  const response = {
847
693
  $metadata: deserializeMetadata(output),
848
694
  ...contents,
849
695
  };
850
- return Promise.resolve(response);
696
+ return response;
851
697
  };
852
698
  const de_DeleteQueryDefinitionCommandError = async (output, context) => {
853
699
  const parsedOutput = {
@@ -867,10 +713,9 @@ const de_DeleteQueryDefinitionCommandError = async (output, context) => {
867
713
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
868
714
  default:
869
715
  const parsedBody = parsedOutput.body;
870
- throwDefaultError({
716
+ return throwDefaultError({
871
717
  output,
872
718
  parsedBody,
873
- exceptionCtor: __BaseException,
874
719
  errorCode,
875
720
  });
876
721
  }
@@ -883,7 +728,7 @@ export const de_DeleteResourcePolicyCommand = async (output, context) => {
883
728
  const response = {
884
729
  $metadata: deserializeMetadata(output),
885
730
  };
886
- return Promise.resolve(response);
731
+ return response;
887
732
  };
888
733
  const de_DeleteResourcePolicyCommandError = async (output, context) => {
889
734
  const parsedOutput = {
@@ -903,10 +748,9 @@ const de_DeleteResourcePolicyCommandError = async (output, context) => {
903
748
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
904
749
  default:
905
750
  const parsedBody = parsedOutput.body;
906
- throwDefaultError({
751
+ return throwDefaultError({
907
752
  output,
908
753
  parsedBody,
909
- exceptionCtor: __BaseException,
910
754
  errorCode,
911
755
  });
912
756
  }
@@ -919,7 +763,7 @@ export const de_DeleteRetentionPolicyCommand = async (output, context) => {
919
763
  const response = {
920
764
  $metadata: deserializeMetadata(output),
921
765
  };
922
- return Promise.resolve(response);
766
+ return response;
923
767
  };
924
768
  const de_DeleteRetentionPolicyCommandError = async (output, context) => {
925
769
  const parsedOutput = {
@@ -942,10 +786,9 @@ const de_DeleteRetentionPolicyCommandError = async (output, context) => {
942
786
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
943
787
  default:
944
788
  const parsedBody = parsedOutput.body;
945
- throwDefaultError({
789
+ return throwDefaultError({
946
790
  output,
947
791
  parsedBody,
948
- exceptionCtor: __BaseException,
949
792
  errorCode,
950
793
  });
951
794
  }
@@ -958,7 +801,7 @@ export const de_DeleteSubscriptionFilterCommand = async (output, context) => {
958
801
  const response = {
959
802
  $metadata: deserializeMetadata(output),
960
803
  };
961
- return Promise.resolve(response);
804
+ return response;
962
805
  };
963
806
  const de_DeleteSubscriptionFilterCommandError = async (output, context) => {
964
807
  const parsedOutput = {
@@ -981,10 +824,9 @@ const de_DeleteSubscriptionFilterCommandError = async (output, context) => {
981
824
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
982
825
  default:
983
826
  const parsedBody = parsedOutput.body;
984
- throwDefaultError({
827
+ return throwDefaultError({
985
828
  output,
986
829
  parsedBody,
987
- exceptionCtor: __BaseException,
988
830
  errorCode,
989
831
  });
990
832
  }
@@ -995,12 +837,12 @@ export const de_DescribeDestinationsCommand = async (output, context) => {
995
837
  }
996
838
  const data = await parseBody(output.body, context);
997
839
  let contents = {};
998
- contents = de_DescribeDestinationsResponse(data, context);
840
+ contents = _json(data);
999
841
  const response = {
1000
842
  $metadata: deserializeMetadata(output),
1001
843
  ...contents,
1002
844
  };
1003
- return Promise.resolve(response);
845
+ return response;
1004
846
  };
1005
847
  const de_DescribeDestinationsCommandError = async (output, context) => {
1006
848
  const parsedOutput = {
@@ -1017,10 +859,9 @@ const de_DescribeDestinationsCommandError = async (output, context) => {
1017
859
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1018
860
  default:
1019
861
  const parsedBody = parsedOutput.body;
1020
- throwDefaultError({
862
+ return throwDefaultError({
1021
863
  output,
1022
864
  parsedBody,
1023
- exceptionCtor: __BaseException,
1024
865
  errorCode,
1025
866
  });
1026
867
  }
@@ -1031,12 +872,12 @@ export const de_DescribeExportTasksCommand = async (output, context) => {
1031
872
  }
1032
873
  const data = await parseBody(output.body, context);
1033
874
  let contents = {};
1034
- contents = de_DescribeExportTasksResponse(data, context);
875
+ contents = _json(data);
1035
876
  const response = {
1036
877
  $metadata: deserializeMetadata(output),
1037
878
  ...contents,
1038
879
  };
1039
- return Promise.resolve(response);
880
+ return response;
1040
881
  };
1041
882
  const de_DescribeExportTasksCommandError = async (output, context) => {
1042
883
  const parsedOutput = {
@@ -1053,10 +894,9 @@ const de_DescribeExportTasksCommandError = async (output, context) => {
1053
894
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1054
895
  default:
1055
896
  const parsedBody = parsedOutput.body;
1056
- throwDefaultError({
897
+ return throwDefaultError({
1057
898
  output,
1058
899
  parsedBody,
1059
- exceptionCtor: __BaseException,
1060
900
  errorCode,
1061
901
  });
1062
902
  }
@@ -1067,12 +907,12 @@ export const de_DescribeLogGroupsCommand = async (output, context) => {
1067
907
  }
1068
908
  const data = await parseBody(output.body, context);
1069
909
  let contents = {};
1070
- contents = de_DescribeLogGroupsResponse(data, context);
910
+ contents = _json(data);
1071
911
  const response = {
1072
912
  $metadata: deserializeMetadata(output),
1073
913
  ...contents,
1074
914
  };
1075
- return Promise.resolve(response);
915
+ return response;
1076
916
  };
1077
917
  const de_DescribeLogGroupsCommandError = async (output, context) => {
1078
918
  const parsedOutput = {
@@ -1089,10 +929,9 @@ const de_DescribeLogGroupsCommandError = async (output, context) => {
1089
929
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1090
930
  default:
1091
931
  const parsedBody = parsedOutput.body;
1092
- throwDefaultError({
932
+ return throwDefaultError({
1093
933
  output,
1094
934
  parsedBody,
1095
- exceptionCtor: __BaseException,
1096
935
  errorCode,
1097
936
  });
1098
937
  }
@@ -1103,12 +942,12 @@ export const de_DescribeLogStreamsCommand = async (output, context) => {
1103
942
  }
1104
943
  const data = await parseBody(output.body, context);
1105
944
  let contents = {};
1106
- contents = de_DescribeLogStreamsResponse(data, context);
945
+ contents = _json(data);
1107
946
  const response = {
1108
947
  $metadata: deserializeMetadata(output),
1109
948
  ...contents,
1110
949
  };
1111
- return Promise.resolve(response);
950
+ return response;
1112
951
  };
1113
952
  const de_DescribeLogStreamsCommandError = async (output, context) => {
1114
953
  const parsedOutput = {
@@ -1128,10 +967,9 @@ const de_DescribeLogStreamsCommandError = async (output, context) => {
1128
967
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1129
968
  default:
1130
969
  const parsedBody = parsedOutput.body;
1131
- throwDefaultError({
970
+ return throwDefaultError({
1132
971
  output,
1133
972
  parsedBody,
1134
- exceptionCtor: __BaseException,
1135
973
  errorCode,
1136
974
  });
1137
975
  }
@@ -1147,7 +985,7 @@ export const de_DescribeMetricFiltersCommand = async (output, context) => {
1147
985
  $metadata: deserializeMetadata(output),
1148
986
  ...contents,
1149
987
  };
1150
- return Promise.resolve(response);
988
+ return response;
1151
989
  };
1152
990
  const de_DescribeMetricFiltersCommandError = async (output, context) => {
1153
991
  const parsedOutput = {
@@ -1167,10 +1005,9 @@ const de_DescribeMetricFiltersCommandError = async (output, context) => {
1167
1005
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1168
1006
  default:
1169
1007
  const parsedBody = parsedOutput.body;
1170
- throwDefaultError({
1008
+ return throwDefaultError({
1171
1009
  output,
1172
1010
  parsedBody,
1173
- exceptionCtor: __BaseException,
1174
1011
  errorCode,
1175
1012
  });
1176
1013
  }
@@ -1181,12 +1018,12 @@ export const de_DescribeQueriesCommand = async (output, context) => {
1181
1018
  }
1182
1019
  const data = await parseBody(output.body, context);
1183
1020
  let contents = {};
1184
- contents = de_DescribeQueriesResponse(data, context);
1021
+ contents = _json(data);
1185
1022
  const response = {
1186
1023
  $metadata: deserializeMetadata(output),
1187
1024
  ...contents,
1188
1025
  };
1189
- return Promise.resolve(response);
1026
+ return response;
1190
1027
  };
1191
1028
  const de_DescribeQueriesCommandError = async (output, context) => {
1192
1029
  const parsedOutput = {
@@ -1206,10 +1043,9 @@ const de_DescribeQueriesCommandError = async (output, context) => {
1206
1043
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1207
1044
  default:
1208
1045
  const parsedBody = parsedOutput.body;
1209
- throwDefaultError({
1046
+ return throwDefaultError({
1210
1047
  output,
1211
1048
  parsedBody,
1212
- exceptionCtor: __BaseException,
1213
1049
  errorCode,
1214
1050
  });
1215
1051
  }
@@ -1220,12 +1056,12 @@ export const de_DescribeQueryDefinitionsCommand = async (output, context) => {
1220
1056
  }
1221
1057
  const data = await parseBody(output.body, context);
1222
1058
  let contents = {};
1223
- contents = de_DescribeQueryDefinitionsResponse(data, context);
1059
+ contents = _json(data);
1224
1060
  const response = {
1225
1061
  $metadata: deserializeMetadata(output),
1226
1062
  ...contents,
1227
1063
  };
1228
- return Promise.resolve(response);
1064
+ return response;
1229
1065
  };
1230
1066
  const de_DescribeQueryDefinitionsCommandError = async (output, context) => {
1231
1067
  const parsedOutput = {
@@ -1242,10 +1078,9 @@ const de_DescribeQueryDefinitionsCommandError = async (output, context) => {
1242
1078
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1243
1079
  default:
1244
1080
  const parsedBody = parsedOutput.body;
1245
- throwDefaultError({
1081
+ return throwDefaultError({
1246
1082
  output,
1247
1083
  parsedBody,
1248
- exceptionCtor: __BaseException,
1249
1084
  errorCode,
1250
1085
  });
1251
1086
  }
@@ -1256,12 +1091,12 @@ export const de_DescribeResourcePoliciesCommand = async (output, context) => {
1256
1091
  }
1257
1092
  const data = await parseBody(output.body, context);
1258
1093
  let contents = {};
1259
- contents = de_DescribeResourcePoliciesResponse(data, context);
1094
+ contents = _json(data);
1260
1095
  const response = {
1261
1096
  $metadata: deserializeMetadata(output),
1262
1097
  ...contents,
1263
1098
  };
1264
- return Promise.resolve(response);
1099
+ return response;
1265
1100
  };
1266
1101
  const de_DescribeResourcePoliciesCommandError = async (output, context) => {
1267
1102
  const parsedOutput = {
@@ -1278,10 +1113,9 @@ const de_DescribeResourcePoliciesCommandError = async (output, context) => {
1278
1113
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1279
1114
  default:
1280
1115
  const parsedBody = parsedOutput.body;
1281
- throwDefaultError({
1116
+ return throwDefaultError({
1282
1117
  output,
1283
1118
  parsedBody,
1284
- exceptionCtor: __BaseException,
1285
1119
  errorCode,
1286
1120
  });
1287
1121
  }
@@ -1292,12 +1126,12 @@ export const de_DescribeSubscriptionFiltersCommand = async (output, context) =>
1292
1126
  }
1293
1127
  const data = await parseBody(output.body, context);
1294
1128
  let contents = {};
1295
- contents = de_DescribeSubscriptionFiltersResponse(data, context);
1129
+ contents = _json(data);
1296
1130
  const response = {
1297
1131
  $metadata: deserializeMetadata(output),
1298
1132
  ...contents,
1299
1133
  };
1300
- return Promise.resolve(response);
1134
+ return response;
1301
1135
  };
1302
1136
  const de_DescribeSubscriptionFiltersCommandError = async (output, context) => {
1303
1137
  const parsedOutput = {
@@ -1317,10 +1151,9 @@ const de_DescribeSubscriptionFiltersCommandError = async (output, context) => {
1317
1151
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1318
1152
  default:
1319
1153
  const parsedBody = parsedOutput.body;
1320
- throwDefaultError({
1154
+ return throwDefaultError({
1321
1155
  output,
1322
1156
  parsedBody,
1323
- exceptionCtor: __BaseException,
1324
1157
  errorCode,
1325
1158
  });
1326
1159
  }
@@ -1333,7 +1166,7 @@ export const de_DisassociateKmsKeyCommand = async (output, context) => {
1333
1166
  const response = {
1334
1167
  $metadata: deserializeMetadata(output),
1335
1168
  };
1336
- return Promise.resolve(response);
1169
+ return response;
1337
1170
  };
1338
1171
  const de_DisassociateKmsKeyCommandError = async (output, context) => {
1339
1172
  const parsedOutput = {
@@ -1356,10 +1189,9 @@ const de_DisassociateKmsKeyCommandError = async (output, context) => {
1356
1189
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1357
1190
  default:
1358
1191
  const parsedBody = parsedOutput.body;
1359
- throwDefaultError({
1192
+ return throwDefaultError({
1360
1193
  output,
1361
1194
  parsedBody,
1362
- exceptionCtor: __BaseException,
1363
1195
  errorCode,
1364
1196
  });
1365
1197
  }
@@ -1370,12 +1202,12 @@ export const de_FilterLogEventsCommand = async (output, context) => {
1370
1202
  }
1371
1203
  const data = await parseBody(output.body, context);
1372
1204
  let contents = {};
1373
- contents = de_FilterLogEventsResponse(data, context);
1205
+ contents = _json(data);
1374
1206
  const response = {
1375
1207
  $metadata: deserializeMetadata(output),
1376
1208
  ...contents,
1377
1209
  };
1378
- return Promise.resolve(response);
1210
+ return response;
1379
1211
  };
1380
1212
  const de_FilterLogEventsCommandError = async (output, context) => {
1381
1213
  const parsedOutput = {
@@ -1395,10 +1227,9 @@ const de_FilterLogEventsCommandError = async (output, context) => {
1395
1227
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1396
1228
  default:
1397
1229
  const parsedBody = parsedOutput.body;
1398
- throwDefaultError({
1230
+ return throwDefaultError({
1399
1231
  output,
1400
1232
  parsedBody,
1401
- exceptionCtor: __BaseException,
1402
1233
  errorCode,
1403
1234
  });
1404
1235
  }
@@ -1409,12 +1240,12 @@ export const de_GetDataProtectionPolicyCommand = async (output, context) => {
1409
1240
  }
1410
1241
  const data = await parseBody(output.body, context);
1411
1242
  let contents = {};
1412
- contents = de_GetDataProtectionPolicyResponse(data, context);
1243
+ contents = _json(data);
1413
1244
  const response = {
1414
1245
  $metadata: deserializeMetadata(output),
1415
1246
  ...contents,
1416
1247
  };
1417
- return Promise.resolve(response);
1248
+ return response;
1418
1249
  };
1419
1250
  const de_GetDataProtectionPolicyCommandError = async (output, context) => {
1420
1251
  const parsedOutput = {
@@ -1437,10 +1268,9 @@ const de_GetDataProtectionPolicyCommandError = async (output, context) => {
1437
1268
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1438
1269
  default:
1439
1270
  const parsedBody = parsedOutput.body;
1440
- throwDefaultError({
1271
+ return throwDefaultError({
1441
1272
  output,
1442
1273
  parsedBody,
1443
- exceptionCtor: __BaseException,
1444
1274
  errorCode,
1445
1275
  });
1446
1276
  }
@@ -1451,12 +1281,12 @@ export const de_GetLogEventsCommand = async (output, context) => {
1451
1281
  }
1452
1282
  const data = await parseBody(output.body, context);
1453
1283
  let contents = {};
1454
- contents = de_GetLogEventsResponse(data, context);
1284
+ contents = _json(data);
1455
1285
  const response = {
1456
1286
  $metadata: deserializeMetadata(output),
1457
1287
  ...contents,
1458
1288
  };
1459
- return Promise.resolve(response);
1289
+ return response;
1460
1290
  };
1461
1291
  const de_GetLogEventsCommandError = async (output, context) => {
1462
1292
  const parsedOutput = {
@@ -1476,10 +1306,9 @@ const de_GetLogEventsCommandError = async (output, context) => {
1476
1306
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1477
1307
  default:
1478
1308
  const parsedBody = parsedOutput.body;
1479
- throwDefaultError({
1309
+ return throwDefaultError({
1480
1310
  output,
1481
1311
  parsedBody,
1482
- exceptionCtor: __BaseException,
1483
1312
  errorCode,
1484
1313
  });
1485
1314
  }
@@ -1490,12 +1319,12 @@ export const de_GetLogGroupFieldsCommand = async (output, context) => {
1490
1319
  }
1491
1320
  const data = await parseBody(output.body, context);
1492
1321
  let contents = {};
1493
- contents = de_GetLogGroupFieldsResponse(data, context);
1322
+ contents = _json(data);
1494
1323
  const response = {
1495
1324
  $metadata: deserializeMetadata(output),
1496
1325
  ...contents,
1497
1326
  };
1498
- return Promise.resolve(response);
1327
+ return response;
1499
1328
  };
1500
1329
  const de_GetLogGroupFieldsCommandError = async (output, context) => {
1501
1330
  const parsedOutput = {
@@ -1518,10 +1347,9 @@ const de_GetLogGroupFieldsCommandError = async (output, context) => {
1518
1347
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1519
1348
  default:
1520
1349
  const parsedBody = parsedOutput.body;
1521
- throwDefaultError({
1350
+ return throwDefaultError({
1522
1351
  output,
1523
1352
  parsedBody,
1524
- exceptionCtor: __BaseException,
1525
1353
  errorCode,
1526
1354
  });
1527
1355
  }
@@ -1532,12 +1360,12 @@ export const de_GetLogRecordCommand = async (output, context) => {
1532
1360
  }
1533
1361
  const data = await parseBody(output.body, context);
1534
1362
  let contents = {};
1535
- contents = de_GetLogRecordResponse(data, context);
1363
+ contents = _json(data);
1536
1364
  const response = {
1537
1365
  $metadata: deserializeMetadata(output),
1538
1366
  ...contents,
1539
1367
  };
1540
- return Promise.resolve(response);
1368
+ return response;
1541
1369
  };
1542
1370
  const de_GetLogRecordCommandError = async (output, context) => {
1543
1371
  const parsedOutput = {
@@ -1560,10 +1388,9 @@ const de_GetLogRecordCommandError = async (output, context) => {
1560
1388
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1561
1389
  default:
1562
1390
  const parsedBody = parsedOutput.body;
1563
- throwDefaultError({
1391
+ return throwDefaultError({
1564
1392
  output,
1565
1393
  parsedBody,
1566
- exceptionCtor: __BaseException,
1567
1394
  errorCode,
1568
1395
  });
1569
1396
  }
@@ -1579,7 +1406,7 @@ export const de_GetQueryResultsCommand = async (output, context) => {
1579
1406
  $metadata: deserializeMetadata(output),
1580
1407
  ...contents,
1581
1408
  };
1582
- return Promise.resolve(response);
1409
+ return response;
1583
1410
  };
1584
1411
  const de_GetQueryResultsCommandError = async (output, context) => {
1585
1412
  const parsedOutput = {
@@ -1599,10 +1426,9 @@ const de_GetQueryResultsCommandError = async (output, context) => {
1599
1426
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1600
1427
  default:
1601
1428
  const parsedBody = parsedOutput.body;
1602
- throwDefaultError({
1429
+ return throwDefaultError({
1603
1430
  output,
1604
1431
  parsedBody,
1605
- exceptionCtor: __BaseException,
1606
1432
  errorCode,
1607
1433
  });
1608
1434
  }
@@ -1613,12 +1439,12 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
1613
1439
  }
1614
1440
  const data = await parseBody(output.body, context);
1615
1441
  let contents = {};
1616
- contents = de_ListTagsForResourceResponse(data, context);
1442
+ contents = _json(data);
1617
1443
  const response = {
1618
1444
  $metadata: deserializeMetadata(output),
1619
1445
  ...contents,
1620
1446
  };
1621
- return Promise.resolve(response);
1447
+ return response;
1622
1448
  };
1623
1449
  const de_ListTagsForResourceCommandError = async (output, context) => {
1624
1450
  const parsedOutput = {
@@ -1638,10 +1464,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
1638
1464
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1639
1465
  default:
1640
1466
  const parsedBody = parsedOutput.body;
1641
- throwDefaultError({
1467
+ return throwDefaultError({
1642
1468
  output,
1643
1469
  parsedBody,
1644
- exceptionCtor: __BaseException,
1645
1470
  errorCode,
1646
1471
  });
1647
1472
  }
@@ -1652,12 +1477,12 @@ export const de_ListTagsLogGroupCommand = async (output, context) => {
1652
1477
  }
1653
1478
  const data = await parseBody(output.body, context);
1654
1479
  let contents = {};
1655
- contents = de_ListTagsLogGroupResponse(data, context);
1480
+ contents = _json(data);
1656
1481
  const response = {
1657
1482
  $metadata: deserializeMetadata(output),
1658
1483
  ...contents,
1659
1484
  };
1660
- return Promise.resolve(response);
1485
+ return response;
1661
1486
  };
1662
1487
  const de_ListTagsLogGroupCommandError = async (output, context) => {
1663
1488
  const parsedOutput = {
@@ -1674,10 +1499,9 @@ const de_ListTagsLogGroupCommandError = async (output, context) => {
1674
1499
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1675
1500
  default:
1676
1501
  const parsedBody = parsedOutput.body;
1677
- throwDefaultError({
1502
+ return throwDefaultError({
1678
1503
  output,
1679
1504
  parsedBody,
1680
- exceptionCtor: __BaseException,
1681
1505
  errorCode,
1682
1506
  });
1683
1507
  }
@@ -1688,12 +1512,12 @@ export const de_PutDataProtectionPolicyCommand = async (output, context) => {
1688
1512
  }
1689
1513
  const data = await parseBody(output.body, context);
1690
1514
  let contents = {};
1691
- contents = de_PutDataProtectionPolicyResponse(data, context);
1515
+ contents = _json(data);
1692
1516
  const response = {
1693
1517
  $metadata: deserializeMetadata(output),
1694
1518
  ...contents,
1695
1519
  };
1696
- return Promise.resolve(response);
1520
+ return response;
1697
1521
  };
1698
1522
  const de_PutDataProtectionPolicyCommandError = async (output, context) => {
1699
1523
  const parsedOutput = {
@@ -1719,10 +1543,9 @@ const de_PutDataProtectionPolicyCommandError = async (output, context) => {
1719
1543
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1720
1544
  default:
1721
1545
  const parsedBody = parsedOutput.body;
1722
- throwDefaultError({
1546
+ return throwDefaultError({
1723
1547
  output,
1724
1548
  parsedBody,
1725
- exceptionCtor: __BaseException,
1726
1549
  errorCode,
1727
1550
  });
1728
1551
  }
@@ -1733,12 +1556,12 @@ export const de_PutDestinationCommand = async (output, context) => {
1733
1556
  }
1734
1557
  const data = await parseBody(output.body, context);
1735
1558
  let contents = {};
1736
- contents = de_PutDestinationResponse(data, context);
1559
+ contents = _json(data);
1737
1560
  const response = {
1738
1561
  $metadata: deserializeMetadata(output),
1739
1562
  ...contents,
1740
1563
  };
1741
- return Promise.resolve(response);
1564
+ return response;
1742
1565
  };
1743
1566
  const de_PutDestinationCommandError = async (output, context) => {
1744
1567
  const parsedOutput = {
@@ -1758,10 +1581,9 @@ const de_PutDestinationCommandError = async (output, context) => {
1758
1581
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1759
1582
  default:
1760
1583
  const parsedBody = parsedOutput.body;
1761
- throwDefaultError({
1584
+ return throwDefaultError({
1762
1585
  output,
1763
1586
  parsedBody,
1764
- exceptionCtor: __BaseException,
1765
1587
  errorCode,
1766
1588
  });
1767
1589
  }
@@ -1774,7 +1596,7 @@ export const de_PutDestinationPolicyCommand = async (output, context) => {
1774
1596
  const response = {
1775
1597
  $metadata: deserializeMetadata(output),
1776
1598
  };
1777
- return Promise.resolve(response);
1599
+ return response;
1778
1600
  };
1779
1601
  const de_PutDestinationPolicyCommandError = async (output, context) => {
1780
1602
  const parsedOutput = {
@@ -1794,10 +1616,9 @@ const de_PutDestinationPolicyCommandError = async (output, context) => {
1794
1616
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1795
1617
  default:
1796
1618
  const parsedBody = parsedOutput.body;
1797
- throwDefaultError({
1619
+ return throwDefaultError({
1798
1620
  output,
1799
1621
  parsedBody,
1800
- exceptionCtor: __BaseException,
1801
1622
  errorCode,
1802
1623
  });
1803
1624
  }
@@ -1808,12 +1629,12 @@ export const de_PutLogEventsCommand = async (output, context) => {
1808
1629
  }
1809
1630
  const data = await parseBody(output.body, context);
1810
1631
  let contents = {};
1811
- contents = de_PutLogEventsResponse(data, context);
1632
+ contents = _json(data);
1812
1633
  const response = {
1813
1634
  $metadata: deserializeMetadata(output),
1814
1635
  ...contents,
1815
1636
  };
1816
- return Promise.resolve(response);
1637
+ return response;
1817
1638
  };
1818
1639
  const de_PutLogEventsCommandError = async (output, context) => {
1819
1640
  const parsedOutput = {
@@ -1842,10 +1663,9 @@ const de_PutLogEventsCommandError = async (output, context) => {
1842
1663
  throw await de_UnrecognizedClientExceptionRes(parsedOutput, context);
1843
1664
  default:
1844
1665
  const parsedBody = parsedOutput.body;
1845
- throwDefaultError({
1666
+ return throwDefaultError({
1846
1667
  output,
1847
1668
  parsedBody,
1848
- exceptionCtor: __BaseException,
1849
1669
  errorCode,
1850
1670
  });
1851
1671
  }
@@ -1858,7 +1678,7 @@ export const de_PutMetricFilterCommand = async (output, context) => {
1858
1678
  const response = {
1859
1679
  $metadata: deserializeMetadata(output),
1860
1680
  };
1861
- return Promise.resolve(response);
1681
+ return response;
1862
1682
  };
1863
1683
  const de_PutMetricFilterCommandError = async (output, context) => {
1864
1684
  const parsedOutput = {
@@ -1884,10 +1704,9 @@ const de_PutMetricFilterCommandError = async (output, context) => {
1884
1704
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1885
1705
  default:
1886
1706
  const parsedBody = parsedOutput.body;
1887
- throwDefaultError({
1707
+ return throwDefaultError({
1888
1708
  output,
1889
1709
  parsedBody,
1890
- exceptionCtor: __BaseException,
1891
1710
  errorCode,
1892
1711
  });
1893
1712
  }
@@ -1898,12 +1717,12 @@ export const de_PutQueryDefinitionCommand = async (output, context) => {
1898
1717
  }
1899
1718
  const data = await parseBody(output.body, context);
1900
1719
  let contents = {};
1901
- contents = de_PutQueryDefinitionResponse(data, context);
1720
+ contents = _json(data);
1902
1721
  const response = {
1903
1722
  $metadata: deserializeMetadata(output),
1904
1723
  ...contents,
1905
1724
  };
1906
- return Promise.resolve(response);
1725
+ return response;
1907
1726
  };
1908
1727
  const de_PutQueryDefinitionCommandError = async (output, context) => {
1909
1728
  const parsedOutput = {
@@ -1926,10 +1745,9 @@ const de_PutQueryDefinitionCommandError = async (output, context) => {
1926
1745
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1927
1746
  default:
1928
1747
  const parsedBody = parsedOutput.body;
1929
- throwDefaultError({
1748
+ return throwDefaultError({
1930
1749
  output,
1931
1750
  parsedBody,
1932
- exceptionCtor: __BaseException,
1933
1751
  errorCode,
1934
1752
  });
1935
1753
  }
@@ -1940,12 +1758,12 @@ export const de_PutResourcePolicyCommand = async (output, context) => {
1940
1758
  }
1941
1759
  const data = await parseBody(output.body, context);
1942
1760
  let contents = {};
1943
- contents = de_PutResourcePolicyResponse(data, context);
1761
+ contents = _json(data);
1944
1762
  const response = {
1945
1763
  $metadata: deserializeMetadata(output),
1946
1764
  ...contents,
1947
1765
  };
1948
- return Promise.resolve(response);
1766
+ return response;
1949
1767
  };
1950
1768
  const de_PutResourcePolicyCommandError = async (output, context) => {
1951
1769
  const parsedOutput = {
@@ -1965,10 +1783,9 @@ const de_PutResourcePolicyCommandError = async (output, context) => {
1965
1783
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1966
1784
  default:
1967
1785
  const parsedBody = parsedOutput.body;
1968
- throwDefaultError({
1786
+ return throwDefaultError({
1969
1787
  output,
1970
1788
  parsedBody,
1971
- exceptionCtor: __BaseException,
1972
1789
  errorCode,
1973
1790
  });
1974
1791
  }
@@ -1981,7 +1798,7 @@ export const de_PutRetentionPolicyCommand = async (output, context) => {
1981
1798
  const response = {
1982
1799
  $metadata: deserializeMetadata(output),
1983
1800
  };
1984
- return Promise.resolve(response);
1801
+ return response;
1985
1802
  };
1986
1803
  const de_PutRetentionPolicyCommandError = async (output, context) => {
1987
1804
  const parsedOutput = {
@@ -2004,10 +1821,9 @@ const de_PutRetentionPolicyCommandError = async (output, context) => {
2004
1821
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
2005
1822
  default:
2006
1823
  const parsedBody = parsedOutput.body;
2007
- throwDefaultError({
1824
+ return throwDefaultError({
2008
1825
  output,
2009
1826
  parsedBody,
2010
- exceptionCtor: __BaseException,
2011
1827
  errorCode,
2012
1828
  });
2013
1829
  }
@@ -2020,7 +1836,7 @@ export const de_PutSubscriptionFilterCommand = async (output, context) => {
2020
1836
  const response = {
2021
1837
  $metadata: deserializeMetadata(output),
2022
1838
  };
2023
- return Promise.resolve(response);
1839
+ return response;
2024
1840
  };
2025
1841
  const de_PutSubscriptionFilterCommandError = async (output, context) => {
2026
1842
  const parsedOutput = {
@@ -2046,10 +1862,9 @@ const de_PutSubscriptionFilterCommandError = async (output, context) => {
2046
1862
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
2047
1863
  default:
2048
1864
  const parsedBody = parsedOutput.body;
2049
- throwDefaultError({
1865
+ return throwDefaultError({
2050
1866
  output,
2051
1867
  parsedBody,
2052
- exceptionCtor: __BaseException,
2053
1868
  errorCode,
2054
1869
  });
2055
1870
  }
@@ -2060,12 +1875,12 @@ export const de_StartQueryCommand = async (output, context) => {
2060
1875
  }
2061
1876
  const data = await parseBody(output.body, context);
2062
1877
  let contents = {};
2063
- contents = de_StartQueryResponse(data, context);
1878
+ contents = _json(data);
2064
1879
  const response = {
2065
1880
  $metadata: deserializeMetadata(output),
2066
1881
  ...contents,
2067
1882
  };
2068
- return Promise.resolve(response);
1883
+ return response;
2069
1884
  };
2070
1885
  const de_StartQueryCommandError = async (output, context) => {
2071
1886
  const parsedOutput = {
@@ -2091,10 +1906,9 @@ const de_StartQueryCommandError = async (output, context) => {
2091
1906
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
2092
1907
  default:
2093
1908
  const parsedBody = parsedOutput.body;
2094
- throwDefaultError({
1909
+ return throwDefaultError({
2095
1910
  output,
2096
1911
  parsedBody,
2097
- exceptionCtor: __BaseException,
2098
1912
  errorCode,
2099
1913
  });
2100
1914
  }
@@ -2105,12 +1919,12 @@ export const de_StopQueryCommand = async (output, context) => {
2105
1919
  }
2106
1920
  const data = await parseBody(output.body, context);
2107
1921
  let contents = {};
2108
- contents = de_StopQueryResponse(data, context);
1922
+ contents = _json(data);
2109
1923
  const response = {
2110
1924
  $metadata: deserializeMetadata(output),
2111
1925
  ...contents,
2112
1926
  };
2113
- return Promise.resolve(response);
1927
+ return response;
2114
1928
  };
2115
1929
  const de_StopQueryCommandError = async (output, context) => {
2116
1930
  const parsedOutput = {
@@ -2130,10 +1944,9 @@ const de_StopQueryCommandError = async (output, context) => {
2130
1944
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
2131
1945
  default:
2132
1946
  const parsedBody = parsedOutput.body;
2133
- throwDefaultError({
1947
+ return throwDefaultError({
2134
1948
  output,
2135
1949
  parsedBody,
2136
- exceptionCtor: __BaseException,
2137
1950
  errorCode,
2138
1951
  });
2139
1952
  }
@@ -2146,7 +1959,7 @@ export const de_TagLogGroupCommand = async (output, context) => {
2146
1959
  const response = {
2147
1960
  $metadata: deserializeMetadata(output),
2148
1961
  };
2149
- return Promise.resolve(response);
1962
+ return response;
2150
1963
  };
2151
1964
  const de_TagLogGroupCommandError = async (output, context) => {
2152
1965
  const parsedOutput = {
@@ -2163,10 +1976,9 @@ const de_TagLogGroupCommandError = async (output, context) => {
2163
1976
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2164
1977
  default:
2165
1978
  const parsedBody = parsedOutput.body;
2166
- throwDefaultError({
1979
+ return throwDefaultError({
2167
1980
  output,
2168
1981
  parsedBody,
2169
- exceptionCtor: __BaseException,
2170
1982
  errorCode,
2171
1983
  });
2172
1984
  }
@@ -2179,7 +1991,7 @@ export const de_TagResourceCommand = async (output, context) => {
2179
1991
  const response = {
2180
1992
  $metadata: deserializeMetadata(output),
2181
1993
  };
2182
- return Promise.resolve(response);
1994
+ return response;
2183
1995
  };
2184
1996
  const de_TagResourceCommandError = async (output, context) => {
2185
1997
  const parsedOutput = {
@@ -2202,10 +2014,9 @@ const de_TagResourceCommandError = async (output, context) => {
2202
2014
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
2203
2015
  default:
2204
2016
  const parsedBody = parsedOutput.body;
2205
- throwDefaultError({
2017
+ return throwDefaultError({
2206
2018
  output,
2207
2019
  parsedBody,
2208
- exceptionCtor: __BaseException,
2209
2020
  errorCode,
2210
2021
  });
2211
2022
  }
@@ -2216,12 +2027,12 @@ export const de_TestMetricFilterCommand = async (output, context) => {
2216
2027
  }
2217
2028
  const data = await parseBody(output.body, context);
2218
2029
  let contents = {};
2219
- contents = de_TestMetricFilterResponse(data, context);
2030
+ contents = _json(data);
2220
2031
  const response = {
2221
2032
  $metadata: deserializeMetadata(output),
2222
2033
  ...contents,
2223
2034
  };
2224
- return Promise.resolve(response);
2035
+ return response;
2225
2036
  };
2226
2037
  const de_TestMetricFilterCommandError = async (output, context) => {
2227
2038
  const parsedOutput = {
@@ -2238,10 +2049,9 @@ const de_TestMetricFilterCommandError = async (output, context) => {
2238
2049
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
2239
2050
  default:
2240
2051
  const parsedBody = parsedOutput.body;
2241
- throwDefaultError({
2052
+ return throwDefaultError({
2242
2053
  output,
2243
2054
  parsedBody,
2244
- exceptionCtor: __BaseException,
2245
2055
  errorCode,
2246
2056
  });
2247
2057
  }
@@ -2254,7 +2064,7 @@ export const de_UntagLogGroupCommand = async (output, context) => {
2254
2064
  const response = {
2255
2065
  $metadata: deserializeMetadata(output),
2256
2066
  };
2257
- return Promise.resolve(response);
2067
+ return response;
2258
2068
  };
2259
2069
  const de_UntagLogGroupCommandError = async (output, context) => {
2260
2070
  const parsedOutput = {
@@ -2268,10 +2078,9 @@ const de_UntagLogGroupCommandError = async (output, context) => {
2268
2078
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2269
2079
  default:
2270
2080
  const parsedBody = parsedOutput.body;
2271
- throwDefaultError({
2081
+ return throwDefaultError({
2272
2082
  output,
2273
2083
  parsedBody,
2274
- exceptionCtor: __BaseException,
2275
2084
  errorCode,
2276
2085
  });
2277
2086
  }
@@ -2284,7 +2093,7 @@ export const de_UntagResourceCommand = async (output, context) => {
2284
2093
  const response = {
2285
2094
  $metadata: deserializeMetadata(output),
2286
2095
  };
2287
- return Promise.resolve(response);
2096
+ return response;
2288
2097
  };
2289
2098
  const de_UntagResourceCommandError = async (output, context) => {
2290
2099
  const parsedOutput = {
@@ -2304,17 +2113,16 @@ const de_UntagResourceCommandError = async (output, context) => {
2304
2113
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
2305
2114
  default:
2306
2115
  const parsedBody = parsedOutput.body;
2307
- throwDefaultError({
2116
+ return throwDefaultError({
2308
2117
  output,
2309
2118
  parsedBody,
2310
- exceptionCtor: __BaseException,
2311
2119
  errorCode,
2312
2120
  });
2313
2121
  }
2314
2122
  };
2315
2123
  const de_DataAlreadyAcceptedExceptionRes = async (parsedOutput, context) => {
2316
2124
  const body = parsedOutput.body;
2317
- const deserialized = de_DataAlreadyAcceptedException(body, context);
2125
+ const deserialized = _json(body);
2318
2126
  const exception = new DataAlreadyAcceptedException({
2319
2127
  $metadata: deserializeMetadata(parsedOutput),
2320
2128
  ...deserialized,
@@ -2323,7 +2131,7 @@ const de_DataAlreadyAcceptedExceptionRes = async (parsedOutput, context) => {
2323
2131
  };
2324
2132
  const de_InvalidOperationExceptionRes = async (parsedOutput, context) => {
2325
2133
  const body = parsedOutput.body;
2326
- const deserialized = de_InvalidOperationException(body, context);
2134
+ const deserialized = _json(body);
2327
2135
  const exception = new InvalidOperationException({
2328
2136
  $metadata: deserializeMetadata(parsedOutput),
2329
2137
  ...deserialized,
@@ -2332,7 +2140,7 @@ const de_InvalidOperationExceptionRes = async (parsedOutput, context) => {
2332
2140
  };
2333
2141
  const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
2334
2142
  const body = parsedOutput.body;
2335
- const deserialized = de_InvalidParameterException(body, context);
2143
+ const deserialized = _json(body);
2336
2144
  const exception = new InvalidParameterException({
2337
2145
  $metadata: deserializeMetadata(parsedOutput),
2338
2146
  ...deserialized,
@@ -2341,7 +2149,7 @@ const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
2341
2149
  };
2342
2150
  const de_InvalidSequenceTokenExceptionRes = async (parsedOutput, context) => {
2343
2151
  const body = parsedOutput.body;
2344
- const deserialized = de_InvalidSequenceTokenException(body, context);
2152
+ const deserialized = _json(body);
2345
2153
  const exception = new InvalidSequenceTokenException({
2346
2154
  $metadata: deserializeMetadata(parsedOutput),
2347
2155
  ...deserialized,
@@ -2350,7 +2158,7 @@ const de_InvalidSequenceTokenExceptionRes = async (parsedOutput, context) => {
2350
2158
  };
2351
2159
  const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
2352
2160
  const body = parsedOutput.body;
2353
- const deserialized = de_LimitExceededException(body, context);
2161
+ const deserialized = _json(body);
2354
2162
  const exception = new LimitExceededException({
2355
2163
  $metadata: deserializeMetadata(parsedOutput),
2356
2164
  ...deserialized,
@@ -2359,7 +2167,7 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
2359
2167
  };
2360
2168
  const de_MalformedQueryExceptionRes = async (parsedOutput, context) => {
2361
2169
  const body = parsedOutput.body;
2362
- const deserialized = de_MalformedQueryException(body, context);
2170
+ const deserialized = _json(body);
2363
2171
  const exception = new MalformedQueryException({
2364
2172
  $metadata: deserializeMetadata(parsedOutput),
2365
2173
  ...deserialized,
@@ -2368,7 +2176,7 @@ const de_MalformedQueryExceptionRes = async (parsedOutput, context) => {
2368
2176
  };
2369
2177
  const de_OperationAbortedExceptionRes = async (parsedOutput, context) => {
2370
2178
  const body = parsedOutput.body;
2371
- const deserialized = de_OperationAbortedException(body, context);
2179
+ const deserialized = _json(body);
2372
2180
  const exception = new OperationAbortedException({
2373
2181
  $metadata: deserializeMetadata(parsedOutput),
2374
2182
  ...deserialized,
@@ -2377,7 +2185,7 @@ const de_OperationAbortedExceptionRes = async (parsedOutput, context) => {
2377
2185
  };
2378
2186
  const de_ResourceAlreadyExistsExceptionRes = async (parsedOutput, context) => {
2379
2187
  const body = parsedOutput.body;
2380
- const deserialized = de_ResourceAlreadyExistsException(body, context);
2188
+ const deserialized = _json(body);
2381
2189
  const exception = new ResourceAlreadyExistsException({
2382
2190
  $metadata: deserializeMetadata(parsedOutput),
2383
2191
  ...deserialized,
@@ -2386,7 +2194,7 @@ const de_ResourceAlreadyExistsExceptionRes = async (parsedOutput, context) => {
2386
2194
  };
2387
2195
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2388
2196
  const body = parsedOutput.body;
2389
- const deserialized = de_ResourceNotFoundException(body, context);
2197
+ const deserialized = _json(body);
2390
2198
  const exception = new ResourceNotFoundException({
2391
2199
  $metadata: deserializeMetadata(parsedOutput),
2392
2200
  ...deserialized,
@@ -2395,7 +2203,7 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2395
2203
  };
2396
2204
  const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
2397
2205
  const body = parsedOutput.body;
2398
- const deserialized = de_ServiceUnavailableException(body, context);
2206
+ const deserialized = _json(body);
2399
2207
  const exception = new ServiceUnavailableException({
2400
2208
  $metadata: deserializeMetadata(parsedOutput),
2401
2209
  ...deserialized,
@@ -2404,7 +2212,7 @@ const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
2404
2212
  };
2405
2213
  const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
2406
2214
  const body = parsedOutput.body;
2407
- const deserialized = de_TooManyTagsException(body, context);
2215
+ const deserialized = _json(body);
2408
2216
  const exception = new TooManyTagsException({
2409
2217
  $metadata: deserializeMetadata(parsedOutput),
2410
2218
  ...deserialized,
@@ -2413,1111 +2221,116 @@ const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
2413
2221
  };
2414
2222
  const de_UnrecognizedClientExceptionRes = async (parsedOutput, context) => {
2415
2223
  const body = parsedOutput.body;
2416
- const deserialized = de_UnrecognizedClientException(body, context);
2224
+ const deserialized = _json(body);
2417
2225
  const exception = new UnrecognizedClientException({
2418
2226
  $metadata: deserializeMetadata(parsedOutput),
2419
2227
  ...deserialized,
2420
2228
  });
2421
2229
  return __decorateServiceException(exception, body);
2422
2230
  };
2423
- const se_AccountIds = (input, context) => {
2424
- return input
2425
- .filter((e) => e != null)
2426
- .map((entry) => {
2427
- return entry;
2231
+ const se_MetricTransformation = (input, context) => {
2232
+ return take(input, {
2233
+ defaultValue: __serializeFloat,
2234
+ dimensions: _json,
2235
+ metricName: [],
2236
+ metricNamespace: [],
2237
+ metricValue: [],
2238
+ unit: [],
2428
2239
  });
2429
2240
  };
2430
- const se_AssociateKmsKeyRequest = (input, context) => {
2431
- return {
2432
- ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }),
2433
- ...(input.logGroupName != null && { logGroupName: input.logGroupName }),
2434
- };
2435
- };
2436
- const se_CancelExportTaskRequest = (input, context) => {
2437
- return {
2438
- ...(input.taskId != null && { taskId: input.taskId }),
2439
- };
2440
- };
2441
- const se_CreateExportTaskRequest = (input, context) => {
2442
- return {
2443
- ...(input.destination != null && { destination: input.destination }),
2444
- ...(input.destinationPrefix != null && { destinationPrefix: input.destinationPrefix }),
2445
- ...(input.from != null && { from: input.from }),
2446
- ...(input.logGroupName != null && { logGroupName: input.logGroupName }),
2447
- ...(input.logStreamNamePrefix != null && { logStreamNamePrefix: input.logStreamNamePrefix }),
2448
- ...(input.taskName != null && { taskName: input.taskName }),
2449
- ...(input.to != null && { to: input.to }),
2450
- };
2451
- };
2452
- const se_CreateLogGroupRequest = (input, context) => {
2453
- return {
2454
- ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }),
2455
- ...(input.logGroupName != null && { logGroupName: input.logGroupName }),
2456
- ...(input.tags != null && { tags: se_Tags(input.tags, context) }),
2457
- };
2458
- };
2459
- const se_CreateLogStreamRequest = (input, context) => {
2460
- return {
2461
- ...(input.logGroupName != null && { logGroupName: input.logGroupName }),
2462
- ...(input.logStreamName != null && { logStreamName: input.logStreamName }),
2463
- };
2464
- };
2465
- const se_DeleteDataProtectionPolicyRequest = (input, context) => {
2466
- return {
2467
- ...(input.logGroupIdentifier != null && { logGroupIdentifier: input.logGroupIdentifier }),
2468
- };
2469
- };
2470
- const se_DeleteDestinationRequest = (input, context) => {
2471
- return {
2472
- ...(input.destinationName != null && { destinationName: input.destinationName }),
2473
- };
2474
- };
2475
- const se_DeleteLogGroupRequest = (input, context) => {
2476
- return {
2477
- ...(input.logGroupName != null && { logGroupName: input.logGroupName }),
2478
- };
2479
- };
2480
- const se_DeleteLogStreamRequest = (input, context) => {
2481
- return {
2482
- ...(input.logGroupName != null && { logGroupName: input.logGroupName }),
2483
- ...(input.logStreamName != null && { logStreamName: input.logStreamName }),
2484
- };
2485
- };
2486
- const se_DeleteMetricFilterRequest = (input, context) => {
2487
- return {
2488
- ...(input.filterName != null && { filterName: input.filterName }),
2489
- ...(input.logGroupName != null && { logGroupName: input.logGroupName }),
2490
- };
2491
- };
2492
- const se_DeleteQueryDefinitionRequest = (input, context) => {
2493
- return {
2494
- ...(input.queryDefinitionId != null && { queryDefinitionId: input.queryDefinitionId }),
2495
- };
2496
- };
2497
- const se_DeleteResourcePolicyRequest = (input, context) => {
2498
- return {
2499
- ...(input.policyName != null && { policyName: input.policyName }),
2500
- };
2501
- };
2502
- const se_DeleteRetentionPolicyRequest = (input, context) => {
2503
- return {
2504
- ...(input.logGroupName != null && { logGroupName: input.logGroupName }),
2505
- };
2506
- };
2507
- const se_DeleteSubscriptionFilterRequest = (input, context) => {
2508
- return {
2509
- ...(input.filterName != null && { filterName: input.filterName }),
2510
- ...(input.logGroupName != null && { logGroupName: input.logGroupName }),
2511
- };
2512
- };
2513
- const se_DescribeDestinationsRequest = (input, context) => {
2514
- return {
2515
- ...(input.DestinationNamePrefix != null && { DestinationNamePrefix: input.DestinationNamePrefix }),
2516
- ...(input.limit != null && { limit: input.limit }),
2517
- ...(input.nextToken != null && { nextToken: input.nextToken }),
2518
- };
2519
- };
2520
- const se_DescribeExportTasksRequest = (input, context) => {
2521
- return {
2522
- ...(input.limit != null && { limit: input.limit }),
2523
- ...(input.nextToken != null && { nextToken: input.nextToken }),
2524
- ...(input.statusCode != null && { statusCode: input.statusCode }),
2525
- ...(input.taskId != null && { taskId: input.taskId }),
2526
- };
2527
- };
2528
- const se_DescribeLogGroupsRequest = (input, context) => {
2529
- return {
2530
- ...(input.accountIdentifiers != null && { accountIdentifiers: se_AccountIds(input.accountIdentifiers, context) }),
2531
- ...(input.includeLinkedAccounts != null && { includeLinkedAccounts: input.includeLinkedAccounts }),
2532
- ...(input.limit != null && { limit: input.limit }),
2533
- ...(input.logGroupNamePattern != null && { logGroupNamePattern: input.logGroupNamePattern }),
2534
- ...(input.logGroupNamePrefix != null && { logGroupNamePrefix: input.logGroupNamePrefix }),
2535
- ...(input.nextToken != null && { nextToken: input.nextToken }),
2536
- };
2537
- };
2538
- const se_DescribeLogStreamsRequest = (input, context) => {
2539
- return {
2540
- ...(input.descending != null && { descending: input.descending }),
2541
- ...(input.limit != null && { limit: input.limit }),
2542
- ...(input.logGroupIdentifier != null && { logGroupIdentifier: input.logGroupIdentifier }),
2543
- ...(input.logGroupName != null && { logGroupName: input.logGroupName }),
2544
- ...(input.logStreamNamePrefix != null && { logStreamNamePrefix: input.logStreamNamePrefix }),
2545
- ...(input.nextToken != null && { nextToken: input.nextToken }),
2546
- ...(input.orderBy != null && { orderBy: input.orderBy }),
2547
- };
2548
- };
2549
- const se_DescribeMetricFiltersRequest = (input, context) => {
2550
- return {
2551
- ...(input.filterNamePrefix != null && { filterNamePrefix: input.filterNamePrefix }),
2552
- ...(input.limit != null && { limit: input.limit }),
2553
- ...(input.logGroupName != null && { logGroupName: input.logGroupName }),
2554
- ...(input.metricName != null && { metricName: input.metricName }),
2555
- ...(input.metricNamespace != null && { metricNamespace: input.metricNamespace }),
2556
- ...(input.nextToken != null && { nextToken: input.nextToken }),
2557
- };
2558
- };
2559
- const se_DescribeQueriesRequest = (input, context) => {
2560
- return {
2561
- ...(input.logGroupName != null && { logGroupName: input.logGroupName }),
2562
- ...(input.maxResults != null && { maxResults: input.maxResults }),
2563
- ...(input.nextToken != null && { nextToken: input.nextToken }),
2564
- ...(input.status != null && { status: input.status }),
2565
- };
2566
- };
2567
- const se_DescribeQueryDefinitionsRequest = (input, context) => {
2568
- return {
2569
- ...(input.maxResults != null && { maxResults: input.maxResults }),
2570
- ...(input.nextToken != null && { nextToken: input.nextToken }),
2571
- ...(input.queryDefinitionNamePrefix != null && { queryDefinitionNamePrefix: input.queryDefinitionNamePrefix }),
2572
- };
2573
- };
2574
- const se_DescribeResourcePoliciesRequest = (input, context) => {
2575
- return {
2576
- ...(input.limit != null && { limit: input.limit }),
2577
- ...(input.nextToken != null && { nextToken: input.nextToken }),
2578
- };
2579
- };
2580
- const se_DescribeSubscriptionFiltersRequest = (input, context) => {
2581
- return {
2582
- ...(input.filterNamePrefix != null && { filterNamePrefix: input.filterNamePrefix }),
2583
- ...(input.limit != null && { limit: input.limit }),
2584
- ...(input.logGroupName != null && { logGroupName: input.logGroupName }),
2585
- ...(input.nextToken != null && { nextToken: input.nextToken }),
2586
- };
2587
- };
2588
- const se_Dimensions = (input, context) => {
2589
- return Object.entries(input).reduce((acc, [key, value]) => {
2590
- if (value === null) {
2591
- return acc;
2592
- }
2593
- acc[key] = value;
2594
- return acc;
2595
- }, {});
2596
- };
2597
- const se_DisassociateKmsKeyRequest = (input, context) => {
2598
- return {
2599
- ...(input.logGroupName != null && { logGroupName: input.logGroupName }),
2600
- };
2601
- };
2602
- const se_FilterLogEventsRequest = (input, context) => {
2603
- return {
2604
- ...(input.endTime != null && { endTime: input.endTime }),
2605
- ...(input.filterPattern != null && { filterPattern: input.filterPattern }),
2606
- ...(input.interleaved != null && { interleaved: input.interleaved }),
2607
- ...(input.limit != null && { limit: input.limit }),
2608
- ...(input.logGroupIdentifier != null && { logGroupIdentifier: input.logGroupIdentifier }),
2609
- ...(input.logGroupName != null && { logGroupName: input.logGroupName }),
2610
- ...(input.logStreamNamePrefix != null && { logStreamNamePrefix: input.logStreamNamePrefix }),
2611
- ...(input.logStreamNames != null && { logStreamNames: se_InputLogStreamNames(input.logStreamNames, context) }),
2612
- ...(input.nextToken != null && { nextToken: input.nextToken }),
2613
- ...(input.startTime != null && { startTime: input.startTime }),
2614
- ...(input.unmask != null && { unmask: input.unmask }),
2615
- };
2616
- };
2617
- const se_GetDataProtectionPolicyRequest = (input, context) => {
2618
- return {
2619
- ...(input.logGroupIdentifier != null && { logGroupIdentifier: input.logGroupIdentifier }),
2620
- };
2621
- };
2622
- const se_GetLogEventsRequest = (input, context) => {
2623
- return {
2624
- ...(input.endTime != null && { endTime: input.endTime }),
2625
- ...(input.limit != null && { limit: input.limit }),
2626
- ...(input.logGroupIdentifier != null && { logGroupIdentifier: input.logGroupIdentifier }),
2627
- ...(input.logGroupName != null && { logGroupName: input.logGroupName }),
2628
- ...(input.logStreamName != null && { logStreamName: input.logStreamName }),
2629
- ...(input.nextToken != null && { nextToken: input.nextToken }),
2630
- ...(input.startFromHead != null && { startFromHead: input.startFromHead }),
2631
- ...(input.startTime != null && { startTime: input.startTime }),
2632
- ...(input.unmask != null && { unmask: input.unmask }),
2633
- };
2634
- };
2635
- const se_GetLogGroupFieldsRequest = (input, context) => {
2636
- return {
2637
- ...(input.logGroupIdentifier != null && { logGroupIdentifier: input.logGroupIdentifier }),
2638
- ...(input.logGroupName != null && { logGroupName: input.logGroupName }),
2639
- ...(input.time != null && { time: input.time }),
2640
- };
2641
- };
2642
- const se_GetLogRecordRequest = (input, context) => {
2643
- return {
2644
- ...(input.logRecordPointer != null && { logRecordPointer: input.logRecordPointer }),
2645
- ...(input.unmask != null && { unmask: input.unmask }),
2646
- };
2647
- };
2648
- const se_GetQueryResultsRequest = (input, context) => {
2649
- return {
2650
- ...(input.queryId != null && { queryId: input.queryId }),
2651
- };
2652
- };
2653
- const se_InputLogEvent = (input, context) => {
2654
- return {
2655
- ...(input.message != null && { message: input.message }),
2656
- ...(input.timestamp != null && { timestamp: input.timestamp }),
2657
- };
2658
- };
2659
- const se_InputLogEvents = (input, context) => {
2241
+ const se_MetricTransformations = (input, context) => {
2660
2242
  return input
2661
2243
  .filter((e) => e != null)
2662
2244
  .map((entry) => {
2663
- return se_InputLogEvent(entry, context);
2245
+ return se_MetricTransformation(entry, context);
2664
2246
  });
2665
2247
  };
2666
- const se_InputLogStreamNames = (input, context) => {
2667
- return input
2668
- .filter((e) => e != null)
2669
- .map((entry) => {
2670
- return entry;
2248
+ const se_PutMetricFilterRequest = (input, context) => {
2249
+ return take(input, {
2250
+ filterName: [],
2251
+ filterPattern: [],
2252
+ logGroupName: [],
2253
+ metricTransformations: (_) => se_MetricTransformations(_, context),
2671
2254
  });
2672
2255
  };
2673
- const se_ListTagsForResourceRequest = (input, context) => {
2674
- return {
2675
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
2676
- };
2256
+ const de_DescribeMetricFiltersResponse = (output, context) => {
2257
+ return take(output, {
2258
+ metricFilters: (_) => de_MetricFilters(_, context),
2259
+ nextToken: __expectString,
2260
+ });
2677
2261
  };
2678
- const se_ListTagsLogGroupRequest = (input, context) => {
2679
- return {
2680
- ...(input.logGroupName != null && { logGroupName: input.logGroupName }),
2681
- };
2262
+ const de_GetQueryResultsResponse = (output, context) => {
2263
+ return take(output, {
2264
+ results: _json,
2265
+ statistics: (_) => de_QueryStatistics(_, context),
2266
+ status: __expectString,
2267
+ });
2682
2268
  };
2683
- const se_LogGroupIdentifiers = (input, context) => {
2684
- return input
2685
- .filter((e) => e != null)
2686
- .map((entry) => {
2687
- return entry;
2269
+ const de_MetricFilter = (output, context) => {
2270
+ return take(output, {
2271
+ creationTime: __expectLong,
2272
+ filterName: __expectString,
2273
+ filterPattern: __expectString,
2274
+ logGroupName: __expectString,
2275
+ metricTransformations: (_) => de_MetricTransformations(_, context),
2688
2276
  });
2689
2277
  };
2690
- const se_LogGroupNames = (input, context) => {
2691
- return input
2278
+ const de_MetricFilters = (output, context) => {
2279
+ const retVal = (output || [])
2692
2280
  .filter((e) => e != null)
2693
2281
  .map((entry) => {
2694
- return entry;
2282
+ return de_MetricFilter(entry, context);
2695
2283
  });
2284
+ return retVal;
2696
2285
  };
2697
- const se_MetricTransformation = (input, context) => {
2698
- return {
2699
- ...(input.defaultValue != null && { defaultValue: __serializeFloat(input.defaultValue) }),
2700
- ...(input.dimensions != null && { dimensions: se_Dimensions(input.dimensions, context) }),
2701
- ...(input.metricName != null && { metricName: input.metricName }),
2702
- ...(input.metricNamespace != null && { metricNamespace: input.metricNamespace }),
2703
- ...(input.metricValue != null && { metricValue: input.metricValue }),
2704
- ...(input.unit != null && { unit: input.unit }),
2705
- };
2286
+ const de_MetricTransformation = (output, context) => {
2287
+ return take(output, {
2288
+ defaultValue: __limitedParseDouble,
2289
+ dimensions: _json,
2290
+ metricName: __expectString,
2291
+ metricNamespace: __expectString,
2292
+ metricValue: __expectString,
2293
+ unit: __expectString,
2294
+ });
2706
2295
  };
2707
- const se_MetricTransformations = (input, context) => {
2708
- return input
2296
+ const de_MetricTransformations = (output, context) => {
2297
+ const retVal = (output || [])
2709
2298
  .filter((e) => e != null)
2710
2299
  .map((entry) => {
2711
- return se_MetricTransformation(entry, context);
2300
+ return de_MetricTransformation(entry, context);
2712
2301
  });
2302
+ return retVal;
2713
2303
  };
2714
- const se_PutDataProtectionPolicyRequest = (input, context) => {
2715
- return {
2716
- ...(input.logGroupIdentifier != null && { logGroupIdentifier: input.logGroupIdentifier }),
2717
- ...(input.policyDocument != null && { policyDocument: input.policyDocument }),
2718
- };
2304
+ const de_QueryStatistics = (output, context) => {
2305
+ return take(output, {
2306
+ bytesScanned: __limitedParseDouble,
2307
+ recordsMatched: __limitedParseDouble,
2308
+ recordsScanned: __limitedParseDouble,
2309
+ });
2719
2310
  };
2720
- const se_PutDestinationPolicyRequest = (input, context) => {
2721
- return {
2722
- ...(input.accessPolicy != null && { accessPolicy: input.accessPolicy }),
2723
- ...(input.destinationName != null && { destinationName: input.destinationName }),
2724
- ...(input.forceUpdate != null && { forceUpdate: input.forceUpdate }),
2725
- };
2311
+ const deserializeMetadata = (output) => ({
2312
+ httpStatusCode: output.statusCode,
2313
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
2314
+ extendedRequestId: output.headers["x-amz-id-2"],
2315
+ cfId: output.headers["x-amz-cf-id"],
2316
+ });
2317
+ const collectBody = (streamBody = new Uint8Array(), context) => {
2318
+ if (streamBody instanceof Uint8Array) {
2319
+ return Promise.resolve(streamBody);
2320
+ }
2321
+ return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2726
2322
  };
2727
- const se_PutDestinationRequest = (input, context) => {
2728
- return {
2729
- ...(input.destinationName != null && { destinationName: input.destinationName }),
2730
- ...(input.roleArn != null && { roleArn: input.roleArn }),
2731
- ...(input.tags != null && { tags: se_Tags(input.tags, context) }),
2732
- ...(input.targetArn != null && { targetArn: input.targetArn }),
2733
- };
2734
- };
2735
- const se_PutLogEventsRequest = (input, context) => {
2736
- return {
2737
- ...(input.logEvents != null && { logEvents: se_InputLogEvents(input.logEvents, context) }),
2738
- ...(input.logGroupName != null && { logGroupName: input.logGroupName }),
2739
- ...(input.logStreamName != null && { logStreamName: input.logStreamName }),
2740
- ...(input.sequenceToken != null && { sequenceToken: input.sequenceToken }),
2741
- };
2742
- };
2743
- const se_PutMetricFilterRequest = (input, context) => {
2744
- return {
2745
- ...(input.filterName != null && { filterName: input.filterName }),
2746
- ...(input.filterPattern != null && { filterPattern: input.filterPattern }),
2747
- ...(input.logGroupName != null && { logGroupName: input.logGroupName }),
2748
- ...(input.metricTransformations != null && {
2749
- metricTransformations: se_MetricTransformations(input.metricTransformations, context),
2750
- }),
2751
- };
2752
- };
2753
- const se_PutQueryDefinitionRequest = (input, context) => {
2754
- return {
2755
- ...(input.logGroupNames != null && { logGroupNames: se_LogGroupNames(input.logGroupNames, context) }),
2756
- ...(input.name != null && { name: input.name }),
2757
- ...(input.queryDefinitionId != null && { queryDefinitionId: input.queryDefinitionId }),
2758
- ...(input.queryString != null && { queryString: input.queryString }),
2759
- };
2760
- };
2761
- const se_PutResourcePolicyRequest = (input, context) => {
2762
- return {
2763
- ...(input.policyDocument != null && { policyDocument: input.policyDocument }),
2764
- ...(input.policyName != null && { policyName: input.policyName }),
2765
- };
2766
- };
2767
- const se_PutRetentionPolicyRequest = (input, context) => {
2768
- return {
2769
- ...(input.logGroupName != null && { logGroupName: input.logGroupName }),
2770
- ...(input.retentionInDays != null && { retentionInDays: input.retentionInDays }),
2771
- };
2772
- };
2773
- const se_PutSubscriptionFilterRequest = (input, context) => {
2774
- return {
2775
- ...(input.destinationArn != null && { destinationArn: input.destinationArn }),
2776
- ...(input.distribution != null && { distribution: input.distribution }),
2777
- ...(input.filterName != null && { filterName: input.filterName }),
2778
- ...(input.filterPattern != null && { filterPattern: input.filterPattern }),
2779
- ...(input.logGroupName != null && { logGroupName: input.logGroupName }),
2780
- ...(input.roleArn != null && { roleArn: input.roleArn }),
2781
- };
2782
- };
2783
- const se_StartQueryRequest = (input, context) => {
2784
- return {
2785
- ...(input.endTime != null && { endTime: input.endTime }),
2786
- ...(input.limit != null && { limit: input.limit }),
2787
- ...(input.logGroupIdentifiers != null && {
2788
- logGroupIdentifiers: se_LogGroupIdentifiers(input.logGroupIdentifiers, context),
2789
- }),
2790
- ...(input.logGroupName != null && { logGroupName: input.logGroupName }),
2791
- ...(input.logGroupNames != null && { logGroupNames: se_LogGroupNames(input.logGroupNames, context) }),
2792
- ...(input.queryString != null && { queryString: input.queryString }),
2793
- ...(input.startTime != null && { startTime: input.startTime }),
2794
- };
2795
- };
2796
- const se_StopQueryRequest = (input, context) => {
2797
- return {
2798
- ...(input.queryId != null && { queryId: input.queryId }),
2799
- };
2800
- };
2801
- const se_TagKeyList = (input, context) => {
2802
- return input
2803
- .filter((e) => e != null)
2804
- .map((entry) => {
2805
- return entry;
2806
- });
2807
- };
2808
- const se_TagList = (input, context) => {
2809
- return input
2810
- .filter((e) => e != null)
2811
- .map((entry) => {
2812
- return entry;
2813
- });
2814
- };
2815
- const se_TagLogGroupRequest = (input, context) => {
2816
- return {
2817
- ...(input.logGroupName != null && { logGroupName: input.logGroupName }),
2818
- ...(input.tags != null && { tags: se_Tags(input.tags, context) }),
2819
- };
2820
- };
2821
- const se_TagResourceRequest = (input, context) => {
2822
- return {
2823
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
2824
- ...(input.tags != null && { tags: se_Tags(input.tags, context) }),
2825
- };
2826
- };
2827
- const se_Tags = (input, context) => {
2828
- return Object.entries(input).reduce((acc, [key, value]) => {
2829
- if (value === null) {
2830
- return acc;
2831
- }
2832
- acc[key] = value;
2833
- return acc;
2834
- }, {});
2835
- };
2836
- const se_TestEventMessages = (input, context) => {
2837
- return input
2838
- .filter((e) => e != null)
2839
- .map((entry) => {
2840
- return entry;
2841
- });
2842
- };
2843
- const se_TestMetricFilterRequest = (input, context) => {
2844
- return {
2845
- ...(input.filterPattern != null && { filterPattern: input.filterPattern }),
2846
- ...(input.logEventMessages != null && { logEventMessages: se_TestEventMessages(input.logEventMessages, context) }),
2847
- };
2848
- };
2849
- const se_UntagLogGroupRequest = (input, context) => {
2850
- return {
2851
- ...(input.logGroupName != null && { logGroupName: input.logGroupName }),
2852
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
2853
- };
2854
- };
2855
- const se_UntagResourceRequest = (input, context) => {
2856
- return {
2857
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
2858
- ...(input.tagKeys != null && { tagKeys: se_TagKeyList(input.tagKeys, context) }),
2859
- };
2860
- };
2861
- const de_CreateExportTaskResponse = (output, context) => {
2862
- return {
2863
- taskId: __expectString(output.taskId),
2864
- };
2865
- };
2866
- const de_DataAlreadyAcceptedException = (output, context) => {
2867
- return {
2868
- expectedSequenceToken: __expectString(output.expectedSequenceToken),
2869
- message: __expectString(output.message),
2870
- };
2871
- };
2872
- const de_DeleteQueryDefinitionResponse = (output, context) => {
2873
- return {
2874
- success: __expectBoolean(output.success),
2875
- };
2876
- };
2877
- const de_DescribeDestinationsResponse = (output, context) => {
2878
- return {
2879
- destinations: output.destinations != null ? de_Destinations(output.destinations, context) : undefined,
2880
- nextToken: __expectString(output.nextToken),
2881
- };
2882
- };
2883
- const de_DescribeExportTasksResponse = (output, context) => {
2884
- return {
2885
- exportTasks: output.exportTasks != null ? de_ExportTasks(output.exportTasks, context) : undefined,
2886
- nextToken: __expectString(output.nextToken),
2887
- };
2888
- };
2889
- const de_DescribeLogGroupsResponse = (output, context) => {
2890
- return {
2891
- logGroups: output.logGroups != null ? de_LogGroups(output.logGroups, context) : undefined,
2892
- nextToken: __expectString(output.nextToken),
2893
- };
2894
- };
2895
- const de_DescribeLogStreamsResponse = (output, context) => {
2896
- return {
2897
- logStreams: output.logStreams != null ? de_LogStreams(output.logStreams, context) : undefined,
2898
- nextToken: __expectString(output.nextToken),
2899
- };
2900
- };
2901
- const de_DescribeMetricFiltersResponse = (output, context) => {
2902
- return {
2903
- metricFilters: output.metricFilters != null ? de_MetricFilters(output.metricFilters, context) : undefined,
2904
- nextToken: __expectString(output.nextToken),
2905
- };
2906
- };
2907
- const de_DescribeQueriesResponse = (output, context) => {
2908
- return {
2909
- nextToken: __expectString(output.nextToken),
2910
- queries: output.queries != null ? de_QueryInfoList(output.queries, context) : undefined,
2911
- };
2912
- };
2913
- const de_DescribeQueryDefinitionsResponse = (output, context) => {
2914
- return {
2915
- nextToken: __expectString(output.nextToken),
2916
- queryDefinitions: output.queryDefinitions != null ? de_QueryDefinitionList(output.queryDefinitions, context) : undefined,
2917
- };
2918
- };
2919
- const de_DescribeResourcePoliciesResponse = (output, context) => {
2920
- return {
2921
- nextToken: __expectString(output.nextToken),
2922
- resourcePolicies: output.resourcePolicies != null ? de_ResourcePolicies(output.resourcePolicies, context) : undefined,
2923
- };
2924
- };
2925
- const de_DescribeSubscriptionFiltersResponse = (output, context) => {
2926
- return {
2927
- nextToken: __expectString(output.nextToken),
2928
- subscriptionFilters: output.subscriptionFilters != null ? de_SubscriptionFilters(output.subscriptionFilters, context) : undefined,
2929
- };
2930
- };
2931
- const de_Destination = (output, context) => {
2932
- return {
2933
- accessPolicy: __expectString(output.accessPolicy),
2934
- arn: __expectString(output.arn),
2935
- creationTime: __expectLong(output.creationTime),
2936
- destinationName: __expectString(output.destinationName),
2937
- roleArn: __expectString(output.roleArn),
2938
- targetArn: __expectString(output.targetArn),
2939
- };
2940
- };
2941
- const de_Destinations = (output, context) => {
2942
- const retVal = (output || [])
2943
- .filter((e) => e != null)
2944
- .map((entry) => {
2945
- if (entry === null) {
2946
- return null;
2947
- }
2948
- return de_Destination(entry, context);
2949
- });
2950
- return retVal;
2951
- };
2952
- const de_Dimensions = (output, context) => {
2953
- return Object.entries(output).reduce((acc, [key, value]) => {
2954
- if (value === null) {
2955
- return acc;
2956
- }
2957
- acc[key] = __expectString(value);
2958
- return acc;
2959
- }, {});
2960
- };
2961
- const de_ExportTask = (output, context) => {
2962
- return {
2963
- destination: __expectString(output.destination),
2964
- destinationPrefix: __expectString(output.destinationPrefix),
2965
- executionInfo: output.executionInfo != null ? de_ExportTaskExecutionInfo(output.executionInfo, context) : undefined,
2966
- from: __expectLong(output.from),
2967
- logGroupName: __expectString(output.logGroupName),
2968
- status: output.status != null ? de_ExportTaskStatus(output.status, context) : undefined,
2969
- taskId: __expectString(output.taskId),
2970
- taskName: __expectString(output.taskName),
2971
- to: __expectLong(output.to),
2972
- };
2973
- };
2974
- const de_ExportTaskExecutionInfo = (output, context) => {
2975
- return {
2976
- completionTime: __expectLong(output.completionTime),
2977
- creationTime: __expectLong(output.creationTime),
2978
- };
2979
- };
2980
- const de_ExportTasks = (output, context) => {
2981
- const retVal = (output || [])
2982
- .filter((e) => e != null)
2983
- .map((entry) => {
2984
- if (entry === null) {
2985
- return null;
2986
- }
2987
- return de_ExportTask(entry, context);
2988
- });
2989
- return retVal;
2990
- };
2991
- const de_ExportTaskStatus = (output, context) => {
2992
- return {
2993
- code: __expectString(output.code),
2994
- message: __expectString(output.message),
2995
- };
2996
- };
2997
- const de_ExtractedValues = (output, context) => {
2998
- return Object.entries(output).reduce((acc, [key, value]) => {
2999
- if (value === null) {
3000
- return acc;
3001
- }
3002
- acc[key] = __expectString(value);
3003
- return acc;
3004
- }, {});
3005
- };
3006
- const de_FilteredLogEvent = (output, context) => {
3007
- return {
3008
- eventId: __expectString(output.eventId),
3009
- ingestionTime: __expectLong(output.ingestionTime),
3010
- logStreamName: __expectString(output.logStreamName),
3011
- message: __expectString(output.message),
3012
- timestamp: __expectLong(output.timestamp),
3013
- };
3014
- };
3015
- const de_FilteredLogEvents = (output, context) => {
3016
- const retVal = (output || [])
3017
- .filter((e) => e != null)
3018
- .map((entry) => {
3019
- if (entry === null) {
3020
- return null;
3021
- }
3022
- return de_FilteredLogEvent(entry, context);
3023
- });
3024
- return retVal;
3025
- };
3026
- const de_FilterLogEventsResponse = (output, context) => {
3027
- return {
3028
- events: output.events != null ? de_FilteredLogEvents(output.events, context) : undefined,
3029
- nextToken: __expectString(output.nextToken),
3030
- searchedLogStreams: output.searchedLogStreams != null ? de_SearchedLogStreams(output.searchedLogStreams, context) : undefined,
3031
- };
3032
- };
3033
- const de_GetDataProtectionPolicyResponse = (output, context) => {
3034
- return {
3035
- lastUpdatedTime: __expectLong(output.lastUpdatedTime),
3036
- logGroupIdentifier: __expectString(output.logGroupIdentifier),
3037
- policyDocument: __expectString(output.policyDocument),
3038
- };
3039
- };
3040
- const de_GetLogEventsResponse = (output, context) => {
3041
- return {
3042
- events: output.events != null ? de_OutputLogEvents(output.events, context) : undefined,
3043
- nextBackwardToken: __expectString(output.nextBackwardToken),
3044
- nextForwardToken: __expectString(output.nextForwardToken),
3045
- };
3046
- };
3047
- const de_GetLogGroupFieldsResponse = (output, context) => {
3048
- return {
3049
- logGroupFields: output.logGroupFields != null ? de_LogGroupFieldList(output.logGroupFields, context) : undefined,
3050
- };
3051
- };
3052
- const de_GetLogRecordResponse = (output, context) => {
3053
- return {
3054
- logRecord: output.logRecord != null ? de_LogRecord(output.logRecord, context) : undefined,
3055
- };
3056
- };
3057
- const de_GetQueryResultsResponse = (output, context) => {
3058
- return {
3059
- results: output.results != null ? de_QueryResults(output.results, context) : undefined,
3060
- statistics: output.statistics != null ? de_QueryStatistics(output.statistics, context) : undefined,
3061
- status: __expectString(output.status),
3062
- };
3063
- };
3064
- const de_InvalidOperationException = (output, context) => {
3065
- return {
3066
- message: __expectString(output.message),
3067
- };
3068
- };
3069
- const de_InvalidParameterException = (output, context) => {
3070
- return {
3071
- message: __expectString(output.message),
3072
- };
3073
- };
3074
- const de_InvalidSequenceTokenException = (output, context) => {
3075
- return {
3076
- expectedSequenceToken: __expectString(output.expectedSequenceToken),
3077
- message: __expectString(output.message),
3078
- };
3079
- };
3080
- const de_LimitExceededException = (output, context) => {
3081
- return {
3082
- message: __expectString(output.message),
3083
- };
3084
- };
3085
- const de_ListTagsForResourceResponse = (output, context) => {
3086
- return {
3087
- tags: output.tags != null ? de_Tags(output.tags, context) : undefined,
3088
- };
3089
- };
3090
- const de_ListTagsLogGroupResponse = (output, context) => {
3091
- return {
3092
- tags: output.tags != null ? de_Tags(output.tags, context) : undefined,
3093
- };
3094
- };
3095
- const de_LogGroup = (output, context) => {
3096
- return {
3097
- arn: __expectString(output.arn),
3098
- creationTime: __expectLong(output.creationTime),
3099
- dataProtectionStatus: __expectString(output.dataProtectionStatus),
3100
- kmsKeyId: __expectString(output.kmsKeyId),
3101
- logGroupName: __expectString(output.logGroupName),
3102
- metricFilterCount: __expectInt32(output.metricFilterCount),
3103
- retentionInDays: __expectInt32(output.retentionInDays),
3104
- storedBytes: __expectLong(output.storedBytes),
3105
- };
3106
- };
3107
- const de_LogGroupField = (output, context) => {
3108
- return {
3109
- name: __expectString(output.name),
3110
- percent: __expectInt32(output.percent),
3111
- };
3112
- };
3113
- const de_LogGroupFieldList = (output, context) => {
3114
- const retVal = (output || [])
3115
- .filter((e) => e != null)
3116
- .map((entry) => {
3117
- if (entry === null) {
3118
- return null;
3119
- }
3120
- return de_LogGroupField(entry, context);
3121
- });
3122
- return retVal;
3123
- };
3124
- const de_LogGroupNames = (output, context) => {
3125
- const retVal = (output || [])
3126
- .filter((e) => e != null)
3127
- .map((entry) => {
3128
- if (entry === null) {
3129
- return null;
3130
- }
3131
- return __expectString(entry);
3132
- });
3133
- return retVal;
3134
- };
3135
- const de_LogGroups = (output, context) => {
3136
- const retVal = (output || [])
3137
- .filter((e) => e != null)
3138
- .map((entry) => {
3139
- if (entry === null) {
3140
- return null;
3141
- }
3142
- return de_LogGroup(entry, context);
3143
- });
3144
- return retVal;
3145
- };
3146
- const de_LogRecord = (output, context) => {
3147
- return Object.entries(output).reduce((acc, [key, value]) => {
3148
- if (value === null) {
3149
- return acc;
3150
- }
3151
- acc[key] = __expectString(value);
3152
- return acc;
3153
- }, {});
3154
- };
3155
- const de_LogStream = (output, context) => {
3156
- return {
3157
- arn: __expectString(output.arn),
3158
- creationTime: __expectLong(output.creationTime),
3159
- firstEventTimestamp: __expectLong(output.firstEventTimestamp),
3160
- lastEventTimestamp: __expectLong(output.lastEventTimestamp),
3161
- lastIngestionTime: __expectLong(output.lastIngestionTime),
3162
- logStreamName: __expectString(output.logStreamName),
3163
- storedBytes: __expectLong(output.storedBytes),
3164
- uploadSequenceToken: __expectString(output.uploadSequenceToken),
3165
- };
3166
- };
3167
- const de_LogStreams = (output, context) => {
3168
- const retVal = (output || [])
3169
- .filter((e) => e != null)
3170
- .map((entry) => {
3171
- if (entry === null) {
3172
- return null;
3173
- }
3174
- return de_LogStream(entry, context);
3175
- });
3176
- return retVal;
3177
- };
3178
- const de_MalformedQueryException = (output, context) => {
3179
- return {
3180
- message: __expectString(output.message),
3181
- queryCompileError: output.queryCompileError != null ? de_QueryCompileError(output.queryCompileError, context) : undefined,
3182
- };
3183
- };
3184
- const de_MetricFilter = (output, context) => {
3185
- return {
3186
- creationTime: __expectLong(output.creationTime),
3187
- filterName: __expectString(output.filterName),
3188
- filterPattern: __expectString(output.filterPattern),
3189
- logGroupName: __expectString(output.logGroupName),
3190
- metricTransformations: output.metricTransformations != null
3191
- ? de_MetricTransformations(output.metricTransformations, context)
3192
- : undefined,
3193
- };
3194
- };
3195
- const de_MetricFilterMatches = (output, context) => {
3196
- const retVal = (output || [])
3197
- .filter((e) => e != null)
3198
- .map((entry) => {
3199
- if (entry === null) {
3200
- return null;
3201
- }
3202
- return de_MetricFilterMatchRecord(entry, context);
3203
- });
3204
- return retVal;
3205
- };
3206
- const de_MetricFilterMatchRecord = (output, context) => {
3207
- return {
3208
- eventMessage: __expectString(output.eventMessage),
3209
- eventNumber: __expectLong(output.eventNumber),
3210
- extractedValues: output.extractedValues != null ? de_ExtractedValues(output.extractedValues, context) : undefined,
3211
- };
3212
- };
3213
- const de_MetricFilters = (output, context) => {
3214
- const retVal = (output || [])
3215
- .filter((e) => e != null)
3216
- .map((entry) => {
3217
- if (entry === null) {
3218
- return null;
3219
- }
3220
- return de_MetricFilter(entry, context);
3221
- });
3222
- return retVal;
3223
- };
3224
- const de_MetricTransformation = (output, context) => {
3225
- return {
3226
- defaultValue: __limitedParseDouble(output.defaultValue),
3227
- dimensions: output.dimensions != null ? de_Dimensions(output.dimensions, context) : undefined,
3228
- metricName: __expectString(output.metricName),
3229
- metricNamespace: __expectString(output.metricNamespace),
3230
- metricValue: __expectString(output.metricValue),
3231
- unit: __expectString(output.unit),
3232
- };
3233
- };
3234
- const de_MetricTransformations = (output, context) => {
3235
- const retVal = (output || [])
3236
- .filter((e) => e != null)
3237
- .map((entry) => {
3238
- if (entry === null) {
3239
- return null;
3240
- }
3241
- return de_MetricTransformation(entry, context);
3242
- });
3243
- return retVal;
3244
- };
3245
- const de_OperationAbortedException = (output, context) => {
3246
- return {
3247
- message: __expectString(output.message),
3248
- };
3249
- };
3250
- const de_OutputLogEvent = (output, context) => {
3251
- return {
3252
- ingestionTime: __expectLong(output.ingestionTime),
3253
- message: __expectString(output.message),
3254
- timestamp: __expectLong(output.timestamp),
3255
- };
3256
- };
3257
- const de_OutputLogEvents = (output, context) => {
3258
- const retVal = (output || [])
3259
- .filter((e) => e != null)
3260
- .map((entry) => {
3261
- if (entry === null) {
3262
- return null;
3263
- }
3264
- return de_OutputLogEvent(entry, context);
3265
- });
3266
- return retVal;
3267
- };
3268
- const de_PutDataProtectionPolicyResponse = (output, context) => {
3269
- return {
3270
- lastUpdatedTime: __expectLong(output.lastUpdatedTime),
3271
- logGroupIdentifier: __expectString(output.logGroupIdentifier),
3272
- policyDocument: __expectString(output.policyDocument),
3273
- };
3274
- };
3275
- const de_PutDestinationResponse = (output, context) => {
3276
- return {
3277
- destination: output.destination != null ? de_Destination(output.destination, context) : undefined,
3278
- };
3279
- };
3280
- const de_PutLogEventsResponse = (output, context) => {
3281
- return {
3282
- nextSequenceToken: __expectString(output.nextSequenceToken),
3283
- rejectedLogEventsInfo: output.rejectedLogEventsInfo != null
3284
- ? de_RejectedLogEventsInfo(output.rejectedLogEventsInfo, context)
3285
- : undefined,
3286
- };
3287
- };
3288
- const de_PutQueryDefinitionResponse = (output, context) => {
3289
- return {
3290
- queryDefinitionId: __expectString(output.queryDefinitionId),
3291
- };
3292
- };
3293
- const de_PutResourcePolicyResponse = (output, context) => {
3294
- return {
3295
- resourcePolicy: output.resourcePolicy != null ? de_ResourcePolicy(output.resourcePolicy, context) : undefined,
3296
- };
3297
- };
3298
- const de_QueryCompileError = (output, context) => {
3299
- return {
3300
- location: output.location != null ? de_QueryCompileErrorLocation(output.location, context) : undefined,
3301
- message: __expectString(output.message),
3302
- };
3303
- };
3304
- const de_QueryCompileErrorLocation = (output, context) => {
3305
- return {
3306
- endCharOffset: __expectInt32(output.endCharOffset),
3307
- startCharOffset: __expectInt32(output.startCharOffset),
3308
- };
3309
- };
3310
- const de_QueryDefinition = (output, context) => {
3311
- return {
3312
- lastModified: __expectLong(output.lastModified),
3313
- logGroupNames: output.logGroupNames != null ? de_LogGroupNames(output.logGroupNames, context) : undefined,
3314
- name: __expectString(output.name),
3315
- queryDefinitionId: __expectString(output.queryDefinitionId),
3316
- queryString: __expectString(output.queryString),
3317
- };
3318
- };
3319
- const de_QueryDefinitionList = (output, context) => {
3320
- const retVal = (output || [])
3321
- .filter((e) => e != null)
3322
- .map((entry) => {
3323
- if (entry === null) {
3324
- return null;
3325
- }
3326
- return de_QueryDefinition(entry, context);
3327
- });
3328
- return retVal;
3329
- };
3330
- const de_QueryInfo = (output, context) => {
3331
- return {
3332
- createTime: __expectLong(output.createTime),
3333
- logGroupName: __expectString(output.logGroupName),
3334
- queryId: __expectString(output.queryId),
3335
- queryString: __expectString(output.queryString),
3336
- status: __expectString(output.status),
3337
- };
3338
- };
3339
- const de_QueryInfoList = (output, context) => {
3340
- const retVal = (output || [])
3341
- .filter((e) => e != null)
3342
- .map((entry) => {
3343
- if (entry === null) {
3344
- return null;
3345
- }
3346
- return de_QueryInfo(entry, context);
3347
- });
3348
- return retVal;
3349
- };
3350
- const de_QueryResults = (output, context) => {
3351
- const retVal = (output || [])
3352
- .filter((e) => e != null)
3353
- .map((entry) => {
3354
- if (entry === null) {
3355
- return null;
3356
- }
3357
- return de_ResultRows(entry, context);
3358
- });
3359
- return retVal;
3360
- };
3361
- const de_QueryStatistics = (output, context) => {
3362
- return {
3363
- bytesScanned: __limitedParseDouble(output.bytesScanned),
3364
- recordsMatched: __limitedParseDouble(output.recordsMatched),
3365
- recordsScanned: __limitedParseDouble(output.recordsScanned),
3366
- };
3367
- };
3368
- const de_RejectedLogEventsInfo = (output, context) => {
3369
- return {
3370
- expiredLogEventEndIndex: __expectInt32(output.expiredLogEventEndIndex),
3371
- tooNewLogEventStartIndex: __expectInt32(output.tooNewLogEventStartIndex),
3372
- tooOldLogEventEndIndex: __expectInt32(output.tooOldLogEventEndIndex),
3373
- };
3374
- };
3375
- const de_ResourceAlreadyExistsException = (output, context) => {
3376
- return {
3377
- message: __expectString(output.message),
3378
- };
3379
- };
3380
- const de_ResourceNotFoundException = (output, context) => {
3381
- return {
3382
- message: __expectString(output.message),
3383
- };
3384
- };
3385
- const de_ResourcePolicies = (output, context) => {
3386
- const retVal = (output || [])
3387
- .filter((e) => e != null)
3388
- .map((entry) => {
3389
- if (entry === null) {
3390
- return null;
3391
- }
3392
- return de_ResourcePolicy(entry, context);
3393
- });
3394
- return retVal;
3395
- };
3396
- const de_ResourcePolicy = (output, context) => {
3397
- return {
3398
- lastUpdatedTime: __expectLong(output.lastUpdatedTime),
3399
- policyDocument: __expectString(output.policyDocument),
3400
- policyName: __expectString(output.policyName),
3401
- };
3402
- };
3403
- const de_ResultField = (output, context) => {
3404
- return {
3405
- field: __expectString(output.field),
3406
- value: __expectString(output.value),
3407
- };
3408
- };
3409
- const de_ResultRows = (output, context) => {
3410
- const retVal = (output || [])
3411
- .filter((e) => e != null)
3412
- .map((entry) => {
3413
- if (entry === null) {
3414
- return null;
3415
- }
3416
- return de_ResultField(entry, context);
3417
- });
3418
- return retVal;
3419
- };
3420
- const de_SearchedLogStream = (output, context) => {
3421
- return {
3422
- logStreamName: __expectString(output.logStreamName),
3423
- searchedCompletely: __expectBoolean(output.searchedCompletely),
3424
- };
3425
- };
3426
- const de_SearchedLogStreams = (output, context) => {
3427
- const retVal = (output || [])
3428
- .filter((e) => e != null)
3429
- .map((entry) => {
3430
- if (entry === null) {
3431
- return null;
3432
- }
3433
- return de_SearchedLogStream(entry, context);
3434
- });
3435
- return retVal;
3436
- };
3437
- const de_ServiceUnavailableException = (output, context) => {
3438
- return {
3439
- message: __expectString(output.message),
3440
- };
3441
- };
3442
- const de_StartQueryResponse = (output, context) => {
3443
- return {
3444
- queryId: __expectString(output.queryId),
3445
- };
3446
- };
3447
- const de_StopQueryResponse = (output, context) => {
3448
- return {
3449
- success: __expectBoolean(output.success),
3450
- };
3451
- };
3452
- const de_SubscriptionFilter = (output, context) => {
3453
- return {
3454
- creationTime: __expectLong(output.creationTime),
3455
- destinationArn: __expectString(output.destinationArn),
3456
- distribution: __expectString(output.distribution),
3457
- filterName: __expectString(output.filterName),
3458
- filterPattern: __expectString(output.filterPattern),
3459
- logGroupName: __expectString(output.logGroupName),
3460
- roleArn: __expectString(output.roleArn),
3461
- };
3462
- };
3463
- const de_SubscriptionFilters = (output, context) => {
3464
- const retVal = (output || [])
3465
- .filter((e) => e != null)
3466
- .map((entry) => {
3467
- if (entry === null) {
3468
- return null;
3469
- }
3470
- return de_SubscriptionFilter(entry, context);
3471
- });
3472
- return retVal;
3473
- };
3474
- const de_Tags = (output, context) => {
3475
- return Object.entries(output).reduce((acc, [key, value]) => {
3476
- if (value === null) {
3477
- return acc;
3478
- }
3479
- acc[key] = __expectString(value);
3480
- return acc;
3481
- }, {});
3482
- };
3483
- const de_TestMetricFilterResponse = (output, context) => {
3484
- return {
3485
- matches: output.matches != null ? de_MetricFilterMatches(output.matches, context) : undefined,
3486
- };
3487
- };
3488
- const de_TooManyTagsException = (output, context) => {
3489
- return {
3490
- message: __expectString(output.message),
3491
- resourceName: __expectString(output.resourceName),
3492
- };
3493
- };
3494
- const de_UnrecognizedClientException = (output, context) => {
3495
- return {
3496
- message: __expectString(output.message),
3497
- };
3498
- };
3499
- const deserializeMetadata = (output) => ({
3500
- httpStatusCode: output.statusCode,
3501
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
3502
- extendedRequestId: output.headers["x-amz-id-2"],
3503
- cfId: output.headers["x-amz-cf-id"],
3504
- });
3505
- const collectBody = (streamBody = new Uint8Array(), context) => {
3506
- if (streamBody instanceof Uint8Array) {
3507
- return Promise.resolve(streamBody);
3508
- }
3509
- return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
3510
- };
3511
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
3512
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
3513
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3514
- const contents = {
3515
- protocol,
3516
- hostname,
3517
- port,
3518
- method: "POST",
3519
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
3520
- headers,
2323
+ const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
2324
+ const throwDefaultError = withBaseException(__BaseException);
2325
+ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2326
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2327
+ const contents = {
2328
+ protocol,
2329
+ hostname,
2330
+ port,
2331
+ method: "POST",
2332
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
2333
+ headers,
3521
2334
  };
3522
2335
  if (resolvedHostname !== undefined) {
3523
2336
  contents.hostname = resolvedHostname;
@@ -3527,6 +2340,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
3527
2340
  }
3528
2341
  return new __HttpRequest(contents);
3529
2342
  };
2343
+ function sharedHeaders(operation) {
2344
+ return {
2345
+ "content-type": "application/x-amz-json-1.1",
2346
+ "x-amz-target": `Logs_20140328.${operation}`,
2347
+ };
2348
+ }
3530
2349
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
3531
2350
  if (encoded.length) {
3532
2351
  return JSON.parse(encoded);