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