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