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