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