{-# 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.Route53.EnableHostedZoneDNSSEC
(
EnableHostedZoneDNSSEC (..),
newEnableHostedZoneDNSSEC,
enableHostedZoneDNSSEC_hostedZoneId,
EnableHostedZoneDNSSECResponse (..),
newEnableHostedZoneDNSSECResponse,
enableHostedZoneDNSSECResponse_httpStatus,
enableHostedZoneDNSSECResponse_changeInfo,
)
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.Route53.Types
data EnableHostedZoneDNSSEC = EnableHostedZoneDNSSEC'
{
EnableHostedZoneDNSSEC -> ResourceId
hostedZoneId :: ResourceId
}
deriving (EnableHostedZoneDNSSEC -> EnableHostedZoneDNSSEC -> Bool
(EnableHostedZoneDNSSEC -> EnableHostedZoneDNSSEC -> Bool)
-> (EnableHostedZoneDNSSEC -> EnableHostedZoneDNSSEC -> Bool)
-> Eq EnableHostedZoneDNSSEC
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EnableHostedZoneDNSSEC -> EnableHostedZoneDNSSEC -> Bool
$c/= :: EnableHostedZoneDNSSEC -> EnableHostedZoneDNSSEC -> Bool
== :: EnableHostedZoneDNSSEC -> EnableHostedZoneDNSSEC -> Bool
$c== :: EnableHostedZoneDNSSEC -> EnableHostedZoneDNSSEC -> Bool
Prelude.Eq, ReadPrec [EnableHostedZoneDNSSEC]
ReadPrec EnableHostedZoneDNSSEC
Int -> ReadS EnableHostedZoneDNSSEC
ReadS [EnableHostedZoneDNSSEC]
(Int -> ReadS EnableHostedZoneDNSSEC)
-> ReadS [EnableHostedZoneDNSSEC]
-> ReadPrec EnableHostedZoneDNSSEC
-> ReadPrec [EnableHostedZoneDNSSEC]
-> Read EnableHostedZoneDNSSEC
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EnableHostedZoneDNSSEC]
$creadListPrec :: ReadPrec [EnableHostedZoneDNSSEC]
readPrec :: ReadPrec EnableHostedZoneDNSSEC
$creadPrec :: ReadPrec EnableHostedZoneDNSSEC
readList :: ReadS [EnableHostedZoneDNSSEC]
$creadList :: ReadS [EnableHostedZoneDNSSEC]
readsPrec :: Int -> ReadS EnableHostedZoneDNSSEC
$creadsPrec :: Int -> ReadS EnableHostedZoneDNSSEC
Prelude.Read, Int -> EnableHostedZoneDNSSEC -> ShowS
[EnableHostedZoneDNSSEC] -> ShowS
EnableHostedZoneDNSSEC -> String
(Int -> EnableHostedZoneDNSSEC -> ShowS)
-> (EnableHostedZoneDNSSEC -> String)
-> ([EnableHostedZoneDNSSEC] -> ShowS)
-> Show EnableHostedZoneDNSSEC
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EnableHostedZoneDNSSEC] -> ShowS
$cshowList :: [EnableHostedZoneDNSSEC] -> ShowS
show :: EnableHostedZoneDNSSEC -> String
$cshow :: EnableHostedZoneDNSSEC -> String
showsPrec :: Int -> EnableHostedZoneDNSSEC -> ShowS
$cshowsPrec :: Int -> EnableHostedZoneDNSSEC -> ShowS
Prelude.Show, (forall x. EnableHostedZoneDNSSEC -> Rep EnableHostedZoneDNSSEC x)
-> (forall x.
Rep EnableHostedZoneDNSSEC x -> EnableHostedZoneDNSSEC)
-> Generic EnableHostedZoneDNSSEC
forall x. Rep EnableHostedZoneDNSSEC x -> EnableHostedZoneDNSSEC
forall x. EnableHostedZoneDNSSEC -> Rep EnableHostedZoneDNSSEC x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EnableHostedZoneDNSSEC x -> EnableHostedZoneDNSSEC
$cfrom :: forall x. EnableHostedZoneDNSSEC -> Rep EnableHostedZoneDNSSEC x
Prelude.Generic)
newEnableHostedZoneDNSSEC ::
ResourceId ->
EnableHostedZoneDNSSEC
newEnableHostedZoneDNSSEC :: ResourceId -> EnableHostedZoneDNSSEC
newEnableHostedZoneDNSSEC ResourceId
pHostedZoneId_ =
EnableHostedZoneDNSSEC' :: ResourceId -> EnableHostedZoneDNSSEC
EnableHostedZoneDNSSEC'
{ $sel:hostedZoneId:EnableHostedZoneDNSSEC' :: ResourceId
hostedZoneId =
ResourceId
pHostedZoneId_
}
enableHostedZoneDNSSEC_hostedZoneId :: Lens.Lens' EnableHostedZoneDNSSEC ResourceId
enableHostedZoneDNSSEC_hostedZoneId :: (ResourceId -> f ResourceId)
-> EnableHostedZoneDNSSEC -> f EnableHostedZoneDNSSEC
enableHostedZoneDNSSEC_hostedZoneId = (EnableHostedZoneDNSSEC -> ResourceId)
-> (EnableHostedZoneDNSSEC -> ResourceId -> EnableHostedZoneDNSSEC)
-> Lens
EnableHostedZoneDNSSEC EnableHostedZoneDNSSEC ResourceId ResourceId
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnableHostedZoneDNSSEC' {ResourceId
hostedZoneId :: ResourceId
$sel:hostedZoneId:EnableHostedZoneDNSSEC' :: EnableHostedZoneDNSSEC -> ResourceId
hostedZoneId} -> ResourceId
hostedZoneId) (\s :: EnableHostedZoneDNSSEC
s@EnableHostedZoneDNSSEC' {} ResourceId
a -> EnableHostedZoneDNSSEC
s {$sel:hostedZoneId:EnableHostedZoneDNSSEC' :: ResourceId
hostedZoneId = ResourceId
a} :: EnableHostedZoneDNSSEC)
instance Core.AWSRequest EnableHostedZoneDNSSEC where
type
AWSResponse EnableHostedZoneDNSSEC =
EnableHostedZoneDNSSECResponse
request :: EnableHostedZoneDNSSEC -> Request EnableHostedZoneDNSSEC
request = Service -> EnableHostedZoneDNSSEC -> Request EnableHostedZoneDNSSEC
forall a. ToRequest a => Service -> a -> Request a
Request.post Service
defaultService
response :: Logger
-> Service
-> Proxy EnableHostedZoneDNSSEC
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse EnableHostedZoneDNSSEC)))
response =
(Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse EnableHostedZoneDNSSEC))
-> Logger
-> Service
-> Proxy EnableHostedZoneDNSSEC
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse EnableHostedZoneDNSSEC)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
( \Int
s ResponseHeaders
h [Node]
x ->
Int -> ChangeInfo -> EnableHostedZoneDNSSECResponse
EnableHostedZoneDNSSECResponse'
(Int -> ChangeInfo -> EnableHostedZoneDNSSECResponse)
-> Either String Int
-> Either String (ChangeInfo -> EnableHostedZoneDNSSECResponse)
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 (ChangeInfo -> EnableHostedZoneDNSSECResponse)
-> Either String ChangeInfo
-> Either String EnableHostedZoneDNSSECResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String ChangeInfo
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"ChangeInfo")
)
instance Prelude.Hashable EnableHostedZoneDNSSEC
instance Prelude.NFData EnableHostedZoneDNSSEC
instance Core.ToHeaders EnableHostedZoneDNSSEC where
toHeaders :: EnableHostedZoneDNSSEC -> ResponseHeaders
toHeaders = ResponseHeaders -> EnableHostedZoneDNSSEC -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath EnableHostedZoneDNSSEC where
toPath :: EnableHostedZoneDNSSEC -> ByteString
toPath EnableHostedZoneDNSSEC' {ResourceId
hostedZoneId :: ResourceId
$sel:hostedZoneId:EnableHostedZoneDNSSEC' :: EnableHostedZoneDNSSEC -> ResourceId
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/2013-04-01/hostedzone/",
ResourceId -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS ResourceId
hostedZoneId,
ByteString
"/enable-dnssec"
]
instance Core.ToQuery EnableHostedZoneDNSSEC where
toQuery :: EnableHostedZoneDNSSEC -> QueryString
toQuery = QueryString -> EnableHostedZoneDNSSEC -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data EnableHostedZoneDNSSECResponse = EnableHostedZoneDNSSECResponse'
{
EnableHostedZoneDNSSECResponse -> Int
httpStatus :: Prelude.Int,
EnableHostedZoneDNSSECResponse -> ChangeInfo
changeInfo :: ChangeInfo
}
deriving (EnableHostedZoneDNSSECResponse
-> EnableHostedZoneDNSSECResponse -> Bool
(EnableHostedZoneDNSSECResponse
-> EnableHostedZoneDNSSECResponse -> Bool)
-> (EnableHostedZoneDNSSECResponse
-> EnableHostedZoneDNSSECResponse -> Bool)
-> Eq EnableHostedZoneDNSSECResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EnableHostedZoneDNSSECResponse
-> EnableHostedZoneDNSSECResponse -> Bool
$c/= :: EnableHostedZoneDNSSECResponse
-> EnableHostedZoneDNSSECResponse -> Bool
== :: EnableHostedZoneDNSSECResponse
-> EnableHostedZoneDNSSECResponse -> Bool
$c== :: EnableHostedZoneDNSSECResponse
-> EnableHostedZoneDNSSECResponse -> Bool
Prelude.Eq, ReadPrec [EnableHostedZoneDNSSECResponse]
ReadPrec EnableHostedZoneDNSSECResponse
Int -> ReadS EnableHostedZoneDNSSECResponse
ReadS [EnableHostedZoneDNSSECResponse]
(Int -> ReadS EnableHostedZoneDNSSECResponse)
-> ReadS [EnableHostedZoneDNSSECResponse]
-> ReadPrec EnableHostedZoneDNSSECResponse
-> ReadPrec [EnableHostedZoneDNSSECResponse]
-> Read EnableHostedZoneDNSSECResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EnableHostedZoneDNSSECResponse]
$creadListPrec :: ReadPrec [EnableHostedZoneDNSSECResponse]
readPrec :: ReadPrec EnableHostedZoneDNSSECResponse
$creadPrec :: ReadPrec EnableHostedZoneDNSSECResponse
readList :: ReadS [EnableHostedZoneDNSSECResponse]
$creadList :: ReadS [EnableHostedZoneDNSSECResponse]
readsPrec :: Int -> ReadS EnableHostedZoneDNSSECResponse
$creadsPrec :: Int -> ReadS EnableHostedZoneDNSSECResponse
Prelude.Read, Int -> EnableHostedZoneDNSSECResponse -> ShowS
[EnableHostedZoneDNSSECResponse] -> ShowS
EnableHostedZoneDNSSECResponse -> String
(Int -> EnableHostedZoneDNSSECResponse -> ShowS)
-> (EnableHostedZoneDNSSECResponse -> String)
-> ([EnableHostedZoneDNSSECResponse] -> ShowS)
-> Show EnableHostedZoneDNSSECResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EnableHostedZoneDNSSECResponse] -> ShowS
$cshowList :: [EnableHostedZoneDNSSECResponse] -> ShowS
show :: EnableHostedZoneDNSSECResponse -> String
$cshow :: EnableHostedZoneDNSSECResponse -> String
showsPrec :: Int -> EnableHostedZoneDNSSECResponse -> ShowS
$cshowsPrec :: Int -> EnableHostedZoneDNSSECResponse -> ShowS
Prelude.Show, (forall x.
EnableHostedZoneDNSSECResponse
-> Rep EnableHostedZoneDNSSECResponse x)
-> (forall x.
Rep EnableHostedZoneDNSSECResponse x
-> EnableHostedZoneDNSSECResponse)
-> Generic EnableHostedZoneDNSSECResponse
forall x.
Rep EnableHostedZoneDNSSECResponse x
-> EnableHostedZoneDNSSECResponse
forall x.
EnableHostedZoneDNSSECResponse
-> Rep EnableHostedZoneDNSSECResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep EnableHostedZoneDNSSECResponse x
-> EnableHostedZoneDNSSECResponse
$cfrom :: forall x.
EnableHostedZoneDNSSECResponse
-> Rep EnableHostedZoneDNSSECResponse x
Prelude.Generic)
newEnableHostedZoneDNSSECResponse ::
Prelude.Int ->
ChangeInfo ->
EnableHostedZoneDNSSECResponse
newEnableHostedZoneDNSSECResponse :: Int -> ChangeInfo -> EnableHostedZoneDNSSECResponse
newEnableHostedZoneDNSSECResponse
Int
pHttpStatus_
ChangeInfo
pChangeInfo_ =
EnableHostedZoneDNSSECResponse' :: Int -> ChangeInfo -> EnableHostedZoneDNSSECResponse
EnableHostedZoneDNSSECResponse'
{ $sel:httpStatus:EnableHostedZoneDNSSECResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:changeInfo:EnableHostedZoneDNSSECResponse' :: ChangeInfo
changeInfo = ChangeInfo
pChangeInfo_
}
enableHostedZoneDNSSECResponse_httpStatus :: Lens.Lens' EnableHostedZoneDNSSECResponse Prelude.Int
enableHostedZoneDNSSECResponse_httpStatus :: (Int -> f Int)
-> EnableHostedZoneDNSSECResponse
-> f EnableHostedZoneDNSSECResponse
enableHostedZoneDNSSECResponse_httpStatus = (EnableHostedZoneDNSSECResponse -> Int)
-> (EnableHostedZoneDNSSECResponse
-> Int -> EnableHostedZoneDNSSECResponse)
-> Lens
EnableHostedZoneDNSSECResponse
EnableHostedZoneDNSSECResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnableHostedZoneDNSSECResponse' {Int
httpStatus :: Int
$sel:httpStatus:EnableHostedZoneDNSSECResponse' :: EnableHostedZoneDNSSECResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: EnableHostedZoneDNSSECResponse
s@EnableHostedZoneDNSSECResponse' {} Int
a -> EnableHostedZoneDNSSECResponse
s {$sel:httpStatus:EnableHostedZoneDNSSECResponse' :: Int
httpStatus = Int
a} :: EnableHostedZoneDNSSECResponse)
enableHostedZoneDNSSECResponse_changeInfo :: Lens.Lens' EnableHostedZoneDNSSECResponse ChangeInfo
enableHostedZoneDNSSECResponse_changeInfo :: (ChangeInfo -> f ChangeInfo)
-> EnableHostedZoneDNSSECResponse
-> f EnableHostedZoneDNSSECResponse
enableHostedZoneDNSSECResponse_changeInfo = (EnableHostedZoneDNSSECResponse -> ChangeInfo)
-> (EnableHostedZoneDNSSECResponse
-> ChangeInfo -> EnableHostedZoneDNSSECResponse)
-> Lens
EnableHostedZoneDNSSECResponse
EnableHostedZoneDNSSECResponse
ChangeInfo
ChangeInfo
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnableHostedZoneDNSSECResponse' {ChangeInfo
changeInfo :: ChangeInfo
$sel:changeInfo:EnableHostedZoneDNSSECResponse' :: EnableHostedZoneDNSSECResponse -> ChangeInfo
changeInfo} -> ChangeInfo
changeInfo) (\s :: EnableHostedZoneDNSSECResponse
s@EnableHostedZoneDNSSECResponse' {} ChangeInfo
a -> EnableHostedZoneDNSSECResponse
s {$sel:changeInfo:EnableHostedZoneDNSSECResponse' :: ChangeInfo
changeInfo = ChangeInfo
a} :: EnableHostedZoneDNSSECResponse)
instance
Prelude.NFData
EnableHostedZoneDNSSECResponse