{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.EC2.Types.CpuOptionsRequest where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Internal
import qualified Amazonka.Prelude as Prelude
data CpuOptionsRequest = CpuOptionsRequest'
{
CpuOptionsRequest -> Maybe Int
coreCount :: Prelude.Maybe Prelude.Int,
CpuOptionsRequest -> Maybe Int
threadsPerCore :: Prelude.Maybe Prelude.Int
}
deriving (CpuOptionsRequest -> CpuOptionsRequest -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CpuOptionsRequest -> CpuOptionsRequest -> Bool
$c/= :: CpuOptionsRequest -> CpuOptionsRequest -> Bool
== :: CpuOptionsRequest -> CpuOptionsRequest -> Bool
$c== :: CpuOptionsRequest -> CpuOptionsRequest -> Bool
Prelude.Eq, ReadPrec [CpuOptionsRequest]
ReadPrec CpuOptionsRequest
Int -> ReadS CpuOptionsRequest
ReadS [CpuOptionsRequest]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CpuOptionsRequest]
$creadListPrec :: ReadPrec [CpuOptionsRequest]
readPrec :: ReadPrec CpuOptionsRequest
$creadPrec :: ReadPrec CpuOptionsRequest
readList :: ReadS [CpuOptionsRequest]
$creadList :: ReadS [CpuOptionsRequest]
readsPrec :: Int -> ReadS CpuOptionsRequest
$creadsPrec :: Int -> ReadS CpuOptionsRequest
Prelude.Read, Int -> CpuOptionsRequest -> ShowS
[CpuOptionsRequest] -> ShowS
CpuOptionsRequest -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CpuOptionsRequest] -> ShowS
$cshowList :: [CpuOptionsRequest] -> ShowS
show :: CpuOptionsRequest -> String
$cshow :: CpuOptionsRequest -> String
showsPrec :: Int -> CpuOptionsRequest -> ShowS
$cshowsPrec :: Int -> CpuOptionsRequest -> ShowS
Prelude.Show, forall x. Rep CpuOptionsRequest x -> CpuOptionsRequest
forall x. CpuOptionsRequest -> Rep CpuOptionsRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CpuOptionsRequest x -> CpuOptionsRequest
$cfrom :: forall x. CpuOptionsRequest -> Rep CpuOptionsRequest x
Prelude.Generic)
newCpuOptionsRequest ::
CpuOptionsRequest
newCpuOptionsRequest :: CpuOptionsRequest
newCpuOptionsRequest =
CpuOptionsRequest'
{ $sel:coreCount:CpuOptionsRequest' :: Maybe Int
coreCount = forall a. Maybe a
Prelude.Nothing,
$sel:threadsPerCore:CpuOptionsRequest' :: Maybe Int
threadsPerCore = forall a. Maybe a
Prelude.Nothing
}
cpuOptionsRequest_coreCount :: Lens.Lens' CpuOptionsRequest (Prelude.Maybe Prelude.Int)
cpuOptionsRequest_coreCount :: Lens' CpuOptionsRequest (Maybe Int)
cpuOptionsRequest_coreCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CpuOptionsRequest' {Maybe Int
coreCount :: Maybe Int
$sel:coreCount:CpuOptionsRequest' :: CpuOptionsRequest -> Maybe Int
coreCount} -> Maybe Int
coreCount) (\s :: CpuOptionsRequest
s@CpuOptionsRequest' {} Maybe Int
a -> CpuOptionsRequest
s {$sel:coreCount:CpuOptionsRequest' :: Maybe Int
coreCount = Maybe Int
a} :: CpuOptionsRequest)
cpuOptionsRequest_threadsPerCore :: Lens.Lens' CpuOptionsRequest (Prelude.Maybe Prelude.Int)
cpuOptionsRequest_threadsPerCore :: Lens' CpuOptionsRequest (Maybe Int)
cpuOptionsRequest_threadsPerCore = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CpuOptionsRequest' {Maybe Int
threadsPerCore :: Maybe Int
$sel:threadsPerCore:CpuOptionsRequest' :: CpuOptionsRequest -> Maybe Int
threadsPerCore} -> Maybe Int
threadsPerCore) (\s :: CpuOptionsRequest
s@CpuOptionsRequest' {} Maybe Int
a -> CpuOptionsRequest
s {$sel:threadsPerCore:CpuOptionsRequest' :: Maybe Int
threadsPerCore = Maybe Int
a} :: CpuOptionsRequest)
instance Prelude.Hashable CpuOptionsRequest where
hashWithSalt :: Int -> CpuOptionsRequest -> Int
hashWithSalt Int
_salt CpuOptionsRequest' {Maybe Int
threadsPerCore :: Maybe Int
coreCount :: Maybe Int
$sel:threadsPerCore:CpuOptionsRequest' :: CpuOptionsRequest -> Maybe Int
$sel:coreCount:CpuOptionsRequest' :: CpuOptionsRequest -> Maybe Int
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
coreCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
threadsPerCore
instance Prelude.NFData CpuOptionsRequest where
rnf :: CpuOptionsRequest -> ()
rnf CpuOptionsRequest' {Maybe Int
threadsPerCore :: Maybe Int
coreCount :: Maybe Int
$sel:threadsPerCore:CpuOptionsRequest' :: CpuOptionsRequest -> Maybe Int
$sel:coreCount:CpuOptionsRequest' :: CpuOptionsRequest -> Maybe Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
coreCount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
threadsPerCore
instance Data.ToQuery CpuOptionsRequest where
toQuery :: CpuOptionsRequest -> QueryString
toQuery CpuOptionsRequest' {Maybe Int
threadsPerCore :: Maybe Int
coreCount :: Maybe Int
$sel:threadsPerCore:CpuOptionsRequest' :: CpuOptionsRequest -> Maybe Int
$sel:coreCount:CpuOptionsRequest' :: CpuOptionsRequest -> Maybe Int
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"CoreCount" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
coreCount,
ByteString
"ThreadsPerCore" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
threadsPerCore
]