module Stratosphere.WorkspacesInstances.WorkspaceInstance.CpuOptionsRequestProperty (
        CpuOptionsRequestProperty(..), mkCpuOptionsRequestProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CpuOptionsRequestProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-workspacesinstances-workspaceinstance-cpuoptionsrequest.html>
    CpuOptionsRequestProperty {CpuOptionsRequestProperty -> ()
haddock_workaround_ :: (),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-workspacesinstances-workspaceinstance-cpuoptionsrequest.html#cfn-workspacesinstances-workspaceinstance-cpuoptionsrequest-corecount>
                               CpuOptionsRequestProperty -> Maybe (Value Integer)
coreCount :: (Prelude.Maybe (Value Prelude.Integer)),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-workspacesinstances-workspaceinstance-cpuoptionsrequest.html#cfn-workspacesinstances-workspaceinstance-cpuoptionsrequest-threadspercore>
                               CpuOptionsRequestProperty -> Maybe (Value Integer)
threadsPerCore :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (CpuOptionsRequestProperty -> CpuOptionsRequestProperty -> Bool
(CpuOptionsRequestProperty -> CpuOptionsRequestProperty -> Bool)
-> (CpuOptionsRequestProperty -> CpuOptionsRequestProperty -> Bool)
-> Eq CpuOptionsRequestProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CpuOptionsRequestProperty -> CpuOptionsRequestProperty -> Bool
== :: CpuOptionsRequestProperty -> CpuOptionsRequestProperty -> Bool
$c/= :: CpuOptionsRequestProperty -> CpuOptionsRequestProperty -> Bool
/= :: CpuOptionsRequestProperty -> CpuOptionsRequestProperty -> Bool
Prelude.Eq, Int -> CpuOptionsRequestProperty -> ShowS
[CpuOptionsRequestProperty] -> ShowS
CpuOptionsRequestProperty -> String
(Int -> CpuOptionsRequestProperty -> ShowS)
-> (CpuOptionsRequestProperty -> String)
-> ([CpuOptionsRequestProperty] -> ShowS)
-> Show CpuOptionsRequestProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CpuOptionsRequestProperty -> ShowS
showsPrec :: Int -> CpuOptionsRequestProperty -> ShowS
$cshow :: CpuOptionsRequestProperty -> String
show :: CpuOptionsRequestProperty -> String
$cshowList :: [CpuOptionsRequestProperty] -> ShowS
showList :: [CpuOptionsRequestProperty] -> ShowS
Prelude.Show)
mkCpuOptionsRequestProperty :: CpuOptionsRequestProperty
mkCpuOptionsRequestProperty :: CpuOptionsRequestProperty
mkCpuOptionsRequestProperty
  = CpuOptionsRequestProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), coreCount :: Maybe (Value Integer)
coreCount = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       threadsPerCore :: Maybe (Value Integer)
threadsPerCore = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CpuOptionsRequestProperty where
  toResourceProperties :: CpuOptionsRequestProperty -> ResourceProperties
toResourceProperties CpuOptionsRequestProperty {Maybe (Value Integer)
()
haddock_workaround_ :: CpuOptionsRequestProperty -> ()
coreCount :: CpuOptionsRequestProperty -> Maybe (Value Integer)
threadsPerCore :: CpuOptionsRequestProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
coreCount :: Maybe (Value Integer)
threadsPerCore :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::WorkspacesInstances::WorkspaceInstance.CpuOptionsRequest",
         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 Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CoreCount" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
coreCount,
                            Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ThreadsPerCore" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
threadsPerCore])}
instance JSON.ToJSON CpuOptionsRequestProperty where
  toJSON :: CpuOptionsRequestProperty -> Value
toJSON CpuOptionsRequestProperty {Maybe (Value Integer)
()
haddock_workaround_ :: CpuOptionsRequestProperty -> ()
coreCount :: CpuOptionsRequestProperty -> Maybe (Value Integer)
threadsPerCore :: CpuOptionsRequestProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
coreCount :: Maybe (Value Integer)
threadsPerCore :: Maybe (Value Integer)
..}
    = [(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 Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CoreCount" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
coreCount,
               Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ThreadsPerCore" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
threadsPerCore]))
instance Property "CoreCount" CpuOptionsRequestProperty where
  type PropertyType "CoreCount" CpuOptionsRequestProperty = Value Prelude.Integer
  set :: PropertyType "CoreCount" CpuOptionsRequestProperty
-> CpuOptionsRequestProperty -> CpuOptionsRequestProperty
set PropertyType "CoreCount" CpuOptionsRequestProperty
newValue CpuOptionsRequestProperty {Maybe (Value Integer)
()
haddock_workaround_ :: CpuOptionsRequestProperty -> ()
coreCount :: CpuOptionsRequestProperty -> Maybe (Value Integer)
threadsPerCore :: CpuOptionsRequestProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
coreCount :: Maybe (Value Integer)
threadsPerCore :: Maybe (Value Integer)
..}
    = CpuOptionsRequestProperty {coreCount :: Maybe (Value Integer)
coreCount = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CoreCount" CpuOptionsRequestProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
threadsPerCore :: Maybe (Value Integer)
haddock_workaround_ :: ()
threadsPerCore :: Maybe (Value Integer)
..}
instance Property "ThreadsPerCore" CpuOptionsRequestProperty where
  type PropertyType "ThreadsPerCore" CpuOptionsRequestProperty = Value Prelude.Integer
  set :: PropertyType "ThreadsPerCore" CpuOptionsRequestProperty
-> CpuOptionsRequestProperty -> CpuOptionsRequestProperty
set PropertyType "ThreadsPerCore" CpuOptionsRequestProperty
newValue CpuOptionsRequestProperty {Maybe (Value Integer)
()
haddock_workaround_ :: CpuOptionsRequestProperty -> ()
coreCount :: CpuOptionsRequestProperty -> Maybe (Value Integer)
threadsPerCore :: CpuOptionsRequestProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
coreCount :: Maybe (Value Integer)
threadsPerCore :: Maybe (Value Integer)
..}
    = CpuOptionsRequestProperty
        {threadsPerCore :: Maybe (Value Integer)
threadsPerCore = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ThreadsPerCore" CpuOptionsRequestProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
coreCount :: Maybe (Value Integer)
haddock_workaround_ :: ()
coreCount :: Maybe (Value Integer)
..}