{-# 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.RejectDomainTransferFromAnotherAwsAccount
(
RejectDomainTransferFromAnotherAwsAccount (..),
newRejectDomainTransferFromAnotherAwsAccount,
rejectDomainTransferFromAnotherAwsAccount_domainName,
RejectDomainTransferFromAnotherAwsAccountResponse (..),
newRejectDomainTransferFromAnotherAwsAccountResponse,
rejectDomainTransferFromAnotherAwsAccountResponse_operationId,
rejectDomainTransferFromAnotherAwsAccountResponse_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 RejectDomainTransferFromAnotherAwsAccount = RejectDomainTransferFromAnotherAwsAccount'
{
RejectDomainTransferFromAnotherAwsAccount -> Text
domainName :: Prelude.Text
}
deriving (RejectDomainTransferFromAnotherAwsAccount
-> RejectDomainTransferFromAnotherAwsAccount -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RejectDomainTransferFromAnotherAwsAccount
-> RejectDomainTransferFromAnotherAwsAccount -> Bool
$c/= :: RejectDomainTransferFromAnotherAwsAccount
-> RejectDomainTransferFromAnotherAwsAccount -> Bool
== :: RejectDomainTransferFromAnotherAwsAccount
-> RejectDomainTransferFromAnotherAwsAccount -> Bool
$c== :: RejectDomainTransferFromAnotherAwsAccount
-> RejectDomainTransferFromAnotherAwsAccount -> Bool
Prelude.Eq, ReadPrec [RejectDomainTransferFromAnotherAwsAccount]
ReadPrec RejectDomainTransferFromAnotherAwsAccount
Int -> ReadS RejectDomainTransferFromAnotherAwsAccount
ReadS [RejectDomainTransferFromAnotherAwsAccount]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RejectDomainTransferFromAnotherAwsAccount]
$creadListPrec :: ReadPrec [RejectDomainTransferFromAnotherAwsAccount]
readPrec :: ReadPrec RejectDomainTransferFromAnotherAwsAccount
$creadPrec :: ReadPrec RejectDomainTransferFromAnotherAwsAccount
readList :: ReadS [RejectDomainTransferFromAnotherAwsAccount]
$creadList :: ReadS [RejectDomainTransferFromAnotherAwsAccount]
readsPrec :: Int -> ReadS RejectDomainTransferFromAnotherAwsAccount
$creadsPrec :: Int -> ReadS RejectDomainTransferFromAnotherAwsAccount
Prelude.Read, Int -> RejectDomainTransferFromAnotherAwsAccount -> ShowS
[RejectDomainTransferFromAnotherAwsAccount] -> ShowS
RejectDomainTransferFromAnotherAwsAccount -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RejectDomainTransferFromAnotherAwsAccount] -> ShowS
$cshowList :: [RejectDomainTransferFromAnotherAwsAccount] -> ShowS
show :: RejectDomainTransferFromAnotherAwsAccount -> String
$cshow :: RejectDomainTransferFromAnotherAwsAccount -> String
showsPrec :: Int -> RejectDomainTransferFromAnotherAwsAccount -> ShowS
$cshowsPrec :: Int -> RejectDomainTransferFromAnotherAwsAccount -> ShowS
Prelude.Show, forall x.
Rep RejectDomainTransferFromAnotherAwsAccount x
-> RejectDomainTransferFromAnotherAwsAccount
forall x.
RejectDomainTransferFromAnotherAwsAccount
-> Rep RejectDomainTransferFromAnotherAwsAccount x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RejectDomainTransferFromAnotherAwsAccount x
-> RejectDomainTransferFromAnotherAwsAccount
$cfrom :: forall x.
RejectDomainTransferFromAnotherAwsAccount
-> Rep RejectDomainTransferFromAnotherAwsAccount x
Prelude.Generic)
newRejectDomainTransferFromAnotherAwsAccount ::
Prelude.Text ->
RejectDomainTransferFromAnotherAwsAccount
newRejectDomainTransferFromAnotherAwsAccount :: Text -> RejectDomainTransferFromAnotherAwsAccount
newRejectDomainTransferFromAnotherAwsAccount
Text
pDomainName_ =
RejectDomainTransferFromAnotherAwsAccount'
{ $sel:domainName:RejectDomainTransferFromAnotherAwsAccount' :: Text
domainName =
Text
pDomainName_
}
rejectDomainTransferFromAnotherAwsAccount_domainName :: Lens.Lens' RejectDomainTransferFromAnotherAwsAccount Prelude.Text
rejectDomainTransferFromAnotherAwsAccount_domainName :: Lens' RejectDomainTransferFromAnotherAwsAccount Text
rejectDomainTransferFromAnotherAwsAccount_domainName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RejectDomainTransferFromAnotherAwsAccount' {Text
domainName :: Text
$sel:domainName:RejectDomainTransferFromAnotherAwsAccount' :: RejectDomainTransferFromAnotherAwsAccount -> Text
domainName} -> Text
domainName) (\s :: RejectDomainTransferFromAnotherAwsAccount
s@RejectDomainTransferFromAnotherAwsAccount' {} Text
a -> RejectDomainTransferFromAnotherAwsAccount
s {$sel:domainName:RejectDomainTransferFromAnotherAwsAccount' :: Text
domainName = Text
a} :: RejectDomainTransferFromAnotherAwsAccount)
instance
Core.AWSRequest
RejectDomainTransferFromAnotherAwsAccount
where
type
AWSResponse
RejectDomainTransferFromAnotherAwsAccount =
RejectDomainTransferFromAnotherAwsAccountResponse
request :: (Service -> Service)
-> RejectDomainTransferFromAnotherAwsAccount
-> Request RejectDomainTransferFromAnotherAwsAccount
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 RejectDomainTransferFromAnotherAwsAccount
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse RejectDomainTransferFromAnotherAwsAccount)))
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 -> RejectDomainTransferFromAnotherAwsAccountResponse
RejectDomainTransferFromAnotherAwsAccountResponse'
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
RejectDomainTransferFromAnotherAwsAccount
where
hashWithSalt :: Int -> RejectDomainTransferFromAnotherAwsAccount -> Int
hashWithSalt
Int
_salt
RejectDomainTransferFromAnotherAwsAccount' {Text
domainName :: Text
$sel:domainName:RejectDomainTransferFromAnotherAwsAccount' :: RejectDomainTransferFromAnotherAwsAccount -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
domainName
instance
Prelude.NFData
RejectDomainTransferFromAnotherAwsAccount
where
rnf :: RejectDomainTransferFromAnotherAwsAccount -> ()
rnf RejectDomainTransferFromAnotherAwsAccount' {Text
domainName :: Text
$sel:domainName:RejectDomainTransferFromAnotherAwsAccount' :: RejectDomainTransferFromAnotherAwsAccount -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
domainName
instance
Data.ToHeaders
RejectDomainTransferFromAnotherAwsAccount
where
toHeaders :: RejectDomainTransferFromAnotherAwsAccount -> 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.RejectDomainTransferFromAnotherAwsAccount" ::
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
RejectDomainTransferFromAnotherAwsAccount
where
toJSON :: RejectDomainTransferFromAnotherAwsAccount -> Value
toJSON RejectDomainTransferFromAnotherAwsAccount' {Text
domainName :: Text
$sel:domainName:RejectDomainTransferFromAnotherAwsAccount' :: RejectDomainTransferFromAnotherAwsAccount -> 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)]
)
instance
Data.ToPath
RejectDomainTransferFromAnotherAwsAccount
where
toPath :: RejectDomainTransferFromAnotherAwsAccount -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Data.ToQuery
RejectDomainTransferFromAnotherAwsAccount
where
toQuery :: RejectDomainTransferFromAnotherAwsAccount -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data RejectDomainTransferFromAnotherAwsAccountResponse = RejectDomainTransferFromAnotherAwsAccountResponse'
{
RejectDomainTransferFromAnotherAwsAccountResponse -> Maybe Text
operationId :: Prelude.Maybe Prelude.Text,
RejectDomainTransferFromAnotherAwsAccountResponse -> Int
httpStatus :: Prelude.Int
}
deriving (RejectDomainTransferFromAnotherAwsAccountResponse
-> RejectDomainTransferFromAnotherAwsAccountResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RejectDomainTransferFromAnotherAwsAccountResponse
-> RejectDomainTransferFromAnotherAwsAccountResponse -> Bool
$c/= :: RejectDomainTransferFromAnotherAwsAccountResponse
-> RejectDomainTransferFromAnotherAwsAccountResponse -> Bool
== :: RejectDomainTransferFromAnotherAwsAccountResponse
-> RejectDomainTransferFromAnotherAwsAccountResponse -> Bool
$c== :: RejectDomainTransferFromAnotherAwsAccountResponse
-> RejectDomainTransferFromAnotherAwsAccountResponse -> Bool
Prelude.Eq, ReadPrec [RejectDomainTransferFromAnotherAwsAccountResponse]
ReadPrec RejectDomainTransferFromAnotherAwsAccountResponse
Int -> ReadS RejectDomainTransferFromAnotherAwsAccountResponse
ReadS [RejectDomainTransferFromAnotherAwsAccountResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RejectDomainTransferFromAnotherAwsAccountResponse]
$creadListPrec :: ReadPrec [RejectDomainTransferFromAnotherAwsAccountResponse]
readPrec :: ReadPrec RejectDomainTransferFromAnotherAwsAccountResponse
$creadPrec :: ReadPrec RejectDomainTransferFromAnotherAwsAccountResponse
readList :: ReadS [RejectDomainTransferFromAnotherAwsAccountResponse]
$creadList :: ReadS [RejectDomainTransferFromAnotherAwsAccountResponse]
readsPrec :: Int -> ReadS RejectDomainTransferFromAnotherAwsAccountResponse
$creadsPrec :: Int -> ReadS RejectDomainTransferFromAnotherAwsAccountResponse
Prelude.Read, Int -> RejectDomainTransferFromAnotherAwsAccountResponse -> ShowS
[RejectDomainTransferFromAnotherAwsAccountResponse] -> ShowS
RejectDomainTransferFromAnotherAwsAccountResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RejectDomainTransferFromAnotherAwsAccountResponse] -> ShowS
$cshowList :: [RejectDomainTransferFromAnotherAwsAccountResponse] -> ShowS
show :: RejectDomainTransferFromAnotherAwsAccountResponse -> String
$cshow :: RejectDomainTransferFromAnotherAwsAccountResponse -> String
showsPrec :: Int -> RejectDomainTransferFromAnotherAwsAccountResponse -> ShowS
$cshowsPrec :: Int -> RejectDomainTransferFromAnotherAwsAccountResponse -> ShowS
Prelude.Show, forall x.
Rep RejectDomainTransferFromAnotherAwsAccountResponse x
-> RejectDomainTransferFromAnotherAwsAccountResponse
forall x.
RejectDomainTransferFromAnotherAwsAccountResponse
-> Rep RejectDomainTransferFromAnotherAwsAccountResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RejectDomainTransferFromAnotherAwsAccountResponse x
-> RejectDomainTransferFromAnotherAwsAccountResponse
$cfrom :: forall x.
RejectDomainTransferFromAnotherAwsAccountResponse
-> Rep RejectDomainTransferFromAnotherAwsAccountResponse x
Prelude.Generic)
newRejectDomainTransferFromAnotherAwsAccountResponse ::
Prelude.Int ->
RejectDomainTransferFromAnotherAwsAccountResponse
newRejectDomainTransferFromAnotherAwsAccountResponse :: Int -> RejectDomainTransferFromAnotherAwsAccountResponse
newRejectDomainTransferFromAnotherAwsAccountResponse
Int
pHttpStatus_ =
RejectDomainTransferFromAnotherAwsAccountResponse'
{ $sel:operationId:RejectDomainTransferFromAnotherAwsAccountResponse' :: Maybe Text
operationId =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:RejectDomainTransferFromAnotherAwsAccountResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
rejectDomainTransferFromAnotherAwsAccountResponse_operationId :: Lens.Lens' RejectDomainTransferFromAnotherAwsAccountResponse (Prelude.Maybe Prelude.Text)
rejectDomainTransferFromAnotherAwsAccountResponse_operationId :: Lens'
RejectDomainTransferFromAnotherAwsAccountResponse (Maybe Text)
rejectDomainTransferFromAnotherAwsAccountResponse_operationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RejectDomainTransferFromAnotherAwsAccountResponse' {Maybe Text
operationId :: Maybe Text
$sel:operationId:RejectDomainTransferFromAnotherAwsAccountResponse' :: RejectDomainTransferFromAnotherAwsAccountResponse -> Maybe Text
operationId} -> Maybe Text
operationId) (\s :: RejectDomainTransferFromAnotherAwsAccountResponse
s@RejectDomainTransferFromAnotherAwsAccountResponse' {} Maybe Text
a -> RejectDomainTransferFromAnotherAwsAccountResponse
s {$sel:operationId:RejectDomainTransferFromAnotherAwsAccountResponse' :: Maybe Text
operationId = Maybe Text
a} :: RejectDomainTransferFromAnotherAwsAccountResponse)
rejectDomainTransferFromAnotherAwsAccountResponse_httpStatus :: Lens.Lens' RejectDomainTransferFromAnotherAwsAccountResponse Prelude.Int
rejectDomainTransferFromAnotherAwsAccountResponse_httpStatus :: Lens' RejectDomainTransferFromAnotherAwsAccountResponse Int
rejectDomainTransferFromAnotherAwsAccountResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RejectDomainTransferFromAnotherAwsAccountResponse' {Int
httpStatus :: Int
$sel:httpStatus:RejectDomainTransferFromAnotherAwsAccountResponse' :: RejectDomainTransferFromAnotherAwsAccountResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: RejectDomainTransferFromAnotherAwsAccountResponse
s@RejectDomainTransferFromAnotherAwsAccountResponse' {} Int
a -> RejectDomainTransferFromAnotherAwsAccountResponse
s {$sel:httpStatus:RejectDomainTransferFromAnotherAwsAccountResponse' :: Int
httpStatus = Int
a} :: RejectDomainTransferFromAnotherAwsAccountResponse)
instance
Prelude.NFData
RejectDomainTransferFromAnotherAwsAccountResponse
where
rnf :: RejectDomainTransferFromAnotherAwsAccountResponse -> ()
rnf
RejectDomainTransferFromAnotherAwsAccountResponse' {Int
Maybe Text
httpStatus :: Int
operationId :: Maybe Text
$sel:httpStatus:RejectDomainTransferFromAnotherAwsAccountResponse' :: RejectDomainTransferFromAnotherAwsAccountResponse -> Int
$sel:operationId:RejectDomainTransferFromAnotherAwsAccountResponse' :: RejectDomainTransferFromAnotherAwsAccountResponse -> 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