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