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