{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Route53Domains.Types
(
defaultService,
_InvalidInput,
_OperationLimitExceeded,
_DomainLimitExceeded,
_UnsupportedTLD,
_TLDRulesViolation,
_DuplicateRequest,
ContactType (..),
CountryCode (..),
DomainAvailability (..),
ExtraParamName (..),
OperationStatus (..),
OperationType (..),
ReachabilityStatus (..),
Transferable (..),
BillingRecord (..),
newBillingRecord,
billingRecord_operation,
billingRecord_invoiceId,
billingRecord_domainName,
billingRecord_billDate,
billingRecord_price,
ContactDetail (..),
newContactDetail,
contactDetail_organizationName,
contactDetail_email,
contactDetail_state,
contactDetail_fax,
contactDetail_lastName,
contactDetail_extraParams,
contactDetail_zipCode,
contactDetail_addressLine1,
contactDetail_city,
contactDetail_phoneNumber,
contactDetail_addressLine2,
contactDetail_firstName,
contactDetail_countryCode,
contactDetail_contactType,
DomainSuggestion (..),
newDomainSuggestion,
domainSuggestion_availability,
domainSuggestion_domainName,
DomainSummary (..),
newDomainSummary,
domainSummary_expiry,
domainSummary_transferLock,
domainSummary_autoRenew,
domainSummary_domainName,
DomainTransferability (..),
newDomainTransferability,
domainTransferability_transferable,
ExtraParam (..),
newExtraParam,
extraParam_name,
extraParam_value,
Nameserver (..),
newNameserver,
nameserver_glueIps,
nameserver_name,
OperationSummary (..),
newOperationSummary,
operationSummary_operationId,
operationSummary_status,
operationSummary_type,
operationSummary_submittedDate,
Tag (..),
newTag,
tag_value,
tag_key,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Route53Domains.Types.BillingRecord
import Amazonka.Route53Domains.Types.ContactDetail
import Amazonka.Route53Domains.Types.ContactType
import Amazonka.Route53Domains.Types.CountryCode
import Amazonka.Route53Domains.Types.DomainAvailability
import Amazonka.Route53Domains.Types.DomainSuggestion
import Amazonka.Route53Domains.Types.DomainSummary
import Amazonka.Route53Domains.Types.DomainTransferability
import Amazonka.Route53Domains.Types.ExtraParam
import Amazonka.Route53Domains.Types.ExtraParamName
import Amazonka.Route53Domains.Types.Nameserver
import Amazonka.Route53Domains.Types.OperationStatus
import Amazonka.Route53Domains.Types.OperationSummary
import Amazonka.Route53Domains.Types.OperationType
import Amazonka.Route53Domains.Types.ReachabilityStatus
import Amazonka.Route53Domains.Types.Tag
import Amazonka.Route53Domains.Types.Transferable
import qualified Amazonka.Sign.V4 as Sign
defaultService :: Core.Service
defaultService :: Service
defaultService =
Service :: Abbrev
-> Signer
-> ByteString
-> ByteString
-> ByteString
-> (Region -> Endpoint)
-> Maybe Seconds
-> (Status -> Bool)
-> (Status -> [Header] -> ByteStringLazy -> Error)
-> Retry
-> Service
Core.Service
{ $sel:_serviceAbbrev:Service :: Abbrev
Core._serviceAbbrev =
Abbrev
"Route53Domains",
$sel:_serviceSigner:Service :: Signer
Core._serviceSigner = Signer
Sign.v4,
$sel:_serviceEndpointPrefix:Service :: ByteString
Core._serviceEndpointPrefix = ByteString
"route53domains",
$sel:_serviceSigningName:Service :: ByteString
Core._serviceSigningName = ByteString
"route53domains",
$sel:_serviceVersion:Service :: ByteString
Core._serviceVersion = ByteString
"2014-05-15",
$sel:_serviceEndpoint:Service :: Region -> Endpoint
Core._serviceEndpoint =
Service -> Region -> Endpoint
Core.defaultEndpoint Service
defaultService,
$sel:_serviceTimeout:Service :: Maybe Seconds
Core._serviceTimeout = Seconds -> Maybe Seconds
forall a. a -> Maybe a
Prelude.Just Seconds
70,
$sel:_serviceCheck:Service :: Status -> Bool
Core._serviceCheck = Status -> Bool
Core.statusSuccess,
$sel:_serviceError:Service :: Status -> [Header] -> ByteStringLazy -> Error
Core._serviceError =
Abbrev -> Status -> [Header] -> ByteStringLazy -> Error
Core.parseJSONError Abbrev
"Route53Domains",
$sel:_serviceRetry:Service :: Retry
Core._serviceRetry = Retry
retry
}
where
retry :: Retry
retry =
Exponential :: Double -> Int -> Int -> (ServiceError -> Maybe Text) -> Retry
Core.Exponential
{ $sel:_retryBase:Exponential :: Double
Core._retryBase = Double
5.0e-2,
$sel:_retryGrowth:Exponential :: Int
Core._retryGrowth = Int
2,
$sel:_retryAttempts:Exponential :: Int
Core._retryAttempts = Int
5,
$sel:_retryCheck:Exponential :: ServiceError -> Maybe Text
Core._retryCheck = ServiceError -> Maybe Text
forall a. IsString a => ServiceError -> Maybe a
check
}
check :: ServiceError -> Maybe a
check ServiceError
e
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has
( ErrorCode -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottledException"
Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"throttled_exception"
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has (Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
429) ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"too_many_requests"
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has
( ErrorCode -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottlingException"
Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"throttling_exception"
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has
( ErrorCode -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"Throttling"
Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"throttling"
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has
( ErrorCode -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode
ErrorCode
"ProvisionedThroughputExceededException"
Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"throughput_exceeded"
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has (Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
504) ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"gateway_timeout"
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has
( ErrorCode -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"RequestThrottledException"
Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"request_throttled_exception"
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has (Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
502) ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"bad_gateway"
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has (Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
503) ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"service_unavailable"
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has (Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
500) ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"general_server_error"
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has (Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
509) ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"limit_exceeded"
| Bool
Prelude.otherwise = Maybe a
forall a. Maybe a
Prelude.Nothing
_InvalidInput :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_InvalidInput :: Getting (First ServiceError) a ServiceError
_InvalidInput =
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidInput"
_OperationLimitExceeded :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_OperationLimitExceeded :: Getting (First ServiceError) a ServiceError
_OperationLimitExceeded =
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"OperationLimitExceeded"
_DomainLimitExceeded :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_DomainLimitExceeded :: Getting (First ServiceError) a ServiceError
_DomainLimitExceeded =
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"DomainLimitExceeded"
_UnsupportedTLD :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_UnsupportedTLD :: Getting (First ServiceError) a ServiceError
_UnsupportedTLD =
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"UnsupportedTLD"
_TLDRulesViolation :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_TLDRulesViolation :: Getting (First ServiceError) a ServiceError
_TLDRulesViolation =
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"TLDRulesViolation"
_DuplicateRequest :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_DuplicateRequest :: Getting (First ServiceError) a ServiceError
_DuplicateRequest =
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"DuplicateRequest"