module Stratosphere.AppStream.Fleet.ComputeCapacityProperty (
ComputeCapacityProperty(..), mkComputeCapacityProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ComputeCapacityProperty
=
ComputeCapacityProperty {ComputeCapacityProperty -> ()
haddock_workaround_ :: (),
ComputeCapacityProperty -> Maybe (Value Integer)
desiredInstances :: (Prelude.Maybe (Value Prelude.Integer)),
ComputeCapacityProperty -> Maybe (Value Integer)
desiredSessions :: (Prelude.Maybe (Value Prelude.Integer))}
deriving stock (ComputeCapacityProperty -> ComputeCapacityProperty -> Bool
(ComputeCapacityProperty -> ComputeCapacityProperty -> Bool)
-> (ComputeCapacityProperty -> ComputeCapacityProperty -> Bool)
-> Eq ComputeCapacityProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ComputeCapacityProperty -> ComputeCapacityProperty -> Bool
== :: ComputeCapacityProperty -> ComputeCapacityProperty -> Bool
$c/= :: ComputeCapacityProperty -> ComputeCapacityProperty -> Bool
/= :: ComputeCapacityProperty -> ComputeCapacityProperty -> Bool
Prelude.Eq, Int -> ComputeCapacityProperty -> ShowS
[ComputeCapacityProperty] -> ShowS
ComputeCapacityProperty -> String
(Int -> ComputeCapacityProperty -> ShowS)
-> (ComputeCapacityProperty -> String)
-> ([ComputeCapacityProperty] -> ShowS)
-> Show ComputeCapacityProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ComputeCapacityProperty -> ShowS
showsPrec :: Int -> ComputeCapacityProperty -> ShowS
$cshow :: ComputeCapacityProperty -> String
show :: ComputeCapacityProperty -> String
$cshowList :: [ComputeCapacityProperty] -> ShowS
showList :: [ComputeCapacityProperty] -> ShowS
Prelude.Show)
mkComputeCapacityProperty :: ComputeCapacityProperty
mkComputeCapacityProperty :: ComputeCapacityProperty
mkComputeCapacityProperty
= ComputeCapacityProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), desiredInstances :: Maybe (Value Integer)
desiredInstances = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
desiredSessions :: Maybe (Value Integer)
desiredSessions = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ComputeCapacityProperty where
toResourceProperties :: ComputeCapacityProperty -> ResourceProperties
toResourceProperties ComputeCapacityProperty {Maybe (Value Integer)
()
haddock_workaround_ :: ComputeCapacityProperty -> ()
desiredInstances :: ComputeCapacityProperty -> Maybe (Value Integer)
desiredSessions :: ComputeCapacityProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
desiredInstances :: Maybe (Value Integer)
desiredSessions :: Maybe (Value Integer)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::AppStream::Fleet.ComputeCapacity",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[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..=) Key
"DesiredInstances" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
desiredInstances,
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..=) Key
"DesiredSessions" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
desiredSessions])}
instance JSON.ToJSON ComputeCapacityProperty where
toJSON :: ComputeCapacityProperty -> Value
toJSON ComputeCapacityProperty {Maybe (Value Integer)
()
haddock_workaround_ :: ComputeCapacityProperty -> ()
desiredInstances :: ComputeCapacityProperty -> Maybe (Value Integer)
desiredSessions :: ComputeCapacityProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
desiredInstances :: Maybe (Value Integer)
desiredSessions :: Maybe (Value Integer)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[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..=) Key
"DesiredInstances" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
desiredInstances,
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..=) Key
"DesiredSessions" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
desiredSessions]))
instance Property "DesiredInstances" ComputeCapacityProperty where
type PropertyType "DesiredInstances" ComputeCapacityProperty = Value Prelude.Integer
set :: PropertyType "DesiredInstances" ComputeCapacityProperty
-> ComputeCapacityProperty -> ComputeCapacityProperty
set PropertyType "DesiredInstances" ComputeCapacityProperty
newValue ComputeCapacityProperty {Maybe (Value Integer)
()
haddock_workaround_ :: ComputeCapacityProperty -> ()
desiredInstances :: ComputeCapacityProperty -> Maybe (Value Integer)
desiredSessions :: ComputeCapacityProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
desiredInstances :: Maybe (Value Integer)
desiredSessions :: Maybe (Value Integer)
..}
= ComputeCapacityProperty
{desiredInstances :: Maybe (Value Integer)
desiredInstances = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DesiredInstances" ComputeCapacityProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
desiredSessions :: Maybe (Value Integer)
haddock_workaround_ :: ()
desiredSessions :: Maybe (Value Integer)
..}
instance Property "DesiredSessions" ComputeCapacityProperty where
type PropertyType "DesiredSessions" ComputeCapacityProperty = Value Prelude.Integer
set :: PropertyType "DesiredSessions" ComputeCapacityProperty
-> ComputeCapacityProperty -> ComputeCapacityProperty
set PropertyType "DesiredSessions" ComputeCapacityProperty
newValue ComputeCapacityProperty {Maybe (Value Integer)
()
haddock_workaround_ :: ComputeCapacityProperty -> ()
desiredInstances :: ComputeCapacityProperty -> Maybe (Value Integer)
desiredSessions :: ComputeCapacityProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
desiredInstances :: Maybe (Value Integer)
desiredSessions :: Maybe (Value Integer)
..}
= ComputeCapacityProperty
{desiredSessions :: Maybe (Value Integer)
desiredSessions = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DesiredSessions" ComputeCapacityProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
desiredInstances :: Maybe (Value Integer)
haddock_workaround_ :: ()
desiredInstances :: Maybe (Value Integer)
..}