{-# 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.ListResourceRecordSets
(
ListResourceRecordSets (..),
newListResourceRecordSets,
listResourceRecordSets_startRecordName,
listResourceRecordSets_startRecordType,
listResourceRecordSets_startRecordIdentifier,
listResourceRecordSets_maxItems,
listResourceRecordSets_hostedZoneId,
ListResourceRecordSetsResponse (..),
newListResourceRecordSetsResponse,
listResourceRecordSetsResponse_nextRecordType,
listResourceRecordSetsResponse_nextRecordName,
listResourceRecordSetsResponse_nextRecordIdentifier,
listResourceRecordSetsResponse_httpStatus,
listResourceRecordSetsResponse_resourceRecordSets,
listResourceRecordSetsResponse_isTruncated,
listResourceRecordSetsResponse_maxItems,
)
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 ListResourceRecordSets = ListResourceRecordSets'
{
ListResourceRecordSets -> Maybe Text
startRecordName :: Prelude.Maybe Prelude.Text,
ListResourceRecordSets -> Maybe RRType
startRecordType :: Prelude.Maybe RRType,
ListResourceRecordSets -> Maybe Text
startRecordIdentifier :: Prelude.Maybe Prelude.Text,
ListResourceRecordSets -> Maybe Text
maxItems :: Prelude.Maybe Prelude.Text,
ListResourceRecordSets -> ResourceId
hostedZoneId :: ResourceId
}
deriving (ListResourceRecordSets -> ListResourceRecordSets -> Bool
(ListResourceRecordSets -> ListResourceRecordSets -> Bool)
-> (ListResourceRecordSets -> ListResourceRecordSets -> Bool)
-> Eq ListResourceRecordSets
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListResourceRecordSets -> ListResourceRecordSets -> Bool
$c/= :: ListResourceRecordSets -> ListResourceRecordSets -> Bool
== :: ListResourceRecordSets -> ListResourceRecordSets -> Bool
$c== :: ListResourceRecordSets -> ListResourceRecordSets -> Bool
Prelude.Eq, ReadPrec [ListResourceRecordSets]
ReadPrec ListResourceRecordSets
Int -> ReadS ListResourceRecordSets
ReadS [ListResourceRecordSets]
(Int -> ReadS ListResourceRecordSets)
-> ReadS [ListResourceRecordSets]
-> ReadPrec ListResourceRecordSets
-> ReadPrec [ListResourceRecordSets]
-> Read ListResourceRecordSets
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListResourceRecordSets]
$creadListPrec :: ReadPrec [ListResourceRecordSets]
readPrec :: ReadPrec ListResourceRecordSets
$creadPrec :: ReadPrec ListResourceRecordSets
readList :: ReadS [ListResourceRecordSets]
$creadList :: ReadS [ListResourceRecordSets]
readsPrec :: Int -> ReadS ListResourceRecordSets
$creadsPrec :: Int -> ReadS ListResourceRecordSets
Prelude.Read, Int -> ListResourceRecordSets -> ShowS
[ListResourceRecordSets] -> ShowS
ListResourceRecordSets -> String
(Int -> ListResourceRecordSets -> ShowS)
-> (ListResourceRecordSets -> String)
-> ([ListResourceRecordSets] -> ShowS)
-> Show ListResourceRecordSets
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListResourceRecordSets] -> ShowS
$cshowList :: [ListResourceRecordSets] -> ShowS
show :: ListResourceRecordSets -> String
$cshow :: ListResourceRecordSets -> String
showsPrec :: Int -> ListResourceRecordSets -> ShowS
$cshowsPrec :: Int -> ListResourceRecordSets -> ShowS
Prelude.Show, (forall x. ListResourceRecordSets -> Rep ListResourceRecordSets x)
-> (forall x.
Rep ListResourceRecordSets x -> ListResourceRecordSets)
-> Generic ListResourceRecordSets
forall x. Rep ListResourceRecordSets x -> ListResourceRecordSets
forall x. ListResourceRecordSets -> Rep ListResourceRecordSets x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListResourceRecordSets x -> ListResourceRecordSets
$cfrom :: forall x. ListResourceRecordSets -> Rep ListResourceRecordSets x
Prelude.Generic)
newListResourceRecordSets ::
ResourceId ->
ListResourceRecordSets
newListResourceRecordSets :: ResourceId -> ListResourceRecordSets
newListResourceRecordSets ResourceId
pHostedZoneId_ =
ListResourceRecordSets' :: Maybe Text
-> Maybe RRType
-> Maybe Text
-> Maybe Text
-> ResourceId
-> ListResourceRecordSets
ListResourceRecordSets'
{ $sel:startRecordName:ListResourceRecordSets' :: Maybe Text
startRecordName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:startRecordType:ListResourceRecordSets' :: Maybe RRType
startRecordType = Maybe RRType
forall a. Maybe a
Prelude.Nothing,
$sel:startRecordIdentifier:ListResourceRecordSets' :: Maybe Text
startRecordIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxItems:ListResourceRecordSets' :: Maybe Text
maxItems = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:hostedZoneId:ListResourceRecordSets' :: ResourceId
hostedZoneId = ResourceId
pHostedZoneId_
}
listResourceRecordSets_startRecordName :: Lens.Lens' ListResourceRecordSets (Prelude.Maybe Prelude.Text)
listResourceRecordSets_startRecordName :: (Maybe Text -> f (Maybe Text))
-> ListResourceRecordSets -> f ListResourceRecordSets
listResourceRecordSets_startRecordName = (ListResourceRecordSets -> Maybe Text)
-> (ListResourceRecordSets -> Maybe Text -> ListResourceRecordSets)
-> Lens
ListResourceRecordSets
ListResourceRecordSets
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResourceRecordSets' {Maybe Text
startRecordName :: Maybe Text
$sel:startRecordName:ListResourceRecordSets' :: ListResourceRecordSets -> Maybe Text
startRecordName} -> Maybe Text
startRecordName) (\s :: ListResourceRecordSets
s@ListResourceRecordSets' {} Maybe Text
a -> ListResourceRecordSets
s {$sel:startRecordName:ListResourceRecordSets' :: Maybe Text
startRecordName = Maybe Text
a} :: ListResourceRecordSets)
listResourceRecordSets_startRecordType :: Lens.Lens' ListResourceRecordSets (Prelude.Maybe RRType)
listResourceRecordSets_startRecordType :: (Maybe RRType -> f (Maybe RRType))
-> ListResourceRecordSets -> f ListResourceRecordSets
listResourceRecordSets_startRecordType = (ListResourceRecordSets -> Maybe RRType)
-> (ListResourceRecordSets
-> Maybe RRType -> ListResourceRecordSets)
-> Lens
ListResourceRecordSets
ListResourceRecordSets
(Maybe RRType)
(Maybe RRType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResourceRecordSets' {Maybe RRType
startRecordType :: Maybe RRType
$sel:startRecordType:ListResourceRecordSets' :: ListResourceRecordSets -> Maybe RRType
startRecordType} -> Maybe RRType
startRecordType) (\s :: ListResourceRecordSets
s@ListResourceRecordSets' {} Maybe RRType
a -> ListResourceRecordSets
s {$sel:startRecordType:ListResourceRecordSets' :: Maybe RRType
startRecordType = Maybe RRType
a} :: ListResourceRecordSets)
listResourceRecordSets_startRecordIdentifier :: Lens.Lens' ListResourceRecordSets (Prelude.Maybe Prelude.Text)
listResourceRecordSets_startRecordIdentifier :: (Maybe Text -> f (Maybe Text))
-> ListResourceRecordSets -> f ListResourceRecordSets
listResourceRecordSets_startRecordIdentifier = (ListResourceRecordSets -> Maybe Text)
-> (ListResourceRecordSets -> Maybe Text -> ListResourceRecordSets)
-> Lens
ListResourceRecordSets
ListResourceRecordSets
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResourceRecordSets' {Maybe Text
startRecordIdentifier :: Maybe Text
$sel:startRecordIdentifier:ListResourceRecordSets' :: ListResourceRecordSets -> Maybe Text
startRecordIdentifier} -> Maybe Text
startRecordIdentifier) (\s :: ListResourceRecordSets
s@ListResourceRecordSets' {} Maybe Text
a -> ListResourceRecordSets
s {$sel:startRecordIdentifier:ListResourceRecordSets' :: Maybe Text
startRecordIdentifier = Maybe Text
a} :: ListResourceRecordSets)
listResourceRecordSets_maxItems :: Lens.Lens' ListResourceRecordSets (Prelude.Maybe Prelude.Text)
listResourceRecordSets_maxItems :: (Maybe Text -> f (Maybe Text))
-> ListResourceRecordSets -> f ListResourceRecordSets
listResourceRecordSets_maxItems = (ListResourceRecordSets -> Maybe Text)
-> (ListResourceRecordSets -> Maybe Text -> ListResourceRecordSets)
-> Lens
ListResourceRecordSets
ListResourceRecordSets
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResourceRecordSets' {Maybe Text
maxItems :: Maybe Text
$sel:maxItems:ListResourceRecordSets' :: ListResourceRecordSets -> Maybe Text
maxItems} -> Maybe Text
maxItems) (\s :: ListResourceRecordSets
s@ListResourceRecordSets' {} Maybe Text
a -> ListResourceRecordSets
s {$sel:maxItems:ListResourceRecordSets' :: Maybe Text
maxItems = Maybe Text
a} :: ListResourceRecordSets)
listResourceRecordSets_hostedZoneId :: Lens.Lens' ListResourceRecordSets ResourceId
listResourceRecordSets_hostedZoneId :: (ResourceId -> f ResourceId)
-> ListResourceRecordSets -> f ListResourceRecordSets
listResourceRecordSets_hostedZoneId = (ListResourceRecordSets -> ResourceId)
-> (ListResourceRecordSets -> ResourceId -> ListResourceRecordSets)
-> Lens
ListResourceRecordSets ListResourceRecordSets ResourceId ResourceId
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResourceRecordSets' {ResourceId
hostedZoneId :: ResourceId
$sel:hostedZoneId:ListResourceRecordSets' :: ListResourceRecordSets -> ResourceId
hostedZoneId} -> ResourceId
hostedZoneId) (\s :: ListResourceRecordSets
s@ListResourceRecordSets' {} ResourceId
a -> ListResourceRecordSets
s {$sel:hostedZoneId:ListResourceRecordSets' :: ResourceId
hostedZoneId = ResourceId
a} :: ListResourceRecordSets)
instance Core.AWSPager ListResourceRecordSets where
page :: ListResourceRecordSets
-> AWSResponse ListResourceRecordSets
-> Maybe ListResourceRecordSets
page ListResourceRecordSets
rq AWSResponse ListResourceRecordSets
rs
| Bool -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListResourceRecordSets
ListResourceRecordSetsResponse
rs
ListResourceRecordSetsResponse
-> Getting Bool ListResourceRecordSetsResponse Bool -> Bool
forall s a. s -> Getting a s a -> a
Lens.^. Getting Bool ListResourceRecordSetsResponse Bool
Lens' ListResourceRecordSetsResponse Bool
listResourceRecordSetsResponse_isTruncated
) =
Maybe ListResourceRecordSets
forall a. Maybe a
Prelude.Nothing
| Maybe Text -> Bool
forall a. Maybe a -> Bool
Prelude.isNothing
( AWSResponse ListResourceRecordSets
ListResourceRecordSetsResponse
rs
ListResourceRecordSetsResponse
-> Getting (First Text) ListResourceRecordSetsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListResourceRecordSetsResponse
-> Const (First Text) ListResourceRecordSetsResponse
Lens' ListResourceRecordSetsResponse (Maybe Text)
listResourceRecordSetsResponse_nextRecordName
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListResourceRecordSetsResponse
-> Const (First Text) ListResourceRecordSetsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListResourceRecordSetsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
)
Bool -> Bool -> Bool
Prelude.&& Maybe RRType -> Bool
forall a. Maybe a -> Bool
Prelude.isNothing
( AWSResponse ListResourceRecordSets
ListResourceRecordSetsResponse
rs
ListResourceRecordSetsResponse
-> Getting (First RRType) ListResourceRecordSetsResponse RRType
-> Maybe RRType
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe RRType -> Const (First RRType) (Maybe RRType))
-> ListResourceRecordSetsResponse
-> Const (First RRType) ListResourceRecordSetsResponse
Lens' ListResourceRecordSetsResponse (Maybe RRType)
listResourceRecordSetsResponse_nextRecordType
((Maybe RRType -> Const (First RRType) (Maybe RRType))
-> ListResourceRecordSetsResponse
-> Const (First RRType) ListResourceRecordSetsResponse)
-> ((RRType -> Const (First RRType) RRType)
-> Maybe RRType -> Const (First RRType) (Maybe RRType))
-> Getting (First RRType) ListResourceRecordSetsResponse RRType
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (RRType -> Const (First RRType) RRType)
-> Maybe RRType -> Const (First RRType) (Maybe RRType)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
)
Bool -> Bool -> Bool
Prelude.&& Maybe Text -> Bool
forall a. Maybe a -> Bool
Prelude.isNothing
( AWSResponse ListResourceRecordSets
ListResourceRecordSetsResponse
rs
ListResourceRecordSetsResponse
-> Getting (First Text) ListResourceRecordSetsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListResourceRecordSetsResponse
-> Const (First Text) ListResourceRecordSetsResponse
Lens' ListResourceRecordSetsResponse (Maybe Text)
listResourceRecordSetsResponse_nextRecordIdentifier
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListResourceRecordSetsResponse
-> Const (First Text) ListResourceRecordSetsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListResourceRecordSetsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListResourceRecordSets
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListResourceRecordSets -> Maybe ListResourceRecordSets
forall a. a -> Maybe a
Prelude.Just (ListResourceRecordSets -> Maybe ListResourceRecordSets)
-> ListResourceRecordSets -> Maybe ListResourceRecordSets
forall a b. (a -> b) -> a -> b
Prelude.$
ListResourceRecordSets
rq
ListResourceRecordSets
-> (ListResourceRecordSets -> ListResourceRecordSets)
-> ListResourceRecordSets
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListResourceRecordSets -> Identity ListResourceRecordSets
Lens
ListResourceRecordSets
ListResourceRecordSets
(Maybe Text)
(Maybe Text)
listResourceRecordSets_startRecordName
((Maybe Text -> Identity (Maybe Text))
-> ListResourceRecordSets -> Identity ListResourceRecordSets)
-> Maybe Text -> ListResourceRecordSets -> ListResourceRecordSets
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListResourceRecordSets
ListResourceRecordSetsResponse
rs
ListResourceRecordSetsResponse
-> Getting (First Text) ListResourceRecordSetsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListResourceRecordSetsResponse
-> Const (First Text) ListResourceRecordSetsResponse
Lens' ListResourceRecordSetsResponse (Maybe Text)
listResourceRecordSetsResponse_nextRecordName
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListResourceRecordSetsResponse
-> Const (First Text) ListResourceRecordSetsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListResourceRecordSetsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
ListResourceRecordSets
-> (ListResourceRecordSets -> ListResourceRecordSets)
-> ListResourceRecordSets
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe RRType -> Identity (Maybe RRType))
-> ListResourceRecordSets -> Identity ListResourceRecordSets
Lens
ListResourceRecordSets
ListResourceRecordSets
(Maybe RRType)
(Maybe RRType)
listResourceRecordSets_startRecordType
((Maybe RRType -> Identity (Maybe RRType))
-> ListResourceRecordSets -> Identity ListResourceRecordSets)
-> Maybe RRType -> ListResourceRecordSets -> ListResourceRecordSets
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListResourceRecordSets
ListResourceRecordSetsResponse
rs
ListResourceRecordSetsResponse
-> Getting (First RRType) ListResourceRecordSetsResponse RRType
-> Maybe RRType
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe RRType -> Const (First RRType) (Maybe RRType))
-> ListResourceRecordSetsResponse
-> Const (First RRType) ListResourceRecordSetsResponse
Lens' ListResourceRecordSetsResponse (Maybe RRType)
listResourceRecordSetsResponse_nextRecordType
((Maybe RRType -> Const (First RRType) (Maybe RRType))
-> ListResourceRecordSetsResponse
-> Const (First RRType) ListResourceRecordSetsResponse)
-> ((RRType -> Const (First RRType) RRType)
-> Maybe RRType -> Const (First RRType) (Maybe RRType))
-> Getting (First RRType) ListResourceRecordSetsResponse RRType
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (RRType -> Const (First RRType) RRType)
-> Maybe RRType -> Const (First RRType) (Maybe RRType)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
ListResourceRecordSets
-> (ListResourceRecordSets -> ListResourceRecordSets)
-> ListResourceRecordSets
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListResourceRecordSets -> Identity ListResourceRecordSets
Lens
ListResourceRecordSets
ListResourceRecordSets
(Maybe Text)
(Maybe Text)
listResourceRecordSets_startRecordIdentifier
((Maybe Text -> Identity (Maybe Text))
-> ListResourceRecordSets -> Identity ListResourceRecordSets)
-> Maybe Text -> ListResourceRecordSets -> ListResourceRecordSets
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListResourceRecordSets
ListResourceRecordSetsResponse
rs
ListResourceRecordSetsResponse
-> Getting (First Text) ListResourceRecordSetsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListResourceRecordSetsResponse
-> Const (First Text) ListResourceRecordSetsResponse
Lens' ListResourceRecordSetsResponse (Maybe Text)
listResourceRecordSetsResponse_nextRecordIdentifier
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListResourceRecordSetsResponse
-> Const (First Text) ListResourceRecordSetsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListResourceRecordSetsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance Core.AWSRequest ListResourceRecordSets where
type
AWSResponse ListResourceRecordSets =
ListResourceRecordSetsResponse
request :: ListResourceRecordSets -> Request ListResourceRecordSets
request = Service -> ListResourceRecordSets -> Request ListResourceRecordSets
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy ListResourceRecordSets
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListResourceRecordSets)))
response =
(Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse ListResourceRecordSets))
-> Logger
-> Service
-> Proxy ListResourceRecordSets
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListResourceRecordSets)))
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 ->
Maybe RRType
-> Maybe Text
-> Maybe Text
-> Int
-> [ResourceRecordSet]
-> Bool
-> Text
-> ListResourceRecordSetsResponse
ListResourceRecordSetsResponse'
(Maybe RRType
-> Maybe Text
-> Maybe Text
-> Int
-> [ResourceRecordSet]
-> Bool
-> Text
-> ListResourceRecordSetsResponse)
-> Either String (Maybe RRType)
-> Either
String
(Maybe Text
-> Maybe Text
-> Int
-> [ResourceRecordSet]
-> Bool
-> Text
-> ListResourceRecordSetsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe RRType)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"NextRecordType")
Either
String
(Maybe Text
-> Maybe Text
-> Int
-> [ResourceRecordSet]
-> Bool
-> Text
-> ListResourceRecordSetsResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Int
-> [ResourceRecordSet]
-> Bool
-> Text
-> ListResourceRecordSetsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"NextRecordName")
Either
String
(Maybe Text
-> Int
-> [ResourceRecordSet]
-> Bool
-> Text
-> ListResourceRecordSetsResponse)
-> Either String (Maybe Text)
-> Either
String
(Int
-> [ResourceRecordSet]
-> Bool
-> Text
-> ListResourceRecordSetsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"NextRecordIdentifier")
Either
String
(Int
-> [ResourceRecordSet]
-> Bool
-> Text
-> ListResourceRecordSetsResponse)
-> Either String Int
-> Either
String
([ResourceRecordSet]
-> Bool -> Text -> ListResourceRecordSetsResponse)
forall (f :: * -> *) a b. Applicative f => 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
([ResourceRecordSet]
-> Bool -> Text -> ListResourceRecordSetsResponse)
-> Either String [ResourceRecordSet]
-> Either String (Bool -> Text -> ListResourceRecordSetsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ResourceRecordSets"
Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
Either String [Node]
-> ([Node] -> Either String [ResourceRecordSet])
-> Either String [ResourceRecordSet]
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= Text -> [Node] -> Either String [ResourceRecordSet]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"ResourceRecordSet"
)
Either String (Bool -> Text -> ListResourceRecordSetsResponse)
-> Either String Bool
-> Either String (Text -> ListResourceRecordSetsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Bool
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"IsTruncated")
Either String (Text -> ListResourceRecordSetsResponse)
-> Either String Text
-> Either String ListResourceRecordSetsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"MaxItems")
)
instance Prelude.Hashable ListResourceRecordSets
instance Prelude.NFData ListResourceRecordSets
instance Core.ToHeaders ListResourceRecordSets where
toHeaders :: ListResourceRecordSets -> ResponseHeaders
toHeaders = ResponseHeaders -> ListResourceRecordSets -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath ListResourceRecordSets where
toPath :: ListResourceRecordSets -> ByteString
toPath ListResourceRecordSets' {Maybe Text
Maybe RRType
ResourceId
hostedZoneId :: ResourceId
maxItems :: Maybe Text
startRecordIdentifier :: Maybe Text
startRecordType :: Maybe RRType
startRecordName :: Maybe Text
$sel:hostedZoneId:ListResourceRecordSets' :: ListResourceRecordSets -> ResourceId
$sel:maxItems:ListResourceRecordSets' :: ListResourceRecordSets -> Maybe Text
$sel:startRecordIdentifier:ListResourceRecordSets' :: ListResourceRecordSets -> Maybe Text
$sel:startRecordType:ListResourceRecordSets' :: ListResourceRecordSets -> Maybe RRType
$sel:startRecordName:ListResourceRecordSets' :: ListResourceRecordSets -> Maybe Text
..} =
[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
"/rrset"
]
instance Core.ToQuery ListResourceRecordSets where
toQuery :: ListResourceRecordSets -> QueryString
toQuery ListResourceRecordSets' {Maybe Text
Maybe RRType
ResourceId
hostedZoneId :: ResourceId
maxItems :: Maybe Text
startRecordIdentifier :: Maybe Text
startRecordType :: Maybe RRType
startRecordName :: Maybe Text
$sel:hostedZoneId:ListResourceRecordSets' :: ListResourceRecordSets -> ResourceId
$sel:maxItems:ListResourceRecordSets' :: ListResourceRecordSets -> Maybe Text
$sel:startRecordIdentifier:ListResourceRecordSets' :: ListResourceRecordSets -> Maybe Text
$sel:startRecordType:ListResourceRecordSets' :: ListResourceRecordSets -> Maybe RRType
$sel:startRecordName:ListResourceRecordSets' :: ListResourceRecordSets -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"name" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
startRecordName,
ByteString
"type" ByteString -> Maybe RRType -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe RRType
startRecordType,
ByteString
"identifier" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
startRecordIdentifier,
ByteString
"maxitems" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
maxItems
]
data ListResourceRecordSetsResponse = ListResourceRecordSetsResponse'
{
ListResourceRecordSetsResponse -> Maybe RRType
nextRecordType :: Prelude.Maybe RRType,
ListResourceRecordSetsResponse -> Maybe Text
nextRecordName :: Prelude.Maybe Prelude.Text,
ListResourceRecordSetsResponse -> Maybe Text
nextRecordIdentifier :: Prelude.Maybe Prelude.Text,
ListResourceRecordSetsResponse -> Int
httpStatus :: Prelude.Int,
ListResourceRecordSetsResponse -> [ResourceRecordSet]
resourceRecordSets :: [ResourceRecordSet],
ListResourceRecordSetsResponse -> Bool
isTruncated :: Prelude.Bool,
ListResourceRecordSetsResponse -> Text
maxItems :: Prelude.Text
}
deriving (ListResourceRecordSetsResponse
-> ListResourceRecordSetsResponse -> Bool
(ListResourceRecordSetsResponse
-> ListResourceRecordSetsResponse -> Bool)
-> (ListResourceRecordSetsResponse
-> ListResourceRecordSetsResponse -> Bool)
-> Eq ListResourceRecordSetsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListResourceRecordSetsResponse
-> ListResourceRecordSetsResponse -> Bool
$c/= :: ListResourceRecordSetsResponse
-> ListResourceRecordSetsResponse -> Bool
== :: ListResourceRecordSetsResponse
-> ListResourceRecordSetsResponse -> Bool
$c== :: ListResourceRecordSetsResponse
-> ListResourceRecordSetsResponse -> Bool
Prelude.Eq, ReadPrec [ListResourceRecordSetsResponse]
ReadPrec ListResourceRecordSetsResponse
Int -> ReadS ListResourceRecordSetsResponse
ReadS [ListResourceRecordSetsResponse]
(Int -> ReadS ListResourceRecordSetsResponse)
-> ReadS [ListResourceRecordSetsResponse]
-> ReadPrec ListResourceRecordSetsResponse
-> ReadPrec [ListResourceRecordSetsResponse]
-> Read ListResourceRecordSetsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListResourceRecordSetsResponse]
$creadListPrec :: ReadPrec [ListResourceRecordSetsResponse]
readPrec :: ReadPrec ListResourceRecordSetsResponse
$creadPrec :: ReadPrec ListResourceRecordSetsResponse
readList :: ReadS [ListResourceRecordSetsResponse]
$creadList :: ReadS [ListResourceRecordSetsResponse]
readsPrec :: Int -> ReadS ListResourceRecordSetsResponse
$creadsPrec :: Int -> ReadS ListResourceRecordSetsResponse
Prelude.Read, Int -> ListResourceRecordSetsResponse -> ShowS
[ListResourceRecordSetsResponse] -> ShowS
ListResourceRecordSetsResponse -> String
(Int -> ListResourceRecordSetsResponse -> ShowS)
-> (ListResourceRecordSetsResponse -> String)
-> ([ListResourceRecordSetsResponse] -> ShowS)
-> Show ListResourceRecordSetsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListResourceRecordSetsResponse] -> ShowS
$cshowList :: [ListResourceRecordSetsResponse] -> ShowS
show :: ListResourceRecordSetsResponse -> String
$cshow :: ListResourceRecordSetsResponse -> String
showsPrec :: Int -> ListResourceRecordSetsResponse -> ShowS
$cshowsPrec :: Int -> ListResourceRecordSetsResponse -> ShowS
Prelude.Show, (forall x.
ListResourceRecordSetsResponse
-> Rep ListResourceRecordSetsResponse x)
-> (forall x.
Rep ListResourceRecordSetsResponse x
-> ListResourceRecordSetsResponse)
-> Generic ListResourceRecordSetsResponse
forall x.
Rep ListResourceRecordSetsResponse x
-> ListResourceRecordSetsResponse
forall x.
ListResourceRecordSetsResponse
-> Rep ListResourceRecordSetsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListResourceRecordSetsResponse x
-> ListResourceRecordSetsResponse
$cfrom :: forall x.
ListResourceRecordSetsResponse
-> Rep ListResourceRecordSetsResponse x
Prelude.Generic)
newListResourceRecordSetsResponse ::
Prelude.Int ->
Prelude.Bool ->
Prelude.Text ->
ListResourceRecordSetsResponse
newListResourceRecordSetsResponse :: Int -> Bool -> Text -> ListResourceRecordSetsResponse
newListResourceRecordSetsResponse
Int
pHttpStatus_
Bool
pIsTruncated_
Text
pMaxItems_ =
ListResourceRecordSetsResponse' :: Maybe RRType
-> Maybe Text
-> Maybe Text
-> Int
-> [ResourceRecordSet]
-> Bool
-> Text
-> ListResourceRecordSetsResponse
ListResourceRecordSetsResponse'
{ $sel:nextRecordType:ListResourceRecordSetsResponse' :: Maybe RRType
nextRecordType =
Maybe RRType
forall a. Maybe a
Prelude.Nothing,
$sel:nextRecordName:ListResourceRecordSetsResponse' :: Maybe Text
nextRecordName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextRecordIdentifier:ListResourceRecordSetsResponse' :: Maybe Text
nextRecordIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListResourceRecordSetsResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:resourceRecordSets:ListResourceRecordSetsResponse' :: [ResourceRecordSet]
resourceRecordSets = [ResourceRecordSet]
forall a. Monoid a => a
Prelude.mempty,
$sel:isTruncated:ListResourceRecordSetsResponse' :: Bool
isTruncated = Bool
pIsTruncated_,
$sel:maxItems:ListResourceRecordSetsResponse' :: Text
maxItems = Text
pMaxItems_
}
listResourceRecordSetsResponse_nextRecordType :: Lens.Lens' ListResourceRecordSetsResponse (Prelude.Maybe RRType)
listResourceRecordSetsResponse_nextRecordType :: (Maybe RRType -> f (Maybe RRType))
-> ListResourceRecordSetsResponse
-> f ListResourceRecordSetsResponse
listResourceRecordSetsResponse_nextRecordType = (ListResourceRecordSetsResponse -> Maybe RRType)
-> (ListResourceRecordSetsResponse
-> Maybe RRType -> ListResourceRecordSetsResponse)
-> Lens' ListResourceRecordSetsResponse (Maybe RRType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResourceRecordSetsResponse' {Maybe RRType
nextRecordType :: Maybe RRType
$sel:nextRecordType:ListResourceRecordSetsResponse' :: ListResourceRecordSetsResponse -> Maybe RRType
nextRecordType} -> Maybe RRType
nextRecordType) (\s :: ListResourceRecordSetsResponse
s@ListResourceRecordSetsResponse' {} Maybe RRType
a -> ListResourceRecordSetsResponse
s {$sel:nextRecordType:ListResourceRecordSetsResponse' :: Maybe RRType
nextRecordType = Maybe RRType
a} :: ListResourceRecordSetsResponse)
listResourceRecordSetsResponse_nextRecordName :: Lens.Lens' ListResourceRecordSetsResponse (Prelude.Maybe Prelude.Text)
listResourceRecordSetsResponse_nextRecordName :: (Maybe Text -> f (Maybe Text))
-> ListResourceRecordSetsResponse
-> f ListResourceRecordSetsResponse
listResourceRecordSetsResponse_nextRecordName = (ListResourceRecordSetsResponse -> Maybe Text)
-> (ListResourceRecordSetsResponse
-> Maybe Text -> ListResourceRecordSetsResponse)
-> Lens' ListResourceRecordSetsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResourceRecordSetsResponse' {Maybe Text
nextRecordName :: Maybe Text
$sel:nextRecordName:ListResourceRecordSetsResponse' :: ListResourceRecordSetsResponse -> Maybe Text
nextRecordName} -> Maybe Text
nextRecordName) (\s :: ListResourceRecordSetsResponse
s@ListResourceRecordSetsResponse' {} Maybe Text
a -> ListResourceRecordSetsResponse
s {$sel:nextRecordName:ListResourceRecordSetsResponse' :: Maybe Text
nextRecordName = Maybe Text
a} :: ListResourceRecordSetsResponse)
listResourceRecordSetsResponse_nextRecordIdentifier :: Lens.Lens' ListResourceRecordSetsResponse (Prelude.Maybe Prelude.Text)
listResourceRecordSetsResponse_nextRecordIdentifier :: (Maybe Text -> f (Maybe Text))
-> ListResourceRecordSetsResponse
-> f ListResourceRecordSetsResponse
listResourceRecordSetsResponse_nextRecordIdentifier = (ListResourceRecordSetsResponse -> Maybe Text)
-> (ListResourceRecordSetsResponse
-> Maybe Text -> ListResourceRecordSetsResponse)
-> Lens' ListResourceRecordSetsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResourceRecordSetsResponse' {Maybe Text
nextRecordIdentifier :: Maybe Text
$sel:nextRecordIdentifier:ListResourceRecordSetsResponse' :: ListResourceRecordSetsResponse -> Maybe Text
nextRecordIdentifier} -> Maybe Text
nextRecordIdentifier) (\s :: ListResourceRecordSetsResponse
s@ListResourceRecordSetsResponse' {} Maybe Text
a -> ListResourceRecordSetsResponse
s {$sel:nextRecordIdentifier:ListResourceRecordSetsResponse' :: Maybe Text
nextRecordIdentifier = Maybe Text
a} :: ListResourceRecordSetsResponse)
listResourceRecordSetsResponse_httpStatus :: Lens.Lens' ListResourceRecordSetsResponse Prelude.Int
listResourceRecordSetsResponse_httpStatus :: (Int -> f Int)
-> ListResourceRecordSetsResponse
-> f ListResourceRecordSetsResponse
listResourceRecordSetsResponse_httpStatus = (ListResourceRecordSetsResponse -> Int)
-> (ListResourceRecordSetsResponse
-> Int -> ListResourceRecordSetsResponse)
-> Lens
ListResourceRecordSetsResponse
ListResourceRecordSetsResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResourceRecordSetsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListResourceRecordSetsResponse' :: ListResourceRecordSetsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListResourceRecordSetsResponse
s@ListResourceRecordSetsResponse' {} Int
a -> ListResourceRecordSetsResponse
s {$sel:httpStatus:ListResourceRecordSetsResponse' :: Int
httpStatus = Int
a} :: ListResourceRecordSetsResponse)
listResourceRecordSetsResponse_resourceRecordSets :: Lens.Lens' ListResourceRecordSetsResponse [ResourceRecordSet]
listResourceRecordSetsResponse_resourceRecordSets :: ([ResourceRecordSet] -> f [ResourceRecordSet])
-> ListResourceRecordSetsResponse
-> f ListResourceRecordSetsResponse
listResourceRecordSetsResponse_resourceRecordSets = (ListResourceRecordSetsResponse -> [ResourceRecordSet])
-> (ListResourceRecordSetsResponse
-> [ResourceRecordSet] -> ListResourceRecordSetsResponse)
-> Lens
ListResourceRecordSetsResponse
ListResourceRecordSetsResponse
[ResourceRecordSet]
[ResourceRecordSet]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResourceRecordSetsResponse' {[ResourceRecordSet]
resourceRecordSets :: [ResourceRecordSet]
$sel:resourceRecordSets:ListResourceRecordSetsResponse' :: ListResourceRecordSetsResponse -> [ResourceRecordSet]
resourceRecordSets} -> [ResourceRecordSet]
resourceRecordSets) (\s :: ListResourceRecordSetsResponse
s@ListResourceRecordSetsResponse' {} [ResourceRecordSet]
a -> ListResourceRecordSetsResponse
s {$sel:resourceRecordSets:ListResourceRecordSetsResponse' :: [ResourceRecordSet]
resourceRecordSets = [ResourceRecordSet]
a} :: ListResourceRecordSetsResponse) (([ResourceRecordSet] -> f [ResourceRecordSet])
-> ListResourceRecordSetsResponse
-> f ListResourceRecordSetsResponse)
-> (([ResourceRecordSet] -> f [ResourceRecordSet])
-> [ResourceRecordSet] -> f [ResourceRecordSet])
-> ([ResourceRecordSet] -> f [ResourceRecordSet])
-> ListResourceRecordSetsResponse
-> f ListResourceRecordSetsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ResourceRecordSet] -> f [ResourceRecordSet])
-> [ResourceRecordSet] -> f [ResourceRecordSet]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listResourceRecordSetsResponse_isTruncated :: Lens.Lens' ListResourceRecordSetsResponse Prelude.Bool
listResourceRecordSetsResponse_isTruncated :: (Bool -> f Bool)
-> ListResourceRecordSetsResponse
-> f ListResourceRecordSetsResponse
listResourceRecordSetsResponse_isTruncated = (ListResourceRecordSetsResponse -> Bool)
-> (ListResourceRecordSetsResponse
-> Bool -> ListResourceRecordSetsResponse)
-> Lens' ListResourceRecordSetsResponse Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResourceRecordSetsResponse' {Bool
isTruncated :: Bool
$sel:isTruncated:ListResourceRecordSetsResponse' :: ListResourceRecordSetsResponse -> Bool
isTruncated} -> Bool
isTruncated) (\s :: ListResourceRecordSetsResponse
s@ListResourceRecordSetsResponse' {} Bool
a -> ListResourceRecordSetsResponse
s {$sel:isTruncated:ListResourceRecordSetsResponse' :: Bool
isTruncated = Bool
a} :: ListResourceRecordSetsResponse)
listResourceRecordSetsResponse_maxItems :: Lens.Lens' ListResourceRecordSetsResponse Prelude.Text
listResourceRecordSetsResponse_maxItems :: (Text -> f Text)
-> ListResourceRecordSetsResponse
-> f ListResourceRecordSetsResponse
listResourceRecordSetsResponse_maxItems = (ListResourceRecordSetsResponse -> Text)
-> (ListResourceRecordSetsResponse
-> Text -> ListResourceRecordSetsResponse)
-> Lens
ListResourceRecordSetsResponse
ListResourceRecordSetsResponse
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResourceRecordSetsResponse' {Text
maxItems :: Text
$sel:maxItems:ListResourceRecordSetsResponse' :: ListResourceRecordSetsResponse -> Text
maxItems} -> Text
maxItems) (\s :: ListResourceRecordSetsResponse
s@ListResourceRecordSetsResponse' {} Text
a -> ListResourceRecordSetsResponse
s {$sel:maxItems:ListResourceRecordSetsResponse' :: Text
maxItems = Text
a} :: ListResourceRecordSetsResponse)
instance
Prelude.NFData
ListResourceRecordSetsResponse