{-# 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.FSx.Types.LustreLogConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.FSx.Types.LustreAccessAuditLogLevel
import qualified Amazonka.Prelude as Prelude
data LustreLogConfiguration = LustreLogConfiguration'
{
LustreLogConfiguration -> Maybe Text
destination :: Prelude.Maybe Prelude.Text,
LustreLogConfiguration -> LustreAccessAuditLogLevel
level :: LustreAccessAuditLogLevel
}
deriving (LustreLogConfiguration -> LustreLogConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LustreLogConfiguration -> LustreLogConfiguration -> Bool
$c/= :: LustreLogConfiguration -> LustreLogConfiguration -> Bool
== :: LustreLogConfiguration -> LustreLogConfiguration -> Bool
$c== :: LustreLogConfiguration -> LustreLogConfiguration -> Bool
Prelude.Eq, ReadPrec [LustreLogConfiguration]
ReadPrec LustreLogConfiguration
Int -> ReadS LustreLogConfiguration
ReadS [LustreLogConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LustreLogConfiguration]
$creadListPrec :: ReadPrec [LustreLogConfiguration]
readPrec :: ReadPrec LustreLogConfiguration
$creadPrec :: ReadPrec LustreLogConfiguration
readList :: ReadS [LustreLogConfiguration]
$creadList :: ReadS [LustreLogConfiguration]
readsPrec :: Int -> ReadS LustreLogConfiguration
$creadsPrec :: Int -> ReadS LustreLogConfiguration
Prelude.Read, Int -> LustreLogConfiguration -> ShowS
[LustreLogConfiguration] -> ShowS
LustreLogConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LustreLogConfiguration] -> ShowS
$cshowList :: [LustreLogConfiguration] -> ShowS
show :: LustreLogConfiguration -> String
$cshow :: LustreLogConfiguration -> String
showsPrec :: Int -> LustreLogConfiguration -> ShowS
$cshowsPrec :: Int -> LustreLogConfiguration -> ShowS
Prelude.Show, forall x. Rep LustreLogConfiguration x -> LustreLogConfiguration
forall x. LustreLogConfiguration -> Rep LustreLogConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LustreLogConfiguration x -> LustreLogConfiguration
$cfrom :: forall x. LustreLogConfiguration -> Rep LustreLogConfiguration x
Prelude.Generic)
newLustreLogConfiguration ::
LustreAccessAuditLogLevel ->
LustreLogConfiguration
newLustreLogConfiguration :: LustreAccessAuditLogLevel -> LustreLogConfiguration
newLustreLogConfiguration LustreAccessAuditLogLevel
pLevel_ =
LustreLogConfiguration'
{ $sel:destination:LustreLogConfiguration' :: Maybe Text
destination =
forall a. Maybe a
Prelude.Nothing,
$sel:level:LustreLogConfiguration' :: LustreAccessAuditLogLevel
level = LustreAccessAuditLogLevel
pLevel_
}
lustreLogConfiguration_destination :: Lens.Lens' LustreLogConfiguration (Prelude.Maybe Prelude.Text)
lustreLogConfiguration_destination :: Lens' LustreLogConfiguration (Maybe Text)
lustreLogConfiguration_destination = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LustreLogConfiguration' {Maybe Text
destination :: Maybe Text
$sel:destination:LustreLogConfiguration' :: LustreLogConfiguration -> Maybe Text
destination} -> Maybe Text
destination) (\s :: LustreLogConfiguration
s@LustreLogConfiguration' {} Maybe Text
a -> LustreLogConfiguration
s {$sel:destination:LustreLogConfiguration' :: Maybe Text
destination = Maybe Text
a} :: LustreLogConfiguration)
lustreLogConfiguration_level :: Lens.Lens' LustreLogConfiguration LustreAccessAuditLogLevel
lustreLogConfiguration_level :: Lens' LustreLogConfiguration LustreAccessAuditLogLevel
lustreLogConfiguration_level = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LustreLogConfiguration' {LustreAccessAuditLogLevel
level :: LustreAccessAuditLogLevel
$sel:level:LustreLogConfiguration' :: LustreLogConfiguration -> LustreAccessAuditLogLevel
level} -> LustreAccessAuditLogLevel
level) (\s :: LustreLogConfiguration
s@LustreLogConfiguration' {} LustreAccessAuditLogLevel
a -> LustreLogConfiguration
s {$sel:level:LustreLogConfiguration' :: LustreAccessAuditLogLevel
level = LustreAccessAuditLogLevel
a} :: LustreLogConfiguration)
instance Data.FromJSON LustreLogConfiguration where
parseJSON :: Value -> Parser LustreLogConfiguration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"LustreLogConfiguration"
( \Object
x ->
Maybe Text -> LustreAccessAuditLogLevel -> LustreLogConfiguration
LustreLogConfiguration'
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
"Destination")
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
"Level")
)
instance Prelude.Hashable LustreLogConfiguration where
hashWithSalt :: Int -> LustreLogConfiguration -> Int
hashWithSalt Int
_salt LustreLogConfiguration' {Maybe Text
LustreAccessAuditLogLevel
level :: LustreAccessAuditLogLevel
destination :: Maybe Text
$sel:level:LustreLogConfiguration' :: LustreLogConfiguration -> LustreAccessAuditLogLevel
$sel:destination:LustreLogConfiguration' :: LustreLogConfiguration -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
destination
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` LustreAccessAuditLogLevel
level
instance Prelude.NFData LustreLogConfiguration where
rnf :: LustreLogConfiguration -> ()
rnf LustreLogConfiguration' {Maybe Text
LustreAccessAuditLogLevel
level :: LustreAccessAuditLogLevel
destination :: Maybe Text
$sel:level:LustreLogConfiguration' :: LustreLogConfiguration -> LustreAccessAuditLogLevel
$sel:destination:LustreLogConfiguration' :: LustreLogConfiguration -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
destination
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf LustreAccessAuditLogLevel
level