module Stratosphere.EC2.LaunchTemplate.BaselinePerformanceFactorsProperty (
        module Exports, BaselinePerformanceFactorsProperty(..),
        mkBaselinePerformanceFactorsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.EC2.LaunchTemplate.CpuProperty as Exports
import Stratosphere.ResourceProperties
data BaselinePerformanceFactorsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-baselineperformancefactors.html>
    BaselinePerformanceFactorsProperty {BaselinePerformanceFactorsProperty -> ()
haddock_workaround_ :: (),
                                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-baselineperformancefactors.html#cfn-ec2-launchtemplate-baselineperformancefactors-cpu>
                                        BaselinePerformanceFactorsProperty -> Maybe CpuProperty
cpu :: (Prelude.Maybe CpuProperty)}
  deriving stock (BaselinePerformanceFactorsProperty
-> BaselinePerformanceFactorsProperty -> Bool
(BaselinePerformanceFactorsProperty
 -> BaselinePerformanceFactorsProperty -> Bool)
-> (BaselinePerformanceFactorsProperty
    -> BaselinePerformanceFactorsProperty -> Bool)
-> Eq BaselinePerformanceFactorsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BaselinePerformanceFactorsProperty
-> BaselinePerformanceFactorsProperty -> Bool
== :: BaselinePerformanceFactorsProperty
-> BaselinePerformanceFactorsProperty -> Bool
$c/= :: BaselinePerformanceFactorsProperty
-> BaselinePerformanceFactorsProperty -> Bool
/= :: BaselinePerformanceFactorsProperty
-> BaselinePerformanceFactorsProperty -> Bool
Prelude.Eq, Int -> BaselinePerformanceFactorsProperty -> ShowS
[BaselinePerformanceFactorsProperty] -> ShowS
BaselinePerformanceFactorsProperty -> String
(Int -> BaselinePerformanceFactorsProperty -> ShowS)
-> (BaselinePerformanceFactorsProperty -> String)
-> ([BaselinePerformanceFactorsProperty] -> ShowS)
-> Show BaselinePerformanceFactorsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BaselinePerformanceFactorsProperty -> ShowS
showsPrec :: Int -> BaselinePerformanceFactorsProperty -> ShowS
$cshow :: BaselinePerformanceFactorsProperty -> String
show :: BaselinePerformanceFactorsProperty -> String
$cshowList :: [BaselinePerformanceFactorsProperty] -> ShowS
showList :: [BaselinePerformanceFactorsProperty] -> ShowS
Prelude.Show)
mkBaselinePerformanceFactorsProperty ::
  BaselinePerformanceFactorsProperty
mkBaselinePerformanceFactorsProperty :: BaselinePerformanceFactorsProperty
mkBaselinePerformanceFactorsProperty
  = BaselinePerformanceFactorsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), cpu :: Maybe CpuProperty
cpu = Maybe CpuProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties BaselinePerformanceFactorsProperty where
  toResourceProperties :: BaselinePerformanceFactorsProperty -> ResourceProperties
toResourceProperties BaselinePerformanceFactorsProperty {Maybe CpuProperty
()
haddock_workaround_ :: BaselinePerformanceFactorsProperty -> ()
cpu :: BaselinePerformanceFactorsProperty -> Maybe CpuProperty
haddock_workaround_ :: ()
cpu :: Maybe CpuProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EC2::LaunchTemplate.BaselinePerformanceFactors",
         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 -> CpuProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Cpu" (CpuProperty -> (Key, Value))
-> Maybe CpuProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CpuProperty
cpu])}
instance JSON.ToJSON BaselinePerformanceFactorsProperty where
  toJSON :: BaselinePerformanceFactorsProperty -> Value
toJSON BaselinePerformanceFactorsProperty {Maybe CpuProperty
()
haddock_workaround_ :: BaselinePerformanceFactorsProperty -> ()
cpu :: BaselinePerformanceFactorsProperty -> Maybe CpuProperty
haddock_workaround_ :: ()
cpu :: Maybe CpuProperty
..}
    = [(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 -> CpuProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Cpu" (CpuProperty -> (Key, Value))
-> Maybe CpuProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CpuProperty
cpu]))
instance Property "Cpu" BaselinePerformanceFactorsProperty where
  type PropertyType "Cpu" BaselinePerformanceFactorsProperty = CpuProperty
  set :: PropertyType "Cpu" BaselinePerformanceFactorsProperty
-> BaselinePerformanceFactorsProperty
-> BaselinePerformanceFactorsProperty
set PropertyType "Cpu" BaselinePerformanceFactorsProperty
newValue BaselinePerformanceFactorsProperty {Maybe CpuProperty
()
haddock_workaround_ :: BaselinePerformanceFactorsProperty -> ()
cpu :: BaselinePerformanceFactorsProperty -> Maybe CpuProperty
haddock_workaround_ :: ()
cpu :: Maybe CpuProperty
..}
    = BaselinePerformanceFactorsProperty
        {cpu :: Maybe CpuProperty
cpu = CpuProperty -> Maybe CpuProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Cpu" BaselinePerformanceFactorsProperty
CpuProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}