UNPKG

cdk-amazon-chime-resources

Version:

![Experimental](https://img.shields.io/badge/experimental-important.svg?style=for-the-badge)

1,259 lines (1,258 loc) 354 kB
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http"; import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseFloat32 as __limitedParseFloat32, map as __map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client"; import { ChimeSDKVoiceServiceException as __BaseException } from "../models/ChimeSDKVoiceServiceException"; import { AccessDeniedException, BadRequestException, ConflictException, ForbiddenException, GoneException, NotFoundException, ResourceLimitExceededException, ServiceFailureException, ServiceUnavailableException, ThrottledClientException, UnauthorizedClientException, UnprocessableEntityException, } from "../models/models_0"; export const se_AssociatePhoneNumbersWithVoiceConnectorCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = { "content-type": "application/json", }; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}"; resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false); const query = map({ operation: [, "associate-phone-numbers"], }); let body; body = JSON.stringify({ ...(input.E164PhoneNumbers != null && { E164PhoneNumbers: se_E164PhoneNumberList(input.E164PhoneNumbers, context), }), ...(input.ForceAssociate != null && { ForceAssociate: input.ForceAssociate }), }); return new __HttpRequest({ protocol, hostname, port, method: "POST", headers, path: resolvedPath, query, body, }); }; export const se_AssociatePhoneNumbersWithVoiceConnectorGroupCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = { "content-type": "application/json", }; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connector-groups/{VoiceConnectorGroupId}"; resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorGroupId", () => input.VoiceConnectorGroupId, "{VoiceConnectorGroupId}", false); const query = map({ operation: [, "associate-phone-numbers"], }); let body; body = JSON.stringify({ ...(input.E164PhoneNumbers != null && { E164PhoneNumbers: se_E164PhoneNumberList(input.E164PhoneNumbers, context), }), ...(input.ForceAssociate != null && { ForceAssociate: input.ForceAssociate }), }); return new __HttpRequest({ protocol, hostname, port, method: "POST", headers, path: resolvedPath, query, body, }); }; export const se_BatchDeletePhoneNumberCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = { "content-type": "application/json", }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-numbers"; const query = map({ operation: [, "batch-delete"], }); let body; body = JSON.stringify({ ...(input.PhoneNumberIds != null && { PhoneNumberIds: se_NonEmptyStringList(input.PhoneNumberIds, context) }), }); return new __HttpRequest({ protocol, hostname, port, method: "POST", headers, path: resolvedPath, query, body, }); }; export const se_BatchUpdatePhoneNumberCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = { "content-type": "application/json", }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-numbers"; const query = map({ operation: [, "batch-update"], }); let body; body = JSON.stringify({ ...(input.UpdatePhoneNumberRequestItems != null && { UpdatePhoneNumberRequestItems: se_UpdatePhoneNumberRequestItemList(input.UpdatePhoneNumberRequestItems, context), }), }); return new __HttpRequest({ protocol, hostname, port, method: "POST", headers, path: resolvedPath, query, body, }); }; export const se_CreatePhoneNumberOrderCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = { "content-type": "application/json", }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number-orders"; let body; body = JSON.stringify({ ...(input.E164PhoneNumbers != null && { E164PhoneNumbers: se_E164PhoneNumberList(input.E164PhoneNumbers, context), }), ...(input.ProductType != null && { ProductType: input.ProductType }), }); return new __HttpRequest({ protocol, hostname, port, method: "POST", headers, path: resolvedPath, body, }); }; export const se_CreateProxySessionCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = { "content-type": "application/json", }; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}/proxy-sessions"; resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false); let body; body = JSON.stringify({ ...(input.Capabilities != null && { Capabilities: se_CapabilityList(input.Capabilities, context) }), ...(input.ExpiryMinutes != null && { ExpiryMinutes: input.ExpiryMinutes }), ...(input.GeoMatchLevel != null && { GeoMatchLevel: input.GeoMatchLevel }), ...(input.GeoMatchParams != null && { GeoMatchParams: se_GeoMatchParams(input.GeoMatchParams, context) }), ...(input.Name != null && { Name: input.Name }), ...(input.NumberSelectionBehavior != null && { NumberSelectionBehavior: input.NumberSelectionBehavior }), ...(input.ParticipantPhoneNumbers != null && { ParticipantPhoneNumbers: se_ParticipantPhoneNumberList(input.ParticipantPhoneNumbers, context), }), }); return new __HttpRequest({ protocol, hostname, port, method: "POST", headers, path: resolvedPath, body, }); }; export const se_CreateSipMediaApplicationCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = { "content-type": "application/json", }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sip-media-applications"; let body; body = JSON.stringify({ ...(input.AwsRegion != null && { AwsRegion: input.AwsRegion }), ...(input.Endpoints != null && { Endpoints: se_SipMediaApplicationEndpointList(input.Endpoints, context) }), ...(input.Name != null && { Name: input.Name }), ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), }); return new __HttpRequest({ protocol, hostname, port, method: "POST", headers, path: resolvedPath, body, }); }; export const se_CreateSipMediaApplicationCallCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = { "content-type": "application/json", }; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sip-media-applications/{SipMediaApplicationId}/calls"; resolvedPath = __resolvedPath(resolvedPath, input, "SipMediaApplicationId", () => input.SipMediaApplicationId, "{SipMediaApplicationId}", false); let body; body = JSON.stringify({ ...(input.ArgumentsMap != null && { ArgumentsMap: se_SMACreateCallArgumentsMap(input.ArgumentsMap, context) }), ...(input.FromPhoneNumber != null && { FromPhoneNumber: input.FromPhoneNumber }), ...(input.SipHeaders != null && { SipHeaders: se_SipHeadersMap(input.SipHeaders, context) }), ...(input.ToPhoneNumber != null && { ToPhoneNumber: input.ToPhoneNumber }), }); return new __HttpRequest({ protocol, hostname, port, method: "POST", headers, path: resolvedPath, body, }); }; export const se_CreateSipRuleCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = { "content-type": "application/json", }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sip-rules"; let body; body = JSON.stringify({ ...(input.Disabled != null && { Disabled: input.Disabled }), ...(input.Name != null && { Name: input.Name }), ...(input.TargetApplications != null && { TargetApplications: se_SipRuleTargetApplicationList(input.TargetApplications, context), }), ...(input.TriggerType != null && { TriggerType: input.TriggerType }), ...(input.TriggerValue != null && { TriggerValue: input.TriggerValue }), }); return new __HttpRequest({ protocol, hostname, port, method: "POST", headers, path: resolvedPath, body, }); }; export const se_CreateVoiceConnectorCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = { "content-type": "application/json", }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors"; let body; body = JSON.stringify({ ...(input.AwsRegion != null && { AwsRegion: input.AwsRegion }), ...(input.Name != null && { Name: input.Name }), ...(input.RequireEncryption != null && { RequireEncryption: input.RequireEncryption }), ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), }); return new __HttpRequest({ protocol, hostname, port, method: "POST", headers, path: resolvedPath, body, }); }; export const se_CreateVoiceConnectorGroupCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = { "content-type": "application/json", }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connector-groups"; let body; body = JSON.stringify({ ...(input.Name != null && { Name: input.Name }), ...(input.VoiceConnectorItems != null && { VoiceConnectorItems: se_VoiceConnectorItemList(input.VoiceConnectorItems, context), }), }); return new __HttpRequest({ protocol, hostname, port, method: "POST", headers, path: resolvedPath, body, }); }; export const se_CreateVoiceProfileCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = { "content-type": "application/json", }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-profiles"; let body; body = JSON.stringify({ ...(input.SpeakerSearchTaskId != null && { SpeakerSearchTaskId: input.SpeakerSearchTaskId }), }); return new __HttpRequest({ protocol, hostname, port, method: "POST", headers, path: resolvedPath, body, }); }; export const se_CreateVoiceProfileDomainCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = { "content-type": "application/json", }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-profile-domains"; let body; body = JSON.stringify({ ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }), ...(input.Description != null && { Description: input.Description }), ...(input.Name != null && { Name: input.Name }), ...(input.ServerSideEncryptionConfiguration != null && { ServerSideEncryptionConfiguration: se_ServerSideEncryptionConfiguration(input.ServerSideEncryptionConfiguration, context), }), ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), }); return new __HttpRequest({ protocol, hostname, port, method: "POST", headers, path: resolvedPath, body, }); }; export const se_DeletePhoneNumberCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-numbers/{PhoneNumberId}"; resolvedPath = __resolvedPath(resolvedPath, input, "PhoneNumberId", () => input.PhoneNumberId, "{PhoneNumberId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "DELETE", headers, path: resolvedPath, body, }); }; export const se_DeleteProxySessionCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}/proxy-sessions/{ProxySessionId}"; resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "ProxySessionId", () => input.ProxySessionId, "{ProxySessionId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "DELETE", headers, path: resolvedPath, body, }); }; export const se_DeleteSipMediaApplicationCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sip-media-applications/{SipMediaApplicationId}"; resolvedPath = __resolvedPath(resolvedPath, input, "SipMediaApplicationId", () => input.SipMediaApplicationId, "{SipMediaApplicationId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "DELETE", headers, path: resolvedPath, body, }); }; export const se_DeleteSipRuleCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sip-rules/{SipRuleId}"; resolvedPath = __resolvedPath(resolvedPath, input, "SipRuleId", () => input.SipRuleId, "{SipRuleId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "DELETE", headers, path: resolvedPath, body, }); }; export const se_DeleteVoiceConnectorCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}"; resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "DELETE", headers, path: resolvedPath, body, }); }; export const se_DeleteVoiceConnectorEmergencyCallingConfigurationCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}/emergency-calling-configuration"; resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "DELETE", headers, path: resolvedPath, body, }); }; export const se_DeleteVoiceConnectorGroupCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connector-groups/{VoiceConnectorGroupId}"; resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorGroupId", () => input.VoiceConnectorGroupId, "{VoiceConnectorGroupId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "DELETE", headers, path: resolvedPath, body, }); }; export const se_DeleteVoiceConnectorOriginationCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}/origination"; resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "DELETE", headers, path: resolvedPath, body, }); }; export const se_DeleteVoiceConnectorProxyCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}/programmable-numbers/proxy"; resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "DELETE", headers, path: resolvedPath, body, }); }; export const se_DeleteVoiceConnectorStreamingConfigurationCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}/streaming-configuration"; resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "DELETE", headers, path: resolvedPath, body, }); }; export const se_DeleteVoiceConnectorTerminationCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}/termination"; resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "DELETE", headers, path: resolvedPath, body, }); }; export const se_DeleteVoiceConnectorTerminationCredentialsCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = { "content-type": "application/json", }; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}/termination/credentials"; resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false); const query = map({ operation: [, "delete"], }); let body; body = JSON.stringify({ ...(input.Usernames != null && { Usernames: se_SensitiveStringList(input.Usernames, context) }), }); return new __HttpRequest({ protocol, hostname, port, method: "POST", headers, path: resolvedPath, query, body, }); }; export const se_DeleteVoiceProfileCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-profiles/{VoiceProfileId}"; resolvedPath = __resolvedPath(resolvedPath, input, "VoiceProfileId", () => input.VoiceProfileId, "{VoiceProfileId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "DELETE", headers, path: resolvedPath, body, }); }; export const se_DeleteVoiceProfileDomainCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-profile-domains/{VoiceProfileDomainId}"; resolvedPath = __resolvedPath(resolvedPath, input, "VoiceProfileDomainId", () => input.VoiceProfileDomainId, "{VoiceProfileDomainId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "DELETE", headers, path: resolvedPath, body, }); }; export const se_DisassociatePhoneNumbersFromVoiceConnectorCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = { "content-type": "application/json", }; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}"; resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false); const query = map({ operation: [, "disassociate-phone-numbers"], }); let body; body = JSON.stringify({ ...(input.E164PhoneNumbers != null && { E164PhoneNumbers: se_E164PhoneNumberList(input.E164PhoneNumbers, context), }), }); return new __HttpRequest({ protocol, hostname, port, method: "POST", headers, path: resolvedPath, query, body, }); }; export const se_DisassociatePhoneNumbersFromVoiceConnectorGroupCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = { "content-type": "application/json", }; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connector-groups/{VoiceConnectorGroupId}"; resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorGroupId", () => input.VoiceConnectorGroupId, "{VoiceConnectorGroupId}", false); const query = map({ operation: [, "disassociate-phone-numbers"], }); let body; body = JSON.stringify({ ...(input.E164PhoneNumbers != null && { E164PhoneNumbers: se_E164PhoneNumberList(input.E164PhoneNumbers, context), }), }); return new __HttpRequest({ protocol, hostname, port, method: "POST", headers, path: resolvedPath, query, body, }); }; export const se_GetGlobalSettingsCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = { "content-type": "application/json", }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/settings"; let body; body = ""; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, body, }); }; export const se_GetPhoneNumberCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-numbers/{PhoneNumberId}"; resolvedPath = __resolvedPath(resolvedPath, input, "PhoneNumberId", () => input.PhoneNumberId, "{PhoneNumberId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, body, }); }; export const se_GetPhoneNumberOrderCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number-orders/{PhoneNumberOrderId}"; resolvedPath = __resolvedPath(resolvedPath, input, "PhoneNumberOrderId", () => input.PhoneNumberOrderId, "{PhoneNumberOrderId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, body, }); }; export const se_GetPhoneNumberSettingsCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = { "content-type": "application/json", }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/settings/phone-number"; let body; body = ""; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, body, }); }; export const se_GetProxySessionCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}/proxy-sessions/{ProxySessionId}"; resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "ProxySessionId", () => input.ProxySessionId, "{ProxySessionId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, body, }); }; export const se_GetSipMediaApplicationCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sip-media-applications/{SipMediaApplicationId}"; resolvedPath = __resolvedPath(resolvedPath, input, "SipMediaApplicationId", () => input.SipMediaApplicationId, "{SipMediaApplicationId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, body, }); }; export const se_GetSipMediaApplicationAlexaSkillConfigurationCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sip-media-applications/{SipMediaApplicationId}/alexa-skill-configuration"; resolvedPath = __resolvedPath(resolvedPath, input, "SipMediaApplicationId", () => input.SipMediaApplicationId, "{SipMediaApplicationId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, body, }); }; export const se_GetSipMediaApplicationLoggingConfigurationCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sip-media-applications/{SipMediaApplicationId}/logging-configuration"; resolvedPath = __resolvedPath(resolvedPath, input, "SipMediaApplicationId", () => input.SipMediaApplicationId, "{SipMediaApplicationId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, body, }); }; export const se_GetSipRuleCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sip-rules/{SipRuleId}"; resolvedPath = __resolvedPath(resolvedPath, input, "SipRuleId", () => input.SipRuleId, "{SipRuleId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, body, }); }; export const se_GetSpeakerSearchTaskCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}/speaker-search-tasks/{SpeakerSearchTaskId}"; resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "SpeakerSearchTaskId", () => input.SpeakerSearchTaskId, "{SpeakerSearchTaskId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, body, }); }; export const se_GetVoiceConnectorCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}"; resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, body, }); }; export const se_GetVoiceConnectorEmergencyCallingConfigurationCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}/emergency-calling-configuration"; resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, body, }); }; export const se_GetVoiceConnectorGroupCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connector-groups/{VoiceConnectorGroupId}"; resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorGroupId", () => input.VoiceConnectorGroupId, "{VoiceConnectorGroupId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, body, }); }; export const se_GetVoiceConnectorLoggingConfigurationCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}/logging-configuration"; resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, body, }); }; export const se_GetVoiceConnectorOriginationCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}/origination"; resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, body, }); }; export const se_GetVoiceConnectorProxyCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}/programmable-numbers/proxy"; resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, body, }); }; export const se_GetVoiceConnectorStreamingConfigurationCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}/streaming-configuration"; resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, body, }); }; export const se_GetVoiceConnectorTerminationCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}/termination"; resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, body, }); }; export const se_GetVoiceConnectorTerminationHealthCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}/termination/health"; resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, body, }); }; export const se_GetVoiceProfileCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-profiles/{VoiceProfileId}"; resolvedPath = __resolvedPath(resolvedPath, input, "VoiceProfileId", () => input.VoiceProfileId, "{VoiceProfileId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, body, }); }; export const se_GetVoiceProfileDomainCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-profile-domains/{VoiceProfileDomainId}"; resolvedPath = __resolvedPath(resolvedPath, input, "VoiceProfileDomainId", () => input.VoiceProfileDomainId, "{VoiceProfileDomainId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, body, }); }; export const se_GetVoiceToneAnalysisTaskCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}/voice-tone-analysis-tasks/{VoiceToneAnalysisTaskId}"; resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "VoiceToneAnalysisTaskId", () => input.VoiceToneAnalysisTaskId, "{VoiceToneAnalysisTaskId}", false); const query = map({ isCaller: [__expectNonNull(input.IsCaller, `IsCaller`) != null, () => input.IsCaller.toString()], }); let body; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, query, body, }); }; export const se_ListAvailableVoiceConnectorRegionsCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = { "content-type": "application/json", }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connector-regions"; let body; body = ""; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, body, }); }; export const se_ListPhoneNumberOrdersCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number-orders"; const query = map({ "next-token": [, input.NextToken], "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()], }); let body; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, query, body, }); }; export const se_ListPhoneNumbersCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-numbers"; const query = map({ status: [, input.Status], "product-type": [, input.ProductType], "filter-name": [, input.FilterName], "filter-value": [, input.FilterValue], "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()], "next-token": [, input.NextToken], }); let body; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, query, body, }); }; export const se_ListProxySessionsCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}/proxy-sessions"; resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false); const query = map({ status: [, input.Status], "next-token": [, input.NextToken], "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()], }); let body; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, query, body, }); }; export const se_ListSipMediaApplicationsCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sip-media-applications"; const query = map({ "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()], "next-token": [, input.NextToken], }); let body; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, query, body, }); }; export const se_ListSipRulesCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sip-rules"; const query = map({ "sip-media-application": [, input.SipMediaApplicationId], "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()], "next-token": [, input.NextToken], }); let body; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, query, body, }); }; export const se_ListSupportedPhoneNumberCountriesCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number-countries"; const query = map({ "product-type": [, __expectNonNull(input.ProductType, `ProductType`)], }); let body; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, query, body, }); }; export const se_ListTagsForResourceCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags"; const query = map({ arn: [, __expectNonNull(input.ResourceARN, `ResourceARN`)], }); let body; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, query, body, }); }; export const se_ListVoiceConnectorGroupsCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connector-groups"; const query = map({ "next-token": [, input.NextToken], "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()], }); let body; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, query, body, }); }; export const se_ListVoiceConnectorsCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors"; const query = map({ "next-token": [, input.NextToken], "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()], }); let body; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, query, body, }); }; export const se_ListVoiceConnectorTerminationCredentialsCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}/termination/credentials"; resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false); let body; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, body, }); }; export const se_ListVoiceProfileDomainsCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-profile-domains"; const query = map({ "next-token": [, input.NextToken], "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()], }); let body; return new __HttpRequest({ protocol, hostname, port, method: "GET", headers, path: resolvedPath, query, body, }); }; export const se_ListVoiceProfilesCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = {}; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-profiles"; const query = map({ "voice-profile-domain-id": [, __expectNonNull(input.VoiceProfileDomainId, `VoiceProfileDomainId`)], "next-token": [, input.NextToken], "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()], }); let body;