module Stratosphere.StepFunctions.Activity (
        module Exports, Activity(..), mkActivity
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.StepFunctions.Activity.EncryptionConfigurationProperty as Exports
import {-# SOURCE #-} Stratosphere.StepFunctions.Activity.TagsEntryProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Activity
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-activity.html>
    Activity {Activity -> ()
haddock_workaround_ :: (),
              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-activity.html#cfn-stepfunctions-activity-encryptionconfiguration>
              Activity -> Maybe EncryptionConfigurationProperty
encryptionConfiguration :: (Prelude.Maybe EncryptionConfigurationProperty),
              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-activity.html#cfn-stepfunctions-activity-name>
              Activity -> Value Text
name :: (Value Prelude.Text),
              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-activity.html#cfn-stepfunctions-activity-tags>
              Activity -> Maybe [TagsEntryProperty]
tags :: (Prelude.Maybe [TagsEntryProperty])}
  deriving stock (Activity -> Activity -> Bool
(Activity -> Activity -> Bool)
-> (Activity -> Activity -> Bool) -> Eq Activity
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Activity -> Activity -> Bool
== :: Activity -> Activity -> Bool
$c/= :: Activity -> Activity -> Bool
/= :: Activity -> Activity -> Bool
Prelude.Eq, Int -> Activity -> ShowS
[Activity] -> ShowS
Activity -> String
(Int -> Activity -> ShowS)
-> (Activity -> String) -> ([Activity] -> ShowS) -> Show Activity
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Activity -> ShowS
showsPrec :: Int -> Activity -> ShowS
$cshow :: Activity -> String
show :: Activity -> String
$cshowList :: [Activity] -> ShowS
showList :: [Activity] -> ShowS
Prelude.Show)
mkActivity :: Value Prelude.Text -> Activity
mkActivity :: Value Text -> Activity
mkActivity Value Text
name
  = Activity
      {haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name,
       encryptionConfiguration :: Maybe EncryptionConfigurationProperty
encryptionConfiguration = Maybe EncryptionConfigurationProperty
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [TagsEntryProperty]
tags = Maybe [TagsEntryProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Activity where
  toResourceProperties :: Activity -> ResourceProperties
toResourceProperties Activity {Maybe [TagsEntryProperty]
Maybe EncryptionConfigurationProperty
()
Value Text
haddock_workaround_ :: Activity -> ()
encryptionConfiguration :: Activity -> Maybe EncryptionConfigurationProperty
name :: Activity -> Value Text
tags :: Activity -> Maybe [TagsEntryProperty]
haddock_workaround_ :: ()
encryptionConfiguration :: Maybe EncryptionConfigurationProperty
name :: Value Text
tags :: Maybe [TagsEntryProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::StepFunctions::Activity",
         supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         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
"Name" 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
name]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> EncryptionConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"EncryptionConfiguration"
                                 (EncryptionConfigurationProperty -> (Key, Value))
-> Maybe EncryptionConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EncryptionConfigurationProperty
encryptionConfiguration,
                               Key -> [TagsEntryProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([TagsEntryProperty] -> (Key, Value))
-> Maybe [TagsEntryProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TagsEntryProperty]
tags]))}
instance JSON.ToJSON Activity where
  toJSON :: Activity -> Value
toJSON Activity {Maybe [TagsEntryProperty]
Maybe EncryptionConfigurationProperty
()
Value Text
haddock_workaround_ :: Activity -> ()
encryptionConfiguration :: Activity -> Maybe EncryptionConfigurationProperty
name :: Activity -> Value Text
tags :: Activity -> Maybe [TagsEntryProperty]
haddock_workaround_ :: ()
encryptionConfiguration :: Maybe EncryptionConfigurationProperty
name :: Value Text
tags :: Maybe [TagsEntryProperty]
..}
    = [(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
"Name" 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
name]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> EncryptionConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"EncryptionConfiguration"
                    (EncryptionConfigurationProperty -> (Key, Value))
-> Maybe EncryptionConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EncryptionConfigurationProperty
encryptionConfiguration,
                  Key -> [TagsEntryProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([TagsEntryProperty] -> (Key, Value))
-> Maybe [TagsEntryProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TagsEntryProperty]
tags])))
instance Property "EncryptionConfiguration" Activity where
  type PropertyType "EncryptionConfiguration" Activity = EncryptionConfigurationProperty
  set :: PropertyType "EncryptionConfiguration" Activity
-> Activity -> Activity
set PropertyType "EncryptionConfiguration" Activity
newValue Activity {Maybe [TagsEntryProperty]
Maybe EncryptionConfigurationProperty
()
Value Text
haddock_workaround_ :: Activity -> ()
encryptionConfiguration :: Activity -> Maybe EncryptionConfigurationProperty
name :: Activity -> Value Text
tags :: Activity -> Maybe [TagsEntryProperty]
haddock_workaround_ :: ()
encryptionConfiguration :: Maybe EncryptionConfigurationProperty
name :: Value Text
tags :: Maybe [TagsEntryProperty]
..}
    = Activity {encryptionConfiguration :: Maybe EncryptionConfigurationProperty
encryptionConfiguration = EncryptionConfigurationProperty
-> Maybe EncryptionConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "EncryptionConfiguration" Activity
EncryptionConfigurationProperty
newValue, Maybe [TagsEntryProperty]
()
Value Text
haddock_workaround_ :: ()
name :: Value Text
tags :: Maybe [TagsEntryProperty]
haddock_workaround_ :: ()
name :: Value Text
tags :: Maybe [TagsEntryProperty]
..}
instance Property "Name" Activity where
  type PropertyType "Name" Activity = Value Prelude.Text
  set :: PropertyType "Name" Activity -> Activity -> Activity
set PropertyType "Name" Activity
newValue Activity {Maybe [TagsEntryProperty]
Maybe EncryptionConfigurationProperty
()
Value Text
haddock_workaround_ :: Activity -> ()
encryptionConfiguration :: Activity -> Maybe EncryptionConfigurationProperty
name :: Activity -> Value Text
tags :: Activity -> Maybe [TagsEntryProperty]
haddock_workaround_ :: ()
encryptionConfiguration :: Maybe EncryptionConfigurationProperty
name :: Value Text
tags :: Maybe [TagsEntryProperty]
..} = Activity {name :: Value Text
name = PropertyType "Name" Activity
Value Text
newValue, Maybe [TagsEntryProperty]
Maybe EncryptionConfigurationProperty
()
haddock_workaround_ :: ()
encryptionConfiguration :: Maybe EncryptionConfigurationProperty
tags :: Maybe [TagsEntryProperty]
haddock_workaround_ :: ()
encryptionConfiguration :: Maybe EncryptionConfigurationProperty
tags :: Maybe [TagsEntryProperty]
..}
instance Property "Tags" Activity where
  type PropertyType "Tags" Activity = [TagsEntryProperty]
  set :: PropertyType "Tags" Activity -> Activity -> Activity
set PropertyType "Tags" Activity
newValue Activity {Maybe [TagsEntryProperty]
Maybe EncryptionConfigurationProperty
()
Value Text
haddock_workaround_ :: Activity -> ()
encryptionConfiguration :: Activity -> Maybe EncryptionConfigurationProperty
name :: Activity -> Value Text
tags :: Activity -> Maybe [TagsEntryProperty]
haddock_workaround_ :: ()
encryptionConfiguration :: Maybe EncryptionConfigurationProperty
name :: Value Text
tags :: Maybe [TagsEntryProperty]
..}
    = Activity {tags :: Maybe [TagsEntryProperty]
tags = [TagsEntryProperty] -> Maybe [TagsEntryProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [TagsEntryProperty]
PropertyType "Tags" Activity
newValue, Maybe EncryptionConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
encryptionConfiguration :: Maybe EncryptionConfigurationProperty
name :: Value Text
haddock_workaround_ :: ()
encryptionConfiguration :: Maybe EncryptionConfigurationProperty
name :: Value Text
..}