module Stratosphere.WAFv2.LoggingConfiguration (
module Exports, LoggingConfiguration(..), mkLoggingConfiguration
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.WAFv2.LoggingConfiguration.FieldToMatchProperty as Exports
import {-# SOURCE #-} Stratosphere.WAFv2.LoggingConfiguration.LoggingFilterProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LoggingConfiguration
=
LoggingConfiguration {LoggingConfiguration -> ()
haddock_workaround_ :: (),
LoggingConfiguration -> ValueList Text
logDestinationConfigs :: (ValueList Prelude.Text),
LoggingConfiguration -> Maybe LoggingFilterProperty
loggingFilter :: (Prelude.Maybe LoggingFilterProperty),
LoggingConfiguration -> Maybe [FieldToMatchProperty]
redactedFields :: (Prelude.Maybe [FieldToMatchProperty]),
LoggingConfiguration -> Value Text
resourceArn :: (Value Prelude.Text)}
deriving stock (LoggingConfiguration -> LoggingConfiguration -> Bool
(LoggingConfiguration -> LoggingConfiguration -> Bool)
-> (LoggingConfiguration -> LoggingConfiguration -> Bool)
-> Eq LoggingConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LoggingConfiguration -> LoggingConfiguration -> Bool
== :: LoggingConfiguration -> LoggingConfiguration -> Bool
$c/= :: LoggingConfiguration -> LoggingConfiguration -> Bool
/= :: LoggingConfiguration -> LoggingConfiguration -> Bool
Prelude.Eq, Int -> LoggingConfiguration -> ShowS
[LoggingConfiguration] -> ShowS
LoggingConfiguration -> String
(Int -> LoggingConfiguration -> ShowS)
-> (LoggingConfiguration -> String)
-> ([LoggingConfiguration] -> ShowS)
-> Show LoggingConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LoggingConfiguration -> ShowS
showsPrec :: Int -> LoggingConfiguration -> ShowS
$cshow :: LoggingConfiguration -> String
show :: LoggingConfiguration -> String
$cshowList :: [LoggingConfiguration] -> ShowS
showList :: [LoggingConfiguration] -> ShowS
Prelude.Show)
mkLoggingConfiguration ::
ValueList Prelude.Text
-> Value Prelude.Text -> LoggingConfiguration
mkLoggingConfiguration :: ValueList Text -> Value Text -> LoggingConfiguration
mkLoggingConfiguration ValueList Text
logDestinationConfigs Value Text
resourceArn
= LoggingConfiguration
{haddock_workaround_ :: ()
haddock_workaround_ = (),
logDestinationConfigs :: ValueList Text
logDestinationConfigs = ValueList Text
logDestinationConfigs,
resourceArn :: Value Text
resourceArn = Value Text
resourceArn, loggingFilter :: Maybe LoggingFilterProperty
loggingFilter = Maybe LoggingFilterProperty
forall a. Maybe a
Prelude.Nothing,
redactedFields :: Maybe [FieldToMatchProperty]
redactedFields = Maybe [FieldToMatchProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LoggingConfiguration where
toResourceProperties :: LoggingConfiguration -> ResourceProperties
toResourceProperties LoggingConfiguration {Maybe [FieldToMatchProperty]
Maybe LoggingFilterProperty
()
ValueList Text
Value Text
haddock_workaround_ :: LoggingConfiguration -> ()
logDestinationConfigs :: LoggingConfiguration -> ValueList Text
loggingFilter :: LoggingConfiguration -> Maybe LoggingFilterProperty
redactedFields :: LoggingConfiguration -> Maybe [FieldToMatchProperty]
resourceArn :: LoggingConfiguration -> Value Text
haddock_workaround_ :: ()
logDestinationConfigs :: ValueList Text
loggingFilter :: Maybe LoggingFilterProperty
redactedFields :: Maybe [FieldToMatchProperty]
resourceArn :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::WAFv2::LoggingConfiguration",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"LogDestinationConfigs" Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ValueList Text
logDestinationConfigs,
Key
"ResourceArn" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
resourceArn]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> LoggingFilterProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"LoggingFilter" (LoggingFilterProperty -> (Key, Value))
-> Maybe LoggingFilterProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LoggingFilterProperty
loggingFilter,
Key -> [FieldToMatchProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RedactedFields" ([FieldToMatchProperty] -> (Key, Value))
-> Maybe [FieldToMatchProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [FieldToMatchProperty]
redactedFields]))}
instance JSON.ToJSON LoggingConfiguration where
toJSON :: LoggingConfiguration -> Value
toJSON LoggingConfiguration {Maybe [FieldToMatchProperty]
Maybe LoggingFilterProperty
()
ValueList Text
Value Text
haddock_workaround_ :: LoggingConfiguration -> ()
logDestinationConfigs :: LoggingConfiguration -> ValueList Text
loggingFilter :: LoggingConfiguration -> Maybe LoggingFilterProperty
redactedFields :: LoggingConfiguration -> Maybe [FieldToMatchProperty]
resourceArn :: LoggingConfiguration -> Value Text
haddock_workaround_ :: ()
logDestinationConfigs :: ValueList Text
loggingFilter :: Maybe LoggingFilterProperty
redactedFields :: Maybe [FieldToMatchProperty]
resourceArn :: Value Text
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"LogDestinationConfigs" Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ValueList Text
logDestinationConfigs,
Key
"ResourceArn" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
resourceArn]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> LoggingFilterProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"LoggingFilter" (LoggingFilterProperty -> (Key, Value))
-> Maybe LoggingFilterProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LoggingFilterProperty
loggingFilter,
Key -> [FieldToMatchProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RedactedFields" ([FieldToMatchProperty] -> (Key, Value))
-> Maybe [FieldToMatchProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [FieldToMatchProperty]
redactedFields])))
instance Property "LogDestinationConfigs" LoggingConfiguration where
type PropertyType "LogDestinationConfigs" LoggingConfiguration = ValueList Prelude.Text
set :: PropertyType "LogDestinationConfigs" LoggingConfiguration
-> LoggingConfiguration -> LoggingConfiguration
set PropertyType "LogDestinationConfigs" LoggingConfiguration
newValue LoggingConfiguration {Maybe [FieldToMatchProperty]
Maybe LoggingFilterProperty
()
ValueList Text
Value Text
haddock_workaround_ :: LoggingConfiguration -> ()
logDestinationConfigs :: LoggingConfiguration -> ValueList Text
loggingFilter :: LoggingConfiguration -> Maybe LoggingFilterProperty
redactedFields :: LoggingConfiguration -> Maybe [FieldToMatchProperty]
resourceArn :: LoggingConfiguration -> Value Text
haddock_workaround_ :: ()
logDestinationConfigs :: ValueList Text
loggingFilter :: Maybe LoggingFilterProperty
redactedFields :: Maybe [FieldToMatchProperty]
resourceArn :: Value Text
..}
= LoggingConfiguration {logDestinationConfigs :: ValueList Text
logDestinationConfigs = PropertyType "LogDestinationConfigs" LoggingConfiguration
ValueList Text
newValue, Maybe [FieldToMatchProperty]
Maybe LoggingFilterProperty
()
Value Text
haddock_workaround_ :: ()
loggingFilter :: Maybe LoggingFilterProperty
redactedFields :: Maybe [FieldToMatchProperty]
resourceArn :: Value Text
haddock_workaround_ :: ()
loggingFilter :: Maybe LoggingFilterProperty
redactedFields :: Maybe [FieldToMatchProperty]
resourceArn :: Value Text
..}
instance Property "LoggingFilter" LoggingConfiguration where
type PropertyType "LoggingFilter" LoggingConfiguration = LoggingFilterProperty
set :: PropertyType "LoggingFilter" LoggingConfiguration
-> LoggingConfiguration -> LoggingConfiguration
set PropertyType "LoggingFilter" LoggingConfiguration
newValue LoggingConfiguration {Maybe [FieldToMatchProperty]
Maybe LoggingFilterProperty
()
ValueList Text
Value Text
haddock_workaround_ :: LoggingConfiguration -> ()
logDestinationConfigs :: LoggingConfiguration -> ValueList Text
loggingFilter :: LoggingConfiguration -> Maybe LoggingFilterProperty
redactedFields :: LoggingConfiguration -> Maybe [FieldToMatchProperty]
resourceArn :: LoggingConfiguration -> Value Text
haddock_workaround_ :: ()
logDestinationConfigs :: ValueList Text
loggingFilter :: Maybe LoggingFilterProperty
redactedFields :: Maybe [FieldToMatchProperty]
resourceArn :: Value Text
..}
= LoggingConfiguration {loggingFilter :: Maybe LoggingFilterProperty
loggingFilter = LoggingFilterProperty -> Maybe LoggingFilterProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "LoggingFilter" LoggingConfiguration
LoggingFilterProperty
newValue, Maybe [FieldToMatchProperty]
()
ValueList Text
Value Text
haddock_workaround_ :: ()
logDestinationConfigs :: ValueList Text
redactedFields :: Maybe [FieldToMatchProperty]
resourceArn :: Value Text
haddock_workaround_ :: ()
logDestinationConfigs :: ValueList Text
redactedFields :: Maybe [FieldToMatchProperty]
resourceArn :: Value Text
..}
instance Property "RedactedFields" LoggingConfiguration where
type PropertyType "RedactedFields" LoggingConfiguration = [FieldToMatchProperty]
set :: PropertyType "RedactedFields" LoggingConfiguration
-> LoggingConfiguration -> LoggingConfiguration
set PropertyType "RedactedFields" LoggingConfiguration
newValue LoggingConfiguration {Maybe [FieldToMatchProperty]
Maybe LoggingFilterProperty
()
ValueList Text
Value Text
haddock_workaround_ :: LoggingConfiguration -> ()
logDestinationConfigs :: LoggingConfiguration -> ValueList Text
loggingFilter :: LoggingConfiguration -> Maybe LoggingFilterProperty
redactedFields :: LoggingConfiguration -> Maybe [FieldToMatchProperty]
resourceArn :: LoggingConfiguration -> Value Text
haddock_workaround_ :: ()
logDestinationConfigs :: ValueList Text
loggingFilter :: Maybe LoggingFilterProperty
redactedFields :: Maybe [FieldToMatchProperty]
resourceArn :: Value Text
..}
= LoggingConfiguration {redactedFields :: Maybe [FieldToMatchProperty]
redactedFields = [FieldToMatchProperty] -> Maybe [FieldToMatchProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [FieldToMatchProperty]
PropertyType "RedactedFields" LoggingConfiguration
newValue, Maybe LoggingFilterProperty
()
ValueList Text
Value Text
haddock_workaround_ :: ()
logDestinationConfigs :: ValueList Text
loggingFilter :: Maybe LoggingFilterProperty
resourceArn :: Value Text
haddock_workaround_ :: ()
logDestinationConfigs :: ValueList Text
loggingFilter :: Maybe LoggingFilterProperty
resourceArn :: Value Text
..}
instance Property "ResourceArn" LoggingConfiguration where
type PropertyType "ResourceArn" LoggingConfiguration = Value Prelude.Text
set :: PropertyType "ResourceArn" LoggingConfiguration
-> LoggingConfiguration -> LoggingConfiguration
set PropertyType "ResourceArn" LoggingConfiguration
newValue LoggingConfiguration {Maybe [FieldToMatchProperty]
Maybe LoggingFilterProperty
()
ValueList Text
Value Text
haddock_workaround_ :: LoggingConfiguration -> ()
logDestinationConfigs :: LoggingConfiguration -> ValueList Text
loggingFilter :: LoggingConfiguration -> Maybe LoggingFilterProperty
redactedFields :: LoggingConfiguration -> Maybe [FieldToMatchProperty]
resourceArn :: LoggingConfiguration -> Value Text
haddock_workaround_ :: ()
logDestinationConfigs :: ValueList Text
loggingFilter :: Maybe LoggingFilterProperty
redactedFields :: Maybe [FieldToMatchProperty]
resourceArn :: Value Text
..}
= LoggingConfiguration {resourceArn :: Value Text
resourceArn = PropertyType "ResourceArn" LoggingConfiguration
Value Text
newValue, Maybe [FieldToMatchProperty]
Maybe LoggingFilterProperty
()
ValueList Text
haddock_workaround_ :: ()
logDestinationConfigs :: ValueList Text
loggingFilter :: Maybe LoggingFilterProperty
redactedFields :: Maybe [FieldToMatchProperty]
haddock_workaround_ :: ()
logDestinationConfigs :: ValueList Text
loggingFilter :: Maybe LoggingFilterProperty
redactedFields :: Maybe [FieldToMatchProperty]
..}