module Stratosphere.ARCRegionSwitch.Plan.WorkflowProperty (
        module Exports, WorkflowProperty(..), mkWorkflowProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.ARCRegionSwitch.Plan.StepProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data WorkflowProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-workflow.html>
    WorkflowProperty {WorkflowProperty -> ()
haddock_workaround_ :: (),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-workflow.html#cfn-arcregionswitch-plan-workflow-steps>
                      WorkflowProperty -> Maybe [StepProperty]
steps :: (Prelude.Maybe [StepProperty]),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-workflow.html#cfn-arcregionswitch-plan-workflow-workflowdescription>
                      WorkflowProperty -> Maybe (Value Text)
workflowDescription :: (Prelude.Maybe (Value Prelude.Text)),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-workflow.html#cfn-arcregionswitch-plan-workflow-workflowtargetaction>
                      WorkflowProperty -> Value Text
workflowTargetAction :: (Value Prelude.Text),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-workflow.html#cfn-arcregionswitch-plan-workflow-workflowtargetregion>
                      WorkflowProperty -> Maybe (Value Text)
workflowTargetRegion :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (WorkflowProperty -> WorkflowProperty -> Bool
(WorkflowProperty -> WorkflowProperty -> Bool)
-> (WorkflowProperty -> WorkflowProperty -> Bool)
-> Eq WorkflowProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WorkflowProperty -> WorkflowProperty -> Bool
== :: WorkflowProperty -> WorkflowProperty -> Bool
$c/= :: WorkflowProperty -> WorkflowProperty -> Bool
/= :: WorkflowProperty -> WorkflowProperty -> Bool
Prelude.Eq, Int -> WorkflowProperty -> ShowS
[WorkflowProperty] -> ShowS
WorkflowProperty -> String
(Int -> WorkflowProperty -> ShowS)
-> (WorkflowProperty -> String)
-> ([WorkflowProperty] -> ShowS)
-> Show WorkflowProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> WorkflowProperty -> ShowS
showsPrec :: Int -> WorkflowProperty -> ShowS
$cshow :: WorkflowProperty -> String
show :: WorkflowProperty -> String
$cshowList :: [WorkflowProperty] -> ShowS
showList :: [WorkflowProperty] -> ShowS
Prelude.Show)
mkWorkflowProperty :: Value Prelude.Text -> WorkflowProperty
mkWorkflowProperty :: Value Text -> WorkflowProperty
mkWorkflowProperty Value Text
workflowTargetAction
  = WorkflowProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       workflowTargetAction :: Value Text
workflowTargetAction = Value Text
workflowTargetAction,
       steps :: Maybe [StepProperty]
steps = Maybe [StepProperty]
forall a. Maybe a
Prelude.Nothing, workflowDescription :: Maybe (Value Text)
workflowDescription = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       workflowTargetRegion :: Maybe (Value Text)
workflowTargetRegion = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties WorkflowProperty where
  toResourceProperties :: WorkflowProperty -> ResourceProperties
toResourceProperties WorkflowProperty {Maybe [StepProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: WorkflowProperty -> ()
steps :: WorkflowProperty -> Maybe [StepProperty]
workflowDescription :: WorkflowProperty -> Maybe (Value Text)
workflowTargetAction :: WorkflowProperty -> Value Text
workflowTargetRegion :: WorkflowProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
steps :: Maybe [StepProperty]
workflowDescription :: Maybe (Value Text)
workflowTargetAction :: Value Text
workflowTargetRegion :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ARCRegionSwitch::Plan.Workflow",
         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
"WorkflowTargetAction" 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
workflowTargetAction]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> [StepProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Steps" ([StepProperty] -> (Key, Value))
-> Maybe [StepProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [StepProperty]
steps,
                               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
"WorkflowDescription" (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)
workflowDescription,
                               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
"WorkflowTargetRegion"
                                 (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)
workflowTargetRegion]))}
instance JSON.ToJSON WorkflowProperty where
  toJSON :: WorkflowProperty -> Value
toJSON WorkflowProperty {Maybe [StepProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: WorkflowProperty -> ()
steps :: WorkflowProperty -> Maybe [StepProperty]
workflowDescription :: WorkflowProperty -> Maybe (Value Text)
workflowTargetAction :: WorkflowProperty -> Value Text
workflowTargetRegion :: WorkflowProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
steps :: Maybe [StepProperty]
workflowDescription :: Maybe (Value Text)
workflowTargetAction :: Value Text
workflowTargetRegion :: Maybe (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
"WorkflowTargetAction" 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
workflowTargetAction]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> [StepProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Steps" ([StepProperty] -> (Key, Value))
-> Maybe [StepProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [StepProperty]
steps,
                  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
"WorkflowDescription" (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)
workflowDescription,
                  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
"WorkflowTargetRegion"
                    (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)
workflowTargetRegion])))
instance Property "Steps" WorkflowProperty where
  type PropertyType "Steps" WorkflowProperty = [StepProperty]
  set :: PropertyType "Steps" WorkflowProperty
-> WorkflowProperty -> WorkflowProperty
set PropertyType "Steps" WorkflowProperty
newValue WorkflowProperty {Maybe [StepProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: WorkflowProperty -> ()
steps :: WorkflowProperty -> Maybe [StepProperty]
workflowDescription :: WorkflowProperty -> Maybe (Value Text)
workflowTargetAction :: WorkflowProperty -> Value Text
workflowTargetRegion :: WorkflowProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
steps :: Maybe [StepProperty]
workflowDescription :: Maybe (Value Text)
workflowTargetAction :: Value Text
workflowTargetRegion :: Maybe (Value Text)
..}
    = WorkflowProperty {steps :: Maybe [StepProperty]
steps = [StepProperty] -> Maybe [StepProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [StepProperty]
PropertyType "Steps" WorkflowProperty
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
workflowDescription :: Maybe (Value Text)
workflowTargetAction :: Value Text
workflowTargetRegion :: Maybe (Value Text)
haddock_workaround_ :: ()
workflowDescription :: Maybe (Value Text)
workflowTargetAction :: Value Text
workflowTargetRegion :: Maybe (Value Text)
..}
instance Property "WorkflowDescription" WorkflowProperty where
  type PropertyType "WorkflowDescription" WorkflowProperty = Value Prelude.Text
  set :: PropertyType "WorkflowDescription" WorkflowProperty
-> WorkflowProperty -> WorkflowProperty
set PropertyType "WorkflowDescription" WorkflowProperty
newValue WorkflowProperty {Maybe [StepProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: WorkflowProperty -> ()
steps :: WorkflowProperty -> Maybe [StepProperty]
workflowDescription :: WorkflowProperty -> Maybe (Value Text)
workflowTargetAction :: WorkflowProperty -> Value Text
workflowTargetRegion :: WorkflowProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
steps :: Maybe [StepProperty]
workflowDescription :: Maybe (Value Text)
workflowTargetAction :: Value Text
workflowTargetRegion :: Maybe (Value Text)
..}
    = WorkflowProperty
        {workflowDescription :: Maybe (Value Text)
workflowDescription = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "WorkflowDescription" WorkflowProperty
Value Text
newValue, Maybe [StepProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
steps :: Maybe [StepProperty]
workflowTargetAction :: Value Text
workflowTargetRegion :: Maybe (Value Text)
haddock_workaround_ :: ()
steps :: Maybe [StepProperty]
workflowTargetAction :: Value Text
workflowTargetRegion :: Maybe (Value Text)
..}
instance Property "WorkflowTargetAction" WorkflowProperty where
  type PropertyType "WorkflowTargetAction" WorkflowProperty = Value Prelude.Text
  set :: PropertyType "WorkflowTargetAction" WorkflowProperty
-> WorkflowProperty -> WorkflowProperty
set PropertyType "WorkflowTargetAction" WorkflowProperty
newValue WorkflowProperty {Maybe [StepProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: WorkflowProperty -> ()
steps :: WorkflowProperty -> Maybe [StepProperty]
workflowDescription :: WorkflowProperty -> Maybe (Value Text)
workflowTargetAction :: WorkflowProperty -> Value Text
workflowTargetRegion :: WorkflowProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
steps :: Maybe [StepProperty]
workflowDescription :: Maybe (Value Text)
workflowTargetAction :: Value Text
workflowTargetRegion :: Maybe (Value Text)
..}
    = WorkflowProperty {workflowTargetAction :: Value Text
workflowTargetAction = PropertyType "WorkflowTargetAction" WorkflowProperty
Value Text
newValue, Maybe [StepProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
steps :: Maybe [StepProperty]
workflowDescription :: Maybe (Value Text)
workflowTargetRegion :: Maybe (Value Text)
haddock_workaround_ :: ()
steps :: Maybe [StepProperty]
workflowDescription :: Maybe (Value Text)
workflowTargetRegion :: Maybe (Value Text)
..}
instance Property "WorkflowTargetRegion" WorkflowProperty where
  type PropertyType "WorkflowTargetRegion" WorkflowProperty = Value Prelude.Text
  set :: PropertyType "WorkflowTargetRegion" WorkflowProperty
-> WorkflowProperty -> WorkflowProperty
set PropertyType "WorkflowTargetRegion" WorkflowProperty
newValue WorkflowProperty {Maybe [StepProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: WorkflowProperty -> ()
steps :: WorkflowProperty -> Maybe [StepProperty]
workflowDescription :: WorkflowProperty -> Maybe (Value Text)
workflowTargetAction :: WorkflowProperty -> Value Text
workflowTargetRegion :: WorkflowProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
steps :: Maybe [StepProperty]
workflowDescription :: Maybe (Value Text)
workflowTargetAction :: Value Text
workflowTargetRegion :: Maybe (Value Text)
..}
    = WorkflowProperty
        {workflowTargetRegion :: Maybe (Value Text)
workflowTargetRegion = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "WorkflowTargetRegion" WorkflowProperty
Value Text
newValue, Maybe [StepProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
steps :: Maybe [StepProperty]
workflowDescription :: Maybe (Value Text)
workflowTargetAction :: Value Text
haddock_workaround_ :: ()
steps :: Maybe [StepProperty]
workflowDescription :: Maybe (Value Text)
workflowTargetAction :: Value Text
..}