{-# 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.ProductionVariant 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.ProductionVariantAcceleratorType
import Amazonka.SageMaker.Types.ProductionVariantCoreDumpConfig
import Amazonka.SageMaker.Types.ProductionVariantInstanceType
import Amazonka.SageMaker.Types.ProductionVariantServerlessConfig
data ProductionVariant = ProductionVariant'
{
ProductionVariant -> Maybe ProductionVariantAcceleratorType
acceleratorType :: Prelude.Maybe ProductionVariantAcceleratorType,
ProductionVariant -> Maybe Natural
containerStartupHealthCheckTimeoutInSeconds :: Prelude.Maybe Prelude.Natural,
ProductionVariant -> Maybe ProductionVariantCoreDumpConfig
coreDumpConfig :: Prelude.Maybe ProductionVariantCoreDumpConfig,
ProductionVariant -> Maybe Natural
initialInstanceCount :: Prelude.Maybe Prelude.Natural,
ProductionVariant -> Maybe Double
initialVariantWeight :: Prelude.Maybe Prelude.Double,
ProductionVariant -> Maybe ProductionVariantInstanceType
instanceType :: Prelude.Maybe ProductionVariantInstanceType,
ProductionVariant -> Maybe Natural
modelDataDownloadTimeoutInSeconds :: Prelude.Maybe Prelude.Natural,
ProductionVariant -> Maybe ProductionVariantServerlessConfig
serverlessConfig :: Prelude.Maybe ProductionVariantServerlessConfig,
ProductionVariant -> Maybe Natural
volumeSizeInGB :: Prelude.Maybe Prelude.Natural,
ProductionVariant -> Text
variantName :: Prelude.Text,
ProductionVariant -> Text
modelName :: Prelude.Text
}
deriving (ProductionVariant -> ProductionVariant -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProductionVariant -> ProductionVariant -> Bool
$c/= :: ProductionVariant -> ProductionVariant -> Bool
== :: ProductionVariant -> ProductionVariant -> Bool
$c== :: ProductionVariant -> ProductionVariant -> Bool
Prelude.Eq, ReadPrec [ProductionVariant]
ReadPrec ProductionVariant
Int -> ReadS ProductionVariant
ReadS [ProductionVariant]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProductionVariant]
$creadListPrec :: ReadPrec [ProductionVariant]
readPrec :: ReadPrec ProductionVariant
$creadPrec :: ReadPrec ProductionVariant
readList :: ReadS [ProductionVariant]
$creadList :: ReadS [ProductionVariant]
readsPrec :: Int -> ReadS ProductionVariant
$creadsPrec :: Int -> ReadS ProductionVariant
Prelude.Read, Int -> ProductionVariant -> ShowS
[ProductionVariant] -> ShowS
ProductionVariant -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProductionVariant] -> ShowS
$cshowList :: [ProductionVariant] -> ShowS
show :: ProductionVariant -> String
$cshow :: ProductionVariant -> String
showsPrec :: Int -> ProductionVariant -> ShowS
$cshowsPrec :: Int -> ProductionVariant -> ShowS
Prelude.Show, forall x. Rep ProductionVariant x -> ProductionVariant
forall x. ProductionVariant -> Rep ProductionVariant x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ProductionVariant x -> ProductionVariant
$cfrom :: forall x. ProductionVariant -> Rep ProductionVariant x
Prelude.Generic)
newProductionVariant ::
Prelude.Text ->
Prelude.Text ->
ProductionVariant
newProductionVariant :: Text -> Text -> ProductionVariant
newProductionVariant Text
pVariantName_ Text
pModelName_ =
ProductionVariant'
{ $sel:acceleratorType:ProductionVariant' :: Maybe ProductionVariantAcceleratorType
acceleratorType =
forall a. Maybe a
Prelude.Nothing,
$sel:containerStartupHealthCheckTimeoutInSeconds:ProductionVariant' :: Maybe Natural
containerStartupHealthCheckTimeoutInSeconds =
forall a. Maybe a
Prelude.Nothing,
$sel:coreDumpConfig:ProductionVariant' :: Maybe ProductionVariantCoreDumpConfig
coreDumpConfig = forall a. Maybe a
Prelude.Nothing,
$sel:initialInstanceCount:ProductionVariant' :: Maybe Natural
initialInstanceCount = forall a. Maybe a
Prelude.Nothing,
$sel:initialVariantWeight:ProductionVariant' :: Maybe Double
initialVariantWeight = forall a. Maybe a
Prelude.Nothing,
$sel:instanceType:ProductionVariant' :: Maybe ProductionVariantInstanceType
instanceType = forall a. Maybe a
Prelude.Nothing,
$sel:modelDataDownloadTimeoutInSeconds:ProductionVariant' :: Maybe Natural
modelDataDownloadTimeoutInSeconds = forall a. Maybe a
Prelude.Nothing,
$sel:serverlessConfig:ProductionVariant' :: Maybe ProductionVariantServerlessConfig
serverlessConfig = forall a. Maybe a
Prelude.Nothing,
$sel:volumeSizeInGB:ProductionVariant' :: Maybe Natural
volumeSizeInGB = forall a. Maybe a
Prelude.Nothing,
$sel:variantName:ProductionVariant' :: Text
variantName = Text
pVariantName_,
$sel:modelName:ProductionVariant' :: Text
modelName = Text
pModelName_
}
productionVariant_acceleratorType :: Lens.Lens' ProductionVariant (Prelude.Maybe ProductionVariantAcceleratorType)
productionVariant_acceleratorType :: Lens' ProductionVariant (Maybe ProductionVariantAcceleratorType)
productionVariant_acceleratorType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProductionVariant' {Maybe ProductionVariantAcceleratorType
acceleratorType :: Maybe ProductionVariantAcceleratorType
$sel:acceleratorType:ProductionVariant' :: ProductionVariant -> Maybe ProductionVariantAcceleratorType
acceleratorType} -> Maybe ProductionVariantAcceleratorType
acceleratorType) (\s :: ProductionVariant
s@ProductionVariant' {} Maybe ProductionVariantAcceleratorType
a -> ProductionVariant
s {$sel:acceleratorType:ProductionVariant' :: Maybe ProductionVariantAcceleratorType
acceleratorType = Maybe ProductionVariantAcceleratorType
a} :: ProductionVariant)
productionVariant_containerStartupHealthCheckTimeoutInSeconds :: Lens.Lens' ProductionVariant (Prelude.Maybe Prelude.Natural)
productionVariant_containerStartupHealthCheckTimeoutInSeconds :: Lens' ProductionVariant (Maybe Natural)
productionVariant_containerStartupHealthCheckTimeoutInSeconds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProductionVariant' {Maybe Natural
containerStartupHealthCheckTimeoutInSeconds :: Maybe Natural
$sel:containerStartupHealthCheckTimeoutInSeconds:ProductionVariant' :: ProductionVariant -> Maybe Natural
containerStartupHealthCheckTimeoutInSeconds} -> Maybe Natural
containerStartupHealthCheckTimeoutInSeconds) (\s :: ProductionVariant
s@ProductionVariant' {} Maybe Natural
a -> ProductionVariant
s {$sel:containerStartupHealthCheckTimeoutInSeconds:ProductionVariant' :: Maybe Natural
containerStartupHealthCheckTimeoutInSeconds = Maybe Natural
a} :: ProductionVariant)
productionVariant_coreDumpConfig :: Lens.Lens' ProductionVariant (Prelude.Maybe ProductionVariantCoreDumpConfig)
productionVariant_coreDumpConfig :: Lens' ProductionVariant (Maybe ProductionVariantCoreDumpConfig)
productionVariant_coreDumpConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProductionVariant' {Maybe ProductionVariantCoreDumpConfig
coreDumpConfig :: Maybe ProductionVariantCoreDumpConfig
$sel:coreDumpConfig:ProductionVariant' :: ProductionVariant -> Maybe ProductionVariantCoreDumpConfig
coreDumpConfig} -> Maybe ProductionVariantCoreDumpConfig
coreDumpConfig) (\s :: ProductionVariant
s@ProductionVariant' {} Maybe ProductionVariantCoreDumpConfig
a -> ProductionVariant
s {$sel:coreDumpConfig:ProductionVariant' :: Maybe ProductionVariantCoreDumpConfig
coreDumpConfig = Maybe ProductionVariantCoreDumpConfig
a} :: ProductionVariant)
productionVariant_initialInstanceCount :: Lens.Lens' ProductionVariant (Prelude.Maybe Prelude.Natural)
productionVariant_initialInstanceCount :: Lens' ProductionVariant (Maybe Natural)
productionVariant_initialInstanceCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProductionVariant' {Maybe Natural
initialInstanceCount :: Maybe Natural
$sel:initialInstanceCount:ProductionVariant' :: ProductionVariant -> Maybe Natural
initialInstanceCount} -> Maybe Natural
initialInstanceCount) (\s :: ProductionVariant
s@ProductionVariant' {} Maybe Natural
a -> ProductionVariant
s {$sel:initialInstanceCount:ProductionVariant' :: Maybe Natural
initialInstanceCount = Maybe Natural
a} :: ProductionVariant)
productionVariant_initialVariantWeight :: Lens.Lens' ProductionVariant (Prelude.Maybe Prelude.Double)
productionVariant_initialVariantWeight :: Lens' ProductionVariant (Maybe Double)
productionVariant_initialVariantWeight = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProductionVariant' {Maybe Double
initialVariantWeight :: Maybe Double
$sel:initialVariantWeight:ProductionVariant' :: ProductionVariant -> Maybe Double
initialVariantWeight} -> Maybe Double
initialVariantWeight) (\s :: ProductionVariant
s@ProductionVariant' {} Maybe Double
a -> ProductionVariant
s {$sel:initialVariantWeight:ProductionVariant' :: Maybe Double
initialVariantWeight = Maybe Double
a} :: ProductionVariant)
productionVariant_instanceType :: Lens.Lens' ProductionVariant (Prelude.Maybe ProductionVariantInstanceType)
productionVariant_instanceType :: Lens' ProductionVariant (Maybe ProductionVariantInstanceType)
productionVariant_instanceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProductionVariant' {Maybe ProductionVariantInstanceType
instanceType :: Maybe ProductionVariantInstanceType
$sel:instanceType:ProductionVariant' :: ProductionVariant -> Maybe ProductionVariantInstanceType
instanceType} -> Maybe ProductionVariantInstanceType
instanceType) (\s :: ProductionVariant
s@ProductionVariant' {} Maybe ProductionVariantInstanceType
a -> ProductionVariant
s {$sel:instanceType:ProductionVariant' :: Maybe ProductionVariantInstanceType
instanceType = Maybe ProductionVariantInstanceType
a} :: ProductionVariant)
productionVariant_modelDataDownloadTimeoutInSeconds :: Lens.Lens' ProductionVariant (Prelude.Maybe Prelude.Natural)
productionVariant_modelDataDownloadTimeoutInSeconds :: Lens' ProductionVariant (Maybe Natural)
productionVariant_modelDataDownloadTimeoutInSeconds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProductionVariant' {Maybe Natural
modelDataDownloadTimeoutInSeconds :: Maybe Natural
$sel:modelDataDownloadTimeoutInSeconds:ProductionVariant' :: ProductionVariant -> Maybe Natural
modelDataDownloadTimeoutInSeconds} -> Maybe Natural
modelDataDownloadTimeoutInSeconds) (\s :: ProductionVariant
s@ProductionVariant' {} Maybe Natural
a -> ProductionVariant
s {$sel:modelDataDownloadTimeoutInSeconds:ProductionVariant' :: Maybe Natural
modelDataDownloadTimeoutInSeconds = Maybe Natural
a} :: ProductionVariant)
productionVariant_serverlessConfig :: Lens.Lens' ProductionVariant (Prelude.Maybe ProductionVariantServerlessConfig)
productionVariant_serverlessConfig :: Lens' ProductionVariant (Maybe ProductionVariantServerlessConfig)
productionVariant_serverlessConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProductionVariant' {Maybe ProductionVariantServerlessConfig
serverlessConfig :: Maybe ProductionVariantServerlessConfig
$sel:serverlessConfig:ProductionVariant' :: ProductionVariant -> Maybe ProductionVariantServerlessConfig
serverlessConfig} -> Maybe ProductionVariantServerlessConfig
serverlessConfig) (\s :: ProductionVariant
s@ProductionVariant' {} Maybe ProductionVariantServerlessConfig
a -> ProductionVariant
s {$sel:serverlessConfig:ProductionVariant' :: Maybe ProductionVariantServerlessConfig
serverlessConfig = Maybe ProductionVariantServerlessConfig
a} :: ProductionVariant)
productionVariant_volumeSizeInGB :: Lens.Lens' ProductionVariant (Prelude.Maybe Prelude.Natural)
productionVariant_volumeSizeInGB :: Lens' ProductionVariant (Maybe Natural)
productionVariant_volumeSizeInGB = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProductionVariant' {Maybe Natural
volumeSizeInGB :: Maybe Natural
$sel:volumeSizeInGB:ProductionVariant' :: ProductionVariant -> Maybe Natural
volumeSizeInGB} -> Maybe Natural
volumeSizeInGB) (\s :: ProductionVariant
s@ProductionVariant' {} Maybe Natural
a -> ProductionVariant
s {$sel:volumeSizeInGB:ProductionVariant' :: Maybe Natural
volumeSizeInGB = Maybe Natural
a} :: ProductionVariant)
productionVariant_variantName :: Lens.Lens' ProductionVariant Prelude.Text
productionVariant_variantName :: Lens' ProductionVariant Text
productionVariant_variantName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProductionVariant' {Text
variantName :: Text
$sel:variantName:ProductionVariant' :: ProductionVariant -> Text
variantName} -> Text
variantName) (\s :: ProductionVariant
s@ProductionVariant' {} Text
a -> ProductionVariant
s {$sel:variantName:ProductionVariant' :: Text
variantName = Text
a} :: ProductionVariant)
productionVariant_modelName :: Lens.Lens' ProductionVariant Prelude.Text
productionVariant_modelName :: Lens' ProductionVariant Text
productionVariant_modelName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProductionVariant' {Text
modelName :: Text
$sel:modelName:ProductionVariant' :: ProductionVariant -> Text
modelName} -> Text
modelName) (\s :: ProductionVariant
s@ProductionVariant' {} Text
a -> ProductionVariant
s {$sel:modelName:ProductionVariant' :: Text
modelName = Text
a} :: ProductionVariant)
instance Data.FromJSON ProductionVariant where
parseJSON :: Value -> Parser ProductionVariant
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ProductionVariant"
( \Object
x ->
Maybe ProductionVariantAcceleratorType
-> Maybe Natural
-> Maybe ProductionVariantCoreDumpConfig
-> Maybe Natural
-> Maybe Double
-> Maybe ProductionVariantInstanceType
-> Maybe Natural
-> Maybe ProductionVariantServerlessConfig
-> Maybe Natural
-> Text
-> Text
-> ProductionVariant
ProductionVariant'
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
"AcceleratorType")
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
"ContainerStartupHealthCheckTimeoutInSeconds"
)
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
"CoreDumpConfig")
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
"InitialInstanceCount")
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
"InitialVariantWeight")
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
"InstanceType")
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
"ModelDataDownloadTimeoutInSeconds")
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
"ServerlessConfig")
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
"VolumeSizeInGB")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"VariantName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"ModelName")
)
instance Prelude.Hashable ProductionVariant where
hashWithSalt :: Int -> ProductionVariant -> Int
hashWithSalt Int
_salt ProductionVariant' {Maybe Double
Maybe Natural
Maybe ProductionVariantAcceleratorType
Maybe ProductionVariantCoreDumpConfig
Maybe ProductionVariantInstanceType
Maybe ProductionVariantServerlessConfig
Text
modelName :: Text
variantName :: Text
volumeSizeInGB :: Maybe Natural
serverlessConfig :: Maybe ProductionVariantServerlessConfig
modelDataDownloadTimeoutInSeconds :: Maybe Natural
instanceType :: Maybe ProductionVariantInstanceType
initialVariantWeight :: Maybe Double
initialInstanceCount :: Maybe Natural
coreDumpConfig :: Maybe ProductionVariantCoreDumpConfig
containerStartupHealthCheckTimeoutInSeconds :: Maybe Natural
acceleratorType :: Maybe ProductionVariantAcceleratorType
$sel:modelName:ProductionVariant' :: ProductionVariant -> Text
$sel:variantName:ProductionVariant' :: ProductionVariant -> Text
$sel:volumeSizeInGB:ProductionVariant' :: ProductionVariant -> Maybe Natural
$sel:serverlessConfig:ProductionVariant' :: ProductionVariant -> Maybe ProductionVariantServerlessConfig
$sel:modelDataDownloadTimeoutInSeconds:ProductionVariant' :: ProductionVariant -> Maybe Natural
$sel:instanceType:ProductionVariant' :: ProductionVariant -> Maybe ProductionVariantInstanceType
$sel:initialVariantWeight:ProductionVariant' :: ProductionVariant -> Maybe Double
$sel:initialInstanceCount:ProductionVariant' :: ProductionVariant -> Maybe Natural
$sel:coreDumpConfig:ProductionVariant' :: ProductionVariant -> Maybe ProductionVariantCoreDumpConfig
$sel:containerStartupHealthCheckTimeoutInSeconds:ProductionVariant' :: ProductionVariant -> Maybe Natural
$sel:acceleratorType:ProductionVariant' :: ProductionVariant -> Maybe ProductionVariantAcceleratorType
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProductionVariantAcceleratorType
acceleratorType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
containerStartupHealthCheckTimeoutInSeconds
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProductionVariantCoreDumpConfig
coreDumpConfig
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
initialInstanceCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
initialVariantWeight
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProductionVariantInstanceType
instanceType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
modelDataDownloadTimeoutInSeconds
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProductionVariantServerlessConfig
serverlessConfig
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
volumeSizeInGB
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
variantName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
modelName
instance Prelude.NFData ProductionVariant where
rnf :: ProductionVariant -> ()
rnf ProductionVariant' {Maybe Double
Maybe Natural
Maybe ProductionVariantAcceleratorType
Maybe ProductionVariantCoreDumpConfig
Maybe ProductionVariantInstanceType
Maybe ProductionVariantServerlessConfig
Text
modelName :: Text
variantName :: Text
volumeSizeInGB :: Maybe Natural
serverlessConfig :: Maybe ProductionVariantServerlessConfig
modelDataDownloadTimeoutInSeconds :: Maybe Natural
instanceType :: Maybe ProductionVariantInstanceType
initialVariantWeight :: Maybe Double
initialInstanceCount :: Maybe Natural
coreDumpConfig :: Maybe ProductionVariantCoreDumpConfig
containerStartupHealthCheckTimeoutInSeconds :: Maybe Natural
acceleratorType :: Maybe ProductionVariantAcceleratorType
$sel:modelName:ProductionVariant' :: ProductionVariant -> Text
$sel:variantName:ProductionVariant' :: ProductionVariant -> Text
$sel:volumeSizeInGB:ProductionVariant' :: ProductionVariant -> Maybe Natural
$sel:serverlessConfig:ProductionVariant' :: ProductionVariant -> Maybe ProductionVariantServerlessConfig
$sel:modelDataDownloadTimeoutInSeconds:ProductionVariant' :: ProductionVariant -> Maybe Natural
$sel:instanceType:ProductionVariant' :: ProductionVariant -> Maybe ProductionVariantInstanceType
$sel:initialVariantWeight:ProductionVariant' :: ProductionVariant -> Maybe Double
$sel:initialInstanceCount:ProductionVariant' :: ProductionVariant -> Maybe Natural
$sel:coreDumpConfig:ProductionVariant' :: ProductionVariant -> Maybe ProductionVariantCoreDumpConfig
$sel:containerStartupHealthCheckTimeoutInSeconds:ProductionVariant' :: ProductionVariant -> Maybe Natural
$sel:acceleratorType:ProductionVariant' :: ProductionVariant -> Maybe ProductionVariantAcceleratorType
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ProductionVariantAcceleratorType
acceleratorType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
Maybe Natural
containerStartupHealthCheckTimeoutInSeconds
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ProductionVariantCoreDumpConfig
coreDumpConfig
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
initialInstanceCount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
initialVariantWeight
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ProductionVariantInstanceType
instanceType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
modelDataDownloadTimeoutInSeconds
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ProductionVariantServerlessConfig
serverlessConfig
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
volumeSizeInGB
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
variantName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
modelName
instance Data.ToJSON ProductionVariant where
toJSON :: ProductionVariant -> Value
toJSON ProductionVariant' {Maybe Double
Maybe Natural
Maybe ProductionVariantAcceleratorType
Maybe ProductionVariantCoreDumpConfig
Maybe ProductionVariantInstanceType
Maybe ProductionVariantServerlessConfig
Text
modelName :: Text
variantName :: Text
volumeSizeInGB :: Maybe Natural
serverlessConfig :: Maybe ProductionVariantServerlessConfig
modelDataDownloadTimeoutInSeconds :: Maybe Natural
instanceType :: Maybe ProductionVariantInstanceType
initialVariantWeight :: Maybe Double
initialInstanceCount :: Maybe Natural
coreDumpConfig :: Maybe ProductionVariantCoreDumpConfig
containerStartupHealthCheckTimeoutInSeconds :: Maybe Natural
acceleratorType :: Maybe ProductionVariantAcceleratorType
$sel:modelName:ProductionVariant' :: ProductionVariant -> Text
$sel:variantName:ProductionVariant' :: ProductionVariant -> Text
$sel:volumeSizeInGB:ProductionVariant' :: ProductionVariant -> Maybe Natural
$sel:serverlessConfig:ProductionVariant' :: ProductionVariant -> Maybe ProductionVariantServerlessConfig
$sel:modelDataDownloadTimeoutInSeconds:ProductionVariant' :: ProductionVariant -> Maybe Natural
$sel:instanceType:ProductionVariant' :: ProductionVariant -> Maybe ProductionVariantInstanceType
$sel:initialVariantWeight:ProductionVariant' :: ProductionVariant -> Maybe Double
$sel:initialInstanceCount:ProductionVariant' :: ProductionVariant -> Maybe Natural
$sel:coreDumpConfig:ProductionVariant' :: ProductionVariant -> Maybe ProductionVariantCoreDumpConfig
$sel:containerStartupHealthCheckTimeoutInSeconds:ProductionVariant' :: ProductionVariant -> Maybe Natural
$sel:acceleratorType:ProductionVariant' :: ProductionVariant -> Maybe ProductionVariantAcceleratorType
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"AcceleratorType" 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 ProductionVariantAcceleratorType
acceleratorType,
( Key
"ContainerStartupHealthCheckTimeoutInSeconds"
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
containerStartupHealthCheckTimeoutInSeconds,
(Key
"CoreDumpConfig" 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 ProductionVariantCoreDumpConfig
coreDumpConfig,
(Key
"InitialInstanceCount" 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
initialInstanceCount,
(Key
"InitialVariantWeight" 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 Double
initialVariantWeight,
(Key
"InstanceType" 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 ProductionVariantInstanceType
instanceType,
(Key
"ModelDataDownloadTimeoutInSeconds" 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
modelDataDownloadTimeoutInSeconds,
(Key
"ServerlessConfig" 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 ProductionVariantServerlessConfig
serverlessConfig,
(Key
"VolumeSizeInGB" 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
volumeSizeInGB,
forall a. a -> Maybe a
Prelude.Just (Key
"VariantName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
variantName),
forall a. a -> Maybe a
Prelude.Just (Key
"ModelName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
modelName)
]
)