module Stratosphere.ECS.TaskDefinition.VolumeFromProperty (
        VolumeFromProperty(..), mkVolumeFromProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data VolumeFromProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-volumefrom.html>
    VolumeFromProperty {VolumeFromProperty -> ()
haddock_workaround_ :: (),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-volumefrom.html#cfn-ecs-taskdefinition-volumefrom-readonly>
                        VolumeFromProperty -> Maybe (Value Bool)
readOnly :: (Prelude.Maybe (Value Prelude.Bool)),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-volumefrom.html#cfn-ecs-taskdefinition-volumefrom-sourcecontainer>
                        VolumeFromProperty -> Maybe (Value Text)
sourceContainer :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (VolumeFromProperty -> VolumeFromProperty -> Bool
(VolumeFromProperty -> VolumeFromProperty -> Bool)
-> (VolumeFromProperty -> VolumeFromProperty -> Bool)
-> Eq VolumeFromProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: VolumeFromProperty -> VolumeFromProperty -> Bool
== :: VolumeFromProperty -> VolumeFromProperty -> Bool
$c/= :: VolumeFromProperty -> VolumeFromProperty -> Bool
/= :: VolumeFromProperty -> VolumeFromProperty -> Bool
Prelude.Eq, Int -> VolumeFromProperty -> ShowS
[VolumeFromProperty] -> ShowS
VolumeFromProperty -> String
(Int -> VolumeFromProperty -> ShowS)
-> (VolumeFromProperty -> String)
-> ([VolumeFromProperty] -> ShowS)
-> Show VolumeFromProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> VolumeFromProperty -> ShowS
showsPrec :: Int -> VolumeFromProperty -> ShowS
$cshow :: VolumeFromProperty -> String
show :: VolumeFromProperty -> String
$cshowList :: [VolumeFromProperty] -> ShowS
showList :: [VolumeFromProperty] -> ShowS
Prelude.Show)
mkVolumeFromProperty :: VolumeFromProperty
mkVolumeFromProperty :: VolumeFromProperty
mkVolumeFromProperty
  = VolumeFromProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), readOnly :: Maybe (Value Bool)
readOnly = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
       sourceContainer :: Maybe (Value Text)
sourceContainer = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties VolumeFromProperty where
  toResourceProperties :: VolumeFromProperty -> ResourceProperties
toResourceProperties VolumeFromProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: VolumeFromProperty -> ()
readOnly :: VolumeFromProperty -> Maybe (Value Bool)
sourceContainer :: VolumeFromProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
readOnly :: Maybe (Value Bool)
sourceContainer :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ECS::TaskDefinition.VolumeFrom",
         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 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
"SourceContainer" (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)
sourceContainer])}
instance JSON.ToJSON VolumeFromProperty where
  toJSON :: VolumeFromProperty -> Value
toJSON VolumeFromProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: VolumeFromProperty -> ()
readOnly :: VolumeFromProperty -> Maybe (Value Bool)
sourceContainer :: VolumeFromProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
readOnly :: Maybe (Value Bool)
sourceContainer :: 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 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
"SourceContainer" (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)
sourceContainer]))
instance Property "ReadOnly" VolumeFromProperty where
  type PropertyType "ReadOnly" VolumeFromProperty = Value Prelude.Bool
  set :: PropertyType "ReadOnly" VolumeFromProperty
-> VolumeFromProperty -> VolumeFromProperty
set PropertyType "ReadOnly" VolumeFromProperty
newValue VolumeFromProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: VolumeFromProperty -> ()
readOnly :: VolumeFromProperty -> Maybe (Value Bool)
sourceContainer :: VolumeFromProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
readOnly :: Maybe (Value Bool)
sourceContainer :: Maybe (Value Text)
..}
    = VolumeFromProperty {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" VolumeFromProperty
Value Bool
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
sourceContainer :: Maybe (Value Text)
haddock_workaround_ :: ()
sourceContainer :: Maybe (Value Text)
..}
instance Property "SourceContainer" VolumeFromProperty where
  type PropertyType "SourceContainer" VolumeFromProperty = Value Prelude.Text
  set :: PropertyType "SourceContainer" VolumeFromProperty
-> VolumeFromProperty -> VolumeFromProperty
set PropertyType "SourceContainer" VolumeFromProperty
newValue VolumeFromProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: VolumeFromProperty -> ()
readOnly :: VolumeFromProperty -> Maybe (Value Bool)
sourceContainer :: VolumeFromProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
readOnly :: Maybe (Value Bool)
sourceContainer :: Maybe (Value Text)
..}
    = VolumeFromProperty {sourceContainer :: Maybe (Value Text)
sourceContainer = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SourceContainer" VolumeFromProperty
Value Text
newValue, Maybe (Value Bool)
()
haddock_workaround_ :: ()
readOnly :: Maybe (Value Bool)
haddock_workaround_ :: ()
readOnly :: Maybe (Value Bool)
..}