@aws-sdk/client-pinpoint-sms-voice 3.118.0 → 3.127.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,33 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.127.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.126.0...v3.127.0) (2022-07-11)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/client-pinpoint-sms-voice
9
+
10
+
11
+
12
+
13
+
14
+ # [3.121.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.120.0...v3.121.0) (2022-06-30)
15
+
16
+
17
+ ### Features
18
+
19
+ * **clients:** fallback to status code for unmodeled errors ([#3752](https://github.com/aws/aws-sdk-js-v3/issues/3752)) ([49bcc4f](https://github.com/aws/aws-sdk-js-v3/commit/49bcc4f153e890e798a8e82fd5fc397b2dcc449f))
20
+
21
+
22
+
23
+
24
+
25
+ ## [3.118.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.118.0...v3.118.1) (2022-06-27)
26
+
27
+ **Note:** Version bump only for package @aws-sdk/client-pinpoint-sms-voice
28
+
29
+
30
+
31
+
32
+
6
33
  # [3.118.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.117.0...v3.118.0) (2022-06-24)
7
34
 
8
35
  **Note:** Version bump only for package @aws-sdk/client-pinpoint-sms-voice
@@ -13,8 +13,7 @@ const serializeAws_restJson1CreateConfigurationSetCommand = async (input, contex
13
13
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v1/sms-voice/configuration-sets";
14
14
  let body;
15
15
  body = JSON.stringify({
16
- ...(input.ConfigurationSetName !== undefined &&
17
- input.ConfigurationSetName !== null && { ConfigurationSetName: input.ConfigurationSetName }),
16
+ ...(input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName }),
18
17
  });
19
18
  return new protocol_http_1.HttpRequest({
20
19
  protocol,
@@ -46,12 +45,10 @@ const serializeAws_restJson1CreateConfigurationSetEventDestinationCommand = asyn
46
45
  }
47
46
  let body;
48
47
  body = JSON.stringify({
49
- ...(input.EventDestination !== undefined &&
50
- input.EventDestination !== null && {
48
+ ...(input.EventDestination != null && {
51
49
  EventDestination: serializeAws_restJson1EventDestinationDefinition(input.EventDestination, context),
52
50
  }),
53
- ...(input.EventDestinationName !== undefined &&
54
- input.EventDestinationName !== null && { EventDestinationName: input.EventDestinationName }),
51
+ ...(input.EventDestinationName != null && { EventDestinationName: input.EventDestinationName }),
55
52
  });
56
53
  return new protocol_http_1.HttpRequest({
57
54
  protocol,
@@ -184,15 +181,11 @@ const serializeAws_restJson1SendVoiceMessageCommand = async (input, context) =>
184
181
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v1/sms-voice/voice/message";
185
182
  let body;
186
183
  body = JSON.stringify({
187
- ...(input.CallerId !== undefined && input.CallerId !== null && { CallerId: input.CallerId }),
188
- ...(input.ConfigurationSetName !== undefined &&
189
- input.ConfigurationSetName !== null && { ConfigurationSetName: input.ConfigurationSetName }),
190
- ...(input.Content !== undefined &&
191
- input.Content !== null && { Content: serializeAws_restJson1VoiceMessageContent(input.Content, context) }),
192
- ...(input.DestinationPhoneNumber !== undefined &&
193
- input.DestinationPhoneNumber !== null && { DestinationPhoneNumber: input.DestinationPhoneNumber }),
194
- ...(input.OriginationPhoneNumber !== undefined &&
195
- input.OriginationPhoneNumber !== null && { OriginationPhoneNumber: input.OriginationPhoneNumber }),
184
+ ...(input.CallerId != null && { CallerId: input.CallerId }),
185
+ ...(input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName }),
186
+ ...(input.Content != null && { Content: serializeAws_restJson1VoiceMessageContent(input.Content, context) }),
187
+ ...(input.DestinationPhoneNumber != null && { DestinationPhoneNumber: input.DestinationPhoneNumber }),
188
+ ...(input.OriginationPhoneNumber != null && { OriginationPhoneNumber: input.OriginationPhoneNumber }),
196
189
  });
197
190
  return new protocol_http_1.HttpRequest({
198
191
  protocol,
@@ -234,8 +227,7 @@ const serializeAws_restJson1UpdateConfigurationSetEventDestinationCommand = asyn
234
227
  }
235
228
  let body;
236
229
  body = JSON.stringify({
237
- ...(input.EventDestination !== undefined &&
238
- input.EventDestination !== null && {
230
+ ...(input.EventDestination != null && {
239
231
  EventDestination: serializeAws_restJson1EventDestinationDefinition(input.EventDestination, context),
240
232
  }),
241
233
  });
@@ -267,8 +259,7 @@ const deserializeAws_restJson1CreateConfigurationSetCommandError = async (output
267
259
  body: await parseBody(output.body, context),
268
260
  };
269
261
  let response;
270
- let errorCode = "UnknownError";
271
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
262
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
272
263
  switch (errorCode) {
273
264
  case "AlreadyExistsException":
274
265
  case "com.amazonaws.pinpointsmsvoice#AlreadyExistsException":
@@ -287,10 +278,12 @@ const deserializeAws_restJson1CreateConfigurationSetCommandError = async (output
287
278
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
288
279
  default:
289
280
  const parsedBody = parsedOutput.body;
281
+ const $metadata = deserializeMetadata(output);
282
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
290
283
  response = new PinpointSMSVoiceServiceException_1.PinpointSMSVoiceServiceException({
291
- name: parsedBody.code || parsedBody.Code || errorCode,
284
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
292
285
  $fault: "client",
293
- $metadata: deserializeMetadata(output),
286
+ $metadata,
294
287
  });
295
288
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
296
289
  }
@@ -312,8 +305,7 @@ const deserializeAws_restJson1CreateConfigurationSetEventDestinationCommandError
312
305
  body: await parseBody(output.body, context),
313
306
  };
314
307
  let response;
315
- let errorCode = "UnknownError";
316
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
308
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
317
309
  switch (errorCode) {
318
310
  case "AlreadyExistsException":
319
311
  case "com.amazonaws.pinpointsmsvoice#AlreadyExistsException":
@@ -335,10 +327,12 @@ const deserializeAws_restJson1CreateConfigurationSetEventDestinationCommandError
335
327
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
336
328
  default:
337
329
  const parsedBody = parsedOutput.body;
330
+ const $metadata = deserializeMetadata(output);
331
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
338
332
  response = new PinpointSMSVoiceServiceException_1.PinpointSMSVoiceServiceException({
339
- name: parsedBody.code || parsedBody.Code || errorCode,
333
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
340
334
  $fault: "client",
341
- $metadata: deserializeMetadata(output),
335
+ $metadata,
342
336
  });
343
337
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
344
338
  }
@@ -360,8 +354,7 @@ const deserializeAws_restJson1DeleteConfigurationSetCommandError = async (output
360
354
  body: await parseBody(output.body, context),
361
355
  };
362
356
  let response;
363
- let errorCode = "UnknownError";
364
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
357
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
365
358
  switch (errorCode) {
366
359
  case "BadRequestException":
367
360
  case "com.amazonaws.pinpointsmsvoice#BadRequestException":
@@ -377,10 +370,12 @@ const deserializeAws_restJson1DeleteConfigurationSetCommandError = async (output
377
370
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
378
371
  default:
379
372
  const parsedBody = parsedOutput.body;
373
+ const $metadata = deserializeMetadata(output);
374
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
380
375
  response = new PinpointSMSVoiceServiceException_1.PinpointSMSVoiceServiceException({
381
- name: parsedBody.code || parsedBody.Code || errorCode,
376
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
382
377
  $fault: "client",
383
- $metadata: deserializeMetadata(output),
378
+ $metadata,
384
379
  });
385
380
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
386
381
  }
@@ -402,8 +397,7 @@ const deserializeAws_restJson1DeleteConfigurationSetEventDestinationCommandError
402
397
  body: await parseBody(output.body, context),
403
398
  };
404
399
  let response;
405
- let errorCode = "UnknownError";
406
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
400
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
407
401
  switch (errorCode) {
408
402
  case "BadRequestException":
409
403
  case "com.amazonaws.pinpointsmsvoice#BadRequestException":
@@ -419,10 +413,12 @@ const deserializeAws_restJson1DeleteConfigurationSetEventDestinationCommandError
419
413
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
420
414
  default:
421
415
  const parsedBody = parsedOutput.body;
416
+ const $metadata = deserializeMetadata(output);
417
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
422
418
  response = new PinpointSMSVoiceServiceException_1.PinpointSMSVoiceServiceException({
423
- name: parsedBody.code || parsedBody.Code || errorCode,
419
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
424
420
  $fault: "client",
425
- $metadata: deserializeMetadata(output),
421
+ $metadata,
426
422
  });
427
423
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
428
424
  }
@@ -448,8 +444,7 @@ const deserializeAws_restJson1GetConfigurationSetEventDestinationsCommandError =
448
444
  body: await parseBody(output.body, context),
449
445
  };
450
446
  let response;
451
- let errorCode = "UnknownError";
452
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
447
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
453
448
  switch (errorCode) {
454
449
  case "BadRequestException":
455
450
  case "com.amazonaws.pinpointsmsvoice#BadRequestException":
@@ -465,10 +460,12 @@ const deserializeAws_restJson1GetConfigurationSetEventDestinationsCommandError =
465
460
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
466
461
  default:
467
462
  const parsedBody = parsedOutput.body;
463
+ const $metadata = deserializeMetadata(output);
464
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
468
465
  response = new PinpointSMSVoiceServiceException_1.PinpointSMSVoiceServiceException({
469
- name: parsedBody.code || parsedBody.Code || errorCode,
466
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
470
467
  $fault: "client",
471
- $metadata: deserializeMetadata(output),
468
+ $metadata,
472
469
  });
473
470
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
474
471
  }
@@ -498,8 +495,7 @@ const deserializeAws_restJson1ListConfigurationSetsCommandError = async (output,
498
495
  body: await parseBody(output.body, context),
499
496
  };
500
497
  let response;
501
- let errorCode = "UnknownError";
502
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
498
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
503
499
  switch (errorCode) {
504
500
  case "BadRequestException":
505
501
  case "com.amazonaws.pinpointsmsvoice#BadRequestException":
@@ -512,10 +508,12 @@ const deserializeAws_restJson1ListConfigurationSetsCommandError = async (output,
512
508
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
513
509
  default:
514
510
  const parsedBody = parsedOutput.body;
511
+ const $metadata = deserializeMetadata(output);
512
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
515
513
  response = new PinpointSMSVoiceServiceException_1.PinpointSMSVoiceServiceException({
516
- name: parsedBody.code || parsedBody.Code || errorCode,
514
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
517
515
  $fault: "client",
518
- $metadata: deserializeMetadata(output),
516
+ $metadata,
519
517
  });
520
518
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
521
519
  }
@@ -541,8 +539,7 @@ const deserializeAws_restJson1SendVoiceMessageCommandError = async (output, cont
541
539
  body: await parseBody(output.body, context),
542
540
  };
543
541
  let response;
544
- let errorCode = "UnknownError";
545
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
542
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
546
543
  switch (errorCode) {
547
544
  case "BadRequestException":
548
545
  case "com.amazonaws.pinpointsmsvoice#BadRequestException":
@@ -555,10 +552,12 @@ const deserializeAws_restJson1SendVoiceMessageCommandError = async (output, cont
555
552
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
556
553
  default:
557
554
  const parsedBody = parsedOutput.body;
555
+ const $metadata = deserializeMetadata(output);
556
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
558
557
  response = new PinpointSMSVoiceServiceException_1.PinpointSMSVoiceServiceException({
559
- name: parsedBody.code || parsedBody.Code || errorCode,
558
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
560
559
  $fault: "client",
561
- $metadata: deserializeMetadata(output),
560
+ $metadata,
562
561
  });
563
562
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
564
563
  }
@@ -580,8 +579,7 @@ const deserializeAws_restJson1UpdateConfigurationSetEventDestinationCommandError
580
579
  body: await parseBody(output.body, context),
581
580
  };
582
581
  let response;
583
- let errorCode = "UnknownError";
584
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
582
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
585
583
  switch (errorCode) {
586
584
  case "BadRequestException":
587
585
  case "com.amazonaws.pinpointsmsvoice#BadRequestException":
@@ -597,10 +595,12 @@ const deserializeAws_restJson1UpdateConfigurationSetEventDestinationCommandError
597
595
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
598
596
  default:
599
597
  const parsedBody = parsedOutput.body;
598
+ const $metadata = deserializeMetadata(output);
599
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
600
600
  response = new PinpointSMSVoiceServiceException_1.PinpointSMSVoiceServiceException({
601
- name: parsedBody.code || parsedBody.Code || errorCode,
601
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
602
602
  $fault: "client",
603
- $metadata: deserializeMetadata(output),
603
+ $metadata,
604
604
  });
605
605
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
606
606
  }
@@ -679,32 +679,28 @@ const deserializeAws_restJson1TooManyRequestsExceptionResponse = async (parsedOu
679
679
  };
680
680
  const serializeAws_restJson1CallInstructionsMessageType = (input, context) => {
681
681
  return {
682
- ...(input.Text !== undefined && input.Text !== null && { Text: input.Text }),
682
+ ...(input.Text != null && { Text: input.Text }),
683
683
  };
684
684
  };
685
685
  const serializeAws_restJson1CloudWatchLogsDestination = (input, context) => {
686
686
  return {
687
- ...(input.IamRoleArn !== undefined && input.IamRoleArn !== null && { IamRoleArn: input.IamRoleArn }),
688
- ...(input.LogGroupArn !== undefined && input.LogGroupArn !== null && { LogGroupArn: input.LogGroupArn }),
687
+ ...(input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }),
688
+ ...(input.LogGroupArn != null && { LogGroupArn: input.LogGroupArn }),
689
689
  };
690
690
  };
691
691
  const serializeAws_restJson1EventDestinationDefinition = (input, context) => {
692
692
  return {
693
- ...(input.CloudWatchLogsDestination !== undefined &&
694
- input.CloudWatchLogsDestination !== null && {
693
+ ...(input.CloudWatchLogsDestination != null && {
695
694
  CloudWatchLogsDestination: serializeAws_restJson1CloudWatchLogsDestination(input.CloudWatchLogsDestination, context),
696
695
  }),
697
- ...(input.Enabled !== undefined && input.Enabled !== null && { Enabled: input.Enabled }),
698
- ...(input.KinesisFirehoseDestination !== undefined &&
699
- input.KinesisFirehoseDestination !== null && {
696
+ ...(input.Enabled != null && { Enabled: input.Enabled }),
697
+ ...(input.KinesisFirehoseDestination != null && {
700
698
  KinesisFirehoseDestination: serializeAws_restJson1KinesisFirehoseDestination(input.KinesisFirehoseDestination, context),
701
699
  }),
702
- ...(input.MatchingEventTypes !== undefined &&
703
- input.MatchingEventTypes !== null && {
700
+ ...(input.MatchingEventTypes != null && {
704
701
  MatchingEventTypes: serializeAws_restJson1EventTypes(input.MatchingEventTypes, context),
705
702
  }),
706
- ...(input.SnsDestination !== undefined &&
707
- input.SnsDestination !== null && {
703
+ ...(input.SnsDestination != null && {
708
704
  SnsDestination: serializeAws_restJson1SnsDestination(input.SnsDestination, context),
709
705
  }),
710
706
  };
@@ -721,42 +717,40 @@ const serializeAws_restJson1EventTypes = (input, context) => {
721
717
  };
722
718
  const serializeAws_restJson1KinesisFirehoseDestination = (input, context) => {
723
719
  return {
724
- ...(input.DeliveryStreamArn !== undefined &&
725
- input.DeliveryStreamArn !== null && { DeliveryStreamArn: input.DeliveryStreamArn }),
726
- ...(input.IamRoleArn !== undefined && input.IamRoleArn !== null && { IamRoleArn: input.IamRoleArn }),
720
+ ...(input.DeliveryStreamArn != null && { DeliveryStreamArn: input.DeliveryStreamArn }),
721
+ ...(input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }),
727
722
  };
728
723
  };
729
724
  const serializeAws_restJson1PlainTextMessageType = (input, context) => {
730
725
  return {
731
- ...(input.LanguageCode !== undefined && input.LanguageCode !== null && { LanguageCode: input.LanguageCode }),
732
- ...(input.Text !== undefined && input.Text !== null && { Text: input.Text }),
733
- ...(input.VoiceId !== undefined && input.VoiceId !== null && { VoiceId: input.VoiceId }),
726
+ ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }),
727
+ ...(input.Text != null && { Text: input.Text }),
728
+ ...(input.VoiceId != null && { VoiceId: input.VoiceId }),
734
729
  };
735
730
  };
736
731
  const serializeAws_restJson1SnsDestination = (input, context) => {
737
732
  return {
738
- ...(input.TopicArn !== undefined && input.TopicArn !== null && { TopicArn: input.TopicArn }),
733
+ ...(input.TopicArn != null && { TopicArn: input.TopicArn }),
739
734
  };
740
735
  };
741
736
  const serializeAws_restJson1SSMLMessageType = (input, context) => {
742
737
  return {
743
- ...(input.LanguageCode !== undefined && input.LanguageCode !== null && { LanguageCode: input.LanguageCode }),
744
- ...(input.Text !== undefined && input.Text !== null && { Text: input.Text }),
745
- ...(input.VoiceId !== undefined && input.VoiceId !== null && { VoiceId: input.VoiceId }),
738
+ ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }),
739
+ ...(input.Text != null && { Text: input.Text }),
740
+ ...(input.VoiceId != null && { VoiceId: input.VoiceId }),
746
741
  };
747
742
  };
748
743
  const serializeAws_restJson1VoiceMessageContent = (input, context) => {
749
744
  return {
750
- ...(input.CallInstructionsMessage !== undefined &&
751
- input.CallInstructionsMessage !== null && {
745
+ ...(input.CallInstructionsMessage != null && {
752
746
  CallInstructionsMessage: serializeAws_restJson1CallInstructionsMessageType(input.CallInstructionsMessage, context),
753
747
  }),
754
- ...(input.PlainTextMessage !== undefined &&
755
- input.PlainTextMessage !== null && {
748
+ ...(input.PlainTextMessage != null && {
756
749
  PlainTextMessage: serializeAws_restJson1PlainTextMessageType(input.PlainTextMessage, context),
757
750
  }),
758
- ...(input.SSMLMessage !== undefined &&
759
- input.SSMLMessage !== null && { SSMLMessage: serializeAws_restJson1SSMLMessageType(input.SSMLMessage, context) }),
751
+ ...(input.SSMLMessage != null && {
752
+ SSMLMessage: serializeAws_restJson1SSMLMessageType(input.SSMLMessage, context),
753
+ }),
760
754
  };
761
755
  };
762
756
  const deserializeAws_restJson1CloudWatchLogsDestination = (output, context) => {
@@ -778,18 +772,18 @@ const deserializeAws_restJson1ConfigurationSets = (output, context) => {
778
772
  };
779
773
  const deserializeAws_restJson1EventDestination = (output, context) => {
780
774
  return {
781
- CloudWatchLogsDestination: output.CloudWatchLogsDestination !== undefined && output.CloudWatchLogsDestination !== null
775
+ CloudWatchLogsDestination: output.CloudWatchLogsDestination != null
782
776
  ? deserializeAws_restJson1CloudWatchLogsDestination(output.CloudWatchLogsDestination, context)
783
777
  : undefined,
784
778
  Enabled: (0, smithy_client_1.expectBoolean)(output.Enabled),
785
- KinesisFirehoseDestination: output.KinesisFirehoseDestination !== undefined && output.KinesisFirehoseDestination !== null
779
+ KinesisFirehoseDestination: output.KinesisFirehoseDestination != null
786
780
  ? deserializeAws_restJson1KinesisFirehoseDestination(output.KinesisFirehoseDestination, context)
787
781
  : undefined,
788
- MatchingEventTypes: output.MatchingEventTypes !== undefined && output.MatchingEventTypes !== null
782
+ MatchingEventTypes: output.MatchingEventTypes != null
789
783
  ? deserializeAws_restJson1EventTypes(output.MatchingEventTypes, context)
790
784
  : undefined,
791
785
  Name: (0, smithy_client_1.expectString)(output.Name),
792
- SnsDestination: output.SnsDestination !== undefined && output.SnsDestination !== null
786
+ SnsDestination: output.SnsDestination != null
793
787
  ? deserializeAws_restJson1SnsDestination(output.SnsDestination, context)
794
788
  : undefined,
795
789
  };
@@ -876,5 +870,4 @@ const loadRestJsonErrorCode = (output, data) => {
876
870
  if (data["__type"] !== undefined) {
877
871
  return sanitizeErrorCode(data["__type"]);
878
872
  }
879
- return "";
880
873
  };
@@ -14,8 +14,7 @@ export var serializeAws_restJson1CreateConfigurationSetCommand = function (input
14
14
  "content-type": "application/json",
15
15
  };
16
16
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/sms-voice/configuration-sets";
17
- body = JSON.stringify(__assign({}, (input.ConfigurationSetName !== undefined &&
18
- input.ConfigurationSetName !== null && { ConfigurationSetName: input.ConfigurationSetName })));
17
+ body = JSON.stringify(__assign({}, (input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName })));
19
18
  return [2, new __HttpRequest({
20
19
  protocol: protocol,
21
20
  hostname: hostname,
@@ -50,11 +49,9 @@ export var serializeAws_restJson1CreateConfigurationSetEventDestinationCommand =
50
49
  else {
51
50
  throw new Error("No value provided for input HTTP label: ConfigurationSetName.");
52
51
  }
53
- body = JSON.stringify(__assign(__assign({}, (input.EventDestination !== undefined &&
54
- input.EventDestination !== null && {
52
+ body = JSON.stringify(__assign(__assign({}, (input.EventDestination != null && {
55
53
  EventDestination: serializeAws_restJson1EventDestinationDefinition(input.EventDestination, context),
56
- })), (input.EventDestinationName !== undefined &&
57
- input.EventDestinationName !== null && { EventDestinationName: input.EventDestinationName })));
54
+ })), (input.EventDestinationName != null && { EventDestinationName: input.EventDestinationName })));
58
55
  return [2, new __HttpRequest({
59
56
  protocol: protocol,
60
57
  hostname: hostname,
@@ -207,11 +204,7 @@ export var serializeAws_restJson1SendVoiceMessageCommand = function (input, cont
207
204
  "content-type": "application/json",
208
205
  };
209
206
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/sms-voice/voice/message";
210
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.CallerId !== undefined && input.CallerId !== null && { CallerId: input.CallerId })), (input.ConfigurationSetName !== undefined &&
211
- input.ConfigurationSetName !== null && { ConfigurationSetName: input.ConfigurationSetName })), (input.Content !== undefined &&
212
- input.Content !== null && { Content: serializeAws_restJson1VoiceMessageContent(input.Content, context) })), (input.DestinationPhoneNumber !== undefined &&
213
- input.DestinationPhoneNumber !== null && { DestinationPhoneNumber: input.DestinationPhoneNumber })), (input.OriginationPhoneNumber !== undefined &&
214
- input.OriginationPhoneNumber !== null && { OriginationPhoneNumber: input.OriginationPhoneNumber })));
207
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.CallerId != null && { CallerId: input.CallerId })), (input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName })), (input.Content != null && { Content: serializeAws_restJson1VoiceMessageContent(input.Content, context) })), (input.DestinationPhoneNumber != null && { DestinationPhoneNumber: input.DestinationPhoneNumber })), (input.OriginationPhoneNumber != null && { OriginationPhoneNumber: input.OriginationPhoneNumber })));
215
208
  return [2, new __HttpRequest({
216
209
  protocol: protocol,
217
210
  hostname: hostname,
@@ -256,8 +249,7 @@ export var serializeAws_restJson1UpdateConfigurationSetEventDestinationCommand =
256
249
  else {
257
250
  throw new Error("No value provided for input HTTP label: EventDestinationName.");
258
251
  }
259
- body = JSON.stringify(__assign({}, (input.EventDestination !== undefined &&
260
- input.EventDestination !== null && {
252
+ body = JSON.stringify(__assign({}, (input.EventDestination != null && {
261
253
  EventDestination: serializeAws_restJson1EventDestinationDefinition(input.EventDestination, context),
262
254
  })));
263
255
  return [2, new __HttpRequest({
@@ -291,7 +283,7 @@ export var deserializeAws_restJson1CreateConfigurationSetCommand = function (out
291
283
  });
292
284
  }); };
293
285
  var deserializeAws_restJson1CreateConfigurationSetCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
294
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
286
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
295
287
  var _c;
296
288
  return __generator(this, function (_d) {
297
289
  switch (_d.label) {
@@ -301,7 +293,6 @@ var deserializeAws_restJson1CreateConfigurationSetCommandError = function (outpu
301
293
  return [4, parseBody(output.body, context)];
302
294
  case 1:
303
295
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
304
- errorCode = "UnknownError";
305
296
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
306
297
  _b = errorCode;
307
298
  switch (_b) {
@@ -329,10 +320,12 @@ var deserializeAws_restJson1CreateConfigurationSetCommandError = function (outpu
329
320
  case 11: throw _d.sent();
330
321
  case 12:
331
322
  parsedBody = parsedOutput.body;
323
+ $metadata = deserializeMetadata(output);
324
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
332
325
  response = new __BaseException({
333
- name: parsedBody.code || parsedBody.Code || errorCode,
326
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
334
327
  $fault: "client",
335
- $metadata: deserializeMetadata(output),
328
+ $metadata: $metadata,
336
329
  });
337
330
  throw __decorateServiceException(response, parsedBody);
338
331
  }
@@ -357,7 +350,7 @@ export var deserializeAws_restJson1CreateConfigurationSetEventDestinationCommand
357
350
  });
358
351
  }); };
359
352
  var deserializeAws_restJson1CreateConfigurationSetEventDestinationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
360
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
353
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
361
354
  var _c;
362
355
  return __generator(this, function (_d) {
363
356
  switch (_d.label) {
@@ -367,7 +360,6 @@ var deserializeAws_restJson1CreateConfigurationSetEventDestinationCommandError =
367
360
  return [4, parseBody(output.body, context)];
368
361
  case 1:
369
362
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
370
- errorCode = "UnknownError";
371
363
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
372
364
  _b = errorCode;
373
365
  switch (_b) {
@@ -399,10 +391,12 @@ var deserializeAws_restJson1CreateConfigurationSetEventDestinationCommandError =
399
391
  case 13: throw _d.sent();
400
392
  case 14:
401
393
  parsedBody = parsedOutput.body;
394
+ $metadata = deserializeMetadata(output);
395
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
402
396
  response = new __BaseException({
403
- name: parsedBody.code || parsedBody.Code || errorCode,
397
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
404
398
  $fault: "client",
405
- $metadata: deserializeMetadata(output),
399
+ $metadata: $metadata,
406
400
  });
407
401
  throw __decorateServiceException(response, parsedBody);
408
402
  }
@@ -427,7 +421,7 @@ export var deserializeAws_restJson1DeleteConfigurationSetCommand = function (out
427
421
  });
428
422
  }); };
429
423
  var deserializeAws_restJson1DeleteConfigurationSetCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
430
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
424
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
431
425
  var _c;
432
426
  return __generator(this, function (_d) {
433
427
  switch (_d.label) {
@@ -437,7 +431,6 @@ var deserializeAws_restJson1DeleteConfigurationSetCommandError = function (outpu
437
431
  return [4, parseBody(output.body, context)];
438
432
  case 1:
439
433
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
440
- errorCode = "UnknownError";
441
434
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
442
435
  _b = errorCode;
443
436
  switch (_b) {
@@ -461,10 +454,12 @@ var deserializeAws_restJson1DeleteConfigurationSetCommandError = function (outpu
461
454
  case 9: throw _d.sent();
462
455
  case 10:
463
456
  parsedBody = parsedOutput.body;
457
+ $metadata = deserializeMetadata(output);
458
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
464
459
  response = new __BaseException({
465
- name: parsedBody.code || parsedBody.Code || errorCode,
460
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
466
461
  $fault: "client",
467
- $metadata: deserializeMetadata(output),
462
+ $metadata: $metadata,
468
463
  });
469
464
  throw __decorateServiceException(response, parsedBody);
470
465
  }
@@ -489,7 +484,7 @@ export var deserializeAws_restJson1DeleteConfigurationSetEventDestinationCommand
489
484
  });
490
485
  }); };
491
486
  var deserializeAws_restJson1DeleteConfigurationSetEventDestinationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
492
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
487
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
493
488
  var _c;
494
489
  return __generator(this, function (_d) {
495
490
  switch (_d.label) {
@@ -499,7 +494,6 @@ var deserializeAws_restJson1DeleteConfigurationSetEventDestinationCommandError =
499
494
  return [4, parseBody(output.body, context)];
500
495
  case 1:
501
496
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
502
- errorCode = "UnknownError";
503
497
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
504
498
  _b = errorCode;
505
499
  switch (_b) {
@@ -523,10 +517,12 @@ var deserializeAws_restJson1DeleteConfigurationSetEventDestinationCommandError =
523
517
  case 9: throw _d.sent();
524
518
  case 10:
525
519
  parsedBody = parsedOutput.body;
520
+ $metadata = deserializeMetadata(output);
521
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
526
522
  response = new __BaseException({
527
- name: parsedBody.code || parsedBody.Code || errorCode,
523
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
528
524
  $fault: "client",
529
- $metadata: deserializeMetadata(output),
525
+ $metadata: $metadata,
530
526
  });
531
527
  throw __decorateServiceException(response, parsedBody);
532
528
  }
@@ -557,7 +553,7 @@ export var deserializeAws_restJson1GetConfigurationSetEventDestinationsCommand =
557
553
  });
558
554
  }); };
559
555
  var deserializeAws_restJson1GetConfigurationSetEventDestinationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
560
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
556
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
561
557
  var _c;
562
558
  return __generator(this, function (_d) {
563
559
  switch (_d.label) {
@@ -567,7 +563,6 @@ var deserializeAws_restJson1GetConfigurationSetEventDestinationsCommandError = f
567
563
  return [4, parseBody(output.body, context)];
568
564
  case 1:
569
565
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
570
- errorCode = "UnknownError";
571
566
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
572
567
  _b = errorCode;
573
568
  switch (_b) {
@@ -591,10 +586,12 @@ var deserializeAws_restJson1GetConfigurationSetEventDestinationsCommandError = f
591
586
  case 9: throw _d.sent();
592
587
  case 10:
593
588
  parsedBody = parsedOutput.body;
589
+ $metadata = deserializeMetadata(output);
590
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
594
591
  response = new __BaseException({
595
- name: parsedBody.code || parsedBody.Code || errorCode,
592
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
596
593
  $fault: "client",
597
- $metadata: deserializeMetadata(output),
594
+ $metadata: $metadata,
598
595
  });
599
596
  throw __decorateServiceException(response, parsedBody);
600
597
  }
@@ -629,7 +626,7 @@ export var deserializeAws_restJson1ListConfigurationSetsCommand = function (outp
629
626
  });
630
627
  }); };
631
628
  var deserializeAws_restJson1ListConfigurationSetsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
632
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
629
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
633
630
  var _c;
634
631
  return __generator(this, function (_d) {
635
632
  switch (_d.label) {
@@ -639,7 +636,6 @@ var deserializeAws_restJson1ListConfigurationSetsCommandError = function (output
639
636
  return [4, parseBody(output.body, context)];
640
637
  case 1:
641
638
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
642
- errorCode = "UnknownError";
643
639
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
644
640
  _b = errorCode;
645
641
  switch (_b) {
@@ -659,10 +655,12 @@ var deserializeAws_restJson1ListConfigurationSetsCommandError = function (output
659
655
  case 7: throw _d.sent();
660
656
  case 8:
661
657
  parsedBody = parsedOutput.body;
658
+ $metadata = deserializeMetadata(output);
659
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
662
660
  response = new __BaseException({
663
- name: parsedBody.code || parsedBody.Code || errorCode,
661
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
664
662
  $fault: "client",
665
- $metadata: deserializeMetadata(output),
663
+ $metadata: $metadata,
666
664
  });
667
665
  throw __decorateServiceException(response, parsedBody);
668
666
  }
@@ -693,7 +691,7 @@ export var deserializeAws_restJson1SendVoiceMessageCommand = function (output, c
693
691
  });
694
692
  }); };
695
693
  var deserializeAws_restJson1SendVoiceMessageCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
696
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
694
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
697
695
  var _c;
698
696
  return __generator(this, function (_d) {
699
697
  switch (_d.label) {
@@ -703,7 +701,6 @@ var deserializeAws_restJson1SendVoiceMessageCommandError = function (output, con
703
701
  return [4, parseBody(output.body, context)];
704
702
  case 1:
705
703
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
706
- errorCode = "UnknownError";
707
704
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
708
705
  _b = errorCode;
709
706
  switch (_b) {
@@ -723,10 +720,12 @@ var deserializeAws_restJson1SendVoiceMessageCommandError = function (output, con
723
720
  case 7: throw _d.sent();
724
721
  case 8:
725
722
  parsedBody = parsedOutput.body;
723
+ $metadata = deserializeMetadata(output);
724
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
726
725
  response = new __BaseException({
727
- name: parsedBody.code || parsedBody.Code || errorCode,
726
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
728
727
  $fault: "client",
729
- $metadata: deserializeMetadata(output),
728
+ $metadata: $metadata,
730
729
  });
731
730
  throw __decorateServiceException(response, parsedBody);
732
731
  }
@@ -751,7 +750,7 @@ export var deserializeAws_restJson1UpdateConfigurationSetEventDestinationCommand
751
750
  });
752
751
  }); };
753
752
  var deserializeAws_restJson1UpdateConfigurationSetEventDestinationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
754
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
753
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
755
754
  var _c;
756
755
  return __generator(this, function (_d) {
757
756
  switch (_d.label) {
@@ -761,7 +760,6 @@ var deserializeAws_restJson1UpdateConfigurationSetEventDestinationCommandError =
761
760
  return [4, parseBody(output.body, context)];
762
761
  case 1:
763
762
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
764
- errorCode = "UnknownError";
765
763
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
766
764
  _b = errorCode;
767
765
  switch (_b) {
@@ -785,10 +783,12 @@ var deserializeAws_restJson1UpdateConfigurationSetEventDestinationCommandError =
785
783
  case 9: throw _d.sent();
786
784
  case 10:
787
785
  parsedBody = parsedOutput.body;
786
+ $metadata = deserializeMetadata(output);
787
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
788
788
  response = new __BaseException({
789
- name: parsedBody.code || parsedBody.Code || errorCode,
789
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
790
790
  $fault: "client",
791
- $metadata: deserializeMetadata(output),
791
+ $metadata: $metadata,
792
792
  });
793
793
  throw __decorateServiceException(response, parsedBody);
794
794
  }
@@ -867,23 +867,19 @@ var deserializeAws_restJson1TooManyRequestsExceptionResponse = function (parsedO
867
867
  });
868
868
  }); };
869
869
  var serializeAws_restJson1CallInstructionsMessageType = function (input, context) {
870
- return __assign({}, (input.Text !== undefined && input.Text !== null && { Text: input.Text }));
870
+ return __assign({}, (input.Text != null && { Text: input.Text }));
871
871
  };
872
872
  var serializeAws_restJson1CloudWatchLogsDestination = function (input, context) {
873
- return __assign(__assign({}, (input.IamRoleArn !== undefined && input.IamRoleArn !== null && { IamRoleArn: input.IamRoleArn })), (input.LogGroupArn !== undefined && input.LogGroupArn !== null && { LogGroupArn: input.LogGroupArn }));
873
+ return __assign(__assign({}, (input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn })), (input.LogGroupArn != null && { LogGroupArn: input.LogGroupArn }));
874
874
  };
875
875
  var serializeAws_restJson1EventDestinationDefinition = function (input, context) {
876
- return __assign(__assign(__assign(__assign(__assign({}, (input.CloudWatchLogsDestination !== undefined &&
877
- input.CloudWatchLogsDestination !== null && {
876
+ return __assign(__assign(__assign(__assign(__assign({}, (input.CloudWatchLogsDestination != null && {
878
877
  CloudWatchLogsDestination: serializeAws_restJson1CloudWatchLogsDestination(input.CloudWatchLogsDestination, context),
879
- })), (input.Enabled !== undefined && input.Enabled !== null && { Enabled: input.Enabled })), (input.KinesisFirehoseDestination !== undefined &&
880
- input.KinesisFirehoseDestination !== null && {
878
+ })), (input.Enabled != null && { Enabled: input.Enabled })), (input.KinesisFirehoseDestination != null && {
881
879
  KinesisFirehoseDestination: serializeAws_restJson1KinesisFirehoseDestination(input.KinesisFirehoseDestination, context),
882
- })), (input.MatchingEventTypes !== undefined &&
883
- input.MatchingEventTypes !== null && {
880
+ })), (input.MatchingEventTypes != null && {
884
881
  MatchingEventTypes: serializeAws_restJson1EventTypes(input.MatchingEventTypes, context),
885
- })), (input.SnsDestination !== undefined &&
886
- input.SnsDestination !== null && {
882
+ })), (input.SnsDestination != null && {
887
883
  SnsDestination: serializeAws_restJson1SnsDestination(input.SnsDestination, context),
888
884
  }));
889
885
  };
@@ -898,27 +894,25 @@ var serializeAws_restJson1EventTypes = function (input, context) {
898
894
  });
899
895
  };
900
896
  var serializeAws_restJson1KinesisFirehoseDestination = function (input, context) {
901
- return __assign(__assign({}, (input.DeliveryStreamArn !== undefined &&
902
- input.DeliveryStreamArn !== null && { DeliveryStreamArn: input.DeliveryStreamArn })), (input.IamRoleArn !== undefined && input.IamRoleArn !== null && { IamRoleArn: input.IamRoleArn }));
897
+ return __assign(__assign({}, (input.DeliveryStreamArn != null && { DeliveryStreamArn: input.DeliveryStreamArn })), (input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }));
903
898
  };
904
899
  var serializeAws_restJson1PlainTextMessageType = function (input, context) {
905
- return __assign(__assign(__assign({}, (input.LanguageCode !== undefined && input.LanguageCode !== null && { LanguageCode: input.LanguageCode })), (input.Text !== undefined && input.Text !== null && { Text: input.Text })), (input.VoiceId !== undefined && input.VoiceId !== null && { VoiceId: input.VoiceId }));
900
+ return __assign(__assign(__assign({}, (input.LanguageCode != null && { LanguageCode: input.LanguageCode })), (input.Text != null && { Text: input.Text })), (input.VoiceId != null && { VoiceId: input.VoiceId }));
906
901
  };
907
902
  var serializeAws_restJson1SnsDestination = function (input, context) {
908
- return __assign({}, (input.TopicArn !== undefined && input.TopicArn !== null && { TopicArn: input.TopicArn }));
903
+ return __assign({}, (input.TopicArn != null && { TopicArn: input.TopicArn }));
909
904
  };
910
905
  var serializeAws_restJson1SSMLMessageType = function (input, context) {
911
- return __assign(__assign(__assign({}, (input.LanguageCode !== undefined && input.LanguageCode !== null && { LanguageCode: input.LanguageCode })), (input.Text !== undefined && input.Text !== null && { Text: input.Text })), (input.VoiceId !== undefined && input.VoiceId !== null && { VoiceId: input.VoiceId }));
906
+ return __assign(__assign(__assign({}, (input.LanguageCode != null && { LanguageCode: input.LanguageCode })), (input.Text != null && { Text: input.Text })), (input.VoiceId != null && { VoiceId: input.VoiceId }));
912
907
  };
913
908
  var serializeAws_restJson1VoiceMessageContent = function (input, context) {
914
- return __assign(__assign(__assign({}, (input.CallInstructionsMessage !== undefined &&
915
- input.CallInstructionsMessage !== null && {
909
+ return __assign(__assign(__assign({}, (input.CallInstructionsMessage != null && {
916
910
  CallInstructionsMessage: serializeAws_restJson1CallInstructionsMessageType(input.CallInstructionsMessage, context),
917
- })), (input.PlainTextMessage !== undefined &&
918
- input.PlainTextMessage !== null && {
911
+ })), (input.PlainTextMessage != null && {
919
912
  PlainTextMessage: serializeAws_restJson1PlainTextMessageType(input.PlainTextMessage, context),
920
- })), (input.SSMLMessage !== undefined &&
921
- input.SSMLMessage !== null && { SSMLMessage: serializeAws_restJson1SSMLMessageType(input.SSMLMessage, context) }));
913
+ })), (input.SSMLMessage != null && {
914
+ SSMLMessage: serializeAws_restJson1SSMLMessageType(input.SSMLMessage, context),
915
+ }));
922
916
  };
923
917
  var deserializeAws_restJson1CloudWatchLogsDestination = function (output, context) {
924
918
  return {
@@ -939,18 +933,18 @@ var deserializeAws_restJson1ConfigurationSets = function (output, context) {
939
933
  };
940
934
  var deserializeAws_restJson1EventDestination = function (output, context) {
941
935
  return {
942
- CloudWatchLogsDestination: output.CloudWatchLogsDestination !== undefined && output.CloudWatchLogsDestination !== null
936
+ CloudWatchLogsDestination: output.CloudWatchLogsDestination != null
943
937
  ? deserializeAws_restJson1CloudWatchLogsDestination(output.CloudWatchLogsDestination, context)
944
938
  : undefined,
945
939
  Enabled: __expectBoolean(output.Enabled),
946
- KinesisFirehoseDestination: output.KinesisFirehoseDestination !== undefined && output.KinesisFirehoseDestination !== null
940
+ KinesisFirehoseDestination: output.KinesisFirehoseDestination != null
947
941
  ? deserializeAws_restJson1KinesisFirehoseDestination(output.KinesisFirehoseDestination, context)
948
942
  : undefined,
949
- MatchingEventTypes: output.MatchingEventTypes !== undefined && output.MatchingEventTypes !== null
943
+ MatchingEventTypes: output.MatchingEventTypes != null
950
944
  ? deserializeAws_restJson1EventTypes(output.MatchingEventTypes, context)
951
945
  : undefined,
952
946
  Name: __expectString(output.Name),
953
- SnsDestination: output.SnsDestination !== undefined && output.SnsDestination !== null
947
+ SnsDestination: output.SnsDestination != null
954
948
  ? deserializeAws_restJson1SnsDestination(output.SnsDestination, context)
955
949
  : undefined,
956
950
  };
@@ -1044,5 +1038,4 @@ var loadRestJsonErrorCode = function (output, data) {
1044
1038
  if (data["__type"] !== undefined) {
1045
1039
  return sanitizeErrorCode(data["__type"]);
1046
1040
  }
1047
- return "";
1048
1041
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-pinpoint-sms-voice",
3
3
  "description": "AWS SDK for JavaScript Pinpoint Sms Voice Client for Node.js, Browser and React Native",
4
- "version": "3.118.0",
4
+ "version": "3.127.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -18,35 +18,35 @@
18
18
  "dependencies": {
19
19
  "@aws-crypto/sha256-browser": "2.0.0",
20
20
  "@aws-crypto/sha256-js": "2.0.0",
21
- "@aws-sdk/client-sts": "3.118.0",
22
- "@aws-sdk/config-resolver": "3.110.0",
23
- "@aws-sdk/credential-provider-node": "3.118.0",
24
- "@aws-sdk/fetch-http-handler": "3.110.0",
25
- "@aws-sdk/hash-node": "3.110.0",
26
- "@aws-sdk/invalid-dependency": "3.110.0",
27
- "@aws-sdk/middleware-content-length": "3.110.0",
28
- "@aws-sdk/middleware-host-header": "3.110.0",
29
- "@aws-sdk/middleware-logger": "3.110.0",
30
- "@aws-sdk/middleware-recursion-detection": "3.110.0",
31
- "@aws-sdk/middleware-retry": "3.110.0",
32
- "@aws-sdk/middleware-serde": "3.110.0",
33
- "@aws-sdk/middleware-signing": "3.110.0",
34
- "@aws-sdk/middleware-stack": "3.110.0",
35
- "@aws-sdk/middleware-user-agent": "3.110.0",
36
- "@aws-sdk/node-config-provider": "3.110.0",
37
- "@aws-sdk/node-http-handler": "3.110.0",
38
- "@aws-sdk/protocol-http": "3.110.0",
39
- "@aws-sdk/smithy-client": "3.110.0",
40
- "@aws-sdk/types": "3.110.0",
41
- "@aws-sdk/url-parser": "3.110.0",
21
+ "@aws-sdk/client-sts": "3.127.0",
22
+ "@aws-sdk/config-resolver": "3.127.0",
23
+ "@aws-sdk/credential-provider-node": "3.127.0",
24
+ "@aws-sdk/fetch-http-handler": "3.127.0",
25
+ "@aws-sdk/hash-node": "3.127.0",
26
+ "@aws-sdk/invalid-dependency": "3.127.0",
27
+ "@aws-sdk/middleware-content-length": "3.127.0",
28
+ "@aws-sdk/middleware-host-header": "3.127.0",
29
+ "@aws-sdk/middleware-logger": "3.127.0",
30
+ "@aws-sdk/middleware-recursion-detection": "3.127.0",
31
+ "@aws-sdk/middleware-retry": "3.127.0",
32
+ "@aws-sdk/middleware-serde": "3.127.0",
33
+ "@aws-sdk/middleware-signing": "3.127.0",
34
+ "@aws-sdk/middleware-stack": "3.127.0",
35
+ "@aws-sdk/middleware-user-agent": "3.127.0",
36
+ "@aws-sdk/node-config-provider": "3.127.0",
37
+ "@aws-sdk/node-http-handler": "3.127.0",
38
+ "@aws-sdk/protocol-http": "3.127.0",
39
+ "@aws-sdk/smithy-client": "3.127.0",
40
+ "@aws-sdk/types": "3.127.0",
41
+ "@aws-sdk/url-parser": "3.127.0",
42
42
  "@aws-sdk/util-base64-browser": "3.109.0",
43
43
  "@aws-sdk/util-base64-node": "3.55.0",
44
44
  "@aws-sdk/util-body-length-browser": "3.55.0",
45
45
  "@aws-sdk/util-body-length-node": "3.55.0",
46
- "@aws-sdk/util-defaults-mode-browser": "3.110.0",
47
- "@aws-sdk/util-defaults-mode-node": "3.110.0",
48
- "@aws-sdk/util-user-agent-browser": "3.110.0",
49
- "@aws-sdk/util-user-agent-node": "3.118.0",
46
+ "@aws-sdk/util-defaults-mode-browser": "3.127.0",
47
+ "@aws-sdk/util-defaults-mode-node": "3.127.0",
48
+ "@aws-sdk/util-user-agent-browser": "3.127.0",
49
+ "@aws-sdk/util-user-agent-node": "3.127.0",
50
50
  "@aws-sdk/util-utf8-browser": "3.109.0",
51
51
  "@aws-sdk/util-utf8-node": "3.109.0",
52
52
  "tslib": "^2.3.1"