{-# 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.ModuleLoggingConfiguration 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 ModuleLoggingConfiguration = ModuleLoggingConfiguration'
{
ModuleLoggingConfiguration -> Maybe LoggingLevel
logLevel :: Prelude.Maybe LoggingLevel,
ModuleLoggingConfiguration -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
ModuleLoggingConfiguration -> Maybe Text
cloudWatchLogGroupArn :: Prelude.Maybe Prelude.Text
}
deriving (ModuleLoggingConfiguration -> ModuleLoggingConfiguration -> Bool
(ModuleLoggingConfiguration -> ModuleLoggingConfiguration -> Bool)
-> (ModuleLoggingConfiguration
-> ModuleLoggingConfiguration -> Bool)
-> Eq ModuleLoggingConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModuleLoggingConfiguration -> ModuleLoggingConfiguration -> Bool
$c/= :: ModuleLoggingConfiguration -> ModuleLoggingConfiguration -> Bool
== :: ModuleLoggingConfiguration -> ModuleLoggingConfiguration -> Bool
$c== :: ModuleLoggingConfiguration -> ModuleLoggingConfiguration -> Bool
Prelude.Eq, ReadPrec [ModuleLoggingConfiguration]
ReadPrec ModuleLoggingConfiguration
Int -> ReadS ModuleLoggingConfiguration
ReadS [ModuleLoggingConfiguration]
(Int -> ReadS ModuleLoggingConfiguration)
-> ReadS [ModuleLoggingConfiguration]
-> ReadPrec ModuleLoggingConfiguration
-> ReadPrec [ModuleLoggingConfiguration]
-> Read ModuleLoggingConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModuleLoggingConfiguration]
$creadListPrec :: ReadPrec [ModuleLoggingConfiguration]
readPrec :: ReadPrec ModuleLoggingConfiguration
$creadPrec :: ReadPrec ModuleLoggingConfiguration
readList :: ReadS [ModuleLoggingConfiguration]
$creadList :: ReadS [ModuleLoggingConfiguration]
readsPrec :: Int -> ReadS ModuleLoggingConfiguration
$creadsPrec :: Int -> ReadS ModuleLoggingConfiguration
Prelude.Read, Int -> ModuleLoggingConfiguration -> ShowS
[ModuleLoggingConfiguration] -> ShowS
ModuleLoggingConfiguration -> String
(Int -> ModuleLoggingConfiguration -> ShowS)
-> (ModuleLoggingConfiguration -> String)
-> ([ModuleLoggingConfiguration] -> ShowS)
-> Show ModuleLoggingConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModuleLoggingConfiguration] -> ShowS
$cshowList :: [ModuleLoggingConfiguration] -> ShowS
show :: ModuleLoggingConfiguration -> String
$cshow :: ModuleLoggingConfiguration -> String
showsPrec :: Int -> ModuleLoggingConfiguration -> ShowS
$cshowsPrec :: Int -> ModuleLoggingConfiguration -> ShowS
Prelude.Show, (forall x.
ModuleLoggingConfiguration -> Rep ModuleLoggingConfiguration x)
-> (forall x.
Rep ModuleLoggingConfiguration x -> ModuleLoggingConfiguration)
-> Generic ModuleLoggingConfiguration
forall x.
Rep ModuleLoggingConfiguration x -> ModuleLoggingConfiguration
forall x.
ModuleLoggingConfiguration -> Rep ModuleLoggingConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ModuleLoggingConfiguration x -> ModuleLoggingConfiguration
$cfrom :: forall x.
ModuleLoggingConfiguration -> Rep ModuleLoggingConfiguration x
Prelude.Generic)
newModuleLoggingConfiguration ::
ModuleLoggingConfiguration
newModuleLoggingConfiguration :: ModuleLoggingConfiguration
newModuleLoggingConfiguration =
ModuleLoggingConfiguration' :: Maybe LoggingLevel
-> Maybe Bool -> Maybe Text -> ModuleLoggingConfiguration
ModuleLoggingConfiguration'
{ $sel:logLevel:ModuleLoggingConfiguration' :: Maybe LoggingLevel
logLevel =
Maybe LoggingLevel
forall a. Maybe a
Prelude.Nothing,
$sel:enabled:ModuleLoggingConfiguration' :: Maybe Bool
enabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:cloudWatchLogGroupArn:ModuleLoggingConfiguration' :: Maybe Text
cloudWatchLogGroupArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
moduleLoggingConfiguration_logLevel :: Lens.Lens' ModuleLoggingConfiguration (Prelude.Maybe LoggingLevel)
moduleLoggingConfiguration_logLevel :: (Maybe LoggingLevel -> f (Maybe LoggingLevel))
-> ModuleLoggingConfiguration -> f ModuleLoggingConfiguration
moduleLoggingConfiguration_logLevel = (ModuleLoggingConfiguration -> Maybe LoggingLevel)
-> (ModuleLoggingConfiguration
-> Maybe LoggingLevel -> ModuleLoggingConfiguration)
-> Lens
ModuleLoggingConfiguration
ModuleLoggingConfiguration
(Maybe LoggingLevel)
(Maybe LoggingLevel)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModuleLoggingConfiguration' {Maybe LoggingLevel
logLevel :: Maybe LoggingLevel
$sel:logLevel:ModuleLoggingConfiguration' :: ModuleLoggingConfiguration -> Maybe LoggingLevel
logLevel} -> Maybe LoggingLevel
logLevel) (\s :: ModuleLoggingConfiguration
s@ModuleLoggingConfiguration' {} Maybe LoggingLevel
a -> ModuleLoggingConfiguration
s {$sel:logLevel:ModuleLoggingConfiguration' :: Maybe LoggingLevel
logLevel = Maybe LoggingLevel
a} :: ModuleLoggingConfiguration)
moduleLoggingConfiguration_enabled :: Lens.Lens' ModuleLoggingConfiguration (Prelude.Maybe Prelude.Bool)
moduleLoggingConfiguration_enabled :: (Maybe Bool -> f (Maybe Bool))
-> ModuleLoggingConfiguration -> f ModuleLoggingConfiguration
moduleLoggingConfiguration_enabled = (ModuleLoggingConfiguration -> Maybe Bool)
-> (ModuleLoggingConfiguration
-> Maybe Bool -> ModuleLoggingConfiguration)
-> Lens
ModuleLoggingConfiguration
ModuleLoggingConfiguration
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModuleLoggingConfiguration' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:ModuleLoggingConfiguration' :: ModuleLoggingConfiguration -> Maybe Bool
enabled} -> Maybe Bool
enabled) (\s :: ModuleLoggingConfiguration
s@ModuleLoggingConfiguration' {} Maybe Bool
a -> ModuleLoggingConfiguration
s {$sel:enabled:ModuleLoggingConfiguration' :: Maybe Bool
enabled = Maybe Bool
a} :: ModuleLoggingConfiguration)
moduleLoggingConfiguration_cloudWatchLogGroupArn :: Lens.Lens' ModuleLoggingConfiguration (Prelude.Maybe Prelude.Text)
moduleLoggingConfiguration_cloudWatchLogGroupArn :: (Maybe Text -> f (Maybe Text))
-> ModuleLoggingConfiguration -> f ModuleLoggingConfiguration
moduleLoggingConfiguration_cloudWatchLogGroupArn = (ModuleLoggingConfiguration -> Maybe Text)
-> (ModuleLoggingConfiguration
-> Maybe Text -> ModuleLoggingConfiguration)
-> Lens
ModuleLoggingConfiguration
ModuleLoggingConfiguration
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModuleLoggingConfiguration' {Maybe Text
cloudWatchLogGroupArn :: Maybe Text
$sel:cloudWatchLogGroupArn:ModuleLoggingConfiguration' :: ModuleLoggingConfiguration -> Maybe Text
cloudWatchLogGroupArn} -> Maybe Text
cloudWatchLogGroupArn) (\s :: ModuleLoggingConfiguration
s@ModuleLoggingConfiguration' {} Maybe Text
a -> ModuleLoggingConfiguration
s {$sel:cloudWatchLogGroupArn:ModuleLoggingConfiguration' :: Maybe Text
cloudWatchLogGroupArn = Maybe Text
a} :: ModuleLoggingConfiguration)
instance Core.FromJSON ModuleLoggingConfiguration where
parseJSON :: Value -> Parser ModuleLoggingConfiguration
parseJSON =
String
-> (Object -> Parser ModuleLoggingConfiguration)
-> Value
-> Parser ModuleLoggingConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ModuleLoggingConfiguration"
( \Object
x ->
Maybe LoggingLevel
-> Maybe Bool -> Maybe Text -> ModuleLoggingConfiguration
ModuleLoggingConfiguration'
(Maybe LoggingLevel
-> Maybe Bool -> Maybe Text -> ModuleLoggingConfiguration)
-> Parser (Maybe LoggingLevel)
-> Parser (Maybe Bool -> Maybe Text -> ModuleLoggingConfiguration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe LoggingLevel)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LogLevel")
Parser (Maybe Bool -> Maybe Text -> ModuleLoggingConfiguration)
-> Parser (Maybe Bool)
-> Parser (Maybe Text -> ModuleLoggingConfiguration)
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
"Enabled")
Parser (Maybe Text -> ModuleLoggingConfiguration)
-> Parser (Maybe Text) -> Parser ModuleLoggingConfiguration
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
"CloudWatchLogGroupArn")
)
instance Prelude.Hashable ModuleLoggingConfiguration
instance Prelude.NFData ModuleLoggingConfiguration