module Stratosphere.ECS.TaskDefinition.MountPointProperty (
        MountPointProperty(..), mkMountPointProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data MountPointProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-mountpoint.html>
    MountPointProperty {MountPointProperty -> ()
haddock_workaround_ :: (),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-mountpoint.html#cfn-ecs-taskdefinition-mountpoint-containerpath>
                        MountPointProperty -> Maybe (Value Text)
containerPath :: (Prelude.Maybe (Value Prelude.Text)),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-mountpoint.html#cfn-ecs-taskdefinition-mountpoint-readonly>
                        MountPointProperty -> Maybe (Value Bool)
readOnly :: (Prelude.Maybe (Value Prelude.Bool)),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-mountpoint.html#cfn-ecs-taskdefinition-mountpoint-sourcevolume>
                        MountPointProperty -> Maybe (Value Text)
sourceVolume :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (MountPointProperty -> MountPointProperty -> Bool
(MountPointProperty -> MountPointProperty -> Bool)
-> (MountPointProperty -> MountPointProperty -> Bool)
-> Eq MountPointProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MountPointProperty -> MountPointProperty -> Bool
== :: MountPointProperty -> MountPointProperty -> Bool
$c/= :: MountPointProperty -> MountPointProperty -> Bool
/= :: MountPointProperty -> MountPointProperty -> Bool
Prelude.Eq, Int -> MountPointProperty -> ShowS
[MountPointProperty] -> ShowS
MountPointProperty -> String
(Int -> MountPointProperty -> ShowS)
-> (MountPointProperty -> String)
-> ([MountPointProperty] -> ShowS)
-> Show MountPointProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MountPointProperty -> ShowS
showsPrec :: Int -> MountPointProperty -> ShowS
$cshow :: MountPointProperty -> String
show :: MountPointProperty -> String
$cshowList :: [MountPointProperty] -> ShowS
showList :: [MountPointProperty] -> ShowS
Prelude.Show)
mkMountPointProperty :: MountPointProperty
mkMountPointProperty :: MountPointProperty
mkMountPointProperty
  = MountPointProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), containerPath :: Maybe (Value Text)
containerPath = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       readOnly :: Maybe (Value Bool)
readOnly = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing, sourceVolume :: Maybe (Value Text)
sourceVolume = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties MountPointProperty where
  toResourceProperties :: MountPointProperty -> ResourceProperties
toResourceProperties MountPointProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: MountPointProperty -> ()
containerPath :: MountPointProperty -> Maybe (Value Text)
readOnly :: MountPointProperty -> Maybe (Value Bool)
sourceVolume :: MountPointProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
containerPath :: Maybe (Value Text)
readOnly :: Maybe (Value Bool)
sourceVolume :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ECS::TaskDefinition.MountPoint",
         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 Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ReadOnly" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
readOnly,
                            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
"SourceVolume" (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)
sourceVolume])}
instance JSON.ToJSON MountPointProperty where
  toJSON :: MountPointProperty -> Value
toJSON MountPointProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: MountPointProperty -> ()
containerPath :: MountPointProperty -> Maybe (Value Text)
readOnly :: MountPointProperty -> Maybe (Value Bool)
sourceVolume :: MountPointProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
containerPath :: Maybe (Value Text)
readOnly :: Maybe (Value Bool)
sourceVolume :: 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
"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 Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ReadOnly" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
readOnly,
               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
"SourceVolume" (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)
sourceVolume]))
instance Property "ContainerPath" MountPointProperty where
  type PropertyType "ContainerPath" MountPointProperty = Value Prelude.Text
  set :: PropertyType "ContainerPath" MountPointProperty
-> MountPointProperty -> MountPointProperty
set PropertyType "ContainerPath" MountPointProperty
newValue MountPointProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: MountPointProperty -> ()
containerPath :: MountPointProperty -> Maybe (Value Text)
readOnly :: MountPointProperty -> Maybe (Value Bool)
sourceVolume :: MountPointProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
containerPath :: Maybe (Value Text)
readOnly :: Maybe (Value Bool)
sourceVolume :: Maybe (Value Text)
..}
    = MountPointProperty {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" MountPointProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
readOnly :: Maybe (Value Bool)
sourceVolume :: Maybe (Value Text)
haddock_workaround_ :: ()
readOnly :: Maybe (Value Bool)
sourceVolume :: Maybe (Value Text)
..}
instance Property "ReadOnly" MountPointProperty where
  type PropertyType "ReadOnly" MountPointProperty = Value Prelude.Bool
  set :: PropertyType "ReadOnly" MountPointProperty
-> MountPointProperty -> MountPointProperty
set PropertyType "ReadOnly" MountPointProperty
newValue MountPointProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: MountPointProperty -> ()
containerPath :: MountPointProperty -> Maybe (Value Text)
readOnly :: MountPointProperty -> Maybe (Value Bool)
sourceVolume :: MountPointProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
containerPath :: Maybe (Value Text)
readOnly :: Maybe (Value Bool)
sourceVolume :: Maybe (Value Text)
..}
    = MountPointProperty {readOnly :: Maybe (Value Bool)
readOnly = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ReadOnly" MountPointProperty
Value Bool
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
containerPath :: Maybe (Value Text)
sourceVolume :: Maybe (Value Text)
haddock_workaround_ :: ()
containerPath :: Maybe (Value Text)
sourceVolume :: Maybe (Value Text)
..}
instance Property "SourceVolume" MountPointProperty where
  type PropertyType "SourceVolume" MountPointProperty = Value Prelude.Text
  set :: PropertyType "SourceVolume" MountPointProperty
-> MountPointProperty -> MountPointProperty
set PropertyType "SourceVolume" MountPointProperty
newValue MountPointProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: MountPointProperty -> ()
containerPath :: MountPointProperty -> Maybe (Value Text)
readOnly :: MountPointProperty -> Maybe (Value Bool)
sourceVolume :: MountPointProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
containerPath :: Maybe (Value Text)
readOnly :: Maybe (Value Bool)
sourceVolume :: Maybe (Value Text)
..}
    = MountPointProperty {sourceVolume :: Maybe (Value Text)
sourceVolume = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SourceVolume" MountPointProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
containerPath :: Maybe (Value Text)
readOnly :: Maybe (Value Bool)
haddock_workaround_ :: ()
containerPath :: Maybe (Value Text)
readOnly :: Maybe (Value Bool)
..}