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