{-# 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.CancelDomainTransferToAnotherAwsAccount
(
CancelDomainTransferToAnotherAwsAccount (..),
newCancelDomainTransferToAnotherAwsAccount,
cancelDomainTransferToAnotherAwsAccount_domainName,
CancelDomainTransferToAnotherAwsAccountResponse (..),
newCancelDomainTransferToAnotherAwsAccountResponse,
cancelDomainTransferToAnotherAwsAccountResponse_operationId,
cancelDomainTransferToAnotherAwsAccountResponse_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 CancelDomainTransferToAnotherAwsAccount = CancelDomainTransferToAnotherAwsAccount'
{
CancelDomainTransferToAnotherAwsAccount -> Text
domainName :: Prelude.Text
}
deriving (CancelDomainTransferToAnotherAwsAccount
-> CancelDomainTransferToAnotherAwsAccount -> Bool
(CancelDomainTransferToAnotherAwsAccount
-> CancelDomainTransferToAnotherAwsAccount -> Bool)
-> (CancelDomainTransferToAnotherAwsAccount
-> CancelDomainTransferToAnotherAwsAccount -> Bool)
-> Eq CancelDomainTransferToAnotherAwsAccount
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CancelDomainTransferToAnotherAwsAccount
-> CancelDomainTransferToAnotherAwsAccount -> Bool
$c/= :: CancelDomainTransferToAnotherAwsAccount
-> CancelDomainTransferToAnotherAwsAccount -> Bool
== :: CancelDomainTransferToAnotherAwsAccount
-> CancelDomainTransferToAnotherAwsAccount -> Bool
$c== :: CancelDomainTransferToAnotherAwsAccount
-> CancelDomainTransferToAnotherAwsAccount -> Bool
Prelude.Eq, ReadPrec [CancelDomainTransferToAnotherAwsAccount]
ReadPrec CancelDomainTransferToAnotherAwsAccount
Int -> ReadS CancelDomainTransferToAnotherAwsAccount
ReadS [CancelDomainTransferToAnotherAwsAccount]
(Int -> ReadS CancelDomainTransferToAnotherAwsAccount)
-> ReadS [CancelDomainTransferToAnotherAwsAccount]
-> ReadPrec CancelDomainTransferToAnotherAwsAccount
-> ReadPrec [CancelDomainTransferToAnotherAwsAccount]
-> Read CancelDomainTransferToAnotherAwsAccount
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CancelDomainTransferToAnotherAwsAccount]
$creadListPrec :: ReadPrec [CancelDomainTransferToAnotherAwsAccount]
readPrec :: ReadPrec CancelDomainTransferToAnotherAwsAccount
$creadPrec :: ReadPrec CancelDomainTransferToAnotherAwsAccount
readList :: ReadS [CancelDomainTransferToAnotherAwsAccount]
$creadList :: ReadS [CancelDomainTransferToAnotherAwsAccount]
readsPrec :: Int -> ReadS CancelDomainTransferToAnotherAwsAccount
$creadsPrec :: Int -> ReadS CancelDomainTransferToAnotherAwsAccount
Prelude.Read, Int -> CancelDomainTransferToAnotherAwsAccount -> ShowS
[CancelDomainTransferToAnotherAwsAccount] -> ShowS
CancelDomainTransferToAnotherAwsAccount -> String
(Int -> CancelDomainTransferToAnotherAwsAccount -> ShowS)
-> (CancelDomainTransferToAnotherAwsAccount -> String)
-> ([CancelDomainTransferToAnotherAwsAccount] -> ShowS)
-> Show CancelDomainTransferToAnotherAwsAccount
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CancelDomainTransferToAnotherAwsAccount] -> ShowS
$cshowList :: [CancelDomainTransferToAnotherAwsAccount] -> ShowS
show :: CancelDomainTransferToAnotherAwsAccount -> String
$cshow :: CancelDomainTransferToAnotherAwsAccount -> String
showsPrec :: Int -> CancelDomainTransferToAnotherAwsAccount -> ShowS
$cshowsPrec :: Int -> CancelDomainTransferToAnotherAwsAccount -> ShowS
Prelude.Show, (forall x.
CancelDomainTransferToAnotherAwsAccount
-> Rep CancelDomainTransferToAnotherAwsAccount x)
-> (forall x.
Rep CancelDomainTransferToAnotherAwsAccount x
-> CancelDomainTransferToAnotherAwsAccount)
-> Generic CancelDomainTransferToAnotherAwsAccount
forall x.
Rep CancelDomainTransferToAnotherAwsAccount x
-> CancelDomainTransferToAnotherAwsAccount
forall x.
CancelDomainTransferToAnotherAwsAccount
-> Rep CancelDomainTransferToAnotherAwsAccount x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CancelDomainTransferToAnotherAwsAccount x
-> CancelDomainTransferToAnotherAwsAccount
$cfrom :: forall x.
CancelDomainTransferToAnotherAwsAccount
-> Rep CancelDomainTransferToAnotherAwsAccount x
Prelude.Generic)
newCancelDomainTransferToAnotherAwsAccount ::
Prelude.Text ->
CancelDomainTransferToAnotherAwsAccount
newCancelDomainTransferToAnotherAwsAccount :: Text -> CancelDomainTransferToAnotherAwsAccount
newCancelDomainTransferToAnotherAwsAccount
Text
pDomainName_ =
CancelDomainTransferToAnotherAwsAccount' :: Text -> CancelDomainTransferToAnotherAwsAccount
CancelDomainTransferToAnotherAwsAccount'
{ $sel:domainName:CancelDomainTransferToAnotherAwsAccount' :: Text
domainName =
Text
pDomainName_
}
cancelDomainTransferToAnotherAwsAccount_domainName :: Lens.Lens' CancelDomainTransferToAnotherAwsAccount Prelude.Text
cancelDomainTransferToAnotherAwsAccount_domainName :: (Text -> f Text)
-> CancelDomainTransferToAnotherAwsAccount
-> f CancelDomainTransferToAnotherAwsAccount
cancelDomainTransferToAnotherAwsAccount_domainName = (CancelDomainTransferToAnotherAwsAccount -> Text)
-> (CancelDomainTransferToAnotherAwsAccount
-> Text -> CancelDomainTransferToAnotherAwsAccount)
-> Lens
CancelDomainTransferToAnotherAwsAccount
CancelDomainTransferToAnotherAwsAccount
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CancelDomainTransferToAnotherAwsAccount' {Text
domainName :: Text
$sel:domainName:CancelDomainTransferToAnotherAwsAccount' :: CancelDomainTransferToAnotherAwsAccount -> Text
domainName} -> Text
domainName) (\s :: CancelDomainTransferToAnotherAwsAccount
s@CancelDomainTransferToAnotherAwsAccount' {} Text
a -> CancelDomainTransferToAnotherAwsAccount
s {$sel:domainName:CancelDomainTransferToAnotherAwsAccount' :: Text
domainName = Text
a} :: CancelDomainTransferToAnotherAwsAccount)
instance
Core.AWSRequest
CancelDomainTransferToAnotherAwsAccount
where
type
AWSResponse
CancelDomainTransferToAnotherAwsAccount =
CancelDomainTransferToAnotherAwsAccountResponse
request :: CancelDomainTransferToAnotherAwsAccount
-> Request CancelDomainTransferToAnotherAwsAccount
request = Service
-> CancelDomainTransferToAnotherAwsAccount
-> Request CancelDomainTransferToAnotherAwsAccount
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CancelDomainTransferToAnotherAwsAccount
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse CancelDomainTransferToAnotherAwsAccount)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either
String (AWSResponse CancelDomainTransferToAnotherAwsAccount))
-> Logger
-> Service
-> Proxy CancelDomainTransferToAnotherAwsAccount
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse CancelDomainTransferToAnotherAwsAccount)))
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 -> CancelDomainTransferToAnotherAwsAccountResponse
CancelDomainTransferToAnotherAwsAccountResponse'
(Maybe Text
-> Int -> CancelDomainTransferToAnotherAwsAccountResponse)
-> Either String (Maybe Text)
-> Either
String (Int -> CancelDomainTransferToAnotherAwsAccountResponse)
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 -> CancelDomainTransferToAnotherAwsAccountResponse)
-> Either String Int
-> Either String CancelDomainTransferToAnotherAwsAccountResponse
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
CancelDomainTransferToAnotherAwsAccount
instance
Prelude.NFData
CancelDomainTransferToAnotherAwsAccount
instance
Core.ToHeaders
CancelDomainTransferToAnotherAwsAccount
where
toHeaders :: CancelDomainTransferToAnotherAwsAccount -> ResponseHeaders
toHeaders =
ResponseHeaders
-> CancelDomainTransferToAnotherAwsAccount -> 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.CancelDomainTransferToAnotherAwsAccount" ::
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
CancelDomainTransferToAnotherAwsAccount
where
toJSON :: CancelDomainTransferToAnotherAwsAccount -> Value
toJSON CancelDomainTransferToAnotherAwsAccount' {Text
domainName :: Text
$sel:domainName:CancelDomainTransferToAnotherAwsAccount' :: CancelDomainTransferToAnotherAwsAccount -> 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
CancelDomainTransferToAnotherAwsAccount
where
toPath :: CancelDomainTransferToAnotherAwsAccount -> ByteString
toPath = ByteString -> CancelDomainTransferToAnotherAwsAccount -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
CancelDomainTransferToAnotherAwsAccount
where
toQuery :: CancelDomainTransferToAnotherAwsAccount -> QueryString
toQuery = QueryString
-> CancelDomainTransferToAnotherAwsAccount -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CancelDomainTransferToAnotherAwsAccountResponse = CancelDomainTransferToAnotherAwsAccountResponse'
{
CancelDomainTransferToAnotherAwsAccountResponse -> Maybe Text
operationId :: Prelude.Maybe Prelude.Text,
CancelDomainTransferToAnotherAwsAccountResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CancelDomainTransferToAnotherAwsAccountResponse
-> CancelDomainTransferToAnotherAwsAccountResponse -> Bool
(CancelDomainTransferToAnotherAwsAccountResponse
-> CancelDomainTransferToAnotherAwsAccountResponse -> Bool)
-> (CancelDomainTransferToAnotherAwsAccountResponse
-> CancelDomainTransferToAnotherAwsAccountResponse -> Bool)
-> Eq CancelDomainTransferToAnotherAwsAccountResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CancelDomainTransferToAnotherAwsAccountResponse
-> CancelDomainTransferToAnotherAwsAccountResponse -> Bool
$c/= :: CancelDomainTransferToAnotherAwsAccountResponse
-> CancelDomainTransferToAnotherAwsAccountResponse -> Bool
== :: CancelDomainTransferToAnotherAwsAccountResponse
-> CancelDomainTransferToAnotherAwsAccountResponse -> Bool
$c== :: CancelDomainTransferToAnotherAwsAccountResponse
-> CancelDomainTransferToAnotherAwsAccountResponse -> Bool
Prelude.Eq, ReadPrec [CancelDomainTransferToAnotherAwsAccountResponse]
ReadPrec CancelDomainTransferToAnotherAwsAccountResponse
Int -> ReadS CancelDomainTransferToAnotherAwsAccountResponse
ReadS [CancelDomainTransferToAnotherAwsAccountResponse]
(Int -> ReadS CancelDomainTransferToAnotherAwsAccountResponse)
-> ReadS [CancelDomainTransferToAnotherAwsAccountResponse]
-> ReadPrec CancelDomainTransferToAnotherAwsAccountResponse
-> ReadPrec [CancelDomainTransferToAnotherAwsAccountResponse]
-> Read CancelDomainTransferToAnotherAwsAccountResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CancelDomainTransferToAnotherAwsAccountResponse]
$creadListPrec :: ReadPrec [CancelDomainTransferToAnotherAwsAccountResponse]
readPrec :: ReadPrec CancelDomainTransferToAnotherAwsAccountResponse
$creadPrec :: ReadPrec CancelDomainTransferToAnotherAwsAccountResponse
readList :: ReadS [CancelDomainTransferToAnotherAwsAccountResponse]
$creadList :: ReadS [CancelDomainTransferToAnotherAwsAccountResponse]
readsPrec :: Int -> ReadS CancelDomainTransferToAnotherAwsAccountResponse
$creadsPrec :: Int -> ReadS CancelDomainTransferToAnotherAwsAccountResponse
Prelude.Read, Int -> CancelDomainTransferToAnotherAwsAccountResponse -> ShowS
[CancelDomainTransferToAnotherAwsAccountResponse] -> ShowS
CancelDomainTransferToAnotherAwsAccountResponse -> String
(Int -> CancelDomainTransferToAnotherAwsAccountResponse -> ShowS)
-> (CancelDomainTransferToAnotherAwsAccountResponse -> String)
-> ([CancelDomainTransferToAnotherAwsAccountResponse] -> ShowS)
-> Show CancelDomainTransferToAnotherAwsAccountResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CancelDomainTransferToAnotherAwsAccountResponse] -> ShowS
$cshowList :: [CancelDomainTransferToAnotherAwsAccountResponse] -> ShowS
show :: CancelDomainTransferToAnotherAwsAccountResponse -> String
$cshow :: CancelDomainTransferToAnotherAwsAccountResponse -> String
showsPrec :: Int -> CancelDomainTransferToAnotherAwsAccountResponse -> ShowS
$cshowsPrec :: Int -> CancelDomainTransferToAnotherAwsAccountResponse -> ShowS
Prelude.Show, (forall x.
CancelDomainTransferToAnotherAwsAccountResponse
-> Rep CancelDomainTransferToAnotherAwsAccountResponse x)
-> (forall x.
Rep CancelDomainTransferToAnotherAwsAccountResponse x
-> CancelDomainTransferToAnotherAwsAccountResponse)
-> Generic CancelDomainTransferToAnotherAwsAccountResponse
forall x.
Rep CancelDomainTransferToAnotherAwsAccountResponse x
-> CancelDomainTransferToAnotherAwsAccountResponse
forall x.
CancelDomainTransferToAnotherAwsAccountResponse
-> Rep CancelDomainTransferToAnotherAwsAccountResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CancelDomainTransferToAnotherAwsAccountResponse x
-> CancelDomainTransferToAnotherAwsAccountResponse
$cfrom :: forall x.
CancelDomainTransferToAnotherAwsAccountResponse
-> Rep CancelDomainTransferToAnotherAwsAccountResponse x
Prelude.Generic)
newCancelDomainTransferToAnotherAwsAccountResponse ::
Prelude.Int ->
CancelDomainTransferToAnotherAwsAccountResponse
newCancelDomainTransferToAnotherAwsAccountResponse :: Int -> CancelDomainTransferToAnotherAwsAccountResponse
newCancelDomainTransferToAnotherAwsAccountResponse
Int
pHttpStatus_ =
CancelDomainTransferToAnotherAwsAccountResponse' :: Maybe Text
-> Int -> CancelDomainTransferToAnotherAwsAccountResponse
CancelDomainTransferToAnotherAwsAccountResponse'
{ $sel:operationId:CancelDomainTransferToAnotherAwsAccountResponse' :: Maybe Text
operationId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CancelDomainTransferToAnotherAwsAccountResponse' :: Int
httpStatus = Int
pHttpStatus_
}
cancelDomainTransferToAnotherAwsAccountResponse_operationId :: Lens.Lens' CancelDomainTransferToAnotherAwsAccountResponse (Prelude.Maybe Prelude.Text)
cancelDomainTransferToAnotherAwsAccountResponse_operationId :: (Maybe Text -> f (Maybe Text))
-> CancelDomainTransferToAnotherAwsAccountResponse
-> f CancelDomainTransferToAnotherAwsAccountResponse
cancelDomainTransferToAnotherAwsAccountResponse_operationId = (CancelDomainTransferToAnotherAwsAccountResponse -> Maybe Text)
-> (CancelDomainTransferToAnotherAwsAccountResponse
-> Maybe Text -> CancelDomainTransferToAnotherAwsAccountResponse)
-> Lens
CancelDomainTransferToAnotherAwsAccountResponse
CancelDomainTransferToAnotherAwsAccountResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CancelDomainTransferToAnotherAwsAccountResponse' {Maybe Text
operationId :: Maybe Text
$sel:operationId:CancelDomainTransferToAnotherAwsAccountResponse' :: CancelDomainTransferToAnotherAwsAccountResponse -> Maybe Text
operationId} -> Maybe Text
operationId) (\s :: CancelDomainTransferToAnotherAwsAccountResponse
s@CancelDomainTransferToAnotherAwsAccountResponse' {} Maybe Text
a -> CancelDomainTransferToAnotherAwsAccountResponse
s {$sel:operationId:CancelDomainTransferToAnotherAwsAccountResponse' :: Maybe Text
operationId = Maybe Text
a} :: CancelDomainTransferToAnotherAwsAccountResponse)
cancelDomainTransferToAnotherAwsAccountResponse_httpStatus :: Lens.Lens' CancelDomainTransferToAnotherAwsAccountResponse Prelude.Int
cancelDomainTransferToAnotherAwsAccountResponse_httpStatus :: (Int -> f Int)
-> CancelDomainTransferToAnotherAwsAccountResponse
-> f CancelDomainTransferToAnotherAwsAccountResponse
cancelDomainTransferToAnotherAwsAccountResponse_httpStatus = (CancelDomainTransferToAnotherAwsAccountResponse -> Int)
-> (CancelDomainTransferToAnotherAwsAccountResponse
-> Int -> CancelDomainTransferToAnotherAwsAccountResponse)
-> Lens
CancelDomainTransferToAnotherAwsAccountResponse
CancelDomainTransferToAnotherAwsAccountResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CancelDomainTransferToAnotherAwsAccountResponse' {Int
httpStatus :: Int
$sel:httpStatus:CancelDomainTransferToAnotherAwsAccountResponse' :: CancelDomainTransferToAnotherAwsAccountResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CancelDomainTransferToAnotherAwsAccountResponse
s@CancelDomainTransferToAnotherAwsAccountResponse' {} Int
a -> CancelDomainTransferToAnotherAwsAccountResponse
s {$sel:httpStatus:CancelDomainTransferToAnotherAwsAccountResponse' :: Int
httpStatus = Int
a} :: CancelDomainTransferToAnotherAwsAccountResponse)
instance
Prelude.NFData
CancelDomainTransferToAnotherAwsAccountResponse