{-# 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.SageMaker.Types.AsyncInferenceClientConfig 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
data AsyncInferenceClientConfig = AsyncInferenceClientConfig'
{
AsyncInferenceClientConfig -> Maybe Natural
maxConcurrentInvocationsPerInstance :: Prelude.Maybe Prelude.Natural
}
deriving (AsyncInferenceClientConfig -> AsyncInferenceClientConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AsyncInferenceClientConfig -> AsyncInferenceClientConfig -> Bool
$c/= :: AsyncInferenceClientConfig -> AsyncInferenceClientConfig -> Bool
== :: AsyncInferenceClientConfig -> AsyncInferenceClientConfig -> Bool
$c== :: AsyncInferenceClientConfig -> AsyncInferenceClientConfig -> Bool
Prelude.Eq, ReadPrec [AsyncInferenceClientConfig]
ReadPrec AsyncInferenceClientConfig
Int -> ReadS AsyncInferenceClientConfig
ReadS [AsyncInferenceClientConfig]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AsyncInferenceClientConfig]
$creadListPrec :: ReadPrec [AsyncInferenceClientConfig]
readPrec :: ReadPrec AsyncInferenceClientConfig
$creadPrec :: ReadPrec AsyncInferenceClientConfig
readList :: ReadS [AsyncInferenceClientConfig]
$creadList :: ReadS [AsyncInferenceClientConfig]
readsPrec :: Int -> ReadS AsyncInferenceClientConfig
$creadsPrec :: Int -> ReadS AsyncInferenceClientConfig
Prelude.Read, Int -> AsyncInferenceClientConfig -> ShowS
[AsyncInferenceClientConfig] -> ShowS
AsyncInferenceClientConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AsyncInferenceClientConfig] -> ShowS
$cshowList :: [AsyncInferenceClientConfig] -> ShowS
show :: AsyncInferenceClientConfig -> String
$cshow :: AsyncInferenceClientConfig -> String
showsPrec :: Int -> AsyncInferenceClientConfig -> ShowS
$cshowsPrec :: Int -> AsyncInferenceClientConfig -> ShowS
Prelude.Show, forall x.
Rep AsyncInferenceClientConfig x -> AsyncInferenceClientConfig
forall x.
AsyncInferenceClientConfig -> Rep AsyncInferenceClientConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AsyncInferenceClientConfig x -> AsyncInferenceClientConfig
$cfrom :: forall x.
AsyncInferenceClientConfig -> Rep AsyncInferenceClientConfig x
Prelude.Generic)
newAsyncInferenceClientConfig ::
AsyncInferenceClientConfig
newAsyncInferenceClientConfig :: AsyncInferenceClientConfig
newAsyncInferenceClientConfig =
AsyncInferenceClientConfig'
{ $sel:maxConcurrentInvocationsPerInstance:AsyncInferenceClientConfig' :: Maybe Natural
maxConcurrentInvocationsPerInstance =
forall a. Maybe a
Prelude.Nothing
}
asyncInferenceClientConfig_maxConcurrentInvocationsPerInstance :: Lens.Lens' AsyncInferenceClientConfig (Prelude.Maybe Prelude.Natural)
asyncInferenceClientConfig_maxConcurrentInvocationsPerInstance :: Lens' AsyncInferenceClientConfig (Maybe Natural)
asyncInferenceClientConfig_maxConcurrentInvocationsPerInstance = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AsyncInferenceClientConfig' {Maybe Natural
maxConcurrentInvocationsPerInstance :: Maybe Natural
$sel:maxConcurrentInvocationsPerInstance:AsyncInferenceClientConfig' :: AsyncInferenceClientConfig -> Maybe Natural
maxConcurrentInvocationsPerInstance} -> Maybe Natural
maxConcurrentInvocationsPerInstance) (\s :: AsyncInferenceClientConfig
s@AsyncInferenceClientConfig' {} Maybe Natural
a -> AsyncInferenceClientConfig
s {$sel:maxConcurrentInvocationsPerInstance:AsyncInferenceClientConfig' :: Maybe Natural
maxConcurrentInvocationsPerInstance = Maybe Natural
a} :: AsyncInferenceClientConfig)
instance Data.FromJSON AsyncInferenceClientConfig where
parseJSON :: Value -> Parser AsyncInferenceClientConfig
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"AsyncInferenceClientConfig"
( \Object
x ->
Maybe Natural -> AsyncInferenceClientConfig
AsyncInferenceClientConfig'
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
"MaxConcurrentInvocationsPerInstance")
)
instance Prelude.Hashable AsyncInferenceClientConfig where
hashWithSalt :: Int -> AsyncInferenceClientConfig -> Int
hashWithSalt Int
_salt AsyncInferenceClientConfig' {Maybe Natural
maxConcurrentInvocationsPerInstance :: Maybe Natural
$sel:maxConcurrentInvocationsPerInstance:AsyncInferenceClientConfig' :: AsyncInferenceClientConfig -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxConcurrentInvocationsPerInstance
instance Prelude.NFData AsyncInferenceClientConfig where
rnf :: AsyncInferenceClientConfig -> ()
rnf AsyncInferenceClientConfig' {Maybe Natural
maxConcurrentInvocationsPerInstance :: Maybe Natural
$sel:maxConcurrentInvocationsPerInstance:AsyncInferenceClientConfig' :: AsyncInferenceClientConfig -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxConcurrentInvocationsPerInstance
instance Data.ToJSON AsyncInferenceClientConfig where
toJSON :: AsyncInferenceClientConfig -> Value
toJSON AsyncInferenceClientConfig' {Maybe Natural
maxConcurrentInvocationsPerInstance :: Maybe Natural
$sel:maxConcurrentInvocationsPerInstance:AsyncInferenceClientConfig' :: AsyncInferenceClientConfig -> Maybe Natural
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"MaxConcurrentInvocationsPerInstance" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxConcurrentInvocationsPerInstance
]
)