{-# 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.RobOMaker.Types.ComputeResponse where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.RobOMaker.Types.ComputeType
data ComputeResponse = ComputeResponse'
{
ComputeResponse -> Maybe ComputeType
computeType :: Prelude.Maybe ComputeType,
ComputeResponse -> Maybe Natural
gpuUnitLimit :: Prelude.Maybe Prelude.Natural,
ComputeResponse -> Maybe Natural
simulationUnitLimit :: Prelude.Maybe Prelude.Natural
}
deriving (ComputeResponse -> ComputeResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ComputeResponse -> ComputeResponse -> Bool
$c/= :: ComputeResponse -> ComputeResponse -> Bool
== :: ComputeResponse -> ComputeResponse -> Bool
$c== :: ComputeResponse -> ComputeResponse -> Bool
Prelude.Eq, ReadPrec [ComputeResponse]
ReadPrec ComputeResponse
Int -> ReadS ComputeResponse
ReadS [ComputeResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ComputeResponse]
$creadListPrec :: ReadPrec [ComputeResponse]
readPrec :: ReadPrec ComputeResponse
$creadPrec :: ReadPrec ComputeResponse
readList :: ReadS [ComputeResponse]
$creadList :: ReadS [ComputeResponse]
readsPrec :: Int -> ReadS ComputeResponse
$creadsPrec :: Int -> ReadS ComputeResponse
Prelude.Read, Int -> ComputeResponse -> ShowS
[ComputeResponse] -> ShowS
ComputeResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ComputeResponse] -> ShowS
$cshowList :: [ComputeResponse] -> ShowS
show :: ComputeResponse -> String
$cshow :: ComputeResponse -> String
showsPrec :: Int -> ComputeResponse -> ShowS
$cshowsPrec :: Int -> ComputeResponse -> ShowS
Prelude.Show, forall x. Rep ComputeResponse x -> ComputeResponse
forall x. ComputeResponse -> Rep ComputeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ComputeResponse x -> ComputeResponse
$cfrom :: forall x. ComputeResponse -> Rep ComputeResponse x
Prelude.Generic)
newComputeResponse ::
ComputeResponse
newComputeResponse :: ComputeResponse
newComputeResponse =
ComputeResponse'
{ $sel:computeType:ComputeResponse' :: Maybe ComputeType
computeType = forall a. Maybe a
Prelude.Nothing,
$sel:gpuUnitLimit:ComputeResponse' :: Maybe Natural
gpuUnitLimit = forall a. Maybe a
Prelude.Nothing,
$sel:simulationUnitLimit:ComputeResponse' :: Maybe Natural
simulationUnitLimit = forall a. Maybe a
Prelude.Nothing
}
computeResponse_computeType :: Lens.Lens' ComputeResponse (Prelude.Maybe ComputeType)
computeResponse_computeType :: Lens' ComputeResponse (Maybe ComputeType)
computeResponse_computeType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComputeResponse' {Maybe ComputeType
computeType :: Maybe ComputeType
$sel:computeType:ComputeResponse' :: ComputeResponse -> Maybe ComputeType
computeType} -> Maybe ComputeType
computeType) (\s :: ComputeResponse
s@ComputeResponse' {} Maybe ComputeType
a -> ComputeResponse
s {$sel:computeType:ComputeResponse' :: Maybe ComputeType
computeType = Maybe ComputeType
a} :: ComputeResponse)
computeResponse_gpuUnitLimit :: Lens.Lens' ComputeResponse (Prelude.Maybe Prelude.Natural)
computeResponse_gpuUnitLimit :: Lens' ComputeResponse (Maybe Natural)
computeResponse_gpuUnitLimit = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComputeResponse' {Maybe Natural
gpuUnitLimit :: Maybe Natural
$sel:gpuUnitLimit:ComputeResponse' :: ComputeResponse -> Maybe Natural
gpuUnitLimit} -> Maybe Natural
gpuUnitLimit) (\s :: ComputeResponse
s@ComputeResponse' {} Maybe Natural
a -> ComputeResponse
s {$sel:gpuUnitLimit:ComputeResponse' :: Maybe Natural
gpuUnitLimit = Maybe Natural
a} :: ComputeResponse)
computeResponse_simulationUnitLimit :: Lens.Lens' ComputeResponse (Prelude.Maybe Prelude.Natural)
computeResponse_simulationUnitLimit :: Lens' ComputeResponse (Maybe Natural)
computeResponse_simulationUnitLimit = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComputeResponse' {Maybe Natural
simulationUnitLimit :: Maybe Natural
$sel:simulationUnitLimit:ComputeResponse' :: ComputeResponse -> Maybe Natural
simulationUnitLimit} -> Maybe Natural
simulationUnitLimit) (\s :: ComputeResponse
s@ComputeResponse' {} Maybe Natural
a -> ComputeResponse
s {$sel:simulationUnitLimit:ComputeResponse' :: Maybe Natural
simulationUnitLimit = Maybe Natural
a} :: ComputeResponse)
instance Data.FromJSON ComputeResponse where
parseJSON :: Value -> Parser ComputeResponse
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ComputeResponse"
( \Object
x ->
Maybe ComputeType
-> Maybe Natural -> Maybe Natural -> ComputeResponse
ComputeResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"computeType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"gpuUnitLimit")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"simulationUnitLimit")
)
instance Prelude.Hashable ComputeResponse where
hashWithSalt :: Int -> ComputeResponse -> Int
hashWithSalt Int
_salt ComputeResponse' {Maybe Natural
Maybe ComputeType
simulationUnitLimit :: Maybe Natural
gpuUnitLimit :: Maybe Natural
computeType :: Maybe ComputeType
$sel:simulationUnitLimit:ComputeResponse' :: ComputeResponse -> Maybe Natural
$sel:gpuUnitLimit:ComputeResponse' :: ComputeResponse -> Maybe Natural
$sel:computeType:ComputeResponse' :: ComputeResponse -> Maybe ComputeType
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ComputeType
computeType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
gpuUnitLimit
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
simulationUnitLimit
instance Prelude.NFData ComputeResponse where
rnf :: ComputeResponse -> ()
rnf ComputeResponse' {Maybe Natural
Maybe ComputeType
simulationUnitLimit :: Maybe Natural
gpuUnitLimit :: Maybe Natural
computeType :: Maybe ComputeType
$sel:simulationUnitLimit:ComputeResponse' :: ComputeResponse -> Maybe Natural
$sel:gpuUnitLimit:ComputeResponse' :: ComputeResponse -> Maybe Natural
$sel:computeType:ComputeResponse' :: ComputeResponse -> Maybe ComputeType
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ComputeType
computeType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
gpuUnitLimit
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
simulationUnitLimit