{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Route53Domains.RegisterDomain
(
RegisterDomain (..),
newRegisterDomain,
registerDomain_privacyProtectTechContact,
registerDomain_privacyProtectRegistrantContact,
registerDomain_autoRenew,
registerDomain_privacyProtectAdminContact,
registerDomain_idnLangCode,
registerDomain_domainName,
registerDomain_durationInYears,
registerDomain_adminContact,
registerDomain_registrantContact,
registerDomain_techContact,
RegisterDomainResponse (..),
newRegisterDomainResponse,
registerDomainResponse_httpStatus,
registerDomainResponse_operationId,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.Route53Domains.Types
data RegisterDomain = RegisterDomain'
{
RegisterDomain -> Maybe Bool
privacyProtectTechContact :: Prelude.Maybe Prelude.Bool,
RegisterDomain -> Maybe Bool
privacyProtectRegistrantContact :: Prelude.Maybe Prelude.Bool,
RegisterDomain -> Maybe Bool
autoRenew :: Prelude.Maybe Prelude.Bool,
RegisterDomain -> Maybe Bool
privacyProtectAdminContact :: Prelude.Maybe Prelude.Bool,
RegisterDomain -> Maybe Text
idnLangCode :: Prelude.Maybe Prelude.Text,
RegisterDomain -> Text
domainName :: Prelude.Text,
RegisterDomain -> Natural
durationInYears :: Prelude.Natural,
RegisterDomain -> Sensitive ContactDetail
adminContact :: Core.Sensitive ContactDetail,
RegisterDomain -> Sensitive ContactDetail
registrantContact :: Core.Sensitive ContactDetail,
RegisterDomain -> Sensitive ContactDetail
techContact :: Core.Sensitive ContactDetail
}
deriving (RegisterDomain -> RegisterDomain -> Bool
(RegisterDomain -> RegisterDomain -> Bool)
-> (RegisterDomain -> RegisterDomain -> Bool) -> Eq RegisterDomain
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RegisterDomain -> RegisterDomain -> Bool
$c/= :: RegisterDomain -> RegisterDomain -> Bool
== :: RegisterDomain -> RegisterDomain -> Bool
$c== :: RegisterDomain -> RegisterDomain -> Bool
Prelude.Eq, Int -> RegisterDomain -> ShowS
[RegisterDomain] -> ShowS
RegisterDomain -> String
(Int -> RegisterDomain -> ShowS)
-> (RegisterDomain -> String)
-> ([RegisterDomain] -> ShowS)
-> Show RegisterDomain
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RegisterDomain] -> ShowS
$cshowList :: [RegisterDomain] -> ShowS
show :: RegisterDomain -> String
$cshow :: RegisterDomain -> String
showsPrec :: Int -> RegisterDomain -> ShowS
$cshowsPrec :: Int -> RegisterDomain -> ShowS
Prelude.Show, (forall x. RegisterDomain -> Rep RegisterDomain x)
-> (forall x. Rep RegisterDomain x -> RegisterDomain)
-> Generic RegisterDomain
forall x. Rep RegisterDomain x -> RegisterDomain
forall x. RegisterDomain -> Rep RegisterDomain x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RegisterDomain x -> RegisterDomain
$cfrom :: forall x. RegisterDomain -> Rep RegisterDomain x
Prelude.Generic)
newRegisterDomain ::
Prelude.Text ->
Prelude.Natural ->
ContactDetail ->
ContactDetail ->
ContactDetail ->
RegisterDomain
newRegisterDomain :: Text
-> Natural
-> ContactDetail
-> ContactDetail
-> ContactDetail
-> RegisterDomain
newRegisterDomain
Text
pDomainName_
Natural
pDurationInYears_
ContactDetail
pAdminContact_
ContactDetail
pRegistrantContact_
ContactDetail
pTechContact_ =
RegisterDomain' :: Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Text
-> Natural
-> Sensitive ContactDetail
-> Sensitive ContactDetail
-> Sensitive ContactDetail
-> RegisterDomain
RegisterDomain'
{ $sel:privacyProtectTechContact:RegisterDomain' :: Maybe Bool
privacyProtectTechContact =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:privacyProtectRegistrantContact:RegisterDomain' :: Maybe Bool
privacyProtectRegistrantContact = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:autoRenew:RegisterDomain' :: Maybe Bool
autoRenew = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:privacyProtectAdminContact:RegisterDomain' :: Maybe Bool
privacyProtectAdminContact = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:idnLangCode:RegisterDomain' :: Maybe Text
idnLangCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:domainName:RegisterDomain' :: Text
domainName = Text
pDomainName_,
$sel:durationInYears:RegisterDomain' :: Natural
durationInYears = Natural
pDurationInYears_,
$sel:adminContact:RegisterDomain' :: Sensitive ContactDetail
adminContact = Tagged ContactDetail (Identity ContactDetail)
-> Tagged
(Sensitive ContactDetail) (Identity (Sensitive ContactDetail))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Tagged ContactDetail (Identity ContactDetail)
-> Tagged
(Sensitive ContactDetail) (Identity (Sensitive ContactDetail)))
-> ContactDetail -> Sensitive ContactDetail
forall t b. AReview t b -> b -> t
Lens.# ContactDetail
pAdminContact_,
$sel:registrantContact:RegisterDomain' :: Sensitive ContactDetail
registrantContact =
Tagged ContactDetail (Identity ContactDetail)
-> Tagged
(Sensitive ContactDetail) (Identity (Sensitive ContactDetail))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Tagged ContactDetail (Identity ContactDetail)
-> Tagged
(Sensitive ContactDetail) (Identity (Sensitive ContactDetail)))
-> ContactDetail -> Sensitive ContactDetail
forall t b. AReview t b -> b -> t
Lens.# ContactDetail
pRegistrantContact_,
$sel:techContact:RegisterDomain' :: Sensitive ContactDetail
techContact = Tagged ContactDetail (Identity ContactDetail)
-> Tagged
(Sensitive ContactDetail) (Identity (Sensitive ContactDetail))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Tagged ContactDetail (Identity ContactDetail)
-> Tagged
(Sensitive ContactDetail) (Identity (Sensitive ContactDetail)))
-> ContactDetail -> Sensitive ContactDetail
forall t b. AReview t b -> b -> t
Lens.# ContactDetail
pTechContact_
}
registerDomain_privacyProtectTechContact :: Lens.Lens' RegisterDomain (Prelude.Maybe Prelude.Bool)
registerDomain_privacyProtectTechContact :: (Maybe Bool -> f (Maybe Bool))
-> RegisterDomain -> f RegisterDomain
registerDomain_privacyProtectTechContact = (RegisterDomain -> Maybe Bool)
-> (RegisterDomain -> Maybe Bool -> RegisterDomain)
-> Lens RegisterDomain RegisterDomain (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterDomain' {Maybe Bool
privacyProtectTechContact :: Maybe Bool
$sel:privacyProtectTechContact:RegisterDomain' :: RegisterDomain -> Maybe Bool
privacyProtectTechContact} -> Maybe Bool
privacyProtectTechContact) (\s :: RegisterDomain
s@RegisterDomain' {} Maybe Bool
a -> RegisterDomain
s {$sel:privacyProtectTechContact:RegisterDomain' :: Maybe Bool
privacyProtectTechContact = Maybe Bool
a} :: RegisterDomain)
registerDomain_privacyProtectRegistrantContact :: Lens.Lens' RegisterDomain (Prelude.Maybe Prelude.Bool)
registerDomain_privacyProtectRegistrantContact :: (Maybe Bool -> f (Maybe Bool))
-> RegisterDomain -> f RegisterDomain
registerDomain_privacyProtectRegistrantContact = (RegisterDomain -> Maybe Bool)
-> (RegisterDomain -> Maybe Bool -> RegisterDomain)
-> Lens RegisterDomain RegisterDomain (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterDomain' {Maybe Bool
privacyProtectRegistrantContact :: Maybe Bool
$sel:privacyProtectRegistrantContact:RegisterDomain' :: RegisterDomain -> Maybe Bool
privacyProtectRegistrantContact} -> Maybe Bool
privacyProtectRegistrantContact) (\s :: RegisterDomain
s@RegisterDomain' {} Maybe Bool
a -> RegisterDomain
s {$sel:privacyProtectRegistrantContact:RegisterDomain' :: Maybe Bool
privacyProtectRegistrantContact = Maybe Bool
a} :: RegisterDomain)
registerDomain_autoRenew :: Lens.Lens' RegisterDomain (Prelude.Maybe Prelude.Bool)
registerDomain_autoRenew :: (Maybe Bool -> f (Maybe Bool))
-> RegisterDomain -> f RegisterDomain
registerDomain_autoRenew = (RegisterDomain -> Maybe Bool)
-> (RegisterDomain -> Maybe Bool -> RegisterDomain)
-> Lens RegisterDomain RegisterDomain (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterDomain' {Maybe Bool
autoRenew :: Maybe Bool
$sel:autoRenew:RegisterDomain' :: RegisterDomain -> Maybe Bool
autoRenew} -> Maybe Bool
autoRenew) (\s :: RegisterDomain
s@RegisterDomain' {} Maybe Bool
a -> RegisterDomain
s {$sel:autoRenew:RegisterDomain' :: Maybe Bool
autoRenew = Maybe Bool
a} :: RegisterDomain)
registerDomain_privacyProtectAdminContact :: Lens.Lens' RegisterDomain (Prelude.Maybe Prelude.Bool)
registerDomain_privacyProtectAdminContact :: (Maybe Bool -> f (Maybe Bool))
-> RegisterDomain -> f RegisterDomain
registerDomain_privacyProtectAdminContact = (RegisterDomain -> Maybe Bool)
-> (RegisterDomain -> Maybe Bool -> RegisterDomain)
-> Lens RegisterDomain RegisterDomain (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterDomain' {Maybe Bool
privacyProtectAdminContact :: Maybe Bool
$sel:privacyProtectAdminContact:RegisterDomain' :: RegisterDomain -> Maybe Bool
privacyProtectAdminContact} -> Maybe Bool
privacyProtectAdminContact) (\s :: RegisterDomain
s@RegisterDomain' {} Maybe Bool
a -> RegisterDomain
s {$sel:privacyProtectAdminContact:RegisterDomain' :: Maybe Bool
privacyProtectAdminContact = Maybe Bool
a} :: RegisterDomain)
registerDomain_idnLangCode :: Lens.Lens' RegisterDomain (Prelude.Maybe Prelude.Text)
registerDomain_idnLangCode :: (Maybe Text -> f (Maybe Text))
-> RegisterDomain -> f RegisterDomain
registerDomain_idnLangCode = (RegisterDomain -> Maybe Text)
-> (RegisterDomain -> Maybe Text -> RegisterDomain)
-> Lens RegisterDomain RegisterDomain (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterDomain' {Maybe Text
idnLangCode :: Maybe Text
$sel:idnLangCode:RegisterDomain' :: RegisterDomain -> Maybe Text
idnLangCode} -> Maybe Text
idnLangCode) (\s :: RegisterDomain
s@RegisterDomain' {} Maybe Text
a -> RegisterDomain
s {$sel:idnLangCode:RegisterDomain' :: Maybe Text
idnLangCode = Maybe Text
a} :: RegisterDomain)
registerDomain_domainName :: Lens.Lens' RegisterDomain Prelude.Text
registerDomain_domainName :: (Text -> f Text) -> RegisterDomain -> f RegisterDomain
registerDomain_domainName = (RegisterDomain -> Text)
-> (RegisterDomain -> Text -> RegisterDomain)
-> Lens RegisterDomain RegisterDomain Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterDomain' {Text
domainName :: Text
$sel:domainName:RegisterDomain' :: RegisterDomain -> Text
domainName} -> Text
domainName) (\s :: RegisterDomain
s@RegisterDomain' {} Text
a -> RegisterDomain
s {$sel:domainName:RegisterDomain' :: Text
domainName = Text
a} :: RegisterDomain)
registerDomain_durationInYears :: Lens.Lens' RegisterDomain Prelude.Natural
registerDomain_durationInYears :: (Natural -> f Natural) -> RegisterDomain -> f RegisterDomain
registerDomain_durationInYears = (RegisterDomain -> Natural)
-> (RegisterDomain -> Natural -> RegisterDomain)
-> Lens RegisterDomain RegisterDomain Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterDomain' {Natural
durationInYears :: Natural
$sel:durationInYears:RegisterDomain' :: RegisterDomain -> Natural
durationInYears} -> Natural
durationInYears) (\s :: RegisterDomain
s@RegisterDomain' {} Natural
a -> RegisterDomain
s {$sel:durationInYears:RegisterDomain' :: Natural
durationInYears = Natural
a} :: RegisterDomain)
registerDomain_adminContact :: Lens.Lens' RegisterDomain ContactDetail
registerDomain_adminContact :: (ContactDetail -> f ContactDetail)
-> RegisterDomain -> f RegisterDomain
registerDomain_adminContact = (RegisterDomain -> Sensitive ContactDetail)
-> (RegisterDomain -> Sensitive ContactDetail -> RegisterDomain)
-> Lens
RegisterDomain
RegisterDomain
(Sensitive ContactDetail)
(Sensitive ContactDetail)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterDomain' {Sensitive ContactDetail
adminContact :: Sensitive ContactDetail
$sel:adminContact:RegisterDomain' :: RegisterDomain -> Sensitive ContactDetail
adminContact} -> Sensitive ContactDetail
adminContact) (\s :: RegisterDomain
s@RegisterDomain' {} Sensitive ContactDetail
a -> RegisterDomain
s {$sel:adminContact:RegisterDomain' :: Sensitive ContactDetail
adminContact = Sensitive ContactDetail
a} :: RegisterDomain) ((Sensitive ContactDetail -> f (Sensitive ContactDetail))
-> RegisterDomain -> f RegisterDomain)
-> ((ContactDetail -> f ContactDetail)
-> Sensitive ContactDetail -> f (Sensitive ContactDetail))
-> (ContactDetail -> f ContactDetail)
-> RegisterDomain
-> f RegisterDomain
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ContactDetail -> f ContactDetail)
-> Sensitive ContactDetail -> f (Sensitive ContactDetail)
forall a. Iso' (Sensitive a) a
Core._Sensitive
registerDomain_registrantContact :: Lens.Lens' RegisterDomain ContactDetail
registerDomain_registrantContact :: (ContactDetail -> f ContactDetail)
-> RegisterDomain -> f RegisterDomain
registerDomain_registrantContact = (RegisterDomain -> Sensitive ContactDetail)
-> (RegisterDomain -> Sensitive ContactDetail -> RegisterDomain)
-> Lens
RegisterDomain
RegisterDomain
(Sensitive ContactDetail)
(Sensitive ContactDetail)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterDomain' {Sensitive ContactDetail
registrantContact :: Sensitive ContactDetail
$sel:registrantContact:RegisterDomain' :: RegisterDomain -> Sensitive ContactDetail
registrantContact} -> Sensitive ContactDetail
registrantContact) (\s :: RegisterDomain
s@RegisterDomain' {} Sensitive ContactDetail
a -> RegisterDomain
s {$sel:registrantContact:RegisterDomain' :: Sensitive ContactDetail
registrantContact = Sensitive ContactDetail
a} :: RegisterDomain) ((Sensitive ContactDetail -> f (Sensitive ContactDetail))
-> RegisterDomain -> f RegisterDomain)
-> ((ContactDetail -> f ContactDetail)
-> Sensitive ContactDetail -> f (Sensitive ContactDetail))
-> (ContactDetail -> f ContactDetail)
-> RegisterDomain
-> f RegisterDomain
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ContactDetail -> f ContactDetail)
-> Sensitive ContactDetail -> f (Sensitive ContactDetail)
forall a. Iso' (Sensitive a) a
Core._Sensitive
registerDomain_techContact :: Lens.Lens' RegisterDomain ContactDetail
registerDomain_techContact :: (ContactDetail -> f ContactDetail)
-> RegisterDomain -> f RegisterDomain
registerDomain_techContact = (RegisterDomain -> Sensitive ContactDetail)
-> (RegisterDomain -> Sensitive ContactDetail -> RegisterDomain)
-> Lens
RegisterDomain
RegisterDomain
(Sensitive ContactDetail)
(Sensitive ContactDetail)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterDomain' {Sensitive ContactDetail
techContact :: Sensitive ContactDetail
$sel:techContact:RegisterDomain' :: RegisterDomain -> Sensitive ContactDetail
techContact} -> Sensitive ContactDetail
techContact) (\s :: RegisterDomain
s@RegisterDomain' {} Sensitive ContactDetail
a -> RegisterDomain
s {$sel:techContact:RegisterDomain' :: Sensitive ContactDetail
techContact = Sensitive ContactDetail
a} :: RegisterDomain) ((Sensitive ContactDetail -> f (Sensitive ContactDetail))
-> RegisterDomain -> f RegisterDomain)
-> ((ContactDetail -> f ContactDetail)
-> Sensitive ContactDetail -> f (Sensitive ContactDetail))
-> (ContactDetail -> f ContactDetail)
-> RegisterDomain
-> f RegisterDomain
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ContactDetail -> f ContactDetail)
-> Sensitive ContactDetail -> f (Sensitive ContactDetail)
forall a. Iso' (Sensitive a) a
Core._Sensitive
instance Core.AWSRequest RegisterDomain where
type
AWSResponse RegisterDomain =
RegisterDomainResponse
request :: RegisterDomain -> Request RegisterDomain
request = Service -> RegisterDomain -> Request RegisterDomain
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy RegisterDomain
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse RegisterDomain)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse RegisterDomain))
-> Logger
-> Service
-> Proxy RegisterDomain
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse RegisterDomain)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Int -> Text -> RegisterDomainResponse
RegisterDomainResponse'
(Int -> Text -> RegisterDomainResponse)
-> Either String Int
-> Either String (Text -> RegisterDomainResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
Either String (Text -> RegisterDomainResponse)
-> Either String Text -> Either String RegisterDomainResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"OperationId")
)
instance Prelude.Hashable RegisterDomain
instance Prelude.NFData RegisterDomain
instance Core.ToHeaders RegisterDomain where
toHeaders :: RegisterDomain -> ResponseHeaders
toHeaders =
ResponseHeaders -> RegisterDomain -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"Route53Domains_v20140515.RegisterDomain" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON RegisterDomain where
toJSON :: RegisterDomain -> Value
toJSON RegisterDomain' {Natural
Maybe Bool
Maybe Text
Text
Sensitive ContactDetail
techContact :: Sensitive ContactDetail
registrantContact :: Sensitive ContactDetail
adminContact :: Sensitive ContactDetail
durationInYears :: Natural
domainName :: Text
idnLangCode :: Maybe Text
privacyProtectAdminContact :: Maybe Bool
autoRenew :: Maybe Bool
privacyProtectRegistrantContact :: Maybe Bool
privacyProtectTechContact :: Maybe Bool
$sel:techContact:RegisterDomain' :: RegisterDomain -> Sensitive ContactDetail
$sel:registrantContact:RegisterDomain' :: RegisterDomain -> Sensitive ContactDetail
$sel:adminContact:RegisterDomain' :: RegisterDomain -> Sensitive ContactDetail
$sel:durationInYears:RegisterDomain' :: RegisterDomain -> Natural
$sel:domainName:RegisterDomain' :: RegisterDomain -> Text
$sel:idnLangCode:RegisterDomain' :: RegisterDomain -> Maybe Text
$sel:privacyProtectAdminContact:RegisterDomain' :: RegisterDomain -> Maybe Bool
$sel:autoRenew:RegisterDomain' :: RegisterDomain -> Maybe Bool
$sel:privacyProtectRegistrantContact:RegisterDomain' :: RegisterDomain -> Maybe Bool
$sel:privacyProtectTechContact:RegisterDomain' :: RegisterDomain -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"PrivacyProtectTechContact" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
privacyProtectTechContact,
(Text
"PrivacyProtectRegistrantContact" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
privacyProtectRegistrantContact,
(Text
"AutoRenew" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
autoRenew,
(Text
"PrivacyProtectAdminContact" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
privacyProtectAdminContact,
(Text
"IdnLangCode" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
idnLangCode,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"DomainName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
domainName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"DurationInYears" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Natural
durationInYears),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"AdminContact" Text -> Sensitive ContactDetail -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Sensitive ContactDetail
adminContact),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"RegistrantContact" Text -> Sensitive ContactDetail -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Sensitive ContactDetail
registrantContact),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"TechContact" Text -> Sensitive ContactDetail -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Sensitive ContactDetail
techContact)
]
)
instance Core.ToPath RegisterDomain where
toPath :: RegisterDomain -> ByteString
toPath = ByteString -> RegisterDomain -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery RegisterDomain where
toQuery :: RegisterDomain -> QueryString
toQuery = QueryString -> RegisterDomain -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data RegisterDomainResponse = RegisterDomainResponse'
{
RegisterDomainResponse -> Int
httpStatus :: Prelude.Int,
RegisterDomainResponse -> Text
operationId :: Prelude.Text
}
deriving (RegisterDomainResponse -> RegisterDomainResponse -> Bool
(RegisterDomainResponse -> RegisterDomainResponse -> Bool)
-> (RegisterDomainResponse -> RegisterDomainResponse -> Bool)
-> Eq RegisterDomainResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RegisterDomainResponse -> RegisterDomainResponse -> Bool
$c/= :: RegisterDomainResponse -> RegisterDomainResponse -> Bool
== :: RegisterDomainResponse -> RegisterDomainResponse -> Bool
$c== :: RegisterDomainResponse -> RegisterDomainResponse -> Bool
Prelude.Eq, ReadPrec [RegisterDomainResponse]
ReadPrec RegisterDomainResponse
Int -> ReadS RegisterDomainResponse
ReadS [RegisterDomainResponse]
(Int -> ReadS RegisterDomainResponse)
-> ReadS [RegisterDomainResponse]
-> ReadPrec RegisterDomainResponse
-> ReadPrec [RegisterDomainResponse]
-> Read RegisterDomainResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RegisterDomainResponse]
$creadListPrec :: ReadPrec [RegisterDomainResponse]
readPrec :: ReadPrec RegisterDomainResponse
$creadPrec :: ReadPrec RegisterDomainResponse
readList :: ReadS [RegisterDomainResponse]
$creadList :: ReadS [RegisterDomainResponse]
readsPrec :: Int -> ReadS RegisterDomainResponse
$creadsPrec :: Int -> ReadS RegisterDomainResponse
Prelude.Read, Int -> RegisterDomainResponse -> ShowS
[RegisterDomainResponse] -> ShowS
RegisterDomainResponse -> String
(Int -> RegisterDomainResponse -> ShowS)
-> (RegisterDomainResponse -> String)
-> ([RegisterDomainResponse] -> ShowS)
-> Show RegisterDomainResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RegisterDomainResponse] -> ShowS
$cshowList :: [RegisterDomainResponse] -> ShowS
show :: RegisterDomainResponse -> String
$cshow :: RegisterDomainResponse -> String
showsPrec :: Int -> RegisterDomainResponse -> ShowS
$cshowsPrec :: Int -> RegisterDomainResponse -> ShowS
Prelude.Show, (forall x. RegisterDomainResponse -> Rep RegisterDomainResponse x)
-> (forall x.
Rep RegisterDomainResponse x -> RegisterDomainResponse)
-> Generic RegisterDomainResponse
forall x. Rep RegisterDomainResponse x -> RegisterDomainResponse
forall x. RegisterDomainResponse -> Rep RegisterDomainResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RegisterDomainResponse x -> RegisterDomainResponse
$cfrom :: forall x. RegisterDomainResponse -> Rep RegisterDomainResponse x
Prelude.Generic)
newRegisterDomainResponse ::
Prelude.Int ->
Prelude.Text ->
RegisterDomainResponse
newRegisterDomainResponse :: Int -> Text -> RegisterDomainResponse
newRegisterDomainResponse Int
pHttpStatus_ Text
pOperationId_ =
RegisterDomainResponse' :: Int -> Text -> RegisterDomainResponse
RegisterDomainResponse'
{ $sel:httpStatus:RegisterDomainResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:operationId:RegisterDomainResponse' :: Text
operationId = Text
pOperationId_
}
registerDomainResponse_httpStatus :: Lens.Lens' RegisterDomainResponse Prelude.Int
registerDomainResponse_httpStatus :: (Int -> f Int)
-> RegisterDomainResponse -> f RegisterDomainResponse
registerDomainResponse_httpStatus = (RegisterDomainResponse -> Int)
-> (RegisterDomainResponse -> Int -> RegisterDomainResponse)
-> Lens RegisterDomainResponse RegisterDomainResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterDomainResponse' {Int
httpStatus :: Int
$sel:httpStatus:RegisterDomainResponse' :: RegisterDomainResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: RegisterDomainResponse
s@RegisterDomainResponse' {} Int
a -> RegisterDomainResponse
s {$sel:httpStatus:RegisterDomainResponse' :: Int
httpStatus = Int
a} :: RegisterDomainResponse)
registerDomainResponse_operationId :: Lens.Lens' RegisterDomainResponse Prelude.Text
registerDomainResponse_operationId :: (Text -> f Text)
-> RegisterDomainResponse -> f RegisterDomainResponse
registerDomainResponse_operationId = (RegisterDomainResponse -> Text)
-> (RegisterDomainResponse -> Text -> RegisterDomainResponse)
-> Lens RegisterDomainResponse RegisterDomainResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterDomainResponse' {Text
operationId :: Text
$sel:operationId:RegisterDomainResponse' :: RegisterDomainResponse -> Text
operationId} -> Text
operationId) (\s :: RegisterDomainResponse
s@RegisterDomainResponse' {} Text
a -> RegisterDomainResponse
s {$sel:operationId:RegisterDomainResponse' :: Text
operationId = Text
a} :: RegisterDomainResponse)
instance Prelude.NFData RegisterDomainResponse