module Stratosphere.AppTest.TestCase.MainframeActionProperty (
        module Exports, MainframeActionProperty(..),
        mkMainframeActionProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.AppTest.TestCase.MainframeActionPropertiesProperty as Exports
import {-# SOURCE #-} Stratosphere.AppTest.TestCase.MainframeActionTypeProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data MainframeActionProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apptest-testcase-mainframeaction.html>
    MainframeActionProperty {MainframeActionProperty -> ()
haddock_workaround_ :: (),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apptest-testcase-mainframeaction.html#cfn-apptest-testcase-mainframeaction-actiontype>
                             MainframeActionProperty -> MainframeActionTypeProperty
actionType :: MainframeActionTypeProperty,
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apptest-testcase-mainframeaction.html#cfn-apptest-testcase-mainframeaction-properties>
                             MainframeActionProperty -> Maybe MainframeActionPropertiesProperty
properties :: (Prelude.Maybe MainframeActionPropertiesProperty),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apptest-testcase-mainframeaction.html#cfn-apptest-testcase-mainframeaction-resource>
                             MainframeActionProperty -> Value Text
resource :: (Value Prelude.Text)}
  deriving stock (MainframeActionProperty -> MainframeActionProperty -> Bool
(MainframeActionProperty -> MainframeActionProperty -> Bool)
-> (MainframeActionProperty -> MainframeActionProperty -> Bool)
-> Eq MainframeActionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MainframeActionProperty -> MainframeActionProperty -> Bool
== :: MainframeActionProperty -> MainframeActionProperty -> Bool
$c/= :: MainframeActionProperty -> MainframeActionProperty -> Bool
/= :: MainframeActionProperty -> MainframeActionProperty -> Bool
Prelude.Eq, Int -> MainframeActionProperty -> ShowS
[MainframeActionProperty] -> ShowS
MainframeActionProperty -> String
(Int -> MainframeActionProperty -> ShowS)
-> (MainframeActionProperty -> String)
-> ([MainframeActionProperty] -> ShowS)
-> Show MainframeActionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MainframeActionProperty -> ShowS
showsPrec :: Int -> MainframeActionProperty -> ShowS
$cshow :: MainframeActionProperty -> String
show :: MainframeActionProperty -> String
$cshowList :: [MainframeActionProperty] -> ShowS
showList :: [MainframeActionProperty] -> ShowS
Prelude.Show)
mkMainframeActionProperty ::
  MainframeActionTypeProperty
  -> Value Prelude.Text -> MainframeActionProperty
mkMainframeActionProperty :: MainframeActionTypeProperty
-> Value Text -> MainframeActionProperty
mkMainframeActionProperty MainframeActionTypeProperty
actionType Value Text
resource
  = MainframeActionProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), actionType :: MainframeActionTypeProperty
actionType = MainframeActionTypeProperty
actionType,
       resource :: Value Text
resource = Value Text
resource, properties :: Maybe MainframeActionPropertiesProperty
properties = Maybe MainframeActionPropertiesProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties MainframeActionProperty where
  toResourceProperties :: MainframeActionProperty -> ResourceProperties
toResourceProperties MainframeActionProperty {Maybe MainframeActionPropertiesProperty
()
Value Text
MainframeActionTypeProperty
haddock_workaround_ :: MainframeActionProperty -> ()
actionType :: MainframeActionProperty -> MainframeActionTypeProperty
properties :: MainframeActionProperty -> Maybe MainframeActionPropertiesProperty
resource :: MainframeActionProperty -> Value Text
haddock_workaround_ :: ()
actionType :: MainframeActionTypeProperty
properties :: Maybe MainframeActionPropertiesProperty
resource :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AppTest::TestCase.MainframeAction",
         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
"ActionType" Key -> MainframeActionTypeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= MainframeActionTypeProperty
actionType, Key
"Resource" 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
resource]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> MainframeActionPropertiesProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Properties" (MainframeActionPropertiesProperty -> (Key, Value))
-> Maybe MainframeActionPropertiesProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MainframeActionPropertiesProperty
properties]))}
instance JSON.ToJSON MainframeActionProperty where
  toJSON :: MainframeActionProperty -> Value
toJSON MainframeActionProperty {Maybe MainframeActionPropertiesProperty
()
Value Text
MainframeActionTypeProperty
haddock_workaround_ :: MainframeActionProperty -> ()
actionType :: MainframeActionProperty -> MainframeActionTypeProperty
properties :: MainframeActionProperty -> Maybe MainframeActionPropertiesProperty
resource :: MainframeActionProperty -> Value Text
haddock_workaround_ :: ()
actionType :: MainframeActionTypeProperty
properties :: Maybe MainframeActionPropertiesProperty
resource :: 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
"ActionType" Key -> MainframeActionTypeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= MainframeActionTypeProperty
actionType, Key
"Resource" 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
resource]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> MainframeActionPropertiesProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Properties" (MainframeActionPropertiesProperty -> (Key, Value))
-> Maybe MainframeActionPropertiesProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MainframeActionPropertiesProperty
properties])))
instance Property "ActionType" MainframeActionProperty where
  type PropertyType "ActionType" MainframeActionProperty = MainframeActionTypeProperty
  set :: PropertyType "ActionType" MainframeActionProperty
-> MainframeActionProperty -> MainframeActionProperty
set PropertyType "ActionType" MainframeActionProperty
newValue MainframeActionProperty {Maybe MainframeActionPropertiesProperty
()
Value Text
MainframeActionTypeProperty
haddock_workaround_ :: MainframeActionProperty -> ()
actionType :: MainframeActionProperty -> MainframeActionTypeProperty
properties :: MainframeActionProperty -> Maybe MainframeActionPropertiesProperty
resource :: MainframeActionProperty -> Value Text
haddock_workaround_ :: ()
actionType :: MainframeActionTypeProperty
properties :: Maybe MainframeActionPropertiesProperty
resource :: Value Text
..}
    = MainframeActionProperty {actionType :: MainframeActionTypeProperty
actionType = PropertyType "ActionType" MainframeActionProperty
MainframeActionTypeProperty
newValue, Maybe MainframeActionPropertiesProperty
()
Value Text
haddock_workaround_ :: ()
properties :: Maybe MainframeActionPropertiesProperty
resource :: Value Text
haddock_workaround_ :: ()
properties :: Maybe MainframeActionPropertiesProperty
resource :: Value Text
..}
instance Property "Properties" MainframeActionProperty where
  type PropertyType "Properties" MainframeActionProperty = MainframeActionPropertiesProperty
  set :: PropertyType "Properties" MainframeActionProperty
-> MainframeActionProperty -> MainframeActionProperty
set PropertyType "Properties" MainframeActionProperty
newValue MainframeActionProperty {Maybe MainframeActionPropertiesProperty
()
Value Text
MainframeActionTypeProperty
haddock_workaround_ :: MainframeActionProperty -> ()
actionType :: MainframeActionProperty -> MainframeActionTypeProperty
properties :: MainframeActionProperty -> Maybe MainframeActionPropertiesProperty
resource :: MainframeActionProperty -> Value Text
haddock_workaround_ :: ()
actionType :: MainframeActionTypeProperty
properties :: Maybe MainframeActionPropertiesProperty
resource :: Value Text
..}
    = MainframeActionProperty {properties :: Maybe MainframeActionPropertiesProperty
properties = MainframeActionPropertiesProperty
-> Maybe MainframeActionPropertiesProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Properties" MainframeActionProperty
MainframeActionPropertiesProperty
newValue, ()
Value Text
MainframeActionTypeProperty
haddock_workaround_ :: ()
actionType :: MainframeActionTypeProperty
resource :: Value Text
haddock_workaround_ :: ()
actionType :: MainframeActionTypeProperty
resource :: Value Text
..}
instance Property "Resource" MainframeActionProperty where
  type PropertyType "Resource" MainframeActionProperty = Value Prelude.Text
  set :: PropertyType "Resource" MainframeActionProperty
-> MainframeActionProperty -> MainframeActionProperty
set PropertyType "Resource" MainframeActionProperty
newValue MainframeActionProperty {Maybe MainframeActionPropertiesProperty
()
Value Text
MainframeActionTypeProperty
haddock_workaround_ :: MainframeActionProperty -> ()
actionType :: MainframeActionProperty -> MainframeActionTypeProperty
properties :: MainframeActionProperty -> Maybe MainframeActionPropertiesProperty
resource :: MainframeActionProperty -> Value Text
haddock_workaround_ :: ()
actionType :: MainframeActionTypeProperty
properties :: Maybe MainframeActionPropertiesProperty
resource :: Value Text
..}
    = MainframeActionProperty {resource :: Value Text
resource = PropertyType "Resource" MainframeActionProperty
Value Text
newValue, Maybe MainframeActionPropertiesProperty
()
MainframeActionTypeProperty
haddock_workaround_ :: ()
actionType :: MainframeActionTypeProperty
properties :: Maybe MainframeActionPropertiesProperty
haddock_workaround_ :: ()
actionType :: MainframeActionTypeProperty
properties :: Maybe MainframeActionPropertiesProperty
..}