module Stratosphere.EC2.Instance.CreditSpecificationProperty (
CreditSpecificationProperty(..), mkCreditSpecificationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CreditSpecificationProperty
=
CreditSpecificationProperty {CreditSpecificationProperty -> ()
haddock_workaround_ :: (),
CreditSpecificationProperty -> Maybe (Value Text)
cPUCredits :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (CreditSpecificationProperty -> CreditSpecificationProperty -> Bool
(CreditSpecificationProperty
-> CreditSpecificationProperty -> Bool)
-> (CreditSpecificationProperty
-> CreditSpecificationProperty -> Bool)
-> Eq CreditSpecificationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CreditSpecificationProperty -> CreditSpecificationProperty -> Bool
== :: CreditSpecificationProperty -> CreditSpecificationProperty -> Bool
$c/= :: CreditSpecificationProperty -> CreditSpecificationProperty -> Bool
/= :: CreditSpecificationProperty -> CreditSpecificationProperty -> Bool
Prelude.Eq, Int -> CreditSpecificationProperty -> ShowS
[CreditSpecificationProperty] -> ShowS
CreditSpecificationProperty -> String
(Int -> CreditSpecificationProperty -> ShowS)
-> (CreditSpecificationProperty -> String)
-> ([CreditSpecificationProperty] -> ShowS)
-> Show CreditSpecificationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CreditSpecificationProperty -> ShowS
showsPrec :: Int -> CreditSpecificationProperty -> ShowS
$cshow :: CreditSpecificationProperty -> String
show :: CreditSpecificationProperty -> String
$cshowList :: [CreditSpecificationProperty] -> ShowS
showList :: [CreditSpecificationProperty] -> ShowS
Prelude.Show)
mkCreditSpecificationProperty :: CreditSpecificationProperty
mkCreditSpecificationProperty :: CreditSpecificationProperty
mkCreditSpecificationProperty
= CreditSpecificationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), cPUCredits :: Maybe (Value Text)
cPUCredits = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CreditSpecificationProperty where
toResourceProperties :: CreditSpecificationProperty -> ResourceProperties
toResourceProperties CreditSpecificationProperty {Maybe (Value Text)
()
haddock_workaround_ :: CreditSpecificationProperty -> ()
cPUCredits :: CreditSpecificationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cPUCredits :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::EC2::Instance.CreditSpecification",
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 CreditSpecificationProperty where
toJSON :: CreditSpecificationProperty -> Value
toJSON CreditSpecificationProperty {Maybe (Value Text)
()
haddock_workaround_ :: CreditSpecificationProperty -> ()
cPUCredits :: CreditSpecificationProperty -> 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" CreditSpecificationProperty where
type PropertyType "CPUCredits" CreditSpecificationProperty = Value Prelude.Text
set :: PropertyType "CPUCredits" CreditSpecificationProperty
-> CreditSpecificationProperty -> CreditSpecificationProperty
set PropertyType "CPUCredits" CreditSpecificationProperty
newValue CreditSpecificationProperty {Maybe (Value Text)
()
haddock_workaround_ :: CreditSpecificationProperty -> ()
cPUCredits :: CreditSpecificationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cPUCredits :: Maybe (Value Text)
..}
= CreditSpecificationProperty
{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" CreditSpecificationProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}