module Stratosphere.SSMQuickSetup.LifecycleAutomation (
        LifecycleAutomation(..), mkLifecycleAutomation
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LifecycleAutomation
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssmquicksetup-lifecycleautomation.html>
    LifecycleAutomation {LifecycleAutomation -> ()
haddock_workaround_ :: (),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssmquicksetup-lifecycleautomation.html#cfn-ssmquicksetup-lifecycleautomation-automationdocument>
                         LifecycleAutomation -> Value Text
automationDocument :: (Value Prelude.Text),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssmquicksetup-lifecycleautomation.html#cfn-ssmquicksetup-lifecycleautomation-automationparameters>
                         LifecycleAutomation -> Object
automationParameters :: JSON.Object,
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssmquicksetup-lifecycleautomation.html#cfn-ssmquicksetup-lifecycleautomation-resourcekey>
                         LifecycleAutomation -> Value Text
resourceKey :: (Value Prelude.Text),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssmquicksetup-lifecycleautomation.html#cfn-ssmquicksetup-lifecycleautomation-tags>
                         LifecycleAutomation -> Maybe (Map Text (Value Text))
tags :: (Prelude.Maybe (Prelude.Map Prelude.Text (Value Prelude.Text)))}
  deriving stock (LifecycleAutomation -> LifecycleAutomation -> Bool
(LifecycleAutomation -> LifecycleAutomation -> Bool)
-> (LifecycleAutomation -> LifecycleAutomation -> Bool)
-> Eq LifecycleAutomation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LifecycleAutomation -> LifecycleAutomation -> Bool
== :: LifecycleAutomation -> LifecycleAutomation -> Bool
$c/= :: LifecycleAutomation -> LifecycleAutomation -> Bool
/= :: LifecycleAutomation -> LifecycleAutomation -> Bool
Prelude.Eq, Int -> LifecycleAutomation -> ShowS
[LifecycleAutomation] -> ShowS
LifecycleAutomation -> String
(Int -> LifecycleAutomation -> ShowS)
-> (LifecycleAutomation -> String)
-> ([LifecycleAutomation] -> ShowS)
-> Show LifecycleAutomation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LifecycleAutomation -> ShowS
showsPrec :: Int -> LifecycleAutomation -> ShowS
$cshow :: LifecycleAutomation -> String
show :: LifecycleAutomation -> String
$cshowList :: [LifecycleAutomation] -> ShowS
showList :: [LifecycleAutomation] -> ShowS
Prelude.Show)
mkLifecycleAutomation ::
  Value Prelude.Text
  -> JSON.Object -> Value Prelude.Text -> LifecycleAutomation
mkLifecycleAutomation :: Value Text -> Object -> Value Text -> LifecycleAutomation
mkLifecycleAutomation
  Value Text
automationDocument
  Object
automationParameters
  Value Text
resourceKey
  = LifecycleAutomation
      {haddock_workaround_ :: ()
haddock_workaround_ = (), automationDocument :: Value Text
automationDocument = Value Text
automationDocument,
       automationParameters :: Object
automationParameters = Object
automationParameters,
       resourceKey :: Value Text
resourceKey = Value Text
resourceKey, tags :: Maybe (Map Text (Value Text))
tags = Maybe (Map Text (Value Text))
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LifecycleAutomation where
  toResourceProperties :: LifecycleAutomation -> ResourceProperties
toResourceProperties LifecycleAutomation {Maybe (Map Text (Value Text))
()
Object
Value Text
haddock_workaround_ :: LifecycleAutomation -> ()
automationDocument :: LifecycleAutomation -> Value Text
automationParameters :: LifecycleAutomation -> Object
resourceKey :: LifecycleAutomation -> Value Text
tags :: LifecycleAutomation -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
automationDocument :: Value Text
automationParameters :: Object
resourceKey :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SSMQuickSetup::LifecycleAutomation",
         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
"AutomationDocument" 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
automationDocument,
                            Key
"AutomationParameters" Key -> Object -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Object
automationParameters,
                            Key
"ResourceKey" 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
resourceKey]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> Map Text (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
"Tags" (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
tags]))}
instance JSON.ToJSON LifecycleAutomation where
  toJSON :: LifecycleAutomation -> Value
toJSON LifecycleAutomation {Maybe (Map Text (Value Text))
()
Object
Value Text
haddock_workaround_ :: LifecycleAutomation -> ()
automationDocument :: LifecycleAutomation -> Value Text
automationParameters :: LifecycleAutomation -> Object
resourceKey :: LifecycleAutomation -> Value Text
tags :: LifecycleAutomation -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
automationDocument :: Value Text
automationParameters :: Object
resourceKey :: Value Text
tags :: Maybe (Map Text (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
"AutomationDocument" 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
automationDocument,
               Key
"AutomationParameters" Key -> Object -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Object
automationParameters,
               Key
"ResourceKey" 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
resourceKey]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> Map Text (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
"Tags" (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
tags])))
instance Property "AutomationDocument" LifecycleAutomation where
  type PropertyType "AutomationDocument" LifecycleAutomation = Value Prelude.Text
  set :: PropertyType "AutomationDocument" LifecycleAutomation
-> LifecycleAutomation -> LifecycleAutomation
set PropertyType "AutomationDocument" LifecycleAutomation
newValue LifecycleAutomation {Maybe (Map Text (Value Text))
()
Object
Value Text
haddock_workaround_ :: LifecycleAutomation -> ()
automationDocument :: LifecycleAutomation -> Value Text
automationParameters :: LifecycleAutomation -> Object
resourceKey :: LifecycleAutomation -> Value Text
tags :: LifecycleAutomation -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
automationDocument :: Value Text
automationParameters :: Object
resourceKey :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
    = LifecycleAutomation {automationDocument :: Value Text
automationDocument = PropertyType "AutomationDocument" LifecycleAutomation
Value Text
newValue, Maybe (Map Text (Value Text))
()
Object
Value Text
haddock_workaround_ :: ()
automationParameters :: Object
resourceKey :: Value Text
tags :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
automationParameters :: Object
resourceKey :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
instance Property "AutomationParameters" LifecycleAutomation where
  type PropertyType "AutomationParameters" LifecycleAutomation = JSON.Object
  set :: PropertyType "AutomationParameters" LifecycleAutomation
-> LifecycleAutomation -> LifecycleAutomation
set PropertyType "AutomationParameters" LifecycleAutomation
newValue LifecycleAutomation {Maybe (Map Text (Value Text))
()
Object
Value Text
haddock_workaround_ :: LifecycleAutomation -> ()
automationDocument :: LifecycleAutomation -> Value Text
automationParameters :: LifecycleAutomation -> Object
resourceKey :: LifecycleAutomation -> Value Text
tags :: LifecycleAutomation -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
automationDocument :: Value Text
automationParameters :: Object
resourceKey :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
    = LifecycleAutomation {automationParameters :: Object
automationParameters = Object
PropertyType "AutomationParameters" LifecycleAutomation
newValue, Maybe (Map Text (Value Text))
()
Value Text
haddock_workaround_ :: ()
automationDocument :: Value Text
resourceKey :: Value Text
tags :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
automationDocument :: Value Text
resourceKey :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
instance Property "ResourceKey" LifecycleAutomation where
  type PropertyType "ResourceKey" LifecycleAutomation = Value Prelude.Text
  set :: PropertyType "ResourceKey" LifecycleAutomation
-> LifecycleAutomation -> LifecycleAutomation
set PropertyType "ResourceKey" LifecycleAutomation
newValue LifecycleAutomation {Maybe (Map Text (Value Text))
()
Object
Value Text
haddock_workaround_ :: LifecycleAutomation -> ()
automationDocument :: LifecycleAutomation -> Value Text
automationParameters :: LifecycleAutomation -> Object
resourceKey :: LifecycleAutomation -> Value Text
tags :: LifecycleAutomation -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
automationDocument :: Value Text
automationParameters :: Object
resourceKey :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
    = LifecycleAutomation {resourceKey :: Value Text
resourceKey = PropertyType "ResourceKey" LifecycleAutomation
Value Text
newValue, Maybe (Map Text (Value Text))
()
Object
Value Text
haddock_workaround_ :: ()
automationDocument :: Value Text
automationParameters :: Object
tags :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
automationDocument :: Value Text
automationParameters :: Object
tags :: Maybe (Map Text (Value Text))
..}
instance Property "Tags" LifecycleAutomation where
  type PropertyType "Tags" LifecycleAutomation = Prelude.Map Prelude.Text (Value Prelude.Text)
  set :: PropertyType "Tags" LifecycleAutomation
-> LifecycleAutomation -> LifecycleAutomation
set PropertyType "Tags" LifecycleAutomation
newValue LifecycleAutomation {Maybe (Map Text (Value Text))
()
Object
Value Text
haddock_workaround_ :: LifecycleAutomation -> ()
automationDocument :: LifecycleAutomation -> Value Text
automationParameters :: LifecycleAutomation -> Object
resourceKey :: LifecycleAutomation -> Value Text
tags :: LifecycleAutomation -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
automationDocument :: Value Text
automationParameters :: Object
resourceKey :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
    = LifecycleAutomation {tags :: Maybe (Map Text (Value Text))
tags = Map Text (Value Text) -> Maybe (Map Text (Value Text))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Map Text (Value Text)
PropertyType "Tags" LifecycleAutomation
newValue, ()
Object
Value Text
haddock_workaround_ :: ()
automationDocument :: Value Text
automationParameters :: Object
resourceKey :: Value Text
haddock_workaround_ :: ()
automationDocument :: Value Text
automationParameters :: Object
resourceKey :: Value Text
..}