{-# 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.PendingLogs where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PendingLogs = PendingLogs'
{
PendingLogs -> Maybe Bool
audit :: Prelude.Maybe Prelude.Bool,
PendingLogs -> Maybe Bool
general :: Prelude.Maybe Prelude.Bool
}
deriving (PendingLogs -> PendingLogs -> Bool
(PendingLogs -> PendingLogs -> Bool)
-> (PendingLogs -> PendingLogs -> Bool) -> Eq PendingLogs
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PendingLogs -> PendingLogs -> Bool
$c/= :: PendingLogs -> PendingLogs -> Bool
== :: PendingLogs -> PendingLogs -> Bool
$c== :: PendingLogs -> PendingLogs -> Bool
Prelude.Eq, ReadPrec [PendingLogs]
ReadPrec PendingLogs
Int -> ReadS PendingLogs
ReadS [PendingLogs]
(Int -> ReadS PendingLogs)
-> ReadS [PendingLogs]
-> ReadPrec PendingLogs
-> ReadPrec [PendingLogs]
-> Read PendingLogs
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PendingLogs]
$creadListPrec :: ReadPrec [PendingLogs]
readPrec :: ReadPrec PendingLogs
$creadPrec :: ReadPrec PendingLogs
readList :: ReadS [PendingLogs]
$creadList :: ReadS [PendingLogs]
readsPrec :: Int -> ReadS PendingLogs
$creadsPrec :: Int -> ReadS PendingLogs
Prelude.Read, Int -> PendingLogs -> ShowS
[PendingLogs] -> ShowS
PendingLogs -> String
(Int -> PendingLogs -> ShowS)
-> (PendingLogs -> String)
-> ([PendingLogs] -> ShowS)
-> Show PendingLogs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PendingLogs] -> ShowS
$cshowList :: [PendingLogs] -> ShowS
show :: PendingLogs -> String
$cshow :: PendingLogs -> String
showsPrec :: Int -> PendingLogs -> ShowS
$cshowsPrec :: Int -> PendingLogs -> ShowS
Prelude.Show, (forall x. PendingLogs -> Rep PendingLogs x)
-> (forall x. Rep PendingLogs x -> PendingLogs)
-> Generic PendingLogs
forall x. Rep PendingLogs x -> PendingLogs
forall x. PendingLogs -> Rep PendingLogs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PendingLogs x -> PendingLogs
$cfrom :: forall x. PendingLogs -> Rep PendingLogs x
Prelude.Generic)
newPendingLogs ::
PendingLogs
newPendingLogs :: PendingLogs
newPendingLogs =
PendingLogs' :: Maybe Bool -> Maybe Bool -> PendingLogs
PendingLogs'
{ $sel:audit:PendingLogs' :: Maybe Bool
audit = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:general:PendingLogs' :: Maybe Bool
general = Maybe Bool
forall a. Maybe a
Prelude.Nothing
}
pendingLogs_audit :: Lens.Lens' PendingLogs (Prelude.Maybe Prelude.Bool)
pendingLogs_audit :: (Maybe Bool -> f (Maybe Bool)) -> PendingLogs -> f PendingLogs
pendingLogs_audit = (PendingLogs -> Maybe Bool)
-> (PendingLogs -> Maybe Bool -> PendingLogs)
-> Lens PendingLogs PendingLogs (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingLogs' {Maybe Bool
audit :: Maybe Bool
$sel:audit:PendingLogs' :: PendingLogs -> Maybe Bool
audit} -> Maybe Bool
audit) (\s :: PendingLogs
s@PendingLogs' {} Maybe Bool
a -> PendingLogs
s {$sel:audit:PendingLogs' :: Maybe Bool
audit = Maybe Bool
a} :: PendingLogs)
pendingLogs_general :: Lens.Lens' PendingLogs (Prelude.Maybe Prelude.Bool)
pendingLogs_general :: (Maybe Bool -> f (Maybe Bool)) -> PendingLogs -> f PendingLogs
pendingLogs_general = (PendingLogs -> Maybe Bool)
-> (PendingLogs -> Maybe Bool -> PendingLogs)
-> Lens PendingLogs PendingLogs (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingLogs' {Maybe Bool
general :: Maybe Bool
$sel:general:PendingLogs' :: PendingLogs -> Maybe Bool
general} -> Maybe Bool
general) (\s :: PendingLogs
s@PendingLogs' {} Maybe Bool
a -> PendingLogs
s {$sel:general:PendingLogs' :: Maybe Bool
general = Maybe Bool
a} :: PendingLogs)
instance Core.FromJSON PendingLogs where
parseJSON :: Value -> Parser PendingLogs
parseJSON =
String
-> (Object -> Parser PendingLogs) -> Value -> Parser PendingLogs
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"PendingLogs"
( \Object
x ->
Maybe Bool -> Maybe Bool -> PendingLogs
PendingLogs'
(Maybe Bool -> Maybe Bool -> PendingLogs)
-> Parser (Maybe Bool) -> Parser (Maybe Bool -> PendingLogs)
forall (f :: * -> *) a b. Functor 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 Bool -> PendingLogs)
-> Parser (Maybe Bool) -> Parser PendingLogs
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
"general")
)
instance Prelude.Hashable PendingLogs
instance Prelude.NFData PendingLogs