@aws-sdk/client-shield 3.121.0 → 3.130.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.
@@ -2135,25 +2135,23 @@ const deserializeAws_json1_1ResourceNotFoundExceptionResponse = async (parsedOut
2135
2135
  };
2136
2136
  const serializeAws_json1_1AssociateDRTLogBucketRequest = (input, context) => {
2137
2137
  return {
2138
- ...(input.LogBucket !== undefined && input.LogBucket !== null && { LogBucket: input.LogBucket }),
2138
+ ...(input.LogBucket != null && { LogBucket: input.LogBucket }),
2139
2139
  };
2140
2140
  };
2141
2141
  const serializeAws_json1_1AssociateDRTRoleRequest = (input, context) => {
2142
2142
  return {
2143
- ...(input.RoleArn !== undefined && input.RoleArn !== null && { RoleArn: input.RoleArn }),
2143
+ ...(input.RoleArn != null && { RoleArn: input.RoleArn }),
2144
2144
  };
2145
2145
  };
2146
2146
  const serializeAws_json1_1AssociateHealthCheckRequest = (input, context) => {
2147
2147
  return {
2148
- ...(input.HealthCheckArn !== undefined &&
2149
- input.HealthCheckArn !== null && { HealthCheckArn: input.HealthCheckArn }),
2150
- ...(input.ProtectionId !== undefined && input.ProtectionId !== null && { ProtectionId: input.ProtectionId }),
2148
+ ...(input.HealthCheckArn != null && { HealthCheckArn: input.HealthCheckArn }),
2149
+ ...(input.ProtectionId != null && { ProtectionId: input.ProtectionId }),
2151
2150
  };
2152
2151
  };
2153
2152
  const serializeAws_json1_1AssociateProactiveEngagementDetailsRequest = (input, context) => {
2154
2153
  return {
2155
- ...(input.EmergencyContactList !== undefined &&
2156
- input.EmergencyContactList !== null && {
2154
+ ...(input.EmergencyContactList != null && {
2157
2155
  EmergencyContactList: serializeAws_json1_1EmergencyContactList(input.EmergencyContactList, context),
2158
2156
  }),
2159
2157
  };
@@ -2166,21 +2164,19 @@ const serializeAws_json1_1CountAction = (input, context) => {
2166
2164
  };
2167
2165
  const serializeAws_json1_1CreateProtectionGroupRequest = (input, context) => {
2168
2166
  return {
2169
- ...(input.Aggregation !== undefined && input.Aggregation !== null && { Aggregation: input.Aggregation }),
2170
- ...(input.Members !== undefined &&
2171
- input.Members !== null && { Members: serializeAws_json1_1ProtectionGroupMembers(input.Members, context) }),
2172
- ...(input.Pattern !== undefined && input.Pattern !== null && { Pattern: input.Pattern }),
2173
- ...(input.ProtectionGroupId !== undefined &&
2174
- input.ProtectionGroupId !== null && { ProtectionGroupId: input.ProtectionGroupId }),
2175
- ...(input.ResourceType !== undefined && input.ResourceType !== null && { ResourceType: input.ResourceType }),
2176
- ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
2167
+ ...(input.Aggregation != null && { Aggregation: input.Aggregation }),
2168
+ ...(input.Members != null && { Members: serializeAws_json1_1ProtectionGroupMembers(input.Members, context) }),
2169
+ ...(input.Pattern != null && { Pattern: input.Pattern }),
2170
+ ...(input.ProtectionGroupId != null && { ProtectionGroupId: input.ProtectionGroupId }),
2171
+ ...(input.ResourceType != null && { ResourceType: input.ResourceType }),
2172
+ ...(input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
2177
2173
  };
2178
2174
  };
2179
2175
  const serializeAws_json1_1CreateProtectionRequest = (input, context) => {
2180
2176
  return {
2181
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
2182
- ...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }),
2183
- ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
2177
+ ...(input.Name != null && { Name: input.Name }),
2178
+ ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
2179
+ ...(input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
2184
2180
  };
2185
2181
  };
2186
2182
  const serializeAws_json1_1CreateSubscriptionRequest = (input, context) => {
@@ -2188,13 +2184,12 @@ const serializeAws_json1_1CreateSubscriptionRequest = (input, context) => {
2188
2184
  };
2189
2185
  const serializeAws_json1_1DeleteProtectionGroupRequest = (input, context) => {
2190
2186
  return {
2191
- ...(input.ProtectionGroupId !== undefined &&
2192
- input.ProtectionGroupId !== null && { ProtectionGroupId: input.ProtectionGroupId }),
2187
+ ...(input.ProtectionGroupId != null && { ProtectionGroupId: input.ProtectionGroupId }),
2193
2188
  };
2194
2189
  };
2195
2190
  const serializeAws_json1_1DeleteProtectionRequest = (input, context) => {
2196
2191
  return {
2197
- ...(input.ProtectionId !== undefined && input.ProtectionId !== null && { ProtectionId: input.ProtectionId }),
2192
+ ...(input.ProtectionId != null && { ProtectionId: input.ProtectionId }),
2198
2193
  };
2199
2194
  };
2200
2195
  const serializeAws_json1_1DeleteSubscriptionRequest = (input, context) => {
@@ -2202,7 +2197,7 @@ const serializeAws_json1_1DeleteSubscriptionRequest = (input, context) => {
2202
2197
  };
2203
2198
  const serializeAws_json1_1DescribeAttackRequest = (input, context) => {
2204
2199
  return {
2205
- ...(input.AttackId !== undefined && input.AttackId !== null && { AttackId: input.AttackId }),
2200
+ ...(input.AttackId != null && { AttackId: input.AttackId }),
2206
2201
  };
2207
2202
  };
2208
2203
  const serializeAws_json1_1DescribeAttackStatisticsRequest = (input, context) => {
@@ -2216,14 +2211,13 @@ const serializeAws_json1_1DescribeEmergencyContactSettingsRequest = (input, cont
2216
2211
  };
2217
2212
  const serializeAws_json1_1DescribeProtectionGroupRequest = (input, context) => {
2218
2213
  return {
2219
- ...(input.ProtectionGroupId !== undefined &&
2220
- input.ProtectionGroupId !== null && { ProtectionGroupId: input.ProtectionGroupId }),
2214
+ ...(input.ProtectionGroupId != null && { ProtectionGroupId: input.ProtectionGroupId }),
2221
2215
  };
2222
2216
  };
2223
2217
  const serializeAws_json1_1DescribeProtectionRequest = (input, context) => {
2224
2218
  return {
2225
- ...(input.ProtectionId !== undefined && input.ProtectionId !== null && { ProtectionId: input.ProtectionId }),
2226
- ...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }),
2219
+ ...(input.ProtectionId != null && { ProtectionId: input.ProtectionId }),
2220
+ ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
2227
2221
  };
2228
2222
  };
2229
2223
  const serializeAws_json1_1DescribeSubscriptionRequest = (input, context) => {
@@ -2231,7 +2225,7 @@ const serializeAws_json1_1DescribeSubscriptionRequest = (input, context) => {
2231
2225
  };
2232
2226
  const serializeAws_json1_1DisableApplicationLayerAutomaticResponseRequest = (input, context) => {
2233
2227
  return {
2234
- ...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }),
2228
+ ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
2235
2229
  };
2236
2230
  };
2237
2231
  const serializeAws_json1_1DisableProactiveEngagementRequest = (input, context) => {
@@ -2239,7 +2233,7 @@ const serializeAws_json1_1DisableProactiveEngagementRequest = (input, context) =
2239
2233
  };
2240
2234
  const serializeAws_json1_1DisassociateDRTLogBucketRequest = (input, context) => {
2241
2235
  return {
2242
- ...(input.LogBucket !== undefined && input.LogBucket !== null && { LogBucket: input.LogBucket }),
2236
+ ...(input.LogBucket != null && { LogBucket: input.LogBucket }),
2243
2237
  };
2244
2238
  };
2245
2239
  const serializeAws_json1_1DisassociateDRTRoleRequest = (input, context) => {
@@ -2247,16 +2241,15 @@ const serializeAws_json1_1DisassociateDRTRoleRequest = (input, context) => {
2247
2241
  };
2248
2242
  const serializeAws_json1_1DisassociateHealthCheckRequest = (input, context) => {
2249
2243
  return {
2250
- ...(input.HealthCheckArn !== undefined &&
2251
- input.HealthCheckArn !== null && { HealthCheckArn: input.HealthCheckArn }),
2252
- ...(input.ProtectionId !== undefined && input.ProtectionId !== null && { ProtectionId: input.ProtectionId }),
2244
+ ...(input.HealthCheckArn != null && { HealthCheckArn: input.HealthCheckArn }),
2245
+ ...(input.ProtectionId != null && { ProtectionId: input.ProtectionId }),
2253
2246
  };
2254
2247
  };
2255
2248
  const serializeAws_json1_1EmergencyContact = (input, context) => {
2256
2249
  return {
2257
- ...(input.ContactNotes !== undefined && input.ContactNotes !== null && { ContactNotes: input.ContactNotes }),
2258
- ...(input.EmailAddress !== undefined && input.EmailAddress !== null && { EmailAddress: input.EmailAddress }),
2259
- ...(input.PhoneNumber !== undefined && input.PhoneNumber !== null && { PhoneNumber: input.PhoneNumber }),
2250
+ ...(input.ContactNotes != null && { ContactNotes: input.ContactNotes }),
2251
+ ...(input.EmailAddress != null && { EmailAddress: input.EmailAddress }),
2252
+ ...(input.PhoneNumber != null && { PhoneNumber: input.PhoneNumber }),
2260
2253
  };
2261
2254
  };
2262
2255
  const serializeAws_json1_1EmergencyContactList = (input, context) => {
@@ -2271,9 +2264,8 @@ const serializeAws_json1_1EmergencyContactList = (input, context) => {
2271
2264
  };
2272
2265
  const serializeAws_json1_1EnableApplicationLayerAutomaticResponseRequest = (input, context) => {
2273
2266
  return {
2274
- ...(input.Action !== undefined &&
2275
- input.Action !== null && { Action: serializeAws_json1_1ResponseAction(input.Action, context) }),
2276
- ...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }),
2267
+ ...(input.Action != null && { Action: serializeAws_json1_1ResponseAction(input.Action, context) }),
2268
+ ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
2277
2269
  };
2278
2270
  };
2279
2271
  const serializeAws_json1_1EnableProactiveEngagementRequest = (input, context) => {
@@ -2284,41 +2276,37 @@ const serializeAws_json1_1GetSubscriptionStateRequest = (input, context) => {
2284
2276
  };
2285
2277
  const serializeAws_json1_1ListAttacksRequest = (input, context) => {
2286
2278
  return {
2287
- ...(input.EndTime !== undefined &&
2288
- input.EndTime !== null && { EndTime: serializeAws_json1_1TimeRange(input.EndTime, context) }),
2289
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
2290
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
2291
- ...(input.ResourceArns !== undefined &&
2292
- input.ResourceArns !== null && {
2279
+ ...(input.EndTime != null && { EndTime: serializeAws_json1_1TimeRange(input.EndTime, context) }),
2280
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
2281
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
2282
+ ...(input.ResourceArns != null && {
2293
2283
  ResourceArns: serializeAws_json1_1ResourceArnFilterList(input.ResourceArns, context),
2294
2284
  }),
2295
- ...(input.StartTime !== undefined &&
2296
- input.StartTime !== null && { StartTime: serializeAws_json1_1TimeRange(input.StartTime, context) }),
2285
+ ...(input.StartTime != null && { StartTime: serializeAws_json1_1TimeRange(input.StartTime, context) }),
2297
2286
  };
2298
2287
  };
2299
2288
  const serializeAws_json1_1ListProtectionGroupsRequest = (input, context) => {
2300
2289
  return {
2301
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
2302
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
2290
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
2291
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
2303
2292
  };
2304
2293
  };
2305
2294
  const serializeAws_json1_1ListProtectionsRequest = (input, context) => {
2306
2295
  return {
2307
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
2308
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
2296
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
2297
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
2309
2298
  };
2310
2299
  };
2311
2300
  const serializeAws_json1_1ListResourcesInProtectionGroupRequest = (input, context) => {
2312
2301
  return {
2313
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
2314
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
2315
- ...(input.ProtectionGroupId !== undefined &&
2316
- input.ProtectionGroupId !== null && { ProtectionGroupId: input.ProtectionGroupId }),
2302
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
2303
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
2304
+ ...(input.ProtectionGroupId != null && { ProtectionGroupId: input.ProtectionGroupId }),
2317
2305
  };
2318
2306
  };
2319
2307
  const serializeAws_json1_1ListTagsForResourceRequest = (input, context) => {
2320
2308
  return {
2321
- ...(input.ResourceARN !== undefined && input.ResourceARN !== null && { ResourceARN: input.ResourceARN }),
2309
+ ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
2322
2310
  };
2323
2311
  };
2324
2312
  const serializeAws_json1_1ProtectionGroupMembers = (input, context) => {
@@ -2343,16 +2331,14 @@ const serializeAws_json1_1ResourceArnFilterList = (input, context) => {
2343
2331
  };
2344
2332
  const serializeAws_json1_1ResponseAction = (input, context) => {
2345
2333
  return {
2346
- ...(input.Block !== undefined &&
2347
- input.Block !== null && { Block: serializeAws_json1_1BlockAction(input.Block, context) }),
2348
- ...(input.Count !== undefined &&
2349
- input.Count !== null && { Count: serializeAws_json1_1CountAction(input.Count, context) }),
2334
+ ...(input.Block != null && { Block: serializeAws_json1_1BlockAction(input.Block, context) }),
2335
+ ...(input.Count != null && { Count: serializeAws_json1_1CountAction(input.Count, context) }),
2350
2336
  };
2351
2337
  };
2352
2338
  const serializeAws_json1_1Tag = (input, context) => {
2353
2339
  return {
2354
- ...(input.Key !== undefined && input.Key !== null && { Key: input.Key }),
2355
- ...(input.Value !== undefined && input.Value !== null && { Value: input.Value }),
2340
+ ...(input.Key != null && { Key: input.Key }),
2341
+ ...(input.Value != null && { Value: input.Value }),
2356
2342
  };
2357
2343
  };
2358
2344
  const serializeAws_json1_1TagKeyList = (input, context) => {
@@ -2377,54 +2363,47 @@ const serializeAws_json1_1TagList = (input, context) => {
2377
2363
  };
2378
2364
  const serializeAws_json1_1TagResourceRequest = (input, context) => {
2379
2365
  return {
2380
- ...(input.ResourceARN !== undefined && input.ResourceARN !== null && { ResourceARN: input.ResourceARN }),
2381
- ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
2366
+ ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
2367
+ ...(input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
2382
2368
  };
2383
2369
  };
2384
2370
  const serializeAws_json1_1TimeRange = (input, context) => {
2385
2371
  return {
2386
- ...(input.FromInclusive !== undefined &&
2387
- input.FromInclusive !== null && { FromInclusive: Math.round(input.FromInclusive.getTime() / 1000) }),
2388
- ...(input.ToExclusive !== undefined &&
2389
- input.ToExclusive !== null && { ToExclusive: Math.round(input.ToExclusive.getTime() / 1000) }),
2372
+ ...(input.FromInclusive != null && { FromInclusive: Math.round(input.FromInclusive.getTime() / 1000) }),
2373
+ ...(input.ToExclusive != null && { ToExclusive: Math.round(input.ToExclusive.getTime() / 1000) }),
2390
2374
  };
2391
2375
  };
2392
2376
  const serializeAws_json1_1UntagResourceRequest = (input, context) => {
2393
2377
  return {
2394
- ...(input.ResourceARN !== undefined && input.ResourceARN !== null && { ResourceARN: input.ResourceARN }),
2395
- ...(input.TagKeys !== undefined &&
2396
- input.TagKeys !== null && { TagKeys: serializeAws_json1_1TagKeyList(input.TagKeys, context) }),
2378
+ ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
2379
+ ...(input.TagKeys != null && { TagKeys: serializeAws_json1_1TagKeyList(input.TagKeys, context) }),
2397
2380
  };
2398
2381
  };
2399
2382
  const serializeAws_json1_1UpdateApplicationLayerAutomaticResponseRequest = (input, context) => {
2400
2383
  return {
2401
- ...(input.Action !== undefined &&
2402
- input.Action !== null && { Action: serializeAws_json1_1ResponseAction(input.Action, context) }),
2403
- ...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }),
2384
+ ...(input.Action != null && { Action: serializeAws_json1_1ResponseAction(input.Action, context) }),
2385
+ ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
2404
2386
  };
2405
2387
  };
2406
2388
  const serializeAws_json1_1UpdateEmergencyContactSettingsRequest = (input, context) => {
2407
2389
  return {
2408
- ...(input.EmergencyContactList !== undefined &&
2409
- input.EmergencyContactList !== null && {
2390
+ ...(input.EmergencyContactList != null && {
2410
2391
  EmergencyContactList: serializeAws_json1_1EmergencyContactList(input.EmergencyContactList, context),
2411
2392
  }),
2412
2393
  };
2413
2394
  };
2414
2395
  const serializeAws_json1_1UpdateProtectionGroupRequest = (input, context) => {
2415
2396
  return {
2416
- ...(input.Aggregation !== undefined && input.Aggregation !== null && { Aggregation: input.Aggregation }),
2417
- ...(input.Members !== undefined &&
2418
- input.Members !== null && { Members: serializeAws_json1_1ProtectionGroupMembers(input.Members, context) }),
2419
- ...(input.Pattern !== undefined && input.Pattern !== null && { Pattern: input.Pattern }),
2420
- ...(input.ProtectionGroupId !== undefined &&
2421
- input.ProtectionGroupId !== null && { ProtectionGroupId: input.ProtectionGroupId }),
2422
- ...(input.ResourceType !== undefined && input.ResourceType !== null && { ResourceType: input.ResourceType }),
2397
+ ...(input.Aggregation != null && { Aggregation: input.Aggregation }),
2398
+ ...(input.Members != null && { Members: serializeAws_json1_1ProtectionGroupMembers(input.Members, context) }),
2399
+ ...(input.Pattern != null && { Pattern: input.Pattern }),
2400
+ ...(input.ProtectionGroupId != null && { ProtectionGroupId: input.ProtectionGroupId }),
2401
+ ...(input.ResourceType != null && { ResourceType: input.ResourceType }),
2423
2402
  };
2424
2403
  };
2425
2404
  const serializeAws_json1_1UpdateSubscriptionRequest = (input, context) => {
2426
2405
  return {
2427
- ...(input.AutoRenew !== undefined && input.AutoRenew !== null && { AutoRenew: input.AutoRenew }),
2406
+ ...(input.AutoRenew != null && { AutoRenew: input.AutoRenew }),
2428
2407
  };
2429
2408
  };
2430
2409
  const deserializeAws_json1_1AccessDeniedException = (output, context) => {
@@ -2439,9 +2418,7 @@ const deserializeAws_json1_1AccessDeniedForDependencyException = (output, contex
2439
2418
  };
2440
2419
  const deserializeAws_json1_1ApplicationLayerAutomaticResponseConfiguration = (output, context) => {
2441
2420
  return {
2442
- Action: output.Action !== undefined && output.Action !== null
2443
- ? deserializeAws_json1_1ResponseAction(output.Action, context)
2444
- : undefined,
2421
+ Action: output.Action != null ? deserializeAws_json1_1ResponseAction(output.Action, context) : undefined,
2445
2422
  Status: (0, smithy_client_1.expectString)(output.Status),
2446
2423
  };
2447
2424
  };
@@ -2459,24 +2436,18 @@ const deserializeAws_json1_1AssociateProactiveEngagementDetailsResponse = (outpu
2459
2436
  };
2460
2437
  const deserializeAws_json1_1AttackDetail = (output, context) => {
2461
2438
  return {
2462
- AttackCounters: output.AttackCounters !== undefined && output.AttackCounters !== null
2439
+ AttackCounters: output.AttackCounters != null
2463
2440
  ? deserializeAws_json1_1SummarizedCounterList(output.AttackCounters, context)
2464
2441
  : undefined,
2465
2442
  AttackId: (0, smithy_client_1.expectString)(output.AttackId),
2466
- AttackProperties: output.AttackProperties !== undefined && output.AttackProperties !== null
2443
+ AttackProperties: output.AttackProperties != null
2467
2444
  ? deserializeAws_json1_1AttackProperties(output.AttackProperties, context)
2468
2445
  : undefined,
2469
- EndTime: output.EndTime !== undefined && output.EndTime !== null
2470
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.EndTime)))
2471
- : undefined,
2472
- Mitigations: output.Mitigations !== undefined && output.Mitigations !== null
2473
- ? deserializeAws_json1_1MitigationList(output.Mitigations, context)
2474
- : undefined,
2446
+ EndTime: output.EndTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.EndTime))) : undefined,
2447
+ Mitigations: output.Mitigations != null ? deserializeAws_json1_1MitigationList(output.Mitigations, context) : undefined,
2475
2448
  ResourceArn: (0, smithy_client_1.expectString)(output.ResourceArn),
2476
- StartTime: output.StartTime !== undefined && output.StartTime !== null
2477
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartTime)))
2478
- : undefined,
2479
- SubResources: output.SubResources !== undefined && output.SubResources !== null
2449
+ StartTime: output.StartTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartTime))) : undefined,
2450
+ SubResources: output.SubResources != null
2480
2451
  ? deserializeAws_json1_1SubResourceSummaryList(output.SubResources, context)
2481
2452
  : undefined,
2482
2453
  };
@@ -2496,7 +2467,7 @@ const deserializeAws_json1_1AttackProperty = (output, context) => {
2496
2467
  return {
2497
2468
  AttackLayer: (0, smithy_client_1.expectString)(output.AttackLayer),
2498
2469
  AttackPropertyIdentifier: (0, smithy_client_1.expectString)(output.AttackPropertyIdentifier),
2499
- TopContributors: output.TopContributors !== undefined && output.TopContributors !== null
2470
+ TopContributors: output.TopContributors != null
2500
2471
  ? deserializeAws_json1_1TopContributors(output.TopContributors, context)
2501
2472
  : undefined,
2502
2473
  Total: (0, smithy_client_1.expectLong)(output.Total),
@@ -2506,9 +2477,7 @@ const deserializeAws_json1_1AttackProperty = (output, context) => {
2506
2477
  const deserializeAws_json1_1AttackStatisticsDataItem = (output, context) => {
2507
2478
  return {
2508
2479
  AttackCount: (0, smithy_client_1.expectLong)(output.AttackCount),
2509
- AttackVolume: output.AttackVolume !== undefined && output.AttackVolume !== null
2510
- ? deserializeAws_json1_1AttackVolume(output.AttackVolume, context)
2511
- : undefined,
2480
+ AttackVolume: output.AttackVolume != null ? deserializeAws_json1_1AttackVolume(output.AttackVolume, context) : undefined,
2512
2481
  };
2513
2482
  };
2514
2483
  const deserializeAws_json1_1AttackStatisticsDataList = (output, context) => {
@@ -2536,16 +2505,12 @@ const deserializeAws_json1_1AttackSummaries = (output, context) => {
2536
2505
  const deserializeAws_json1_1AttackSummary = (output, context) => {
2537
2506
  return {
2538
2507
  AttackId: (0, smithy_client_1.expectString)(output.AttackId),
2539
- AttackVectors: output.AttackVectors !== undefined && output.AttackVectors !== null
2508
+ AttackVectors: output.AttackVectors != null
2540
2509
  ? deserializeAws_json1_1AttackVectorDescriptionList(output.AttackVectors, context)
2541
2510
  : undefined,
2542
- EndTime: output.EndTime !== undefined && output.EndTime !== null
2543
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.EndTime)))
2544
- : undefined,
2511
+ EndTime: output.EndTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.EndTime))) : undefined,
2545
2512
  ResourceArn: (0, smithy_client_1.expectString)(output.ResourceArn),
2546
- StartTime: output.StartTime !== undefined && output.StartTime !== null
2547
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartTime)))
2548
- : undefined,
2513
+ StartTime: output.StartTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartTime))) : undefined,
2549
2514
  };
2550
2515
  };
2551
2516
  const deserializeAws_json1_1AttackVectorDescription = (output, context) => {
@@ -2566,13 +2531,13 @@ const deserializeAws_json1_1AttackVectorDescriptionList = (output, context) => {
2566
2531
  };
2567
2532
  const deserializeAws_json1_1AttackVolume = (output, context) => {
2568
2533
  return {
2569
- BitsPerSecond: output.BitsPerSecond !== undefined && output.BitsPerSecond !== null
2534
+ BitsPerSecond: output.BitsPerSecond != null
2570
2535
  ? deserializeAws_json1_1AttackVolumeStatistics(output.BitsPerSecond, context)
2571
2536
  : undefined,
2572
- PacketsPerSecond: output.PacketsPerSecond !== undefined && output.PacketsPerSecond !== null
2537
+ PacketsPerSecond: output.PacketsPerSecond != null
2573
2538
  ? deserializeAws_json1_1AttackVolumeStatistics(output.PacketsPerSecond, context)
2574
2539
  : undefined,
2575
- RequestsPerSecond: output.RequestsPerSecond !== undefined && output.RequestsPerSecond !== null
2540
+ RequestsPerSecond: output.RequestsPerSecond != null
2576
2541
  ? deserializeAws_json1_1AttackVolumeStatistics(output.RequestsPerSecond, context)
2577
2542
  : undefined,
2578
2543
  };
@@ -2616,55 +2581,43 @@ const deserializeAws_json1_1DeleteSubscriptionResponse = (output, context) => {
2616
2581
  };
2617
2582
  const deserializeAws_json1_1DescribeAttackResponse = (output, context) => {
2618
2583
  return {
2619
- Attack: output.Attack !== undefined && output.Attack !== null
2620
- ? deserializeAws_json1_1AttackDetail(output.Attack, context)
2621
- : undefined,
2584
+ Attack: output.Attack != null ? deserializeAws_json1_1AttackDetail(output.Attack, context) : undefined,
2622
2585
  };
2623
2586
  };
2624
2587
  const deserializeAws_json1_1DescribeAttackStatisticsResponse = (output, context) => {
2625
2588
  return {
2626
- DataItems: output.DataItems !== undefined && output.DataItems !== null
2627
- ? deserializeAws_json1_1AttackStatisticsDataList(output.DataItems, context)
2628
- : undefined,
2629
- TimeRange: output.TimeRange !== undefined && output.TimeRange !== null
2630
- ? deserializeAws_json1_1TimeRange(output.TimeRange, context)
2631
- : undefined,
2589
+ DataItems: output.DataItems != null ? deserializeAws_json1_1AttackStatisticsDataList(output.DataItems, context) : undefined,
2590
+ TimeRange: output.TimeRange != null ? deserializeAws_json1_1TimeRange(output.TimeRange, context) : undefined,
2632
2591
  };
2633
2592
  };
2634
2593
  const deserializeAws_json1_1DescribeDRTAccessResponse = (output, context) => {
2635
2594
  return {
2636
- LogBucketList: output.LogBucketList !== undefined && output.LogBucketList !== null
2637
- ? deserializeAws_json1_1LogBucketList(output.LogBucketList, context)
2638
- : undefined,
2595
+ LogBucketList: output.LogBucketList != null ? deserializeAws_json1_1LogBucketList(output.LogBucketList, context) : undefined,
2639
2596
  RoleArn: (0, smithy_client_1.expectString)(output.RoleArn),
2640
2597
  };
2641
2598
  };
2642
2599
  const deserializeAws_json1_1DescribeEmergencyContactSettingsResponse = (output, context) => {
2643
2600
  return {
2644
- EmergencyContactList: output.EmergencyContactList !== undefined && output.EmergencyContactList !== null
2601
+ EmergencyContactList: output.EmergencyContactList != null
2645
2602
  ? deserializeAws_json1_1EmergencyContactList(output.EmergencyContactList, context)
2646
2603
  : undefined,
2647
2604
  };
2648
2605
  };
2649
2606
  const deserializeAws_json1_1DescribeProtectionGroupResponse = (output, context) => {
2650
2607
  return {
2651
- ProtectionGroup: output.ProtectionGroup !== undefined && output.ProtectionGroup !== null
2608
+ ProtectionGroup: output.ProtectionGroup != null
2652
2609
  ? deserializeAws_json1_1ProtectionGroup(output.ProtectionGroup, context)
2653
2610
  : undefined,
2654
2611
  };
2655
2612
  };
2656
2613
  const deserializeAws_json1_1DescribeProtectionResponse = (output, context) => {
2657
2614
  return {
2658
- Protection: output.Protection !== undefined && output.Protection !== null
2659
- ? deserializeAws_json1_1Protection(output.Protection, context)
2660
- : undefined,
2615
+ Protection: output.Protection != null ? deserializeAws_json1_1Protection(output.Protection, context) : undefined,
2661
2616
  };
2662
2617
  };
2663
2618
  const deserializeAws_json1_1DescribeSubscriptionResponse = (output, context) => {
2664
2619
  return {
2665
- Subscription: output.Subscription !== undefined && output.Subscription !== null
2666
- ? deserializeAws_json1_1Subscription(output.Subscription, context)
2667
- : undefined,
2620
+ Subscription: output.Subscription != null ? deserializeAws_json1_1Subscription(output.Subscription, context) : undefined,
2668
2621
  };
2669
2622
  };
2670
2623
  const deserializeAws_json1_1DisableApplicationLayerAutomaticResponseResponse = (output, context) => {
@@ -2739,9 +2692,7 @@ const deserializeAws_json1_1InvalidPaginationTokenException = (output, context)
2739
2692
  };
2740
2693
  const deserializeAws_json1_1InvalidParameterException = (output, context) => {
2741
2694
  return {
2742
- fields: output.fields !== undefined && output.fields !== null
2743
- ? deserializeAws_json1_1ValidationExceptionFieldList(output.fields, context)
2744
- : undefined,
2695
+ fields: output.fields != null ? deserializeAws_json1_1ValidationExceptionFieldList(output.fields, context) : undefined,
2745
2696
  message: (0, smithy_client_1.expectString)(output.message),
2746
2697
  reason: (0, smithy_client_1.expectString)(output.reason),
2747
2698
  };
@@ -2777,7 +2728,7 @@ const deserializeAws_json1_1LimitsExceededException = (output, context) => {
2777
2728
  };
2778
2729
  const deserializeAws_json1_1ListAttacksResponse = (output, context) => {
2779
2730
  return {
2780
- AttackSummaries: output.AttackSummaries !== undefined && output.AttackSummaries !== null
2731
+ AttackSummaries: output.AttackSummaries != null
2781
2732
  ? deserializeAws_json1_1AttackSummaries(output.AttackSummaries, context)
2782
2733
  : undefined,
2783
2734
  NextToken: (0, smithy_client_1.expectString)(output.NextToken),
@@ -2786,7 +2737,7 @@ const deserializeAws_json1_1ListAttacksResponse = (output, context) => {
2786
2737
  const deserializeAws_json1_1ListProtectionGroupsResponse = (output, context) => {
2787
2738
  return {
2788
2739
  NextToken: (0, smithy_client_1.expectString)(output.NextToken),
2789
- ProtectionGroups: output.ProtectionGroups !== undefined && output.ProtectionGroups !== null
2740
+ ProtectionGroups: output.ProtectionGroups != null
2790
2741
  ? deserializeAws_json1_1ProtectionGroups(output.ProtectionGroups, context)
2791
2742
  : undefined,
2792
2743
  };
@@ -2794,24 +2745,18 @@ const deserializeAws_json1_1ListProtectionGroupsResponse = (output, context) =>
2794
2745
  const deserializeAws_json1_1ListProtectionsResponse = (output, context) => {
2795
2746
  return {
2796
2747
  NextToken: (0, smithy_client_1.expectString)(output.NextToken),
2797
- Protections: output.Protections !== undefined && output.Protections !== null
2798
- ? deserializeAws_json1_1Protections(output.Protections, context)
2799
- : undefined,
2748
+ Protections: output.Protections != null ? deserializeAws_json1_1Protections(output.Protections, context) : undefined,
2800
2749
  };
2801
2750
  };
2802
2751
  const deserializeAws_json1_1ListResourcesInProtectionGroupResponse = (output, context) => {
2803
2752
  return {
2804
2753
  NextToken: (0, smithy_client_1.expectString)(output.NextToken),
2805
- ResourceArns: output.ResourceArns !== undefined && output.ResourceArns !== null
2806
- ? deserializeAws_json1_1ResourceArnList(output.ResourceArns, context)
2807
- : undefined,
2754
+ ResourceArns: output.ResourceArns != null ? deserializeAws_json1_1ResourceArnList(output.ResourceArns, context) : undefined,
2808
2755
  };
2809
2756
  };
2810
2757
  const deserializeAws_json1_1ListTagsForResourceResponse = (output, context) => {
2811
2758
  return {
2812
- Tags: output.Tags !== undefined && output.Tags !== null
2813
- ? deserializeAws_json1_1TagList(output.Tags, context)
2814
- : undefined,
2759
+ Tags: output.Tags != null ? deserializeAws_json1_1TagList(output.Tags, context) : undefined,
2815
2760
  };
2816
2761
  };
2817
2762
  const deserializeAws_json1_1LockedSubscriptionException = (output, context) => {
@@ -2858,13 +2803,10 @@ const deserializeAws_json1_1OptimisticLockException = (output, context) => {
2858
2803
  };
2859
2804
  const deserializeAws_json1_1Protection = (output, context) => {
2860
2805
  return {
2861
- ApplicationLayerAutomaticResponseConfiguration: output.ApplicationLayerAutomaticResponseConfiguration !== undefined &&
2862
- output.ApplicationLayerAutomaticResponseConfiguration !== null
2806
+ ApplicationLayerAutomaticResponseConfiguration: output.ApplicationLayerAutomaticResponseConfiguration != null
2863
2807
  ? deserializeAws_json1_1ApplicationLayerAutomaticResponseConfiguration(output.ApplicationLayerAutomaticResponseConfiguration, context)
2864
2808
  : undefined,
2865
- HealthCheckIds: output.HealthCheckIds !== undefined && output.HealthCheckIds !== null
2866
- ? deserializeAws_json1_1HealthCheckIds(output.HealthCheckIds, context)
2867
- : undefined,
2809
+ HealthCheckIds: output.HealthCheckIds != null ? deserializeAws_json1_1HealthCheckIds(output.HealthCheckIds, context) : undefined,
2868
2810
  Id: (0, smithy_client_1.expectString)(output.Id),
2869
2811
  Name: (0, smithy_client_1.expectString)(output.Name),
2870
2812
  ProtectionArn: (0, smithy_client_1.expectString)(output.ProtectionArn),
@@ -2874,9 +2816,7 @@ const deserializeAws_json1_1Protection = (output, context) => {
2874
2816
  const deserializeAws_json1_1ProtectionGroup = (output, context) => {
2875
2817
  return {
2876
2818
  Aggregation: (0, smithy_client_1.expectString)(output.Aggregation),
2877
- Members: output.Members !== undefined && output.Members !== null
2878
- ? deserializeAws_json1_1ProtectionGroupMembers(output.Members, context)
2879
- : undefined,
2819
+ Members: output.Members != null ? deserializeAws_json1_1ProtectionGroupMembers(output.Members, context) : undefined,
2880
2820
  Pattern: (0, smithy_client_1.expectString)(output.Pattern),
2881
2821
  ProtectionGroupArn: (0, smithy_client_1.expectString)(output.ProtectionGroupArn),
2882
2822
  ProtectionGroupId: (0, smithy_client_1.expectString)(output.ProtectionGroupId),
@@ -2891,7 +2831,7 @@ const deserializeAws_json1_1ProtectionGroupArbitraryPatternLimits = (output, con
2891
2831
  const deserializeAws_json1_1ProtectionGroupLimits = (output, context) => {
2892
2832
  return {
2893
2833
  MaxProtectionGroups: (0, smithy_client_1.expectLong)(output.MaxProtectionGroups),
2894
- PatternTypeLimits: output.PatternTypeLimits !== undefined && output.PatternTypeLimits !== null
2834
+ PatternTypeLimits: output.PatternTypeLimits != null
2895
2835
  ? deserializeAws_json1_1ProtectionGroupPatternTypeLimits(output.PatternTypeLimits, context)
2896
2836
  : undefined,
2897
2837
  };
@@ -2909,7 +2849,7 @@ const deserializeAws_json1_1ProtectionGroupMembers = (output, context) => {
2909
2849
  };
2910
2850
  const deserializeAws_json1_1ProtectionGroupPatternTypeLimits = (output, context) => {
2911
2851
  return {
2912
- ArbitraryPatternLimits: output.ArbitraryPatternLimits !== undefined && output.ArbitraryPatternLimits !== null
2852
+ ArbitraryPatternLimits: output.ArbitraryPatternLimits != null
2913
2853
  ? deserializeAws_json1_1ProtectionGroupArbitraryPatternLimits(output.ArbitraryPatternLimits, context)
2914
2854
  : undefined,
2915
2855
  };
@@ -2927,7 +2867,7 @@ const deserializeAws_json1_1ProtectionGroups = (output, context) => {
2927
2867
  };
2928
2868
  const deserializeAws_json1_1ProtectionLimits = (output, context) => {
2929
2869
  return {
2930
- ProtectedResourceTypeLimits: output.ProtectedResourceTypeLimits !== undefined && output.ProtectedResourceTypeLimits !== null
2870
+ ProtectedResourceTypeLimits: output.ProtectedResourceTypeLimits != null
2931
2871
  ? deserializeAws_json1_1Limits(output.ProtectedResourceTypeLimits, context)
2932
2872
  : undefined,
2933
2873
  };
@@ -2968,22 +2908,16 @@ const deserializeAws_json1_1ResourceNotFoundException = (output, context) => {
2968
2908
  };
2969
2909
  const deserializeAws_json1_1ResponseAction = (output, context) => {
2970
2910
  return {
2971
- Block: output.Block !== undefined && output.Block !== null
2972
- ? deserializeAws_json1_1BlockAction(output.Block, context)
2973
- : undefined,
2974
- Count: output.Count !== undefined && output.Count !== null
2975
- ? deserializeAws_json1_1CountAction(output.Count, context)
2976
- : undefined,
2911
+ Block: output.Block != null ? deserializeAws_json1_1BlockAction(output.Block, context) : undefined,
2912
+ Count: output.Count != null ? deserializeAws_json1_1CountAction(output.Count, context) : undefined,
2977
2913
  };
2978
2914
  };
2979
2915
  const deserializeAws_json1_1SubResourceSummary = (output, context) => {
2980
2916
  return {
2981
- AttackVectors: output.AttackVectors !== undefined && output.AttackVectors !== null
2917
+ AttackVectors: output.AttackVectors != null
2982
2918
  ? deserializeAws_json1_1SummarizedAttackVectorList(output.AttackVectors, context)
2983
2919
  : undefined,
2984
- Counters: output.Counters !== undefined && output.Counters !== null
2985
- ? deserializeAws_json1_1SummarizedCounterList(output.Counters, context)
2986
- : undefined,
2920
+ Counters: output.Counters != null ? deserializeAws_json1_1SummarizedCounterList(output.Counters, context) : undefined,
2987
2921
  Id: (0, smithy_client_1.expectString)(output.Id),
2988
2922
  Type: (0, smithy_client_1.expectString)(output.Type),
2989
2923
  };
@@ -3002,18 +2936,12 @@ const deserializeAws_json1_1SubResourceSummaryList = (output, context) => {
3002
2936
  const deserializeAws_json1_1Subscription = (output, context) => {
3003
2937
  return {
3004
2938
  AutoRenew: (0, smithy_client_1.expectString)(output.AutoRenew),
3005
- EndTime: output.EndTime !== undefined && output.EndTime !== null
3006
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.EndTime)))
3007
- : undefined,
3008
- Limits: output.Limits !== undefined && output.Limits !== null
3009
- ? deserializeAws_json1_1Limits(output.Limits, context)
3010
- : undefined,
2939
+ EndTime: output.EndTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.EndTime))) : undefined,
2940
+ Limits: output.Limits != null ? deserializeAws_json1_1Limits(output.Limits, context) : undefined,
3011
2941
  ProactiveEngagementStatus: (0, smithy_client_1.expectString)(output.ProactiveEngagementStatus),
3012
- StartTime: output.StartTime !== undefined && output.StartTime !== null
3013
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartTime)))
3014
- : undefined,
2942
+ StartTime: output.StartTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartTime))) : undefined,
3015
2943
  SubscriptionArn: (0, smithy_client_1.expectString)(output.SubscriptionArn),
3016
- SubscriptionLimits: output.SubscriptionLimits !== undefined && output.SubscriptionLimits !== null
2944
+ SubscriptionLimits: output.SubscriptionLimits != null
3017
2945
  ? deserializeAws_json1_1SubscriptionLimits(output.SubscriptionLimits, context)
3018
2946
  : undefined,
3019
2947
  TimeCommitmentInSeconds: (0, smithy_client_1.expectLong)(output.TimeCommitmentInSeconds),
@@ -3021,17 +2949,17 @@ const deserializeAws_json1_1Subscription = (output, context) => {
3021
2949
  };
3022
2950
  const deserializeAws_json1_1SubscriptionLimits = (output, context) => {
3023
2951
  return {
3024
- ProtectionGroupLimits: output.ProtectionGroupLimits !== undefined && output.ProtectionGroupLimits !== null
2952
+ ProtectionGroupLimits: output.ProtectionGroupLimits != null
3025
2953
  ? deserializeAws_json1_1ProtectionGroupLimits(output.ProtectionGroupLimits, context)
3026
2954
  : undefined,
3027
- ProtectionLimits: output.ProtectionLimits !== undefined && output.ProtectionLimits !== null
2955
+ ProtectionLimits: output.ProtectionLimits != null
3028
2956
  ? deserializeAws_json1_1ProtectionLimits(output.ProtectionLimits, context)
3029
2957
  : undefined,
3030
2958
  };
3031
2959
  };
3032
2960
  const deserializeAws_json1_1SummarizedAttackVector = (output, context) => {
3033
2961
  return {
3034
- VectorCounters: output.VectorCounters !== undefined && output.VectorCounters !== null
2962
+ VectorCounters: output.VectorCounters != null
3035
2963
  ? deserializeAws_json1_1SummarizedCounterList(output.VectorCounters, context)
3036
2964
  : undefined,
3037
2965
  VectorType: (0, smithy_client_1.expectString)(output.VectorType),
@@ -3091,10 +3019,10 @@ const deserializeAws_json1_1TagResourceResponse = (output, context) => {
3091
3019
  };
3092
3020
  const deserializeAws_json1_1TimeRange = (output, context) => {
3093
3021
  return {
3094
- FromInclusive: output.FromInclusive !== undefined && output.FromInclusive !== null
3022
+ FromInclusive: output.FromInclusive != null
3095
3023
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.FromInclusive)))
3096
3024
  : undefined,
3097
- ToExclusive: output.ToExclusive !== undefined && output.ToExclusive !== null
3025
+ ToExclusive: output.ToExclusive != null
3098
3026
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.ToExclusive)))
3099
3027
  : undefined,
3100
3028
  };
@@ -3186,6 +3114,9 @@ const loadRestJsonErrorCode = (output, data) => {
3186
3114
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
3187
3115
  const sanitizeErrorCode = (rawValue) => {
3188
3116
  let cleanValue = rawValue;
3117
+ if (typeof cleanValue === "number") {
3118
+ cleanValue = cleanValue.toString();
3119
+ }
3189
3120
  if (cleanValue.indexOf(":") >= 0) {
3190
3121
  cleanValue = cleanValue.split(":")[0];
3191
3122
  }