{-# 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.GetReusableDelegationSet
(
GetReusableDelegationSet (..),
newGetReusableDelegationSet,
getReusableDelegationSet_id,
GetReusableDelegationSetResponse (..),
newGetReusableDelegationSetResponse,
getReusableDelegationSetResponse_httpStatus,
getReusableDelegationSetResponse_delegationSet,
)
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 GetReusableDelegationSet = GetReusableDelegationSet'
{
GetReusableDelegationSet -> ResourceId
id :: ResourceId
}
deriving (GetReusableDelegationSet -> GetReusableDelegationSet -> Bool
(GetReusableDelegationSet -> GetReusableDelegationSet -> Bool)
-> (GetReusableDelegationSet -> GetReusableDelegationSet -> Bool)
-> Eq GetReusableDelegationSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetReusableDelegationSet -> GetReusableDelegationSet -> Bool
$c/= :: GetReusableDelegationSet -> GetReusableDelegationSet -> Bool
== :: GetReusableDelegationSet -> GetReusableDelegationSet -> Bool
$c== :: GetReusableDelegationSet -> GetReusableDelegationSet -> Bool
Prelude.Eq, ReadPrec [GetReusableDelegationSet]
ReadPrec GetReusableDelegationSet
Int -> ReadS GetReusableDelegationSet
ReadS [GetReusableDelegationSet]
(Int -> ReadS GetReusableDelegationSet)
-> ReadS [GetReusableDelegationSet]
-> ReadPrec GetReusableDelegationSet
-> ReadPrec [GetReusableDelegationSet]
-> Read GetReusableDelegationSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetReusableDelegationSet]
$creadListPrec :: ReadPrec [GetReusableDelegationSet]
readPrec :: ReadPrec GetReusableDelegationSet
$creadPrec :: ReadPrec GetReusableDelegationSet
readList :: ReadS [GetReusableDelegationSet]
$creadList :: ReadS [GetReusableDelegationSet]
readsPrec :: Int -> ReadS GetReusableDelegationSet
$creadsPrec :: Int -> ReadS GetReusableDelegationSet
Prelude.Read, Int -> GetReusableDelegationSet -> ShowS
[GetReusableDelegationSet] -> ShowS
GetReusableDelegationSet -> String
(Int -> GetReusableDelegationSet -> ShowS)
-> (GetReusableDelegationSet -> String)
-> ([GetReusableDelegationSet] -> ShowS)
-> Show GetReusableDelegationSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetReusableDelegationSet] -> ShowS
$cshowList :: [GetReusableDelegationSet] -> ShowS
show :: GetReusableDelegationSet -> String
$cshow :: GetReusableDelegationSet -> String
showsPrec :: Int -> GetReusableDelegationSet -> ShowS
$cshowsPrec :: Int -> GetReusableDelegationSet -> ShowS
Prelude.Show, (forall x.
GetReusableDelegationSet -> Rep GetReusableDelegationSet x)
-> (forall x.
Rep GetReusableDelegationSet x -> GetReusableDelegationSet)
-> Generic GetReusableDelegationSet
forall x.
Rep GetReusableDelegationSet x -> GetReusableDelegationSet
forall x.
GetReusableDelegationSet -> Rep GetReusableDelegationSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetReusableDelegationSet x -> GetReusableDelegationSet
$cfrom :: forall x.
GetReusableDelegationSet -> Rep GetReusableDelegationSet x
Prelude.Generic)
newGetReusableDelegationSet ::
ResourceId ->
GetReusableDelegationSet
newGetReusableDelegationSet :: ResourceId -> GetReusableDelegationSet
newGetReusableDelegationSet ResourceId
pId_ =
GetReusableDelegationSet' :: ResourceId -> GetReusableDelegationSet
GetReusableDelegationSet' {$sel:id:GetReusableDelegationSet' :: ResourceId
id = ResourceId
pId_}
getReusableDelegationSet_id :: Lens.Lens' GetReusableDelegationSet ResourceId
getReusableDelegationSet_id :: (ResourceId -> f ResourceId)
-> GetReusableDelegationSet -> f GetReusableDelegationSet
getReusableDelegationSet_id = (GetReusableDelegationSet -> ResourceId)
-> (GetReusableDelegationSet
-> ResourceId -> GetReusableDelegationSet)
-> Lens
GetReusableDelegationSet
GetReusableDelegationSet
ResourceId
ResourceId
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetReusableDelegationSet' {ResourceId
id :: ResourceId
$sel:id:GetReusableDelegationSet' :: GetReusableDelegationSet -> ResourceId
id} -> ResourceId
id) (\s :: GetReusableDelegationSet
s@GetReusableDelegationSet' {} ResourceId
a -> GetReusableDelegationSet
s {$sel:id:GetReusableDelegationSet' :: ResourceId
id = ResourceId
a} :: GetReusableDelegationSet)
instance Core.AWSRequest GetReusableDelegationSet where
type
AWSResponse GetReusableDelegationSet =
GetReusableDelegationSetResponse
request :: GetReusableDelegationSet -> Request GetReusableDelegationSet
request = Service
-> GetReusableDelegationSet -> Request GetReusableDelegationSet
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy GetReusableDelegationSet
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetReusableDelegationSet)))
response =
(Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse GetReusableDelegationSet))
-> Logger
-> Service
-> Proxy GetReusableDelegationSet
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetReusableDelegationSet)))
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 -> GetReusableDelegationSetResponse
GetReusableDelegationSetResponse'
(Int -> DelegationSet -> GetReusableDelegationSetResponse)
-> Either String Int
-> Either
String (DelegationSet -> GetReusableDelegationSetResponse)
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 -> GetReusableDelegationSetResponse)
-> Either String DelegationSet
-> Either String GetReusableDelegationSetResponse
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")
)
instance Prelude.Hashable GetReusableDelegationSet
instance Prelude.NFData GetReusableDelegationSet
instance Core.ToHeaders GetReusableDelegationSet where
toHeaders :: GetReusableDelegationSet -> ResponseHeaders
toHeaders = ResponseHeaders -> GetReusableDelegationSet -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath GetReusableDelegationSet where
toPath :: GetReusableDelegationSet -> ByteString
toPath GetReusableDelegationSet' {ResourceId
id :: ResourceId
$sel:id:GetReusableDelegationSet' :: GetReusableDelegationSet -> ResourceId
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/2013-04-01/delegationset/", ResourceId -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS ResourceId
id]
instance Core.ToQuery GetReusableDelegationSet where
toQuery :: GetReusableDelegationSet -> QueryString
toQuery = QueryString -> GetReusableDelegationSet -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetReusableDelegationSetResponse = GetReusableDelegationSetResponse'
{
GetReusableDelegationSetResponse -> Int
httpStatus :: Prelude.Int,
GetReusableDelegationSetResponse -> DelegationSet
delegationSet :: DelegationSet
}
deriving (GetReusableDelegationSetResponse
-> GetReusableDelegationSetResponse -> Bool
(GetReusableDelegationSetResponse
-> GetReusableDelegationSetResponse -> Bool)
-> (GetReusableDelegationSetResponse
-> GetReusableDelegationSetResponse -> Bool)
-> Eq GetReusableDelegationSetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetReusableDelegationSetResponse
-> GetReusableDelegationSetResponse -> Bool
$c/= :: GetReusableDelegationSetResponse
-> GetReusableDelegationSetResponse -> Bool
== :: GetReusableDelegationSetResponse
-> GetReusableDelegationSetResponse -> Bool
$c== :: GetReusableDelegationSetResponse
-> GetReusableDelegationSetResponse -> Bool
Prelude.Eq, ReadPrec [GetReusableDelegationSetResponse]
ReadPrec GetReusableDelegationSetResponse
Int -> ReadS GetReusableDelegationSetResponse
ReadS [GetReusableDelegationSetResponse]
(Int -> ReadS GetReusableDelegationSetResponse)
-> ReadS [GetReusableDelegationSetResponse]
-> ReadPrec GetReusableDelegationSetResponse
-> ReadPrec [GetReusableDelegationSetResponse]
-> Read GetReusableDelegationSetResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetReusableDelegationSetResponse]
$creadListPrec :: ReadPrec [GetReusableDelegationSetResponse]
readPrec :: ReadPrec GetReusableDelegationSetResponse
$creadPrec :: ReadPrec GetReusableDelegationSetResponse
readList :: ReadS [GetReusableDelegationSetResponse]
$creadList :: ReadS [GetReusableDelegationSetResponse]
readsPrec :: Int -> ReadS GetReusableDelegationSetResponse
$creadsPrec :: Int -> ReadS GetReusableDelegationSetResponse
Prelude.Read, Int -> GetReusableDelegationSetResponse -> ShowS
[GetReusableDelegationSetResponse] -> ShowS
GetReusableDelegationSetResponse -> String
(Int -> GetReusableDelegationSetResponse -> ShowS)
-> (GetReusableDelegationSetResponse -> String)
-> ([GetReusableDelegationSetResponse] -> ShowS)
-> Show GetReusableDelegationSetResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetReusableDelegationSetResponse] -> ShowS
$cshowList :: [GetReusableDelegationSetResponse] -> ShowS
show :: GetReusableDelegationSetResponse -> String
$cshow :: GetReusableDelegationSetResponse -> String
showsPrec :: Int -> GetReusableDelegationSetResponse -> ShowS
$cshowsPrec :: Int -> GetReusableDelegationSetResponse -> ShowS
Prelude.Show, (forall x.
GetReusableDelegationSetResponse
-> Rep GetReusableDelegationSetResponse x)
-> (forall x.
Rep GetReusableDelegationSetResponse x
-> GetReusableDelegationSetResponse)
-> Generic GetReusableDelegationSetResponse
forall x.
Rep GetReusableDelegationSetResponse x
-> GetReusableDelegationSetResponse
forall x.
GetReusableDelegationSetResponse
-> Rep GetReusableDelegationSetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetReusableDelegationSetResponse x
-> GetReusableDelegationSetResponse
$cfrom :: forall x.
GetReusableDelegationSetResponse
-> Rep GetReusableDelegationSetResponse x
Prelude.Generic)
newGetReusableDelegationSetResponse ::
Prelude.Int ->
DelegationSet ->
GetReusableDelegationSetResponse
newGetReusableDelegationSetResponse :: Int -> DelegationSet -> GetReusableDelegationSetResponse
newGetReusableDelegationSetResponse
Int
pHttpStatus_
DelegationSet
pDelegationSet_ =
GetReusableDelegationSetResponse' :: Int -> DelegationSet -> GetReusableDelegationSetResponse
GetReusableDelegationSetResponse'
{ $sel:httpStatus:GetReusableDelegationSetResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:delegationSet:GetReusableDelegationSetResponse' :: DelegationSet
delegationSet = DelegationSet
pDelegationSet_
}
getReusableDelegationSetResponse_httpStatus :: Lens.Lens' GetReusableDelegationSetResponse Prelude.Int
getReusableDelegationSetResponse_httpStatus :: (Int -> f Int)
-> GetReusableDelegationSetResponse
-> f GetReusableDelegationSetResponse
getReusableDelegationSetResponse_httpStatus = (GetReusableDelegationSetResponse -> Int)
-> (GetReusableDelegationSetResponse
-> Int -> GetReusableDelegationSetResponse)
-> Lens
GetReusableDelegationSetResponse
GetReusableDelegationSetResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetReusableDelegationSetResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetReusableDelegationSetResponse' :: GetReusableDelegationSetResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetReusableDelegationSetResponse
s@GetReusableDelegationSetResponse' {} Int
a -> GetReusableDelegationSetResponse
s {$sel:httpStatus:GetReusableDelegationSetResponse' :: Int
httpStatus = Int
a} :: GetReusableDelegationSetResponse)
getReusableDelegationSetResponse_delegationSet :: Lens.Lens' GetReusableDelegationSetResponse DelegationSet
getReusableDelegationSetResponse_delegationSet :: (DelegationSet -> f DelegationSet)
-> GetReusableDelegationSetResponse
-> f GetReusableDelegationSetResponse
getReusableDelegationSetResponse_delegationSet = (GetReusableDelegationSetResponse -> DelegationSet)
-> (GetReusableDelegationSetResponse
-> DelegationSet -> GetReusableDelegationSetResponse)
-> Lens
GetReusableDelegationSetResponse
GetReusableDelegationSetResponse
DelegationSet
DelegationSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetReusableDelegationSetResponse' {DelegationSet
delegationSet :: DelegationSet
$sel:delegationSet:GetReusableDelegationSetResponse' :: GetReusableDelegationSetResponse -> DelegationSet
delegationSet} -> DelegationSet
delegationSet) (\s :: GetReusableDelegationSetResponse
s@GetReusableDelegationSetResponse' {} DelegationSet
a -> GetReusableDelegationSetResponse
s {$sel:delegationSet:GetReusableDelegationSetResponse' :: DelegationSet
delegationSet = DelegationSet
a} :: GetReusableDelegationSetResponse)
instance
Prelude.NFData
GetReusableDelegationSetResponse