module Stratosphere.EC2.Instance.VolumeProperty (
VolumeProperty(..), mkVolumeProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data VolumeProperty
=
VolumeProperty {VolumeProperty -> ()
haddock_workaround_ :: (),
VolumeProperty -> Value Text
device :: (Value Prelude.Text),
VolumeProperty -> Value Text
volumeId :: (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 ::
Value Prelude.Text -> Value Prelude.Text -> VolumeProperty
mkVolumeProperty :: Value Text -> Value Text -> VolumeProperty
mkVolumeProperty Value Text
device Value Text
volumeId
= VolumeProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), device :: Value Text
device = Value Text
device, volumeId :: Value Text
volumeId = Value Text
volumeId}
instance ToResourceProperties VolumeProperty where
toResourceProperties :: VolumeProperty -> ResourceProperties
toResourceProperties VolumeProperty {()
Value Text
haddock_workaround_ :: VolumeProperty -> ()
device :: VolumeProperty -> Value Text
volumeId :: VolumeProperty -> Value Text
haddock_workaround_ :: ()
device :: Value Text
volumeId :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::EC2::Instance.Volume",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Key
"Device" 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
device,
Key
"VolumeId" 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
volumeId]}
instance JSON.ToJSON VolumeProperty where
toJSON :: VolumeProperty -> Value
toJSON VolumeProperty {()
Value Text
haddock_workaround_ :: VolumeProperty -> ()
device :: VolumeProperty -> Value Text
volumeId :: VolumeProperty -> Value Text
haddock_workaround_ :: ()
device :: Value Text
volumeId :: Value Text
..}
= [(Key, Value)] -> Value
JSON.object
[Key
"Device" 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
device, Key
"VolumeId" 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
volumeId]
instance Property "Device" VolumeProperty where
type PropertyType "Device" VolumeProperty = Value Prelude.Text
set :: PropertyType "Device" VolumeProperty
-> VolumeProperty -> VolumeProperty
set PropertyType "Device" VolumeProperty
newValue VolumeProperty {()
Value Text
haddock_workaround_ :: VolumeProperty -> ()
device :: VolumeProperty -> Value Text
volumeId :: VolumeProperty -> Value Text
haddock_workaround_ :: ()
device :: Value Text
volumeId :: Value Text
..}
= VolumeProperty {device :: Value Text
device = PropertyType "Device" VolumeProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
volumeId :: Value Text
haddock_workaround_ :: ()
volumeId :: Value Text
..}
instance Property "VolumeId" VolumeProperty where
type PropertyType "VolumeId" VolumeProperty = Value Prelude.Text
set :: PropertyType "VolumeId" VolumeProperty
-> VolumeProperty -> VolumeProperty
set PropertyType "VolumeId" VolumeProperty
newValue VolumeProperty {()
Value Text
haddock_workaround_ :: VolumeProperty -> ()
device :: VolumeProperty -> Value Text
volumeId :: VolumeProperty -> Value Text
haddock_workaround_ :: ()
device :: Value Text
volumeId :: Value Text
..}
= VolumeProperty {volumeId :: Value Text
volumeId = PropertyType "VolumeId" VolumeProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
device :: Value Text
haddock_workaround_ :: ()
device :: Value Text
..}