{-# 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.PendingProductionVariantSummary
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SageMaker.Types.PendingProductionVariantSummary 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.DeployedImage
import Amazonka.SageMaker.Types.ProductionVariantAcceleratorType
import Amazonka.SageMaker.Types.ProductionVariantInstanceType
import Amazonka.SageMaker.Types.ProductionVariantServerlessConfig
import Amazonka.SageMaker.Types.ProductionVariantStatus

-- | The production variant summary for a deployment when an endpoint is
-- creating or updating with the @ @@CreateEndpoint@@ @ or
-- @ @@UpdateEndpoint@@ @ operations. Describes the @VariantStatus @,
-- weight and capacity for a production variant associated with an
-- endpoint.
--
-- /See:/ 'newPendingProductionVariantSummary' smart constructor.
data PendingProductionVariantSummary = PendingProductionVariantSummary'
  { -- | 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>.
    PendingProductionVariantSummary
-> Maybe ProductionVariantAcceleratorType
acceleratorType :: Prelude.Maybe ProductionVariantAcceleratorType,
    -- | The number of instances associated with the variant.
    PendingProductionVariantSummary -> Maybe Natural
currentInstanceCount :: Prelude.Maybe Prelude.Natural,
    -- | The serverless configuration for the endpoint.
    PendingProductionVariantSummary
-> Maybe ProductionVariantServerlessConfig
currentServerlessConfig :: Prelude.Maybe ProductionVariantServerlessConfig,
    -- | The weight associated with the variant.
    PendingProductionVariantSummary -> Maybe Double
currentWeight :: Prelude.Maybe Prelude.Double,
    -- | An array of @DeployedImage@ objects that specify the Amazon EC2
    -- Container Registry paths of the inference images deployed on instances
    -- of this @ProductionVariant@.
    PendingProductionVariantSummary -> Maybe [DeployedImage]
deployedImages :: Prelude.Maybe [DeployedImage],
    -- | The number of instances requested in this deployment, as specified in
    -- the endpoint configuration for the endpoint. The value is taken from the
    -- request to the @ @@CreateEndpointConfig@@ @ operation.
    PendingProductionVariantSummary -> Maybe Natural
desiredInstanceCount :: Prelude.Maybe Prelude.Natural,
    -- | The serverless configuration requested for this deployment, as specified
    -- in the endpoint configuration for the endpoint.
    PendingProductionVariantSummary
-> Maybe ProductionVariantServerlessConfig
desiredServerlessConfig :: Prelude.Maybe ProductionVariantServerlessConfig,
    -- | The requested weight for the variant in this deployment, as specified in
    -- the endpoint configuration for the endpoint. The value is taken from the
    -- request to the @ @@CreateEndpointConfig@@ @ operation.
    PendingProductionVariantSummary -> Maybe Double
desiredWeight :: Prelude.Maybe Prelude.Double,
    -- | The type of instances associated with the variant.
    PendingProductionVariantSummary
-> Maybe ProductionVariantInstanceType
instanceType :: Prelude.Maybe ProductionVariantInstanceType,
    -- | The endpoint variant status which describes the current deployment stage
    -- status or operational status.
    PendingProductionVariantSummary -> Maybe [ProductionVariantStatus]
variantStatus :: Prelude.Maybe [ProductionVariantStatus],
    -- | The name of the variant.
    PendingProductionVariantSummary -> Text
variantName :: Prelude.Text
  }
  deriving (PendingProductionVariantSummary
-> PendingProductionVariantSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PendingProductionVariantSummary
-> PendingProductionVariantSummary -> Bool
$c/= :: PendingProductionVariantSummary
-> PendingProductionVariantSummary -> Bool
== :: PendingProductionVariantSummary
-> PendingProductionVariantSummary -> Bool
$c== :: PendingProductionVariantSummary
-> PendingProductionVariantSummary -> Bool
Prelude.Eq, ReadPrec [PendingProductionVariantSummary]
ReadPrec PendingProductionVariantSummary
Int -> ReadS PendingProductionVariantSummary
ReadS [PendingProductionVariantSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PendingProductionVariantSummary]
$creadListPrec :: ReadPrec [PendingProductionVariantSummary]
readPrec :: ReadPrec PendingProductionVariantSummary
$creadPrec :: ReadPrec PendingProductionVariantSummary
readList :: ReadS [PendingProductionVariantSummary]
$creadList :: ReadS [PendingProductionVariantSummary]
readsPrec :: Int -> ReadS PendingProductionVariantSummary
$creadsPrec :: Int -> ReadS PendingProductionVariantSummary
Prelude.Read, Int -> PendingProductionVariantSummary -> ShowS
[PendingProductionVariantSummary] -> ShowS
PendingProductionVariantSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PendingProductionVariantSummary] -> ShowS
$cshowList :: [PendingProductionVariantSummary] -> ShowS
show :: PendingProductionVariantSummary -> String
$cshow :: PendingProductionVariantSummary -> String
showsPrec :: Int -> PendingProductionVariantSummary -> ShowS
$cshowsPrec :: Int -> PendingProductionVariantSummary -> ShowS
Prelude.Show, forall x.
Rep PendingProductionVariantSummary x
-> PendingProductionVariantSummary
forall x.
PendingProductionVariantSummary
-> Rep PendingProductionVariantSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PendingProductionVariantSummary x
-> PendingProductionVariantSummary
$cfrom :: forall x.
PendingProductionVariantSummary
-> Rep PendingProductionVariantSummary x
Prelude.Generic)

-- |
-- Create a value of 'PendingProductionVariantSummary' 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', 'pendingProductionVariantSummary_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>.
--
-- 'currentInstanceCount', 'pendingProductionVariantSummary_currentInstanceCount' - The number of instances associated with the variant.
--
-- 'currentServerlessConfig', 'pendingProductionVariantSummary_currentServerlessConfig' - The serverless configuration for the endpoint.
--
-- 'currentWeight', 'pendingProductionVariantSummary_currentWeight' - The weight associated with the variant.
--
-- 'deployedImages', 'pendingProductionVariantSummary_deployedImages' - An array of @DeployedImage@ objects that specify the Amazon EC2
-- Container Registry paths of the inference images deployed on instances
-- of this @ProductionVariant@.
--
-- 'desiredInstanceCount', 'pendingProductionVariantSummary_desiredInstanceCount' - The number of instances requested in this deployment, as specified in
-- the endpoint configuration for the endpoint. The value is taken from the
-- request to the @ @@CreateEndpointConfig@@ @ operation.
--
-- 'desiredServerlessConfig', 'pendingProductionVariantSummary_desiredServerlessConfig' - The serverless configuration requested for this deployment, as specified
-- in the endpoint configuration for the endpoint.
--
-- 'desiredWeight', 'pendingProductionVariantSummary_desiredWeight' - The requested weight for the variant in this deployment, as specified in
-- the endpoint configuration for the endpoint. The value is taken from the
-- request to the @ @@CreateEndpointConfig@@ @ operation.
--
-- 'instanceType', 'pendingProductionVariantSummary_instanceType' - The type of instances associated with the variant.
--
-- 'variantStatus', 'pendingProductionVariantSummary_variantStatus' - The endpoint variant status which describes the current deployment stage
-- status or operational status.
--
-- 'variantName', 'pendingProductionVariantSummary_variantName' - The name of the variant.
newPendingProductionVariantSummary ::
  -- | 'variantName'
  Prelude.Text ->
  PendingProductionVariantSummary
newPendingProductionVariantSummary :: Text -> PendingProductionVariantSummary
newPendingProductionVariantSummary Text
pVariantName_ =
  PendingProductionVariantSummary'
    { $sel:acceleratorType:PendingProductionVariantSummary' :: Maybe ProductionVariantAcceleratorType
acceleratorType =
        forall a. Maybe a
Prelude.Nothing,
      $sel:currentInstanceCount:PendingProductionVariantSummary' :: Maybe Natural
currentInstanceCount = forall a. Maybe a
Prelude.Nothing,
      $sel:currentServerlessConfig:PendingProductionVariantSummary' :: Maybe ProductionVariantServerlessConfig
currentServerlessConfig = forall a. Maybe a
Prelude.Nothing,
      $sel:currentWeight:PendingProductionVariantSummary' :: Maybe Double
currentWeight = forall a. Maybe a
Prelude.Nothing,
      $sel:deployedImages:PendingProductionVariantSummary' :: Maybe [DeployedImage]
deployedImages = forall a. Maybe a
Prelude.Nothing,
      $sel:desiredInstanceCount:PendingProductionVariantSummary' :: Maybe Natural
desiredInstanceCount = forall a. Maybe a
Prelude.Nothing,
      $sel:desiredServerlessConfig:PendingProductionVariantSummary' :: Maybe ProductionVariantServerlessConfig
desiredServerlessConfig = forall a. Maybe a
Prelude.Nothing,
      $sel:desiredWeight:PendingProductionVariantSummary' :: Maybe Double
desiredWeight = forall a. Maybe a
Prelude.Nothing,
      $sel:instanceType:PendingProductionVariantSummary' :: Maybe ProductionVariantInstanceType
instanceType = forall a. Maybe a
Prelude.Nothing,
      $sel:variantStatus:PendingProductionVariantSummary' :: Maybe [ProductionVariantStatus]
variantStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:variantName:PendingProductionVariantSummary' :: Text
variantName = Text
pVariantName_
    }

-- | 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>.
pendingProductionVariantSummary_acceleratorType :: Lens.Lens' PendingProductionVariantSummary (Prelude.Maybe ProductionVariantAcceleratorType)
pendingProductionVariantSummary_acceleratorType :: Lens'
  PendingProductionVariantSummary
  (Maybe ProductionVariantAcceleratorType)
pendingProductionVariantSummary_acceleratorType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingProductionVariantSummary' {Maybe ProductionVariantAcceleratorType
acceleratorType :: Maybe ProductionVariantAcceleratorType
$sel:acceleratorType:PendingProductionVariantSummary' :: PendingProductionVariantSummary
-> Maybe ProductionVariantAcceleratorType
acceleratorType} -> Maybe ProductionVariantAcceleratorType
acceleratorType) (\s :: PendingProductionVariantSummary
s@PendingProductionVariantSummary' {} Maybe ProductionVariantAcceleratorType
a -> PendingProductionVariantSummary
s {$sel:acceleratorType:PendingProductionVariantSummary' :: Maybe ProductionVariantAcceleratorType
acceleratorType = Maybe ProductionVariantAcceleratorType
a} :: PendingProductionVariantSummary)

-- | The number of instances associated with the variant.
pendingProductionVariantSummary_currentInstanceCount :: Lens.Lens' PendingProductionVariantSummary (Prelude.Maybe Prelude.Natural)
pendingProductionVariantSummary_currentInstanceCount :: Lens' PendingProductionVariantSummary (Maybe Natural)
pendingProductionVariantSummary_currentInstanceCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingProductionVariantSummary' {Maybe Natural
currentInstanceCount :: Maybe Natural
$sel:currentInstanceCount:PendingProductionVariantSummary' :: PendingProductionVariantSummary -> Maybe Natural
currentInstanceCount} -> Maybe Natural
currentInstanceCount) (\s :: PendingProductionVariantSummary
s@PendingProductionVariantSummary' {} Maybe Natural
a -> PendingProductionVariantSummary
s {$sel:currentInstanceCount:PendingProductionVariantSummary' :: Maybe Natural
currentInstanceCount = Maybe Natural
a} :: PendingProductionVariantSummary)

-- | The serverless configuration for the endpoint.
pendingProductionVariantSummary_currentServerlessConfig :: Lens.Lens' PendingProductionVariantSummary (Prelude.Maybe ProductionVariantServerlessConfig)
pendingProductionVariantSummary_currentServerlessConfig :: Lens'
  PendingProductionVariantSummary
  (Maybe ProductionVariantServerlessConfig)
pendingProductionVariantSummary_currentServerlessConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingProductionVariantSummary' {Maybe ProductionVariantServerlessConfig
currentServerlessConfig :: Maybe ProductionVariantServerlessConfig
$sel:currentServerlessConfig:PendingProductionVariantSummary' :: PendingProductionVariantSummary
-> Maybe ProductionVariantServerlessConfig
currentServerlessConfig} -> Maybe ProductionVariantServerlessConfig
currentServerlessConfig) (\s :: PendingProductionVariantSummary
s@PendingProductionVariantSummary' {} Maybe ProductionVariantServerlessConfig
a -> PendingProductionVariantSummary
s {$sel:currentServerlessConfig:PendingProductionVariantSummary' :: Maybe ProductionVariantServerlessConfig
currentServerlessConfig = Maybe ProductionVariantServerlessConfig
a} :: PendingProductionVariantSummary)

-- | The weight associated with the variant.
pendingProductionVariantSummary_currentWeight :: Lens.Lens' PendingProductionVariantSummary (Prelude.Maybe Prelude.Double)
pendingProductionVariantSummary_currentWeight :: Lens' PendingProductionVariantSummary (Maybe Double)
pendingProductionVariantSummary_currentWeight = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingProductionVariantSummary' {Maybe Double
currentWeight :: Maybe Double
$sel:currentWeight:PendingProductionVariantSummary' :: PendingProductionVariantSummary -> Maybe Double
currentWeight} -> Maybe Double
currentWeight) (\s :: PendingProductionVariantSummary
s@PendingProductionVariantSummary' {} Maybe Double
a -> PendingProductionVariantSummary
s {$sel:currentWeight:PendingProductionVariantSummary' :: Maybe Double
currentWeight = Maybe Double
a} :: PendingProductionVariantSummary)

-- | An array of @DeployedImage@ objects that specify the Amazon EC2
-- Container Registry paths of the inference images deployed on instances
-- of this @ProductionVariant@.
pendingProductionVariantSummary_deployedImages :: Lens.Lens' PendingProductionVariantSummary (Prelude.Maybe [DeployedImage])
pendingProductionVariantSummary_deployedImages :: Lens' PendingProductionVariantSummary (Maybe [DeployedImage])
pendingProductionVariantSummary_deployedImages = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingProductionVariantSummary' {Maybe [DeployedImage]
deployedImages :: Maybe [DeployedImage]
$sel:deployedImages:PendingProductionVariantSummary' :: PendingProductionVariantSummary -> Maybe [DeployedImage]
deployedImages} -> Maybe [DeployedImage]
deployedImages) (\s :: PendingProductionVariantSummary
s@PendingProductionVariantSummary' {} Maybe [DeployedImage]
a -> PendingProductionVariantSummary
s {$sel:deployedImages:PendingProductionVariantSummary' :: Maybe [DeployedImage]
deployedImages = Maybe [DeployedImage]
a} :: PendingProductionVariantSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The number of instances requested in this deployment, as specified in
-- the endpoint configuration for the endpoint. The value is taken from the
-- request to the @ @@CreateEndpointConfig@@ @ operation.
pendingProductionVariantSummary_desiredInstanceCount :: Lens.Lens' PendingProductionVariantSummary (Prelude.Maybe Prelude.Natural)
pendingProductionVariantSummary_desiredInstanceCount :: Lens' PendingProductionVariantSummary (Maybe Natural)
pendingProductionVariantSummary_desiredInstanceCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingProductionVariantSummary' {Maybe Natural
desiredInstanceCount :: Maybe Natural
$sel:desiredInstanceCount:PendingProductionVariantSummary' :: PendingProductionVariantSummary -> Maybe Natural
desiredInstanceCount} -> Maybe Natural
desiredInstanceCount) (\s :: PendingProductionVariantSummary
s@PendingProductionVariantSummary' {} Maybe Natural
a -> PendingProductionVariantSummary
s {$sel:desiredInstanceCount:PendingProductionVariantSummary' :: Maybe Natural
desiredInstanceCount = Maybe Natural
a} :: PendingProductionVariantSummary)

-- | The serverless configuration requested for this deployment, as specified
-- in the endpoint configuration for the endpoint.
pendingProductionVariantSummary_desiredServerlessConfig :: Lens.Lens' PendingProductionVariantSummary (Prelude.Maybe ProductionVariantServerlessConfig)
pendingProductionVariantSummary_desiredServerlessConfig :: Lens'
  PendingProductionVariantSummary
  (Maybe ProductionVariantServerlessConfig)
pendingProductionVariantSummary_desiredServerlessConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingProductionVariantSummary' {Maybe ProductionVariantServerlessConfig
desiredServerlessConfig :: Maybe ProductionVariantServerlessConfig
$sel:desiredServerlessConfig:PendingProductionVariantSummary' :: PendingProductionVariantSummary
-> Maybe ProductionVariantServerlessConfig
desiredServerlessConfig} -> Maybe ProductionVariantServerlessConfig
desiredServerlessConfig) (\s :: PendingProductionVariantSummary
s@PendingProductionVariantSummary' {} Maybe ProductionVariantServerlessConfig
a -> PendingProductionVariantSummary
s {$sel:desiredServerlessConfig:PendingProductionVariantSummary' :: Maybe ProductionVariantServerlessConfig
desiredServerlessConfig = Maybe ProductionVariantServerlessConfig
a} :: PendingProductionVariantSummary)

-- | The requested weight for the variant in this deployment, as specified in
-- the endpoint configuration for the endpoint. The value is taken from the
-- request to the @ @@CreateEndpointConfig@@ @ operation.
pendingProductionVariantSummary_desiredWeight :: Lens.Lens' PendingProductionVariantSummary (Prelude.Maybe Prelude.Double)
pendingProductionVariantSummary_desiredWeight :: Lens' PendingProductionVariantSummary (Maybe Double)
pendingProductionVariantSummary_desiredWeight = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingProductionVariantSummary' {Maybe Double
desiredWeight :: Maybe Double
$sel:desiredWeight:PendingProductionVariantSummary' :: PendingProductionVariantSummary -> Maybe Double
desiredWeight} -> Maybe Double
desiredWeight) (\s :: PendingProductionVariantSummary
s@PendingProductionVariantSummary' {} Maybe Double
a -> PendingProductionVariantSummary
s {$sel:desiredWeight:PendingProductionVariantSummary' :: Maybe Double
desiredWeight = Maybe Double
a} :: PendingProductionVariantSummary)

-- | The type of instances associated with the variant.
pendingProductionVariantSummary_instanceType :: Lens.Lens' PendingProductionVariantSummary (Prelude.Maybe ProductionVariantInstanceType)
pendingProductionVariantSummary_instanceType :: Lens'
  PendingProductionVariantSummary
  (Maybe ProductionVariantInstanceType)
pendingProductionVariantSummary_instanceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingProductionVariantSummary' {Maybe ProductionVariantInstanceType
instanceType :: Maybe ProductionVariantInstanceType
$sel:instanceType:PendingProductionVariantSummary' :: PendingProductionVariantSummary
-> Maybe ProductionVariantInstanceType
instanceType} -> Maybe ProductionVariantInstanceType
instanceType) (\s :: PendingProductionVariantSummary
s@PendingProductionVariantSummary' {} Maybe ProductionVariantInstanceType
a -> PendingProductionVariantSummary
s {$sel:instanceType:PendingProductionVariantSummary' :: Maybe ProductionVariantInstanceType
instanceType = Maybe ProductionVariantInstanceType
a} :: PendingProductionVariantSummary)

-- | The endpoint variant status which describes the current deployment stage
-- status or operational status.
pendingProductionVariantSummary_variantStatus :: Lens.Lens' PendingProductionVariantSummary (Prelude.Maybe [ProductionVariantStatus])
pendingProductionVariantSummary_variantStatus :: Lens'
  PendingProductionVariantSummary (Maybe [ProductionVariantStatus])
pendingProductionVariantSummary_variantStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingProductionVariantSummary' {Maybe [ProductionVariantStatus]
variantStatus :: Maybe [ProductionVariantStatus]
$sel:variantStatus:PendingProductionVariantSummary' :: PendingProductionVariantSummary -> Maybe [ProductionVariantStatus]
variantStatus} -> Maybe [ProductionVariantStatus]
variantStatus) (\s :: PendingProductionVariantSummary
s@PendingProductionVariantSummary' {} Maybe [ProductionVariantStatus]
a -> PendingProductionVariantSummary
s {$sel:variantStatus:PendingProductionVariantSummary' :: Maybe [ProductionVariantStatus]
variantStatus = Maybe [ProductionVariantStatus]
a} :: PendingProductionVariantSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the variant.
pendingProductionVariantSummary_variantName :: Lens.Lens' PendingProductionVariantSummary Prelude.Text
pendingProductionVariantSummary_variantName :: Lens' PendingProductionVariantSummary Text
pendingProductionVariantSummary_variantName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingProductionVariantSummary' {Text
variantName :: Text
$sel:variantName:PendingProductionVariantSummary' :: PendingProductionVariantSummary -> Text
variantName} -> Text
variantName) (\s :: PendingProductionVariantSummary
s@PendingProductionVariantSummary' {} Text
a -> PendingProductionVariantSummary
s {$sel:variantName:PendingProductionVariantSummary' :: Text
variantName = Text
a} :: PendingProductionVariantSummary)

instance
  Data.FromJSON
    PendingProductionVariantSummary
  where
  parseJSON :: Value -> Parser PendingProductionVariantSummary
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"PendingProductionVariantSummary"
      ( \Object
x ->
          Maybe ProductionVariantAcceleratorType
-> Maybe Natural
-> Maybe ProductionVariantServerlessConfig
-> Maybe Double
-> Maybe [DeployedImage]
-> Maybe Natural
-> Maybe ProductionVariantServerlessConfig
-> Maybe Double
-> Maybe ProductionVariantInstanceType
-> Maybe [ProductionVariantStatus]
-> Text
-> PendingProductionVariantSummary
PendingProductionVariantSummary'
            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
"CurrentInstanceCount")
            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
"CurrentServerlessConfig")
            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
"CurrentWeight")
            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
"DeployedImages" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            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
"DesiredInstanceCount")
            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
"DesiredServerlessConfig")
            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
"DesiredWeight")
            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
"VariantStatus" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            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")
      )

instance
  Prelude.Hashable
    PendingProductionVariantSummary
  where
  hashWithSalt :: Int -> PendingProductionVariantSummary -> Int
hashWithSalt
    Int
_salt
    PendingProductionVariantSummary' {Maybe Double
Maybe Natural
Maybe [DeployedImage]
Maybe [ProductionVariantStatus]
Maybe ProductionVariantAcceleratorType
Maybe ProductionVariantInstanceType
Maybe ProductionVariantServerlessConfig
Text
variantName :: Text
variantStatus :: Maybe [ProductionVariantStatus]
instanceType :: Maybe ProductionVariantInstanceType
desiredWeight :: Maybe Double
desiredServerlessConfig :: Maybe ProductionVariantServerlessConfig
desiredInstanceCount :: Maybe Natural
deployedImages :: Maybe [DeployedImage]
currentWeight :: Maybe Double
currentServerlessConfig :: Maybe ProductionVariantServerlessConfig
currentInstanceCount :: Maybe Natural
acceleratorType :: Maybe ProductionVariantAcceleratorType
$sel:variantName:PendingProductionVariantSummary' :: PendingProductionVariantSummary -> Text
$sel:variantStatus:PendingProductionVariantSummary' :: PendingProductionVariantSummary -> Maybe [ProductionVariantStatus]
$sel:instanceType:PendingProductionVariantSummary' :: PendingProductionVariantSummary
-> Maybe ProductionVariantInstanceType
$sel:desiredWeight:PendingProductionVariantSummary' :: PendingProductionVariantSummary -> Maybe Double
$sel:desiredServerlessConfig:PendingProductionVariantSummary' :: PendingProductionVariantSummary
-> Maybe ProductionVariantServerlessConfig
$sel:desiredInstanceCount:PendingProductionVariantSummary' :: PendingProductionVariantSummary -> Maybe Natural
$sel:deployedImages:PendingProductionVariantSummary' :: PendingProductionVariantSummary -> Maybe [DeployedImage]
$sel:currentWeight:PendingProductionVariantSummary' :: PendingProductionVariantSummary -> Maybe Double
$sel:currentServerlessConfig:PendingProductionVariantSummary' :: PendingProductionVariantSummary
-> Maybe ProductionVariantServerlessConfig
$sel:currentInstanceCount:PendingProductionVariantSummary' :: PendingProductionVariantSummary -> Maybe Natural
$sel:acceleratorType:PendingProductionVariantSummary' :: PendingProductionVariantSummary
-> 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
currentInstanceCount
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProductionVariantServerlessConfig
currentServerlessConfig
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
currentWeight
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [DeployedImage]
deployedImages
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
desiredInstanceCount
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProductionVariantServerlessConfig
desiredServerlessConfig
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
desiredWeight
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProductionVariantInstanceType
instanceType
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ProductionVariantStatus]
variantStatus
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
variantName

instance
  Prelude.NFData
    PendingProductionVariantSummary
  where
  rnf :: PendingProductionVariantSummary -> ()
rnf PendingProductionVariantSummary' {Maybe Double
Maybe Natural
Maybe [DeployedImage]
Maybe [ProductionVariantStatus]
Maybe ProductionVariantAcceleratorType
Maybe ProductionVariantInstanceType
Maybe ProductionVariantServerlessConfig
Text
variantName :: Text
variantStatus :: Maybe [ProductionVariantStatus]
instanceType :: Maybe ProductionVariantInstanceType
desiredWeight :: Maybe Double
desiredServerlessConfig :: Maybe ProductionVariantServerlessConfig
desiredInstanceCount :: Maybe Natural
deployedImages :: Maybe [DeployedImage]
currentWeight :: Maybe Double
currentServerlessConfig :: Maybe ProductionVariantServerlessConfig
currentInstanceCount :: Maybe Natural
acceleratorType :: Maybe ProductionVariantAcceleratorType
$sel:variantName:PendingProductionVariantSummary' :: PendingProductionVariantSummary -> Text
$sel:variantStatus:PendingProductionVariantSummary' :: PendingProductionVariantSummary -> Maybe [ProductionVariantStatus]
$sel:instanceType:PendingProductionVariantSummary' :: PendingProductionVariantSummary
-> Maybe ProductionVariantInstanceType
$sel:desiredWeight:PendingProductionVariantSummary' :: PendingProductionVariantSummary -> Maybe Double
$sel:desiredServerlessConfig:PendingProductionVariantSummary' :: PendingProductionVariantSummary
-> Maybe ProductionVariantServerlessConfig
$sel:desiredInstanceCount:PendingProductionVariantSummary' :: PendingProductionVariantSummary -> Maybe Natural
$sel:deployedImages:PendingProductionVariantSummary' :: PendingProductionVariantSummary -> Maybe [DeployedImage]
$sel:currentWeight:PendingProductionVariantSummary' :: PendingProductionVariantSummary -> Maybe Double
$sel:currentServerlessConfig:PendingProductionVariantSummary' :: PendingProductionVariantSummary
-> Maybe ProductionVariantServerlessConfig
$sel:currentInstanceCount:PendingProductionVariantSummary' :: PendingProductionVariantSummary -> Maybe Natural
$sel:acceleratorType:PendingProductionVariantSummary' :: PendingProductionVariantSummary
-> 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
currentInstanceCount
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ProductionVariantServerlessConfig
currentServerlessConfig
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
currentWeight
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [DeployedImage]
deployedImages
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
desiredInstanceCount
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ProductionVariantServerlessConfig
desiredServerlessConfig
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
desiredWeight
      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 [ProductionVariantStatus]
variantStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
variantName