@aws-sdk/client-connect 3.200.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_restJson1AssociateApprovedOriginCommand = async (input, conte
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 || ""}` + "/instance/{InstanceId}/approved-origin";
21
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/approved-origin";
22
22
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
23
23
  let body;
24
24
  body = JSON.stringify({
@@ -40,7 +40,7 @@ const serializeAws_restJson1AssociateBotCommand = async (input, context) => {
40
40
  const headers = {
41
41
  "content-type": "application/json",
42
42
  };
43
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/bot";
43
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/bot";
44
44
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
45
45
  let body;
46
46
  body = JSON.stringify({
@@ -63,7 +63,7 @@ const serializeAws_restJson1AssociateDefaultVocabularyCommand = async (input, co
63
63
  const headers = {
64
64
  "content-type": "application/json",
65
65
  };
66
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
66
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
67
67
  "/default-vocabulary/{InstanceId}/{LanguageCode}";
68
68
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
69
69
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LanguageCode", () => input.LanguageCode, "{LanguageCode}", false);
@@ -87,7 +87,7 @@ const serializeAws_restJson1AssociateInstanceStorageConfigCommand = async (input
87
87
  const headers = {
88
88
  "content-type": "application/json",
89
89
  };
90
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/storage-config";
90
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/storage-config";
91
91
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
92
92
  let body;
93
93
  body = JSON.stringify({
@@ -112,7 +112,7 @@ const serializeAws_restJson1AssociateLambdaFunctionCommand = async (input, conte
112
112
  const headers = {
113
113
  "content-type": "application/json",
114
114
  };
115
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/lambda-function";
115
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/lambda-function";
116
116
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
117
117
  let body;
118
118
  body = JSON.stringify({
@@ -134,7 +134,7 @@ const serializeAws_restJson1AssociateLexBotCommand = async (input, context) => {
134
134
  const headers = {
135
135
  "content-type": "application/json",
136
136
  };
137
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/lex-bot";
137
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/lex-bot";
138
138
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
139
139
  let body;
140
140
  body = JSON.stringify({
@@ -156,7 +156,7 @@ const serializeAws_restJson1AssociatePhoneNumberContactFlowCommand = async (inpu
156
156
  const headers = {
157
157
  "content-type": "application/json",
158
158
  };
159
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
159
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
160
160
  "/phone-number/{PhoneNumberId}/contact-flow";
161
161
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PhoneNumberId", () => input.PhoneNumberId, "{PhoneNumberId}", false);
162
162
  let body;
@@ -180,7 +180,7 @@ const serializeAws_restJson1AssociateQueueQuickConnectsCommand = async (input, c
180
180
  const headers = {
181
181
  "content-type": "application/json",
182
182
  };
183
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
183
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
184
184
  "/queues/{InstanceId}/{QueueId}/associate-quick-connects";
185
185
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
186
186
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "QueueId", () => input.QueueId, "{QueueId}", false);
@@ -206,7 +206,7 @@ const serializeAws_restJson1AssociateRoutingProfileQueuesCommand = async (input,
206
206
  const headers = {
207
207
  "content-type": "application/json",
208
208
  };
209
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
209
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
210
210
  "/routing-profiles/{InstanceId}/{RoutingProfileId}/associate-queues";
211
211
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
212
212
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "RoutingProfileId", () => input.RoutingProfileId, "{RoutingProfileId}", false);
@@ -232,7 +232,7 @@ const serializeAws_restJson1AssociateSecurityKeyCommand = async (input, context)
232
232
  const headers = {
233
233
  "content-type": "application/json",
234
234
  };
235
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/security-key";
235
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/security-key";
236
236
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
237
237
  let body;
238
238
  body = JSON.stringify({
@@ -250,15 +250,14 @@ const serializeAws_restJson1AssociateSecurityKeyCommand = async (input, context)
250
250
  };
251
251
  exports.serializeAws_restJson1AssociateSecurityKeyCommand = serializeAws_restJson1AssociateSecurityKeyCommand;
252
252
  const serializeAws_restJson1ClaimPhoneNumberCommand = async (input, context) => {
253
- var _a;
254
253
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
255
254
  const headers = {
256
255
  "content-type": "application/json",
257
256
  };
258
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number/claim";
257
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number/claim";
259
258
  let body;
260
259
  body = JSON.stringify({
261
- ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
260
+ ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
262
261
  ...(input.PhoneNumber != null && { PhoneNumber: input.PhoneNumber }),
263
262
  ...(input.PhoneNumberDescription != null && { PhoneNumberDescription: input.PhoneNumberDescription }),
264
263
  ...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
@@ -280,7 +279,7 @@ const serializeAws_restJson1CreateAgentStatusCommand = async (input, context) =>
280
279
  const headers = {
281
280
  "content-type": "application/json",
282
281
  };
283
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/agent-status/{InstanceId}";
282
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/agent-status/{InstanceId}";
284
283
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
285
284
  let body;
286
285
  body = JSON.stringify({
@@ -306,7 +305,7 @@ const serializeAws_restJson1CreateContactFlowCommand = async (input, context) =>
306
305
  const headers = {
307
306
  "content-type": "application/json",
308
307
  };
309
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/contact-flows/{InstanceId}";
308
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact-flows/{InstanceId}";
310
309
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
311
310
  let body;
312
311
  body = JSON.stringify({
@@ -328,16 +327,15 @@ const serializeAws_restJson1CreateContactFlowCommand = async (input, context) =>
328
327
  };
329
328
  exports.serializeAws_restJson1CreateContactFlowCommand = serializeAws_restJson1CreateContactFlowCommand;
330
329
  const serializeAws_restJson1CreateContactFlowModuleCommand = async (input, context) => {
331
- var _a;
332
330
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
333
331
  const headers = {
334
332
  "content-type": "application/json",
335
333
  };
336
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/contact-flow-modules/{InstanceId}";
334
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact-flow-modules/{InstanceId}";
337
335
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
338
336
  let body;
339
337
  body = JSON.stringify({
340
- ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
338
+ ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
341
339
  ...(input.Content != null && { Content: input.Content }),
342
340
  ...(input.Description != null && { Description: input.Description }),
343
341
  ...(input.Name != null && { Name: input.Name }),
@@ -359,7 +357,7 @@ const serializeAws_restJson1CreateHoursOfOperationCommand = async (input, contex
359
357
  const headers = {
360
358
  "content-type": "application/json",
361
359
  };
362
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/hours-of-operations/{InstanceId}";
360
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/hours-of-operations/{InstanceId}";
363
361
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
364
362
  let body;
365
363
  body = JSON.stringify({
@@ -385,7 +383,7 @@ const serializeAws_restJson1CreateInstanceCommand = async (input, context) => {
385
383
  const headers = {
386
384
  "content-type": "application/json",
387
385
  };
388
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/instance";
386
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance";
389
387
  let body;
390
388
  body = JSON.stringify({
391
389
  ...(input.ClientToken != null && { ClientToken: input.ClientToken }),
@@ -411,7 +409,7 @@ const serializeAws_restJson1CreateIntegrationAssociationCommand = async (input,
411
409
  const headers = {
412
410
  "content-type": "application/json",
413
411
  };
414
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
412
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
415
413
  "/instance/{InstanceId}/integration-associations";
416
414
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
417
415
  let body;
@@ -439,7 +437,7 @@ const serializeAws_restJson1CreateQueueCommand = async (input, context) => {
439
437
  const headers = {
440
438
  "content-type": "application/json",
441
439
  };
442
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/queues/{InstanceId}";
440
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/queues/{InstanceId}";
443
441
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
444
442
  let body;
445
443
  body = JSON.stringify({
@@ -471,7 +469,7 @@ const serializeAws_restJson1CreateQuickConnectCommand = 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 || ""}` + "/quick-connects/{InstanceId}";
472
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/quick-connects/{InstanceId}";
475
473
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
476
474
  let body;
477
475
  body = JSON.stringify({
@@ -498,7 +496,7 @@ const serializeAws_restJson1CreateRoutingProfileCommand = async (input, context)
498
496
  const headers = {
499
497
  "content-type": "application/json",
500
498
  };
501
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/routing-profiles/{InstanceId}";
499
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/routing-profiles/{InstanceId}";
502
500
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
503
501
  let body;
504
502
  body = JSON.stringify({
@@ -529,7 +527,7 @@ const serializeAws_restJson1CreateSecurityProfileCommand = async (input, context
529
527
  const headers = {
530
528
  "content-type": "application/json",
531
529
  };
532
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/security-profiles/{InstanceId}";
530
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/security-profiles/{InstanceId}";
533
531
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
534
532
  let body;
535
533
  body = JSON.stringify({
@@ -552,16 +550,15 @@ const serializeAws_restJson1CreateSecurityProfileCommand = async (input, context
552
550
  };
553
551
  exports.serializeAws_restJson1CreateSecurityProfileCommand = serializeAws_restJson1CreateSecurityProfileCommand;
554
552
  const serializeAws_restJson1CreateTaskTemplateCommand = async (input, context) => {
555
- var _a;
556
553
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
557
554
  const headers = {
558
555
  "content-type": "application/json",
559
556
  };
560
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/task/template";
557
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/task/template";
561
558
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
562
559
  let body;
563
560
  body = JSON.stringify({
564
- ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
561
+ ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
565
562
  ...(input.Constraints != null && {
566
563
  Constraints: serializeAws_restJson1TaskTemplateConstraints(input.Constraints, context),
567
564
  }),
@@ -584,15 +581,14 @@ const serializeAws_restJson1CreateTaskTemplateCommand = async (input, context) =
584
581
  };
585
582
  exports.serializeAws_restJson1CreateTaskTemplateCommand = serializeAws_restJson1CreateTaskTemplateCommand;
586
583
  const serializeAws_restJson1CreateTrafficDistributionGroupCommand = async (input, context) => {
587
- var _a;
588
584
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
589
585
  const headers = {
590
586
  "content-type": "application/json",
591
587
  };
592
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/traffic-distribution-group";
588
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/traffic-distribution-group";
593
589
  let body;
594
590
  body = JSON.stringify({
595
- ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
591
+ ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
596
592
  ...(input.Description != null && { Description: input.Description }),
597
593
  ...(input.InstanceId != null && { InstanceId: input.InstanceId }),
598
594
  ...(input.Name != null && { Name: input.Name }),
@@ -614,7 +610,7 @@ const serializeAws_restJson1CreateUseCaseCommand = async (input, context) => {
614
610
  const headers = {
615
611
  "content-type": "application/json",
616
612
  };
617
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
613
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
618
614
  "/instance/{InstanceId}/integration-associations/{IntegrationAssociationId}/use-cases";
619
615
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
620
616
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IntegrationAssociationId", () => input.IntegrationAssociationId, "{IntegrationAssociationId}", false);
@@ -639,7 +635,7 @@ const serializeAws_restJson1CreateUserCommand = async (input, context) => {
639
635
  const headers = {
640
636
  "content-type": "application/json",
641
637
  };
642
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/users/{InstanceId}";
638
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/users/{InstanceId}";
643
639
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
644
640
  let body;
645
641
  body = JSON.stringify({
@@ -675,7 +671,7 @@ const serializeAws_restJson1CreateUserHierarchyGroupCommand = async (input, cont
675
671
  const headers = {
676
672
  "content-type": "application/json",
677
673
  };
678
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/user-hierarchy-groups/{InstanceId}";
674
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/user-hierarchy-groups/{InstanceId}";
679
675
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
680
676
  let body;
681
677
  body = JSON.stringify({
@@ -695,16 +691,15 @@ const serializeAws_restJson1CreateUserHierarchyGroupCommand = async (input, cont
695
691
  };
696
692
  exports.serializeAws_restJson1CreateUserHierarchyGroupCommand = serializeAws_restJson1CreateUserHierarchyGroupCommand;
697
693
  const serializeAws_restJson1CreateVocabularyCommand = async (input, context) => {
698
- var _a;
699
694
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
700
695
  const headers = {
701
696
  "content-type": "application/json",
702
697
  };
703
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/vocabulary/{InstanceId}";
698
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/vocabulary/{InstanceId}";
704
699
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
705
700
  let body;
706
701
  body = JSON.stringify({
707
- ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
702
+ ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
708
703
  ...(input.Content != null && { Content: input.Content }),
709
704
  ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }),
710
705
  ...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
@@ -724,7 +719,7 @@ exports.serializeAws_restJson1CreateVocabularyCommand = serializeAws_restJson1Cr
724
719
  const serializeAws_restJson1DeleteContactFlowCommand = async (input, context) => {
725
720
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
726
721
  const headers = {};
727
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
722
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
728
723
  "/contact-flows/{InstanceId}/{ContactFlowId}";
729
724
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
730
725
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ContactFlowId", () => input.ContactFlowId, "{ContactFlowId}", false);
@@ -743,7 +738,7 @@ exports.serializeAws_restJson1DeleteContactFlowCommand = serializeAws_restJson1D
743
738
  const serializeAws_restJson1DeleteContactFlowModuleCommand = async (input, context) => {
744
739
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
745
740
  const headers = {};
746
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
741
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
747
742
  "/contact-flow-modules/{InstanceId}/{ContactFlowModuleId}";
748
743
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
749
744
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ContactFlowModuleId", () => input.ContactFlowModuleId, "{ContactFlowModuleId}", false);
@@ -762,7 +757,7 @@ exports.serializeAws_restJson1DeleteContactFlowModuleCommand = serializeAws_rest
762
757
  const serializeAws_restJson1DeleteHoursOfOperationCommand = async (input, context) => {
763
758
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
764
759
  const headers = {};
765
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
760
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
766
761
  "/hours-of-operations/{InstanceId}/{HoursOfOperationId}";
767
762
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
768
763
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "HoursOfOperationId", () => input.HoursOfOperationId, "{HoursOfOperationId}", false);
@@ -781,7 +776,7 @@ exports.serializeAws_restJson1DeleteHoursOfOperationCommand = serializeAws_restJ
781
776
  const serializeAws_restJson1DeleteInstanceCommand = async (input, context) => {
782
777
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
783
778
  const headers = {};
784
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}";
779
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}";
785
780
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
786
781
  let body;
787
782
  return new protocol_http_1.HttpRequest({
@@ -798,7 +793,7 @@ exports.serializeAws_restJson1DeleteInstanceCommand = serializeAws_restJson1Dele
798
793
  const serializeAws_restJson1DeleteIntegrationAssociationCommand = async (input, context) => {
799
794
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
800
795
  const headers = {};
801
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
796
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
802
797
  "/instance/{InstanceId}/integration-associations/{IntegrationAssociationId}";
803
798
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
804
799
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IntegrationAssociationId", () => input.IntegrationAssociationId, "{IntegrationAssociationId}", false);
@@ -817,7 +812,7 @@ exports.serializeAws_restJson1DeleteIntegrationAssociationCommand = serializeAws
817
812
  const serializeAws_restJson1DeleteQuickConnectCommand = async (input, context) => {
818
813
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
819
814
  const headers = {};
820
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
815
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
821
816
  "/quick-connects/{InstanceId}/{QuickConnectId}";
822
817
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
823
818
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "QuickConnectId", () => input.QuickConnectId, "{QuickConnectId}", false);
@@ -836,7 +831,7 @@ exports.serializeAws_restJson1DeleteQuickConnectCommand = serializeAws_restJson1
836
831
  const serializeAws_restJson1DeleteSecurityProfileCommand = async (input, context) => {
837
832
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
838
833
  const headers = {};
839
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
834
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
840
835
  "/security-profiles/{InstanceId}/{SecurityProfileId}";
841
836
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
842
837
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "SecurityProfileId", () => input.SecurityProfileId, "{SecurityProfileId}", false);
@@ -855,7 +850,7 @@ exports.serializeAws_restJson1DeleteSecurityProfileCommand = serializeAws_restJs
855
850
  const serializeAws_restJson1DeleteTaskTemplateCommand = async (input, context) => {
856
851
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
857
852
  const headers = {};
858
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
853
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
859
854
  "/instance/{InstanceId}/task/template/{TaskTemplateId}";
860
855
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
861
856
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "TaskTemplateId", () => input.TaskTemplateId, "{TaskTemplateId}", false);
@@ -874,7 +869,7 @@ exports.serializeAws_restJson1DeleteTaskTemplateCommand = serializeAws_restJson1
874
869
  const serializeAws_restJson1DeleteTrafficDistributionGroupCommand = async (input, context) => {
875
870
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
876
871
  const headers = {};
877
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
872
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
878
873
  "/traffic-distribution-group/{TrafficDistributionGroupId}";
879
874
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "TrafficDistributionGroupId", () => input.TrafficDistributionGroupId, "{TrafficDistributionGroupId}", false);
880
875
  let body;
@@ -892,7 +887,7 @@ exports.serializeAws_restJson1DeleteTrafficDistributionGroupCommand = serializeA
892
887
  const serializeAws_restJson1DeleteUseCaseCommand = async (input, context) => {
893
888
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
894
889
  const headers = {};
895
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
890
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
896
891
  "/instance/{InstanceId}/integration-associations/{IntegrationAssociationId}/use-cases/{UseCaseId}";
897
892
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
898
893
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IntegrationAssociationId", () => input.IntegrationAssociationId, "{IntegrationAssociationId}", false);
@@ -912,7 +907,7 @@ exports.serializeAws_restJson1DeleteUseCaseCommand = serializeAws_restJson1Delet
912
907
  const serializeAws_restJson1DeleteUserCommand = async (input, context) => {
913
908
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
914
909
  const headers = {};
915
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/users/{InstanceId}/{UserId}";
910
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/users/{InstanceId}/{UserId}";
916
911
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
917
912
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "UserId", () => input.UserId, "{UserId}", false);
918
913
  let body;
@@ -930,7 +925,7 @@ exports.serializeAws_restJson1DeleteUserCommand = serializeAws_restJson1DeleteUs
930
925
  const serializeAws_restJson1DeleteUserHierarchyGroupCommand = async (input, context) => {
931
926
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
932
927
  const headers = {};
933
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
928
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
934
929
  "/user-hierarchy-groups/{InstanceId}/{HierarchyGroupId}";
935
930
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "HierarchyGroupId", () => input.HierarchyGroupId, "{HierarchyGroupId}", false);
936
931
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
@@ -949,7 +944,7 @@ exports.serializeAws_restJson1DeleteUserHierarchyGroupCommand = serializeAws_res
949
944
  const serializeAws_restJson1DeleteVocabularyCommand = async (input, context) => {
950
945
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
951
946
  const headers = {};
952
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
947
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
953
948
  "/vocabulary-remove/{InstanceId}/{VocabularyId}";
954
949
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
955
950
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VocabularyId", () => input.VocabularyId, "{VocabularyId}", false);
@@ -968,7 +963,7 @@ exports.serializeAws_restJson1DeleteVocabularyCommand = serializeAws_restJson1De
968
963
  const serializeAws_restJson1DescribeAgentStatusCommand = async (input, context) => {
969
964
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
970
965
  const headers = {};
971
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
966
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
972
967
  "/agent-status/{InstanceId}/{AgentStatusId}";
973
968
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
974
969
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AgentStatusId", () => input.AgentStatusId, "{AgentStatusId}", false);
@@ -987,7 +982,7 @@ exports.serializeAws_restJson1DescribeAgentStatusCommand = serializeAws_restJson
987
982
  const serializeAws_restJson1DescribeContactCommand = async (input, context) => {
988
983
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
989
984
  const headers = {};
990
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/contacts/{InstanceId}/{ContactId}";
985
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contacts/{InstanceId}/{ContactId}";
991
986
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
992
987
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ContactId", () => input.ContactId, "{ContactId}", false);
993
988
  let body;
@@ -1005,7 +1000,7 @@ exports.serializeAws_restJson1DescribeContactCommand = serializeAws_restJson1Des
1005
1000
  const serializeAws_restJson1DescribeContactFlowCommand = async (input, context) => {
1006
1001
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1007
1002
  const headers = {};
1008
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1003
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1009
1004
  "/contact-flows/{InstanceId}/{ContactFlowId}";
1010
1005
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1011
1006
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ContactFlowId", () => input.ContactFlowId, "{ContactFlowId}", false);
@@ -1024,7 +1019,7 @@ exports.serializeAws_restJson1DescribeContactFlowCommand = serializeAws_restJson
1024
1019
  const serializeAws_restJson1DescribeContactFlowModuleCommand = async (input, context) => {
1025
1020
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1026
1021
  const headers = {};
1027
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1022
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1028
1023
  "/contact-flow-modules/{InstanceId}/{ContactFlowModuleId}";
1029
1024
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1030
1025
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ContactFlowModuleId", () => input.ContactFlowModuleId, "{ContactFlowModuleId}", false);
@@ -1043,7 +1038,7 @@ exports.serializeAws_restJson1DescribeContactFlowModuleCommand = serializeAws_re
1043
1038
  const serializeAws_restJson1DescribeHoursOfOperationCommand = async (input, context) => {
1044
1039
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1045
1040
  const headers = {};
1046
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1041
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1047
1042
  "/hours-of-operations/{InstanceId}/{HoursOfOperationId}";
1048
1043
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1049
1044
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "HoursOfOperationId", () => input.HoursOfOperationId, "{HoursOfOperationId}", false);
@@ -1062,7 +1057,7 @@ exports.serializeAws_restJson1DescribeHoursOfOperationCommand = serializeAws_res
1062
1057
  const serializeAws_restJson1DescribeInstanceCommand = async (input, context) => {
1063
1058
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1064
1059
  const headers = {};
1065
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}";
1060
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}";
1066
1061
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1067
1062
  let body;
1068
1063
  return new protocol_http_1.HttpRequest({
@@ -1079,7 +1074,7 @@ exports.serializeAws_restJson1DescribeInstanceCommand = serializeAws_restJson1De
1079
1074
  const serializeAws_restJson1DescribeInstanceAttributeCommand = async (input, context) => {
1080
1075
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1081
1076
  const headers = {};
1082
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1077
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1083
1078
  "/instance/{InstanceId}/attribute/{AttributeType}";
1084
1079
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1085
1080
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AttributeType", () => input.AttributeType, "{AttributeType}", false);
@@ -1098,7 +1093,7 @@ exports.serializeAws_restJson1DescribeInstanceAttributeCommand = serializeAws_re
1098
1093
  const serializeAws_restJson1DescribeInstanceStorageConfigCommand = async (input, context) => {
1099
1094
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1100
1095
  const headers = {};
1101
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1096
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1102
1097
  "/instance/{InstanceId}/storage-config/{AssociationId}";
1103
1098
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1104
1099
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AssociationId", () => input.AssociationId, "{AssociationId}", false);
@@ -1121,7 +1116,7 @@ exports.serializeAws_restJson1DescribeInstanceStorageConfigCommand = serializeAw
1121
1116
  const serializeAws_restJson1DescribePhoneNumberCommand = async (input, context) => {
1122
1117
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1123
1118
  const headers = {};
1124
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number/{PhoneNumberId}";
1119
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number/{PhoneNumberId}";
1125
1120
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PhoneNumberId", () => input.PhoneNumberId, "{PhoneNumberId}", false);
1126
1121
  let body;
1127
1122
  return new protocol_http_1.HttpRequest({
@@ -1138,7 +1133,7 @@ exports.serializeAws_restJson1DescribePhoneNumberCommand = serializeAws_restJson
1138
1133
  const serializeAws_restJson1DescribeQueueCommand = async (input, context) => {
1139
1134
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1140
1135
  const headers = {};
1141
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/queues/{InstanceId}/{QueueId}";
1136
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/queues/{InstanceId}/{QueueId}";
1142
1137
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1143
1138
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "QueueId", () => input.QueueId, "{QueueId}", false);
1144
1139
  let body;
@@ -1156,7 +1151,7 @@ exports.serializeAws_restJson1DescribeQueueCommand = serializeAws_restJson1Descr
1156
1151
  const serializeAws_restJson1DescribeQuickConnectCommand = async (input, context) => {
1157
1152
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1158
1153
  const headers = {};
1159
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1154
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1160
1155
  "/quick-connects/{InstanceId}/{QuickConnectId}";
1161
1156
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1162
1157
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "QuickConnectId", () => input.QuickConnectId, "{QuickConnectId}", false);
@@ -1175,7 +1170,7 @@ exports.serializeAws_restJson1DescribeQuickConnectCommand = serializeAws_restJso
1175
1170
  const serializeAws_restJson1DescribeRoutingProfileCommand = async (input, context) => {
1176
1171
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1177
1172
  const headers = {};
1178
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1173
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1179
1174
  "/routing-profiles/{InstanceId}/{RoutingProfileId}";
1180
1175
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1181
1176
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "RoutingProfileId", () => input.RoutingProfileId, "{RoutingProfileId}", false);
@@ -1194,7 +1189,7 @@ exports.serializeAws_restJson1DescribeRoutingProfileCommand = serializeAws_restJ
1194
1189
  const serializeAws_restJson1DescribeSecurityProfileCommand = async (input, context) => {
1195
1190
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1196
1191
  const headers = {};
1197
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1192
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1198
1193
  "/security-profiles/{InstanceId}/{SecurityProfileId}";
1199
1194
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "SecurityProfileId", () => input.SecurityProfileId, "{SecurityProfileId}", false);
1200
1195
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
@@ -1213,7 +1208,7 @@ exports.serializeAws_restJson1DescribeSecurityProfileCommand = serializeAws_rest
1213
1208
  const serializeAws_restJson1DescribeTrafficDistributionGroupCommand = async (input, context) => {
1214
1209
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1215
1210
  const headers = {};
1216
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1211
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1217
1212
  "/traffic-distribution-group/{TrafficDistributionGroupId}";
1218
1213
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "TrafficDistributionGroupId", () => input.TrafficDistributionGroupId, "{TrafficDistributionGroupId}", false);
1219
1214
  let body;
@@ -1231,7 +1226,7 @@ exports.serializeAws_restJson1DescribeTrafficDistributionGroupCommand = serializ
1231
1226
  const serializeAws_restJson1DescribeUserCommand = async (input, context) => {
1232
1227
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1233
1228
  const headers = {};
1234
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/users/{InstanceId}/{UserId}";
1229
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/users/{InstanceId}/{UserId}";
1235
1230
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "UserId", () => input.UserId, "{UserId}", false);
1236
1231
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1237
1232
  let body;
@@ -1249,7 +1244,7 @@ exports.serializeAws_restJson1DescribeUserCommand = serializeAws_restJson1Descri
1249
1244
  const serializeAws_restJson1DescribeUserHierarchyGroupCommand = async (input, context) => {
1250
1245
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1251
1246
  const headers = {};
1252
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1247
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1253
1248
  "/user-hierarchy-groups/{InstanceId}/{HierarchyGroupId}";
1254
1249
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "HierarchyGroupId", () => input.HierarchyGroupId, "{HierarchyGroupId}", false);
1255
1250
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
@@ -1268,7 +1263,7 @@ exports.serializeAws_restJson1DescribeUserHierarchyGroupCommand = serializeAws_r
1268
1263
  const serializeAws_restJson1DescribeUserHierarchyStructureCommand = async (input, context) => {
1269
1264
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1270
1265
  const headers = {};
1271
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/user-hierarchy-structure/{InstanceId}";
1266
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/user-hierarchy-structure/{InstanceId}";
1272
1267
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1273
1268
  let body;
1274
1269
  return new protocol_http_1.HttpRequest({
@@ -1285,7 +1280,7 @@ exports.serializeAws_restJson1DescribeUserHierarchyStructureCommand = serializeA
1285
1280
  const serializeAws_restJson1DescribeVocabularyCommand = async (input, context) => {
1286
1281
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1287
1282
  const headers = {};
1288
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/vocabulary/{InstanceId}/{VocabularyId}";
1283
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/vocabulary/{InstanceId}/{VocabularyId}";
1289
1284
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1290
1285
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VocabularyId", () => input.VocabularyId, "{VocabularyId}", false);
1291
1286
  let body;
@@ -1303,7 +1298,7 @@ exports.serializeAws_restJson1DescribeVocabularyCommand = serializeAws_restJson1
1303
1298
  const serializeAws_restJson1DisassociateApprovedOriginCommand = async (input, context) => {
1304
1299
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1305
1300
  const headers = {};
1306
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/approved-origin";
1301
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/approved-origin";
1307
1302
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1308
1303
  const query = map({
1309
1304
  origin: [, input.Origin],
@@ -1326,7 +1321,7 @@ const serializeAws_restJson1DisassociateBotCommand = async (input, context) => {
1326
1321
  const headers = {
1327
1322
  "content-type": "application/json",
1328
1323
  };
1329
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/bot";
1324
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/bot";
1330
1325
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1331
1326
  let body;
1332
1327
  body = JSON.stringify({
@@ -1347,7 +1342,7 @@ exports.serializeAws_restJson1DisassociateBotCommand = serializeAws_restJson1Dis
1347
1342
  const serializeAws_restJson1DisassociateInstanceStorageConfigCommand = async (input, context) => {
1348
1343
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1349
1344
  const headers = {};
1350
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1345
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1351
1346
  "/instance/{InstanceId}/storage-config/{AssociationId}";
1352
1347
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1353
1348
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AssociationId", () => input.AssociationId, "{AssociationId}", false);
@@ -1370,7 +1365,7 @@ exports.serializeAws_restJson1DisassociateInstanceStorageConfigCommand = seriali
1370
1365
  const serializeAws_restJson1DisassociateLambdaFunctionCommand = async (input, context) => {
1371
1366
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1372
1367
  const headers = {};
1373
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/lambda-function";
1368
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/lambda-function";
1374
1369
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1375
1370
  const query = map({
1376
1371
  functionArn: [, input.FunctionArn],
@@ -1391,7 +1386,7 @@ exports.serializeAws_restJson1DisassociateLambdaFunctionCommand = serializeAws_r
1391
1386
  const serializeAws_restJson1DisassociateLexBotCommand = async (input, context) => {
1392
1387
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1393
1388
  const headers = {};
1394
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/lex-bot";
1389
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/lex-bot";
1395
1390
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1396
1391
  const query = map({
1397
1392
  botName: [, input.BotName],
@@ -1413,7 +1408,7 @@ exports.serializeAws_restJson1DisassociateLexBotCommand = serializeAws_restJson1
1413
1408
  const serializeAws_restJson1DisassociatePhoneNumberContactFlowCommand = async (input, context) => {
1414
1409
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1415
1410
  const headers = {};
1416
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1411
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1417
1412
  "/phone-number/{PhoneNumberId}/contact-flow";
1418
1413
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PhoneNumberId", () => input.PhoneNumberId, "{PhoneNumberId}", false);
1419
1414
  const query = map({
@@ -1437,7 +1432,7 @@ const serializeAws_restJson1DisassociateQueueQuickConnectsCommand = async (input
1437
1432
  const headers = {
1438
1433
  "content-type": "application/json",
1439
1434
  };
1440
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1435
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1441
1436
  "/queues/{InstanceId}/{QueueId}/disassociate-quick-connects";
1442
1437
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1443
1438
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "QueueId", () => input.QueueId, "{QueueId}", false);
@@ -1463,7 +1458,7 @@ const serializeAws_restJson1DisassociateRoutingProfileQueuesCommand = async (inp
1463
1458
  const headers = {
1464
1459
  "content-type": "application/json",
1465
1460
  };
1466
- 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 || ""}` +
1467
1462
  "/routing-profiles/{InstanceId}/{RoutingProfileId}/disassociate-queues";
1468
1463
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1469
1464
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "RoutingProfileId", () => input.RoutingProfileId, "{RoutingProfileId}", false);
@@ -1487,7 +1482,7 @@ exports.serializeAws_restJson1DisassociateRoutingProfileQueuesCommand = serializ
1487
1482
  const serializeAws_restJson1DisassociateSecurityKeyCommand = async (input, context) => {
1488
1483
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1489
1484
  const headers = {};
1490
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1485
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1491
1486
  "/instance/{InstanceId}/security-key/{AssociationId}";
1492
1487
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1493
1488
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AssociationId", () => input.AssociationId, "{AssociationId}", false);
@@ -1508,7 +1503,7 @@ const serializeAws_restJson1DismissUserContactCommand = async (input, context) =
1508
1503
  const headers = {
1509
1504
  "content-type": "application/json",
1510
1505
  };
1511
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/users/{InstanceId}/{UserId}/contact";
1506
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/users/{InstanceId}/{UserId}/contact";
1512
1507
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "UserId", () => input.UserId, "{UserId}", false);
1513
1508
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1514
1509
  let body;
@@ -1529,7 +1524,7 @@ exports.serializeAws_restJson1DismissUserContactCommand = serializeAws_restJson1
1529
1524
  const serializeAws_restJson1GetContactAttributesCommand = async (input, context) => {
1530
1525
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1531
1526
  const headers = {};
1532
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1527
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1533
1528
  "/contact/attributes/{InstanceId}/{InitialContactId}";
1534
1529
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1535
1530
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InitialContactId", () => input.InitialContactId, "{InitialContactId}", false);
@@ -1550,7 +1545,7 @@ const serializeAws_restJson1GetCurrentMetricDataCommand = async (input, context)
1550
1545
  const headers = {
1551
1546
  "content-type": "application/json",
1552
1547
  };
1553
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/metrics/current/{InstanceId}";
1548
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/metrics/current/{InstanceId}";
1554
1549
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1555
1550
  let body;
1556
1551
  body = JSON.stringify({
@@ -1578,7 +1573,7 @@ const serializeAws_restJson1GetCurrentUserDataCommand = async (input, context) =
1578
1573
  const headers = {
1579
1574
  "content-type": "application/json",
1580
1575
  };
1581
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/metrics/userdata/{InstanceId}";
1576
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/metrics/userdata/{InstanceId}";
1582
1577
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1583
1578
  let body;
1584
1579
  body = JSON.stringify({
@@ -1600,7 +1595,7 @@ exports.serializeAws_restJson1GetCurrentUserDataCommand = serializeAws_restJson1
1600
1595
  const serializeAws_restJson1GetFederationTokenCommand = async (input, context) => {
1601
1596
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1602
1597
  const headers = {};
1603
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/user/federate/{InstanceId}";
1598
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/user/federate/{InstanceId}";
1604
1599
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1605
1600
  let body;
1606
1601
  return new protocol_http_1.HttpRequest({
@@ -1619,7 +1614,7 @@ const serializeAws_restJson1GetMetricDataCommand = async (input, context) => {
1619
1614
  const headers = {
1620
1615
  "content-type": "application/json",
1621
1616
  };
1622
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/metrics/historical/{InstanceId}";
1617
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/metrics/historical/{InstanceId}";
1623
1618
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1624
1619
  let body;
1625
1620
  body = JSON.stringify({
@@ -1647,7 +1642,7 @@ exports.serializeAws_restJson1GetMetricDataCommand = serializeAws_restJson1GetMe
1647
1642
  const serializeAws_restJson1GetTaskTemplateCommand = async (input, context) => {
1648
1643
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1649
1644
  const headers = {};
1650
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1645
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1651
1646
  "/instance/{InstanceId}/task/template/{TaskTemplateId}";
1652
1647
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1653
1648
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "TaskTemplateId", () => input.TaskTemplateId, "{TaskTemplateId}", false);
@@ -1670,7 +1665,7 @@ exports.serializeAws_restJson1GetTaskTemplateCommand = serializeAws_restJson1Get
1670
1665
  const serializeAws_restJson1GetTrafficDistributionCommand = async (input, context) => {
1671
1666
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1672
1667
  const headers = {};
1673
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/traffic-distribution/{Id}";
1668
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/traffic-distribution/{Id}";
1674
1669
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
1675
1670
  let body;
1676
1671
  return new protocol_http_1.HttpRequest({
@@ -1687,7 +1682,7 @@ exports.serializeAws_restJson1GetTrafficDistributionCommand = serializeAws_restJ
1687
1682
  const serializeAws_restJson1ListAgentStatusesCommand = async (input, context) => {
1688
1683
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1689
1684
  const headers = {};
1690
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/agent-status/{InstanceId}";
1685
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/agent-status/{InstanceId}";
1691
1686
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1692
1687
  const query = map({
1693
1688
  nextToken: [, input.NextToken],
@@ -1713,7 +1708,7 @@ exports.serializeAws_restJson1ListAgentStatusesCommand = serializeAws_restJson1L
1713
1708
  const serializeAws_restJson1ListApprovedOriginsCommand = async (input, context) => {
1714
1709
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1715
1710
  const headers = {};
1716
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/approved-origins";
1711
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/approved-origins";
1717
1712
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1718
1713
  const query = map({
1719
1714
  nextToken: [, input.NextToken],
@@ -1735,7 +1730,7 @@ exports.serializeAws_restJson1ListApprovedOriginsCommand = serializeAws_restJson
1735
1730
  const serializeAws_restJson1ListBotsCommand = async (input, context) => {
1736
1731
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1737
1732
  const headers = {};
1738
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/bots";
1733
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/bots";
1739
1734
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1740
1735
  const query = map({
1741
1736
  nextToken: [, input.NextToken],
@@ -1758,7 +1753,7 @@ exports.serializeAws_restJson1ListBotsCommand = serializeAws_restJson1ListBotsCo
1758
1753
  const serializeAws_restJson1ListContactFlowModulesCommand = async (input, context) => {
1759
1754
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1760
1755
  const headers = {};
1761
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1756
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1762
1757
  "/contact-flow-modules-summary/{InstanceId}";
1763
1758
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1764
1759
  const query = map({
@@ -1782,7 +1777,7 @@ exports.serializeAws_restJson1ListContactFlowModulesCommand = serializeAws_restJ
1782
1777
  const serializeAws_restJson1ListContactFlowsCommand = async (input, context) => {
1783
1778
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1784
1779
  const headers = {};
1785
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/contact-flows-summary/{InstanceId}";
1780
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact-flows-summary/{InstanceId}";
1786
1781
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1787
1782
  const query = map({
1788
1783
  contactFlowTypes: [
@@ -1808,7 +1803,7 @@ exports.serializeAws_restJson1ListContactFlowsCommand = serializeAws_restJson1Li
1808
1803
  const serializeAws_restJson1ListContactReferencesCommand = async (input, context) => {
1809
1804
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1810
1805
  const headers = {};
1811
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1806
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1812
1807
  "/contact/references/{InstanceId}/{ContactId}";
1813
1808
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1814
1809
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ContactId", () => input.ContactId, "{ContactId}", false);
@@ -1837,7 +1832,7 @@ const serializeAws_restJson1ListDefaultVocabulariesCommand = async (input, conte
1837
1832
  const headers = {
1838
1833
  "content-type": "application/json",
1839
1834
  };
1840
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/default-vocabulary-summary/{InstanceId}";
1835
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/default-vocabulary-summary/{InstanceId}";
1841
1836
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1842
1837
  let body;
1843
1838
  body = JSON.stringify({
@@ -1859,7 +1854,7 @@ exports.serializeAws_restJson1ListDefaultVocabulariesCommand = serializeAws_rest
1859
1854
  const serializeAws_restJson1ListHoursOfOperationsCommand = async (input, context) => {
1860
1855
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1861
1856
  const headers = {};
1862
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/hours-of-operations-summary/{InstanceId}";
1857
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/hours-of-operations-summary/{InstanceId}";
1863
1858
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1864
1859
  const query = map({
1865
1860
  nextToken: [, input.NextToken],
@@ -1881,7 +1876,7 @@ exports.serializeAws_restJson1ListHoursOfOperationsCommand = serializeAws_restJs
1881
1876
  const serializeAws_restJson1ListInstanceAttributesCommand = async (input, context) => {
1882
1877
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1883
1878
  const headers = {};
1884
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/attributes";
1879
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/attributes";
1885
1880
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1886
1881
  const query = map({
1887
1882
  nextToken: [, input.NextToken],
@@ -1903,7 +1898,7 @@ exports.serializeAws_restJson1ListInstanceAttributesCommand = serializeAws_restJ
1903
1898
  const serializeAws_restJson1ListInstancesCommand = async (input, context) => {
1904
1899
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1905
1900
  const headers = {};
1906
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/instance";
1901
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance";
1907
1902
  const query = map({
1908
1903
  nextToken: [, input.NextToken],
1909
1904
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -1924,7 +1919,7 @@ exports.serializeAws_restJson1ListInstancesCommand = serializeAws_restJson1ListI
1924
1919
  const serializeAws_restJson1ListInstanceStorageConfigsCommand = async (input, context) => {
1925
1920
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1926
1921
  const headers = {};
1927
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/storage-configs";
1922
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/storage-configs";
1928
1923
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1929
1924
  const query = map({
1930
1925
  resourceType: [, input.ResourceType],
@@ -1947,7 +1942,7 @@ exports.serializeAws_restJson1ListInstanceStorageConfigsCommand = serializeAws_r
1947
1942
  const serializeAws_restJson1ListIntegrationAssociationsCommand = async (input, context) => {
1948
1943
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1949
1944
  const headers = {};
1950
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1945
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1951
1946
  "/instance/{InstanceId}/integration-associations";
1952
1947
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1953
1948
  const query = map({
@@ -1971,7 +1966,7 @@ exports.serializeAws_restJson1ListIntegrationAssociationsCommand = serializeAws_
1971
1966
  const serializeAws_restJson1ListLambdaFunctionsCommand = async (input, context) => {
1972
1967
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1973
1968
  const headers = {};
1974
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/lambda-functions";
1969
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/lambda-functions";
1975
1970
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1976
1971
  const query = map({
1977
1972
  nextToken: [, input.NextToken],
@@ -1993,7 +1988,7 @@ exports.serializeAws_restJson1ListLambdaFunctionsCommand = serializeAws_restJson
1993
1988
  const serializeAws_restJson1ListLexBotsCommand = async (input, context) => {
1994
1989
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1995
1990
  const headers = {};
1996
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/lex-bots";
1991
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/lex-bots";
1997
1992
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1998
1993
  const query = map({
1999
1994
  nextToken: [, input.NextToken],
@@ -2015,7 +2010,7 @@ exports.serializeAws_restJson1ListLexBotsCommand = serializeAws_restJson1ListLex
2015
2010
  const serializeAws_restJson1ListPhoneNumbersCommand = async (input, context) => {
2016
2011
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2017
2012
  const headers = {};
2018
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/phone-numbers-summary/{InstanceId}";
2013
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-numbers-summary/{InstanceId}";
2019
2014
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
2020
2015
  const query = map({
2021
2016
  phoneNumberTypes: [
@@ -2047,7 +2042,7 @@ const serializeAws_restJson1ListPhoneNumbersV2Command = async (input, context) =
2047
2042
  const headers = {
2048
2043
  "content-type": "application/json",
2049
2044
  };
2050
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number/list";
2045
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number/list";
2051
2046
  let body;
2052
2047
  body = JSON.stringify({
2053
2048
  ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
@@ -2075,7 +2070,7 @@ exports.serializeAws_restJson1ListPhoneNumbersV2Command = serializeAws_restJson1
2075
2070
  const serializeAws_restJson1ListPromptsCommand = async (input, context) => {
2076
2071
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2077
2072
  const headers = {};
2078
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/prompts-summary/{InstanceId}";
2073
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/prompts-summary/{InstanceId}";
2079
2074
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
2080
2075
  const query = map({
2081
2076
  nextToken: [, input.NextToken],
@@ -2097,7 +2092,7 @@ exports.serializeAws_restJson1ListPromptsCommand = serializeAws_restJson1ListPro
2097
2092
  const serializeAws_restJson1ListQueueQuickConnectsCommand = async (input, context) => {
2098
2093
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2099
2094
  const headers = {};
2100
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2095
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2101
2096
  "/queues/{InstanceId}/{QueueId}/quick-connects";
2102
2097
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
2103
2098
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "QueueId", () => input.QueueId, "{QueueId}", false);
@@ -2121,7 +2116,7 @@ exports.serializeAws_restJson1ListQueueQuickConnectsCommand = serializeAws_restJ
2121
2116
  const serializeAws_restJson1ListQueuesCommand = async (input, context) => {
2122
2117
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2123
2118
  const headers = {};
2124
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/queues-summary/{InstanceId}";
2119
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/queues-summary/{InstanceId}";
2125
2120
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
2126
2121
  const query = map({
2127
2122
  queueTypes: [() => input.QueueTypes !== void 0, () => (input.QueueTypes || []).map((_entry) => _entry)],
@@ -2144,7 +2139,7 @@ exports.serializeAws_restJson1ListQueuesCommand = serializeAws_restJson1ListQueu
2144
2139
  const serializeAws_restJson1ListQuickConnectsCommand = async (input, context) => {
2145
2140
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2146
2141
  const headers = {};
2147
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/quick-connects/{InstanceId}";
2142
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/quick-connects/{InstanceId}";
2148
2143
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
2149
2144
  const query = map({
2150
2145
  nextToken: [, input.NextToken],
@@ -2170,7 +2165,7 @@ exports.serializeAws_restJson1ListQuickConnectsCommand = serializeAws_restJson1L
2170
2165
  const serializeAws_restJson1ListRoutingProfileQueuesCommand = async (input, context) => {
2171
2166
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2172
2167
  const headers = {};
2173
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2168
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2174
2169
  "/routing-profiles/{InstanceId}/{RoutingProfileId}/queues";
2175
2170
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
2176
2171
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "RoutingProfileId", () => input.RoutingProfileId, "{RoutingProfileId}", false);
@@ -2194,7 +2189,7 @@ exports.serializeAws_restJson1ListRoutingProfileQueuesCommand = serializeAws_res
2194
2189
  const serializeAws_restJson1ListRoutingProfilesCommand = async (input, context) => {
2195
2190
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2196
2191
  const headers = {};
2197
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/routing-profiles-summary/{InstanceId}";
2192
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/routing-profiles-summary/{InstanceId}";
2198
2193
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
2199
2194
  const query = map({
2200
2195
  nextToken: [, input.NextToken],
@@ -2216,7 +2211,7 @@ exports.serializeAws_restJson1ListRoutingProfilesCommand = serializeAws_restJson
2216
2211
  const serializeAws_restJson1ListSecurityKeysCommand = async (input, context) => {
2217
2212
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2218
2213
  const headers = {};
2219
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/security-keys";
2214
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/security-keys";
2220
2215
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
2221
2216
  const query = map({
2222
2217
  nextToken: [, input.NextToken],
@@ -2238,7 +2233,7 @@ exports.serializeAws_restJson1ListSecurityKeysCommand = serializeAws_restJson1Li
2238
2233
  const serializeAws_restJson1ListSecurityProfilePermissionsCommand = async (input, context) => {
2239
2234
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2240
2235
  const headers = {};
2241
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2236
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2242
2237
  "/security-profiles-permissions/{InstanceId}/{SecurityProfileId}";
2243
2238
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "SecurityProfileId", () => input.SecurityProfileId, "{SecurityProfileId}", false);
2244
2239
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
@@ -2262,7 +2257,7 @@ exports.serializeAws_restJson1ListSecurityProfilePermissionsCommand = serializeA
2262
2257
  const serializeAws_restJson1ListSecurityProfilesCommand = async (input, context) => {
2263
2258
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2264
2259
  const headers = {};
2265
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/security-profiles-summary/{InstanceId}";
2260
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/security-profiles-summary/{InstanceId}";
2266
2261
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
2267
2262
  const query = map({
2268
2263
  nextToken: [, input.NextToken],
@@ -2284,7 +2279,7 @@ exports.serializeAws_restJson1ListSecurityProfilesCommand = serializeAws_restJso
2284
2279
  const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
2285
2280
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2286
2281
  const headers = {};
2287
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
2282
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
2288
2283
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
2289
2284
  let body;
2290
2285
  return new protocol_http_1.HttpRequest({
@@ -2301,7 +2296,7 @@ exports.serializeAws_restJson1ListTagsForResourceCommand = serializeAws_restJson
2301
2296
  const serializeAws_restJson1ListTaskTemplatesCommand = async (input, context) => {
2302
2297
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2303
2298
  const headers = {};
2304
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/task/template";
2299
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/task/template";
2305
2300
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
2306
2301
  const query = map({
2307
2302
  nextToken: [, input.NextToken],
@@ -2325,7 +2320,7 @@ exports.serializeAws_restJson1ListTaskTemplatesCommand = serializeAws_restJson1L
2325
2320
  const serializeAws_restJson1ListTrafficDistributionGroupsCommand = async (input, context) => {
2326
2321
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2327
2322
  const headers = {};
2328
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/traffic-distribution-groups";
2323
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/traffic-distribution-groups";
2329
2324
  const query = map({
2330
2325
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
2331
2326
  nextToken: [, input.NextToken],
@@ -2347,7 +2342,7 @@ exports.serializeAws_restJson1ListTrafficDistributionGroupsCommand = serializeAw
2347
2342
  const serializeAws_restJson1ListUseCasesCommand = async (input, context) => {
2348
2343
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2349
2344
  const headers = {};
2350
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2345
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2351
2346
  "/instance/{InstanceId}/integration-associations/{IntegrationAssociationId}/use-cases";
2352
2347
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
2353
2348
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IntegrationAssociationId", () => input.IntegrationAssociationId, "{IntegrationAssociationId}", false);
@@ -2371,7 +2366,7 @@ exports.serializeAws_restJson1ListUseCasesCommand = serializeAws_restJson1ListUs
2371
2366
  const serializeAws_restJson1ListUserHierarchyGroupsCommand = async (input, context) => {
2372
2367
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2373
2368
  const headers = {};
2374
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2369
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2375
2370
  "/user-hierarchy-groups-summary/{InstanceId}";
2376
2371
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
2377
2372
  const query = map({
@@ -2394,7 +2389,7 @@ exports.serializeAws_restJson1ListUserHierarchyGroupsCommand = serializeAws_rest
2394
2389
  const serializeAws_restJson1ListUsersCommand = async (input, context) => {
2395
2390
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2396
2391
  const headers = {};
2397
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/users-summary/{InstanceId}";
2392
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/users-summary/{InstanceId}";
2398
2393
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
2399
2394
  const query = map({
2400
2395
  nextToken: [, input.NextToken],
@@ -2418,7 +2413,7 @@ const serializeAws_restJson1PutUserStatusCommand = async (input, context) => {
2418
2413
  const headers = {
2419
2414
  "content-type": "application/json",
2420
2415
  };
2421
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/users/{InstanceId}/{UserId}/status";
2416
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/users/{InstanceId}/{UserId}/status";
2422
2417
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "UserId", () => input.UserId, "{UserId}", false);
2423
2418
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
2424
2419
  let body;
@@ -2439,7 +2434,7 @@ exports.serializeAws_restJson1PutUserStatusCommand = serializeAws_restJson1PutUs
2439
2434
  const serializeAws_restJson1ReleasePhoneNumberCommand = async (input, context) => {
2440
2435
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2441
2436
  const headers = {};
2442
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number/{PhoneNumberId}";
2437
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number/{PhoneNumberId}";
2443
2438
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PhoneNumberId", () => input.PhoneNumberId, "{PhoneNumberId}", false);
2444
2439
  const query = map({
2445
2440
  clientToken: [, input.ClientToken],
@@ -2458,16 +2453,15 @@ const serializeAws_restJson1ReleasePhoneNumberCommand = async (input, context) =
2458
2453
  };
2459
2454
  exports.serializeAws_restJson1ReleasePhoneNumberCommand = serializeAws_restJson1ReleasePhoneNumberCommand;
2460
2455
  const serializeAws_restJson1ReplicateInstanceCommand = async (input, context) => {
2461
- var _a;
2462
2456
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2463
2457
  const headers = {
2464
2458
  "content-type": "application/json",
2465
2459
  };
2466
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/replicate";
2460
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/replicate";
2467
2461
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
2468
2462
  let body;
2469
2463
  body = JSON.stringify({
2470
- ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
2464
+ ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
2471
2465
  ...(input.ReplicaAlias != null && { ReplicaAlias: input.ReplicaAlias }),
2472
2466
  ...(input.ReplicaRegion != null && { ReplicaRegion: input.ReplicaRegion }),
2473
2467
  });
@@ -2487,7 +2481,7 @@ const serializeAws_restJson1ResumeContactRecordingCommand = async (input, contex
2487
2481
  const headers = {
2488
2482
  "content-type": "application/json",
2489
2483
  };
2490
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/contact/resume-recording";
2484
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/resume-recording";
2491
2485
  let body;
2492
2486
  body = JSON.stringify({
2493
2487
  ...(input.ContactId != null && { ContactId: input.ContactId }),
@@ -2510,7 +2504,7 @@ const serializeAws_restJson1SearchAvailablePhoneNumbersCommand = async (input, c
2510
2504
  const headers = {
2511
2505
  "content-type": "application/json",
2512
2506
  };
2513
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number/search-available";
2507
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number/search-available";
2514
2508
  let body;
2515
2509
  body = JSON.stringify({
2516
2510
  ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
@@ -2536,7 +2530,7 @@ const serializeAws_restJson1SearchQueuesCommand = async (input, context) => {
2536
2530
  const headers = {
2537
2531
  "content-type": "application/json",
2538
2532
  };
2539
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/search-queues";
2533
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/search-queues";
2540
2534
  let body;
2541
2535
  body = JSON.stringify({
2542
2536
  ...(input.InstanceId != null && { InstanceId: input.InstanceId }),
@@ -2565,7 +2559,7 @@ const serializeAws_restJson1SearchRoutingProfilesCommand = async (input, context
2565
2559
  const headers = {
2566
2560
  "content-type": "application/json",
2567
2561
  };
2568
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/search-routing-profiles";
2562
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/search-routing-profiles";
2569
2563
  let body;
2570
2564
  body = JSON.stringify({
2571
2565
  ...(input.InstanceId != null && { InstanceId: input.InstanceId }),
@@ -2594,7 +2588,7 @@ const serializeAws_restJson1SearchSecurityProfilesCommand = async (input, contex
2594
2588
  const headers = {
2595
2589
  "content-type": "application/json",
2596
2590
  };
2597
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/search-security-profiles";
2591
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/search-security-profiles";
2598
2592
  let body;
2599
2593
  body = JSON.stringify({
2600
2594
  ...(input.InstanceId != null && { InstanceId: input.InstanceId }),
@@ -2623,7 +2617,7 @@ const serializeAws_restJson1SearchUsersCommand = async (input, context) => {
2623
2617
  const headers = {
2624
2618
  "content-type": "application/json",
2625
2619
  };
2626
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/search-users";
2620
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/search-users";
2627
2621
  let body;
2628
2622
  body = JSON.stringify({
2629
2623
  ...(input.InstanceId != null && { InstanceId: input.InstanceId }),
@@ -2652,7 +2646,7 @@ const serializeAws_restJson1SearchVocabulariesCommand = async (input, context) =
2652
2646
  const headers = {
2653
2647
  "content-type": "application/json",
2654
2648
  };
2655
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/vocabulary-summary/{InstanceId}";
2649
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/vocabulary-summary/{InstanceId}";
2656
2650
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
2657
2651
  let body;
2658
2652
  body = JSON.stringify({
@@ -2674,17 +2668,16 @@ const serializeAws_restJson1SearchVocabulariesCommand = async (input, context) =
2674
2668
  };
2675
2669
  exports.serializeAws_restJson1SearchVocabulariesCommand = serializeAws_restJson1SearchVocabulariesCommand;
2676
2670
  const serializeAws_restJson1StartChatContactCommand = async (input, context) => {
2677
- var _a;
2678
2671
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2679
2672
  const headers = {
2680
2673
  "content-type": "application/json",
2681
2674
  };
2682
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/contact/chat";
2675
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/chat";
2683
2676
  let body;
2684
2677
  body = JSON.stringify({
2685
2678
  ...(input.Attributes != null && { Attributes: serializeAws_restJson1Attributes(input.Attributes, context) }),
2686
2679
  ...(input.ChatDurationInMinutes != null && { ChatDurationInMinutes: input.ChatDurationInMinutes }),
2687
- ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
2680
+ ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
2688
2681
  ...(input.ContactFlowId != null && { ContactFlowId: input.ContactFlowId }),
2689
2682
  ...(input.InitialMessage != null && {
2690
2683
  InitialMessage: serializeAws_restJson1ChatMessage(input.InitialMessage, context),
@@ -2713,7 +2706,7 @@ const serializeAws_restJson1StartContactRecordingCommand = async (input, context
2713
2706
  const headers = {
2714
2707
  "content-type": "application/json",
2715
2708
  };
2716
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/contact/start-recording";
2709
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/start-recording";
2717
2710
  let body;
2718
2711
  body = JSON.stringify({
2719
2712
  ...(input.ContactId != null && { ContactId: input.ContactId }),
@@ -2735,18 +2728,17 @@ const serializeAws_restJson1StartContactRecordingCommand = async (input, context
2735
2728
  };
2736
2729
  exports.serializeAws_restJson1StartContactRecordingCommand = serializeAws_restJson1StartContactRecordingCommand;
2737
2730
  const serializeAws_restJson1StartContactStreamingCommand = async (input, context) => {
2738
- var _a;
2739
2731
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2740
2732
  const headers = {
2741
2733
  "content-type": "application/json",
2742
2734
  };
2743
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/contact/start-streaming";
2735
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/start-streaming";
2744
2736
  let body;
2745
2737
  body = JSON.stringify({
2746
2738
  ...(input.ChatStreamingConfiguration != null && {
2747
2739
  ChatStreamingConfiguration: serializeAws_restJson1ChatStreamingConfiguration(input.ChatStreamingConfiguration, context),
2748
2740
  }),
2749
- ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
2741
+ ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
2750
2742
  ...(input.ContactId != null && { ContactId: input.ContactId }),
2751
2743
  ...(input.InstanceId != null && { InstanceId: input.InstanceId }),
2752
2744
  });
@@ -2762,12 +2754,11 @@ const serializeAws_restJson1StartContactStreamingCommand = async (input, context
2762
2754
  };
2763
2755
  exports.serializeAws_restJson1StartContactStreamingCommand = serializeAws_restJson1StartContactStreamingCommand;
2764
2756
  const serializeAws_restJson1StartOutboundVoiceContactCommand = async (input, context) => {
2765
- var _a;
2766
2757
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2767
2758
  const headers = {
2768
2759
  "content-type": "application/json",
2769
2760
  };
2770
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/contact/outbound-voice";
2761
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/outbound-voice";
2771
2762
  let body;
2772
2763
  body = JSON.stringify({
2773
2764
  ...(input.AnswerMachineDetectionConfig != null && {
@@ -2775,7 +2766,7 @@ const serializeAws_restJson1StartOutboundVoiceContactCommand = async (input, con
2775
2766
  }),
2776
2767
  ...(input.Attributes != null && { Attributes: serializeAws_restJson1Attributes(input.Attributes, context) }),
2777
2768
  ...(input.CampaignId != null && { CampaignId: input.CampaignId }),
2778
- ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
2769
+ ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
2779
2770
  ...(input.ContactFlowId != null && { ContactFlowId: input.ContactFlowId }),
2780
2771
  ...(input.DestinationPhoneNumber != null && { DestinationPhoneNumber: input.DestinationPhoneNumber }),
2781
2772
  ...(input.InstanceId != null && { InstanceId: input.InstanceId }),
@@ -2795,16 +2786,15 @@ const serializeAws_restJson1StartOutboundVoiceContactCommand = async (input, con
2795
2786
  };
2796
2787
  exports.serializeAws_restJson1StartOutboundVoiceContactCommand = serializeAws_restJson1StartOutboundVoiceContactCommand;
2797
2788
  const serializeAws_restJson1StartTaskContactCommand = async (input, context) => {
2798
- var _a;
2799
2789
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2800
2790
  const headers = {
2801
2791
  "content-type": "application/json",
2802
2792
  };
2803
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/contact/task";
2793
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/task";
2804
2794
  let body;
2805
2795
  body = JSON.stringify({
2806
2796
  ...(input.Attributes != null && { Attributes: serializeAws_restJson1Attributes(input.Attributes, context) }),
2807
- ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
2797
+ ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
2808
2798
  ...(input.ContactFlowId != null && { ContactFlowId: input.ContactFlowId }),
2809
2799
  ...(input.Description != null && { Description: input.Description }),
2810
2800
  ...(input.InstanceId != null && { InstanceId: input.InstanceId }),
@@ -2831,7 +2821,7 @@ const serializeAws_restJson1StopContactCommand = async (input, context) => {
2831
2821
  const headers = {
2832
2822
  "content-type": "application/json",
2833
2823
  };
2834
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/contact/stop";
2824
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/stop";
2835
2825
  let body;
2836
2826
  body = JSON.stringify({
2837
2827
  ...(input.ContactId != null && { ContactId: input.ContactId }),
@@ -2853,7 +2843,7 @@ const serializeAws_restJson1StopContactRecordingCommand = async (input, context)
2853
2843
  const headers = {
2854
2844
  "content-type": "application/json",
2855
2845
  };
2856
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/contact/stop-recording";
2846
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/stop-recording";
2857
2847
  let body;
2858
2848
  body = JSON.stringify({
2859
2849
  ...(input.ContactId != null && { ContactId: input.ContactId }),
@@ -2876,7 +2866,7 @@ const serializeAws_restJson1StopContactStreamingCommand = async (input, context)
2876
2866
  const headers = {
2877
2867
  "content-type": "application/json",
2878
2868
  };
2879
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/contact/stop-streaming";
2869
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/stop-streaming";
2880
2870
  let body;
2881
2871
  body = JSON.stringify({
2882
2872
  ...(input.ContactId != null && { ContactId: input.ContactId }),
@@ -2899,7 +2889,7 @@ const serializeAws_restJson1SuspendContactRecordingCommand = async (input, conte
2899
2889
  const headers = {
2900
2890
  "content-type": "application/json",
2901
2891
  };
2902
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/contact/suspend-recording";
2892
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/suspend-recording";
2903
2893
  let body;
2904
2894
  body = JSON.stringify({
2905
2895
  ...(input.ContactId != null && { ContactId: input.ContactId }),
@@ -2922,7 +2912,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
2922
2912
  const headers = {
2923
2913
  "content-type": "application/json",
2924
2914
  };
2925
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
2915
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
2926
2916
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
2927
2917
  let body;
2928
2918
  body = JSON.stringify({
@@ -2940,15 +2930,14 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
2940
2930
  };
2941
2931
  exports.serializeAws_restJson1TagResourceCommand = serializeAws_restJson1TagResourceCommand;
2942
2932
  const serializeAws_restJson1TransferContactCommand = async (input, context) => {
2943
- var _a;
2944
2933
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2945
2934
  const headers = {
2946
2935
  "content-type": "application/json",
2947
2936
  };
2948
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/contact/transfer";
2937
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/transfer";
2949
2938
  let body;
2950
2939
  body = JSON.stringify({
2951
- ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
2940
+ ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
2952
2941
  ...(input.ContactFlowId != null && { ContactFlowId: input.ContactFlowId }),
2953
2942
  ...(input.ContactId != null && { ContactId: input.ContactId }),
2954
2943
  ...(input.InstanceId != null && { InstanceId: input.InstanceId }),
@@ -2969,7 +2958,7 @@ exports.serializeAws_restJson1TransferContactCommand = serializeAws_restJson1Tra
2969
2958
  const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
2970
2959
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2971
2960
  const headers = {};
2972
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
2961
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
2973
2962
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
2974
2963
  const query = map({
2975
2964
  tagKeys: [() => input.tagKeys !== void 0, () => (input.tagKeys || []).map((_entry) => _entry)],
@@ -2992,7 +2981,7 @@ const serializeAws_restJson1UpdateAgentStatusCommand = async (input, context) =>
2992
2981
  const headers = {
2993
2982
  "content-type": "application/json",
2994
2983
  };
2995
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2984
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2996
2985
  "/agent-status/{InstanceId}/{AgentStatusId}";
2997
2986
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
2998
2987
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AgentStatusId", () => input.AgentStatusId, "{AgentStatusId}", false);
@@ -3020,7 +3009,7 @@ const serializeAws_restJson1UpdateContactCommand = async (input, context) => {
3020
3009
  const headers = {
3021
3010
  "content-type": "application/json",
3022
3011
  };
3023
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/contacts/{InstanceId}/{ContactId}";
3012
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contacts/{InstanceId}/{ContactId}";
3024
3013
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
3025
3014
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ContactId", () => input.ContactId, "{ContactId}", false);
3026
3015
  let body;
@@ -3045,7 +3034,7 @@ const serializeAws_restJson1UpdateContactAttributesCommand = async (input, conte
3045
3034
  const headers = {
3046
3035
  "content-type": "application/json",
3047
3036
  };
3048
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/contact/attributes";
3037
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/attributes";
3049
3038
  let body;
3050
3039
  body = JSON.stringify({
3051
3040
  ...(input.Attributes != null && { Attributes: serializeAws_restJson1Attributes(input.Attributes, context) }),
@@ -3068,7 +3057,7 @@ const serializeAws_restJson1UpdateContactFlowContentCommand = async (input, cont
3068
3057
  const headers = {
3069
3058
  "content-type": "application/json",
3070
3059
  };
3071
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3060
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3072
3061
  "/contact-flows/{InstanceId}/{ContactFlowId}/content";
3073
3062
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
3074
3063
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ContactFlowId", () => input.ContactFlowId, "{ContactFlowId}", false);
@@ -3092,7 +3081,7 @@ const serializeAws_restJson1UpdateContactFlowMetadataCommand = async (input, con
3092
3081
  const headers = {
3093
3082
  "content-type": "application/json",
3094
3083
  };
3095
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3084
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3096
3085
  "/contact-flows/{InstanceId}/{ContactFlowId}/metadata";
3097
3086
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
3098
3087
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ContactFlowId", () => input.ContactFlowId, "{ContactFlowId}", false);
@@ -3118,7 +3107,7 @@ const serializeAws_restJson1UpdateContactFlowModuleContentCommand = async (input
3118
3107
  const headers = {
3119
3108
  "content-type": "application/json",
3120
3109
  };
3121
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3110
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3122
3111
  "/contact-flow-modules/{InstanceId}/{ContactFlowModuleId}/content";
3123
3112
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
3124
3113
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ContactFlowModuleId", () => input.ContactFlowModuleId, "{ContactFlowModuleId}", false);
@@ -3142,7 +3131,7 @@ const serializeAws_restJson1UpdateContactFlowModuleMetadataCommand = async (inpu
3142
3131
  const headers = {
3143
3132
  "content-type": "application/json",
3144
3133
  };
3145
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3134
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3146
3135
  "/contact-flow-modules/{InstanceId}/{ContactFlowModuleId}/metadata";
3147
3136
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
3148
3137
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ContactFlowModuleId", () => input.ContactFlowModuleId, "{ContactFlowModuleId}", false);
@@ -3168,7 +3157,7 @@ const serializeAws_restJson1UpdateContactFlowNameCommand = async (input, context
3168
3157
  const headers = {
3169
3158
  "content-type": "application/json",
3170
3159
  };
3171
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3160
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3172
3161
  "/contact-flows/{InstanceId}/{ContactFlowId}/name";
3173
3162
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
3174
3163
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ContactFlowId", () => input.ContactFlowId, "{ContactFlowId}", false);
@@ -3193,7 +3182,7 @@ const serializeAws_restJson1UpdateContactScheduleCommand = async (input, context
3193
3182
  const headers = {
3194
3183
  "content-type": "application/json",
3195
3184
  };
3196
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/contact/schedule";
3185
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/schedule";
3197
3186
  let body;
3198
3187
  body = JSON.stringify({
3199
3188
  ...(input.ContactId != null && { ContactId: input.ContactId }),
@@ -3216,7 +3205,7 @@ const serializeAws_restJson1UpdateHoursOfOperationCommand = async (input, contex
3216
3205
  const headers = {
3217
3206
  "content-type": "application/json",
3218
3207
  };
3219
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3208
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3220
3209
  "/hours-of-operations/{InstanceId}/{HoursOfOperationId}";
3221
3210
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
3222
3211
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "HoursOfOperationId", () => input.HoursOfOperationId, "{HoursOfOperationId}", false);
@@ -3243,7 +3232,7 @@ const serializeAws_restJson1UpdateInstanceAttributeCommand = async (input, conte
3243
3232
  const headers = {
3244
3233
  "content-type": "application/json",
3245
3234
  };
3246
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3235
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3247
3236
  "/instance/{InstanceId}/attribute/{AttributeType}";
3248
3237
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
3249
3238
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AttributeType", () => input.AttributeType, "{AttributeType}", false);
@@ -3267,7 +3256,7 @@ const serializeAws_restJson1UpdateInstanceStorageConfigCommand = async (input, c
3267
3256
  const headers = {
3268
3257
  "content-type": "application/json",
3269
3258
  };
3270
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3259
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3271
3260
  "/instance/{InstanceId}/storage-config/{AssociationId}";
3272
3261
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
3273
3262
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AssociationId", () => input.AssociationId, "{AssociationId}", false);
@@ -3293,16 +3282,15 @@ const serializeAws_restJson1UpdateInstanceStorageConfigCommand = async (input, c
3293
3282
  };
3294
3283
  exports.serializeAws_restJson1UpdateInstanceStorageConfigCommand = serializeAws_restJson1UpdateInstanceStorageConfigCommand;
3295
3284
  const serializeAws_restJson1UpdatePhoneNumberCommand = async (input, context) => {
3296
- var _a;
3297
3285
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3298
3286
  const headers = {
3299
3287
  "content-type": "application/json",
3300
3288
  };
3301
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number/{PhoneNumberId}";
3289
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number/{PhoneNumberId}";
3302
3290
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PhoneNumberId", () => input.PhoneNumberId, "{PhoneNumberId}", false);
3303
3291
  let body;
3304
3292
  body = JSON.stringify({
3305
- ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
3293
+ ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
3306
3294
  ...(input.TargetArn != null && { TargetArn: input.TargetArn }),
3307
3295
  });
3308
3296
  return new protocol_http_1.HttpRequest({
@@ -3321,7 +3309,7 @@ const serializeAws_restJson1UpdateQueueHoursOfOperationCommand = async (input, c
3321
3309
  const headers = {
3322
3310
  "content-type": "application/json",
3323
3311
  };
3324
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3312
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3325
3313
  "/queues/{InstanceId}/{QueueId}/hours-of-operation";
3326
3314
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
3327
3315
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "QueueId", () => input.QueueId, "{QueueId}", false);
@@ -3345,7 +3333,7 @@ const serializeAws_restJson1UpdateQueueMaxContactsCommand = async (input, contex
3345
3333
  const headers = {
3346
3334
  "content-type": "application/json",
3347
3335
  };
3348
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3336
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3349
3337
  "/queues/{InstanceId}/{QueueId}/max-contacts";
3350
3338
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
3351
3339
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "QueueId", () => input.QueueId, "{QueueId}", false);
@@ -3369,7 +3357,7 @@ const serializeAws_restJson1UpdateQueueNameCommand = async (input, context) => {
3369
3357
  const headers = {
3370
3358
  "content-type": "application/json",
3371
3359
  };
3372
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/queues/{InstanceId}/{QueueId}/name";
3360
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/queues/{InstanceId}/{QueueId}/name";
3373
3361
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
3374
3362
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "QueueId", () => input.QueueId, "{QueueId}", false);
3375
3363
  let body;
@@ -3393,7 +3381,7 @@ const serializeAws_restJson1UpdateQueueOutboundCallerConfigCommand = async (inpu
3393
3381
  const headers = {
3394
3382
  "content-type": "application/json",
3395
3383
  };
3396
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3384
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3397
3385
  "/queues/{InstanceId}/{QueueId}/outbound-caller-config";
3398
3386
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
3399
3387
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "QueueId", () => input.QueueId, "{QueueId}", false);
@@ -3419,7 +3407,7 @@ const serializeAws_restJson1UpdateQueueStatusCommand = async (input, context) =>
3419
3407
  const headers = {
3420
3408
  "content-type": "application/json",
3421
3409
  };
3422
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/queues/{InstanceId}/{QueueId}/status";
3410
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/queues/{InstanceId}/{QueueId}/status";
3423
3411
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
3424
3412
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "QueueId", () => input.QueueId, "{QueueId}", false);
3425
3413
  let body;
@@ -3442,7 +3430,7 @@ const serializeAws_restJson1UpdateQuickConnectConfigCommand = async (input, cont
3442
3430
  const headers = {
3443
3431
  "content-type": "application/json",
3444
3432
  };
3445
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3433
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3446
3434
  "/quick-connects/{InstanceId}/{QuickConnectId}/config";
3447
3435
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
3448
3436
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "QuickConnectId", () => input.QuickConnectId, "{QuickConnectId}", false);
@@ -3468,7 +3456,7 @@ const serializeAws_restJson1UpdateQuickConnectNameCommand = async (input, contex
3468
3456
  const headers = {
3469
3457
  "content-type": "application/json",
3470
3458
  };
3471
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3459
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3472
3460
  "/quick-connects/{InstanceId}/{QuickConnectId}/name";
3473
3461
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
3474
3462
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "QuickConnectId", () => input.QuickConnectId, "{QuickConnectId}", false);
@@ -3493,7 +3481,7 @@ const serializeAws_restJson1UpdateRoutingProfileConcurrencyCommand = async (inpu
3493
3481
  const headers = {
3494
3482
  "content-type": "application/json",
3495
3483
  };
3496
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3484
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3497
3485
  "/routing-profiles/{InstanceId}/{RoutingProfileId}/concurrency";
3498
3486
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
3499
3487
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "RoutingProfileId", () => input.RoutingProfileId, "{RoutingProfileId}", false);
@@ -3519,7 +3507,7 @@ const serializeAws_restJson1UpdateRoutingProfileDefaultOutboundQueueCommand = as
3519
3507
  const headers = {
3520
3508
  "content-type": "application/json",
3521
3509
  };
3522
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3510
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3523
3511
  "/routing-profiles/{InstanceId}/{RoutingProfileId}/default-outbound-queue";
3524
3512
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
3525
3513
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "RoutingProfileId", () => input.RoutingProfileId, "{RoutingProfileId}", false);
@@ -3543,7 +3531,7 @@ const serializeAws_restJson1UpdateRoutingProfileNameCommand = async (input, cont
3543
3531
  const headers = {
3544
3532
  "content-type": "application/json",
3545
3533
  };
3546
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3534
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3547
3535
  "/routing-profiles/{InstanceId}/{RoutingProfileId}/name";
3548
3536
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
3549
3537
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "RoutingProfileId", () => input.RoutingProfileId, "{RoutingProfileId}", false);
@@ -3568,7 +3556,7 @@ const serializeAws_restJson1UpdateRoutingProfileQueuesCommand = async (input, co
3568
3556
  const headers = {
3569
3557
  "content-type": "application/json",
3570
3558
  };
3571
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3559
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3572
3560
  "/routing-profiles/{InstanceId}/{RoutingProfileId}/queues";
3573
3561
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
3574
3562
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "RoutingProfileId", () => input.RoutingProfileId, "{RoutingProfileId}", false);
@@ -3594,7 +3582,7 @@ const serializeAws_restJson1UpdateSecurityProfileCommand = async (input, context
3594
3582
  const headers = {
3595
3583
  "content-type": "application/json",
3596
3584
  };
3597
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3585
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3598
3586
  "/security-profiles/{InstanceId}/{SecurityProfileId}";
3599
3587
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "SecurityProfileId", () => input.SecurityProfileId, "{SecurityProfileId}", false);
3600
3588
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
@@ -3621,7 +3609,7 @@ const serializeAws_restJson1UpdateTaskTemplateCommand = async (input, context) =
3621
3609
  const headers = {
3622
3610
  "content-type": "application/json",
3623
3611
  };
3624
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3612
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3625
3613
  "/instance/{InstanceId}/task/template/{TaskTemplateId}";
3626
3614
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "TaskTemplateId", () => input.TaskTemplateId, "{TaskTemplateId}", false);
3627
3615
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
@@ -3653,7 +3641,7 @@ const serializeAws_restJson1UpdateTrafficDistributionCommand = async (input, con
3653
3641
  const headers = {
3654
3642
  "content-type": "application/json",
3655
3643
  };
3656
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/traffic-distribution/{Id}";
3644
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/traffic-distribution/{Id}";
3657
3645
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
3658
3646
  let body;
3659
3647
  body = JSON.stringify({
@@ -3677,7 +3665,7 @@ const serializeAws_restJson1UpdateUserHierarchyCommand = async (input, context)
3677
3665
  const headers = {
3678
3666
  "content-type": "application/json",
3679
3667
  };
3680
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/users/{InstanceId}/{UserId}/hierarchy";
3668
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/users/{InstanceId}/{UserId}/hierarchy";
3681
3669
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "UserId", () => input.UserId, "{UserId}", false);
3682
3670
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
3683
3671
  let body;
@@ -3700,7 +3688,7 @@ const serializeAws_restJson1UpdateUserHierarchyGroupNameCommand = async (input,
3700
3688
  const headers = {
3701
3689
  "content-type": "application/json",
3702
3690
  };
3703
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3691
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3704
3692
  "/user-hierarchy-groups/{InstanceId}/{HierarchyGroupId}/name";
3705
3693
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "HierarchyGroupId", () => input.HierarchyGroupId, "{HierarchyGroupId}", false);
3706
3694
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
@@ -3724,7 +3712,7 @@ const serializeAws_restJson1UpdateUserHierarchyStructureCommand = async (input,
3724
3712
  const headers = {
3725
3713
  "content-type": "application/json",
3726
3714
  };
3727
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/user-hierarchy-structure/{InstanceId}";
3715
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/user-hierarchy-structure/{InstanceId}";
3728
3716
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
3729
3717
  let body;
3730
3718
  body = JSON.stringify({
@@ -3748,7 +3736,7 @@ const serializeAws_restJson1UpdateUserIdentityInfoCommand = async (input, contex
3748
3736
  const headers = {
3749
3737
  "content-type": "application/json",
3750
3738
  };
3751
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3739
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3752
3740
  "/users/{InstanceId}/{UserId}/identity-info";
3753
3741
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "UserId", () => input.UserId, "{UserId}", false);
3754
3742
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
@@ -3774,7 +3762,7 @@ const serializeAws_restJson1UpdateUserPhoneConfigCommand = async (input, context
3774
3762
  const headers = {
3775
3763
  "content-type": "application/json",
3776
3764
  };
3777
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/users/{InstanceId}/{UserId}/phone-config";
3765
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/users/{InstanceId}/{UserId}/phone-config";
3778
3766
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "UserId", () => input.UserId, "{UserId}", false);
3779
3767
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
3780
3768
  let body;
@@ -3799,7 +3787,7 @@ const serializeAws_restJson1UpdateUserRoutingProfileCommand = async (input, cont
3799
3787
  const headers = {
3800
3788
  "content-type": "application/json",
3801
3789
  };
3802
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3790
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3803
3791
  "/users/{InstanceId}/{UserId}/routing-profile";
3804
3792
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "UserId", () => input.UserId, "{UserId}", false);
3805
3793
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
@@ -3823,7 +3811,7 @@ const serializeAws_restJson1UpdateUserSecurityProfilesCommand = async (input, co
3823
3811
  const headers = {
3824
3812
  "content-type": "application/json",
3825
3813
  };
3826
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
3814
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3827
3815
  "/users/{InstanceId}/{UserId}/security-profiles";
3828
3816
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "UserId", () => input.UserId, "{UserId}", false);
3829
3817
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
@@ -14028,15 +14016,12 @@ const deserializeAws_restJson1VocabularySummaryList = (output, context) => {
14028
14016
  });
14029
14017
  return retVal;
14030
14018
  };
14031
- const deserializeMetadata = (output) => {
14032
- var _a, _b;
14033
- return ({
14034
- httpStatusCode: output.statusCode,
14035
- 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"],
14036
- extendedRequestId: output.headers["x-amz-id-2"],
14037
- cfId: output.headers["x-amz-cf-id"],
14038
- });
14039
- };
14019
+ const deserializeMetadata = (output) => ({
14020
+ httpStatusCode: output.statusCode,
14021
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
14022
+ extendedRequestId: output.headers["x-amz-id-2"],
14023
+ cfId: output.headers["x-amz-cf-id"],
14024
+ });
14040
14025
  const collectBody = (streamBody = new Uint8Array(), context) => {
14041
14026
  if (streamBody instanceof Uint8Array) {
14042
14027
  return Promise.resolve(streamBody);
@@ -14056,9 +14041,8 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
14056
14041
  return {};
14057
14042
  });
14058
14043
  const parseErrorBody = async (errorBody, context) => {
14059
- var _a;
14060
14044
  const value = await parseBody(errorBody, context);
14061
- value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
14045
+ value.message = value.message ?? value.Message;
14062
14046
  return value;
14063
14047
  };
14064
14048
  const loadRestJsonErrorCode = (output, data) => {