{-# 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.DistributionIdList where
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 DistributionIdList = DistributionIdList'
{
DistributionIdList -> Maybe [Text]
items :: Prelude.Maybe [Prelude.Text],
DistributionIdList -> Maybe Text
nextMarker :: Prelude.Maybe Prelude.Text,
DistributionIdList -> Text
marker :: Prelude.Text,
DistributionIdList -> Int
maxItems :: Prelude.Int,
DistributionIdList -> Bool
isTruncated :: Prelude.Bool,
DistributionIdList -> Int
quantity :: Prelude.Int
}
deriving (DistributionIdList -> DistributionIdList -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DistributionIdList -> DistributionIdList -> Bool
$c/= :: DistributionIdList -> DistributionIdList -> Bool
== :: DistributionIdList -> DistributionIdList -> Bool
$c== :: DistributionIdList -> DistributionIdList -> Bool
Prelude.Eq, ReadPrec [DistributionIdList]
ReadPrec DistributionIdList
Int -> ReadS DistributionIdList
ReadS [DistributionIdList]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DistributionIdList]
$creadListPrec :: ReadPrec [DistributionIdList]
readPrec :: ReadPrec DistributionIdList
$creadPrec :: ReadPrec DistributionIdList
readList :: ReadS [DistributionIdList]
$creadList :: ReadS [DistributionIdList]
readsPrec :: Int -> ReadS DistributionIdList
$creadsPrec :: Int -> ReadS DistributionIdList
Prelude.Read, Int -> DistributionIdList -> ShowS
[DistributionIdList] -> ShowS
DistributionIdList -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DistributionIdList] -> ShowS
$cshowList :: [DistributionIdList] -> ShowS
show :: DistributionIdList -> String
$cshow :: DistributionIdList -> String
showsPrec :: Int -> DistributionIdList -> ShowS
$cshowsPrec :: Int -> DistributionIdList -> ShowS
Prelude.Show, forall x. Rep DistributionIdList x -> DistributionIdList
forall x. DistributionIdList -> Rep DistributionIdList x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DistributionIdList x -> DistributionIdList
$cfrom :: forall x. DistributionIdList -> Rep DistributionIdList x
Prelude.Generic)
newDistributionIdList ::
Prelude.Text ->
Prelude.Int ->
Prelude.Bool ->
Prelude.Int ->
DistributionIdList
newDistributionIdList :: Text -> Int -> Bool -> Int -> DistributionIdList
newDistributionIdList
Text
pMarker_
Int
pMaxItems_
Bool
pIsTruncated_
Int
pQuantity_ =
DistributionIdList'
{ $sel:items:DistributionIdList' :: Maybe [Text]
items = forall a. Maybe a
Prelude.Nothing,
$sel:nextMarker:DistributionIdList' :: Maybe Text
nextMarker = forall a. Maybe a
Prelude.Nothing,
$sel:marker:DistributionIdList' :: Text
marker = Text
pMarker_,
$sel:maxItems:DistributionIdList' :: Int
maxItems = Int
pMaxItems_,
$sel:isTruncated:DistributionIdList' :: Bool
isTruncated = Bool
pIsTruncated_,
$sel:quantity:DistributionIdList' :: Int
quantity = Int
pQuantity_
}
distributionIdList_items :: Lens.Lens' DistributionIdList (Prelude.Maybe [Prelude.Text])
distributionIdList_items :: Lens' DistributionIdList (Maybe [Text])
distributionIdList_items = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionIdList' {Maybe [Text]
items :: Maybe [Text]
$sel:items:DistributionIdList' :: DistributionIdList -> Maybe [Text]
items} -> Maybe [Text]
items) (\s :: DistributionIdList
s@DistributionIdList' {} Maybe [Text]
a -> DistributionIdList
s {$sel:items:DistributionIdList' :: Maybe [Text]
items = Maybe [Text]
a} :: DistributionIdList) 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
distributionIdList_nextMarker :: Lens.Lens' DistributionIdList (Prelude.Maybe Prelude.Text)
distributionIdList_nextMarker :: Lens' DistributionIdList (Maybe Text)
distributionIdList_nextMarker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionIdList' {Maybe Text
nextMarker :: Maybe Text
$sel:nextMarker:DistributionIdList' :: DistributionIdList -> Maybe Text
nextMarker} -> Maybe Text
nextMarker) (\s :: DistributionIdList
s@DistributionIdList' {} Maybe Text
a -> DistributionIdList
s {$sel:nextMarker:DistributionIdList' :: Maybe Text
nextMarker = Maybe Text
a} :: DistributionIdList)
distributionIdList_marker :: Lens.Lens' DistributionIdList Prelude.Text
distributionIdList_marker :: Lens' DistributionIdList Text
distributionIdList_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionIdList' {Text
marker :: Text
$sel:marker:DistributionIdList' :: DistributionIdList -> Text
marker} -> Text
marker) (\s :: DistributionIdList
s@DistributionIdList' {} Text
a -> DistributionIdList
s {$sel:marker:DistributionIdList' :: Text
marker = Text
a} :: DistributionIdList)
distributionIdList_maxItems :: Lens.Lens' DistributionIdList Prelude.Int
distributionIdList_maxItems :: Lens' DistributionIdList Int
distributionIdList_maxItems = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionIdList' {Int
maxItems :: Int
$sel:maxItems:DistributionIdList' :: DistributionIdList -> Int
maxItems} -> Int
maxItems) (\s :: DistributionIdList
s@DistributionIdList' {} Int
a -> DistributionIdList
s {$sel:maxItems:DistributionIdList' :: Int
maxItems = Int
a} :: DistributionIdList)
distributionIdList_isTruncated :: Lens.Lens' DistributionIdList Prelude.Bool
distributionIdList_isTruncated :: Lens' DistributionIdList Bool
distributionIdList_isTruncated = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionIdList' {Bool
isTruncated :: Bool
$sel:isTruncated:DistributionIdList' :: DistributionIdList -> Bool
isTruncated} -> Bool
isTruncated) (\s :: DistributionIdList
s@DistributionIdList' {} Bool
a -> DistributionIdList
s {$sel:isTruncated:DistributionIdList' :: Bool
isTruncated = Bool
a} :: DistributionIdList)
distributionIdList_quantity :: Lens.Lens' DistributionIdList Prelude.Int
distributionIdList_quantity :: Lens' DistributionIdList Int
distributionIdList_quantity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionIdList' {Int
quantity :: Int
$sel:quantity:DistributionIdList' :: DistributionIdList -> Int
quantity} -> Int
quantity) (\s :: DistributionIdList
s@DistributionIdList' {} Int
a -> DistributionIdList
s {$sel:quantity:DistributionIdList' :: Int
quantity = Int
a} :: DistributionIdList)
instance Data.FromXML DistributionIdList where
parseXML :: [Node] -> Either String DistributionIdList
parseXML [Node]
x =
Maybe [Text]
-> Maybe Text -> Text -> Int -> Bool -> Int -> DistributionIdList
DistributionIdList'
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
"DistributionId")
)
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 DistributionIdList where
hashWithSalt :: Int -> DistributionIdList -> Int
hashWithSalt Int
_salt DistributionIdList' {Bool
Int
Maybe [Text]
Maybe Text
Text
quantity :: Int
isTruncated :: Bool
maxItems :: Int
marker :: Text
nextMarker :: Maybe Text
items :: Maybe [Text]
$sel:quantity:DistributionIdList' :: DistributionIdList -> Int
$sel:isTruncated:DistributionIdList' :: DistributionIdList -> Bool
$sel:maxItems:DistributionIdList' :: DistributionIdList -> Int
$sel:marker:DistributionIdList' :: DistributionIdList -> Text
$sel:nextMarker:DistributionIdList' :: DistributionIdList -> Maybe Text
$sel:items:DistributionIdList' :: DistributionIdList -> Maybe [Text]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
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 DistributionIdList where
rnf :: DistributionIdList -> ()
rnf DistributionIdList' {Bool
Int
Maybe [Text]
Maybe Text
Text
quantity :: Int
isTruncated :: Bool
maxItems :: Int
marker :: Text
nextMarker :: Maybe Text
items :: Maybe [Text]
$sel:quantity:DistributionIdList' :: DistributionIdList -> Int
$sel:isTruncated:DistributionIdList' :: DistributionIdList -> Bool
$sel:maxItems:DistributionIdList' :: DistributionIdList -> Int
$sel:marker:DistributionIdList' :: DistributionIdList -> Text
$sel:nextMarker:DistributionIdList' :: DistributionIdList -> Maybe Text
$sel:items:DistributionIdList' :: DistributionIdList -> Maybe [Text]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
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