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