module Stratosphere.CloudFormation.Stack (
        Stack(..), mkStack
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data Stack
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stack.html>
    Stack {Stack -> ()
haddock_workaround_ :: (),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stack.html#cfn-cloudformation-stack-notificationarns>
           Stack -> Maybe (ValueList Text)
notificationARNs :: (Prelude.Maybe (ValueList Prelude.Text)),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stack.html#cfn-cloudformation-stack-parameters>
           Stack -> Maybe (Map Text (Value Text))
parameters :: (Prelude.Maybe (Prelude.Map Prelude.Text (Value Prelude.Text))),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stack.html#cfn-cloudformation-stack-tags>
           Stack -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag]),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stack.html#cfn-cloudformation-stack-templateurl>
           Stack -> Value Text
templateURL :: (Value Prelude.Text),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stack.html#cfn-cloudformation-stack-timeoutinminutes>
           Stack -> Maybe (Value Integer)
timeoutInMinutes :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (Stack -> Stack -> Bool
(Stack -> Stack -> Bool) -> (Stack -> Stack -> Bool) -> Eq Stack
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Stack -> Stack -> Bool
== :: Stack -> Stack -> Bool
$c/= :: Stack -> Stack -> Bool
/= :: Stack -> Stack -> Bool
Prelude.Eq, Int -> Stack -> ShowS
[Stack] -> ShowS
Stack -> String
(Int -> Stack -> ShowS)
-> (Stack -> String) -> ([Stack] -> ShowS) -> Show Stack
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Stack -> ShowS
showsPrec :: Int -> Stack -> ShowS
$cshow :: Stack -> String
show :: Stack -> String
$cshowList :: [Stack] -> ShowS
showList :: [Stack] -> ShowS
Prelude.Show)
mkStack :: Value Prelude.Text -> Stack
mkStack :: Value Text -> Stack
mkStack Value Text
templateURL
  = Stack
      {haddock_workaround_ :: ()
haddock_workaround_ = (), templateURL :: Value Text
templateURL = Value Text
templateURL,
       notificationARNs :: Maybe (ValueList Text)
notificationARNs = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing, parameters :: Maybe (Map Text (Value Text))
parameters = Maybe (Map Text (Value Text))
forall a. Maybe a
Prelude.Nothing,
       tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing, timeoutInMinutes :: Maybe (Value Integer)
timeoutInMinutes = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Stack where
  toResourceProperties :: Stack -> ResourceProperties
toResourceProperties Stack {Maybe [Tag]
Maybe (Map Text (Value Text))
Maybe (ValueList Text)
Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: Stack -> ()
notificationARNs :: Stack -> Maybe (ValueList Text)
parameters :: Stack -> Maybe (Map Text (Value Text))
tags :: Stack -> Maybe [Tag]
templateURL :: Stack -> Value Text
timeoutInMinutes :: Stack -> Maybe (Value Integer)
haddock_workaround_ :: ()
notificationARNs :: Maybe (ValueList Text)
parameters :: Maybe (Map Text (Value Text))
tags :: Maybe [Tag]
templateURL :: Value Text
timeoutInMinutes :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CloudFormation::Stack",
         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
"TemplateURL" 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
templateURL]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> ValueList 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
"NotificationARNs" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
notificationARNs,
                               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
"Parameters" (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))
parameters,
                               Key -> [Tag] -> (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" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
                               Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TimeoutInMinutes" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
timeoutInMinutes]))}
instance JSON.ToJSON Stack where
  toJSON :: Stack -> Value
toJSON Stack {Maybe [Tag]
Maybe (Map Text (Value Text))
Maybe (ValueList Text)
Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: Stack -> ()
notificationARNs :: Stack -> Maybe (ValueList Text)
parameters :: Stack -> Maybe (Map Text (Value Text))
tags :: Stack -> Maybe [Tag]
templateURL :: Stack -> Value Text
timeoutInMinutes :: Stack -> Maybe (Value Integer)
haddock_workaround_ :: ()
notificationARNs :: Maybe (ValueList Text)
parameters :: Maybe (Map Text (Value Text))
tags :: Maybe [Tag]
templateURL :: Value Text
timeoutInMinutes :: Maybe (Value Integer)
..}
    = [(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
"TemplateURL" 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
templateURL]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> ValueList 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
"NotificationARNs" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
notificationARNs,
                  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
"Parameters" (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))
parameters,
                  Key -> [Tag] -> (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" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
                  Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TimeoutInMinutes" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
timeoutInMinutes])))
instance Property "NotificationARNs" Stack where
  type PropertyType "NotificationARNs" Stack = ValueList Prelude.Text
  set :: PropertyType "NotificationARNs" Stack -> Stack -> Stack
set PropertyType "NotificationARNs" Stack
newValue Stack {Maybe [Tag]
Maybe (Map Text (Value Text))
Maybe (ValueList Text)
Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: Stack -> ()
notificationARNs :: Stack -> Maybe (ValueList Text)
parameters :: Stack -> Maybe (Map Text (Value Text))
tags :: Stack -> Maybe [Tag]
templateURL :: Stack -> Value Text
timeoutInMinutes :: Stack -> Maybe (Value Integer)
haddock_workaround_ :: ()
notificationARNs :: Maybe (ValueList Text)
parameters :: Maybe (Map Text (Value Text))
tags :: Maybe [Tag]
templateURL :: Value Text
timeoutInMinutes :: Maybe (Value Integer)
..}
    = Stack {notificationARNs :: Maybe (ValueList Text)
notificationARNs = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "NotificationARNs" Stack
ValueList Text
newValue, Maybe [Tag]
Maybe (Map Text (Value Text))
Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: ()
parameters :: Maybe (Map Text (Value Text))
tags :: Maybe [Tag]
templateURL :: Value Text
timeoutInMinutes :: Maybe (Value Integer)
haddock_workaround_ :: ()
parameters :: Maybe (Map Text (Value Text))
tags :: Maybe [Tag]
templateURL :: Value Text
timeoutInMinutes :: Maybe (Value Integer)
..}
instance Property "Parameters" Stack where
  type PropertyType "Parameters" Stack = Prelude.Map Prelude.Text (Value Prelude.Text)
  set :: PropertyType "Parameters" Stack -> Stack -> Stack
set PropertyType "Parameters" Stack
newValue Stack {Maybe [Tag]
Maybe (Map Text (Value Text))
Maybe (ValueList Text)
Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: Stack -> ()
notificationARNs :: Stack -> Maybe (ValueList Text)
parameters :: Stack -> Maybe (Map Text (Value Text))
tags :: Stack -> Maybe [Tag]
templateURL :: Stack -> Value Text
timeoutInMinutes :: Stack -> Maybe (Value Integer)
haddock_workaround_ :: ()
notificationARNs :: Maybe (ValueList Text)
parameters :: Maybe (Map Text (Value Text))
tags :: Maybe [Tag]
templateURL :: Value Text
timeoutInMinutes :: Maybe (Value Integer)
..}
    = Stack {parameters :: Maybe (Map Text (Value Text))
parameters = 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 "Parameters" Stack
newValue, Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: ()
notificationARNs :: Maybe (ValueList Text)
tags :: Maybe [Tag]
templateURL :: Value Text
timeoutInMinutes :: Maybe (Value Integer)
haddock_workaround_ :: ()
notificationARNs :: Maybe (ValueList Text)
tags :: Maybe [Tag]
templateURL :: Value Text
timeoutInMinutes :: Maybe (Value Integer)
..}
instance Property "Tags" Stack where
  type PropertyType "Tags" Stack = [Tag]
  set :: PropertyType "Tags" Stack -> Stack -> Stack
set PropertyType "Tags" Stack
newValue Stack {Maybe [Tag]
Maybe (Map Text (Value Text))
Maybe (ValueList Text)
Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: Stack -> ()
notificationARNs :: Stack -> Maybe (ValueList Text)
parameters :: Stack -> Maybe (Map Text (Value Text))
tags :: Stack -> Maybe [Tag]
templateURL :: Stack -> Value Text
timeoutInMinutes :: Stack -> Maybe (Value Integer)
haddock_workaround_ :: ()
notificationARNs :: Maybe (ValueList Text)
parameters :: Maybe (Map Text (Value Text))
tags :: Maybe [Tag]
templateURL :: Value Text
timeoutInMinutes :: Maybe (Value Integer)
..} = Stack {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" Stack
newValue, Maybe (Map Text (Value Text))
Maybe (ValueList Text)
Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: ()
notificationARNs :: Maybe (ValueList Text)
parameters :: Maybe (Map Text (Value Text))
templateURL :: Value Text
timeoutInMinutes :: Maybe (Value Integer)
haddock_workaround_ :: ()
notificationARNs :: Maybe (ValueList Text)
parameters :: Maybe (Map Text (Value Text))
templateURL :: Value Text
timeoutInMinutes :: Maybe (Value Integer)
..}
instance Property "TemplateURL" Stack where
  type PropertyType "TemplateURL" Stack = Value Prelude.Text
  set :: PropertyType "TemplateURL" Stack -> Stack -> Stack
set PropertyType "TemplateURL" Stack
newValue Stack {Maybe [Tag]
Maybe (Map Text (Value Text))
Maybe (ValueList Text)
Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: Stack -> ()
notificationARNs :: Stack -> Maybe (ValueList Text)
parameters :: Stack -> Maybe (Map Text (Value Text))
tags :: Stack -> Maybe [Tag]
templateURL :: Stack -> Value Text
timeoutInMinutes :: Stack -> Maybe (Value Integer)
haddock_workaround_ :: ()
notificationARNs :: Maybe (ValueList Text)
parameters :: Maybe (Map Text (Value Text))
tags :: Maybe [Tag]
templateURL :: Value Text
timeoutInMinutes :: Maybe (Value Integer)
..} = Stack {templateURL :: Value Text
templateURL = PropertyType "TemplateURL" Stack
Value Text
newValue, Maybe [Tag]
Maybe (Map Text (Value Text))
Maybe (ValueList Text)
Maybe (Value Integer)
()
haddock_workaround_ :: ()
notificationARNs :: Maybe (ValueList Text)
parameters :: Maybe (Map Text (Value Text))
tags :: Maybe [Tag]
timeoutInMinutes :: Maybe (Value Integer)
haddock_workaround_ :: ()
notificationARNs :: Maybe (ValueList Text)
parameters :: Maybe (Map Text (Value Text))
tags :: Maybe [Tag]
timeoutInMinutes :: Maybe (Value Integer)
..}
instance Property "TimeoutInMinutes" Stack where
  type PropertyType "TimeoutInMinutes" Stack = Value Prelude.Integer
  set :: PropertyType "TimeoutInMinutes" Stack -> Stack -> Stack
set PropertyType "TimeoutInMinutes" Stack
newValue Stack {Maybe [Tag]
Maybe (Map Text (Value Text))
Maybe (ValueList Text)
Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: Stack -> ()
notificationARNs :: Stack -> Maybe (ValueList Text)
parameters :: Stack -> Maybe (Map Text (Value Text))
tags :: Stack -> Maybe [Tag]
templateURL :: Stack -> Value Text
timeoutInMinutes :: Stack -> Maybe (Value Integer)
haddock_workaround_ :: ()
notificationARNs :: Maybe (ValueList Text)
parameters :: Maybe (Map Text (Value Text))
tags :: Maybe [Tag]
templateURL :: Value Text
timeoutInMinutes :: Maybe (Value Integer)
..}
    = Stack {timeoutInMinutes :: Maybe (Value Integer)
timeoutInMinutes = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TimeoutInMinutes" Stack
Value Integer
newValue, Maybe [Tag]
Maybe (Map Text (Value Text))
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ()
notificationARNs :: Maybe (ValueList Text)
parameters :: Maybe (Map Text (Value Text))
tags :: Maybe [Tag]
templateURL :: Value Text
haddock_workaround_ :: ()
notificationARNs :: Maybe (ValueList Text)
parameters :: Maybe (Map Text (Value Text))
tags :: Maybe [Tag]
templateURL :: Value Text
..}