module Stratosphere.OpsWorks.Volume (
        Volume(..), mkVolume
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Volume
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-volume.html>
    Volume {Volume -> ()
haddock_workaround_ :: (),
            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-volume.html#cfn-opsworks-volume-ec2volumeid>
            Volume -> Value Text
ec2VolumeId :: (Value Prelude.Text),
            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-volume.html#cfn-opsworks-volume-mountpoint>
            Volume -> Maybe (Value Text)
mountPoint :: (Prelude.Maybe (Value Prelude.Text)),
            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-volume.html#cfn-opsworks-volume-name>
            Volume -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text)),
            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-volume.html#cfn-opsworks-volume-stackid>
            Volume -> Value Text
stackId :: (Value Prelude.Text)}
  deriving stock (Volume -> Volume -> Bool
(Volume -> Volume -> Bool)
-> (Volume -> Volume -> Bool) -> Eq Volume
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Volume -> Volume -> Bool
== :: Volume -> Volume -> Bool
$c/= :: Volume -> Volume -> Bool
/= :: Volume -> Volume -> Bool
Prelude.Eq, Int -> Volume -> ShowS
[Volume] -> ShowS
Volume -> String
(Int -> Volume -> ShowS)
-> (Volume -> String) -> ([Volume] -> ShowS) -> Show Volume
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Volume -> ShowS
showsPrec :: Int -> Volume -> ShowS
$cshow :: Volume -> String
show :: Volume -> String
$cshowList :: [Volume] -> ShowS
showList :: [Volume] -> ShowS
Prelude.Show)
mkVolume :: Value Prelude.Text -> Value Prelude.Text -> Volume
mkVolume :: Value Text -> Value Text -> Volume
mkVolume Value Text
ec2VolumeId Value Text
stackId
  = Volume
      {haddock_workaround_ :: ()
haddock_workaround_ = (), ec2VolumeId :: Value Text
ec2VolumeId = Value Text
ec2VolumeId,
       stackId :: Value Text
stackId = Value Text
stackId, mountPoint :: Maybe (Value Text)
mountPoint = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Volume where
  toResourceProperties :: Volume -> ResourceProperties
toResourceProperties Volume {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Volume -> ()
ec2VolumeId :: Volume -> Value Text
mountPoint :: Volume -> Maybe (Value Text)
name :: Volume -> Maybe (Value Text)
stackId :: Volume -> Value Text
haddock_workaround_ :: ()
ec2VolumeId :: Value Text
mountPoint :: Maybe (Value Text)
name :: Maybe (Value Text)
stackId :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::OpsWorks::Volume", supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"Ec2VolumeId" 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..= Value Text
ec2VolumeId, Key
"StackId" 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..= Value Text
stackId]
                           ([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
"MountPoint" (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)
mountPoint,
                               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 Volume where
  toJSON :: Volume -> Value
toJSON Volume {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Volume -> ()
ec2VolumeId :: Volume -> Value Text
mountPoint :: Volume -> Maybe (Value Text)
name :: Volume -> Maybe (Value Text)
stackId :: Volume -> Value Text
haddock_workaround_ :: ()
ec2VolumeId :: Value Text
mountPoint :: Maybe (Value Text)
name :: Maybe (Value Text)
stackId :: Value Text
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"Ec2VolumeId" 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..= Value Text
ec2VolumeId, Key
"StackId" 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..= Value Text
stackId]
              ([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
"MountPoint" (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)
mountPoint,
                  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 "Ec2VolumeId" Volume where
  type PropertyType "Ec2VolumeId" Volume = Value Prelude.Text
  set :: PropertyType "Ec2VolumeId" Volume -> Volume -> Volume
set PropertyType "Ec2VolumeId" Volume
newValue Volume {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Volume -> ()
ec2VolumeId :: Volume -> Value Text
mountPoint :: Volume -> Maybe (Value Text)
name :: Volume -> Maybe (Value Text)
stackId :: Volume -> Value Text
haddock_workaround_ :: ()
ec2VolumeId :: Value Text
mountPoint :: Maybe (Value Text)
name :: Maybe (Value Text)
stackId :: Value Text
..} = Volume {ec2VolumeId :: Value Text
ec2VolumeId = PropertyType "Ec2VolumeId" Volume
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
mountPoint :: Maybe (Value Text)
name :: Maybe (Value Text)
stackId :: Value Text
haddock_workaround_ :: ()
mountPoint :: Maybe (Value Text)
name :: Maybe (Value Text)
stackId :: Value Text
..}
instance Property "MountPoint" Volume where
  type PropertyType "MountPoint" Volume = Value Prelude.Text
  set :: PropertyType "MountPoint" Volume -> Volume -> Volume
set PropertyType "MountPoint" Volume
newValue Volume {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Volume -> ()
ec2VolumeId :: Volume -> Value Text
mountPoint :: Volume -> Maybe (Value Text)
name :: Volume -> Maybe (Value Text)
stackId :: Volume -> Value Text
haddock_workaround_ :: ()
ec2VolumeId :: Value Text
mountPoint :: Maybe (Value Text)
name :: Maybe (Value Text)
stackId :: Value Text
..}
    = Volume {mountPoint :: Maybe (Value Text)
mountPoint = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MountPoint" Volume
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
ec2VolumeId :: Value Text
name :: Maybe (Value Text)
stackId :: Value Text
haddock_workaround_ :: ()
ec2VolumeId :: Value Text
name :: Maybe (Value Text)
stackId :: Value Text
..}
instance Property "Name" Volume where
  type PropertyType "Name" Volume = Value Prelude.Text
  set :: PropertyType "Name" Volume -> Volume -> Volume
set PropertyType "Name" Volume
newValue Volume {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Volume -> ()
ec2VolumeId :: Volume -> Value Text
mountPoint :: Volume -> Maybe (Value Text)
name :: Volume -> Maybe (Value Text)
stackId :: Volume -> Value Text
haddock_workaround_ :: ()
ec2VolumeId :: Value Text
mountPoint :: Maybe (Value Text)
name :: Maybe (Value Text)
stackId :: Value Text
..}
    = Volume {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" Volume
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
ec2VolumeId :: Value Text
mountPoint :: Maybe (Value Text)
stackId :: Value Text
haddock_workaround_ :: ()
ec2VolumeId :: Value Text
mountPoint :: Maybe (Value Text)
stackId :: Value Text
..}
instance Property "StackId" Volume where
  type PropertyType "StackId" Volume = Value Prelude.Text
  set :: PropertyType "StackId" Volume -> Volume -> Volume
set PropertyType "StackId" Volume
newValue Volume {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Volume -> ()
ec2VolumeId :: Volume -> Value Text
mountPoint :: Volume -> Maybe (Value Text)
name :: Volume -> Maybe (Value Text)
stackId :: Volume -> Value Text
haddock_workaround_ :: ()
ec2VolumeId :: Value Text
mountPoint :: Maybe (Value Text)
name :: Maybe (Value Text)
stackId :: Value Text
..} = Volume {stackId :: Value Text
stackId = PropertyType "StackId" Volume
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
ec2VolumeId :: Value Text
mountPoint :: Maybe (Value Text)
name :: Maybe (Value Text)
haddock_workaround_ :: ()
ec2VolumeId :: Value Text
mountPoint :: Maybe (Value Text)
name :: Maybe (Value Text)
..}