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