module Stratosphere.Batch.JobDefinition.VolumeProperty (
module Exports, VolumeProperty(..), mkVolumeProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Batch.JobDefinition.EFSVolumeConfigurationProperty as Exports
import {-# SOURCE #-} Stratosphere.Batch.JobDefinition.HostProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data VolumeProperty
=
VolumeProperty {VolumeProperty -> ()
haddock_workaround_ :: (),
VolumeProperty -> Maybe EFSVolumeConfigurationProperty
efsVolumeConfiguration :: (Prelude.Maybe EFSVolumeConfigurationProperty),
VolumeProperty -> Maybe HostProperty
host :: (Prelude.Maybe HostProperty),
VolumeProperty -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (VolumeProperty -> VolumeProperty -> Bool
(VolumeProperty -> VolumeProperty -> Bool)
-> (VolumeProperty -> VolumeProperty -> Bool) -> Eq VolumeProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: VolumeProperty -> VolumeProperty -> Bool
== :: VolumeProperty -> VolumeProperty -> Bool
$c/= :: VolumeProperty -> VolumeProperty -> Bool
/= :: VolumeProperty -> VolumeProperty -> Bool
Prelude.Eq, Int -> VolumeProperty -> ShowS
[VolumeProperty] -> ShowS
VolumeProperty -> String
(Int -> VolumeProperty -> ShowS)
-> (VolumeProperty -> String)
-> ([VolumeProperty] -> ShowS)
-> Show VolumeProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> VolumeProperty -> ShowS
showsPrec :: Int -> VolumeProperty -> ShowS
$cshow :: VolumeProperty -> String
show :: VolumeProperty -> String
$cshowList :: [VolumeProperty] -> ShowS
showList :: [VolumeProperty] -> ShowS
Prelude.Show)
mkVolumeProperty :: VolumeProperty
mkVolumeProperty :: VolumeProperty
mkVolumeProperty
= VolumeProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (),
efsVolumeConfiguration :: Maybe EFSVolumeConfigurationProperty
efsVolumeConfiguration = Maybe EFSVolumeConfigurationProperty
forall a. Maybe a
Prelude.Nothing, host :: Maybe HostProperty
host = Maybe HostProperty
forall a. Maybe a
Prelude.Nothing,
name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties VolumeProperty where
toResourceProperties :: VolumeProperty -> ResourceProperties
toResourceProperties VolumeProperty {Maybe (Value Text)
Maybe EFSVolumeConfigurationProperty
Maybe HostProperty
()
haddock_workaround_ :: VolumeProperty -> ()
efsVolumeConfiguration :: VolumeProperty -> Maybe EFSVolumeConfigurationProperty
host :: VolumeProperty -> Maybe HostProperty
name :: VolumeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
efsVolumeConfiguration :: Maybe EFSVolumeConfigurationProperty
host :: Maybe HostProperty
name :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Batch::JobDefinition.Volume",
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 -> EFSVolumeConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"EfsVolumeConfiguration"
(EFSVolumeConfigurationProperty -> (Key, Value))
-> Maybe EFSVolumeConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EFSVolumeConfigurationProperty
efsVolumeConfiguration,
Key -> HostProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Host" (HostProperty -> (Key, Value))
-> Maybe HostProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HostProperty
host,
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
"Name" (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)
name])}
instance JSON.ToJSON VolumeProperty where
toJSON :: VolumeProperty -> Value
toJSON VolumeProperty {Maybe (Value Text)
Maybe EFSVolumeConfigurationProperty
Maybe HostProperty
()
haddock_workaround_ :: VolumeProperty -> ()
efsVolumeConfiguration :: VolumeProperty -> Maybe EFSVolumeConfigurationProperty
host :: VolumeProperty -> Maybe HostProperty
name :: VolumeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
efsVolumeConfiguration :: Maybe EFSVolumeConfigurationProperty
host :: Maybe HostProperty
name :: 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 -> EFSVolumeConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"EfsVolumeConfiguration"
(EFSVolumeConfigurationProperty -> (Key, Value))
-> Maybe EFSVolumeConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EFSVolumeConfigurationProperty
efsVolumeConfiguration,
Key -> HostProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Host" (HostProperty -> (Key, Value))
-> Maybe HostProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HostProperty
host,
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
"Name" (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)
name]))
instance Property "EfsVolumeConfiguration" VolumeProperty where
type PropertyType "EfsVolumeConfiguration" VolumeProperty = EFSVolumeConfigurationProperty
set :: PropertyType "EfsVolumeConfiguration" VolumeProperty
-> VolumeProperty -> VolumeProperty
set PropertyType "EfsVolumeConfiguration" VolumeProperty
newValue VolumeProperty {Maybe (Value Text)
Maybe EFSVolumeConfigurationProperty
Maybe HostProperty
()
haddock_workaround_ :: VolumeProperty -> ()
efsVolumeConfiguration :: VolumeProperty -> Maybe EFSVolumeConfigurationProperty
host :: VolumeProperty -> Maybe HostProperty
name :: VolumeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
efsVolumeConfiguration :: Maybe EFSVolumeConfigurationProperty
host :: Maybe HostProperty
name :: Maybe (Value Text)
..}
= VolumeProperty
{efsVolumeConfiguration :: Maybe EFSVolumeConfigurationProperty
efsVolumeConfiguration = EFSVolumeConfigurationProperty
-> Maybe EFSVolumeConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "EfsVolumeConfiguration" VolumeProperty
EFSVolumeConfigurationProperty
newValue, Maybe (Value Text)
Maybe HostProperty
()
haddock_workaround_ :: ()
host :: Maybe HostProperty
name :: Maybe (Value Text)
haddock_workaround_ :: ()
host :: Maybe HostProperty
name :: Maybe (Value Text)
..}
instance Property "Host" VolumeProperty where
type PropertyType "Host" VolumeProperty = HostProperty
set :: PropertyType "Host" VolumeProperty
-> VolumeProperty -> VolumeProperty
set PropertyType "Host" VolumeProperty
newValue VolumeProperty {Maybe (Value Text)
Maybe EFSVolumeConfigurationProperty
Maybe HostProperty
()
haddock_workaround_ :: VolumeProperty -> ()
efsVolumeConfiguration :: VolumeProperty -> Maybe EFSVolumeConfigurationProperty
host :: VolumeProperty -> Maybe HostProperty
name :: VolumeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
efsVolumeConfiguration :: Maybe EFSVolumeConfigurationProperty
host :: Maybe HostProperty
name :: Maybe (Value Text)
..}
= VolumeProperty {host :: Maybe HostProperty
host = HostProperty -> Maybe HostProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Host" VolumeProperty
HostProperty
newValue, Maybe (Value Text)
Maybe EFSVolumeConfigurationProperty
()
haddock_workaround_ :: ()
efsVolumeConfiguration :: Maybe EFSVolumeConfigurationProperty
name :: Maybe (Value Text)
haddock_workaround_ :: ()
efsVolumeConfiguration :: Maybe EFSVolumeConfigurationProperty
name :: Maybe (Value Text)
..}
instance Property "Name" VolumeProperty where
type PropertyType "Name" VolumeProperty = Value Prelude.Text
set :: PropertyType "Name" VolumeProperty
-> VolumeProperty -> VolumeProperty
set PropertyType "Name" VolumeProperty
newValue VolumeProperty {Maybe (Value Text)
Maybe EFSVolumeConfigurationProperty
Maybe HostProperty
()
haddock_workaround_ :: VolumeProperty -> ()
efsVolumeConfiguration :: VolumeProperty -> Maybe EFSVolumeConfigurationProperty
host :: VolumeProperty -> Maybe HostProperty
name :: VolumeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
efsVolumeConfiguration :: Maybe EFSVolumeConfigurationProperty
host :: Maybe HostProperty
name :: Maybe (Value Text)
..}
= VolumeProperty {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" VolumeProperty
Value Text
newValue, Maybe EFSVolumeConfigurationProperty
Maybe HostProperty
()
haddock_workaround_ :: ()
efsVolumeConfiguration :: Maybe EFSVolumeConfigurationProperty
host :: Maybe HostProperty
haddock_workaround_ :: ()
efsVolumeConfiguration :: Maybe EFSVolumeConfigurationProperty
host :: Maybe HostProperty
..}