module Stratosphere.EC2.VolumeAttachment (
VolumeAttachment(..), mkVolumeAttachment
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data VolumeAttachment
=
VolumeAttachment {VolumeAttachment -> ()
haddock_workaround_ :: (),
VolumeAttachment -> Maybe (Value Text)
device :: (Prelude.Maybe (Value Prelude.Text)),
VolumeAttachment -> Value Text
instanceId :: (Value Prelude.Text),
VolumeAttachment -> Value Text
volumeId :: (Value Prelude.Text)}
deriving stock (VolumeAttachment -> VolumeAttachment -> Bool
(VolumeAttachment -> VolumeAttachment -> Bool)
-> (VolumeAttachment -> VolumeAttachment -> Bool)
-> Eq VolumeAttachment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: VolumeAttachment -> VolumeAttachment -> Bool
== :: VolumeAttachment -> VolumeAttachment -> Bool
$c/= :: VolumeAttachment -> VolumeAttachment -> Bool
/= :: VolumeAttachment -> VolumeAttachment -> Bool
Prelude.Eq, Int -> VolumeAttachment -> ShowS
[VolumeAttachment] -> ShowS
VolumeAttachment -> String
(Int -> VolumeAttachment -> ShowS)
-> (VolumeAttachment -> String)
-> ([VolumeAttachment] -> ShowS)
-> Show VolumeAttachment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> VolumeAttachment -> ShowS
showsPrec :: Int -> VolumeAttachment -> ShowS
$cshow :: VolumeAttachment -> String
show :: VolumeAttachment -> String
$cshowList :: [VolumeAttachment] -> ShowS
showList :: [VolumeAttachment] -> ShowS
Prelude.Show)
mkVolumeAttachment ::
Value Prelude.Text -> Value Prelude.Text -> VolumeAttachment
mkVolumeAttachment :: Value Text -> Value Text -> VolumeAttachment
mkVolumeAttachment Value Text
instanceId Value Text
volumeId
= VolumeAttachment
{haddock_workaround_ :: ()
haddock_workaround_ = (), instanceId :: Value Text
instanceId = Value Text
instanceId,
volumeId :: Value Text
volumeId = Value Text
volumeId, device :: Maybe (Value Text)
device = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties VolumeAttachment where
toResourceProperties :: VolumeAttachment -> ResourceProperties
toResourceProperties VolumeAttachment {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: VolumeAttachment -> ()
device :: VolumeAttachment -> Maybe (Value Text)
instanceId :: VolumeAttachment -> Value Text
volumeId :: VolumeAttachment -> Value Text
haddock_workaround_ :: ()
device :: Maybe (Value Text)
instanceId :: Value Text
volumeId :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::EC2::VolumeAttachment",
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
"InstanceId" 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
instanceId, 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]
([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
"Device" (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)
device]))}
instance JSON.ToJSON VolumeAttachment where
toJSON :: VolumeAttachment -> Value
toJSON VolumeAttachment {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: VolumeAttachment -> ()
device :: VolumeAttachment -> Maybe (Value Text)
instanceId :: VolumeAttachment -> Value Text
volumeId :: VolumeAttachment -> Value Text
haddock_workaround_ :: ()
device :: Maybe (Value Text)
instanceId :: Value Text
volumeId :: 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
"InstanceId" 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
instanceId, 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]
([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
"Device" (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)
device])))
instance Property "Device" VolumeAttachment where
type PropertyType "Device" VolumeAttachment = Value Prelude.Text
set :: PropertyType "Device" VolumeAttachment
-> VolumeAttachment -> VolumeAttachment
set PropertyType "Device" VolumeAttachment
newValue VolumeAttachment {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: VolumeAttachment -> ()
device :: VolumeAttachment -> Maybe (Value Text)
instanceId :: VolumeAttachment -> Value Text
volumeId :: VolumeAttachment -> Value Text
haddock_workaround_ :: ()
device :: Maybe (Value Text)
instanceId :: Value Text
volumeId :: Value Text
..}
= VolumeAttachment {device :: Maybe (Value Text)
device = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Device" VolumeAttachment
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
instanceId :: Value Text
volumeId :: Value Text
haddock_workaround_ :: ()
instanceId :: Value Text
volumeId :: Value Text
..}
instance Property "InstanceId" VolumeAttachment where
type PropertyType "InstanceId" VolumeAttachment = Value Prelude.Text
set :: PropertyType "InstanceId" VolumeAttachment
-> VolumeAttachment -> VolumeAttachment
set PropertyType "InstanceId" VolumeAttachment
newValue VolumeAttachment {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: VolumeAttachment -> ()
device :: VolumeAttachment -> Maybe (Value Text)
instanceId :: VolumeAttachment -> Value Text
volumeId :: VolumeAttachment -> Value Text
haddock_workaround_ :: ()
device :: Maybe (Value Text)
instanceId :: Value Text
volumeId :: Value Text
..}
= VolumeAttachment {instanceId :: Value Text
instanceId = PropertyType "InstanceId" VolumeAttachment
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
device :: Maybe (Value Text)
volumeId :: Value Text
haddock_workaround_ :: ()
device :: Maybe (Value Text)
volumeId :: Value Text
..}
instance Property "VolumeId" VolumeAttachment where
type PropertyType "VolumeId" VolumeAttachment = Value Prelude.Text
set :: PropertyType "VolumeId" VolumeAttachment
-> VolumeAttachment -> VolumeAttachment
set PropertyType "VolumeId" VolumeAttachment
newValue VolumeAttachment {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: VolumeAttachment -> ()
device :: VolumeAttachment -> Maybe (Value Text)
instanceId :: VolumeAttachment -> Value Text
volumeId :: VolumeAttachment -> Value Text
haddock_workaround_ :: ()
device :: Maybe (Value Text)
instanceId :: Value Text
volumeId :: Value Text
..}
= VolumeAttachment {volumeId :: Value Text
volumeId = PropertyType "VolumeId" VolumeAttachment
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
device :: Maybe (Value Text)
instanceId :: Value Text
haddock_workaround_ :: ()
device :: Maybe (Value Text)
instanceId :: Value Text
..}