{-# 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.MwAA.Types.ModuleLoggingConfigurationInput where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MwAA.Types.LoggingLevel
import qualified Amazonka.Prelude as Prelude
data ModuleLoggingConfigurationInput = ModuleLoggingConfigurationInput'
{
ModuleLoggingConfigurationInput -> Bool
enabled :: Prelude.Bool,
ModuleLoggingConfigurationInput -> LoggingLevel
logLevel :: LoggingLevel
}
deriving (ModuleLoggingConfigurationInput
-> ModuleLoggingConfigurationInput -> Bool
(ModuleLoggingConfigurationInput
-> ModuleLoggingConfigurationInput -> Bool)
-> (ModuleLoggingConfigurationInput
-> ModuleLoggingConfigurationInput -> Bool)
-> Eq ModuleLoggingConfigurationInput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModuleLoggingConfigurationInput
-> ModuleLoggingConfigurationInput -> Bool
$c/= :: ModuleLoggingConfigurationInput
-> ModuleLoggingConfigurationInput -> Bool
== :: ModuleLoggingConfigurationInput
-> ModuleLoggingConfigurationInput -> Bool
$c== :: ModuleLoggingConfigurationInput
-> ModuleLoggingConfigurationInput -> Bool
Prelude.Eq, ReadPrec [ModuleLoggingConfigurationInput]
ReadPrec ModuleLoggingConfigurationInput
Int -> ReadS ModuleLoggingConfigurationInput
ReadS [ModuleLoggingConfigurationInput]
(Int -> ReadS ModuleLoggingConfigurationInput)
-> ReadS [ModuleLoggingConfigurationInput]
-> ReadPrec ModuleLoggingConfigurationInput
-> ReadPrec [ModuleLoggingConfigurationInput]
-> Read ModuleLoggingConfigurationInput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModuleLoggingConfigurationInput]
$creadListPrec :: ReadPrec [ModuleLoggingConfigurationInput]
readPrec :: ReadPrec ModuleLoggingConfigurationInput
$creadPrec :: ReadPrec ModuleLoggingConfigurationInput
readList :: ReadS [ModuleLoggingConfigurationInput]
$creadList :: ReadS [ModuleLoggingConfigurationInput]
readsPrec :: Int -> ReadS ModuleLoggingConfigurationInput
$creadsPrec :: Int -> ReadS ModuleLoggingConfigurationInput
Prelude.Read, Int -> ModuleLoggingConfigurationInput -> ShowS
[ModuleLoggingConfigurationInput] -> ShowS
ModuleLoggingConfigurationInput -> String
(Int -> ModuleLoggingConfigurationInput -> ShowS)
-> (ModuleLoggingConfigurationInput -> String)
-> ([ModuleLoggingConfigurationInput] -> ShowS)
-> Show ModuleLoggingConfigurationInput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModuleLoggingConfigurationInput] -> ShowS
$cshowList :: [ModuleLoggingConfigurationInput] -> ShowS
show :: ModuleLoggingConfigurationInput -> String
$cshow :: ModuleLoggingConfigurationInput -> String
showsPrec :: Int -> ModuleLoggingConfigurationInput -> ShowS
$cshowsPrec :: Int -> ModuleLoggingConfigurationInput -> ShowS
Prelude.Show, (forall x.
ModuleLoggingConfigurationInput
-> Rep ModuleLoggingConfigurationInput x)
-> (forall x.
Rep ModuleLoggingConfigurationInput x
-> ModuleLoggingConfigurationInput)
-> Generic ModuleLoggingConfigurationInput
forall x.
Rep ModuleLoggingConfigurationInput x
-> ModuleLoggingConfigurationInput
forall x.
ModuleLoggingConfigurationInput
-> Rep ModuleLoggingConfigurationInput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ModuleLoggingConfigurationInput x
-> ModuleLoggingConfigurationInput
$cfrom :: forall x.
ModuleLoggingConfigurationInput
-> Rep ModuleLoggingConfigurationInput x
Prelude.Generic)
newModuleLoggingConfigurationInput ::
Prelude.Bool ->
LoggingLevel ->
ModuleLoggingConfigurationInput
newModuleLoggingConfigurationInput :: Bool -> LoggingLevel -> ModuleLoggingConfigurationInput
newModuleLoggingConfigurationInput
Bool
pEnabled_
LoggingLevel
pLogLevel_ =
ModuleLoggingConfigurationInput' :: Bool -> LoggingLevel -> ModuleLoggingConfigurationInput
ModuleLoggingConfigurationInput'
{ $sel:enabled:ModuleLoggingConfigurationInput' :: Bool
enabled =
Bool
pEnabled_,
$sel:logLevel:ModuleLoggingConfigurationInput' :: LoggingLevel
logLevel = LoggingLevel
pLogLevel_
}
moduleLoggingConfigurationInput_enabled :: Lens.Lens' ModuleLoggingConfigurationInput Prelude.Bool
moduleLoggingConfigurationInput_enabled :: (Bool -> f Bool)
-> ModuleLoggingConfigurationInput
-> f ModuleLoggingConfigurationInput
moduleLoggingConfigurationInput_enabled = (ModuleLoggingConfigurationInput -> Bool)
-> (ModuleLoggingConfigurationInput
-> Bool -> ModuleLoggingConfigurationInput)
-> Lens
ModuleLoggingConfigurationInput
ModuleLoggingConfigurationInput
Bool
Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModuleLoggingConfigurationInput' {Bool
enabled :: Bool
$sel:enabled:ModuleLoggingConfigurationInput' :: ModuleLoggingConfigurationInput -> Bool
enabled} -> Bool
enabled) (\s :: ModuleLoggingConfigurationInput
s@ModuleLoggingConfigurationInput' {} Bool
a -> ModuleLoggingConfigurationInput
s {$sel:enabled:ModuleLoggingConfigurationInput' :: Bool
enabled = Bool
a} :: ModuleLoggingConfigurationInput)
moduleLoggingConfigurationInput_logLevel :: Lens.Lens' ModuleLoggingConfigurationInput LoggingLevel
moduleLoggingConfigurationInput_logLevel :: (LoggingLevel -> f LoggingLevel)
-> ModuleLoggingConfigurationInput
-> f ModuleLoggingConfigurationInput
moduleLoggingConfigurationInput_logLevel = (ModuleLoggingConfigurationInput -> LoggingLevel)
-> (ModuleLoggingConfigurationInput
-> LoggingLevel -> ModuleLoggingConfigurationInput)
-> Lens
ModuleLoggingConfigurationInput
ModuleLoggingConfigurationInput
LoggingLevel
LoggingLevel
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModuleLoggingConfigurationInput' {LoggingLevel
logLevel :: LoggingLevel
$sel:logLevel:ModuleLoggingConfigurationInput' :: ModuleLoggingConfigurationInput -> LoggingLevel
logLevel} -> LoggingLevel
logLevel) (\s :: ModuleLoggingConfigurationInput
s@ModuleLoggingConfigurationInput' {} LoggingLevel
a -> ModuleLoggingConfigurationInput
s {$sel:logLevel:ModuleLoggingConfigurationInput' :: LoggingLevel
logLevel = LoggingLevel
a} :: ModuleLoggingConfigurationInput)
instance
Prelude.Hashable
ModuleLoggingConfigurationInput
instance
Prelude.NFData
ModuleLoggingConfigurationInput
instance Core.ToJSON ModuleLoggingConfigurationInput where
toJSON :: ModuleLoggingConfigurationInput -> Value
toJSON ModuleLoggingConfigurationInput' {Bool
LoggingLevel
logLevel :: LoggingLevel
enabled :: Bool
$sel:logLevel:ModuleLoggingConfigurationInput' :: ModuleLoggingConfigurationInput -> LoggingLevel
$sel:enabled:ModuleLoggingConfigurationInput' :: ModuleLoggingConfigurationInput -> Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Enabled" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Bool
enabled),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"LogLevel" Text -> LoggingLevel -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= LoggingLevel
logLevel)
]
)