module Stratosphere.StepFunctions.StateMachine.LoggingConfigurationProperty (
        module Exports, LoggingConfigurationProperty(..),
        mkLoggingConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.StepFunctions.StateMachine.LogDestinationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LoggingConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-loggingconfiguration.html>
    LoggingConfigurationProperty {LoggingConfigurationProperty -> ()
haddock_workaround_ :: (),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-loggingconfiguration.html#cfn-stepfunctions-statemachine-loggingconfiguration-destinations>
                                  LoggingConfigurationProperty -> Maybe [LogDestinationProperty]
destinations :: (Prelude.Maybe [LogDestinationProperty]),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-loggingconfiguration.html#cfn-stepfunctions-statemachine-loggingconfiguration-includeexecutiondata>
                                  LoggingConfigurationProperty -> Maybe (Value Bool)
includeExecutionData :: (Prelude.Maybe (Value Prelude.Bool)),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-loggingconfiguration.html#cfn-stepfunctions-statemachine-loggingconfiguration-level>
                                  LoggingConfigurationProperty -> Maybe (Value Text)
level :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (LoggingConfigurationProperty
-> LoggingConfigurationProperty -> Bool
(LoggingConfigurationProperty
 -> LoggingConfigurationProperty -> Bool)
-> (LoggingConfigurationProperty
    -> LoggingConfigurationProperty -> Bool)
-> Eq LoggingConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LoggingConfigurationProperty
-> LoggingConfigurationProperty -> Bool
== :: LoggingConfigurationProperty
-> LoggingConfigurationProperty -> Bool
$c/= :: LoggingConfigurationProperty
-> LoggingConfigurationProperty -> Bool
/= :: LoggingConfigurationProperty
-> LoggingConfigurationProperty -> Bool
Prelude.Eq, Int -> LoggingConfigurationProperty -> ShowS
[LoggingConfigurationProperty] -> ShowS
LoggingConfigurationProperty -> String
(Int -> LoggingConfigurationProperty -> ShowS)
-> (LoggingConfigurationProperty -> String)
-> ([LoggingConfigurationProperty] -> ShowS)
-> Show LoggingConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LoggingConfigurationProperty -> ShowS
showsPrec :: Int -> LoggingConfigurationProperty -> ShowS
$cshow :: LoggingConfigurationProperty -> String
show :: LoggingConfigurationProperty -> String
$cshowList :: [LoggingConfigurationProperty] -> ShowS
showList :: [LoggingConfigurationProperty] -> ShowS
Prelude.Show)
mkLoggingConfigurationProperty :: LoggingConfigurationProperty
mkLoggingConfigurationProperty :: LoggingConfigurationProperty
mkLoggingConfigurationProperty
  = LoggingConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), destinations :: Maybe [LogDestinationProperty]
destinations = Maybe [LogDestinationProperty]
forall a. Maybe a
Prelude.Nothing,
       includeExecutionData :: Maybe (Value Bool)
includeExecutionData = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing, level :: Maybe (Value Text)
level = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LoggingConfigurationProperty where
  toResourceProperties :: LoggingConfigurationProperty -> ResourceProperties
toResourceProperties LoggingConfigurationProperty {Maybe [LogDestinationProperty]
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: LoggingConfigurationProperty -> ()
destinations :: LoggingConfigurationProperty -> Maybe [LogDestinationProperty]
includeExecutionData :: LoggingConfigurationProperty -> Maybe (Value Bool)
level :: LoggingConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
destinations :: Maybe [LogDestinationProperty]
includeExecutionData :: Maybe (Value Bool)
level :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::StepFunctions::StateMachine.LoggingConfiguration",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                           [Key -> [LogDestinationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Destinations" ([LogDestinationProperty] -> (Key, Value))
-> Maybe [LogDestinationProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [LogDestinationProperty]
destinations,
                            Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"IncludeExecutionData" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
includeExecutionData,
                            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..=) Key
"Level" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
level])}
instance JSON.ToJSON LoggingConfigurationProperty where
  toJSON :: LoggingConfigurationProperty -> Value
toJSON LoggingConfigurationProperty {Maybe [LogDestinationProperty]
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: LoggingConfigurationProperty -> ()
destinations :: LoggingConfigurationProperty -> Maybe [LogDestinationProperty]
includeExecutionData :: LoggingConfigurationProperty -> Maybe (Value Bool)
level :: LoggingConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
destinations :: Maybe [LogDestinationProperty]
includeExecutionData :: Maybe (Value Bool)
level :: Maybe (Value Text)
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
              [Key -> [LogDestinationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Destinations" ([LogDestinationProperty] -> (Key, Value))
-> Maybe [LogDestinationProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [LogDestinationProperty]
destinations,
               Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"IncludeExecutionData" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
includeExecutionData,
               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..=) Key
"Level" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
level]))
instance Property "Destinations" LoggingConfigurationProperty where
  type PropertyType "Destinations" LoggingConfigurationProperty = [LogDestinationProperty]
  set :: PropertyType "Destinations" LoggingConfigurationProperty
-> LoggingConfigurationProperty -> LoggingConfigurationProperty
set PropertyType "Destinations" LoggingConfigurationProperty
newValue LoggingConfigurationProperty {Maybe [LogDestinationProperty]
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: LoggingConfigurationProperty -> ()
destinations :: LoggingConfigurationProperty -> Maybe [LogDestinationProperty]
includeExecutionData :: LoggingConfigurationProperty -> Maybe (Value Bool)
level :: LoggingConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
destinations :: Maybe [LogDestinationProperty]
includeExecutionData :: Maybe (Value Bool)
level :: Maybe (Value Text)
..}
    = LoggingConfigurationProperty
        {destinations :: Maybe [LogDestinationProperty]
destinations = [LogDestinationProperty] -> Maybe [LogDestinationProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [LogDestinationProperty]
PropertyType "Destinations" LoggingConfigurationProperty
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
includeExecutionData :: Maybe (Value Bool)
level :: Maybe (Value Text)
haddock_workaround_ :: ()
includeExecutionData :: Maybe (Value Bool)
level :: Maybe (Value Text)
..}
instance Property "IncludeExecutionData" LoggingConfigurationProperty where
  type PropertyType "IncludeExecutionData" LoggingConfigurationProperty = Value Prelude.Bool
  set :: PropertyType "IncludeExecutionData" LoggingConfigurationProperty
-> LoggingConfigurationProperty -> LoggingConfigurationProperty
set PropertyType "IncludeExecutionData" LoggingConfigurationProperty
newValue LoggingConfigurationProperty {Maybe [LogDestinationProperty]
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: LoggingConfigurationProperty -> ()
destinations :: LoggingConfigurationProperty -> Maybe [LogDestinationProperty]
includeExecutionData :: LoggingConfigurationProperty -> Maybe (Value Bool)
level :: LoggingConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
destinations :: Maybe [LogDestinationProperty]
includeExecutionData :: Maybe (Value Bool)
level :: Maybe (Value Text)
..}
    = LoggingConfigurationProperty
        {includeExecutionData :: Maybe (Value Bool)
includeExecutionData = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "IncludeExecutionData" LoggingConfigurationProperty
Value Bool
newValue, Maybe [LogDestinationProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
destinations :: Maybe [LogDestinationProperty]
level :: Maybe (Value Text)
haddock_workaround_ :: ()
destinations :: Maybe [LogDestinationProperty]
level :: Maybe (Value Text)
..}
instance Property "Level" LoggingConfigurationProperty where
  type PropertyType "Level" LoggingConfigurationProperty = Value Prelude.Text
  set :: PropertyType "Level" LoggingConfigurationProperty
-> LoggingConfigurationProperty -> LoggingConfigurationProperty
set PropertyType "Level" LoggingConfigurationProperty
newValue LoggingConfigurationProperty {Maybe [LogDestinationProperty]
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: LoggingConfigurationProperty -> ()
destinations :: LoggingConfigurationProperty -> Maybe [LogDestinationProperty]
includeExecutionData :: LoggingConfigurationProperty -> Maybe (Value Bool)
level :: LoggingConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
destinations :: Maybe [LogDestinationProperty]
includeExecutionData :: Maybe (Value Bool)
level :: Maybe (Value Text)
..}
    = LoggingConfigurationProperty {level :: Maybe (Value Text)
level = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Level" LoggingConfigurationProperty
Value Text
newValue, Maybe [LogDestinationProperty]
Maybe (Value Bool)
()
haddock_workaround_ :: ()
destinations :: Maybe [LogDestinationProperty]
includeExecutionData :: Maybe (Value Bool)
haddock_workaround_ :: ()
destinations :: Maybe [LogDestinationProperty]
includeExecutionData :: Maybe (Value Bool)
..}