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