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