{-# 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.MQ.Types.LogsSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MQ.Types.PendingLogs
import qualified Amazonka.Prelude as Prelude
data LogsSummary = LogsSummary'
{
LogsSummary -> Maybe Bool
audit :: Prelude.Maybe Prelude.Bool,
LogsSummary -> Maybe Text
auditLogGroup :: Prelude.Maybe Prelude.Text,
LogsSummary -> Maybe PendingLogs
pending :: Prelude.Maybe PendingLogs,
LogsSummary -> Text
generalLogGroup :: Prelude.Text,
LogsSummary -> Bool
general :: Prelude.Bool
}
deriving (LogsSummary -> LogsSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LogsSummary -> LogsSummary -> Bool
$c/= :: LogsSummary -> LogsSummary -> Bool
== :: LogsSummary -> LogsSummary -> Bool
$c== :: LogsSummary -> LogsSummary -> Bool
Prelude.Eq, ReadPrec [LogsSummary]
ReadPrec LogsSummary
Int -> ReadS LogsSummary
ReadS [LogsSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LogsSummary]
$creadListPrec :: ReadPrec [LogsSummary]
readPrec :: ReadPrec LogsSummary
$creadPrec :: ReadPrec LogsSummary
readList :: ReadS [LogsSummary]
$creadList :: ReadS [LogsSummary]
readsPrec :: Int -> ReadS LogsSummary
$creadsPrec :: Int -> ReadS LogsSummary
Prelude.Read, Int -> LogsSummary -> ShowS
[LogsSummary] -> ShowS
LogsSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LogsSummary] -> ShowS
$cshowList :: [LogsSummary] -> ShowS
show :: LogsSummary -> String
$cshow :: LogsSummary -> String
showsPrec :: Int -> LogsSummary -> ShowS
$cshowsPrec :: Int -> LogsSummary -> ShowS
Prelude.Show, forall x. Rep LogsSummary x -> LogsSummary
forall x. LogsSummary -> Rep LogsSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LogsSummary x -> LogsSummary
$cfrom :: forall x. LogsSummary -> Rep LogsSummary x
Prelude.Generic)
newLogsSummary ::
Prelude.Text ->
Prelude.Bool ->
LogsSummary
newLogsSummary :: Text -> Bool -> LogsSummary
newLogsSummary Text
pGeneralLogGroup_ Bool
pGeneral_ =
LogsSummary'
{ $sel:audit:LogsSummary' :: Maybe Bool
audit = forall a. Maybe a
Prelude.Nothing,
$sel:auditLogGroup:LogsSummary' :: Maybe Text
auditLogGroup = forall a. Maybe a
Prelude.Nothing,
$sel:pending:LogsSummary' :: Maybe PendingLogs
pending = forall a. Maybe a
Prelude.Nothing,
$sel:generalLogGroup:LogsSummary' :: Text
generalLogGroup = Text
pGeneralLogGroup_,
$sel:general:LogsSummary' :: Bool
general = Bool
pGeneral_
}
logsSummary_audit :: Lens.Lens' LogsSummary (Prelude.Maybe Prelude.Bool)
logsSummary_audit :: Lens' LogsSummary (Maybe Bool)
logsSummary_audit = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LogsSummary' {Maybe Bool
audit :: Maybe Bool
$sel:audit:LogsSummary' :: LogsSummary -> Maybe Bool
audit} -> Maybe Bool
audit) (\s :: LogsSummary
s@LogsSummary' {} Maybe Bool
a -> LogsSummary
s {$sel:audit:LogsSummary' :: Maybe Bool
audit = Maybe Bool
a} :: LogsSummary)
logsSummary_auditLogGroup :: Lens.Lens' LogsSummary (Prelude.Maybe Prelude.Text)
logsSummary_auditLogGroup :: Lens' LogsSummary (Maybe Text)
logsSummary_auditLogGroup = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LogsSummary' {Maybe Text
auditLogGroup :: Maybe Text
$sel:auditLogGroup:LogsSummary' :: LogsSummary -> Maybe Text
auditLogGroup} -> Maybe Text
auditLogGroup) (\s :: LogsSummary
s@LogsSummary' {} Maybe Text
a -> LogsSummary
s {$sel:auditLogGroup:LogsSummary' :: Maybe Text
auditLogGroup = Maybe Text
a} :: LogsSummary)
logsSummary_pending :: Lens.Lens' LogsSummary (Prelude.Maybe PendingLogs)
logsSummary_pending :: Lens' LogsSummary (Maybe PendingLogs)
logsSummary_pending = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LogsSummary' {Maybe PendingLogs
pending :: Maybe PendingLogs
$sel:pending:LogsSummary' :: LogsSummary -> Maybe PendingLogs
pending} -> Maybe PendingLogs
pending) (\s :: LogsSummary
s@LogsSummary' {} Maybe PendingLogs
a -> LogsSummary
s {$sel:pending:LogsSummary' :: Maybe PendingLogs
pending = Maybe PendingLogs
a} :: LogsSummary)
logsSummary_generalLogGroup :: Lens.Lens' LogsSummary Prelude.Text
logsSummary_generalLogGroup :: Lens' LogsSummary Text
logsSummary_generalLogGroup = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LogsSummary' {Text
generalLogGroup :: Text
$sel:generalLogGroup:LogsSummary' :: LogsSummary -> Text
generalLogGroup} -> Text
generalLogGroup) (\s :: LogsSummary
s@LogsSummary' {} Text
a -> LogsSummary
s {$sel:generalLogGroup:LogsSummary' :: Text
generalLogGroup = Text
a} :: LogsSummary)
logsSummary_general :: Lens.Lens' LogsSummary Prelude.Bool
logsSummary_general :: Lens' LogsSummary Bool
logsSummary_general = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LogsSummary' {Bool
general :: Bool
$sel:general:LogsSummary' :: LogsSummary -> Bool
general} -> Bool
general) (\s :: LogsSummary
s@LogsSummary' {} Bool
a -> LogsSummary
s {$sel:general:LogsSummary' :: Bool
general = Bool
a} :: LogsSummary)
instance Data.FromJSON LogsSummary where
parseJSON :: Value -> Parser LogsSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"LogsSummary"
( \Object
x ->
Maybe Bool
-> Maybe Text -> Maybe PendingLogs -> Text -> Bool -> LogsSummary
LogsSummary'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"audit")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"auditLogGroup")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"pending")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"generalLogGroup")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"general")
)
instance Prelude.Hashable LogsSummary where
hashWithSalt :: Int -> LogsSummary -> Int
hashWithSalt Int
_salt LogsSummary' {Bool
Maybe Bool
Maybe Text
Maybe PendingLogs
Text
general :: Bool
generalLogGroup :: Text
pending :: Maybe PendingLogs
auditLogGroup :: Maybe Text
audit :: Maybe Bool
$sel:general:LogsSummary' :: LogsSummary -> Bool
$sel:generalLogGroup:LogsSummary' :: LogsSummary -> Text
$sel:pending:LogsSummary' :: LogsSummary -> Maybe PendingLogs
$sel:auditLogGroup:LogsSummary' :: LogsSummary -> Maybe Text
$sel:audit:LogsSummary' :: LogsSummary -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
audit
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
auditLogGroup
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PendingLogs
pending
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
generalLogGroup
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Bool
general
instance Prelude.NFData LogsSummary where
rnf :: LogsSummary -> ()
rnf LogsSummary' {Bool
Maybe Bool
Maybe Text
Maybe PendingLogs
Text
general :: Bool
generalLogGroup :: Text
pending :: Maybe PendingLogs
auditLogGroup :: Maybe Text
audit :: Maybe Bool
$sel:general:LogsSummary' :: LogsSummary -> Bool
$sel:generalLogGroup:LogsSummary' :: LogsSummary -> Text
$sel:pending:LogsSummary' :: LogsSummary -> Maybe PendingLogs
$sel:auditLogGroup:LogsSummary' :: LogsSummary -> Maybe Text
$sel:audit:LogsSummary' :: LogsSummary -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
audit
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
auditLogGroup
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PendingLogs
pending
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
generalLogGroup
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Bool
general