{-# 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.EnableDomainAutoRenew
(
EnableDomainAutoRenew (..),
newEnableDomainAutoRenew,
enableDomainAutoRenew_domainName,
EnableDomainAutoRenewResponse (..),
newEnableDomainAutoRenewResponse,
enableDomainAutoRenewResponse_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 EnableDomainAutoRenew = EnableDomainAutoRenew'
{
EnableDomainAutoRenew -> Text
domainName :: Prelude.Text
}
deriving (EnableDomainAutoRenew -> EnableDomainAutoRenew -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EnableDomainAutoRenew -> EnableDomainAutoRenew -> Bool
$c/= :: EnableDomainAutoRenew -> EnableDomainAutoRenew -> Bool
== :: EnableDomainAutoRenew -> EnableDomainAutoRenew -> Bool
$c== :: EnableDomainAutoRenew -> EnableDomainAutoRenew -> Bool
Prelude.Eq, ReadPrec [EnableDomainAutoRenew]
ReadPrec EnableDomainAutoRenew
Int -> ReadS EnableDomainAutoRenew
ReadS [EnableDomainAutoRenew]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EnableDomainAutoRenew]
$creadListPrec :: ReadPrec [EnableDomainAutoRenew]
readPrec :: ReadPrec EnableDomainAutoRenew
$creadPrec :: ReadPrec EnableDomainAutoRenew
readList :: ReadS [EnableDomainAutoRenew]
$creadList :: ReadS [EnableDomainAutoRenew]
readsPrec :: Int -> ReadS EnableDomainAutoRenew
$creadsPrec :: Int -> ReadS EnableDomainAutoRenew
Prelude.Read, Int -> EnableDomainAutoRenew -> ShowS
[EnableDomainAutoRenew] -> ShowS
EnableDomainAutoRenew -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EnableDomainAutoRenew] -> ShowS
$cshowList :: [EnableDomainAutoRenew] -> ShowS
show :: EnableDomainAutoRenew -> String
$cshow :: EnableDomainAutoRenew -> String
showsPrec :: Int -> EnableDomainAutoRenew -> ShowS
$cshowsPrec :: Int -> EnableDomainAutoRenew -> ShowS
Prelude.Show, forall x. Rep EnableDomainAutoRenew x -> EnableDomainAutoRenew
forall x. EnableDomainAutoRenew -> Rep EnableDomainAutoRenew x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EnableDomainAutoRenew x -> EnableDomainAutoRenew
$cfrom :: forall x. EnableDomainAutoRenew -> Rep EnableDomainAutoRenew x
Prelude.Generic)
newEnableDomainAutoRenew ::
Prelude.Text ->
EnableDomainAutoRenew
newEnableDomainAutoRenew :: Text -> EnableDomainAutoRenew
newEnableDomainAutoRenew Text
pDomainName_ =
EnableDomainAutoRenew' {$sel:domainName:EnableDomainAutoRenew' :: Text
domainName = Text
pDomainName_}
enableDomainAutoRenew_domainName :: Lens.Lens' EnableDomainAutoRenew Prelude.Text
enableDomainAutoRenew_domainName :: Lens' EnableDomainAutoRenew Text
enableDomainAutoRenew_domainName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnableDomainAutoRenew' {Text
domainName :: Text
$sel:domainName:EnableDomainAutoRenew' :: EnableDomainAutoRenew -> Text
domainName} -> Text
domainName) (\s :: EnableDomainAutoRenew
s@EnableDomainAutoRenew' {} Text
a -> EnableDomainAutoRenew
s {$sel:domainName:EnableDomainAutoRenew' :: Text
domainName = Text
a} :: EnableDomainAutoRenew)
instance Core.AWSRequest EnableDomainAutoRenew where
type
AWSResponse EnableDomainAutoRenew =
EnableDomainAutoRenewResponse
request :: (Service -> Service)
-> EnableDomainAutoRenew -> Request EnableDomainAutoRenew
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 EnableDomainAutoRenew
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse EnableDomainAutoRenew)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> EnableDomainAutoRenewResponse
EnableDomainAutoRenewResponse'
forall (f :: * -> *) a b. Functor 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 EnableDomainAutoRenew where
hashWithSalt :: Int -> EnableDomainAutoRenew -> Int
hashWithSalt Int
_salt EnableDomainAutoRenew' {Text
domainName :: Text
$sel:domainName:EnableDomainAutoRenew' :: EnableDomainAutoRenew -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
domainName
instance Prelude.NFData EnableDomainAutoRenew where
rnf :: EnableDomainAutoRenew -> ()
rnf EnableDomainAutoRenew' {Text
domainName :: Text
$sel:domainName:EnableDomainAutoRenew' :: EnableDomainAutoRenew -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
domainName
instance Data.ToHeaders EnableDomainAutoRenew where
toHeaders :: EnableDomainAutoRenew -> 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.EnableDomainAutoRenew" ::
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 EnableDomainAutoRenew where
toJSON :: EnableDomainAutoRenew -> Value
toJSON EnableDomainAutoRenew' {Text
domainName :: Text
$sel:domainName:EnableDomainAutoRenew' :: EnableDomainAutoRenew -> 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 EnableDomainAutoRenew where
toPath :: EnableDomainAutoRenew -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery EnableDomainAutoRenew where
toQuery :: EnableDomainAutoRenew -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data EnableDomainAutoRenewResponse = EnableDomainAutoRenewResponse'
{
EnableDomainAutoRenewResponse -> Int
httpStatus :: Prelude.Int
}
deriving (EnableDomainAutoRenewResponse
-> EnableDomainAutoRenewResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EnableDomainAutoRenewResponse
-> EnableDomainAutoRenewResponse -> Bool
$c/= :: EnableDomainAutoRenewResponse
-> EnableDomainAutoRenewResponse -> Bool
== :: EnableDomainAutoRenewResponse
-> EnableDomainAutoRenewResponse -> Bool
$c== :: EnableDomainAutoRenewResponse
-> EnableDomainAutoRenewResponse -> Bool
Prelude.Eq, ReadPrec [EnableDomainAutoRenewResponse]
ReadPrec EnableDomainAutoRenewResponse
Int -> ReadS EnableDomainAutoRenewResponse
ReadS [EnableDomainAutoRenewResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EnableDomainAutoRenewResponse]
$creadListPrec :: ReadPrec [EnableDomainAutoRenewResponse]
readPrec :: ReadPrec EnableDomainAutoRenewResponse
$creadPrec :: ReadPrec EnableDomainAutoRenewResponse
readList :: ReadS [EnableDomainAutoRenewResponse]
$creadList :: ReadS [EnableDomainAutoRenewResponse]
readsPrec :: Int -> ReadS EnableDomainAutoRenewResponse
$creadsPrec :: Int -> ReadS EnableDomainAutoRenewResponse
Prelude.Read, Int -> EnableDomainAutoRenewResponse -> ShowS
[EnableDomainAutoRenewResponse] -> ShowS
EnableDomainAutoRenewResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EnableDomainAutoRenewResponse] -> ShowS
$cshowList :: [EnableDomainAutoRenewResponse] -> ShowS
show :: EnableDomainAutoRenewResponse -> String
$cshow :: EnableDomainAutoRenewResponse -> String
showsPrec :: Int -> EnableDomainAutoRenewResponse -> ShowS
$cshowsPrec :: Int -> EnableDomainAutoRenewResponse -> ShowS
Prelude.Show, forall x.
Rep EnableDomainAutoRenewResponse x
-> EnableDomainAutoRenewResponse
forall x.
EnableDomainAutoRenewResponse
-> Rep EnableDomainAutoRenewResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep EnableDomainAutoRenewResponse x
-> EnableDomainAutoRenewResponse
$cfrom :: forall x.
EnableDomainAutoRenewResponse
-> Rep EnableDomainAutoRenewResponse x
Prelude.Generic)
newEnableDomainAutoRenewResponse ::
Prelude.Int ->
EnableDomainAutoRenewResponse
newEnableDomainAutoRenewResponse :: Int -> EnableDomainAutoRenewResponse
newEnableDomainAutoRenewResponse Int
pHttpStatus_ =
EnableDomainAutoRenewResponse'
{ $sel:httpStatus:EnableDomainAutoRenewResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
enableDomainAutoRenewResponse_httpStatus :: Lens.Lens' EnableDomainAutoRenewResponse Prelude.Int
enableDomainAutoRenewResponse_httpStatus :: Lens' EnableDomainAutoRenewResponse Int
enableDomainAutoRenewResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnableDomainAutoRenewResponse' {Int
httpStatus :: Int
$sel:httpStatus:EnableDomainAutoRenewResponse' :: EnableDomainAutoRenewResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: EnableDomainAutoRenewResponse
s@EnableDomainAutoRenewResponse' {} Int
a -> EnableDomainAutoRenewResponse
s {$sel:httpStatus:EnableDomainAutoRenewResponse' :: Int
httpStatus = Int
a} :: EnableDomainAutoRenewResponse)
instance Prelude.NFData EnableDomainAutoRenewResponse where
rnf :: EnableDomainAutoRenewResponse -> ()
rnf EnableDomainAutoRenewResponse' {Int
httpStatus :: Int
$sel:httpStatus:EnableDomainAutoRenewResponse' :: EnableDomainAutoRenewResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus