{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.CloudFront.Types.CloudFrontOriginAccessIdentityList where
import Amazonka.CloudFront.Types.CloudFrontOriginAccessIdentitySummary
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CloudFrontOriginAccessIdentityList = CloudFrontOriginAccessIdentityList'
{
CloudFrontOriginAccessIdentityList
-> Maybe [CloudFrontOriginAccessIdentitySummary]
items :: Prelude.Maybe [CloudFrontOriginAccessIdentitySummary],
CloudFrontOriginAccessIdentityList -> Maybe Text
nextMarker :: Prelude.Maybe Prelude.Text,
CloudFrontOriginAccessIdentityList -> Text
marker :: Prelude.Text,
CloudFrontOriginAccessIdentityList -> Int
maxItems :: Prelude.Int,
CloudFrontOriginAccessIdentityList -> Bool
isTruncated :: Prelude.Bool,
CloudFrontOriginAccessIdentityList -> Int
quantity :: Prelude.Int
}
deriving (CloudFrontOriginAccessIdentityList
-> CloudFrontOriginAccessIdentityList -> Bool
(CloudFrontOriginAccessIdentityList
-> CloudFrontOriginAccessIdentityList -> Bool)
-> (CloudFrontOriginAccessIdentityList
-> CloudFrontOriginAccessIdentityList -> Bool)
-> Eq CloudFrontOriginAccessIdentityList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CloudFrontOriginAccessIdentityList
-> CloudFrontOriginAccessIdentityList -> Bool
$c/= :: CloudFrontOriginAccessIdentityList
-> CloudFrontOriginAccessIdentityList -> Bool
== :: CloudFrontOriginAccessIdentityList
-> CloudFrontOriginAccessIdentityList -> Bool
$c== :: CloudFrontOriginAccessIdentityList
-> CloudFrontOriginAccessIdentityList -> Bool
Prelude.Eq, ReadPrec [CloudFrontOriginAccessIdentityList]
ReadPrec CloudFrontOriginAccessIdentityList
Int -> ReadS CloudFrontOriginAccessIdentityList
ReadS [CloudFrontOriginAccessIdentityList]
(Int -> ReadS CloudFrontOriginAccessIdentityList)
-> ReadS [CloudFrontOriginAccessIdentityList]
-> ReadPrec CloudFrontOriginAccessIdentityList
-> ReadPrec [CloudFrontOriginAccessIdentityList]
-> Read CloudFrontOriginAccessIdentityList
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CloudFrontOriginAccessIdentityList]
$creadListPrec :: ReadPrec [CloudFrontOriginAccessIdentityList]
readPrec :: ReadPrec CloudFrontOriginAccessIdentityList
$creadPrec :: ReadPrec CloudFrontOriginAccessIdentityList
readList :: ReadS [CloudFrontOriginAccessIdentityList]
$creadList :: ReadS [CloudFrontOriginAccessIdentityList]
readsPrec :: Int -> ReadS CloudFrontOriginAccessIdentityList
$creadsPrec :: Int -> ReadS CloudFrontOriginAccessIdentityList
Prelude.Read, Int -> CloudFrontOriginAccessIdentityList -> ShowS
[CloudFrontOriginAccessIdentityList] -> ShowS
CloudFrontOriginAccessIdentityList -> String
(Int -> CloudFrontOriginAccessIdentityList -> ShowS)
-> (CloudFrontOriginAccessIdentityList -> String)
-> ([CloudFrontOriginAccessIdentityList] -> ShowS)
-> Show CloudFrontOriginAccessIdentityList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CloudFrontOriginAccessIdentityList] -> ShowS
$cshowList :: [CloudFrontOriginAccessIdentityList] -> ShowS
show :: CloudFrontOriginAccessIdentityList -> String
$cshow :: CloudFrontOriginAccessIdentityList -> String
showsPrec :: Int -> CloudFrontOriginAccessIdentityList -> ShowS
$cshowsPrec :: Int -> CloudFrontOriginAccessIdentityList -> ShowS
Prelude.Show, (forall x.
CloudFrontOriginAccessIdentityList
-> Rep CloudFrontOriginAccessIdentityList x)
-> (forall x.
Rep CloudFrontOriginAccessIdentityList x
-> CloudFrontOriginAccessIdentityList)
-> Generic CloudFrontOriginAccessIdentityList
forall x.
Rep CloudFrontOriginAccessIdentityList x
-> CloudFrontOriginAccessIdentityList
forall x.
CloudFrontOriginAccessIdentityList
-> Rep CloudFrontOriginAccessIdentityList x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CloudFrontOriginAccessIdentityList x
-> CloudFrontOriginAccessIdentityList
$cfrom :: forall x.
CloudFrontOriginAccessIdentityList
-> Rep CloudFrontOriginAccessIdentityList x
Prelude.Generic)
newCloudFrontOriginAccessIdentityList ::
Prelude.Text ->
Prelude.Int ->
Prelude.Bool ->
Prelude.Int ->
CloudFrontOriginAccessIdentityList
newCloudFrontOriginAccessIdentityList :: Text -> Int -> Bool -> Int -> CloudFrontOriginAccessIdentityList
newCloudFrontOriginAccessIdentityList
Text
pMarker_
Int
pMaxItems_
Bool
pIsTruncated_
Int
pQuantity_ =
CloudFrontOriginAccessIdentityList' :: Maybe [CloudFrontOriginAccessIdentitySummary]
-> Maybe Text
-> Text
-> Int
-> Bool
-> Int
-> CloudFrontOriginAccessIdentityList
CloudFrontOriginAccessIdentityList'
{ $sel:items:CloudFrontOriginAccessIdentityList' :: Maybe [CloudFrontOriginAccessIdentitySummary]
items =
Maybe [CloudFrontOriginAccessIdentitySummary]
forall a. Maybe a
Prelude.Nothing,
$sel:nextMarker:CloudFrontOriginAccessIdentityList' :: Maybe Text
nextMarker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:marker:CloudFrontOriginAccessIdentityList' :: Text
marker = Text
pMarker_,
$sel:maxItems:CloudFrontOriginAccessIdentityList' :: Int
maxItems = Int
pMaxItems_,
$sel:isTruncated:CloudFrontOriginAccessIdentityList' :: Bool
isTruncated = Bool
pIsTruncated_,
$sel:quantity:CloudFrontOriginAccessIdentityList' :: Int
quantity = Int
pQuantity_
}
cloudFrontOriginAccessIdentityList_items :: Lens.Lens' CloudFrontOriginAccessIdentityList (Prelude.Maybe [CloudFrontOriginAccessIdentitySummary])
cloudFrontOriginAccessIdentityList_items :: (Maybe [CloudFrontOriginAccessIdentitySummary]
-> f (Maybe [CloudFrontOriginAccessIdentitySummary]))
-> CloudFrontOriginAccessIdentityList
-> f CloudFrontOriginAccessIdentityList
cloudFrontOriginAccessIdentityList_items = (CloudFrontOriginAccessIdentityList
-> Maybe [CloudFrontOriginAccessIdentitySummary])
-> (CloudFrontOriginAccessIdentityList
-> Maybe [CloudFrontOriginAccessIdentitySummary]
-> CloudFrontOriginAccessIdentityList)
-> Lens
CloudFrontOriginAccessIdentityList
CloudFrontOriginAccessIdentityList
(Maybe [CloudFrontOriginAccessIdentitySummary])
(Maybe [CloudFrontOriginAccessIdentitySummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudFrontOriginAccessIdentityList' {Maybe [CloudFrontOriginAccessIdentitySummary]
items :: Maybe [CloudFrontOriginAccessIdentitySummary]
$sel:items:CloudFrontOriginAccessIdentityList' :: CloudFrontOriginAccessIdentityList
-> Maybe [CloudFrontOriginAccessIdentitySummary]
items} -> Maybe [CloudFrontOriginAccessIdentitySummary]
items) (\s :: CloudFrontOriginAccessIdentityList
s@CloudFrontOriginAccessIdentityList' {} Maybe [CloudFrontOriginAccessIdentitySummary]
a -> CloudFrontOriginAccessIdentityList
s {$sel:items:CloudFrontOriginAccessIdentityList' :: Maybe [CloudFrontOriginAccessIdentitySummary]
items = Maybe [CloudFrontOriginAccessIdentitySummary]
a} :: CloudFrontOriginAccessIdentityList) ((Maybe [CloudFrontOriginAccessIdentitySummary]
-> f (Maybe [CloudFrontOriginAccessIdentitySummary]))
-> CloudFrontOriginAccessIdentityList
-> f CloudFrontOriginAccessIdentityList)
-> ((Maybe [CloudFrontOriginAccessIdentitySummary]
-> f (Maybe [CloudFrontOriginAccessIdentitySummary]))
-> Maybe [CloudFrontOriginAccessIdentitySummary]
-> f (Maybe [CloudFrontOriginAccessIdentitySummary]))
-> (Maybe [CloudFrontOriginAccessIdentitySummary]
-> f (Maybe [CloudFrontOriginAccessIdentitySummary]))
-> CloudFrontOriginAccessIdentityList
-> f CloudFrontOriginAccessIdentityList
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[CloudFrontOriginAccessIdentitySummary]
[CloudFrontOriginAccessIdentitySummary]
[CloudFrontOriginAccessIdentitySummary]
[CloudFrontOriginAccessIdentitySummary]
-> Iso
(Maybe [CloudFrontOriginAccessIdentitySummary])
(Maybe [CloudFrontOriginAccessIdentitySummary])
(Maybe [CloudFrontOriginAccessIdentitySummary])
(Maybe [CloudFrontOriginAccessIdentitySummary])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[CloudFrontOriginAccessIdentitySummary]
[CloudFrontOriginAccessIdentitySummary]
[CloudFrontOriginAccessIdentitySummary]
[CloudFrontOriginAccessIdentitySummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
cloudFrontOriginAccessIdentityList_nextMarker :: Lens.Lens' CloudFrontOriginAccessIdentityList (Prelude.Maybe Prelude.Text)
cloudFrontOriginAccessIdentityList_nextMarker :: (Maybe Text -> f (Maybe Text))
-> CloudFrontOriginAccessIdentityList
-> f CloudFrontOriginAccessIdentityList
cloudFrontOriginAccessIdentityList_nextMarker = (CloudFrontOriginAccessIdentityList -> Maybe Text)
-> (CloudFrontOriginAccessIdentityList
-> Maybe Text -> CloudFrontOriginAccessIdentityList)
-> Lens
CloudFrontOriginAccessIdentityList
CloudFrontOriginAccessIdentityList
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudFrontOriginAccessIdentityList' {Maybe Text
nextMarker :: Maybe Text
$sel:nextMarker:CloudFrontOriginAccessIdentityList' :: CloudFrontOriginAccessIdentityList -> Maybe Text
nextMarker} -> Maybe Text
nextMarker) (\s :: CloudFrontOriginAccessIdentityList
s@CloudFrontOriginAccessIdentityList' {} Maybe Text
a -> CloudFrontOriginAccessIdentityList
s {$sel:nextMarker:CloudFrontOriginAccessIdentityList' :: Maybe Text
nextMarker = Maybe Text
a} :: CloudFrontOriginAccessIdentityList)
cloudFrontOriginAccessIdentityList_marker :: Lens.Lens' CloudFrontOriginAccessIdentityList Prelude.Text
cloudFrontOriginAccessIdentityList_marker :: (Text -> f Text)
-> CloudFrontOriginAccessIdentityList
-> f CloudFrontOriginAccessIdentityList
cloudFrontOriginAccessIdentityList_marker = (CloudFrontOriginAccessIdentityList -> Text)
-> (CloudFrontOriginAccessIdentityList
-> Text -> CloudFrontOriginAccessIdentityList)
-> Lens
CloudFrontOriginAccessIdentityList
CloudFrontOriginAccessIdentityList
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudFrontOriginAccessIdentityList' {Text
marker :: Text
$sel:marker:CloudFrontOriginAccessIdentityList' :: CloudFrontOriginAccessIdentityList -> Text
marker} -> Text
marker) (\s :: CloudFrontOriginAccessIdentityList
s@CloudFrontOriginAccessIdentityList' {} Text
a -> CloudFrontOriginAccessIdentityList
s {$sel:marker:CloudFrontOriginAccessIdentityList' :: Text
marker = Text
a} :: CloudFrontOriginAccessIdentityList)
cloudFrontOriginAccessIdentityList_maxItems :: Lens.Lens' CloudFrontOriginAccessIdentityList Prelude.Int
cloudFrontOriginAccessIdentityList_maxItems :: (Int -> f Int)
-> CloudFrontOriginAccessIdentityList
-> f CloudFrontOriginAccessIdentityList
cloudFrontOriginAccessIdentityList_maxItems = (CloudFrontOriginAccessIdentityList -> Int)
-> (CloudFrontOriginAccessIdentityList
-> Int -> CloudFrontOriginAccessIdentityList)
-> Lens
CloudFrontOriginAccessIdentityList
CloudFrontOriginAccessIdentityList
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudFrontOriginAccessIdentityList' {Int
maxItems :: Int
$sel:maxItems:CloudFrontOriginAccessIdentityList' :: CloudFrontOriginAccessIdentityList -> Int
maxItems} -> Int
maxItems) (\s :: CloudFrontOriginAccessIdentityList
s@CloudFrontOriginAccessIdentityList' {} Int
a -> CloudFrontOriginAccessIdentityList
s {$sel:maxItems:CloudFrontOriginAccessIdentityList' :: Int
maxItems = Int
a} :: CloudFrontOriginAccessIdentityList)
cloudFrontOriginAccessIdentityList_isTruncated :: Lens.Lens' CloudFrontOriginAccessIdentityList Prelude.Bool
cloudFrontOriginAccessIdentityList_isTruncated :: (Bool -> f Bool)
-> CloudFrontOriginAccessIdentityList
-> f CloudFrontOriginAccessIdentityList
cloudFrontOriginAccessIdentityList_isTruncated = (CloudFrontOriginAccessIdentityList -> Bool)
-> (CloudFrontOriginAccessIdentityList
-> Bool -> CloudFrontOriginAccessIdentityList)
-> Lens
CloudFrontOriginAccessIdentityList
CloudFrontOriginAccessIdentityList
Bool
Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudFrontOriginAccessIdentityList' {Bool
isTruncated :: Bool
$sel:isTruncated:CloudFrontOriginAccessIdentityList' :: CloudFrontOriginAccessIdentityList -> Bool
isTruncated} -> Bool
isTruncated) (\s :: CloudFrontOriginAccessIdentityList
s@CloudFrontOriginAccessIdentityList' {} Bool
a -> CloudFrontOriginAccessIdentityList
s {$sel:isTruncated:CloudFrontOriginAccessIdentityList' :: Bool
isTruncated = Bool
a} :: CloudFrontOriginAccessIdentityList)
cloudFrontOriginAccessIdentityList_quantity :: Lens.Lens' CloudFrontOriginAccessIdentityList Prelude.Int
cloudFrontOriginAccessIdentityList_quantity :: (Int -> f Int)
-> CloudFrontOriginAccessIdentityList
-> f CloudFrontOriginAccessIdentityList
cloudFrontOriginAccessIdentityList_quantity = (CloudFrontOriginAccessIdentityList -> Int)
-> (CloudFrontOriginAccessIdentityList
-> Int -> CloudFrontOriginAccessIdentityList)
-> Lens
CloudFrontOriginAccessIdentityList
CloudFrontOriginAccessIdentityList
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudFrontOriginAccessIdentityList' {Int
quantity :: Int
$sel:quantity:CloudFrontOriginAccessIdentityList' :: CloudFrontOriginAccessIdentityList -> Int
quantity} -> Int
quantity) (\s :: CloudFrontOriginAccessIdentityList
s@CloudFrontOriginAccessIdentityList' {} Int
a -> CloudFrontOriginAccessIdentityList
s {$sel:quantity:CloudFrontOriginAccessIdentityList' :: Int
quantity = Int
a} :: CloudFrontOriginAccessIdentityList)
instance
Core.FromXML
CloudFrontOriginAccessIdentityList
where
parseXML :: [Node] -> Either String CloudFrontOriginAccessIdentityList
parseXML [Node]
x =
Maybe [CloudFrontOriginAccessIdentitySummary]
-> Maybe Text
-> Text
-> Int
-> Bool
-> Int
-> CloudFrontOriginAccessIdentityList
CloudFrontOriginAccessIdentityList'
(Maybe [CloudFrontOriginAccessIdentitySummary]
-> Maybe Text
-> Text
-> Int
-> Bool
-> Int
-> CloudFrontOriginAccessIdentityList)
-> Either String (Maybe [CloudFrontOriginAccessIdentitySummary])
-> Either
String
(Maybe Text
-> Text
-> Int
-> Bool
-> Int
-> CloudFrontOriginAccessIdentityList)
forall (f :: * -> *) a b. Functor 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
"Items" 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 (Maybe [CloudFrontOriginAccessIdentitySummary]))
-> Either String (Maybe [CloudFrontOriginAccessIdentitySummary])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [CloudFrontOriginAccessIdentitySummary])
-> [Node]
-> Either String (Maybe [CloudFrontOriginAccessIdentitySummary])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may
( Text
-> [Node] -> Either String [CloudFrontOriginAccessIdentitySummary]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList
Text
"CloudFrontOriginAccessIdentitySummary"
)
)
Either
String
(Maybe Text
-> Text
-> Int
-> Bool
-> Int
-> CloudFrontOriginAccessIdentityList)
-> Either String (Maybe Text)
-> Either
String
(Text -> Int -> Bool -> Int -> CloudFrontOriginAccessIdentityList)
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
"NextMarker")
Either
String
(Text -> Int -> Bool -> Int -> CloudFrontOriginAccessIdentityList)
-> Either String Text
-> Either
String (Int -> Bool -> Int -> CloudFrontOriginAccessIdentityList)
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
"Marker")
Either
String (Int -> Bool -> Int -> CloudFrontOriginAccessIdentityList)
-> Either String Int
-> Either
String (Bool -> Int -> CloudFrontOriginAccessIdentityList)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Int
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"MaxItems")
Either String (Bool -> Int -> CloudFrontOriginAccessIdentityList)
-> Either String Bool
-> Either String (Int -> CloudFrontOriginAccessIdentityList)
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 (Int -> CloudFrontOriginAccessIdentityList)
-> Either String Int
-> Either String CloudFrontOriginAccessIdentityList
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Int
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Quantity")
instance
Prelude.Hashable
CloudFrontOriginAccessIdentityList
instance
Prelude.NFData
CloudFrontOriginAccessIdentityList