module Stratosphere.Lightsail.Disk (
module Exports, Disk(..), mkDisk
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Lightsail.Disk.AddOnProperty as Exports
import {-# SOURCE #-} Stratosphere.Lightsail.Disk.LocationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data Disk
=
Disk {Disk -> ()
haddock_workaround_ :: (),
Disk -> Maybe [AddOnProperty]
addOns :: (Prelude.Maybe [AddOnProperty]),
Disk -> Maybe (Value Text)
availabilityZone :: (Prelude.Maybe (Value Prelude.Text)),
Disk -> Value Text
diskName :: (Value Prelude.Text),
Disk -> Maybe LocationProperty
location :: (Prelude.Maybe LocationProperty),
Disk -> Value Integer
sizeInGb :: (Value Prelude.Integer),
Disk -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (Disk -> Disk -> Bool
(Disk -> Disk -> Bool) -> (Disk -> Disk -> Bool) -> Eq Disk
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Disk -> Disk -> Bool
== :: Disk -> Disk -> Bool
$c/= :: Disk -> Disk -> Bool
/= :: Disk -> Disk -> Bool
Prelude.Eq, Int -> Disk -> ShowS
[Disk] -> ShowS
Disk -> String
(Int -> Disk -> ShowS)
-> (Disk -> String) -> ([Disk] -> ShowS) -> Show Disk
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Disk -> ShowS
showsPrec :: Int -> Disk -> ShowS
$cshow :: Disk -> String
show :: Disk -> String
$cshowList :: [Disk] -> ShowS
showList :: [Disk] -> ShowS
Prelude.Show)
mkDisk :: Value Prelude.Text -> Value Prelude.Integer -> Disk
mkDisk :: Value Text -> Value Integer -> Disk
mkDisk Value Text
diskName Value Integer
sizeInGb
= Disk
{haddock_workaround_ :: ()
haddock_workaround_ = (), diskName :: Value Text
diskName = Value Text
diskName,
sizeInGb :: Value Integer
sizeInGb = Value Integer
sizeInGb, addOns :: Maybe [AddOnProperty]
addOns = Maybe [AddOnProperty]
forall a. Maybe a
Prelude.Nothing,
availabilityZone :: Maybe (Value Text)
availabilityZone = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, location :: Maybe LocationProperty
location = Maybe LocationProperty
forall a. Maybe a
Prelude.Nothing,
tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Disk where
toResourceProperties :: Disk -> ResourceProperties
toResourceProperties Disk {Maybe [Tag]
Maybe [AddOnProperty]
Maybe (Value Text)
Maybe LocationProperty
()
Value Integer
Value Text
haddock_workaround_ :: Disk -> ()
addOns :: Disk -> Maybe [AddOnProperty]
availabilityZone :: Disk -> Maybe (Value Text)
diskName :: Disk -> Value Text
location :: Disk -> Maybe LocationProperty
sizeInGb :: Disk -> Value Integer
tags :: Disk -> Maybe [Tag]
haddock_workaround_ :: ()
addOns :: Maybe [AddOnProperty]
availabilityZone :: Maybe (Value Text)
diskName :: Value Text
location :: Maybe LocationProperty
sizeInGb :: Value Integer
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Lightsail::Disk", 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
"SizeInGb" Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Integer
sizeInGb]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> [AddOnProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AddOns" ([AddOnProperty] -> (Key, Value))
-> Maybe [AddOnProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AddOnProperty]
addOns,
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
"AvailabilityZone" (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)
availabilityZone,
Key -> LocationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Location" (LocationProperty -> (Key, Value))
-> Maybe LocationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LocationProperty
location,
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 Disk where
toJSON :: Disk -> Value
toJSON Disk {Maybe [Tag]
Maybe [AddOnProperty]
Maybe (Value Text)
Maybe LocationProperty
()
Value Integer
Value Text
haddock_workaround_ :: Disk -> ()
addOns :: Disk -> Maybe [AddOnProperty]
availabilityZone :: Disk -> Maybe (Value Text)
diskName :: Disk -> Value Text
location :: Disk -> Maybe LocationProperty
sizeInGb :: Disk -> Value Integer
tags :: Disk -> Maybe [Tag]
haddock_workaround_ :: ()
addOns :: Maybe [AddOnProperty]
availabilityZone :: Maybe (Value Text)
diskName :: Value Text
location :: Maybe LocationProperty
sizeInGb :: Value Integer
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
"SizeInGb" Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Integer
sizeInGb]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> [AddOnProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AddOns" ([AddOnProperty] -> (Key, Value))
-> Maybe [AddOnProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AddOnProperty]
addOns,
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
"AvailabilityZone" (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)
availabilityZone,
Key -> LocationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Location" (LocationProperty -> (Key, Value))
-> Maybe LocationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LocationProperty
location,
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 "AddOns" Disk where
type PropertyType "AddOns" Disk = [AddOnProperty]
set :: PropertyType "AddOns" Disk -> Disk -> Disk
set PropertyType "AddOns" Disk
newValue Disk {Maybe [Tag]
Maybe [AddOnProperty]
Maybe (Value Text)
Maybe LocationProperty
()
Value Integer
Value Text
haddock_workaround_ :: Disk -> ()
addOns :: Disk -> Maybe [AddOnProperty]
availabilityZone :: Disk -> Maybe (Value Text)
diskName :: Disk -> Value Text
location :: Disk -> Maybe LocationProperty
sizeInGb :: Disk -> Value Integer
tags :: Disk -> Maybe [Tag]
haddock_workaround_ :: ()
addOns :: Maybe [AddOnProperty]
availabilityZone :: Maybe (Value Text)
diskName :: Value Text
location :: Maybe LocationProperty
sizeInGb :: Value Integer
tags :: Maybe [Tag]
..} = Disk {addOns :: Maybe [AddOnProperty]
addOns = [AddOnProperty] -> Maybe [AddOnProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [AddOnProperty]
PropertyType "AddOns" Disk
newValue, Maybe [Tag]
Maybe (Value Text)
Maybe LocationProperty
()
Value Integer
Value Text
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
diskName :: Value Text
location :: Maybe LocationProperty
sizeInGb :: Value Integer
tags :: Maybe [Tag]
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
diskName :: Value Text
location :: Maybe LocationProperty
sizeInGb :: Value Integer
tags :: Maybe [Tag]
..}
instance Property "AvailabilityZone" Disk where
type PropertyType "AvailabilityZone" Disk = Value Prelude.Text
set :: PropertyType "AvailabilityZone" Disk -> Disk -> Disk
set PropertyType "AvailabilityZone" Disk
newValue Disk {Maybe [Tag]
Maybe [AddOnProperty]
Maybe (Value Text)
Maybe LocationProperty
()
Value Integer
Value Text
haddock_workaround_ :: Disk -> ()
addOns :: Disk -> Maybe [AddOnProperty]
availabilityZone :: Disk -> Maybe (Value Text)
diskName :: Disk -> Value Text
location :: Disk -> Maybe LocationProperty
sizeInGb :: Disk -> Value Integer
tags :: Disk -> Maybe [Tag]
haddock_workaround_ :: ()
addOns :: Maybe [AddOnProperty]
availabilityZone :: Maybe (Value Text)
diskName :: Value Text
location :: Maybe LocationProperty
sizeInGb :: Value Integer
tags :: Maybe [Tag]
..}
= Disk {availabilityZone :: Maybe (Value Text)
availabilityZone = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AvailabilityZone" Disk
Value Text
newValue, Maybe [Tag]
Maybe [AddOnProperty]
Maybe LocationProperty
()
Value Integer
Value Text
haddock_workaround_ :: ()
addOns :: Maybe [AddOnProperty]
diskName :: Value Text
location :: Maybe LocationProperty
sizeInGb :: Value Integer
tags :: Maybe [Tag]
haddock_workaround_ :: ()
addOns :: Maybe [AddOnProperty]
diskName :: Value Text
location :: Maybe LocationProperty
sizeInGb :: Value Integer
tags :: Maybe [Tag]
..}
instance Property "DiskName" Disk where
type PropertyType "DiskName" Disk = Value Prelude.Text
set :: PropertyType "DiskName" Disk -> Disk -> Disk
set PropertyType "DiskName" Disk
newValue Disk {Maybe [Tag]
Maybe [AddOnProperty]
Maybe (Value Text)
Maybe LocationProperty
()
Value Integer
Value Text
haddock_workaround_ :: Disk -> ()
addOns :: Disk -> Maybe [AddOnProperty]
availabilityZone :: Disk -> Maybe (Value Text)
diskName :: Disk -> Value Text
location :: Disk -> Maybe LocationProperty
sizeInGb :: Disk -> Value Integer
tags :: Disk -> Maybe [Tag]
haddock_workaround_ :: ()
addOns :: Maybe [AddOnProperty]
availabilityZone :: Maybe (Value Text)
diskName :: Value Text
location :: Maybe LocationProperty
sizeInGb :: Value Integer
tags :: Maybe [Tag]
..} = Disk {diskName :: Value Text
diskName = PropertyType "DiskName" Disk
Value Text
newValue, Maybe [Tag]
Maybe [AddOnProperty]
Maybe (Value Text)
Maybe LocationProperty
()
Value Integer
haddock_workaround_ :: ()
addOns :: Maybe [AddOnProperty]
availabilityZone :: Maybe (Value Text)
location :: Maybe LocationProperty
sizeInGb :: Value Integer
tags :: Maybe [Tag]
haddock_workaround_ :: ()
addOns :: Maybe [AddOnProperty]
availabilityZone :: Maybe (Value Text)
location :: Maybe LocationProperty
sizeInGb :: Value Integer
tags :: Maybe [Tag]
..}
instance Property "Location" Disk where
type PropertyType "Location" Disk = LocationProperty
set :: PropertyType "Location" Disk -> Disk -> Disk
set PropertyType "Location" Disk
newValue Disk {Maybe [Tag]
Maybe [AddOnProperty]
Maybe (Value Text)
Maybe LocationProperty
()
Value Integer
Value Text
haddock_workaround_ :: Disk -> ()
addOns :: Disk -> Maybe [AddOnProperty]
availabilityZone :: Disk -> Maybe (Value Text)
diskName :: Disk -> Value Text
location :: Disk -> Maybe LocationProperty
sizeInGb :: Disk -> Value Integer
tags :: Disk -> Maybe [Tag]
haddock_workaround_ :: ()
addOns :: Maybe [AddOnProperty]
availabilityZone :: Maybe (Value Text)
diskName :: Value Text
location :: Maybe LocationProperty
sizeInGb :: Value Integer
tags :: Maybe [Tag]
..}
= Disk {location :: Maybe LocationProperty
location = LocationProperty -> Maybe LocationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Location" Disk
LocationProperty
newValue, Maybe [Tag]
Maybe [AddOnProperty]
Maybe (Value Text)
()
Value Integer
Value Text
haddock_workaround_ :: ()
addOns :: Maybe [AddOnProperty]
availabilityZone :: Maybe (Value Text)
diskName :: Value Text
sizeInGb :: Value Integer
tags :: Maybe [Tag]
haddock_workaround_ :: ()
addOns :: Maybe [AddOnProperty]
availabilityZone :: Maybe (Value Text)
diskName :: Value Text
sizeInGb :: Value Integer
tags :: Maybe [Tag]
..}
instance Property "SizeInGb" Disk where
type PropertyType "SizeInGb" Disk = Value Prelude.Integer
set :: PropertyType "SizeInGb" Disk -> Disk -> Disk
set PropertyType "SizeInGb" Disk
newValue Disk {Maybe [Tag]
Maybe [AddOnProperty]
Maybe (Value Text)
Maybe LocationProperty
()
Value Integer
Value Text
haddock_workaround_ :: Disk -> ()
addOns :: Disk -> Maybe [AddOnProperty]
availabilityZone :: Disk -> Maybe (Value Text)
diskName :: Disk -> Value Text
location :: Disk -> Maybe LocationProperty
sizeInGb :: Disk -> Value Integer
tags :: Disk -> Maybe [Tag]
haddock_workaround_ :: ()
addOns :: Maybe [AddOnProperty]
availabilityZone :: Maybe (Value Text)
diskName :: Value Text
location :: Maybe LocationProperty
sizeInGb :: Value Integer
tags :: Maybe [Tag]
..} = Disk {sizeInGb :: Value Integer
sizeInGb = PropertyType "SizeInGb" Disk
Value Integer
newValue, Maybe [Tag]
Maybe [AddOnProperty]
Maybe (Value Text)
Maybe LocationProperty
()
Value Text
haddock_workaround_ :: ()
addOns :: Maybe [AddOnProperty]
availabilityZone :: Maybe (Value Text)
diskName :: Value Text
location :: Maybe LocationProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
addOns :: Maybe [AddOnProperty]
availabilityZone :: Maybe (Value Text)
diskName :: Value Text
location :: Maybe LocationProperty
tags :: Maybe [Tag]
..}
instance Property "Tags" Disk where
type PropertyType "Tags" Disk = [Tag]
set :: PropertyType "Tags" Disk -> Disk -> Disk
set PropertyType "Tags" Disk
newValue Disk {Maybe [Tag]
Maybe [AddOnProperty]
Maybe (Value Text)
Maybe LocationProperty
()
Value Integer
Value Text
haddock_workaround_ :: Disk -> ()
addOns :: Disk -> Maybe [AddOnProperty]
availabilityZone :: Disk -> Maybe (Value Text)
diskName :: Disk -> Value Text
location :: Disk -> Maybe LocationProperty
sizeInGb :: Disk -> Value Integer
tags :: Disk -> Maybe [Tag]
haddock_workaround_ :: ()
addOns :: Maybe [AddOnProperty]
availabilityZone :: Maybe (Value Text)
diskName :: Value Text
location :: Maybe LocationProperty
sizeInGb :: Value Integer
tags :: Maybe [Tag]
..} = Disk {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" Disk
newValue, Maybe [AddOnProperty]
Maybe (Value Text)
Maybe LocationProperty
()
Value Integer
Value Text
haddock_workaround_ :: ()
addOns :: Maybe [AddOnProperty]
availabilityZone :: Maybe (Value Text)
diskName :: Value Text
location :: Maybe LocationProperty
sizeInGb :: Value Integer
haddock_workaround_ :: ()
addOns :: Maybe [AddOnProperty]
availabilityZone :: Maybe (Value Text)
diskName :: Value Text
location :: Maybe LocationProperty
sizeInGb :: Value Integer
..}