{-# 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.CreateReusableDelegationSet
(
CreateReusableDelegationSet (..),
newCreateReusableDelegationSet,
createReusableDelegationSet_hostedZoneId,
createReusableDelegationSet_callerReference,
CreateReusableDelegationSetResponse (..),
newCreateReusableDelegationSetResponse,
createReusableDelegationSetResponse_httpStatus,
createReusableDelegationSetResponse_delegationSet,
createReusableDelegationSetResponse_location,
)
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 CreateReusableDelegationSet = CreateReusableDelegationSet'
{
CreateReusableDelegationSet -> Maybe ResourceId
hostedZoneId :: Prelude.Maybe ResourceId,
CreateReusableDelegationSet -> Text
callerReference :: Prelude.Text
}
deriving (CreateReusableDelegationSet -> CreateReusableDelegationSet -> Bool
(CreateReusableDelegationSet
-> CreateReusableDelegationSet -> Bool)
-> (CreateReusableDelegationSet
-> CreateReusableDelegationSet -> Bool)
-> Eq CreateReusableDelegationSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateReusableDelegationSet -> CreateReusableDelegationSet -> Bool
$c/= :: CreateReusableDelegationSet -> CreateReusableDelegationSet -> Bool
== :: CreateReusableDelegationSet -> CreateReusableDelegationSet -> Bool
$c== :: CreateReusableDelegationSet -> CreateReusableDelegationSet -> Bool
Prelude.Eq, ReadPrec [CreateReusableDelegationSet]
ReadPrec CreateReusableDelegationSet
Int -> ReadS CreateReusableDelegationSet
ReadS [CreateReusableDelegationSet]
(Int -> ReadS CreateReusableDelegationSet)
-> ReadS [CreateReusableDelegationSet]
-> ReadPrec CreateReusableDelegationSet
-> ReadPrec [CreateReusableDelegationSet]
-> Read CreateReusableDelegationSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateReusableDelegationSet]
$creadListPrec :: ReadPrec [CreateReusableDelegationSet]
readPrec :: ReadPrec CreateReusableDelegationSet
$creadPrec :: ReadPrec CreateReusableDelegationSet
readList :: ReadS [CreateReusableDelegationSet]
$creadList :: ReadS [CreateReusableDelegationSet]
readsPrec :: Int -> ReadS CreateReusableDelegationSet
$creadsPrec :: Int -> ReadS CreateReusableDelegationSet
Prelude.Read, Int -> CreateReusableDelegationSet -> ShowS
[CreateReusableDelegationSet] -> ShowS
CreateReusableDelegationSet -> String
(Int -> CreateReusableDelegationSet -> ShowS)
-> (CreateReusableDelegationSet -> String)
-> ([CreateReusableDelegationSet] -> ShowS)
-> Show CreateReusableDelegationSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateReusableDelegationSet] -> ShowS
$cshowList :: [CreateReusableDelegationSet] -> ShowS
show :: CreateReusableDelegationSet -> String
$cshow :: CreateReusableDelegationSet -> String
showsPrec :: Int -> CreateReusableDelegationSet -> ShowS
$cshowsPrec :: Int -> CreateReusableDelegationSet -> ShowS
Prelude.Show, (forall x.
CreateReusableDelegationSet -> Rep CreateReusableDelegationSet x)
-> (forall x.
Rep CreateReusableDelegationSet x -> CreateReusableDelegationSet)
-> Generic CreateReusableDelegationSet
forall x.
Rep CreateReusableDelegationSet x -> CreateReusableDelegationSet
forall x.
CreateReusableDelegationSet -> Rep CreateReusableDelegationSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateReusableDelegationSet x -> CreateReusableDelegationSet
$cfrom :: forall x.
CreateReusableDelegationSet -> Rep CreateReusableDelegationSet x
Prelude.Generic)
newCreateReusableDelegationSet ::
Prelude.Text ->
CreateReusableDelegationSet
newCreateReusableDelegationSet :: Text -> CreateReusableDelegationSet
newCreateReusableDelegationSet Text
pCallerReference_ =
CreateReusableDelegationSet' :: Maybe ResourceId -> Text -> CreateReusableDelegationSet
CreateReusableDelegationSet'
{ $sel:hostedZoneId:CreateReusableDelegationSet' :: Maybe ResourceId
hostedZoneId =
Maybe ResourceId
forall a. Maybe a
Prelude.Nothing,
$sel:callerReference:CreateReusableDelegationSet' :: Text
callerReference = Text
pCallerReference_
}
createReusableDelegationSet_hostedZoneId :: Lens.Lens' CreateReusableDelegationSet (Prelude.Maybe ResourceId)
createReusableDelegationSet_hostedZoneId :: (Maybe ResourceId -> f (Maybe ResourceId))
-> CreateReusableDelegationSet -> f CreateReusableDelegationSet
createReusableDelegationSet_hostedZoneId = (CreateReusableDelegationSet -> Maybe ResourceId)
-> (CreateReusableDelegationSet
-> Maybe ResourceId -> CreateReusableDelegationSet)
-> Lens
CreateReusableDelegationSet
CreateReusableDelegationSet
(Maybe ResourceId)
(Maybe ResourceId)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReusableDelegationSet' {Maybe ResourceId
hostedZoneId :: Maybe ResourceId
$sel:hostedZoneId:CreateReusableDelegationSet' :: CreateReusableDelegationSet -> Maybe ResourceId
hostedZoneId} -> Maybe ResourceId
hostedZoneId) (\s :: CreateReusableDelegationSet
s@CreateReusableDelegationSet' {} Maybe ResourceId
a -> CreateReusableDelegationSet
s {$sel:hostedZoneId:CreateReusableDelegationSet' :: Maybe ResourceId
hostedZoneId = Maybe ResourceId
a} :: CreateReusableDelegationSet)
createReusableDelegationSet_callerReference :: Lens.Lens' CreateReusableDelegationSet Prelude.Text
createReusableDelegationSet_callerReference :: (Text -> f Text)
-> CreateReusableDelegationSet -> f CreateReusableDelegationSet
createReusableDelegationSet_callerReference = (CreateReusableDelegationSet -> Text)
-> (CreateReusableDelegationSet
-> Text -> CreateReusableDelegationSet)
-> Lens
CreateReusableDelegationSet CreateReusableDelegationSet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReusableDelegationSet' {Text
callerReference :: Text
$sel:callerReference:CreateReusableDelegationSet' :: CreateReusableDelegationSet -> Text
callerReference} -> Text
callerReference) (\s :: CreateReusableDelegationSet
s@CreateReusableDelegationSet' {} Text
a -> CreateReusableDelegationSet
s {$sel:callerReference:CreateReusableDelegationSet' :: Text
callerReference = Text
a} :: CreateReusableDelegationSet)
instance Core.AWSRequest CreateReusableDelegationSet where
type
AWSResponse CreateReusableDelegationSet =
CreateReusableDelegationSetResponse
request :: CreateReusableDelegationSet -> Request CreateReusableDelegationSet
request = Service
-> CreateReusableDelegationSet
-> Request CreateReusableDelegationSet
forall a. (ToRequest a, ToElement a) => Service -> a -> Request a
Request.postXML Service
defaultService
response :: Logger
-> Service
-> Proxy CreateReusableDelegationSet
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateReusableDelegationSet)))
response =
(Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse CreateReusableDelegationSet))
-> Logger
-> Service
-> Proxy CreateReusableDelegationSet
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateReusableDelegationSet)))
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 -> DelegationSet -> Text -> CreateReusableDelegationSetResponse
CreateReusableDelegationSetResponse'
(Int
-> DelegationSet -> Text -> CreateReusableDelegationSetResponse)
-> Either String Int
-> Either
String
(DelegationSet -> Text -> CreateReusableDelegationSetResponse)
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
(DelegationSet -> Text -> CreateReusableDelegationSetResponse)
-> Either String DelegationSet
-> Either String (Text -> CreateReusableDelegationSetResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String DelegationSet
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"DelegationSet")
Either String (Text -> CreateReusableDelegationSetResponse)
-> Either String Text
-> Either String CreateReusableDelegationSetResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String Text
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String a
Core..# HeaderName
"Location")
)
instance Prelude.Hashable CreateReusableDelegationSet
instance Prelude.NFData CreateReusableDelegationSet
instance Core.ToElement CreateReusableDelegationSet where
toElement :: CreateReusableDelegationSet -> Element
toElement =
Name -> CreateReusableDelegationSet -> Element
forall a. ToXML a => Name -> a -> Element
Core.mkElement
Name
"{https://route53.amazonaws.com/doc/2013-04-01/}CreateReusableDelegationSetRequest"
instance Core.ToHeaders CreateReusableDelegationSet where
toHeaders :: CreateReusableDelegationSet -> ResponseHeaders
toHeaders = ResponseHeaders -> CreateReusableDelegationSet -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath CreateReusableDelegationSet where
toPath :: CreateReusableDelegationSet -> ByteString
toPath = ByteString -> CreateReusableDelegationSet -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/2013-04-01/delegationset"
instance Core.ToQuery CreateReusableDelegationSet where
toQuery :: CreateReusableDelegationSet -> QueryString
toQuery = QueryString -> CreateReusableDelegationSet -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
instance Core.ToXML CreateReusableDelegationSet where
toXML :: CreateReusableDelegationSet -> XML
toXML CreateReusableDelegationSet' {Maybe ResourceId
Text
callerReference :: Text
hostedZoneId :: Maybe ResourceId
$sel:callerReference:CreateReusableDelegationSet' :: CreateReusableDelegationSet -> Text
$sel:hostedZoneId:CreateReusableDelegationSet' :: CreateReusableDelegationSet -> Maybe ResourceId
..} =
[XML] -> XML
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ Name
"HostedZoneId" Name -> Maybe ResourceId -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe ResourceId
hostedZoneId,
Name
"CallerReference" Name -> Text -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Text
callerReference
]
data CreateReusableDelegationSetResponse = CreateReusableDelegationSetResponse'
{
CreateReusableDelegationSetResponse -> Int
httpStatus :: Prelude.Int,
CreateReusableDelegationSetResponse -> DelegationSet
delegationSet :: DelegationSet,
CreateReusableDelegationSetResponse -> Text
location :: Prelude.Text
}
deriving (CreateReusableDelegationSetResponse
-> CreateReusableDelegationSetResponse -> Bool
(CreateReusableDelegationSetResponse
-> CreateReusableDelegationSetResponse -> Bool)
-> (CreateReusableDelegationSetResponse
-> CreateReusableDelegationSetResponse -> Bool)
-> Eq CreateReusableDelegationSetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateReusableDelegationSetResponse
-> CreateReusableDelegationSetResponse -> Bool
$c/= :: CreateReusableDelegationSetResponse
-> CreateReusableDelegationSetResponse -> Bool
== :: CreateReusableDelegationSetResponse
-> CreateReusableDelegationSetResponse -> Bool
$c== :: CreateReusableDelegationSetResponse
-> CreateReusableDelegationSetResponse -> Bool
Prelude.Eq, ReadPrec [CreateReusableDelegationSetResponse]
ReadPrec CreateReusableDelegationSetResponse
Int -> ReadS CreateReusableDelegationSetResponse
ReadS [CreateReusableDelegationSetResponse]
(Int -> ReadS CreateReusableDelegationSetResponse)
-> ReadS [CreateReusableDelegationSetResponse]
-> ReadPrec CreateReusableDelegationSetResponse
-> ReadPrec [CreateReusableDelegationSetResponse]
-> Read CreateReusableDelegationSetResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateReusableDelegationSetResponse]
$creadListPrec :: ReadPrec [CreateReusableDelegationSetResponse]
readPrec :: ReadPrec CreateReusableDelegationSetResponse
$creadPrec :: ReadPrec CreateReusableDelegationSetResponse
readList :: ReadS [CreateReusableDelegationSetResponse]
$creadList :: ReadS [CreateReusableDelegationSetResponse]
readsPrec :: Int -> ReadS CreateReusableDelegationSetResponse
$creadsPrec :: Int -> ReadS CreateReusableDelegationSetResponse
Prelude.Read, Int -> CreateReusableDelegationSetResponse -> ShowS
[CreateReusableDelegationSetResponse] -> ShowS
CreateReusableDelegationSetResponse -> String
(Int -> CreateReusableDelegationSetResponse -> ShowS)
-> (CreateReusableDelegationSetResponse -> String)
-> ([CreateReusableDelegationSetResponse] -> ShowS)
-> Show CreateReusableDelegationSetResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateReusableDelegationSetResponse] -> ShowS
$cshowList :: [CreateReusableDelegationSetResponse] -> ShowS
show :: CreateReusableDelegationSetResponse -> String
$cshow :: CreateReusableDelegationSetResponse -> String
showsPrec :: Int -> CreateReusableDelegationSetResponse -> ShowS
$cshowsPrec :: Int -> CreateReusableDelegationSetResponse -> ShowS
Prelude.Show, (forall x.
CreateReusableDelegationSetResponse
-> Rep CreateReusableDelegationSetResponse x)
-> (forall x.
Rep CreateReusableDelegationSetResponse x
-> CreateReusableDelegationSetResponse)
-> Generic CreateReusableDelegationSetResponse
forall x.
Rep CreateReusableDelegationSetResponse x
-> CreateReusableDelegationSetResponse
forall x.
CreateReusableDelegationSetResponse
-> Rep CreateReusableDelegationSetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateReusableDelegationSetResponse x
-> CreateReusableDelegationSetResponse
$cfrom :: forall x.
CreateReusableDelegationSetResponse
-> Rep CreateReusableDelegationSetResponse x
Prelude.Generic)
newCreateReusableDelegationSetResponse ::
Prelude.Int ->
DelegationSet ->
Prelude.Text ->
CreateReusableDelegationSetResponse
newCreateReusableDelegationSetResponse :: Int -> DelegationSet -> Text -> CreateReusableDelegationSetResponse
newCreateReusableDelegationSetResponse
Int
pHttpStatus_
DelegationSet
pDelegationSet_
Text
pLocation_ =
CreateReusableDelegationSetResponse' :: Int -> DelegationSet -> Text -> CreateReusableDelegationSetResponse
CreateReusableDelegationSetResponse'
{ $sel:httpStatus:CreateReusableDelegationSetResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:delegationSet:CreateReusableDelegationSetResponse' :: DelegationSet
delegationSet = DelegationSet
pDelegationSet_,
$sel:location:CreateReusableDelegationSetResponse' :: Text
location = Text
pLocation_
}
createReusableDelegationSetResponse_httpStatus :: Lens.Lens' CreateReusableDelegationSetResponse Prelude.Int
createReusableDelegationSetResponse_httpStatus :: (Int -> f Int)
-> CreateReusableDelegationSetResponse
-> f CreateReusableDelegationSetResponse
createReusableDelegationSetResponse_httpStatus = (CreateReusableDelegationSetResponse -> Int)
-> (CreateReusableDelegationSetResponse
-> Int -> CreateReusableDelegationSetResponse)
-> Lens
CreateReusableDelegationSetResponse
CreateReusableDelegationSetResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReusableDelegationSetResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateReusableDelegationSetResponse' :: CreateReusableDelegationSetResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateReusableDelegationSetResponse
s@CreateReusableDelegationSetResponse' {} Int
a -> CreateReusableDelegationSetResponse
s {$sel:httpStatus:CreateReusableDelegationSetResponse' :: Int
httpStatus = Int
a} :: CreateReusableDelegationSetResponse)
createReusableDelegationSetResponse_delegationSet :: Lens.Lens' CreateReusableDelegationSetResponse DelegationSet
createReusableDelegationSetResponse_delegationSet :: (DelegationSet -> f DelegationSet)
-> CreateReusableDelegationSetResponse
-> f CreateReusableDelegationSetResponse
createReusableDelegationSetResponse_delegationSet = (CreateReusableDelegationSetResponse -> DelegationSet)
-> (CreateReusableDelegationSetResponse
-> DelegationSet -> CreateReusableDelegationSetResponse)
-> Lens
CreateReusableDelegationSetResponse
CreateReusableDelegationSetResponse
DelegationSet
DelegationSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReusableDelegationSetResponse' {DelegationSet
delegationSet :: DelegationSet
$sel:delegationSet:CreateReusableDelegationSetResponse' :: CreateReusableDelegationSetResponse -> DelegationSet
delegationSet} -> DelegationSet
delegationSet) (\s :: CreateReusableDelegationSetResponse
s@CreateReusableDelegationSetResponse' {} DelegationSet
a -> CreateReusableDelegationSetResponse
s {$sel:delegationSet:CreateReusableDelegationSetResponse' :: DelegationSet
delegationSet = DelegationSet
a} :: CreateReusableDelegationSetResponse)
createReusableDelegationSetResponse_location :: Lens.Lens' CreateReusableDelegationSetResponse Prelude.Text
createReusableDelegationSetResponse_location :: (Text -> f Text)
-> CreateReusableDelegationSetResponse
-> f CreateReusableDelegationSetResponse
createReusableDelegationSetResponse_location = (CreateReusableDelegationSetResponse -> Text)
-> (CreateReusableDelegationSetResponse
-> Text -> CreateReusableDelegationSetResponse)
-> Lens
CreateReusableDelegationSetResponse
CreateReusableDelegationSetResponse
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReusableDelegationSetResponse' {Text
location :: Text
$sel:location:CreateReusableDelegationSetResponse' :: CreateReusableDelegationSetResponse -> Text
location} -> Text
location) (\s :: CreateReusableDelegationSetResponse
s@CreateReusableDelegationSetResponse' {} Text
a -> CreateReusableDelegationSetResponse
s {$sel:location:CreateReusableDelegationSetResponse' :: Text
location = Text
a} :: CreateReusableDelegationSetResponse)
instance
Prelude.NFData
CreateReusableDelegationSetResponse