{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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.
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'
{ $sel:items:CloudFrontOriginAccessIdentityList' :: Maybe [CloudFrontOriginAccessIdentitySummary]
items =
forall a. Maybe a
Prelude.Nothing,
$sel:nextMarker:CloudFrontOriginAccessIdentityList' :: Maybe Text
nextMarker = 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 :: Lens'
CloudFrontOriginAccessIdentityList
(Maybe [CloudFrontOriginAccessIdentitySummary])
cloudFrontOriginAccessIdentityList_items = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 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 :: Lens' CloudFrontOriginAccessIdentityList (Maybe Text)
cloudFrontOriginAccessIdentityList_nextMarker = 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 :: Lens' CloudFrontOriginAccessIdentityList Text
cloudFrontOriginAccessIdentityList_marker = 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 :: Lens' CloudFrontOriginAccessIdentityList Int
cloudFrontOriginAccessIdentityList_maxItems = 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 :: Lens' CloudFrontOriginAccessIdentityList Bool
cloudFrontOriginAccessIdentityList_isTruncated = 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 :: Lens' CloudFrontOriginAccessIdentityList Int
cloudFrontOriginAccessIdentityList_quantity = 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
Data.FromXML
CloudFrontOriginAccessIdentityList
where
parseXML :: [Node] -> Either String CloudFrontOriginAccessIdentityList
parseXML [Node]
x =
Maybe [CloudFrontOriginAccessIdentitySummary]
-> Maybe Text
-> Text
-> Int
-> Bool
-> Int
-> CloudFrontOriginAccessIdentityList
CloudFrontOriginAccessIdentityList'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( [Node]
x
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Items"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may
( forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList
Text
"CloudFrontOriginAccessIdentitySummary"
)
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"NextMarker")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"Marker")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"MaxItems")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"IsTruncated")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"Quantity")
instance
Prelude.Hashable
CloudFrontOriginAccessIdentityList
where
hashWithSalt :: Int -> CloudFrontOriginAccessIdentityList -> Int
hashWithSalt
Int
_salt
CloudFrontOriginAccessIdentityList' {Bool
Int
Maybe [CloudFrontOriginAccessIdentitySummary]
Maybe Text
Text
quantity :: Int
isTruncated :: Bool
maxItems :: Int
marker :: Text
nextMarker :: Maybe Text
items :: Maybe [CloudFrontOriginAccessIdentitySummary]
$sel:quantity:CloudFrontOriginAccessIdentityList' :: CloudFrontOriginAccessIdentityList -> Int
$sel:isTruncated:CloudFrontOriginAccessIdentityList' :: CloudFrontOriginAccessIdentityList -> Bool
$sel:maxItems:CloudFrontOriginAccessIdentityList' :: CloudFrontOriginAccessIdentityList -> Int
$sel:marker:CloudFrontOriginAccessIdentityList' :: CloudFrontOriginAccessIdentityList -> Text
$sel:nextMarker:CloudFrontOriginAccessIdentityList' :: CloudFrontOriginAccessIdentityList -> Maybe Text
$sel:items:CloudFrontOriginAccessIdentityList' :: CloudFrontOriginAccessIdentityList
-> Maybe [CloudFrontOriginAccessIdentitySummary]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [CloudFrontOriginAccessIdentitySummary]
items
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextMarker
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
marker
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Int
maxItems
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Bool
isTruncated
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Int
quantity
instance
Prelude.NFData
CloudFrontOriginAccessIdentityList
where
rnf :: CloudFrontOriginAccessIdentityList -> ()
rnf CloudFrontOriginAccessIdentityList' {Bool
Int
Maybe [CloudFrontOriginAccessIdentitySummary]
Maybe Text
Text
quantity :: Int
isTruncated :: Bool
maxItems :: Int
marker :: Text
nextMarker :: Maybe Text
items :: Maybe [CloudFrontOriginAccessIdentitySummary]
$sel:quantity:CloudFrontOriginAccessIdentityList' :: CloudFrontOriginAccessIdentityList -> Int
$sel:isTruncated:CloudFrontOriginAccessIdentityList' :: CloudFrontOriginAccessIdentityList -> Bool
$sel:maxItems:CloudFrontOriginAccessIdentityList' :: CloudFrontOriginAccessIdentityList -> Int
$sel:marker:CloudFrontOriginAccessIdentityList' :: CloudFrontOriginAccessIdentityList -> Text
$sel:nextMarker:CloudFrontOriginAccessIdentityList' :: CloudFrontOriginAccessIdentityList -> Maybe Text
$sel:items:CloudFrontOriginAccessIdentityList' :: CloudFrontOriginAccessIdentityList
-> Maybe [CloudFrontOriginAccessIdentitySummary]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [CloudFrontOriginAccessIdentitySummary]
items
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextMarker
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
marker
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
maxItems
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Bool
isTruncated
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
quantity