module Stratosphere.AppTest.TestCase.StepProperty (
module Exports, StepProperty(..), mkStepProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.AppTest.TestCase.StepActionProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data StepProperty
=
StepProperty {StepProperty -> ()
haddock_workaround_ :: (),
StepProperty -> StepActionProperty
action :: StepActionProperty,
StepProperty -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
StepProperty -> Value Text
name :: (Value Prelude.Text)}
deriving stock (StepProperty -> StepProperty -> Bool
(StepProperty -> StepProperty -> Bool)
-> (StepProperty -> StepProperty -> Bool) -> Eq StepProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: StepProperty -> StepProperty -> Bool
== :: StepProperty -> StepProperty -> Bool
$c/= :: StepProperty -> StepProperty -> Bool
/= :: StepProperty -> StepProperty -> Bool
Prelude.Eq, Int -> StepProperty -> ShowS
[StepProperty] -> ShowS
StepProperty -> String
(Int -> StepProperty -> ShowS)
-> (StepProperty -> String)
-> ([StepProperty] -> ShowS)
-> Show StepProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> StepProperty -> ShowS
showsPrec :: Int -> StepProperty -> ShowS
$cshow :: StepProperty -> String
show :: StepProperty -> String
$cshowList :: [StepProperty] -> ShowS
showList :: [StepProperty] -> ShowS
Prelude.Show)
mkStepProperty ::
StepActionProperty -> Value Prelude.Text -> StepProperty
mkStepProperty :: StepActionProperty -> Value Text -> StepProperty
mkStepProperty StepActionProperty
action Value Text
name
= StepProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), action :: StepActionProperty
action = StepActionProperty
action, name :: Value Text
name = Value Text
name,
description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties StepProperty where
toResourceProperties :: StepProperty -> ResourceProperties
toResourceProperties StepProperty {Maybe (Value Text)
()
Value Text
StepActionProperty
haddock_workaround_ :: StepProperty -> ()
action :: StepProperty -> StepActionProperty
description :: StepProperty -> Maybe (Value Text)
name :: StepProperty -> Value Text
haddock_workaround_ :: ()
action :: StepActionProperty
description :: Maybe (Value Text)
name :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::AppTest::TestCase.Step",
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
"Action" Key -> StepActionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= StepActionProperty
action, Key
"Name" 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
name]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[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
"Description" (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)
description]))}
instance JSON.ToJSON StepProperty where
toJSON :: StepProperty -> Value
toJSON StepProperty {Maybe (Value Text)
()
Value Text
StepActionProperty
haddock_workaround_ :: StepProperty -> ()
action :: StepProperty -> StepActionProperty
description :: StepProperty -> Maybe (Value Text)
name :: StepProperty -> Value Text
haddock_workaround_ :: ()
action :: StepActionProperty
description :: Maybe (Value Text)
name :: 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
"Action" Key -> StepActionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= StepActionProperty
action, Key
"Name" 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
name]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[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
"Description" (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)
description])))
instance Property "Action" StepProperty where
type PropertyType "Action" StepProperty = StepActionProperty
set :: PropertyType "Action" StepProperty -> StepProperty -> StepProperty
set PropertyType "Action" StepProperty
newValue StepProperty {Maybe (Value Text)
()
Value Text
StepActionProperty
haddock_workaround_ :: StepProperty -> ()
action :: StepProperty -> StepActionProperty
description :: StepProperty -> Maybe (Value Text)
name :: StepProperty -> Value Text
haddock_workaround_ :: ()
action :: StepActionProperty
description :: Maybe (Value Text)
name :: Value Text
..}
= StepProperty {action :: StepActionProperty
action = PropertyType "Action" StepProperty
StepActionProperty
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
..}
instance Property "Description" StepProperty where
type PropertyType "Description" StepProperty = Value Prelude.Text
set :: PropertyType "Description" StepProperty
-> StepProperty -> StepProperty
set PropertyType "Description" StepProperty
newValue StepProperty {Maybe (Value Text)
()
Value Text
StepActionProperty
haddock_workaround_ :: StepProperty -> ()
action :: StepProperty -> StepActionProperty
description :: StepProperty -> Maybe (Value Text)
name :: StepProperty -> Value Text
haddock_workaround_ :: ()
action :: StepActionProperty
description :: Maybe (Value Text)
name :: Value Text
..}
= StepProperty {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" StepProperty
Value Text
newValue, ()
Value Text
StepActionProperty
haddock_workaround_ :: ()
action :: StepActionProperty
name :: Value Text
haddock_workaround_ :: ()
action :: StepActionProperty
name :: Value Text
..}
instance Property "Name" StepProperty where
type PropertyType "Name" StepProperty = Value Prelude.Text
set :: PropertyType "Name" StepProperty -> StepProperty -> StepProperty
set PropertyType "Name" StepProperty
newValue StepProperty {Maybe (Value Text)
()
Value Text
StepActionProperty
haddock_workaround_ :: StepProperty -> ()
action :: StepProperty -> StepActionProperty
description :: StepProperty -> Maybe (Value Text)
name :: StepProperty -> Value Text
haddock_workaround_ :: ()
action :: StepActionProperty
description :: Maybe (Value Text)
name :: Value Text
..} = StepProperty {name :: Value Text
name = PropertyType "Name" StepProperty
Value Text
newValue, Maybe (Value Text)
()
StepActionProperty
haddock_workaround_ :: ()
action :: StepActionProperty
description :: Maybe (Value Text)
haddock_workaround_ :: ()
action :: StepActionProperty
description :: Maybe (Value Text)
..}