module Stratosphere.Lightsail.DiskSnapshot (
DiskSnapshot(..), mkDiskSnapshot
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data DiskSnapshot
=
DiskSnapshot {DiskSnapshot -> ()
haddock_workaround_ :: (),
DiskSnapshot -> Value Text
diskName :: (Value Prelude.Text),
DiskSnapshot -> Value Text
diskSnapshotName :: (Value Prelude.Text),
DiskSnapshot -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (DiskSnapshot -> DiskSnapshot -> Bool
(DiskSnapshot -> DiskSnapshot -> Bool)
-> (DiskSnapshot -> DiskSnapshot -> Bool) -> Eq DiskSnapshot
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DiskSnapshot -> DiskSnapshot -> Bool
== :: DiskSnapshot -> DiskSnapshot -> Bool
$c/= :: DiskSnapshot -> DiskSnapshot -> Bool
/= :: DiskSnapshot -> DiskSnapshot -> Bool
Prelude.Eq, Int -> DiskSnapshot -> ShowS
[DiskSnapshot] -> ShowS
DiskSnapshot -> String
(Int -> DiskSnapshot -> ShowS)
-> (DiskSnapshot -> String)
-> ([DiskSnapshot] -> ShowS)
-> Show DiskSnapshot
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DiskSnapshot -> ShowS
showsPrec :: Int -> DiskSnapshot -> ShowS
$cshow :: DiskSnapshot -> String
show :: DiskSnapshot -> String
$cshowList :: [DiskSnapshot] -> ShowS
showList :: [DiskSnapshot] -> ShowS
Prelude.Show)
mkDiskSnapshot ::
Value Prelude.Text -> Value Prelude.Text -> DiskSnapshot
mkDiskSnapshot :: Value Text -> Value Text -> DiskSnapshot
mkDiskSnapshot Value Text
diskName Value Text
diskSnapshotName
= DiskSnapshot
{haddock_workaround_ :: ()
haddock_workaround_ = (), diskName :: Value Text
diskName = Value Text
diskName,
diskSnapshotName :: Value Text
diskSnapshotName = Value Text
diskSnapshotName, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DiskSnapshot where
toResourceProperties :: DiskSnapshot -> ResourceProperties
toResourceProperties DiskSnapshot {Maybe [Tag]
()
Value Text
haddock_workaround_ :: DiskSnapshot -> ()
diskName :: DiskSnapshot -> Value Text
diskSnapshotName :: DiskSnapshot -> Value Text
tags :: DiskSnapshot -> Maybe [Tag]
haddock_workaround_ :: ()
diskName :: Value Text
diskSnapshotName :: Value Text
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Lightsail::DiskSnapshot",
supportsTags :: Bool
supportsTags = Bool
Prelude.True,
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
"DiskName" 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
diskName,
Key
"DiskSnapshotName" 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
diskSnapshotName]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON DiskSnapshot where
toJSON :: DiskSnapshot -> Value
toJSON DiskSnapshot {Maybe [Tag]
()
Value Text
haddock_workaround_ :: DiskSnapshot -> ()
diskName :: DiskSnapshot -> Value Text
diskSnapshotName :: DiskSnapshot -> Value Text
tags :: DiskSnapshot -> Maybe [Tag]
haddock_workaround_ :: ()
diskName :: Value Text
diskSnapshotName :: Value Text
tags :: Maybe [Tag]
..}
= [(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
"DiskName" 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
diskName,
Key
"DiskSnapshotName" 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
diskSnapshotName]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "DiskName" DiskSnapshot where
type PropertyType "DiskName" DiskSnapshot = Value Prelude.Text
set :: PropertyType "DiskName" DiskSnapshot
-> DiskSnapshot -> DiskSnapshot
set PropertyType "DiskName" DiskSnapshot
newValue DiskSnapshot {Maybe [Tag]
()
Value Text
haddock_workaround_ :: DiskSnapshot -> ()
diskName :: DiskSnapshot -> Value Text
diskSnapshotName :: DiskSnapshot -> Value Text
tags :: DiskSnapshot -> Maybe [Tag]
haddock_workaround_ :: ()
diskName :: Value Text
diskSnapshotName :: Value Text
tags :: Maybe [Tag]
..}
= DiskSnapshot {diskName :: Value Text
diskName = PropertyType "DiskName" DiskSnapshot
Value Text
newValue, Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
diskSnapshotName :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
diskSnapshotName :: Value Text
tags :: Maybe [Tag]
..}
instance Property "DiskSnapshotName" DiskSnapshot where
type PropertyType "DiskSnapshotName" DiskSnapshot = Value Prelude.Text
set :: PropertyType "DiskSnapshotName" DiskSnapshot
-> DiskSnapshot -> DiskSnapshot
set PropertyType "DiskSnapshotName" DiskSnapshot
newValue DiskSnapshot {Maybe [Tag]
()
Value Text
haddock_workaround_ :: DiskSnapshot -> ()
diskName :: DiskSnapshot -> Value Text
diskSnapshotName :: DiskSnapshot -> Value Text
tags :: DiskSnapshot -> Maybe [Tag]
haddock_workaround_ :: ()
diskName :: Value Text
diskSnapshotName :: Value Text
tags :: Maybe [Tag]
..}
= DiskSnapshot {diskSnapshotName :: Value Text
diskSnapshotName = PropertyType "DiskSnapshotName" DiskSnapshot
Value Text
newValue, Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
diskName :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
diskName :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Tags" DiskSnapshot where
type PropertyType "Tags" DiskSnapshot = [Tag]
set :: PropertyType "Tags" DiskSnapshot -> DiskSnapshot -> DiskSnapshot
set PropertyType "Tags" DiskSnapshot
newValue DiskSnapshot {Maybe [Tag]
()
Value Text
haddock_workaround_ :: DiskSnapshot -> ()
diskName :: DiskSnapshot -> Value Text
diskSnapshotName :: DiskSnapshot -> Value Text
tags :: DiskSnapshot -> Maybe [Tag]
haddock_workaround_ :: ()
diskName :: Value Text
diskSnapshotName :: Value Text
tags :: Maybe [Tag]
..}
= DiskSnapshot {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" DiskSnapshot
newValue, ()
Value Text
haddock_workaround_ :: ()
diskName :: Value Text
diskSnapshotName :: Value Text
haddock_workaround_ :: ()
diskName :: Value Text
diskSnapshotName :: Value Text
..}