{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SageMaker.Types.ProductionVariant
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SageMaker.Types.ProductionVariant where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.ProductionVariantAcceleratorType
import Amazonka.SageMaker.Types.ProductionVariantCoreDumpConfig
import Amazonka.SageMaker.Types.ProductionVariantInstanceType

-- | Identifies a model that you want to host and the resources chosen to
-- deploy for hosting it. If you are deploying multiple models, tell Amazon
-- SageMaker how to distribute traffic among the models by specifying
-- variant weights.
--
-- /See:/ 'newProductionVariant' smart constructor.
data ProductionVariant = ProductionVariant'
  { -- | The size of the Elastic Inference (EI) instance to use for the
    -- production variant. EI instances provide on-demand GPU computing for
    -- inference. For more information, see
    -- <https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html Using Elastic Inference in Amazon SageMaker>.
    ProductionVariant -> Maybe ProductionVariantAcceleratorType
acceleratorType :: Prelude.Maybe ProductionVariantAcceleratorType,
    -- | Specifies configuration for a core dump from the model container when
    -- the process crashes.
    ProductionVariant -> Maybe ProductionVariantCoreDumpConfig
coreDumpConfig :: Prelude.Maybe ProductionVariantCoreDumpConfig,
    -- | Determines initial traffic distribution among all of the models that you
    -- specify in the endpoint configuration. The traffic to a production
    -- variant is determined by the ratio of the @VariantWeight@ to the sum of
    -- all @VariantWeight@ values across all ProductionVariants. If
    -- unspecified, it defaults to 1.0.
    ProductionVariant -> Maybe Double
initialVariantWeight :: Prelude.Maybe Prelude.Double,
    -- | The name of the production variant.
    ProductionVariant -> Text
variantName :: Prelude.Text,
    -- | The name of the model that you want to host. This is the name that you
    -- specified when creating the model.
    ProductionVariant -> Text
modelName :: Prelude.Text,
    -- | Number of instances to launch initially.
    ProductionVariant -> Natural
initialInstanceCount :: Prelude.Natural,
    -- | The ML compute instance type.
    ProductionVariant -> ProductionVariantInstanceType
instanceType :: ProductionVariantInstanceType
  }
  deriving (ProductionVariant -> ProductionVariant -> Bool
(ProductionVariant -> ProductionVariant -> Bool)
-> (ProductionVariant -> ProductionVariant -> Bool)
-> Eq ProductionVariant
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]
(Int -> ReadS ProductionVariant)
-> ReadS [ProductionVariant]
-> ReadPrec ProductionVariant
-> ReadPrec [ProductionVariant]
-> Read 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
(Int -> ProductionVariant -> ShowS)
-> (ProductionVariant -> String)
-> ([ProductionVariant] -> ShowS)
-> Show ProductionVariant
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. ProductionVariant -> Rep ProductionVariant x)
-> (forall x. Rep ProductionVariant x -> ProductionVariant)
-> Generic ProductionVariant
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)

-- |
-- Create a value of 'ProductionVariant' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'acceleratorType', 'productionVariant_acceleratorType' - The size of the Elastic Inference (EI) instance to use for the
-- production variant. EI instances provide on-demand GPU computing for
-- inference. For more information, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html Using Elastic Inference in Amazon SageMaker>.
--
-- 'coreDumpConfig', 'productionVariant_coreDumpConfig' - Specifies configuration for a core dump from the model container when
-- the process crashes.
--
-- 'initialVariantWeight', 'productionVariant_initialVariantWeight' - Determines initial traffic distribution among all of the models that you
-- specify in the endpoint configuration. The traffic to a production
-- variant is determined by the ratio of the @VariantWeight@ to the sum of
-- all @VariantWeight@ values across all ProductionVariants. If
-- unspecified, it defaults to 1.0.
--
-- 'variantName', 'productionVariant_variantName' - The name of the production variant.
--
-- 'modelName', 'productionVariant_modelName' - The name of the model that you want to host. This is the name that you
-- specified when creating the model.
--
-- 'initialInstanceCount', 'productionVariant_initialInstanceCount' - Number of instances to launch initially.
--
-- 'instanceType', 'productionVariant_instanceType' - The ML compute instance type.
newProductionVariant ::
  -- | 'variantName'
  Prelude.Text ->
  -- | 'modelName'
  Prelude.Text ->
  -- | 'initialInstanceCount'
  Prelude.Natural ->
  -- | 'instanceType'
  ProductionVariantInstanceType ->
  ProductionVariant
newProductionVariant :: Text
-> Text
-> Natural
-> ProductionVariantInstanceType
-> ProductionVariant
newProductionVariant
  Text
pVariantName_
  Text
pModelName_
  Natural
pInitialInstanceCount_
  ProductionVariantInstanceType
pInstanceType_ =
    ProductionVariant' :: Maybe ProductionVariantAcceleratorType
-> Maybe ProductionVariantCoreDumpConfig
-> Maybe Double
-> Text
-> Text
-> Natural
-> ProductionVariantInstanceType
-> ProductionVariant
ProductionVariant'
      { $sel:acceleratorType:ProductionVariant' :: Maybe ProductionVariantAcceleratorType
acceleratorType =
          Maybe ProductionVariantAcceleratorType
forall a. Maybe a
Prelude.Nothing,
        $sel:coreDumpConfig:ProductionVariant' :: Maybe ProductionVariantCoreDumpConfig
coreDumpConfig = Maybe ProductionVariantCoreDumpConfig
forall a. Maybe a
Prelude.Nothing,
        $sel:initialVariantWeight:ProductionVariant' :: Maybe Double
initialVariantWeight = Maybe Double
forall a. Maybe a
Prelude.Nothing,
        $sel:variantName:ProductionVariant' :: Text
variantName = Text
pVariantName_,
        $sel:modelName:ProductionVariant' :: Text
modelName = Text
pModelName_,
        $sel:initialInstanceCount:ProductionVariant' :: Natural
initialInstanceCount = Natural
pInitialInstanceCount_,
        $sel:instanceType:ProductionVariant' :: ProductionVariantInstanceType
instanceType = ProductionVariantInstanceType
pInstanceType_
      }

-- | The size of the Elastic Inference (EI) instance to use for the
-- production variant. EI instances provide on-demand GPU computing for
-- inference. For more information, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html Using Elastic Inference in Amazon SageMaker>.
productionVariant_acceleratorType :: Lens.Lens' ProductionVariant (Prelude.Maybe ProductionVariantAcceleratorType)
productionVariant_acceleratorType :: (Maybe ProductionVariantAcceleratorType
 -> f (Maybe ProductionVariantAcceleratorType))
-> ProductionVariant -> f ProductionVariant
productionVariant_acceleratorType = (ProductionVariant -> Maybe ProductionVariantAcceleratorType)
-> (ProductionVariant
    -> Maybe ProductionVariantAcceleratorType -> ProductionVariant)
-> Lens
     ProductionVariant
     ProductionVariant
     (Maybe ProductionVariantAcceleratorType)
     (Maybe ProductionVariantAcceleratorType)
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)

-- | Specifies configuration for a core dump from the model container when
-- the process crashes.
productionVariant_coreDumpConfig :: Lens.Lens' ProductionVariant (Prelude.Maybe ProductionVariantCoreDumpConfig)
productionVariant_coreDumpConfig :: (Maybe ProductionVariantCoreDumpConfig
 -> f (Maybe ProductionVariantCoreDumpConfig))
-> ProductionVariant -> f ProductionVariant
productionVariant_coreDumpConfig = (ProductionVariant -> Maybe ProductionVariantCoreDumpConfig)
-> (ProductionVariant
    -> Maybe ProductionVariantCoreDumpConfig -> ProductionVariant)
-> Lens
     ProductionVariant
     ProductionVariant
     (Maybe ProductionVariantCoreDumpConfig)
     (Maybe ProductionVariantCoreDumpConfig)
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)

-- | Determines initial traffic distribution among all of the models that you
-- specify in the endpoint configuration. The traffic to a production
-- variant is determined by the ratio of the @VariantWeight@ to the sum of
-- all @VariantWeight@ values across all ProductionVariants. If
-- unspecified, it defaults to 1.0.
productionVariant_initialVariantWeight :: Lens.Lens' ProductionVariant (Prelude.Maybe Prelude.Double)
productionVariant_initialVariantWeight :: (Maybe Double -> f (Maybe Double))
-> ProductionVariant -> f ProductionVariant
productionVariant_initialVariantWeight = (ProductionVariant -> Maybe Double)
-> (ProductionVariant -> Maybe Double -> ProductionVariant)
-> Lens
     ProductionVariant ProductionVariant (Maybe Double) (Maybe Double)
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)

-- | The name of the production variant.
productionVariant_variantName :: Lens.Lens' ProductionVariant Prelude.Text
productionVariant_variantName :: (Text -> f Text) -> ProductionVariant -> f ProductionVariant
productionVariant_variantName = (ProductionVariant -> Text)
-> (ProductionVariant -> Text -> ProductionVariant)
-> Lens ProductionVariant ProductionVariant Text Text
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)

-- | The name of the model that you want to host. This is the name that you
-- specified when creating the model.
productionVariant_modelName :: Lens.Lens' ProductionVariant Prelude.Text
productionVariant_modelName :: (Text -> f Text) -> ProductionVariant -> f ProductionVariant
productionVariant_modelName = (ProductionVariant -> Text)
-> (ProductionVariant -> Text -> ProductionVariant)
-> Lens ProductionVariant ProductionVariant Text Text
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)

-- | Number of instances to launch initially.
productionVariant_initialInstanceCount :: Lens.Lens' ProductionVariant Prelude.Natural
productionVariant_initialInstanceCount :: (Natural -> f Natural) -> ProductionVariant -> f ProductionVariant
productionVariant_initialInstanceCount = (ProductionVariant -> Natural)
-> (ProductionVariant -> Natural -> ProductionVariant)
-> Lens ProductionVariant ProductionVariant Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProductionVariant' {Natural
initialInstanceCount :: Natural
$sel:initialInstanceCount:ProductionVariant' :: ProductionVariant -> Natural
initialInstanceCount} -> Natural
initialInstanceCount) (\s :: ProductionVariant
s@ProductionVariant' {} Natural
a -> ProductionVariant
s {$sel:initialInstanceCount:ProductionVariant' :: Natural
initialInstanceCount = Natural
a} :: ProductionVariant)

-- | The ML compute instance type.
productionVariant_instanceType :: Lens.Lens' ProductionVariant ProductionVariantInstanceType
productionVariant_instanceType :: (ProductionVariantInstanceType -> f ProductionVariantInstanceType)
-> ProductionVariant -> f ProductionVariant
productionVariant_instanceType = (ProductionVariant -> ProductionVariantInstanceType)
-> (ProductionVariant
    -> ProductionVariantInstanceType -> ProductionVariant)
-> Lens
     ProductionVariant
     ProductionVariant
     ProductionVariantInstanceType
     ProductionVariantInstanceType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProductionVariant' {ProductionVariantInstanceType
instanceType :: ProductionVariantInstanceType
$sel:instanceType:ProductionVariant' :: ProductionVariant -> ProductionVariantInstanceType
instanceType} -> ProductionVariantInstanceType
instanceType) (\s :: ProductionVariant
s@ProductionVariant' {} ProductionVariantInstanceType
a -> ProductionVariant
s {$sel:instanceType:ProductionVariant' :: ProductionVariantInstanceType
instanceType = ProductionVariantInstanceType
a} :: ProductionVariant)

instance Core.FromJSON ProductionVariant where
  parseJSON :: Value -> Parser ProductionVariant
parseJSON =
    String
-> (Object -> Parser ProductionVariant)
-> Value
-> Parser ProductionVariant
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ProductionVariant"
      ( \Object
x ->
          Maybe ProductionVariantAcceleratorType
-> Maybe ProductionVariantCoreDumpConfig
-> Maybe Double
-> Text
-> Text
-> Natural
-> ProductionVariantInstanceType
-> ProductionVariant
ProductionVariant'
            (Maybe ProductionVariantAcceleratorType
 -> Maybe ProductionVariantCoreDumpConfig
 -> Maybe Double
 -> Text
 -> Text
 -> Natural
 -> ProductionVariantInstanceType
 -> ProductionVariant)
-> Parser (Maybe ProductionVariantAcceleratorType)
-> Parser
     (Maybe ProductionVariantCoreDumpConfig
      -> Maybe Double
      -> Text
      -> Text
      -> Natural
      -> ProductionVariantInstanceType
      -> ProductionVariant)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ProductionVariantAcceleratorType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AcceleratorType")
            Parser
  (Maybe ProductionVariantCoreDumpConfig
   -> Maybe Double
   -> Text
   -> Text
   -> Natural
   -> ProductionVariantInstanceType
   -> ProductionVariant)
-> Parser (Maybe ProductionVariantCoreDumpConfig)
-> Parser
     (Maybe Double
      -> Text
      -> Text
      -> Natural
      -> ProductionVariantInstanceType
      -> ProductionVariant)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ProductionVariantCoreDumpConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CoreDumpConfig")
            Parser
  (Maybe Double
   -> Text
   -> Text
   -> Natural
   -> ProductionVariantInstanceType
   -> ProductionVariant)
-> Parser (Maybe Double)
-> Parser
     (Text
      -> Text
      -> Natural
      -> ProductionVariantInstanceType
      -> ProductionVariant)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InitialVariantWeight")
            Parser
  (Text
   -> Text
   -> Natural
   -> ProductionVariantInstanceType
   -> ProductionVariant)
-> Parser Text
-> Parser
     (Text
      -> Natural -> ProductionVariantInstanceType -> ProductionVariant)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"VariantName")
            Parser
  (Text
   -> Natural -> ProductionVariantInstanceType -> ProductionVariant)
-> Parser Text
-> Parser
     (Natural -> ProductionVariantInstanceType -> ProductionVariant)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ModelName")
            Parser
  (Natural -> ProductionVariantInstanceType -> ProductionVariant)
-> Parser Natural
-> Parser (ProductionVariantInstanceType -> ProductionVariant)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Natural
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"InitialInstanceCount")
            Parser (ProductionVariantInstanceType -> ProductionVariant)
-> Parser ProductionVariantInstanceType -> Parser ProductionVariant
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ProductionVariantInstanceType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"InstanceType")
      )

instance Prelude.Hashable ProductionVariant

instance Prelude.NFData ProductionVariant

instance Core.ToJSON ProductionVariant where
  toJSON :: ProductionVariant -> Value
toJSON ProductionVariant' {Natural
Maybe Double
Maybe ProductionVariantAcceleratorType
Maybe ProductionVariantCoreDumpConfig
Text
ProductionVariantInstanceType
instanceType :: ProductionVariantInstanceType
initialInstanceCount :: Natural
modelName :: Text
variantName :: Text
initialVariantWeight :: Maybe Double
coreDumpConfig :: Maybe ProductionVariantCoreDumpConfig
acceleratorType :: Maybe ProductionVariantAcceleratorType
$sel:instanceType:ProductionVariant' :: ProductionVariant -> ProductionVariantInstanceType
$sel:initialInstanceCount:ProductionVariant' :: ProductionVariant -> Natural
$sel:modelName:ProductionVariant' :: ProductionVariant -> Text
$sel:variantName:ProductionVariant' :: ProductionVariant -> Text
$sel:initialVariantWeight:ProductionVariant' :: ProductionVariant -> Maybe Double
$sel:coreDumpConfig:ProductionVariant' :: ProductionVariant -> Maybe ProductionVariantCoreDumpConfig
$sel:acceleratorType:ProductionVariant' :: ProductionVariant -> Maybe ProductionVariantAcceleratorType
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"AcceleratorType" Text -> ProductionVariantAcceleratorType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ProductionVariantAcceleratorType -> Pair)
-> Maybe ProductionVariantAcceleratorType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProductionVariantAcceleratorType
acceleratorType,
            (Text
"CoreDumpConfig" Text -> ProductionVariantCoreDumpConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ProductionVariantCoreDumpConfig -> Pair)
-> Maybe ProductionVariantCoreDumpConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProductionVariantCoreDumpConfig
coreDumpConfig,
            (Text
"InitialVariantWeight" Text -> Double -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Double -> Pair) -> Maybe Double -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Double
initialVariantWeight,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"VariantName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
variantName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ModelName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
modelName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"InitialInstanceCount"
                  Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Natural
initialInstanceCount
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"InstanceType" Text -> ProductionVariantInstanceType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ProductionVariantInstanceType
instanceType)
          ]
      )