{-# 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.Lens as Lens
import Amazonka.MQ.Types.PendingLogs
import qualified Amazonka.Prelude as Prelude
data LogsSummary = LogsSummary'
{
LogsSummary -> Maybe PendingLogs
pending :: Prelude.Maybe PendingLogs,
LogsSummary -> Maybe Bool
audit :: Prelude.Maybe Prelude.Bool,
LogsSummary -> Maybe Text
auditLogGroup :: Prelude.Maybe Prelude.Text,
LogsSummary -> Text
generalLogGroup :: Prelude.Text,
LogsSummary -> Bool
general :: Prelude.Bool
}
deriving (LogsSummary -> LogsSummary -> Bool
(LogsSummary -> LogsSummary -> Bool)
-> (LogsSummary -> LogsSummary -> Bool) -> Eq LogsSummary
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]
(Int -> ReadS LogsSummary)
-> ReadS [LogsSummary]
-> ReadPrec LogsSummary
-> ReadPrec [LogsSummary]
-> Read 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
(Int -> LogsSummary -> ShowS)
-> (LogsSummary -> String)
-> ([LogsSummary] -> ShowS)
-> Show LogsSummary
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. LogsSummary -> Rep LogsSummary x)
-> (forall x. Rep LogsSummary x -> LogsSummary)
-> Generic LogsSummary
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' :: Maybe PendingLogs
-> Maybe Bool -> Maybe Text -> Text -> Bool -> LogsSummary
LogsSummary'
{ $sel:pending:LogsSummary' :: Maybe PendingLogs
pending = Maybe PendingLogs
forall a. Maybe a
Prelude.Nothing,
$sel:audit:LogsSummary' :: Maybe Bool
audit = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:auditLogGroup:LogsSummary' :: Maybe Text
auditLogGroup = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:generalLogGroup:LogsSummary' :: Text
generalLogGroup = Text
pGeneralLogGroup_,
$sel:general:LogsSummary' :: Bool
general = Bool
pGeneral_
}
logsSummary_pending :: Lens.Lens' LogsSummary (Prelude.Maybe PendingLogs)
logsSummary_pending :: (Maybe PendingLogs -> f (Maybe PendingLogs))
-> LogsSummary -> f LogsSummary
logsSummary_pending = (LogsSummary -> Maybe PendingLogs)
-> (LogsSummary -> Maybe PendingLogs -> LogsSummary)
-> Lens
LogsSummary LogsSummary (Maybe PendingLogs) (Maybe PendingLogs)
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_audit :: Lens.Lens' LogsSummary (Prelude.Maybe Prelude.Bool)
logsSummary_audit :: (Maybe Bool -> f (Maybe Bool)) -> LogsSummary -> f LogsSummary
logsSummary_audit = (LogsSummary -> Maybe Bool)
-> (LogsSummary -> Maybe Bool -> LogsSummary)
-> Lens LogsSummary LogsSummary (Maybe Bool) (Maybe Bool)
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 :: (Maybe Text -> f (Maybe Text)) -> LogsSummary -> f LogsSummary
logsSummary_auditLogGroup = (LogsSummary -> Maybe Text)
-> (LogsSummary -> Maybe Text -> LogsSummary)
-> Lens LogsSummary LogsSummary (Maybe Text) (Maybe Text)
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_generalLogGroup :: Lens.Lens' LogsSummary Prelude.Text
logsSummary_generalLogGroup :: (Text -> f Text) -> LogsSummary -> f LogsSummary
logsSummary_generalLogGroup = (LogsSummary -> Text)
-> (LogsSummary -> Text -> LogsSummary)
-> Lens LogsSummary LogsSummary Text Text
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 :: (Bool -> f Bool) -> LogsSummary -> f LogsSummary
logsSummary_general = (LogsSummary -> Bool)
-> (LogsSummary -> Bool -> LogsSummary)
-> Lens LogsSummary LogsSummary Bool Bool
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 Core.FromJSON LogsSummary where
parseJSON :: Value -> Parser LogsSummary
parseJSON =
String
-> (Object -> Parser LogsSummary) -> Value -> Parser LogsSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"LogsSummary"
( \Object
x ->
Maybe PendingLogs
-> Maybe Bool -> Maybe Text -> Text -> Bool -> LogsSummary
LogsSummary'
(Maybe PendingLogs
-> Maybe Bool -> Maybe Text -> Text -> Bool -> LogsSummary)
-> Parser (Maybe PendingLogs)
-> Parser (Maybe Bool -> Maybe Text -> Text -> Bool -> LogsSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe PendingLogs)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"pending")
Parser (Maybe Bool -> Maybe Text -> Text -> Bool -> LogsSummary)
-> Parser (Maybe Bool)
-> Parser (Maybe Text -> Text -> Bool -> LogsSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"audit")
Parser (Maybe Text -> Text -> Bool -> LogsSummary)
-> Parser (Maybe Text) -> Parser (Text -> Bool -> LogsSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"auditLogGroup")
Parser (Text -> Bool -> LogsSummary)
-> Parser Text -> Parser (Bool -> LogsSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"generalLogGroup")
Parser (Bool -> LogsSummary) -> Parser Bool -> Parser LogsSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Bool
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"general")
)
instance Prelude.Hashable LogsSummary
instance Prelude.NFData LogsSummary