@aws-sdk/client-chime 3.199.0 → 3.201.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.
@@ -18,7 +18,7 @@ const serializeAws_restJson1AssociatePhoneNumbersWithVoiceConnectorCommand = asy
18
18
  const headers = {
19
19
  "content-type": "application/json",
20
20
  };
21
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}";
21
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}";
22
22
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
23
23
  const query = map({
24
24
  operation: [, "associate-phone-numbers"],
@@ -47,7 +47,7 @@ const serializeAws_restJson1AssociatePhoneNumbersWithVoiceConnectorGroupCommand
47
47
  const headers = {
48
48
  "content-type": "application/json",
49
49
  };
50
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
50
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
51
51
  "/voice-connector-groups/{VoiceConnectorGroupId}";
52
52
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorGroupId", () => input.VoiceConnectorGroupId, "{VoiceConnectorGroupId}", false);
53
53
  const query = map({
@@ -77,7 +77,7 @@ const serializeAws_restJson1AssociatePhoneNumberWithUserCommand = async (input,
77
77
  const headers = {
78
78
  "content-type": "application/json",
79
79
  };
80
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/users/{UserId}";
80
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/users/{UserId}";
81
81
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
82
82
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "UserId", () => input.UserId, "{UserId}", false);
83
83
  const query = map({
@@ -104,7 +104,7 @@ const serializeAws_restJson1AssociateSigninDelegateGroupsWithAccountCommand = as
104
104
  const headers = {
105
105
  "content-type": "application/json",
106
106
  };
107
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}";
107
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}";
108
108
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
109
109
  const query = map({
110
110
  operation: [, "associate-signin-delegate-groups"],
@@ -132,7 +132,7 @@ const serializeAws_restJson1BatchCreateAttendeeCommand = async (input, context)
132
132
  const headers = {
133
133
  "content-type": "application/json",
134
134
  };
135
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}/attendees";
135
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}/attendees";
136
136
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MeetingId", () => input.MeetingId, "{MeetingId}", false);
137
137
  const query = map({
138
138
  operation: [, "batch-create"],
@@ -161,7 +161,7 @@ const serializeAws_restJson1BatchCreateChannelMembershipCommand = async (input,
161
161
  "content-type": "application/json",
162
162
  "x-amz-chime-bearer": input.ChimeBearer,
163
163
  });
164
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/memberships";
164
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/memberships";
165
165
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
166
166
  const query = map({
167
167
  operation: [, "batch-create"],
@@ -195,7 +195,7 @@ const serializeAws_restJson1BatchCreateRoomMembershipCommand = async (input, con
195
195
  const headers = {
196
196
  "content-type": "application/json",
197
197
  };
198
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
198
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
199
199
  "/accounts/{AccountId}/rooms/{RoomId}/memberships";
200
200
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
201
201
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "RoomId", () => input.RoomId, "{RoomId}", false);
@@ -225,7 +225,7 @@ const serializeAws_restJson1BatchDeletePhoneNumberCommand = async (input, contex
225
225
  const headers = {
226
226
  "content-type": "application/json",
227
227
  };
228
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/phone-numbers";
228
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-numbers";
229
229
  const query = map({
230
230
  operation: [, "batch-delete"],
231
231
  });
@@ -252,7 +252,7 @@ const serializeAws_restJson1BatchSuspendUserCommand = async (input, context) =>
252
252
  const headers = {
253
253
  "content-type": "application/json",
254
254
  };
255
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/users";
255
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/users";
256
256
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
257
257
  const query = map({
258
258
  operation: [, "suspend"],
@@ -278,7 +278,7 @@ const serializeAws_restJson1BatchUnsuspendUserCommand = async (input, context) =
278
278
  const headers = {
279
279
  "content-type": "application/json",
280
280
  };
281
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/users";
281
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/users";
282
282
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
283
283
  const query = map({
284
284
  operation: [, "unsuspend"],
@@ -304,7 +304,7 @@ const serializeAws_restJson1BatchUpdatePhoneNumberCommand = async (input, contex
304
304
  const headers = {
305
305
  "content-type": "application/json",
306
306
  };
307
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/phone-numbers";
307
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-numbers";
308
308
  const query = map({
309
309
  operation: [, "batch-update"],
310
310
  });
@@ -331,7 +331,7 @@ const serializeAws_restJson1BatchUpdateUserCommand = async (input, context) => {
331
331
  const headers = {
332
332
  "content-type": "application/json",
333
333
  };
334
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/users";
334
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/users";
335
335
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
336
336
  let body;
337
337
  body = JSON.stringify({
@@ -355,7 +355,7 @@ const serializeAws_restJson1CreateAccountCommand = async (input, context) => {
355
355
  const headers = {
356
356
  "content-type": "application/json",
357
357
  };
358
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts";
358
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts";
359
359
  let body;
360
360
  body = JSON.stringify({
361
361
  ...(input.Name != null && { Name: input.Name }),
@@ -372,15 +372,14 @@ const serializeAws_restJson1CreateAccountCommand = async (input, context) => {
372
372
  };
373
373
  exports.serializeAws_restJson1CreateAccountCommand = serializeAws_restJson1CreateAccountCommand;
374
374
  const serializeAws_restJson1CreateAppInstanceCommand = async (input, context) => {
375
- var _a;
376
375
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
377
376
  const headers = {
378
377
  "content-type": "application/json",
379
378
  };
380
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/app-instances";
379
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instances";
381
380
  let body;
382
381
  body = JSON.stringify({
383
- ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
382
+ ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
384
383
  ...(input.Metadata != null && { Metadata: input.Metadata }),
385
384
  ...(input.Name != null && { Name: input.Name }),
386
385
  ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
@@ -408,7 +407,7 @@ const serializeAws_restJson1CreateAppInstanceAdminCommand = async (input, contex
408
407
  const headers = {
409
408
  "content-type": "application/json",
410
409
  };
411
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/app-instances/{AppInstanceArn}/admins";
410
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instances/{AppInstanceArn}/admins";
412
411
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppInstanceArn", () => input.AppInstanceArn, "{AppInstanceArn}", false);
413
412
  let body;
414
413
  body = JSON.stringify({
@@ -433,17 +432,16 @@ const serializeAws_restJson1CreateAppInstanceAdminCommand = async (input, contex
433
432
  };
434
433
  exports.serializeAws_restJson1CreateAppInstanceAdminCommand = serializeAws_restJson1CreateAppInstanceAdminCommand;
435
434
  const serializeAws_restJson1CreateAppInstanceUserCommand = async (input, context) => {
436
- var _a;
437
435
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
438
436
  const headers = {
439
437
  "content-type": "application/json",
440
438
  };
441
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/app-instance-users";
439
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instance-users";
442
440
  let body;
443
441
  body = JSON.stringify({
444
442
  ...(input.AppInstanceArn != null && { AppInstanceArn: input.AppInstanceArn }),
445
443
  ...(input.AppInstanceUserId != null && { AppInstanceUserId: input.AppInstanceUserId }),
446
- ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
444
+ ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
447
445
  ...(input.Metadata != null && { Metadata: input.Metadata }),
448
446
  ...(input.Name != null && { Name: input.Name }),
449
447
  ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
@@ -471,7 +469,7 @@ const serializeAws_restJson1CreateAttendeeCommand = async (input, context) => {
471
469
  const headers = {
472
470
  "content-type": "application/json",
473
471
  };
474
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}/attendees";
472
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}/attendees";
475
473
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MeetingId", () => input.MeetingId, "{MeetingId}", false);
476
474
  let body;
477
475
  body = JSON.stringify({
@@ -494,7 +492,7 @@ const serializeAws_restJson1CreateBotCommand = async (input, context) => {
494
492
  const headers = {
495
493
  "content-type": "application/json",
496
494
  };
497
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/bots";
495
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/bots";
498
496
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
499
497
  let body;
500
498
  body = JSON.stringify({
@@ -513,17 +511,16 @@ const serializeAws_restJson1CreateBotCommand = async (input, context) => {
513
511
  };
514
512
  exports.serializeAws_restJson1CreateBotCommand = serializeAws_restJson1CreateBotCommand;
515
513
  const serializeAws_restJson1CreateChannelCommand = async (input, context) => {
516
- var _a;
517
514
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
518
515
  const headers = map({}, isSerializableHeaderValue, {
519
516
  "content-type": "application/json",
520
517
  "x-amz-chime-bearer": input.ChimeBearer,
521
518
  });
522
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
519
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
523
520
  let body;
524
521
  body = JSON.stringify({
525
522
  ...(input.AppInstanceArn != null && { AppInstanceArn: input.AppInstanceArn }),
526
- ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
523
+ ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
527
524
  ...(input.Metadata != null && { Metadata: input.Metadata }),
528
525
  ...(input.Mode != null && { Mode: input.Mode }),
529
526
  ...(input.Name != null && { Name: input.Name }),
@@ -554,7 +551,7 @@ const serializeAws_restJson1CreateChannelBanCommand = async (input, context) =>
554
551
  "content-type": "application/json",
555
552
  "x-amz-chime-bearer": input.ChimeBearer,
556
553
  });
557
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/bans";
554
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/bans";
558
555
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
559
556
  let body;
560
557
  body = JSON.stringify({
@@ -584,7 +581,7 @@ const serializeAws_restJson1CreateChannelMembershipCommand = async (input, conte
584
581
  "content-type": "application/json",
585
582
  "x-amz-chime-bearer": input.ChimeBearer,
586
583
  });
587
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/memberships";
584
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/memberships";
588
585
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
589
586
  let body;
590
587
  body = JSON.stringify({
@@ -615,7 +612,7 @@ const serializeAws_restJson1CreateChannelModeratorCommand = async (input, contex
615
612
  "content-type": "application/json",
616
613
  "x-amz-chime-bearer": input.ChimeBearer,
617
614
  });
618
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/moderators";
615
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/moderators";
619
616
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
620
617
  let body;
621
618
  body = JSON.stringify({
@@ -640,18 +637,17 @@ const serializeAws_restJson1CreateChannelModeratorCommand = async (input, contex
640
637
  };
641
638
  exports.serializeAws_restJson1CreateChannelModeratorCommand = serializeAws_restJson1CreateChannelModeratorCommand;
642
639
  const serializeAws_restJson1CreateMediaCapturePipelineCommand = async (input, context) => {
643
- var _a;
644
640
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
645
641
  const headers = {
646
642
  "content-type": "application/json",
647
643
  };
648
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/media-capture-pipelines";
644
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/media-capture-pipelines";
649
645
  let body;
650
646
  body = JSON.stringify({
651
647
  ...(input.ChimeSdkMeetingConfiguration != null && {
652
648
  ChimeSdkMeetingConfiguration: serializeAws_restJson1ChimeSdkMeetingConfiguration(input.ChimeSdkMeetingConfiguration, context),
653
649
  }),
654
- ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
650
+ ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
655
651
  ...(input.SinkArn != null && { SinkArn: input.SinkArn }),
656
652
  ...(input.SinkType != null && { SinkType: input.SinkType }),
657
653
  ...(input.SourceArn != null && { SourceArn: input.SourceArn }),
@@ -669,15 +665,14 @@ const serializeAws_restJson1CreateMediaCapturePipelineCommand = async (input, co
669
665
  };
670
666
  exports.serializeAws_restJson1CreateMediaCapturePipelineCommand = serializeAws_restJson1CreateMediaCapturePipelineCommand;
671
667
  const serializeAws_restJson1CreateMeetingCommand = async (input, context) => {
672
- var _a;
673
668
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
674
669
  const headers = {
675
670
  "content-type": "application/json",
676
671
  };
677
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/meetings";
672
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/meetings";
678
673
  let body;
679
674
  body = JSON.stringify({
680
- ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
675
+ ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
681
676
  ...(input.ExternalMeetingId != null && { ExternalMeetingId: input.ExternalMeetingId }),
682
677
  ...(input.MediaRegion != null && { MediaRegion: input.MediaRegion }),
683
678
  ...(input.MeetingHostId != null && { MeetingHostId: input.MeetingHostId }),
@@ -702,7 +697,7 @@ const serializeAws_restJson1CreateMeetingDialOutCommand = async (input, context)
702
697
  const headers = {
703
698
  "content-type": "application/json",
704
699
  };
705
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}/dial-outs";
700
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}/dial-outs";
706
701
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MeetingId", () => input.MeetingId, "{MeetingId}", false);
707
702
  let body;
708
703
  body = JSON.stringify({
@@ -722,12 +717,11 @@ const serializeAws_restJson1CreateMeetingDialOutCommand = async (input, context)
722
717
  };
723
718
  exports.serializeAws_restJson1CreateMeetingDialOutCommand = serializeAws_restJson1CreateMeetingDialOutCommand;
724
719
  const serializeAws_restJson1CreateMeetingWithAttendeesCommand = async (input, context) => {
725
- var _a;
726
720
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
727
721
  const headers = {
728
722
  "content-type": "application/json",
729
723
  };
730
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/meetings";
724
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/meetings";
731
725
  const query = map({
732
726
  operation: [, "create-attendees"],
733
727
  });
@@ -736,7 +730,7 @@ const serializeAws_restJson1CreateMeetingWithAttendeesCommand = async (input, co
736
730
  ...(input.Attendees != null && {
737
731
  Attendees: serializeAws_restJson1CreateMeetingWithAttendeesRequestItemList(input.Attendees, context),
738
732
  }),
739
- ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
733
+ ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
740
734
  ...(input.ExternalMeetingId != null && { ExternalMeetingId: input.ExternalMeetingId }),
741
735
  ...(input.MediaRegion != null && { MediaRegion: input.MediaRegion }),
742
736
  ...(input.MeetingHostId != null && { MeetingHostId: input.MeetingHostId }),
@@ -762,7 +756,7 @@ const serializeAws_restJson1CreatePhoneNumberOrderCommand = async (input, contex
762
756
  const headers = {
763
757
  "content-type": "application/json",
764
758
  };
765
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number-orders";
759
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number-orders";
766
760
  let body;
767
761
  body = JSON.stringify({
768
762
  ...(input.E164PhoneNumbers != null && {
@@ -786,7 +780,7 @@ const serializeAws_restJson1CreateProxySessionCommand = async (input, context) =
786
780
  const headers = {
787
781
  "content-type": "application/json",
788
782
  };
789
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
783
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
790
784
  "/voice-connectors/{VoiceConnectorId}/proxy-sessions";
791
785
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
792
786
  let body;
@@ -817,16 +811,15 @@ const serializeAws_restJson1CreateProxySessionCommand = async (input, context) =
817
811
  };
818
812
  exports.serializeAws_restJson1CreateProxySessionCommand = serializeAws_restJson1CreateProxySessionCommand;
819
813
  const serializeAws_restJson1CreateRoomCommand = async (input, context) => {
820
- var _a;
821
814
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
822
815
  const headers = {
823
816
  "content-type": "application/json",
824
817
  };
825
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/rooms";
818
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/rooms";
826
819
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
827
820
  let body;
828
821
  body = JSON.stringify({
829
- ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
822
+ ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
830
823
  ...(input.Name != null && { Name: input.Name }),
831
824
  });
832
825
  return new protocol_http_1.HttpRequest({
@@ -845,7 +838,7 @@ const serializeAws_restJson1CreateRoomMembershipCommand = async (input, context)
845
838
  const headers = {
846
839
  "content-type": "application/json",
847
840
  };
848
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
841
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
849
842
  "/accounts/{AccountId}/rooms/{RoomId}/memberships";
850
843
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
851
844
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "RoomId", () => input.RoomId, "{RoomId}", false);
@@ -870,7 +863,7 @@ const serializeAws_restJson1CreateSipMediaApplicationCommand = async (input, con
870
863
  const headers = {
871
864
  "content-type": "application/json",
872
865
  };
873
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/sip-media-applications";
866
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sip-media-applications";
874
867
  let body;
875
868
  body = JSON.stringify({
876
869
  ...(input.AwsRegion != null && { AwsRegion: input.AwsRegion }),
@@ -895,7 +888,7 @@ const serializeAws_restJson1CreateSipMediaApplicationCallCommand = async (input,
895
888
  const headers = {
896
889
  "content-type": "application/json",
897
890
  };
898
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
891
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
899
892
  "/sip-media-applications/{SipMediaApplicationId}/calls";
900
893
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "SipMediaApplicationId", () => input.SipMediaApplicationId, "{SipMediaApplicationId}", false);
901
894
  let body;
@@ -920,7 +913,7 @@ const serializeAws_restJson1CreateSipRuleCommand = async (input, context) => {
920
913
  const headers = {
921
914
  "content-type": "application/json",
922
915
  };
923
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/sip-rules";
916
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sip-rules";
924
917
  let body;
925
918
  body = JSON.stringify({
926
919
  ...(input.Disabled != null && { Disabled: input.Disabled }),
@@ -947,7 +940,7 @@ const serializeAws_restJson1CreateUserCommand = async (input, context) => {
947
940
  const headers = {
948
941
  "content-type": "application/json",
949
942
  };
950
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/users";
943
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/users";
951
944
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
952
945
  const query = map({
953
946
  operation: [, "create"],
@@ -975,7 +968,7 @@ const serializeAws_restJson1CreateVoiceConnectorCommand = async (input, context)
975
968
  const headers = {
976
969
  "content-type": "application/json",
977
970
  };
978
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors";
971
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors";
979
972
  let body;
980
973
  body = JSON.stringify({
981
974
  ...(input.AwsRegion != null && { AwsRegion: input.AwsRegion }),
@@ -998,7 +991,7 @@ const serializeAws_restJson1CreateVoiceConnectorGroupCommand = async (input, con
998
991
  const headers = {
999
992
  "content-type": "application/json",
1000
993
  };
1001
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connector-groups";
994
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connector-groups";
1002
995
  let body;
1003
996
  body = JSON.stringify({
1004
997
  ...(input.Name != null && { Name: input.Name }),
@@ -1020,7 +1013,7 @@ exports.serializeAws_restJson1CreateVoiceConnectorGroupCommand = serializeAws_re
1020
1013
  const serializeAws_restJson1DeleteAccountCommand = async (input, context) => {
1021
1014
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1022
1015
  const headers = {};
1023
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}";
1016
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}";
1024
1017
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
1025
1018
  let body;
1026
1019
  return new protocol_http_1.HttpRequest({
@@ -1037,7 +1030,7 @@ exports.serializeAws_restJson1DeleteAccountCommand = serializeAws_restJson1Delet
1037
1030
  const serializeAws_restJson1DeleteAppInstanceCommand = async (input, context) => {
1038
1031
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1039
1032
  const headers = {};
1040
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/app-instances/{AppInstanceArn}";
1033
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instances/{AppInstanceArn}";
1041
1034
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppInstanceArn", () => input.AppInstanceArn, "{AppInstanceArn}", false);
1042
1035
  let body;
1043
1036
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -1061,7 +1054,7 @@ exports.serializeAws_restJson1DeleteAppInstanceCommand = serializeAws_restJson1D
1061
1054
  const serializeAws_restJson1DeleteAppInstanceAdminCommand = async (input, context) => {
1062
1055
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1063
1056
  const headers = {};
1064
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1057
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1065
1058
  "/app-instances/{AppInstanceArn}/admins/{AppInstanceAdminArn}";
1066
1059
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppInstanceAdminArn", () => input.AppInstanceAdminArn, "{AppInstanceAdminArn}", false);
1067
1060
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppInstanceArn", () => input.AppInstanceArn, "{AppInstanceArn}", false);
@@ -1087,7 +1080,7 @@ exports.serializeAws_restJson1DeleteAppInstanceAdminCommand = serializeAws_restJ
1087
1080
  const serializeAws_restJson1DeleteAppInstanceStreamingConfigurationsCommand = async (input, context) => {
1088
1081
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1089
1082
  const headers = {};
1090
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1083
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1091
1084
  "/app-instances/{AppInstanceArn}/streaming-configurations";
1092
1085
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppInstanceArn", () => input.AppInstanceArn, "{AppInstanceArn}", false);
1093
1086
  let body;
@@ -1105,7 +1098,7 @@ exports.serializeAws_restJson1DeleteAppInstanceStreamingConfigurationsCommand =
1105
1098
  const serializeAws_restJson1DeleteAppInstanceUserCommand = async (input, context) => {
1106
1099
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1107
1100
  const headers = {};
1108
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/app-instance-users/{AppInstanceUserArn}";
1101
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instance-users/{AppInstanceUserArn}";
1109
1102
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppInstanceUserArn", () => input.AppInstanceUserArn, "{AppInstanceUserArn}", false);
1110
1103
  let body;
1111
1104
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -1129,7 +1122,7 @@ exports.serializeAws_restJson1DeleteAppInstanceUserCommand = serializeAws_restJs
1129
1122
  const serializeAws_restJson1DeleteAttendeeCommand = async (input, context) => {
1130
1123
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1131
1124
  const headers = {};
1132
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1125
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1133
1126
  "/meetings/{MeetingId}/attendees/{AttendeeId}";
1134
1127
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MeetingId", () => input.MeetingId, "{MeetingId}", false);
1135
1128
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AttendeeId", () => input.AttendeeId, "{AttendeeId}", false);
@@ -1150,7 +1143,7 @@ const serializeAws_restJson1DeleteChannelCommand = async (input, context) => {
1150
1143
  const headers = map({}, isSerializableHeaderValue, {
1151
1144
  "x-amz-chime-bearer": input.ChimeBearer,
1152
1145
  });
1153
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}";
1146
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}";
1154
1147
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
1155
1148
  let body;
1156
1149
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -1176,7 +1169,7 @@ const serializeAws_restJson1DeleteChannelBanCommand = async (input, context) =>
1176
1169
  const headers = map({}, isSerializableHeaderValue, {
1177
1170
  "x-amz-chime-bearer": input.ChimeBearer,
1178
1171
  });
1179
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/bans/{MemberArn}";
1172
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/bans/{MemberArn}";
1180
1173
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
1181
1174
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MemberArn", () => input.MemberArn, "{MemberArn}", false);
1182
1175
  let body;
@@ -1203,7 +1196,7 @@ const serializeAws_restJson1DeleteChannelMembershipCommand = async (input, conte
1203
1196
  const headers = map({}, isSerializableHeaderValue, {
1204
1197
  "x-amz-chime-bearer": input.ChimeBearer,
1205
1198
  });
1206
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1199
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1207
1200
  "/channels/{ChannelArn}/memberships/{MemberArn}";
1208
1201
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
1209
1202
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MemberArn", () => input.MemberArn, "{MemberArn}", false);
@@ -1231,7 +1224,7 @@ const serializeAws_restJson1DeleteChannelMessageCommand = async (input, context)
1231
1224
  const headers = map({}, isSerializableHeaderValue, {
1232
1225
  "x-amz-chime-bearer": input.ChimeBearer,
1233
1226
  });
1234
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1227
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1235
1228
  "/channels/{ChannelArn}/messages/{MessageId}";
1236
1229
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
1237
1230
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MessageId", () => input.MessageId, "{MessageId}", false);
@@ -1259,7 +1252,7 @@ const serializeAws_restJson1DeleteChannelModeratorCommand = async (input, contex
1259
1252
  const headers = map({}, isSerializableHeaderValue, {
1260
1253
  "x-amz-chime-bearer": input.ChimeBearer,
1261
1254
  });
1262
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1255
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1263
1256
  "/channels/{ChannelArn}/moderators/{ChannelModeratorArn}";
1264
1257
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
1265
1258
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelModeratorArn", () => input.ChannelModeratorArn, "{ChannelModeratorArn}", false);
@@ -1285,7 +1278,7 @@ exports.serializeAws_restJson1DeleteChannelModeratorCommand = serializeAws_restJ
1285
1278
  const serializeAws_restJson1DeleteEventsConfigurationCommand = async (input, context) => {
1286
1279
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1287
1280
  const headers = {};
1288
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1281
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1289
1282
  "/accounts/{AccountId}/bots/{BotId}/events-configuration";
1290
1283
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
1291
1284
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BotId", () => input.BotId, "{BotId}", false);
@@ -1304,7 +1297,7 @@ exports.serializeAws_restJson1DeleteEventsConfigurationCommand = serializeAws_re
1304
1297
  const serializeAws_restJson1DeleteMediaCapturePipelineCommand = async (input, context) => {
1305
1298
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1306
1299
  const headers = {};
1307
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1300
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1308
1301
  "/media-capture-pipelines/{MediaPipelineId}";
1309
1302
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MediaPipelineId", () => input.MediaPipelineId, "{MediaPipelineId}", false);
1310
1303
  let body;
@@ -1322,7 +1315,7 @@ exports.serializeAws_restJson1DeleteMediaCapturePipelineCommand = serializeAws_r
1322
1315
  const serializeAws_restJson1DeleteMeetingCommand = async (input, context) => {
1323
1316
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1324
1317
  const headers = {};
1325
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}";
1318
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}";
1326
1319
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MeetingId", () => input.MeetingId, "{MeetingId}", false);
1327
1320
  let body;
1328
1321
  return new protocol_http_1.HttpRequest({
@@ -1339,7 +1332,7 @@ exports.serializeAws_restJson1DeleteMeetingCommand = serializeAws_restJson1Delet
1339
1332
  const serializeAws_restJson1DeletePhoneNumberCommand = async (input, context) => {
1340
1333
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1341
1334
  const headers = {};
1342
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/phone-numbers/{PhoneNumberId}";
1335
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-numbers/{PhoneNumberId}";
1343
1336
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PhoneNumberId", () => input.PhoneNumberId, "{PhoneNumberId}", false);
1344
1337
  let body;
1345
1338
  return new protocol_http_1.HttpRequest({
@@ -1356,7 +1349,7 @@ exports.serializeAws_restJson1DeletePhoneNumberCommand = serializeAws_restJson1D
1356
1349
  const serializeAws_restJson1DeleteProxySessionCommand = async (input, context) => {
1357
1350
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1358
1351
  const headers = {};
1359
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1352
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1360
1353
  "/voice-connectors/{VoiceConnectorId}/proxy-sessions/{ProxySessionId}";
1361
1354
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
1362
1355
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ProxySessionId", () => input.ProxySessionId, "{ProxySessionId}", false);
@@ -1375,7 +1368,7 @@ exports.serializeAws_restJson1DeleteProxySessionCommand = serializeAws_restJson1
1375
1368
  const serializeAws_restJson1DeleteRoomCommand = async (input, context) => {
1376
1369
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1377
1370
  const headers = {};
1378
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/rooms/{RoomId}";
1371
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/rooms/{RoomId}";
1379
1372
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
1380
1373
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "RoomId", () => input.RoomId, "{RoomId}", false);
1381
1374
  let body;
@@ -1393,7 +1386,7 @@ exports.serializeAws_restJson1DeleteRoomCommand = serializeAws_restJson1DeleteRo
1393
1386
  const serializeAws_restJson1DeleteRoomMembershipCommand = async (input, context) => {
1394
1387
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1395
1388
  const headers = {};
1396
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1389
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1397
1390
  "/accounts/{AccountId}/rooms/{RoomId}/memberships/{MemberId}";
1398
1391
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
1399
1392
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "RoomId", () => input.RoomId, "{RoomId}", false);
@@ -1413,7 +1406,7 @@ exports.serializeAws_restJson1DeleteRoomMembershipCommand = serializeAws_restJso
1413
1406
  const serializeAws_restJson1DeleteSipMediaApplicationCommand = async (input, context) => {
1414
1407
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1415
1408
  const headers = {};
1416
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1409
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1417
1410
  "/sip-media-applications/{SipMediaApplicationId}";
1418
1411
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "SipMediaApplicationId", () => input.SipMediaApplicationId, "{SipMediaApplicationId}", false);
1419
1412
  let body;
@@ -1431,7 +1424,7 @@ exports.serializeAws_restJson1DeleteSipMediaApplicationCommand = serializeAws_re
1431
1424
  const serializeAws_restJson1DeleteSipRuleCommand = async (input, context) => {
1432
1425
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1433
1426
  const headers = {};
1434
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/sip-rules/{SipRuleId}";
1427
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sip-rules/{SipRuleId}";
1435
1428
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "SipRuleId", () => input.SipRuleId, "{SipRuleId}", false);
1436
1429
  let body;
1437
1430
  return new protocol_http_1.HttpRequest({
@@ -1448,7 +1441,7 @@ exports.serializeAws_restJson1DeleteSipRuleCommand = serializeAws_restJson1Delet
1448
1441
  const serializeAws_restJson1DeleteVoiceConnectorCommand = async (input, context) => {
1449
1442
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1450
1443
  const headers = {};
1451
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}";
1444
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}";
1452
1445
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
1453
1446
  let body;
1454
1447
  return new protocol_http_1.HttpRequest({
@@ -1465,7 +1458,7 @@ exports.serializeAws_restJson1DeleteVoiceConnectorCommand = serializeAws_restJso
1465
1458
  const serializeAws_restJson1DeleteVoiceConnectorEmergencyCallingConfigurationCommand = async (input, context) => {
1466
1459
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1467
1460
  const headers = {};
1468
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1461
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1469
1462
  "/voice-connectors/{VoiceConnectorId}/emergency-calling-configuration";
1470
1463
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
1471
1464
  let body;
@@ -1483,7 +1476,7 @@ exports.serializeAws_restJson1DeleteVoiceConnectorEmergencyCallingConfigurationC
1483
1476
  const serializeAws_restJson1DeleteVoiceConnectorGroupCommand = async (input, context) => {
1484
1477
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1485
1478
  const headers = {};
1486
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1479
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1487
1480
  "/voice-connector-groups/{VoiceConnectorGroupId}";
1488
1481
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorGroupId", () => input.VoiceConnectorGroupId, "{VoiceConnectorGroupId}", false);
1489
1482
  let body;
@@ -1501,7 +1494,7 @@ exports.serializeAws_restJson1DeleteVoiceConnectorGroupCommand = serializeAws_re
1501
1494
  const serializeAws_restJson1DeleteVoiceConnectorOriginationCommand = async (input, context) => {
1502
1495
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1503
1496
  const headers = {};
1504
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1497
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1505
1498
  "/voice-connectors/{VoiceConnectorId}/origination";
1506
1499
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
1507
1500
  let body;
@@ -1519,7 +1512,7 @@ exports.serializeAws_restJson1DeleteVoiceConnectorOriginationCommand = serialize
1519
1512
  const serializeAws_restJson1DeleteVoiceConnectorProxyCommand = async (input, context) => {
1520
1513
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1521
1514
  const headers = {};
1522
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1515
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1523
1516
  "/voice-connectors/{VoiceConnectorId}/programmable-numbers/proxy";
1524
1517
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
1525
1518
  let body;
@@ -1537,7 +1530,7 @@ exports.serializeAws_restJson1DeleteVoiceConnectorProxyCommand = serializeAws_re
1537
1530
  const serializeAws_restJson1DeleteVoiceConnectorStreamingConfigurationCommand = async (input, context) => {
1538
1531
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1539
1532
  const headers = {};
1540
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1533
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1541
1534
  "/voice-connectors/{VoiceConnectorId}/streaming-configuration";
1542
1535
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
1543
1536
  let body;
@@ -1555,7 +1548,7 @@ exports.serializeAws_restJson1DeleteVoiceConnectorStreamingConfigurationCommand
1555
1548
  const serializeAws_restJson1DeleteVoiceConnectorTerminationCommand = async (input, context) => {
1556
1549
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1557
1550
  const headers = {};
1558
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1551
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1559
1552
  "/voice-connectors/{VoiceConnectorId}/termination";
1560
1553
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
1561
1554
  let body;
@@ -1575,7 +1568,7 @@ const serializeAws_restJson1DeleteVoiceConnectorTerminationCredentialsCommand =
1575
1568
  const headers = {
1576
1569
  "content-type": "application/json",
1577
1570
  };
1578
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1571
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1579
1572
  "/voice-connectors/{VoiceConnectorId}/termination/credentials";
1580
1573
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
1581
1574
  const query = map({
@@ -1600,7 +1593,7 @@ exports.serializeAws_restJson1DeleteVoiceConnectorTerminationCredentialsCommand
1600
1593
  const serializeAws_restJson1DescribeAppInstanceCommand = async (input, context) => {
1601
1594
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1602
1595
  const headers = {};
1603
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/app-instances/{AppInstanceArn}";
1596
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instances/{AppInstanceArn}";
1604
1597
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppInstanceArn", () => input.AppInstanceArn, "{AppInstanceArn}", false);
1605
1598
  let body;
1606
1599
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -1624,7 +1617,7 @@ exports.serializeAws_restJson1DescribeAppInstanceCommand = serializeAws_restJson
1624
1617
  const serializeAws_restJson1DescribeAppInstanceAdminCommand = async (input, context) => {
1625
1618
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1626
1619
  const headers = {};
1627
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1620
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1628
1621
  "/app-instances/{AppInstanceArn}/admins/{AppInstanceAdminArn}";
1629
1622
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppInstanceAdminArn", () => input.AppInstanceAdminArn, "{AppInstanceAdminArn}", false);
1630
1623
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppInstanceArn", () => input.AppInstanceArn, "{AppInstanceArn}", false);
@@ -1650,7 +1643,7 @@ exports.serializeAws_restJson1DescribeAppInstanceAdminCommand = serializeAws_res
1650
1643
  const serializeAws_restJson1DescribeAppInstanceUserCommand = async (input, context) => {
1651
1644
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1652
1645
  const headers = {};
1653
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/app-instance-users/{AppInstanceUserArn}";
1646
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instance-users/{AppInstanceUserArn}";
1654
1647
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppInstanceUserArn", () => input.AppInstanceUserArn, "{AppInstanceUserArn}", false);
1655
1648
  let body;
1656
1649
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -1676,7 +1669,7 @@ const serializeAws_restJson1DescribeChannelCommand = async (input, context) => {
1676
1669
  const headers = map({}, isSerializableHeaderValue, {
1677
1670
  "x-amz-chime-bearer": input.ChimeBearer,
1678
1671
  });
1679
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}";
1672
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}";
1680
1673
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
1681
1674
  let body;
1682
1675
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -1702,7 +1695,7 @@ const serializeAws_restJson1DescribeChannelBanCommand = async (input, context) =
1702
1695
  const headers = map({}, isSerializableHeaderValue, {
1703
1696
  "x-amz-chime-bearer": input.ChimeBearer,
1704
1697
  });
1705
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/bans/{MemberArn}";
1698
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/bans/{MemberArn}";
1706
1699
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
1707
1700
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MemberArn", () => input.MemberArn, "{MemberArn}", false);
1708
1701
  let body;
@@ -1729,7 +1722,7 @@ const serializeAws_restJson1DescribeChannelMembershipCommand = async (input, con
1729
1722
  const headers = map({}, isSerializableHeaderValue, {
1730
1723
  "x-amz-chime-bearer": input.ChimeBearer,
1731
1724
  });
1732
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1725
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1733
1726
  "/channels/{ChannelArn}/memberships/{MemberArn}";
1734
1727
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
1735
1728
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MemberArn", () => input.MemberArn, "{MemberArn}", false);
@@ -1757,7 +1750,7 @@ const serializeAws_restJson1DescribeChannelMembershipForAppInstanceUserCommand =
1757
1750
  const headers = map({}, isSerializableHeaderValue, {
1758
1751
  "x-amz-chime-bearer": input.ChimeBearer,
1759
1752
  });
1760
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}";
1753
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}";
1761
1754
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
1762
1755
  const query = map({
1763
1756
  scope: [, "app-instance-user-membership"],
@@ -1788,7 +1781,7 @@ const serializeAws_restJson1DescribeChannelModeratedByAppInstanceUserCommand = a
1788
1781
  const headers = map({}, isSerializableHeaderValue, {
1789
1782
  "x-amz-chime-bearer": input.ChimeBearer,
1790
1783
  });
1791
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}";
1784
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}";
1792
1785
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
1793
1786
  const query = map({
1794
1787
  scope: [, "app-instance-user-moderated-channel"],
@@ -1819,7 +1812,7 @@ const serializeAws_restJson1DescribeChannelModeratorCommand = async (input, cont
1819
1812
  const headers = map({}, isSerializableHeaderValue, {
1820
1813
  "x-amz-chime-bearer": input.ChimeBearer,
1821
1814
  });
1822
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1815
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1823
1816
  "/channels/{ChannelArn}/moderators/{ChannelModeratorArn}";
1824
1817
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
1825
1818
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelModeratorArn", () => input.ChannelModeratorArn, "{ChannelModeratorArn}", false);
@@ -1845,7 +1838,7 @@ exports.serializeAws_restJson1DescribeChannelModeratorCommand = serializeAws_res
1845
1838
  const serializeAws_restJson1DisassociatePhoneNumberFromUserCommand = async (input, context) => {
1846
1839
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1847
1840
  const headers = {};
1848
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/users/{UserId}";
1841
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/users/{UserId}";
1849
1842
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
1850
1843
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "UserId", () => input.UserId, "{UserId}", false);
1851
1844
  const query = map({
@@ -1869,7 +1862,7 @@ const serializeAws_restJson1DisassociatePhoneNumbersFromVoiceConnectorCommand =
1869
1862
  const headers = {
1870
1863
  "content-type": "application/json",
1871
1864
  };
1872
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}";
1865
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}";
1873
1866
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
1874
1867
  const query = map({
1875
1868
  operation: [, "disassociate-phone-numbers"],
@@ -1897,7 +1890,7 @@ const serializeAws_restJson1DisassociatePhoneNumbersFromVoiceConnectorGroupComma
1897
1890
  const headers = {
1898
1891
  "content-type": "application/json",
1899
1892
  };
1900
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1893
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1901
1894
  "/voice-connector-groups/{VoiceConnectorGroupId}";
1902
1895
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorGroupId", () => input.VoiceConnectorGroupId, "{VoiceConnectorGroupId}", false);
1903
1896
  const query = map({
@@ -1926,7 +1919,7 @@ const serializeAws_restJson1DisassociateSigninDelegateGroupsFromAccountCommand =
1926
1919
  const headers = {
1927
1920
  "content-type": "application/json",
1928
1921
  };
1929
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}";
1922
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}";
1930
1923
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
1931
1924
  const query = map({
1932
1925
  operation: [, "disassociate-signin-delegate-groups"],
@@ -1952,7 +1945,7 @@ exports.serializeAws_restJson1DisassociateSigninDelegateGroupsFromAccountCommand
1952
1945
  const serializeAws_restJson1GetAccountCommand = async (input, context) => {
1953
1946
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1954
1947
  const headers = {};
1955
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}";
1948
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}";
1956
1949
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
1957
1950
  let body;
1958
1951
  return new protocol_http_1.HttpRequest({
@@ -1969,7 +1962,7 @@ exports.serializeAws_restJson1GetAccountCommand = serializeAws_restJson1GetAccou
1969
1962
  const serializeAws_restJson1GetAccountSettingsCommand = async (input, context) => {
1970
1963
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1971
1964
  const headers = {};
1972
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/settings";
1965
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/settings";
1973
1966
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
1974
1967
  let body;
1975
1968
  return new protocol_http_1.HttpRequest({
@@ -1986,7 +1979,7 @@ exports.serializeAws_restJson1GetAccountSettingsCommand = serializeAws_restJson1
1986
1979
  const serializeAws_restJson1GetAppInstanceRetentionSettingsCommand = async (input, context) => {
1987
1980
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1988
1981
  const headers = {};
1989
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1982
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1990
1983
  "/app-instances/{AppInstanceArn}/retention-settings";
1991
1984
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppInstanceArn", () => input.AppInstanceArn, "{AppInstanceArn}", false);
1992
1985
  let body;
@@ -2011,7 +2004,7 @@ exports.serializeAws_restJson1GetAppInstanceRetentionSettingsCommand = serialize
2011
2004
  const serializeAws_restJson1GetAppInstanceStreamingConfigurationsCommand = async (input, context) => {
2012
2005
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2013
2006
  const headers = {};
2014
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2007
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2015
2008
  "/app-instances/{AppInstanceArn}/streaming-configurations";
2016
2009
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppInstanceArn", () => input.AppInstanceArn, "{AppInstanceArn}", false);
2017
2010
  let body;
@@ -2029,7 +2022,7 @@ exports.serializeAws_restJson1GetAppInstanceStreamingConfigurationsCommand = ser
2029
2022
  const serializeAws_restJson1GetAttendeeCommand = async (input, context) => {
2030
2023
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2031
2024
  const headers = {};
2032
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2025
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2033
2026
  "/meetings/{MeetingId}/attendees/{AttendeeId}";
2034
2027
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MeetingId", () => input.MeetingId, "{MeetingId}", false);
2035
2028
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AttendeeId", () => input.AttendeeId, "{AttendeeId}", false);
@@ -2048,7 +2041,7 @@ exports.serializeAws_restJson1GetAttendeeCommand = serializeAws_restJson1GetAtte
2048
2041
  const serializeAws_restJson1GetBotCommand = async (input, context) => {
2049
2042
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2050
2043
  const headers = {};
2051
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/bots/{BotId}";
2044
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/bots/{BotId}";
2052
2045
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
2053
2046
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BotId", () => input.BotId, "{BotId}", false);
2054
2047
  let body;
@@ -2068,7 +2061,7 @@ const serializeAws_restJson1GetChannelMessageCommand = async (input, context) =>
2068
2061
  const headers = map({}, isSerializableHeaderValue, {
2069
2062
  "x-amz-chime-bearer": input.ChimeBearer,
2070
2063
  });
2071
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2064
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2072
2065
  "/channels/{ChannelArn}/messages/{MessageId}";
2073
2066
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
2074
2067
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MessageId", () => input.MessageId, "{MessageId}", false);
@@ -2094,7 +2087,7 @@ exports.serializeAws_restJson1GetChannelMessageCommand = serializeAws_restJson1G
2094
2087
  const serializeAws_restJson1GetEventsConfigurationCommand = async (input, context) => {
2095
2088
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2096
2089
  const headers = {};
2097
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2090
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2098
2091
  "/accounts/{AccountId}/bots/{BotId}/events-configuration";
2099
2092
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
2100
2093
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BotId", () => input.BotId, "{BotId}", false);
@@ -2115,7 +2108,7 @@ const serializeAws_restJson1GetGlobalSettingsCommand = async (input, context) =>
2115
2108
  const headers = {
2116
2109
  "content-type": "application/json",
2117
2110
  };
2118
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/settings";
2111
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/settings";
2119
2112
  let body;
2120
2113
  body = "";
2121
2114
  return new protocol_http_1.HttpRequest({
@@ -2132,7 +2125,7 @@ exports.serializeAws_restJson1GetGlobalSettingsCommand = serializeAws_restJson1G
2132
2125
  const serializeAws_restJson1GetMediaCapturePipelineCommand = async (input, context) => {
2133
2126
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2134
2127
  const headers = {};
2135
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2128
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2136
2129
  "/media-capture-pipelines/{MediaPipelineId}";
2137
2130
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MediaPipelineId", () => input.MediaPipelineId, "{MediaPipelineId}", false);
2138
2131
  let body;
@@ -2150,7 +2143,7 @@ exports.serializeAws_restJson1GetMediaCapturePipelineCommand = serializeAws_rest
2150
2143
  const serializeAws_restJson1GetMeetingCommand = async (input, context) => {
2151
2144
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2152
2145
  const headers = {};
2153
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}";
2146
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}";
2154
2147
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MeetingId", () => input.MeetingId, "{MeetingId}", false);
2155
2148
  let body;
2156
2149
  return new protocol_http_1.HttpRequest({
@@ -2169,7 +2162,7 @@ const serializeAws_restJson1GetMessagingSessionEndpointCommand = async (input, c
2169
2162
  const headers = {
2170
2163
  "content-type": "application/json",
2171
2164
  };
2172
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/endpoints/messaging-session";
2165
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/endpoints/messaging-session";
2173
2166
  let body;
2174
2167
  body = "";
2175
2168
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -2193,7 +2186,7 @@ exports.serializeAws_restJson1GetMessagingSessionEndpointCommand = serializeAws_
2193
2186
  const serializeAws_restJson1GetPhoneNumberCommand = async (input, context) => {
2194
2187
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2195
2188
  const headers = {};
2196
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/phone-numbers/{PhoneNumberId}";
2189
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-numbers/{PhoneNumberId}";
2197
2190
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PhoneNumberId", () => input.PhoneNumberId, "{PhoneNumberId}", false);
2198
2191
  let body;
2199
2192
  return new protocol_http_1.HttpRequest({
@@ -2210,7 +2203,7 @@ exports.serializeAws_restJson1GetPhoneNumberCommand = serializeAws_restJson1GetP
2210
2203
  const serializeAws_restJson1GetPhoneNumberOrderCommand = async (input, context) => {
2211
2204
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2212
2205
  const headers = {};
2213
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number-orders/{PhoneNumberOrderId}";
2206
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number-orders/{PhoneNumberOrderId}";
2214
2207
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PhoneNumberOrderId", () => input.PhoneNumberOrderId, "{PhoneNumberOrderId}", false);
2215
2208
  let body;
2216
2209
  return new protocol_http_1.HttpRequest({
@@ -2229,7 +2222,7 @@ const serializeAws_restJson1GetPhoneNumberSettingsCommand = async (input, contex
2229
2222
  const headers = {
2230
2223
  "content-type": "application/json",
2231
2224
  };
2232
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/settings/phone-number";
2225
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/settings/phone-number";
2233
2226
  let body;
2234
2227
  body = "";
2235
2228
  return new protocol_http_1.HttpRequest({
@@ -2246,7 +2239,7 @@ exports.serializeAws_restJson1GetPhoneNumberSettingsCommand = serializeAws_restJ
2246
2239
  const serializeAws_restJson1GetProxySessionCommand = async (input, context) => {
2247
2240
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2248
2241
  const headers = {};
2249
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2242
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2250
2243
  "/voice-connectors/{VoiceConnectorId}/proxy-sessions/{ProxySessionId}";
2251
2244
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
2252
2245
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ProxySessionId", () => input.ProxySessionId, "{ProxySessionId}", false);
@@ -2265,7 +2258,7 @@ exports.serializeAws_restJson1GetProxySessionCommand = serializeAws_restJson1Get
2265
2258
  const serializeAws_restJson1GetRetentionSettingsCommand = async (input, context) => {
2266
2259
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2267
2260
  const headers = {};
2268
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/retention-settings";
2261
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/retention-settings";
2269
2262
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
2270
2263
  let body;
2271
2264
  return new protocol_http_1.HttpRequest({
@@ -2282,7 +2275,7 @@ exports.serializeAws_restJson1GetRetentionSettingsCommand = serializeAws_restJso
2282
2275
  const serializeAws_restJson1GetRoomCommand = async (input, context) => {
2283
2276
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2284
2277
  const headers = {};
2285
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/rooms/{RoomId}";
2278
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/rooms/{RoomId}";
2286
2279
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
2287
2280
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "RoomId", () => input.RoomId, "{RoomId}", false);
2288
2281
  let body;
@@ -2300,7 +2293,7 @@ exports.serializeAws_restJson1GetRoomCommand = serializeAws_restJson1GetRoomComm
2300
2293
  const serializeAws_restJson1GetSipMediaApplicationCommand = async (input, context) => {
2301
2294
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2302
2295
  const headers = {};
2303
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2296
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2304
2297
  "/sip-media-applications/{SipMediaApplicationId}";
2305
2298
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "SipMediaApplicationId", () => input.SipMediaApplicationId, "{SipMediaApplicationId}", false);
2306
2299
  let body;
@@ -2318,7 +2311,7 @@ exports.serializeAws_restJson1GetSipMediaApplicationCommand = serializeAws_restJ
2318
2311
  const serializeAws_restJson1GetSipMediaApplicationLoggingConfigurationCommand = async (input, context) => {
2319
2312
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2320
2313
  const headers = {};
2321
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2314
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2322
2315
  "/sip-media-applications/{SipMediaApplicationId}/logging-configuration";
2323
2316
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "SipMediaApplicationId", () => input.SipMediaApplicationId, "{SipMediaApplicationId}", false);
2324
2317
  let body;
@@ -2336,7 +2329,7 @@ exports.serializeAws_restJson1GetSipMediaApplicationLoggingConfigurationCommand
2336
2329
  const serializeAws_restJson1GetSipRuleCommand = async (input, context) => {
2337
2330
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2338
2331
  const headers = {};
2339
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/sip-rules/{SipRuleId}";
2332
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sip-rules/{SipRuleId}";
2340
2333
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "SipRuleId", () => input.SipRuleId, "{SipRuleId}", false);
2341
2334
  let body;
2342
2335
  return new protocol_http_1.HttpRequest({
@@ -2353,7 +2346,7 @@ exports.serializeAws_restJson1GetSipRuleCommand = serializeAws_restJson1GetSipRu
2353
2346
  const serializeAws_restJson1GetUserCommand = async (input, context) => {
2354
2347
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2355
2348
  const headers = {};
2356
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/users/{UserId}";
2349
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/users/{UserId}";
2357
2350
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
2358
2351
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "UserId", () => input.UserId, "{UserId}", false);
2359
2352
  let body;
@@ -2371,7 +2364,7 @@ exports.serializeAws_restJson1GetUserCommand = serializeAws_restJson1GetUserComm
2371
2364
  const serializeAws_restJson1GetUserSettingsCommand = async (input, context) => {
2372
2365
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2373
2366
  const headers = {};
2374
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2367
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2375
2368
  "/accounts/{AccountId}/users/{UserId}/settings";
2376
2369
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
2377
2370
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "UserId", () => input.UserId, "{UserId}", false);
@@ -2390,7 +2383,7 @@ exports.serializeAws_restJson1GetUserSettingsCommand = serializeAws_restJson1Get
2390
2383
  const serializeAws_restJson1GetVoiceConnectorCommand = async (input, context) => {
2391
2384
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2392
2385
  const headers = {};
2393
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}";
2386
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}";
2394
2387
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
2395
2388
  let body;
2396
2389
  return new protocol_http_1.HttpRequest({
@@ -2407,7 +2400,7 @@ exports.serializeAws_restJson1GetVoiceConnectorCommand = serializeAws_restJson1G
2407
2400
  const serializeAws_restJson1GetVoiceConnectorEmergencyCallingConfigurationCommand = async (input, context) => {
2408
2401
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2409
2402
  const headers = {};
2410
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2403
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2411
2404
  "/voice-connectors/{VoiceConnectorId}/emergency-calling-configuration";
2412
2405
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
2413
2406
  let body;
@@ -2425,7 +2418,7 @@ exports.serializeAws_restJson1GetVoiceConnectorEmergencyCallingConfigurationComm
2425
2418
  const serializeAws_restJson1GetVoiceConnectorGroupCommand = async (input, context) => {
2426
2419
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2427
2420
  const headers = {};
2428
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2421
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2429
2422
  "/voice-connector-groups/{VoiceConnectorGroupId}";
2430
2423
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorGroupId", () => input.VoiceConnectorGroupId, "{VoiceConnectorGroupId}", false);
2431
2424
  let body;
@@ -2443,7 +2436,7 @@ exports.serializeAws_restJson1GetVoiceConnectorGroupCommand = serializeAws_restJ
2443
2436
  const serializeAws_restJson1GetVoiceConnectorLoggingConfigurationCommand = async (input, context) => {
2444
2437
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2445
2438
  const headers = {};
2446
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2439
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2447
2440
  "/voice-connectors/{VoiceConnectorId}/logging-configuration";
2448
2441
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
2449
2442
  let body;
@@ -2461,7 +2454,7 @@ exports.serializeAws_restJson1GetVoiceConnectorLoggingConfigurationCommand = ser
2461
2454
  const serializeAws_restJson1GetVoiceConnectorOriginationCommand = async (input, context) => {
2462
2455
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2463
2456
  const headers = {};
2464
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2457
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2465
2458
  "/voice-connectors/{VoiceConnectorId}/origination";
2466
2459
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
2467
2460
  let body;
@@ -2479,7 +2472,7 @@ exports.serializeAws_restJson1GetVoiceConnectorOriginationCommand = serializeAws
2479
2472
  const serializeAws_restJson1GetVoiceConnectorProxyCommand = async (input, context) => {
2480
2473
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2481
2474
  const headers = {};
2482
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2475
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2483
2476
  "/voice-connectors/{VoiceConnectorId}/programmable-numbers/proxy";
2484
2477
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
2485
2478
  let body;
@@ -2497,7 +2490,7 @@ exports.serializeAws_restJson1GetVoiceConnectorProxyCommand = serializeAws_restJ
2497
2490
  const serializeAws_restJson1GetVoiceConnectorStreamingConfigurationCommand = async (input, context) => {
2498
2491
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2499
2492
  const headers = {};
2500
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2493
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2501
2494
  "/voice-connectors/{VoiceConnectorId}/streaming-configuration";
2502
2495
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
2503
2496
  let body;
@@ -2515,7 +2508,7 @@ exports.serializeAws_restJson1GetVoiceConnectorStreamingConfigurationCommand = s
2515
2508
  const serializeAws_restJson1GetVoiceConnectorTerminationCommand = async (input, context) => {
2516
2509
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2517
2510
  const headers = {};
2518
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2511
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2519
2512
  "/voice-connectors/{VoiceConnectorId}/termination";
2520
2513
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
2521
2514
  let body;
@@ -2533,7 +2526,7 @@ exports.serializeAws_restJson1GetVoiceConnectorTerminationCommand = serializeAws
2533
2526
  const serializeAws_restJson1GetVoiceConnectorTerminationHealthCommand = async (input, context) => {
2534
2527
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2535
2528
  const headers = {};
2536
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2529
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2537
2530
  "/voice-connectors/{VoiceConnectorId}/termination/health";
2538
2531
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
2539
2532
  let body;
@@ -2553,7 +2546,7 @@ const serializeAws_restJson1InviteUsersCommand = async (input, context) => {
2553
2546
  const headers = {
2554
2547
  "content-type": "application/json",
2555
2548
  };
2556
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/users";
2549
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/users";
2557
2550
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
2558
2551
  const query = map({
2559
2552
  operation: [, "add"],
@@ -2580,7 +2573,7 @@ exports.serializeAws_restJson1InviteUsersCommand = serializeAws_restJson1InviteU
2580
2573
  const serializeAws_restJson1ListAccountsCommand = async (input, context) => {
2581
2574
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2582
2575
  const headers = {};
2583
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts";
2576
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts";
2584
2577
  const query = map({
2585
2578
  name: [, input.Name],
2586
2579
  "user-email": [, input.UserEmail],
@@ -2603,7 +2596,7 @@ exports.serializeAws_restJson1ListAccountsCommand = serializeAws_restJson1ListAc
2603
2596
  const serializeAws_restJson1ListAppInstanceAdminsCommand = async (input, context) => {
2604
2597
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2605
2598
  const headers = {};
2606
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/app-instances/{AppInstanceArn}/admins";
2599
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instances/{AppInstanceArn}/admins";
2607
2600
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppInstanceArn", () => input.AppInstanceArn, "{AppInstanceArn}", false);
2608
2601
  const query = map({
2609
2602
  "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -2632,7 +2625,7 @@ exports.serializeAws_restJson1ListAppInstanceAdminsCommand = serializeAws_restJs
2632
2625
  const serializeAws_restJson1ListAppInstancesCommand = async (input, context) => {
2633
2626
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2634
2627
  const headers = {};
2635
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/app-instances";
2628
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instances";
2636
2629
  const query = map({
2637
2630
  "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
2638
2631
  "next-token": [, input.NextToken],
@@ -2660,7 +2653,7 @@ exports.serializeAws_restJson1ListAppInstancesCommand = serializeAws_restJson1Li
2660
2653
  const serializeAws_restJson1ListAppInstanceUsersCommand = async (input, context) => {
2661
2654
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2662
2655
  const headers = {};
2663
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/app-instance-users";
2656
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instance-users";
2664
2657
  const query = map({
2665
2658
  "app-instance-arn": [, input.AppInstanceArn],
2666
2659
  "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -2689,7 +2682,7 @@ exports.serializeAws_restJson1ListAppInstanceUsersCommand = serializeAws_restJso
2689
2682
  const serializeAws_restJson1ListAttendeesCommand = async (input, context) => {
2690
2683
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2691
2684
  const headers = {};
2692
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}/attendees";
2685
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}/attendees";
2693
2686
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MeetingId", () => input.MeetingId, "{MeetingId}", false);
2694
2687
  const query = map({
2695
2688
  "next-token": [, input.NextToken],
@@ -2711,7 +2704,7 @@ exports.serializeAws_restJson1ListAttendeesCommand = serializeAws_restJson1ListA
2711
2704
  const serializeAws_restJson1ListAttendeeTagsCommand = async (input, context) => {
2712
2705
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2713
2706
  const headers = {};
2714
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2707
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2715
2708
  "/meetings/{MeetingId}/attendees/{AttendeeId}/tags";
2716
2709
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MeetingId", () => input.MeetingId, "{MeetingId}", false);
2717
2710
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AttendeeId", () => input.AttendeeId, "{AttendeeId}", false);
@@ -2730,7 +2723,7 @@ exports.serializeAws_restJson1ListAttendeeTagsCommand = serializeAws_restJson1Li
2730
2723
  const serializeAws_restJson1ListBotsCommand = async (input, context) => {
2731
2724
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2732
2725
  const headers = {};
2733
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/bots";
2726
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/bots";
2734
2727
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
2735
2728
  const query = map({
2736
2729
  "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -2754,7 +2747,7 @@ const serializeAws_restJson1ListChannelBansCommand = async (input, context) => {
2754
2747
  const headers = map({}, isSerializableHeaderValue, {
2755
2748
  "x-amz-chime-bearer": input.ChimeBearer,
2756
2749
  });
2757
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/bans";
2750
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/bans";
2758
2751
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
2759
2752
  const query = map({
2760
2753
  "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -2785,7 +2778,7 @@ const serializeAws_restJson1ListChannelMembershipsCommand = async (input, contex
2785
2778
  const headers = map({}, isSerializableHeaderValue, {
2786
2779
  "x-amz-chime-bearer": input.ChimeBearer,
2787
2780
  });
2788
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/memberships";
2781
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/memberships";
2789
2782
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
2790
2783
  const query = map({
2791
2784
  type: [, input.Type],
@@ -2817,7 +2810,7 @@ const serializeAws_restJson1ListChannelMembershipsForAppInstanceUserCommand = as
2817
2810
  const headers = map({}, isSerializableHeaderValue, {
2818
2811
  "x-amz-chime-bearer": input.ChimeBearer,
2819
2812
  });
2820
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
2813
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
2821
2814
  const query = map({
2822
2815
  scope: [, "app-instance-user-memberships"],
2823
2816
  "app-instance-user-arn": [, input.AppInstanceUserArn],
@@ -2849,7 +2842,7 @@ const serializeAws_restJson1ListChannelMessagesCommand = async (input, context)
2849
2842
  const headers = map({}, isSerializableHeaderValue, {
2850
2843
  "x-amz-chime-bearer": input.ChimeBearer,
2851
2844
  });
2852
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/messages";
2845
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/messages";
2853
2846
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
2854
2847
  const query = map({
2855
2848
  "sort-order": [, input.SortOrder],
@@ -2889,7 +2882,7 @@ const serializeAws_restJson1ListChannelModeratorsCommand = async (input, context
2889
2882
  const headers = map({}, isSerializableHeaderValue, {
2890
2883
  "x-amz-chime-bearer": input.ChimeBearer,
2891
2884
  });
2892
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/moderators";
2885
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/moderators";
2893
2886
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
2894
2887
  const query = map({
2895
2888
  "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -2920,7 +2913,7 @@ const serializeAws_restJson1ListChannelsCommand = async (input, context) => {
2920
2913
  const headers = map({}, isSerializableHeaderValue, {
2921
2914
  "x-amz-chime-bearer": input.ChimeBearer,
2922
2915
  });
2923
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
2916
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
2924
2917
  const query = map({
2925
2918
  "app-instance-arn": [, input.AppInstanceArn],
2926
2919
  privacy: [, input.Privacy],
@@ -2952,7 +2945,7 @@ const serializeAws_restJson1ListChannelsModeratedByAppInstanceUserCommand = asyn
2952
2945
  const headers = map({}, isSerializableHeaderValue, {
2953
2946
  "x-amz-chime-bearer": input.ChimeBearer,
2954
2947
  });
2955
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
2948
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
2956
2949
  const query = map({
2957
2950
  scope: [, "app-instance-user-moderated-channels"],
2958
2951
  "app-instance-user-arn": [, input.AppInstanceUserArn],
@@ -2982,7 +2975,7 @@ exports.serializeAws_restJson1ListChannelsModeratedByAppInstanceUserCommand = se
2982
2975
  const serializeAws_restJson1ListMediaCapturePipelinesCommand = async (input, context) => {
2983
2976
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2984
2977
  const headers = {};
2985
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/media-capture-pipelines";
2978
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/media-capture-pipelines";
2986
2979
  const query = map({
2987
2980
  "next-token": [, input.NextToken],
2988
2981
  "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -3003,7 +2996,7 @@ exports.serializeAws_restJson1ListMediaCapturePipelinesCommand = serializeAws_re
3003
2996
  const serializeAws_restJson1ListMeetingsCommand = async (input, context) => {
3004
2997
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3005
2998
  const headers = {};
3006
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/meetings";
2999
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/meetings";
3007
3000
  const query = map({
3008
3001
  "next-token": [, input.NextToken],
3009
3002
  "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -3024,7 +3017,7 @@ exports.serializeAws_restJson1ListMeetingsCommand = serializeAws_restJson1ListMe
3024
3017
  const serializeAws_restJson1ListMeetingTagsCommand = async (input, context) => {
3025
3018
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3026
3019
  const headers = {};
3027
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}/tags";
3020
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}/tags";
3028
3021
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MeetingId", () => input.MeetingId, "{MeetingId}", false);
3029
3022
  let body;
3030
3023
  return new protocol_http_1.HttpRequest({
@@ -3041,7 +3034,7 @@ exports.serializeAws_restJson1ListMeetingTagsCommand = serializeAws_restJson1Lis
3041
3034
  const serializeAws_restJson1ListPhoneNumberOrdersCommand = async (input, context) => {
3042
3035
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3043
3036
  const headers = {};
3044
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number-orders";
3037
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number-orders";
3045
3038
  const query = map({
3046
3039
  "next-token": [, input.NextToken],
3047
3040
  "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -3062,7 +3055,7 @@ exports.serializeAws_restJson1ListPhoneNumberOrdersCommand = serializeAws_restJs
3062
3055
  const serializeAws_restJson1ListPhoneNumbersCommand = async (input, context) => {
3063
3056
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3064
3057
  const headers = {};
3065
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/phone-numbers";
3058
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-numbers";
3066
3059
  const query = map({
3067
3060
  status: [, input.Status],
3068
3061
  "product-type": [, input.ProductType],
@@ -3087,7 +3080,7 @@ exports.serializeAws_restJson1ListPhoneNumbersCommand = serializeAws_restJson1Li
3087
3080
  const serializeAws_restJson1ListProxySessionsCommand = async (input, context) => {
3088
3081
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3089
3082
  const headers = {};
3090
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3083
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3091
3084
  "/voice-connectors/{VoiceConnectorId}/proxy-sessions";
3092
3085
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
3093
3086
  const query = map({
@@ -3111,7 +3104,7 @@ exports.serializeAws_restJson1ListProxySessionsCommand = serializeAws_restJson1L
3111
3104
  const serializeAws_restJson1ListRoomMembershipsCommand = async (input, context) => {
3112
3105
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3113
3106
  const headers = {};
3114
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3107
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3115
3108
  "/accounts/{AccountId}/rooms/{RoomId}/memberships";
3116
3109
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
3117
3110
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "RoomId", () => input.RoomId, "{RoomId}", false);
@@ -3135,7 +3128,7 @@ exports.serializeAws_restJson1ListRoomMembershipsCommand = serializeAws_restJson
3135
3128
  const serializeAws_restJson1ListRoomsCommand = async (input, context) => {
3136
3129
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3137
3130
  const headers = {};
3138
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/rooms";
3131
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/rooms";
3139
3132
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
3140
3133
  const query = map({
3141
3134
  "member-id": [, input.MemberId],
@@ -3158,7 +3151,7 @@ exports.serializeAws_restJson1ListRoomsCommand = serializeAws_restJson1ListRooms
3158
3151
  const serializeAws_restJson1ListSipMediaApplicationsCommand = async (input, context) => {
3159
3152
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3160
3153
  const headers = {};
3161
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/sip-media-applications";
3154
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sip-media-applications";
3162
3155
  const query = map({
3163
3156
  "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
3164
3157
  "next-token": [, input.NextToken],
@@ -3179,7 +3172,7 @@ exports.serializeAws_restJson1ListSipMediaApplicationsCommand = serializeAws_res
3179
3172
  const serializeAws_restJson1ListSipRulesCommand = async (input, context) => {
3180
3173
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3181
3174
  const headers = {};
3182
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/sip-rules";
3175
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sip-rules";
3183
3176
  const query = map({
3184
3177
  "sip-media-application": [, input.SipMediaApplicationId],
3185
3178
  "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -3201,7 +3194,7 @@ exports.serializeAws_restJson1ListSipRulesCommand = serializeAws_restJson1ListSi
3201
3194
  const serializeAws_restJson1ListSupportedPhoneNumberCountriesCommand = async (input, context) => {
3202
3195
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3203
3196
  const headers = {};
3204
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number-countries";
3197
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number-countries";
3205
3198
  const query = map({
3206
3199
  "product-type": [, input.ProductType],
3207
3200
  });
@@ -3221,7 +3214,7 @@ exports.serializeAws_restJson1ListSupportedPhoneNumberCountriesCommand = seriali
3221
3214
  const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
3222
3215
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3223
3216
  const headers = {};
3224
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags";
3217
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags";
3225
3218
  const query = map({
3226
3219
  arn: [, input.ResourceARN],
3227
3220
  });
@@ -3241,7 +3234,7 @@ exports.serializeAws_restJson1ListTagsForResourceCommand = serializeAws_restJson
3241
3234
  const serializeAws_restJson1ListUsersCommand = async (input, context) => {
3242
3235
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3243
3236
  const headers = {};
3244
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/users";
3237
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/users";
3245
3238
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
3246
3239
  const query = map({
3247
3240
  "user-email": [, input.UserEmail],
@@ -3265,7 +3258,7 @@ exports.serializeAws_restJson1ListUsersCommand = serializeAws_restJson1ListUsers
3265
3258
  const serializeAws_restJson1ListVoiceConnectorGroupsCommand = async (input, context) => {
3266
3259
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3267
3260
  const headers = {};
3268
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connector-groups";
3261
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connector-groups";
3269
3262
  const query = map({
3270
3263
  "next-token": [, input.NextToken],
3271
3264
  "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -3286,7 +3279,7 @@ exports.serializeAws_restJson1ListVoiceConnectorGroupsCommand = serializeAws_res
3286
3279
  const serializeAws_restJson1ListVoiceConnectorsCommand = async (input, context) => {
3287
3280
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3288
3281
  const headers = {};
3289
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors";
3282
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors";
3290
3283
  const query = map({
3291
3284
  "next-token": [, input.NextToken],
3292
3285
  "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -3307,7 +3300,7 @@ exports.serializeAws_restJson1ListVoiceConnectorsCommand = serializeAws_restJson
3307
3300
  const serializeAws_restJson1ListVoiceConnectorTerminationCredentialsCommand = async (input, context) => {
3308
3301
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3309
3302
  const headers = {};
3310
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3303
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3311
3304
  "/voice-connectors/{VoiceConnectorId}/termination/credentials";
3312
3305
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
3313
3306
  let body;
@@ -3325,7 +3318,7 @@ exports.serializeAws_restJson1ListVoiceConnectorTerminationCredentialsCommand =
3325
3318
  const serializeAws_restJson1LogoutUserCommand = async (input, context) => {
3326
3319
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3327
3320
  const headers = {};
3328
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/users/{UserId}";
3321
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/users/{UserId}";
3329
3322
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
3330
3323
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "UserId", () => input.UserId, "{UserId}", false);
3331
3324
  const query = map({
@@ -3349,7 +3342,7 @@ const serializeAws_restJson1PutAppInstanceRetentionSettingsCommand = async (inpu
3349
3342
  const headers = {
3350
3343
  "content-type": "application/json",
3351
3344
  };
3352
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3345
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3353
3346
  "/app-instances/{AppInstanceArn}/retention-settings";
3354
3347
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppInstanceArn", () => input.AppInstanceArn, "{AppInstanceArn}", false);
3355
3348
  let body;
@@ -3381,7 +3374,7 @@ const serializeAws_restJson1PutAppInstanceStreamingConfigurationsCommand = async
3381
3374
  const headers = {
3382
3375
  "content-type": "application/json",
3383
3376
  };
3384
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3377
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3385
3378
  "/app-instances/{AppInstanceArn}/streaming-configurations";
3386
3379
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppInstanceArn", () => input.AppInstanceArn, "{AppInstanceArn}", false);
3387
3380
  let body;
@@ -3406,7 +3399,7 @@ const serializeAws_restJson1PutEventsConfigurationCommand = async (input, contex
3406
3399
  const headers = {
3407
3400
  "content-type": "application/json",
3408
3401
  };
3409
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3402
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3410
3403
  "/accounts/{AccountId}/bots/{BotId}/events-configuration";
3411
3404
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
3412
3405
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BotId", () => input.BotId, "{BotId}", false);
@@ -3433,7 +3426,7 @@ const serializeAws_restJson1PutRetentionSettingsCommand = async (input, context)
3433
3426
  const headers = {
3434
3427
  "content-type": "application/json",
3435
3428
  };
3436
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/retention-settings";
3429
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/retention-settings";
3437
3430
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
3438
3431
  let body;
3439
3432
  body = JSON.stringify({
@@ -3457,7 +3450,7 @@ const serializeAws_restJson1PutSipMediaApplicationLoggingConfigurationCommand =
3457
3450
  const headers = {
3458
3451
  "content-type": "application/json",
3459
3452
  };
3460
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3453
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3461
3454
  "/sip-media-applications/{SipMediaApplicationId}/logging-configuration";
3462
3455
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "SipMediaApplicationId", () => input.SipMediaApplicationId, "{SipMediaApplicationId}", false);
3463
3456
  let body;
@@ -3482,7 +3475,7 @@ const serializeAws_restJson1PutVoiceConnectorEmergencyCallingConfigurationComman
3482
3475
  const headers = {
3483
3476
  "content-type": "application/json",
3484
3477
  };
3485
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3478
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3486
3479
  "/voice-connectors/{VoiceConnectorId}/emergency-calling-configuration";
3487
3480
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
3488
3481
  let body;
@@ -3507,7 +3500,7 @@ const serializeAws_restJson1PutVoiceConnectorLoggingConfigurationCommand = async
3507
3500
  const headers = {
3508
3501
  "content-type": "application/json",
3509
3502
  };
3510
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3503
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3511
3504
  "/voice-connectors/{VoiceConnectorId}/logging-configuration";
3512
3505
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
3513
3506
  let body;
@@ -3532,7 +3525,7 @@ const serializeAws_restJson1PutVoiceConnectorOriginationCommand = async (input,
3532
3525
  const headers = {
3533
3526
  "content-type": "application/json",
3534
3527
  };
3535
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3528
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3536
3529
  "/voice-connectors/{VoiceConnectorId}/origination";
3537
3530
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
3538
3531
  let body;
@@ -3555,7 +3548,7 @@ const serializeAws_restJson1PutVoiceConnectorProxyCommand = async (input, contex
3555
3548
  const headers = {
3556
3549
  "content-type": "application/json",
3557
3550
  };
3558
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3551
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3559
3552
  "/voice-connectors/{VoiceConnectorId}/programmable-numbers/proxy";
3560
3553
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
3561
3554
  let body;
@@ -3585,7 +3578,7 @@ const serializeAws_restJson1PutVoiceConnectorStreamingConfigurationCommand = asy
3585
3578
  const headers = {
3586
3579
  "content-type": "application/json",
3587
3580
  };
3588
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3581
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3589
3582
  "/voice-connectors/{VoiceConnectorId}/streaming-configuration";
3590
3583
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
3591
3584
  let body;
@@ -3610,7 +3603,7 @@ const serializeAws_restJson1PutVoiceConnectorTerminationCommand = async (input,
3610
3603
  const headers = {
3611
3604
  "content-type": "application/json",
3612
3605
  };
3613
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3606
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3614
3607
  "/voice-connectors/{VoiceConnectorId}/termination";
3615
3608
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
3616
3609
  let body;
@@ -3633,7 +3626,7 @@ const serializeAws_restJson1PutVoiceConnectorTerminationCredentialsCommand = asy
3633
3626
  const headers = {
3634
3627
  "content-type": "application/json",
3635
3628
  };
3636
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3629
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3637
3630
  "/voice-connectors/{VoiceConnectorId}/termination/credentials";
3638
3631
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
3639
3632
  const query = map({
@@ -3660,7 +3653,7 @@ const serializeAws_restJson1RedactChannelMessageCommand = async (input, context)
3660
3653
  const headers = map({}, isSerializableHeaderValue, {
3661
3654
  "x-amz-chime-bearer": input.ChimeBearer,
3662
3655
  });
3663
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3656
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3664
3657
  "/channels/{ChannelArn}/messages/{MessageId}";
3665
3658
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
3666
3659
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MessageId", () => input.MessageId, "{MessageId}", false);
@@ -3690,7 +3683,7 @@ exports.serializeAws_restJson1RedactChannelMessageCommand = serializeAws_restJso
3690
3683
  const serializeAws_restJson1RedactConversationMessageCommand = async (input, context) => {
3691
3684
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3692
3685
  const headers = {};
3693
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3686
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3694
3687
  "/accounts/{AccountId}/conversations/{ConversationId}/messages/{MessageId}";
3695
3688
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
3696
3689
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ConversationId", () => input.ConversationId, "{ConversationId}", false);
@@ -3714,7 +3707,7 @@ exports.serializeAws_restJson1RedactConversationMessageCommand = serializeAws_re
3714
3707
  const serializeAws_restJson1RedactRoomMessageCommand = async (input, context) => {
3715
3708
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3716
3709
  const headers = {};
3717
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3710
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3718
3711
  "/accounts/{AccountId}/rooms/{RoomId}/messages/{MessageId}";
3719
3712
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
3720
3713
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "RoomId", () => input.RoomId, "{RoomId}", false);
@@ -3738,7 +3731,7 @@ exports.serializeAws_restJson1RedactRoomMessageCommand = serializeAws_restJson1R
3738
3731
  const serializeAws_restJson1RegenerateSecurityTokenCommand = async (input, context) => {
3739
3732
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3740
3733
  const headers = {};
3741
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/bots/{BotId}";
3734
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/bots/{BotId}";
3742
3735
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
3743
3736
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BotId", () => input.BotId, "{BotId}", false);
3744
3737
  const query = map({
@@ -3760,7 +3753,7 @@ exports.serializeAws_restJson1RegenerateSecurityTokenCommand = serializeAws_rest
3760
3753
  const serializeAws_restJson1ResetPersonalPINCommand = async (input, context) => {
3761
3754
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3762
3755
  const headers = {};
3763
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/users/{UserId}";
3756
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/users/{UserId}";
3764
3757
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
3765
3758
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "UserId", () => input.UserId, "{UserId}", false);
3766
3759
  const query = map({
@@ -3782,7 +3775,7 @@ exports.serializeAws_restJson1ResetPersonalPINCommand = serializeAws_restJson1Re
3782
3775
  const serializeAws_restJson1RestorePhoneNumberCommand = async (input, context) => {
3783
3776
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3784
3777
  const headers = {};
3785
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/phone-numbers/{PhoneNumberId}";
3778
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-numbers/{PhoneNumberId}";
3786
3779
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PhoneNumberId", () => input.PhoneNumberId, "{PhoneNumberId}", false);
3787
3780
  const query = map({
3788
3781
  operation: [, "restore"],
@@ -3803,7 +3796,7 @@ exports.serializeAws_restJson1RestorePhoneNumberCommand = serializeAws_restJson1
3803
3796
  const serializeAws_restJson1SearchAvailablePhoneNumbersCommand = async (input, context) => {
3804
3797
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3805
3798
  const headers = {};
3806
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/search";
3799
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/search";
3807
3800
  const query = map({
3808
3801
  type: [, "phone-numbers"],
3809
3802
  "area-code": [, input.AreaCode],
@@ -3829,17 +3822,16 @@ const serializeAws_restJson1SearchAvailablePhoneNumbersCommand = async (input, c
3829
3822
  };
3830
3823
  exports.serializeAws_restJson1SearchAvailablePhoneNumbersCommand = serializeAws_restJson1SearchAvailablePhoneNumbersCommand;
3831
3824
  const serializeAws_restJson1SendChannelMessageCommand = async (input, context) => {
3832
- var _a;
3833
3825
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3834
3826
  const headers = map({}, isSerializableHeaderValue, {
3835
3827
  "content-type": "application/json",
3836
3828
  "x-amz-chime-bearer": input.ChimeBearer,
3837
3829
  });
3838
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/messages";
3830
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/messages";
3839
3831
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
3840
3832
  let body;
3841
3833
  body = JSON.stringify({
3842
- ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
3834
+ ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
3843
3835
  ...(input.Content != null && { Content: input.Content }),
3844
3836
  ...(input.Metadata != null && { Metadata: input.Metadata }),
3845
3837
  ...(input.Persistence != null && { Persistence: input.Persistence }),
@@ -3868,7 +3860,7 @@ const serializeAws_restJson1StartMeetingTranscriptionCommand = async (input, con
3868
3860
  const headers = {
3869
3861
  "content-type": "application/json",
3870
3862
  };
3871
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}/transcription";
3863
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}/transcription";
3872
3864
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MeetingId", () => input.MeetingId, "{MeetingId}", false);
3873
3865
  const query = map({
3874
3866
  operation: [, "start"],
@@ -3894,7 +3886,7 @@ exports.serializeAws_restJson1StartMeetingTranscriptionCommand = serializeAws_re
3894
3886
  const serializeAws_restJson1StopMeetingTranscriptionCommand = async (input, context) => {
3895
3887
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3896
3888
  const headers = {};
3897
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}/transcription";
3889
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}/transcription";
3898
3890
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MeetingId", () => input.MeetingId, "{MeetingId}", false);
3899
3891
  const query = map({
3900
3892
  operation: [, "stop"],
@@ -3917,7 +3909,7 @@ const serializeAws_restJson1TagAttendeeCommand = async (input, context) => {
3917
3909
  const headers = {
3918
3910
  "content-type": "application/json",
3919
3911
  };
3920
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3912
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3921
3913
  "/meetings/{MeetingId}/attendees/{AttendeeId}/tags";
3922
3914
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MeetingId", () => input.MeetingId, "{MeetingId}", false);
3923
3915
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AttendeeId", () => input.AttendeeId, "{AttendeeId}", false);
@@ -3945,7 +3937,7 @@ const serializeAws_restJson1TagMeetingCommand = async (input, context) => {
3945
3937
  const headers = {
3946
3938
  "content-type": "application/json",
3947
3939
  };
3948
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}/tags";
3940
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}/tags";
3949
3941
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MeetingId", () => input.MeetingId, "{MeetingId}", false);
3950
3942
  const query = map({
3951
3943
  operation: [, "add"],
@@ -3971,7 +3963,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
3971
3963
  const headers = {
3972
3964
  "content-type": "application/json",
3973
3965
  };
3974
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags";
3966
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags";
3975
3967
  const query = map({
3976
3968
  operation: [, "tag-resource"],
3977
3969
  });
@@ -3997,7 +3989,7 @@ const serializeAws_restJson1UntagAttendeeCommand = async (input, context) => {
3997
3989
  const headers = {
3998
3990
  "content-type": "application/json",
3999
3991
  };
4000
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3992
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
4001
3993
  "/meetings/{MeetingId}/attendees/{AttendeeId}/tags";
4002
3994
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MeetingId", () => input.MeetingId, "{MeetingId}", false);
4003
3995
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AttendeeId", () => input.AttendeeId, "{AttendeeId}", false);
@@ -4025,7 +4017,7 @@ const serializeAws_restJson1UntagMeetingCommand = async (input, context) => {
4025
4017
  const headers = {
4026
4018
  "content-type": "application/json",
4027
4019
  };
4028
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}/tags";
4020
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}/tags";
4029
4021
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MeetingId", () => input.MeetingId, "{MeetingId}", false);
4030
4022
  const query = map({
4031
4023
  operation: [, "delete"],
@@ -4051,7 +4043,7 @@ const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
4051
4043
  const headers = {
4052
4044
  "content-type": "application/json",
4053
4045
  };
4054
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags";
4046
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags";
4055
4047
  const query = map({
4056
4048
  operation: [, "untag-resource"],
4057
4049
  });
@@ -4077,7 +4069,7 @@ const serializeAws_restJson1UpdateAccountCommand = async (input, context) => {
4077
4069
  const headers = {
4078
4070
  "content-type": "application/json",
4079
4071
  };
4080
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}";
4072
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}";
4081
4073
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
4082
4074
  let body;
4083
4075
  body = JSON.stringify({
@@ -4100,7 +4092,7 @@ const serializeAws_restJson1UpdateAccountSettingsCommand = async (input, context
4100
4092
  const headers = {
4101
4093
  "content-type": "application/json",
4102
4094
  };
4103
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/settings";
4095
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/settings";
4104
4096
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
4105
4097
  let body;
4106
4098
  body = JSON.stringify({
@@ -4124,7 +4116,7 @@ const serializeAws_restJson1UpdateAppInstanceCommand = async (input, context) =>
4124
4116
  const headers = {
4125
4117
  "content-type": "application/json",
4126
4118
  };
4127
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/app-instances/{AppInstanceArn}";
4119
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instances/{AppInstanceArn}";
4128
4120
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppInstanceArn", () => input.AppInstanceArn, "{AppInstanceArn}", false);
4129
4121
  let body;
4130
4122
  body = JSON.stringify({
@@ -4154,7 +4146,7 @@ const serializeAws_restJson1UpdateAppInstanceUserCommand = async (input, context
4154
4146
  const headers = {
4155
4147
  "content-type": "application/json",
4156
4148
  };
4157
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/app-instance-users/{AppInstanceUserArn}";
4149
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instance-users/{AppInstanceUserArn}";
4158
4150
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppInstanceUserArn", () => input.AppInstanceUserArn, "{AppInstanceUserArn}", false);
4159
4151
  let body;
4160
4152
  body = JSON.stringify({
@@ -4184,7 +4176,7 @@ const serializeAws_restJson1UpdateBotCommand = async (input, context) => {
4184
4176
  const headers = {
4185
4177
  "content-type": "application/json",
4186
4178
  };
4187
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/bots/{BotId}";
4179
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/bots/{BotId}";
4188
4180
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
4189
4181
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BotId", () => input.BotId, "{BotId}", false);
4190
4182
  let body;
@@ -4208,7 +4200,7 @@ const serializeAws_restJson1UpdateChannelCommand = async (input, context) => {
4208
4200
  "content-type": "application/json",
4209
4201
  "x-amz-chime-bearer": input.ChimeBearer,
4210
4202
  });
4211
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}";
4203
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}";
4212
4204
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
4213
4205
  let body;
4214
4206
  body = JSON.stringify({
@@ -4240,7 +4232,7 @@ const serializeAws_restJson1UpdateChannelMessageCommand = async (input, context)
4240
4232
  "content-type": "application/json",
4241
4233
  "x-amz-chime-bearer": input.ChimeBearer,
4242
4234
  });
4243
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
4235
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
4244
4236
  "/channels/{ChannelArn}/messages/{MessageId}";
4245
4237
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
4246
4238
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MessageId", () => input.MessageId, "{MessageId}", false);
@@ -4272,7 +4264,7 @@ const serializeAws_restJson1UpdateChannelReadMarkerCommand = async (input, conte
4272
4264
  const headers = map({}, isSerializableHeaderValue, {
4273
4265
  "x-amz-chime-bearer": input.ChimeBearer,
4274
4266
  });
4275
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/readMarker";
4267
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/readMarker";
4276
4268
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
4277
4269
  let body;
4278
4270
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -4298,7 +4290,7 @@ const serializeAws_restJson1UpdateGlobalSettingsCommand = async (input, context)
4298
4290
  const headers = {
4299
4291
  "content-type": "application/json",
4300
4292
  };
4301
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/settings";
4293
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/settings";
4302
4294
  let body;
4303
4295
  body = JSON.stringify({
4304
4296
  ...(input.BusinessCalling != null && {
@@ -4324,7 +4316,7 @@ const serializeAws_restJson1UpdatePhoneNumberCommand = async (input, context) =>
4324
4316
  const headers = {
4325
4317
  "content-type": "application/json",
4326
4318
  };
4327
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/phone-numbers/{PhoneNumberId}";
4319
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-numbers/{PhoneNumberId}";
4328
4320
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PhoneNumberId", () => input.PhoneNumberId, "{PhoneNumberId}", false);
4329
4321
  let body;
4330
4322
  body = JSON.stringify({
@@ -4347,7 +4339,7 @@ const serializeAws_restJson1UpdatePhoneNumberSettingsCommand = async (input, con
4347
4339
  const headers = {
4348
4340
  "content-type": "application/json",
4349
4341
  };
4350
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/settings/phone-number";
4342
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/settings/phone-number";
4351
4343
  let body;
4352
4344
  body = JSON.stringify({
4353
4345
  ...(input.CallingName != null && { CallingName: input.CallingName }),
@@ -4368,7 +4360,7 @@ const serializeAws_restJson1UpdateProxySessionCommand = async (input, context) =
4368
4360
  const headers = {
4369
4361
  "content-type": "application/json",
4370
4362
  };
4371
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
4363
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
4372
4364
  "/voice-connectors/{VoiceConnectorId}/proxy-sessions/{ProxySessionId}";
4373
4365
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
4374
4366
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ProxySessionId", () => input.ProxySessionId, "{ProxySessionId}", false);
@@ -4395,7 +4387,7 @@ const serializeAws_restJson1UpdateRoomCommand = async (input, context) => {
4395
4387
  const headers = {
4396
4388
  "content-type": "application/json",
4397
4389
  };
4398
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/rooms/{RoomId}";
4390
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/rooms/{RoomId}";
4399
4391
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
4400
4392
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "RoomId", () => input.RoomId, "{RoomId}", false);
4401
4393
  let body;
@@ -4418,7 +4410,7 @@ const serializeAws_restJson1UpdateRoomMembershipCommand = async (input, context)
4418
4410
  const headers = {
4419
4411
  "content-type": "application/json",
4420
4412
  };
4421
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
4413
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
4422
4414
  "/accounts/{AccountId}/rooms/{RoomId}/memberships/{MemberId}";
4423
4415
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
4424
4416
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "RoomId", () => input.RoomId, "{RoomId}", false);
@@ -4443,7 +4435,7 @@ const serializeAws_restJson1UpdateSipMediaApplicationCommand = async (input, con
4443
4435
  const headers = {
4444
4436
  "content-type": "application/json",
4445
4437
  };
4446
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
4438
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
4447
4439
  "/sip-media-applications/{SipMediaApplicationId}";
4448
4440
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "SipMediaApplicationId", () => input.SipMediaApplicationId, "{SipMediaApplicationId}", false);
4449
4441
  let body;
@@ -4469,7 +4461,7 @@ const serializeAws_restJson1UpdateSipMediaApplicationCallCommand = async (input,
4469
4461
  const headers = {
4470
4462
  "content-type": "application/json",
4471
4463
  };
4472
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
4464
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
4473
4465
  "/sip-media-applications/{SipMediaApplicationId}/calls/{TransactionId}";
4474
4466
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "SipMediaApplicationId", () => input.SipMediaApplicationId, "{SipMediaApplicationId}", false);
4475
4467
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "TransactionId", () => input.TransactionId, "{TransactionId}", false);
@@ -4495,7 +4487,7 @@ const serializeAws_restJson1UpdateSipRuleCommand = async (input, context) => {
4495
4487
  const headers = {
4496
4488
  "content-type": "application/json",
4497
4489
  };
4498
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/sip-rules/{SipRuleId}";
4490
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sip-rules/{SipRuleId}";
4499
4491
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "SipRuleId", () => input.SipRuleId, "{SipRuleId}", false);
4500
4492
  let body;
4501
4493
  body = JSON.stringify({
@@ -4521,7 +4513,7 @@ const serializeAws_restJson1UpdateUserCommand = async (input, context) => {
4521
4513
  const headers = {
4522
4514
  "content-type": "application/json",
4523
4515
  };
4524
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/users/{UserId}";
4516
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/users/{UserId}";
4525
4517
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
4526
4518
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "UserId", () => input.UserId, "{UserId}", false);
4527
4519
  let body;
@@ -4548,7 +4540,7 @@ const serializeAws_restJson1UpdateUserSettingsCommand = async (input, context) =
4548
4540
  const headers = {
4549
4541
  "content-type": "application/json",
4550
4542
  };
4551
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
4543
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
4552
4544
  "/accounts/{AccountId}/users/{UserId}/settings";
4553
4545
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccountId", () => input.AccountId, "{AccountId}", false);
4554
4546
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "UserId", () => input.UserId, "{UserId}", false);
@@ -4574,7 +4566,7 @@ const serializeAws_restJson1UpdateVoiceConnectorCommand = async (input, context)
4574
4566
  const headers = {
4575
4567
  "content-type": "application/json",
4576
4568
  };
4577
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}";
4569
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}";
4578
4570
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
4579
4571
  let body;
4580
4572
  body = JSON.stringify({
@@ -4597,7 +4589,7 @@ const serializeAws_restJson1UpdateVoiceConnectorGroupCommand = async (input, con
4597
4589
  const headers = {
4598
4590
  "content-type": "application/json",
4599
4591
  };
4600
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
4592
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
4601
4593
  "/voice-connector-groups/{VoiceConnectorGroupId}";
4602
4594
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VoiceConnectorGroupId", () => input.VoiceConnectorGroupId, "{VoiceConnectorGroupId}", false);
4603
4595
  let body;
@@ -4623,7 +4615,7 @@ const serializeAws_restJson1ValidateE911AddressCommand = async (input, context)
4623
4615
  const headers = {
4624
4616
  "content-type": "application/json",
4625
4617
  };
4626
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/emergency-calling/address";
4618
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/emergency-calling/address";
4627
4619
  let body;
4628
4620
  body = JSON.stringify({
4629
4621
  ...(input.AwsAccountId != null && { AwsAccountId: input.AwsAccountId }),
@@ -16738,15 +16730,12 @@ const deserializeAws_restJson1VoiceConnectorSettings = (output, context) => {
16738
16730
  CdrBucket: (0, smithy_client_1.expectString)(output.CdrBucket),
16739
16731
  };
16740
16732
  };
16741
- const deserializeMetadata = (output) => {
16742
- var _a, _b;
16743
- return ({
16744
- httpStatusCode: output.statusCode,
16745
- requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"],
16746
- extendedRequestId: output.headers["x-amz-id-2"],
16747
- cfId: output.headers["x-amz-cf-id"],
16748
- });
16749
- };
16733
+ const deserializeMetadata = (output) => ({
16734
+ httpStatusCode: output.statusCode,
16735
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
16736
+ extendedRequestId: output.headers["x-amz-id-2"],
16737
+ cfId: output.headers["x-amz-cf-id"],
16738
+ });
16750
16739
  const collectBody = (streamBody = new Uint8Array(), context) => {
16751
16740
  if (streamBody instanceof Uint8Array) {
16752
16741
  return Promise.resolve(streamBody);
@@ -16766,9 +16755,8 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
16766
16755
  return {};
16767
16756
  });
16768
16757
  const parseErrorBody = async (errorBody, context) => {
16769
- var _a;
16770
16758
  const value = await parseBody(errorBody, context);
16771
- value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
16759
+ value.message = value.message ?? value.Message;
16772
16760
  return value;
16773
16761
  };
16774
16762
  const loadRestJsonErrorCode = (output, data) => {