{-# 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.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 RejectDomainTransferFromAnotherAwsAccount = RejectDomainTransferFromAnotherAwsAccount'
{
RejectDomainTransferFromAnotherAwsAccount -> Text
domainName :: Prelude.Text
}
deriving (RejectDomainTransferFromAnotherAwsAccount
-> RejectDomainTransferFromAnotherAwsAccount -> Bool
(RejectDomainTransferFromAnotherAwsAccount
-> RejectDomainTransferFromAnotherAwsAccount -> Bool)
-> (RejectDomainTransferFromAnotherAwsAccount
-> RejectDomainTransferFromAnotherAwsAccount -> Bool)
-> Eq RejectDomainTransferFromAnotherAwsAccount
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]
(Int -> ReadS RejectDomainTransferFromAnotherAwsAccount)
-> ReadS [RejectDomainTransferFromAnotherAwsAccount]
-> ReadPrec RejectDomainTransferFromAnotherAwsAccount
-> ReadPrec [RejectDomainTransferFromAnotherAwsAccount]
-> Read 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
(Int -> RejectDomainTransferFromAnotherAwsAccount -> ShowS)
-> (RejectDomainTransferFromAnotherAwsAccount -> String)
-> ([RejectDomainTransferFromAnotherAwsAccount] -> ShowS)
-> Show RejectDomainTransferFromAnotherAwsAccount
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.
RejectDomainTransferFromAnotherAwsAccount
-> Rep RejectDomainTransferFromAnotherAwsAccount x)
-> (forall x.
Rep RejectDomainTransferFromAnotherAwsAccount x
-> RejectDomainTransferFromAnotherAwsAccount)
-> Generic RejectDomainTransferFromAnotherAwsAccount
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' :: Text -> RejectDomainTransferFromAnotherAwsAccount
RejectDomainTransferFromAnotherAwsAccount'
{ $sel:domainName:RejectDomainTransferFromAnotherAwsAccount' :: Text
domainName =
Text
pDomainName_
}
rejectDomainTransferFromAnotherAwsAccount_domainName :: Lens.Lens' RejectDomainTransferFromAnotherAwsAccount Prelude.Text
rejectDomainTransferFromAnotherAwsAccount_domainName :: (Text -> f Text)
-> RejectDomainTransferFromAnotherAwsAccount
-> f RejectDomainTransferFromAnotherAwsAccount
rejectDomainTransferFromAnotherAwsAccount_domainName = (RejectDomainTransferFromAnotherAwsAccount -> Text)
-> (RejectDomainTransferFromAnotherAwsAccount
-> Text -> RejectDomainTransferFromAnotherAwsAccount)
-> Lens
RejectDomainTransferFromAnotherAwsAccount
RejectDomainTransferFromAnotherAwsAccount
Text
Text
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 :: RejectDomainTransferFromAnotherAwsAccount
-> Request RejectDomainTransferFromAnotherAwsAccount
request = Service
-> RejectDomainTransferFromAnotherAwsAccount
-> Request RejectDomainTransferFromAnotherAwsAccount
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy RejectDomainTransferFromAnotherAwsAccount
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse RejectDomainTransferFromAnotherAwsAccount)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either
String (AWSResponse RejectDomainTransferFromAnotherAwsAccount))
-> Logger
-> Service
-> Proxy RejectDomainTransferFromAnotherAwsAccount
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse RejectDomainTransferFromAnotherAwsAccount)))
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 ->
Maybe Text
-> Int -> RejectDomainTransferFromAnotherAwsAccountResponse
RejectDomainTransferFromAnotherAwsAccountResponse'
(Maybe Text
-> Int -> RejectDomainTransferFromAnotherAwsAccountResponse)
-> Either String (Maybe Text)
-> Either
String (Int -> RejectDomainTransferFromAnotherAwsAccountResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"OperationId")
Either
String (Int -> RejectDomainTransferFromAnotherAwsAccountResponse)
-> Either String Int
-> Either String RejectDomainTransferFromAnotherAwsAccountResponse
forall (f :: * -> *) a b. Applicative f => 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))
)
instance
Prelude.Hashable
RejectDomainTransferFromAnotherAwsAccount
instance
Prelude.NFData
RejectDomainTransferFromAnotherAwsAccount
instance
Core.ToHeaders
RejectDomainTransferFromAnotherAwsAccount
where
toHeaders :: RejectDomainTransferFromAnotherAwsAccount -> ResponseHeaders
toHeaders =
ResponseHeaders
-> RejectDomainTransferFromAnotherAwsAccount -> 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.RejectDomainTransferFromAnotherAwsAccount" ::
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
RejectDomainTransferFromAnotherAwsAccount
where
toJSON :: RejectDomainTransferFromAnotherAwsAccount -> Value
toJSON RejectDomainTransferFromAnotherAwsAccount' {Text
domainName :: Text
$sel:domainName:RejectDomainTransferFromAnotherAwsAccount' :: RejectDomainTransferFromAnotherAwsAccount -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[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)]
)
instance
Core.ToPath
RejectDomainTransferFromAnotherAwsAccount
where
toPath :: RejectDomainTransferFromAnotherAwsAccount -> ByteString
toPath = ByteString
-> RejectDomainTransferFromAnotherAwsAccount -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
RejectDomainTransferFromAnotherAwsAccount
where
toQuery :: RejectDomainTransferFromAnotherAwsAccount -> QueryString
toQuery = QueryString
-> RejectDomainTransferFromAnotherAwsAccount -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
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
(RejectDomainTransferFromAnotherAwsAccountResponse
-> RejectDomainTransferFromAnotherAwsAccountResponse -> Bool)
-> (RejectDomainTransferFromAnotherAwsAccountResponse
-> RejectDomainTransferFromAnotherAwsAccountResponse -> Bool)
-> Eq RejectDomainTransferFromAnotherAwsAccountResponse
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]
(Int -> ReadS RejectDomainTransferFromAnotherAwsAccountResponse)
-> ReadS [RejectDomainTransferFromAnotherAwsAccountResponse]
-> ReadPrec RejectDomainTransferFromAnotherAwsAccountResponse
-> ReadPrec [RejectDomainTransferFromAnotherAwsAccountResponse]
-> Read 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
(Int -> RejectDomainTransferFromAnotherAwsAccountResponse -> ShowS)
-> (RejectDomainTransferFromAnotherAwsAccountResponse -> String)
-> ([RejectDomainTransferFromAnotherAwsAccountResponse] -> ShowS)
-> Show RejectDomainTransferFromAnotherAwsAccountResponse
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.
RejectDomainTransferFromAnotherAwsAccountResponse
-> Rep RejectDomainTransferFromAnotherAwsAccountResponse x)
-> (forall x.
Rep RejectDomainTransferFromAnotherAwsAccountResponse x
-> RejectDomainTransferFromAnotherAwsAccountResponse)
-> Generic RejectDomainTransferFromAnotherAwsAccountResponse
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' :: Maybe Text
-> Int -> RejectDomainTransferFromAnotherAwsAccountResponse
RejectDomainTransferFromAnotherAwsAccountResponse'
{ $sel:operationId:RejectDomainTransferFromAnotherAwsAccountResponse' :: Maybe Text
operationId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:RejectDomainTransferFromAnotherAwsAccountResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
rejectDomainTransferFromAnotherAwsAccountResponse_operationId :: Lens.Lens' RejectDomainTransferFromAnotherAwsAccountResponse (Prelude.Maybe Prelude.Text)
rejectDomainTransferFromAnotherAwsAccountResponse_operationId :: (Maybe Text -> f (Maybe Text))
-> RejectDomainTransferFromAnotherAwsAccountResponse
-> f RejectDomainTransferFromAnotherAwsAccountResponse
rejectDomainTransferFromAnotherAwsAccountResponse_operationId = (RejectDomainTransferFromAnotherAwsAccountResponse -> Maybe Text)
-> (RejectDomainTransferFromAnotherAwsAccountResponse
-> Maybe Text -> RejectDomainTransferFromAnotherAwsAccountResponse)
-> Lens
RejectDomainTransferFromAnotherAwsAccountResponse
RejectDomainTransferFromAnotherAwsAccountResponse
(Maybe Text)
(Maybe Text)
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 :: (Int -> f Int)
-> RejectDomainTransferFromAnotherAwsAccountResponse
-> f RejectDomainTransferFromAnotherAwsAccountResponse
rejectDomainTransferFromAnotherAwsAccountResponse_httpStatus = (RejectDomainTransferFromAnotherAwsAccountResponse -> Int)
-> (RejectDomainTransferFromAnotherAwsAccountResponse
-> Int -> RejectDomainTransferFromAnotherAwsAccountResponse)
-> Lens
RejectDomainTransferFromAnotherAwsAccountResponse
RejectDomainTransferFromAnotherAwsAccountResponse
Int
Int
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