module Stratosphere.SimSpaceWeaver.Simulation (
        module Exports, Simulation(..), mkSimulation
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.SimSpaceWeaver.Simulation.S3LocationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Simulation
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-simspaceweaver-simulation.html>
    Simulation {Simulation -> ()
haddock_workaround_ :: (),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-simspaceweaver-simulation.html#cfn-simspaceweaver-simulation-maximumduration>
                Simulation -> Maybe (Value Text)
maximumDuration :: (Prelude.Maybe (Value Prelude.Text)),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-simspaceweaver-simulation.html#cfn-simspaceweaver-simulation-name>
                Simulation -> Value Text
name :: (Value Prelude.Text),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-simspaceweaver-simulation.html#cfn-simspaceweaver-simulation-rolearn>
                Simulation -> Value Text
roleArn :: (Value Prelude.Text),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-simspaceweaver-simulation.html#cfn-simspaceweaver-simulation-schemas3location>
                Simulation -> Maybe S3LocationProperty
schemaS3Location :: (Prelude.Maybe S3LocationProperty),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-simspaceweaver-simulation.html#cfn-simspaceweaver-simulation-snapshots3location>
                Simulation -> Maybe S3LocationProperty
snapshotS3Location :: (Prelude.Maybe S3LocationProperty)}
  deriving stock (Simulation -> Simulation -> Bool
(Simulation -> Simulation -> Bool)
-> (Simulation -> Simulation -> Bool) -> Eq Simulation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Simulation -> Simulation -> Bool
== :: Simulation -> Simulation -> Bool
$c/= :: Simulation -> Simulation -> Bool
/= :: Simulation -> Simulation -> Bool
Prelude.Eq, Int -> Simulation -> ShowS
[Simulation] -> ShowS
Simulation -> String
(Int -> Simulation -> ShowS)
-> (Simulation -> String)
-> ([Simulation] -> ShowS)
-> Show Simulation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Simulation -> ShowS
showsPrec :: Int -> Simulation -> ShowS
$cshow :: Simulation -> String
show :: Simulation -> String
$cshowList :: [Simulation] -> ShowS
showList :: [Simulation] -> ShowS
Prelude.Show)
mkSimulation ::
  Value Prelude.Text -> Value Prelude.Text -> Simulation
mkSimulation :: Value Text -> Value Text -> Simulation
mkSimulation Value Text
name Value Text
roleArn
  = Simulation
      {haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name, roleArn :: Value Text
roleArn = Value Text
roleArn,
       maximumDuration :: Maybe (Value Text)
maximumDuration = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       schemaS3Location :: Maybe S3LocationProperty
schemaS3Location = Maybe S3LocationProperty
forall a. Maybe a
Prelude.Nothing,
       snapshotS3Location :: Maybe S3LocationProperty
snapshotS3Location = Maybe S3LocationProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Simulation where
  toResourceProperties :: Simulation -> ResourceProperties
toResourceProperties Simulation {Maybe (Value Text)
Maybe S3LocationProperty
()
Value Text
haddock_workaround_ :: Simulation -> ()
maximumDuration :: Simulation -> Maybe (Value Text)
name :: Simulation -> Value Text
roleArn :: Simulation -> Value Text
schemaS3Location :: Simulation -> Maybe S3LocationProperty
snapshotS3Location :: Simulation -> Maybe S3LocationProperty
haddock_workaround_ :: ()
maximumDuration :: Maybe (Value Text)
name :: Value Text
roleArn :: Value Text
schemaS3Location :: Maybe S3LocationProperty
snapshotS3Location :: Maybe S3LocationProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SimSpaceWeaver::Simulation",
         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
"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, Key
"RoleArn" 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
roleArn]
                           ([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
"MaximumDuration" (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)
maximumDuration,
                               Key -> S3LocationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SchemaS3Location" (S3LocationProperty -> (Key, Value))
-> Maybe S3LocationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3LocationProperty
schemaS3Location,
                               Key -> S3LocationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SnapshotS3Location" (S3LocationProperty -> (Key, Value))
-> Maybe S3LocationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3LocationProperty
snapshotS3Location]))}
instance JSON.ToJSON Simulation where
  toJSON :: Simulation -> Value
toJSON Simulation {Maybe (Value Text)
Maybe S3LocationProperty
()
Value Text
haddock_workaround_ :: Simulation -> ()
maximumDuration :: Simulation -> Maybe (Value Text)
name :: Simulation -> Value Text
roleArn :: Simulation -> Value Text
schemaS3Location :: Simulation -> Maybe S3LocationProperty
snapshotS3Location :: Simulation -> Maybe S3LocationProperty
haddock_workaround_ :: ()
maximumDuration :: Maybe (Value Text)
name :: Value Text
roleArn :: Value Text
schemaS3Location :: Maybe S3LocationProperty
snapshotS3Location :: Maybe S3LocationProperty
..}
    = [(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
"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, Key
"RoleArn" 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
roleArn]
              ([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
"MaximumDuration" (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)
maximumDuration,
                  Key -> S3LocationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SchemaS3Location" (S3LocationProperty -> (Key, Value))
-> Maybe S3LocationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3LocationProperty
schemaS3Location,
                  Key -> S3LocationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SnapshotS3Location" (S3LocationProperty -> (Key, Value))
-> Maybe S3LocationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3LocationProperty
snapshotS3Location])))
instance Property "MaximumDuration" Simulation where
  type PropertyType "MaximumDuration" Simulation = Value Prelude.Text
  set :: PropertyType "MaximumDuration" Simulation
-> Simulation -> Simulation
set PropertyType "MaximumDuration" Simulation
newValue Simulation {Maybe (Value Text)
Maybe S3LocationProperty
()
Value Text
haddock_workaround_ :: Simulation -> ()
maximumDuration :: Simulation -> Maybe (Value Text)
name :: Simulation -> Value Text
roleArn :: Simulation -> Value Text
schemaS3Location :: Simulation -> Maybe S3LocationProperty
snapshotS3Location :: Simulation -> Maybe S3LocationProperty
haddock_workaround_ :: ()
maximumDuration :: Maybe (Value Text)
name :: Value Text
roleArn :: Value Text
schemaS3Location :: Maybe S3LocationProperty
snapshotS3Location :: Maybe S3LocationProperty
..}
    = Simulation {maximumDuration :: Maybe (Value Text)
maximumDuration = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MaximumDuration" Simulation
Value Text
newValue, Maybe S3LocationProperty
()
Value Text
haddock_workaround_ :: ()
name :: Value Text
roleArn :: Value Text
schemaS3Location :: Maybe S3LocationProperty
snapshotS3Location :: Maybe S3LocationProperty
haddock_workaround_ :: ()
name :: Value Text
roleArn :: Value Text
schemaS3Location :: Maybe S3LocationProperty
snapshotS3Location :: Maybe S3LocationProperty
..}
instance Property "Name" Simulation where
  type PropertyType "Name" Simulation = Value Prelude.Text
  set :: PropertyType "Name" Simulation -> Simulation -> Simulation
set PropertyType "Name" Simulation
newValue Simulation {Maybe (Value Text)
Maybe S3LocationProperty
()
Value Text
haddock_workaround_ :: Simulation -> ()
maximumDuration :: Simulation -> Maybe (Value Text)
name :: Simulation -> Value Text
roleArn :: Simulation -> Value Text
schemaS3Location :: Simulation -> Maybe S3LocationProperty
snapshotS3Location :: Simulation -> Maybe S3LocationProperty
haddock_workaround_ :: ()
maximumDuration :: Maybe (Value Text)
name :: Value Text
roleArn :: Value Text
schemaS3Location :: Maybe S3LocationProperty
snapshotS3Location :: Maybe S3LocationProperty
..} = Simulation {name :: Value Text
name = PropertyType "Name" Simulation
Value Text
newValue, Maybe (Value Text)
Maybe S3LocationProperty
()
Value Text
haddock_workaround_ :: ()
maximumDuration :: Maybe (Value Text)
roleArn :: Value Text
schemaS3Location :: Maybe S3LocationProperty
snapshotS3Location :: Maybe S3LocationProperty
haddock_workaround_ :: ()
maximumDuration :: Maybe (Value Text)
roleArn :: Value Text
schemaS3Location :: Maybe S3LocationProperty
snapshotS3Location :: Maybe S3LocationProperty
..}
instance Property "RoleArn" Simulation where
  type PropertyType "RoleArn" Simulation = Value Prelude.Text
  set :: PropertyType "RoleArn" Simulation -> Simulation -> Simulation
set PropertyType "RoleArn" Simulation
newValue Simulation {Maybe (Value Text)
Maybe S3LocationProperty
()
Value Text
haddock_workaround_ :: Simulation -> ()
maximumDuration :: Simulation -> Maybe (Value Text)
name :: Simulation -> Value Text
roleArn :: Simulation -> Value Text
schemaS3Location :: Simulation -> Maybe S3LocationProperty
snapshotS3Location :: Simulation -> Maybe S3LocationProperty
haddock_workaround_ :: ()
maximumDuration :: Maybe (Value Text)
name :: Value Text
roleArn :: Value Text
schemaS3Location :: Maybe S3LocationProperty
snapshotS3Location :: Maybe S3LocationProperty
..} = Simulation {roleArn :: Value Text
roleArn = PropertyType "RoleArn" Simulation
Value Text
newValue, Maybe (Value Text)
Maybe S3LocationProperty
()
Value Text
haddock_workaround_ :: ()
maximumDuration :: Maybe (Value Text)
name :: Value Text
schemaS3Location :: Maybe S3LocationProperty
snapshotS3Location :: Maybe S3LocationProperty
haddock_workaround_ :: ()
maximumDuration :: Maybe (Value Text)
name :: Value Text
schemaS3Location :: Maybe S3LocationProperty
snapshotS3Location :: Maybe S3LocationProperty
..}
instance Property "SchemaS3Location" Simulation where
  type PropertyType "SchemaS3Location" Simulation = S3LocationProperty
  set :: PropertyType "SchemaS3Location" Simulation
-> Simulation -> Simulation
set PropertyType "SchemaS3Location" Simulation
newValue Simulation {Maybe (Value Text)
Maybe S3LocationProperty
()
Value Text
haddock_workaround_ :: Simulation -> ()
maximumDuration :: Simulation -> Maybe (Value Text)
name :: Simulation -> Value Text
roleArn :: Simulation -> Value Text
schemaS3Location :: Simulation -> Maybe S3LocationProperty
snapshotS3Location :: Simulation -> Maybe S3LocationProperty
haddock_workaround_ :: ()
maximumDuration :: Maybe (Value Text)
name :: Value Text
roleArn :: Value Text
schemaS3Location :: Maybe S3LocationProperty
snapshotS3Location :: Maybe S3LocationProperty
..}
    = Simulation {schemaS3Location :: Maybe S3LocationProperty
schemaS3Location = S3LocationProperty -> Maybe S3LocationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SchemaS3Location" Simulation
S3LocationProperty
newValue, Maybe (Value Text)
Maybe S3LocationProperty
()
Value Text
haddock_workaround_ :: ()
maximumDuration :: Maybe (Value Text)
name :: Value Text
roleArn :: Value Text
snapshotS3Location :: Maybe S3LocationProperty
haddock_workaround_ :: ()
maximumDuration :: Maybe (Value Text)
name :: Value Text
roleArn :: Value Text
snapshotS3Location :: Maybe S3LocationProperty
..}
instance Property "SnapshotS3Location" Simulation where
  type PropertyType "SnapshotS3Location" Simulation = S3LocationProperty
  set :: PropertyType "SnapshotS3Location" Simulation
-> Simulation -> Simulation
set PropertyType "SnapshotS3Location" Simulation
newValue Simulation {Maybe (Value Text)
Maybe S3LocationProperty
()
Value Text
haddock_workaround_ :: Simulation -> ()
maximumDuration :: Simulation -> Maybe (Value Text)
name :: Simulation -> Value Text
roleArn :: Simulation -> Value Text
schemaS3Location :: Simulation -> Maybe S3LocationProperty
snapshotS3Location :: Simulation -> Maybe S3LocationProperty
haddock_workaround_ :: ()
maximumDuration :: Maybe (Value Text)
name :: Value Text
roleArn :: Value Text
schemaS3Location :: Maybe S3LocationProperty
snapshotS3Location :: Maybe S3LocationProperty
..}
    = Simulation {snapshotS3Location :: Maybe S3LocationProperty
snapshotS3Location = S3LocationProperty -> Maybe S3LocationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SnapshotS3Location" Simulation
S3LocationProperty
newValue, Maybe (Value Text)
Maybe S3LocationProperty
()
Value Text
haddock_workaround_ :: ()
maximumDuration :: Maybe (Value Text)
name :: Value Text
roleArn :: Value Text
schemaS3Location :: Maybe S3LocationProperty
haddock_workaround_ :: ()
maximumDuration :: Maybe (Value Text)
name :: Value Text
roleArn :: Value Text
schemaS3Location :: Maybe S3LocationProperty
..}