{-# 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.AcceptDomainTransferFromAnotherAwsAccount
(
AcceptDomainTransferFromAnotherAwsAccount (..),
newAcceptDomainTransferFromAnotherAwsAccount,
acceptDomainTransferFromAnotherAwsAccount_domainName,
acceptDomainTransferFromAnotherAwsAccount_password,
AcceptDomainTransferFromAnotherAwsAccountResponse (..),
newAcceptDomainTransferFromAnotherAwsAccountResponse,
acceptDomainTransferFromAnotherAwsAccountResponse_operationId,
acceptDomainTransferFromAnotherAwsAccountResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.Route53Domains.Types
data AcceptDomainTransferFromAnotherAwsAccount = AcceptDomainTransferFromAnotherAwsAccount'
{
AcceptDomainTransferFromAnotherAwsAccount -> Text
domainName :: Prelude.Text,
AcceptDomainTransferFromAnotherAwsAccount -> Text
password :: Prelude.Text
}
deriving (AcceptDomainTransferFromAnotherAwsAccount
-> AcceptDomainTransferFromAnotherAwsAccount -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AcceptDomainTransferFromAnotherAwsAccount
-> AcceptDomainTransferFromAnotherAwsAccount -> Bool
$c/= :: AcceptDomainTransferFromAnotherAwsAccount
-> AcceptDomainTransferFromAnotherAwsAccount -> Bool
== :: AcceptDomainTransferFromAnotherAwsAccount
-> AcceptDomainTransferFromAnotherAwsAccount -> Bool
$c== :: AcceptDomainTransferFromAnotherAwsAccount
-> AcceptDomainTransferFromAnotherAwsAccount -> Bool
Prelude.Eq, ReadPrec [AcceptDomainTransferFromAnotherAwsAccount]
ReadPrec AcceptDomainTransferFromAnotherAwsAccount
Int -> ReadS AcceptDomainTransferFromAnotherAwsAccount
ReadS [AcceptDomainTransferFromAnotherAwsAccount]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AcceptDomainTransferFromAnotherAwsAccount]
$creadListPrec :: ReadPrec [AcceptDomainTransferFromAnotherAwsAccount]
readPrec :: ReadPrec AcceptDomainTransferFromAnotherAwsAccount
$creadPrec :: ReadPrec AcceptDomainTransferFromAnotherAwsAccount
readList :: ReadS [AcceptDomainTransferFromAnotherAwsAccount]
$creadList :: ReadS [AcceptDomainTransferFromAnotherAwsAccount]
readsPrec :: Int -> ReadS AcceptDomainTransferFromAnotherAwsAccount
$creadsPrec :: Int -> ReadS AcceptDomainTransferFromAnotherAwsAccount
Prelude.Read, Int -> AcceptDomainTransferFromAnotherAwsAccount -> ShowS
[AcceptDomainTransferFromAnotherAwsAccount] -> ShowS
AcceptDomainTransferFromAnotherAwsAccount -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AcceptDomainTransferFromAnotherAwsAccount] -> ShowS
$cshowList :: [AcceptDomainTransferFromAnotherAwsAccount] -> ShowS
show :: AcceptDomainTransferFromAnotherAwsAccount -> String
$cshow :: AcceptDomainTransferFromAnotherAwsAccount -> String
showsPrec :: Int -> AcceptDomainTransferFromAnotherAwsAccount -> ShowS
$cshowsPrec :: Int -> AcceptDomainTransferFromAnotherAwsAccount -> ShowS
Prelude.Show, forall x.
Rep AcceptDomainTransferFromAnotherAwsAccount x
-> AcceptDomainTransferFromAnotherAwsAccount
forall x.
AcceptDomainTransferFromAnotherAwsAccount
-> Rep AcceptDomainTransferFromAnotherAwsAccount x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AcceptDomainTransferFromAnotherAwsAccount x
-> AcceptDomainTransferFromAnotherAwsAccount
$cfrom :: forall x.
AcceptDomainTransferFromAnotherAwsAccount
-> Rep AcceptDomainTransferFromAnotherAwsAccount x
Prelude.Generic)
newAcceptDomainTransferFromAnotherAwsAccount ::
Prelude.Text ->
Prelude.Text ->
AcceptDomainTransferFromAnotherAwsAccount
newAcceptDomainTransferFromAnotherAwsAccount :: Text -> Text -> AcceptDomainTransferFromAnotherAwsAccount
newAcceptDomainTransferFromAnotherAwsAccount
Text
pDomainName_
Text
pPassword_ =
AcceptDomainTransferFromAnotherAwsAccount'
{ $sel:domainName:AcceptDomainTransferFromAnotherAwsAccount' :: Text
domainName =
Text
pDomainName_,
$sel:password:AcceptDomainTransferFromAnotherAwsAccount' :: Text
password = Text
pPassword_
}
acceptDomainTransferFromAnotherAwsAccount_domainName :: Lens.Lens' AcceptDomainTransferFromAnotherAwsAccount Prelude.Text
acceptDomainTransferFromAnotherAwsAccount_domainName :: Lens' AcceptDomainTransferFromAnotherAwsAccount Text
acceptDomainTransferFromAnotherAwsAccount_domainName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AcceptDomainTransferFromAnotherAwsAccount' {Text
domainName :: Text
$sel:domainName:AcceptDomainTransferFromAnotherAwsAccount' :: AcceptDomainTransferFromAnotherAwsAccount -> Text
domainName} -> Text
domainName) (\s :: AcceptDomainTransferFromAnotherAwsAccount
s@AcceptDomainTransferFromAnotherAwsAccount' {} Text
a -> AcceptDomainTransferFromAnotherAwsAccount
s {$sel:domainName:AcceptDomainTransferFromAnotherAwsAccount' :: Text
domainName = Text
a} :: AcceptDomainTransferFromAnotherAwsAccount)
acceptDomainTransferFromAnotherAwsAccount_password :: Lens.Lens' AcceptDomainTransferFromAnotherAwsAccount Prelude.Text
acceptDomainTransferFromAnotherAwsAccount_password :: Lens' AcceptDomainTransferFromAnotherAwsAccount Text
acceptDomainTransferFromAnotherAwsAccount_password = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AcceptDomainTransferFromAnotherAwsAccount' {Text
password :: Text
$sel:password:AcceptDomainTransferFromAnotherAwsAccount' :: AcceptDomainTransferFromAnotherAwsAccount -> Text
password} -> Text
password) (\s :: AcceptDomainTransferFromAnotherAwsAccount
s@AcceptDomainTransferFromAnotherAwsAccount' {} Text
a -> AcceptDomainTransferFromAnotherAwsAccount
s {$sel:password:AcceptDomainTransferFromAnotherAwsAccount' :: Text
password = Text
a} :: AcceptDomainTransferFromAnotherAwsAccount)
instance
Core.AWSRequest
AcceptDomainTransferFromAnotherAwsAccount
where
type
AWSResponse
AcceptDomainTransferFromAnotherAwsAccount =
AcceptDomainTransferFromAnotherAwsAccountResponse
request :: (Service -> Service)
-> AcceptDomainTransferFromAnotherAwsAccount
-> Request AcceptDomainTransferFromAnotherAwsAccount
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy AcceptDomainTransferFromAnotherAwsAccount
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse AcceptDomainTransferFromAnotherAwsAccount)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Int -> AcceptDomainTransferFromAnotherAwsAccountResponse
AcceptDomainTransferFromAnotherAwsAccountResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"OperationId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
AcceptDomainTransferFromAnotherAwsAccount
where
hashWithSalt :: Int -> AcceptDomainTransferFromAnotherAwsAccount -> Int
hashWithSalt
Int
_salt
AcceptDomainTransferFromAnotherAwsAccount' {Text
password :: Text
domainName :: Text
$sel:password:AcceptDomainTransferFromAnotherAwsAccount' :: AcceptDomainTransferFromAnotherAwsAccount -> Text
$sel:domainName:AcceptDomainTransferFromAnotherAwsAccount' :: AcceptDomainTransferFromAnotherAwsAccount -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
domainName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
password
instance
Prelude.NFData
AcceptDomainTransferFromAnotherAwsAccount
where
rnf :: AcceptDomainTransferFromAnotherAwsAccount -> ()
rnf AcceptDomainTransferFromAnotherAwsAccount' {Text
password :: Text
domainName :: Text
$sel:password:AcceptDomainTransferFromAnotherAwsAccount' :: AcceptDomainTransferFromAnotherAwsAccount -> Text
$sel:domainName:AcceptDomainTransferFromAnotherAwsAccount' :: AcceptDomainTransferFromAnotherAwsAccount -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
domainName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
password
instance
Data.ToHeaders
AcceptDomainTransferFromAnotherAwsAccount
where
toHeaders :: AcceptDomainTransferFromAnotherAwsAccount -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"Route53Domains_v20140515.AcceptDomainTransferFromAnotherAwsAccount" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance
Data.ToJSON
AcceptDomainTransferFromAnotherAwsAccount
where
toJSON :: AcceptDomainTransferFromAnotherAwsAccount -> Value
toJSON AcceptDomainTransferFromAnotherAwsAccount' {Text
password :: Text
domainName :: Text
$sel:password:AcceptDomainTransferFromAnotherAwsAccount' :: AcceptDomainTransferFromAnotherAwsAccount -> Text
$sel:domainName:AcceptDomainTransferFromAnotherAwsAccount' :: AcceptDomainTransferFromAnotherAwsAccount -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just (Key
"DomainName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
domainName),
forall a. a -> Maybe a
Prelude.Just (Key
"Password" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
password)
]
)
instance
Data.ToPath
AcceptDomainTransferFromAnotherAwsAccount
where
toPath :: AcceptDomainTransferFromAnotherAwsAccount -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Data.ToQuery
AcceptDomainTransferFromAnotherAwsAccount
where
toQuery :: AcceptDomainTransferFromAnotherAwsAccount -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data AcceptDomainTransferFromAnotherAwsAccountResponse = AcceptDomainTransferFromAnotherAwsAccountResponse'
{
AcceptDomainTransferFromAnotherAwsAccountResponse -> Maybe Text
operationId :: Prelude.Maybe Prelude.Text,
AcceptDomainTransferFromAnotherAwsAccountResponse -> Int
httpStatus :: Prelude.Int
}
deriving (AcceptDomainTransferFromAnotherAwsAccountResponse
-> AcceptDomainTransferFromAnotherAwsAccountResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AcceptDomainTransferFromAnotherAwsAccountResponse
-> AcceptDomainTransferFromAnotherAwsAccountResponse -> Bool
$c/= :: AcceptDomainTransferFromAnotherAwsAccountResponse
-> AcceptDomainTransferFromAnotherAwsAccountResponse -> Bool
== :: AcceptDomainTransferFromAnotherAwsAccountResponse
-> AcceptDomainTransferFromAnotherAwsAccountResponse -> Bool
$c== :: AcceptDomainTransferFromAnotherAwsAccountResponse
-> AcceptDomainTransferFromAnotherAwsAccountResponse -> Bool
Prelude.Eq, ReadPrec [AcceptDomainTransferFromAnotherAwsAccountResponse]
ReadPrec AcceptDomainTransferFromAnotherAwsAccountResponse
Int -> ReadS AcceptDomainTransferFromAnotherAwsAccountResponse
ReadS [AcceptDomainTransferFromAnotherAwsAccountResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AcceptDomainTransferFromAnotherAwsAccountResponse]
$creadListPrec :: ReadPrec [AcceptDomainTransferFromAnotherAwsAccountResponse]
readPrec :: ReadPrec AcceptDomainTransferFromAnotherAwsAccountResponse
$creadPrec :: ReadPrec AcceptDomainTransferFromAnotherAwsAccountResponse
readList :: ReadS [AcceptDomainTransferFromAnotherAwsAccountResponse]
$creadList :: ReadS [AcceptDomainTransferFromAnotherAwsAccountResponse]
readsPrec :: Int -> ReadS AcceptDomainTransferFromAnotherAwsAccountResponse
$creadsPrec :: Int -> ReadS AcceptDomainTransferFromAnotherAwsAccountResponse
Prelude.Read, Int -> AcceptDomainTransferFromAnotherAwsAccountResponse -> ShowS
[AcceptDomainTransferFromAnotherAwsAccountResponse] -> ShowS
AcceptDomainTransferFromAnotherAwsAccountResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AcceptDomainTransferFromAnotherAwsAccountResponse] -> ShowS
$cshowList :: [AcceptDomainTransferFromAnotherAwsAccountResponse] -> ShowS
show :: AcceptDomainTransferFromAnotherAwsAccountResponse -> String
$cshow :: AcceptDomainTransferFromAnotherAwsAccountResponse -> String
showsPrec :: Int -> AcceptDomainTransferFromAnotherAwsAccountResponse -> ShowS
$cshowsPrec :: Int -> AcceptDomainTransferFromAnotherAwsAccountResponse -> ShowS
Prelude.Show, forall x.
Rep AcceptDomainTransferFromAnotherAwsAccountResponse x
-> AcceptDomainTransferFromAnotherAwsAccountResponse
forall x.
AcceptDomainTransferFromAnotherAwsAccountResponse
-> Rep AcceptDomainTransferFromAnotherAwsAccountResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AcceptDomainTransferFromAnotherAwsAccountResponse x
-> AcceptDomainTransferFromAnotherAwsAccountResponse
$cfrom :: forall x.
AcceptDomainTransferFromAnotherAwsAccountResponse
-> Rep AcceptDomainTransferFromAnotherAwsAccountResponse x
Prelude.Generic)
newAcceptDomainTransferFromAnotherAwsAccountResponse ::
Prelude.Int ->
AcceptDomainTransferFromAnotherAwsAccountResponse
newAcceptDomainTransferFromAnotherAwsAccountResponse :: Int -> AcceptDomainTransferFromAnotherAwsAccountResponse
newAcceptDomainTransferFromAnotherAwsAccountResponse
Int
pHttpStatus_ =
AcceptDomainTransferFromAnotherAwsAccountResponse'
{ $sel:operationId:AcceptDomainTransferFromAnotherAwsAccountResponse' :: Maybe Text
operationId =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:AcceptDomainTransferFromAnotherAwsAccountResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
acceptDomainTransferFromAnotherAwsAccountResponse_operationId :: Lens.Lens' AcceptDomainTransferFromAnotherAwsAccountResponse (Prelude.Maybe Prelude.Text)
acceptDomainTransferFromAnotherAwsAccountResponse_operationId :: Lens'
AcceptDomainTransferFromAnotherAwsAccountResponse (Maybe Text)
acceptDomainTransferFromAnotherAwsAccountResponse_operationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AcceptDomainTransferFromAnotherAwsAccountResponse' {Maybe Text
operationId :: Maybe Text
$sel:operationId:AcceptDomainTransferFromAnotherAwsAccountResponse' :: AcceptDomainTransferFromAnotherAwsAccountResponse -> Maybe Text
operationId} -> Maybe Text
operationId) (\s :: AcceptDomainTransferFromAnotherAwsAccountResponse
s@AcceptDomainTransferFromAnotherAwsAccountResponse' {} Maybe Text
a -> AcceptDomainTransferFromAnotherAwsAccountResponse
s {$sel:operationId:AcceptDomainTransferFromAnotherAwsAccountResponse' :: Maybe Text
operationId = Maybe Text
a} :: AcceptDomainTransferFromAnotherAwsAccountResponse)
acceptDomainTransferFromAnotherAwsAccountResponse_httpStatus :: Lens.Lens' AcceptDomainTransferFromAnotherAwsAccountResponse Prelude.Int
acceptDomainTransferFromAnotherAwsAccountResponse_httpStatus :: Lens' AcceptDomainTransferFromAnotherAwsAccountResponse Int
acceptDomainTransferFromAnotherAwsAccountResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AcceptDomainTransferFromAnotherAwsAccountResponse' {Int
httpStatus :: Int
$sel:httpStatus:AcceptDomainTransferFromAnotherAwsAccountResponse' :: AcceptDomainTransferFromAnotherAwsAccountResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: AcceptDomainTransferFromAnotherAwsAccountResponse
s@AcceptDomainTransferFromAnotherAwsAccountResponse' {} Int
a -> AcceptDomainTransferFromAnotherAwsAccountResponse
s {$sel:httpStatus:AcceptDomainTransferFromAnotherAwsAccountResponse' :: Int
httpStatus = Int
a} :: AcceptDomainTransferFromAnotherAwsAccountResponse)
instance
Prelude.NFData
AcceptDomainTransferFromAnotherAwsAccountResponse
where
rnf :: AcceptDomainTransferFromAnotherAwsAccountResponse -> ()
rnf
AcceptDomainTransferFromAnotherAwsAccountResponse' {Int
Maybe Text
httpStatus :: Int
operationId :: Maybe Text
$sel:httpStatus:AcceptDomainTransferFromAnotherAwsAccountResponse' :: AcceptDomainTransferFromAnotherAwsAccountResponse -> Int
$sel:operationId:AcceptDomainTransferFromAnotherAwsAccountResponse' :: AcceptDomainTransferFromAnotherAwsAccountResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
operationId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus