module Stratosphere.SSMIncidents.ResponsePlan.ActionProperty (
        module Exports, ActionProperty(..), mkActionProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.SSMIncidents.ResponsePlan.SsmAutomationProperty as Exports
import Stratosphere.ResourceProperties
data ActionProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssmincidents-responseplan-action.html>
    ActionProperty {ActionProperty -> ()
haddock_workaround_ :: (),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssmincidents-responseplan-action.html#cfn-ssmincidents-responseplan-action-ssmautomation>
                    ActionProperty -> Maybe SsmAutomationProperty
ssmAutomation :: (Prelude.Maybe SsmAutomationProperty)}
  deriving stock (ActionProperty -> ActionProperty -> Bool
(ActionProperty -> ActionProperty -> Bool)
-> (ActionProperty -> ActionProperty -> Bool) -> Eq ActionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ActionProperty -> ActionProperty -> Bool
== :: ActionProperty -> ActionProperty -> Bool
$c/= :: ActionProperty -> ActionProperty -> Bool
/= :: ActionProperty -> ActionProperty -> Bool
Prelude.Eq, Int -> ActionProperty -> ShowS
[ActionProperty] -> ShowS
ActionProperty -> String
(Int -> ActionProperty -> ShowS)
-> (ActionProperty -> String)
-> ([ActionProperty] -> ShowS)
-> Show ActionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ActionProperty -> ShowS
showsPrec :: Int -> ActionProperty -> ShowS
$cshow :: ActionProperty -> String
show :: ActionProperty -> String
$cshowList :: [ActionProperty] -> ShowS
showList :: [ActionProperty] -> ShowS
Prelude.Show)
mkActionProperty :: ActionProperty
mkActionProperty :: ActionProperty
mkActionProperty
  = ActionProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), ssmAutomation :: Maybe SsmAutomationProperty
ssmAutomation = Maybe SsmAutomationProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ActionProperty where
  toResourceProperties :: ActionProperty -> ResourceProperties
toResourceProperties ActionProperty {Maybe SsmAutomationProperty
()
haddock_workaround_ :: ActionProperty -> ()
ssmAutomation :: ActionProperty -> Maybe SsmAutomationProperty
haddock_workaround_ :: ()
ssmAutomation :: Maybe SsmAutomationProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SSMIncidents::ResponsePlan.Action",
         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 -> SsmAutomationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SsmAutomation" (SsmAutomationProperty -> (Key, Value))
-> Maybe SsmAutomationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SsmAutomationProperty
ssmAutomation])}
instance JSON.ToJSON ActionProperty where
  toJSON :: ActionProperty -> Value
toJSON ActionProperty {Maybe SsmAutomationProperty
()
haddock_workaround_ :: ActionProperty -> ()
ssmAutomation :: ActionProperty -> Maybe SsmAutomationProperty
haddock_workaround_ :: ()
ssmAutomation :: Maybe SsmAutomationProperty
..}
    = [(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 -> SsmAutomationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SsmAutomation" (SsmAutomationProperty -> (Key, Value))
-> Maybe SsmAutomationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SsmAutomationProperty
ssmAutomation]))
instance Property "SsmAutomation" ActionProperty where
  type PropertyType "SsmAutomation" ActionProperty = SsmAutomationProperty
  set :: PropertyType "SsmAutomation" ActionProperty
-> ActionProperty -> ActionProperty
set PropertyType "SsmAutomation" ActionProperty
newValue ActionProperty {Maybe SsmAutomationProperty
()
haddock_workaround_ :: ActionProperty -> ()
ssmAutomation :: ActionProperty -> Maybe SsmAutomationProperty
haddock_workaround_ :: ()
ssmAutomation :: Maybe SsmAutomationProperty
..}
    = ActionProperty {ssmAutomation :: Maybe SsmAutomationProperty
ssmAutomation = SsmAutomationProperty -> Maybe SsmAutomationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SsmAutomation" ActionProperty
SsmAutomationProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}