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