{-# 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.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 CancelDomainTransferToAnotherAwsAccount = CancelDomainTransferToAnotherAwsAccount'
{
CancelDomainTransferToAnotherAwsAccount -> Text
domainName :: Prelude.Text
}
deriving (CancelDomainTransferToAnotherAwsAccount
-> CancelDomainTransferToAnotherAwsAccount -> Bool
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]
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
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.
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'
{ $sel:domainName:CancelDomainTransferToAnotherAwsAccount' :: Text
domainName =
Text
pDomainName_
}
cancelDomainTransferToAnotherAwsAccount_domainName :: Lens.Lens' CancelDomainTransferToAnotherAwsAccount Prelude.Text
cancelDomainTransferToAnotherAwsAccount_domainName :: Lens' CancelDomainTransferToAnotherAwsAccount Text
cancelDomainTransferToAnotherAwsAccount_domainName = 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 :: (Service -> Service)
-> CancelDomainTransferToAnotherAwsAccount
-> Request CancelDomainTransferToAnotherAwsAccount
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 CancelDomainTransferToAnotherAwsAccount
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse CancelDomainTransferToAnotherAwsAccount)))
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 -> CancelDomainTransferToAnotherAwsAccountResponse
CancelDomainTransferToAnotherAwsAccountResponse'
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
CancelDomainTransferToAnotherAwsAccount
where
hashWithSalt :: Int -> CancelDomainTransferToAnotherAwsAccount -> Int
hashWithSalt
Int
_salt
CancelDomainTransferToAnotherAwsAccount' {Text
domainName :: Text
$sel:domainName:CancelDomainTransferToAnotherAwsAccount' :: CancelDomainTransferToAnotherAwsAccount -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
domainName
instance
Prelude.NFData
CancelDomainTransferToAnotherAwsAccount
where
rnf :: CancelDomainTransferToAnotherAwsAccount -> ()
rnf CancelDomainTransferToAnotherAwsAccount' {Text
domainName :: Text
$sel:domainName:CancelDomainTransferToAnotherAwsAccount' :: CancelDomainTransferToAnotherAwsAccount -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
domainName
instance
Data.ToHeaders
CancelDomainTransferToAnotherAwsAccount
where
toHeaders :: CancelDomainTransferToAnotherAwsAccount -> 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.CancelDomainTransferToAnotherAwsAccount" ::
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
CancelDomainTransferToAnotherAwsAccount
where
toJSON :: CancelDomainTransferToAnotherAwsAccount -> Value
toJSON CancelDomainTransferToAnotherAwsAccount' {Text
domainName :: Text
$sel:domainName:CancelDomainTransferToAnotherAwsAccount' :: CancelDomainTransferToAnotherAwsAccount -> 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
CancelDomainTransferToAnotherAwsAccount
where
toPath :: CancelDomainTransferToAnotherAwsAccount -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Data.ToQuery
CancelDomainTransferToAnotherAwsAccount
where
toQuery :: CancelDomainTransferToAnotherAwsAccount -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const 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
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]
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
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.
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'
{ $sel:operationId:CancelDomainTransferToAnotherAwsAccountResponse' :: Maybe Text
operationId =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CancelDomainTransferToAnotherAwsAccountResponse' :: Int
httpStatus = Int
pHttpStatus_
}
cancelDomainTransferToAnotherAwsAccountResponse_operationId :: Lens.Lens' CancelDomainTransferToAnotherAwsAccountResponse (Prelude.Maybe Prelude.Text)
cancelDomainTransferToAnotherAwsAccountResponse_operationId :: Lens' CancelDomainTransferToAnotherAwsAccountResponse (Maybe Text)
cancelDomainTransferToAnotherAwsAccountResponse_operationId = 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 :: Lens' CancelDomainTransferToAnotherAwsAccountResponse Int
cancelDomainTransferToAnotherAwsAccountResponse_httpStatus = 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
where
rnf :: CancelDomainTransferToAnotherAwsAccountResponse -> ()
rnf
CancelDomainTransferToAnotherAwsAccountResponse' {Int
Maybe Text
httpStatus :: Int
operationId :: Maybe Text
$sel:httpStatus:CancelDomainTransferToAnotherAwsAccountResponse' :: CancelDomainTransferToAnotherAwsAccountResponse -> Int
$sel:operationId:CancelDomainTransferToAnotherAwsAccountResponse' :: CancelDomainTransferToAnotherAwsAccountResponse -> 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