module Stratosphere.CloudFormation.WaitCondition (
WaitCondition(..), mkWaitCondition
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data WaitCondition
=
WaitCondition {WaitCondition -> ()
haddock_workaround_ :: (),
WaitCondition -> Maybe (Value Integer)
count :: (Prelude.Maybe (Value Prelude.Integer)),
WaitCondition -> Maybe (Value Text)
handle :: (Prelude.Maybe (Value Prelude.Text)),
WaitCondition -> Maybe (Value Text)
timeout :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (WaitCondition -> WaitCondition -> Bool
(WaitCondition -> WaitCondition -> Bool)
-> (WaitCondition -> WaitCondition -> Bool) -> Eq WaitCondition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WaitCondition -> WaitCondition -> Bool
== :: WaitCondition -> WaitCondition -> Bool
$c/= :: WaitCondition -> WaitCondition -> Bool
/= :: WaitCondition -> WaitCondition -> Bool
Prelude.Eq, Int -> WaitCondition -> ShowS
[WaitCondition] -> ShowS
WaitCondition -> String
(Int -> WaitCondition -> ShowS)
-> (WaitCondition -> String)
-> ([WaitCondition] -> ShowS)
-> Show WaitCondition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> WaitCondition -> ShowS
showsPrec :: Int -> WaitCondition -> ShowS
$cshow :: WaitCondition -> String
show :: WaitCondition -> String
$cshowList :: [WaitCondition] -> ShowS
showList :: [WaitCondition] -> ShowS
Prelude.Show)
mkWaitCondition :: WaitCondition
mkWaitCondition :: WaitCondition
mkWaitCondition
= WaitCondition
{haddock_workaround_ :: ()
haddock_workaround_ = (), count :: Maybe (Value Integer)
count = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
handle :: Maybe (Value Text)
handle = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, timeout :: Maybe (Value Text)
timeout = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties WaitCondition where
toResourceProperties :: WaitCondition -> ResourceProperties
toResourceProperties WaitCondition {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: WaitCondition -> ()
count :: WaitCondition -> Maybe (Value Integer)
handle :: WaitCondition -> Maybe (Value Text)
timeout :: WaitCondition -> Maybe (Value Text)
haddock_workaround_ :: ()
count :: Maybe (Value Integer)
handle :: Maybe (Value Text)
timeout :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::CloudFormation::WaitCondition",
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 -> 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
"Count" (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)
count,
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
"Handle" (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)
handle,
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
"Timeout" (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)
timeout])}
instance JSON.ToJSON WaitCondition where
toJSON :: WaitCondition -> Value
toJSON WaitCondition {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: WaitCondition -> ()
count :: WaitCondition -> Maybe (Value Integer)
handle :: WaitCondition -> Maybe (Value Text)
timeout :: WaitCondition -> Maybe (Value Text)
haddock_workaround_ :: ()
count :: Maybe (Value Integer)
handle :: Maybe (Value Text)
timeout :: Maybe (Value Text)
..}
= [(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 -> 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
"Count" (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)
count,
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
"Handle" (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)
handle,
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
"Timeout" (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)
timeout]))
instance Property "Count" WaitCondition where
type PropertyType "Count" WaitCondition = Value Prelude.Integer
set :: PropertyType "Count" WaitCondition
-> WaitCondition -> WaitCondition
set PropertyType "Count" WaitCondition
newValue WaitCondition {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: WaitCondition -> ()
count :: WaitCondition -> Maybe (Value Integer)
handle :: WaitCondition -> Maybe (Value Text)
timeout :: WaitCondition -> Maybe (Value Text)
haddock_workaround_ :: ()
count :: Maybe (Value Integer)
handle :: Maybe (Value Text)
timeout :: Maybe (Value Text)
..}
= WaitCondition {count :: Maybe (Value Integer)
count = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Count" WaitCondition
Value Integer
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
handle :: Maybe (Value Text)
timeout :: Maybe (Value Text)
haddock_workaround_ :: ()
handle :: Maybe (Value Text)
timeout :: Maybe (Value Text)
..}
instance Property "Handle" WaitCondition where
type PropertyType "Handle" WaitCondition = Value Prelude.Text
set :: PropertyType "Handle" WaitCondition
-> WaitCondition -> WaitCondition
set PropertyType "Handle" WaitCondition
newValue WaitCondition {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: WaitCondition -> ()
count :: WaitCondition -> Maybe (Value Integer)
handle :: WaitCondition -> Maybe (Value Text)
timeout :: WaitCondition -> Maybe (Value Text)
haddock_workaround_ :: ()
count :: Maybe (Value Integer)
handle :: Maybe (Value Text)
timeout :: Maybe (Value Text)
..}
= WaitCondition {handle :: Maybe (Value Text)
handle = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Handle" WaitCondition
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
count :: Maybe (Value Integer)
timeout :: Maybe (Value Text)
haddock_workaround_ :: ()
count :: Maybe (Value Integer)
timeout :: Maybe (Value Text)
..}
instance Property "Timeout" WaitCondition where
type PropertyType "Timeout" WaitCondition = Value Prelude.Text
set :: PropertyType "Timeout" WaitCondition
-> WaitCondition -> WaitCondition
set PropertyType "Timeout" WaitCondition
newValue WaitCondition {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: WaitCondition -> ()
count :: WaitCondition -> Maybe (Value Integer)
handle :: WaitCondition -> Maybe (Value Text)
timeout :: WaitCondition -> Maybe (Value Text)
haddock_workaround_ :: ()
count :: Maybe (Value Integer)
handle :: Maybe (Value Text)
timeout :: Maybe (Value Text)
..}
= WaitCondition {timeout :: Maybe (Value Text)
timeout = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Timeout" WaitCondition
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
count :: Maybe (Value Integer)
handle :: Maybe (Value Text)
haddock_workaround_ :: ()
count :: Maybe (Value Integer)
handle :: Maybe (Value Text)
..}