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