{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.PinpointSmsVoiceV2.Types
(
defaultService,
_AccessDeniedException,
_ConflictException,
_InternalServerException,
_ResourceNotFoundException,
_ServiceQuotaExceededException,
_ThrottlingException,
_ValidationException,
AccountAttributeName (..),
AccountLimitName (..),
ConfigurationSetFilterName (..),
DestinationCountryParameterKey (..),
EventType (..),
KeywordAction (..),
KeywordFilterName (..),
MessageType (..),
NumberCapability (..),
NumberStatus (..),
NumberType (..),
OptedOutFilterName (..),
PhoneNumberFilterName (..),
PoolFilterName (..),
PoolOriginationIdentitiesFilterName (..),
PoolStatus (..),
RequestableNumberType (..),
SenderIdFilterName (..),
SpendLimitName (..),
VoiceId (..),
VoiceMessageBodyTextType (..),
AccountAttribute (..),
newAccountAttribute,
accountAttribute_name,
accountAttribute_value,
AccountLimit (..),
newAccountLimit,
accountLimit_name,
accountLimit_used,
accountLimit_max,
CloudWatchLogsDestination (..),
newCloudWatchLogsDestination,
cloudWatchLogsDestination_iamRoleArn,
cloudWatchLogsDestination_logGroupArn,
ConfigurationSetFilter (..),
newConfigurationSetFilter,
configurationSetFilter_name,
configurationSetFilter_values,
ConfigurationSetInformation (..),
newConfigurationSetInformation,
configurationSetInformation_defaultMessageType,
configurationSetInformation_defaultSenderId,
configurationSetInformation_configurationSetArn,
configurationSetInformation_configurationSetName,
configurationSetInformation_eventDestinations,
configurationSetInformation_createdTimestamp,
EventDestination (..),
newEventDestination,
eventDestination_cloudWatchLogsDestination,
eventDestination_kinesisFirehoseDestination,
eventDestination_snsDestination,
eventDestination_eventDestinationName,
eventDestination_enabled,
eventDestination_matchingEventTypes,
KeywordFilter (..),
newKeywordFilter,
keywordFilter_name,
keywordFilter_values,
KeywordInformation (..),
newKeywordInformation,
keywordInformation_keyword,
keywordInformation_keywordMessage,
keywordInformation_keywordAction,
KinesisFirehoseDestination (..),
newKinesisFirehoseDestination,
kinesisFirehoseDestination_iamRoleArn,
kinesisFirehoseDestination_deliveryStreamArn,
OptOutListInformation (..),
newOptOutListInformation,
optOutListInformation_optOutListArn,
optOutListInformation_optOutListName,
optOutListInformation_createdTimestamp,
OptedOutFilter (..),
newOptedOutFilter,
optedOutFilter_name,
optedOutFilter_values,
OptedOutNumberInformation (..),
newOptedOutNumberInformation,
optedOutNumberInformation_optedOutNumber,
optedOutNumberInformation_optedOutTimestamp,
optedOutNumberInformation_endUserOptedOut,
OriginationIdentityMetadata (..),
newOriginationIdentityMetadata,
originationIdentityMetadata_originationIdentityArn,
originationIdentityMetadata_originationIdentity,
originationIdentityMetadata_isoCountryCode,
originationIdentityMetadata_numberCapabilities,
PhoneNumberFilter (..),
newPhoneNumberFilter,
phoneNumberFilter_name,
phoneNumberFilter_values,
PhoneNumberInformation (..),
newPhoneNumberInformation,
phoneNumberInformation_phoneNumberId,
phoneNumberInformation_poolId,
phoneNumberInformation_twoWayChannelArn,
phoneNumberInformation_phoneNumberArn,
phoneNumberInformation_phoneNumber,
phoneNumberInformation_status,
phoneNumberInformation_isoCountryCode,
phoneNumberInformation_messageType,
phoneNumberInformation_numberCapabilities,
phoneNumberInformation_numberType,
phoneNumberInformation_monthlyLeasingPrice,
phoneNumberInformation_twoWayEnabled,
phoneNumberInformation_selfManagedOptOutsEnabled,
phoneNumberInformation_optOutListName,
phoneNumberInformation_deletionProtectionEnabled,
phoneNumberInformation_createdTimestamp,
PoolFilter (..),
newPoolFilter,
poolFilter_name,
poolFilter_values,
PoolInformation (..),
newPoolInformation,
poolInformation_twoWayChannelArn,
poolInformation_poolArn,
poolInformation_poolId,
poolInformation_status,
poolInformation_messageType,
poolInformation_twoWayEnabled,
poolInformation_selfManagedOptOutsEnabled,
poolInformation_optOutListName,
poolInformation_sharedRoutesEnabled,
poolInformation_deletionProtectionEnabled,
poolInformation_createdTimestamp,
PoolOriginationIdentitiesFilter (..),
newPoolOriginationIdentitiesFilter,
poolOriginationIdentitiesFilter_name,
poolOriginationIdentitiesFilter_values,
SenderIdAndCountry (..),
newSenderIdAndCountry,
senderIdAndCountry_senderId,
senderIdAndCountry_isoCountryCode,
SenderIdFilter (..),
newSenderIdFilter,
senderIdFilter_name,
senderIdFilter_values,
SenderIdInformation (..),
newSenderIdInformation,
senderIdInformation_senderIdArn,
senderIdInformation_senderId,
senderIdInformation_isoCountryCode,
senderIdInformation_messageTypes,
senderIdInformation_monthlyLeasingPrice,
SnsDestination (..),
newSnsDestination,
snsDestination_topicArn,
SpendLimit (..),
newSpendLimit,
spendLimit_name,
spendLimit_enforcedLimit,
spendLimit_maxLimit,
spendLimit_overridden,
Tag (..),
newTag,
tag_key,
tag_value,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import Amazonka.PinpointSmsVoiceV2.Types.AccountAttribute
import Amazonka.PinpointSmsVoiceV2.Types.AccountAttributeName
import Amazonka.PinpointSmsVoiceV2.Types.AccountLimit
import Amazonka.PinpointSmsVoiceV2.Types.AccountLimitName
import Amazonka.PinpointSmsVoiceV2.Types.CloudWatchLogsDestination
import Amazonka.PinpointSmsVoiceV2.Types.ConfigurationSetFilter
import Amazonka.PinpointSmsVoiceV2.Types.ConfigurationSetFilterName
import Amazonka.PinpointSmsVoiceV2.Types.ConfigurationSetInformation
import Amazonka.PinpointSmsVoiceV2.Types.DestinationCountryParameterKey
import Amazonka.PinpointSmsVoiceV2.Types.EventDestination
import Amazonka.PinpointSmsVoiceV2.Types.EventType
import Amazonka.PinpointSmsVoiceV2.Types.KeywordAction
import Amazonka.PinpointSmsVoiceV2.Types.KeywordFilter
import Amazonka.PinpointSmsVoiceV2.Types.KeywordFilterName
import Amazonka.PinpointSmsVoiceV2.Types.KeywordInformation
import Amazonka.PinpointSmsVoiceV2.Types.KinesisFirehoseDestination
import Amazonka.PinpointSmsVoiceV2.Types.MessageType
import Amazonka.PinpointSmsVoiceV2.Types.NumberCapability
import Amazonka.PinpointSmsVoiceV2.Types.NumberStatus
import Amazonka.PinpointSmsVoiceV2.Types.NumberType
import Amazonka.PinpointSmsVoiceV2.Types.OptOutListInformation
import Amazonka.PinpointSmsVoiceV2.Types.OptedOutFilter
import Amazonka.PinpointSmsVoiceV2.Types.OptedOutFilterName
import Amazonka.PinpointSmsVoiceV2.Types.OptedOutNumberInformation
import Amazonka.PinpointSmsVoiceV2.Types.OriginationIdentityMetadata
import Amazonka.PinpointSmsVoiceV2.Types.PhoneNumberFilter
import Amazonka.PinpointSmsVoiceV2.Types.PhoneNumberFilterName
import Amazonka.PinpointSmsVoiceV2.Types.PhoneNumberInformation
import Amazonka.PinpointSmsVoiceV2.Types.PoolFilter
import Amazonka.PinpointSmsVoiceV2.Types.PoolFilterName
import Amazonka.PinpointSmsVoiceV2.Types.PoolInformation
import Amazonka.PinpointSmsVoiceV2.Types.PoolOriginationIdentitiesFilter
import Amazonka.PinpointSmsVoiceV2.Types.PoolOriginationIdentitiesFilterName
import Amazonka.PinpointSmsVoiceV2.Types.PoolStatus
import Amazonka.PinpointSmsVoiceV2.Types.RequestableNumberType
import Amazonka.PinpointSmsVoiceV2.Types.SenderIdAndCountry
import Amazonka.PinpointSmsVoiceV2.Types.SenderIdFilter
import Amazonka.PinpointSmsVoiceV2.Types.SenderIdFilterName
import Amazonka.PinpointSmsVoiceV2.Types.SenderIdInformation
import Amazonka.PinpointSmsVoiceV2.Types.SnsDestination
import Amazonka.PinpointSmsVoiceV2.Types.SpendLimit
import Amazonka.PinpointSmsVoiceV2.Types.SpendLimitName
import Amazonka.PinpointSmsVoiceV2.Types.Tag
import Amazonka.PinpointSmsVoiceV2.Types.VoiceId
import Amazonka.PinpointSmsVoiceV2.Types.VoiceMessageBodyTextType
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Sign.V4 as Sign
defaultService :: Core.Service
defaultService :: Service
defaultService =
Core.Service
{ $sel:abbrev:Service :: Abbrev
Core.abbrev = Abbrev
"PinpointSmsVoiceV2",
$sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
$sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"sms-voice",
$sel:signingName:Service :: ByteString
Core.signingName = ByteString
"sms-voice",
$sel:version:Service :: ByteString
Core.version = ByteString
"2022-03-31",
$sel:s3AddressingStyle:Service :: S3AddressingStyle
Core.s3AddressingStyle = S3AddressingStyle
Core.S3AddressingStyleAuto,
$sel:endpoint:Service :: Region -> Endpoint
Core.endpoint = Service -> Region -> Endpoint
Core.defaultEndpoint Service
defaultService,
$sel:timeout:Service :: Maybe Seconds
Core.timeout = forall a. a -> Maybe a
Prelude.Just Seconds
70,
$sel:check:Service :: Status -> Bool
Core.check = Status -> Bool
Core.statusSuccess,
$sel:error:Service :: Status -> [Header] -> ByteStringLazy -> Error
Core.error =
Abbrev -> Status -> [Header] -> ByteStringLazy -> Error
Core.parseJSONError Abbrev
"PinpointSmsVoiceV2",
$sel:retry:Service :: Retry
Core.retry = Retry
retry
}
where
retry :: Retry
retry =
Core.Exponential
{ $sel:base:Exponential :: Double
Core.base = Double
5.0e-2,
$sel:growth:Exponential :: Int
Core.growth = Int
2,
$sel:attempts:Exponential :: Int
Core.attempts = Int
5,
$sel:check:Exponential :: ServiceError -> Maybe Text
Core.check = forall {a}. IsString a => ServiceError -> Maybe a
check
}
check :: ServiceError -> Maybe a
check ServiceError
e
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
502) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"bad_gateway"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
504) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"gateway_timeout"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
500) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"general_server_error"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
509) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"limit_exceeded"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"RequestThrottledException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"request_throttled_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
503) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"service_unavailable"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottledException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttled_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"Throttling"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttling"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottlingException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttling_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode
ErrorCode
"ProvisionedThroughputExceededException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throughput_exceeded"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
429) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"too_many_requests"
| Bool
Prelude.otherwise = forall a. Maybe a
Prelude.Nothing
_AccessDeniedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_AccessDeniedException :: forall a. AsError a => Fold a ServiceError
_AccessDeniedException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"AccessDeniedException"
_ConflictException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ConflictException :: forall a. AsError a => Fold a ServiceError
_ConflictException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ConflictException"
_InternalServerException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InternalServerException :: forall a. AsError a => Fold a ServiceError
_InternalServerException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InternalServerException"
_ResourceNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ResourceNotFoundException :: forall a. AsError a => Fold a ServiceError
_ResourceNotFoundException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ResourceNotFoundException"
_ServiceQuotaExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ServiceQuotaExceededException :: forall a. AsError a => Fold a ServiceError
_ServiceQuotaExceededException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ServiceQuotaExceededException"
_ThrottlingException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ThrottlingException :: forall a. AsError a => Fold a ServiceError
_ThrottlingException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ThrottlingException"
_ValidationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ValidationException :: forall a. AsError a => Fold a ServiceError
_ValidationException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ValidationException"