module Stratosphere.EC2.LaunchTemplate.CpuProperty (
module Exports, CpuProperty(..), mkCpuProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.EC2.LaunchTemplate.ReferenceProperty as Exports
import Stratosphere.ResourceProperties
data CpuProperty
=
CpuProperty {CpuProperty -> ()
haddock_workaround_ :: (),
CpuProperty -> Maybe [ReferenceProperty]
references :: (Prelude.Maybe [ReferenceProperty])}
deriving stock (CpuProperty -> CpuProperty -> Bool
(CpuProperty -> CpuProperty -> Bool)
-> (CpuProperty -> CpuProperty -> Bool) -> Eq CpuProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CpuProperty -> CpuProperty -> Bool
== :: CpuProperty -> CpuProperty -> Bool
$c/= :: CpuProperty -> CpuProperty -> Bool
/= :: CpuProperty -> CpuProperty -> Bool
Prelude.Eq, Int -> CpuProperty -> ShowS
[CpuProperty] -> ShowS
CpuProperty -> String
(Int -> CpuProperty -> ShowS)
-> (CpuProperty -> String)
-> ([CpuProperty] -> ShowS)
-> Show CpuProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CpuProperty -> ShowS
showsPrec :: Int -> CpuProperty -> ShowS
$cshow :: CpuProperty -> String
show :: CpuProperty -> String
$cshowList :: [CpuProperty] -> ShowS
showList :: [CpuProperty] -> ShowS
Prelude.Show)
mkCpuProperty :: CpuProperty
mkCpuProperty :: CpuProperty
mkCpuProperty
= CpuProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), references :: Maybe [ReferenceProperty]
references = Maybe [ReferenceProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CpuProperty where
toResourceProperties :: CpuProperty -> ResourceProperties
toResourceProperties CpuProperty {Maybe [ReferenceProperty]
()
haddock_workaround_ :: CpuProperty -> ()
references :: CpuProperty -> Maybe [ReferenceProperty]
haddock_workaround_ :: ()
references :: Maybe [ReferenceProperty]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::EC2::LaunchTemplate.Cpu",
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 -> [ReferenceProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"References" ([ReferenceProperty] -> (Key, Value))
-> Maybe [ReferenceProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ReferenceProperty]
references])}
instance JSON.ToJSON CpuProperty where
toJSON :: CpuProperty -> Value
toJSON CpuProperty {Maybe [ReferenceProperty]
()
haddock_workaround_ :: CpuProperty -> ()
references :: CpuProperty -> Maybe [ReferenceProperty]
haddock_workaround_ :: ()
references :: Maybe [ReferenceProperty]
..}
= [(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 -> [ReferenceProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"References" ([ReferenceProperty] -> (Key, Value))
-> Maybe [ReferenceProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ReferenceProperty]
references]))
instance Property "References" CpuProperty where
type PropertyType "References" CpuProperty = [ReferenceProperty]
set :: PropertyType "References" CpuProperty -> CpuProperty -> CpuProperty
set PropertyType "References" CpuProperty
newValue CpuProperty {Maybe [ReferenceProperty]
()
haddock_workaround_ :: CpuProperty -> ()
references :: CpuProperty -> Maybe [ReferenceProperty]
haddock_workaround_ :: ()
references :: Maybe [ReferenceProperty]
..}
= CpuProperty {references :: Maybe [ReferenceProperty]
references = [ReferenceProperty] -> Maybe [ReferenceProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [ReferenceProperty]
PropertyType "References" CpuProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}