{-# 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.AppConfig.Types.DeploymentSummary
-- 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.AppConfig.Types.DeploymentSummary where

import Amazonka.AppConfig.Types.DeploymentState
import Amazonka.AppConfig.Types.GrowthType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Information about the deployment.
--
-- /See:/ 'newDeploymentSummary' smart constructor.
data DeploymentSummary = DeploymentSummary'
  { -- | The percentage of targets to receive a deployed configuration during
    -- each interval.
    DeploymentSummary -> Maybe Double
growthFactor :: Prelude.Maybe Prelude.Double,
    -- | The name of the configuration.
    DeploymentSummary -> Maybe Text
configurationName :: Prelude.Maybe Prelude.Text,
    -- | The state of the deployment.
    DeploymentSummary -> Maybe DeploymentState
state :: Prelude.Maybe DeploymentState,
    -- | The sequence number of the deployment.
    DeploymentSummary -> Maybe Int
deploymentNumber :: Prelude.Maybe Prelude.Int,
    -- | The version of the configuration.
    DeploymentSummary -> Maybe Text
configurationVersion :: Prelude.Maybe Prelude.Text,
    -- | The percentage of targets for which the deployment is available.
    DeploymentSummary -> Maybe Double
percentageComplete :: Prelude.Maybe Prelude.Double,
    -- | Time the deployment started.
    DeploymentSummary -> Maybe POSIX
startedAt :: Prelude.Maybe Core.POSIX,
    -- | Total amount of time the deployment lasted.
    DeploymentSummary -> Maybe Natural
deploymentDurationInMinutes :: Prelude.Maybe Prelude.Natural,
    -- | Time the deployment completed.
    DeploymentSummary -> Maybe POSIX
completedAt :: Prelude.Maybe Core.POSIX,
    -- | The amount of time AppConfig monitors for alarms before considering the
    -- deployment to be complete and no longer eligible for automatic roll
    -- back.
    DeploymentSummary -> Maybe Natural
finalBakeTimeInMinutes :: Prelude.Maybe Prelude.Natural,
    -- | The algorithm used to define how percentage grows over time.
    DeploymentSummary -> Maybe GrowthType
growthType :: Prelude.Maybe GrowthType
  }
  deriving (DeploymentSummary -> DeploymentSummary -> Bool
(DeploymentSummary -> DeploymentSummary -> Bool)
-> (DeploymentSummary -> DeploymentSummary -> Bool)
-> Eq DeploymentSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeploymentSummary -> DeploymentSummary -> Bool
$c/= :: DeploymentSummary -> DeploymentSummary -> Bool
== :: DeploymentSummary -> DeploymentSummary -> Bool
$c== :: DeploymentSummary -> DeploymentSummary -> Bool
Prelude.Eq, ReadPrec [DeploymentSummary]
ReadPrec DeploymentSummary
Int -> ReadS DeploymentSummary
ReadS [DeploymentSummary]
(Int -> ReadS DeploymentSummary)
-> ReadS [DeploymentSummary]
-> ReadPrec DeploymentSummary
-> ReadPrec [DeploymentSummary]
-> Read DeploymentSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeploymentSummary]
$creadListPrec :: ReadPrec [DeploymentSummary]
readPrec :: ReadPrec DeploymentSummary
$creadPrec :: ReadPrec DeploymentSummary
readList :: ReadS [DeploymentSummary]
$creadList :: ReadS [DeploymentSummary]
readsPrec :: Int -> ReadS DeploymentSummary
$creadsPrec :: Int -> ReadS DeploymentSummary
Prelude.Read, Int -> DeploymentSummary -> ShowS
[DeploymentSummary] -> ShowS
DeploymentSummary -> String
(Int -> DeploymentSummary -> ShowS)
-> (DeploymentSummary -> String)
-> ([DeploymentSummary] -> ShowS)
-> Show DeploymentSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeploymentSummary] -> ShowS
$cshowList :: [DeploymentSummary] -> ShowS
show :: DeploymentSummary -> String
$cshow :: DeploymentSummary -> String
showsPrec :: Int -> DeploymentSummary -> ShowS
$cshowsPrec :: Int -> DeploymentSummary -> ShowS
Prelude.Show, (forall x. DeploymentSummary -> Rep DeploymentSummary x)
-> (forall x. Rep DeploymentSummary x -> DeploymentSummary)
-> Generic DeploymentSummary
forall x. Rep DeploymentSummary x -> DeploymentSummary
forall x. DeploymentSummary -> Rep DeploymentSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeploymentSummary x -> DeploymentSummary
$cfrom :: forall x. DeploymentSummary -> Rep DeploymentSummary x
Prelude.Generic)

-- |
-- Create a value of 'DeploymentSummary' 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:
--
-- 'growthFactor', 'deploymentSummary_growthFactor' - The percentage of targets to receive a deployed configuration during
-- each interval.
--
-- 'configurationName', 'deploymentSummary_configurationName' - The name of the configuration.
--
-- 'state', 'deploymentSummary_state' - The state of the deployment.
--
-- 'deploymentNumber', 'deploymentSummary_deploymentNumber' - The sequence number of the deployment.
--
-- 'configurationVersion', 'deploymentSummary_configurationVersion' - The version of the configuration.
--
-- 'percentageComplete', 'deploymentSummary_percentageComplete' - The percentage of targets for which the deployment is available.
--
-- 'startedAt', 'deploymentSummary_startedAt' - Time the deployment started.
--
-- 'deploymentDurationInMinutes', 'deploymentSummary_deploymentDurationInMinutes' - Total amount of time the deployment lasted.
--
-- 'completedAt', 'deploymentSummary_completedAt' - Time the deployment completed.
--
-- 'finalBakeTimeInMinutes', 'deploymentSummary_finalBakeTimeInMinutes' - The amount of time AppConfig monitors for alarms before considering the
-- deployment to be complete and no longer eligible for automatic roll
-- back.
--
-- 'growthType', 'deploymentSummary_growthType' - The algorithm used to define how percentage grows over time.
newDeploymentSummary ::
  DeploymentSummary
newDeploymentSummary :: DeploymentSummary
newDeploymentSummary =
  DeploymentSummary' :: Maybe Double
-> Maybe Text
-> Maybe DeploymentState
-> Maybe Int
-> Maybe Text
-> Maybe Double
-> Maybe POSIX
-> Maybe Natural
-> Maybe POSIX
-> Maybe Natural
-> Maybe GrowthType
-> DeploymentSummary
DeploymentSummary'
    { $sel:growthFactor:DeploymentSummary' :: Maybe Double
growthFactor = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:configurationName:DeploymentSummary' :: Maybe Text
configurationName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:state:DeploymentSummary' :: Maybe DeploymentState
state = Maybe DeploymentState
forall a. Maybe a
Prelude.Nothing,
      $sel:deploymentNumber:DeploymentSummary' :: Maybe Int
deploymentNumber = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:configurationVersion:DeploymentSummary' :: Maybe Text
configurationVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:percentageComplete:DeploymentSummary' :: Maybe Double
percentageComplete = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:startedAt:DeploymentSummary' :: Maybe POSIX
startedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:deploymentDurationInMinutes:DeploymentSummary' :: Maybe Natural
deploymentDurationInMinutes = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:completedAt:DeploymentSummary' :: Maybe POSIX
completedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:finalBakeTimeInMinutes:DeploymentSummary' :: Maybe Natural
finalBakeTimeInMinutes = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:growthType:DeploymentSummary' :: Maybe GrowthType
growthType = Maybe GrowthType
forall a. Maybe a
Prelude.Nothing
    }

-- | The percentage of targets to receive a deployed configuration during
-- each interval.
deploymentSummary_growthFactor :: Lens.Lens' DeploymentSummary (Prelude.Maybe Prelude.Double)
deploymentSummary_growthFactor :: (Maybe Double -> f (Maybe Double))
-> DeploymentSummary -> f DeploymentSummary
deploymentSummary_growthFactor = (DeploymentSummary -> Maybe Double)
-> (DeploymentSummary -> Maybe Double -> DeploymentSummary)
-> Lens
     DeploymentSummary DeploymentSummary (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentSummary' {Maybe Double
growthFactor :: Maybe Double
$sel:growthFactor:DeploymentSummary' :: DeploymentSummary -> Maybe Double
growthFactor} -> Maybe Double
growthFactor) (\s :: DeploymentSummary
s@DeploymentSummary' {} Maybe Double
a -> DeploymentSummary
s {$sel:growthFactor:DeploymentSummary' :: Maybe Double
growthFactor = Maybe Double
a} :: DeploymentSummary)

-- | The name of the configuration.
deploymentSummary_configurationName :: Lens.Lens' DeploymentSummary (Prelude.Maybe Prelude.Text)
deploymentSummary_configurationName :: (Maybe Text -> f (Maybe Text))
-> DeploymentSummary -> f DeploymentSummary
deploymentSummary_configurationName = (DeploymentSummary -> Maybe Text)
-> (DeploymentSummary -> Maybe Text -> DeploymentSummary)
-> Lens
     DeploymentSummary DeploymentSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentSummary' {Maybe Text
configurationName :: Maybe Text
$sel:configurationName:DeploymentSummary' :: DeploymentSummary -> Maybe Text
configurationName} -> Maybe Text
configurationName) (\s :: DeploymentSummary
s@DeploymentSummary' {} Maybe Text
a -> DeploymentSummary
s {$sel:configurationName:DeploymentSummary' :: Maybe Text
configurationName = Maybe Text
a} :: DeploymentSummary)

-- | The state of the deployment.
deploymentSummary_state :: Lens.Lens' DeploymentSummary (Prelude.Maybe DeploymentState)
deploymentSummary_state :: (Maybe DeploymentState -> f (Maybe DeploymentState))
-> DeploymentSummary -> f DeploymentSummary
deploymentSummary_state = (DeploymentSummary -> Maybe DeploymentState)
-> (DeploymentSummary
    -> Maybe DeploymentState -> DeploymentSummary)
-> Lens
     DeploymentSummary
     DeploymentSummary
     (Maybe DeploymentState)
     (Maybe DeploymentState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentSummary' {Maybe DeploymentState
state :: Maybe DeploymentState
$sel:state:DeploymentSummary' :: DeploymentSummary -> Maybe DeploymentState
state} -> Maybe DeploymentState
state) (\s :: DeploymentSummary
s@DeploymentSummary' {} Maybe DeploymentState
a -> DeploymentSummary
s {$sel:state:DeploymentSummary' :: Maybe DeploymentState
state = Maybe DeploymentState
a} :: DeploymentSummary)

-- | The sequence number of the deployment.
deploymentSummary_deploymentNumber :: Lens.Lens' DeploymentSummary (Prelude.Maybe Prelude.Int)
deploymentSummary_deploymentNumber :: (Maybe Int -> f (Maybe Int))
-> DeploymentSummary -> f DeploymentSummary
deploymentSummary_deploymentNumber = (DeploymentSummary -> Maybe Int)
-> (DeploymentSummary -> Maybe Int -> DeploymentSummary)
-> Lens DeploymentSummary DeploymentSummary (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentSummary' {Maybe Int
deploymentNumber :: Maybe Int
$sel:deploymentNumber:DeploymentSummary' :: DeploymentSummary -> Maybe Int
deploymentNumber} -> Maybe Int
deploymentNumber) (\s :: DeploymentSummary
s@DeploymentSummary' {} Maybe Int
a -> DeploymentSummary
s {$sel:deploymentNumber:DeploymentSummary' :: Maybe Int
deploymentNumber = Maybe Int
a} :: DeploymentSummary)

-- | The version of the configuration.
deploymentSummary_configurationVersion :: Lens.Lens' DeploymentSummary (Prelude.Maybe Prelude.Text)
deploymentSummary_configurationVersion :: (Maybe Text -> f (Maybe Text))
-> DeploymentSummary -> f DeploymentSummary
deploymentSummary_configurationVersion = (DeploymentSummary -> Maybe Text)
-> (DeploymentSummary -> Maybe Text -> DeploymentSummary)
-> Lens
     DeploymentSummary DeploymentSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentSummary' {Maybe Text
configurationVersion :: Maybe Text
$sel:configurationVersion:DeploymentSummary' :: DeploymentSummary -> Maybe Text
configurationVersion} -> Maybe Text
configurationVersion) (\s :: DeploymentSummary
s@DeploymentSummary' {} Maybe Text
a -> DeploymentSummary
s {$sel:configurationVersion:DeploymentSummary' :: Maybe Text
configurationVersion = Maybe Text
a} :: DeploymentSummary)

-- | The percentage of targets for which the deployment is available.
deploymentSummary_percentageComplete :: Lens.Lens' DeploymentSummary (Prelude.Maybe Prelude.Double)
deploymentSummary_percentageComplete :: (Maybe Double -> f (Maybe Double))
-> DeploymentSummary -> f DeploymentSummary
deploymentSummary_percentageComplete = (DeploymentSummary -> Maybe Double)
-> (DeploymentSummary -> Maybe Double -> DeploymentSummary)
-> Lens
     DeploymentSummary DeploymentSummary (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentSummary' {Maybe Double
percentageComplete :: Maybe Double
$sel:percentageComplete:DeploymentSummary' :: DeploymentSummary -> Maybe Double
percentageComplete} -> Maybe Double
percentageComplete) (\s :: DeploymentSummary
s@DeploymentSummary' {} Maybe Double
a -> DeploymentSummary
s {$sel:percentageComplete:DeploymentSummary' :: Maybe Double
percentageComplete = Maybe Double
a} :: DeploymentSummary)

-- | Time the deployment started.
deploymentSummary_startedAt :: Lens.Lens' DeploymentSummary (Prelude.Maybe Prelude.UTCTime)
deploymentSummary_startedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DeploymentSummary -> f DeploymentSummary
deploymentSummary_startedAt = (DeploymentSummary -> Maybe POSIX)
-> (DeploymentSummary -> Maybe POSIX -> DeploymentSummary)
-> Lens
     DeploymentSummary DeploymentSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentSummary' {Maybe POSIX
startedAt :: Maybe POSIX
$sel:startedAt:DeploymentSummary' :: DeploymentSummary -> Maybe POSIX
startedAt} -> Maybe POSIX
startedAt) (\s :: DeploymentSummary
s@DeploymentSummary' {} Maybe POSIX
a -> DeploymentSummary
s {$sel:startedAt:DeploymentSummary' :: Maybe POSIX
startedAt = Maybe POSIX
a} :: DeploymentSummary) ((Maybe POSIX -> f (Maybe POSIX))
 -> DeploymentSummary -> f DeploymentSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DeploymentSummary
-> f DeploymentSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Total amount of time the deployment lasted.
deploymentSummary_deploymentDurationInMinutes :: Lens.Lens' DeploymentSummary (Prelude.Maybe Prelude.Natural)
deploymentSummary_deploymentDurationInMinutes :: (Maybe Natural -> f (Maybe Natural))
-> DeploymentSummary -> f DeploymentSummary
deploymentSummary_deploymentDurationInMinutes = (DeploymentSummary -> Maybe Natural)
-> (DeploymentSummary -> Maybe Natural -> DeploymentSummary)
-> Lens
     DeploymentSummary DeploymentSummary (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentSummary' {Maybe Natural
deploymentDurationInMinutes :: Maybe Natural
$sel:deploymentDurationInMinutes:DeploymentSummary' :: DeploymentSummary -> Maybe Natural
deploymentDurationInMinutes} -> Maybe Natural
deploymentDurationInMinutes) (\s :: DeploymentSummary
s@DeploymentSummary' {} Maybe Natural
a -> DeploymentSummary
s {$sel:deploymentDurationInMinutes:DeploymentSummary' :: Maybe Natural
deploymentDurationInMinutes = Maybe Natural
a} :: DeploymentSummary)

-- | Time the deployment completed.
deploymentSummary_completedAt :: Lens.Lens' DeploymentSummary (Prelude.Maybe Prelude.UTCTime)
deploymentSummary_completedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DeploymentSummary -> f DeploymentSummary
deploymentSummary_completedAt = (DeploymentSummary -> Maybe POSIX)
-> (DeploymentSummary -> Maybe POSIX -> DeploymentSummary)
-> Lens
     DeploymentSummary DeploymentSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentSummary' {Maybe POSIX
completedAt :: Maybe POSIX
$sel:completedAt:DeploymentSummary' :: DeploymentSummary -> Maybe POSIX
completedAt} -> Maybe POSIX
completedAt) (\s :: DeploymentSummary
s@DeploymentSummary' {} Maybe POSIX
a -> DeploymentSummary
s {$sel:completedAt:DeploymentSummary' :: Maybe POSIX
completedAt = Maybe POSIX
a} :: DeploymentSummary) ((Maybe POSIX -> f (Maybe POSIX))
 -> DeploymentSummary -> f DeploymentSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DeploymentSummary
-> f DeploymentSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The amount of time AppConfig monitors for alarms before considering the
-- deployment to be complete and no longer eligible for automatic roll
-- back.
deploymentSummary_finalBakeTimeInMinutes :: Lens.Lens' DeploymentSummary (Prelude.Maybe Prelude.Natural)
deploymentSummary_finalBakeTimeInMinutes :: (Maybe Natural -> f (Maybe Natural))
-> DeploymentSummary -> f DeploymentSummary
deploymentSummary_finalBakeTimeInMinutes = (DeploymentSummary -> Maybe Natural)
-> (DeploymentSummary -> Maybe Natural -> DeploymentSummary)
-> Lens
     DeploymentSummary DeploymentSummary (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentSummary' {Maybe Natural
finalBakeTimeInMinutes :: Maybe Natural
$sel:finalBakeTimeInMinutes:DeploymentSummary' :: DeploymentSummary -> Maybe Natural
finalBakeTimeInMinutes} -> Maybe Natural
finalBakeTimeInMinutes) (\s :: DeploymentSummary
s@DeploymentSummary' {} Maybe Natural
a -> DeploymentSummary
s {$sel:finalBakeTimeInMinutes:DeploymentSummary' :: Maybe Natural
finalBakeTimeInMinutes = Maybe Natural
a} :: DeploymentSummary)

-- | The algorithm used to define how percentage grows over time.
deploymentSummary_growthType :: Lens.Lens' DeploymentSummary (Prelude.Maybe GrowthType)
deploymentSummary_growthType :: (Maybe GrowthType -> f (Maybe GrowthType))
-> DeploymentSummary -> f DeploymentSummary
deploymentSummary_growthType = (DeploymentSummary -> Maybe GrowthType)
-> (DeploymentSummary -> Maybe GrowthType -> DeploymentSummary)
-> Lens
     DeploymentSummary
     DeploymentSummary
     (Maybe GrowthType)
     (Maybe GrowthType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentSummary' {Maybe GrowthType
growthType :: Maybe GrowthType
$sel:growthType:DeploymentSummary' :: DeploymentSummary -> Maybe GrowthType
growthType} -> Maybe GrowthType
growthType) (\s :: DeploymentSummary
s@DeploymentSummary' {} Maybe GrowthType
a -> DeploymentSummary
s {$sel:growthType:DeploymentSummary' :: Maybe GrowthType
growthType = Maybe GrowthType
a} :: DeploymentSummary)

instance Core.FromJSON DeploymentSummary where
  parseJSON :: Value -> Parser DeploymentSummary
parseJSON =
    String
-> (Object -> Parser DeploymentSummary)
-> Value
-> Parser DeploymentSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"DeploymentSummary"
      ( \Object
x ->
          Maybe Double
-> Maybe Text
-> Maybe DeploymentState
-> Maybe Int
-> Maybe Text
-> Maybe Double
-> Maybe POSIX
-> Maybe Natural
-> Maybe POSIX
-> Maybe Natural
-> Maybe GrowthType
-> DeploymentSummary
DeploymentSummary'
            (Maybe Double
 -> Maybe Text
 -> Maybe DeploymentState
 -> Maybe Int
 -> Maybe Text
 -> Maybe Double
 -> Maybe POSIX
 -> Maybe Natural
 -> Maybe POSIX
 -> Maybe Natural
 -> Maybe GrowthType
 -> DeploymentSummary)
-> Parser (Maybe Double)
-> Parser
     (Maybe Text
      -> Maybe DeploymentState
      -> Maybe Int
      -> Maybe Text
      -> Maybe Double
      -> Maybe POSIX
      -> Maybe Natural
      -> Maybe POSIX
      -> Maybe Natural
      -> Maybe GrowthType
      -> DeploymentSummary)
forall (f :: * -> *) a b. Functor 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
"GrowthFactor")
            Parser
  (Maybe Text
   -> Maybe DeploymentState
   -> Maybe Int
   -> Maybe Text
   -> Maybe Double
   -> Maybe POSIX
   -> Maybe Natural
   -> Maybe POSIX
   -> Maybe Natural
   -> Maybe GrowthType
   -> DeploymentSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe DeploymentState
      -> Maybe Int
      -> Maybe Text
      -> Maybe Double
      -> Maybe POSIX
      -> Maybe Natural
      -> Maybe POSIX
      -> Maybe Natural
      -> Maybe GrowthType
      -> DeploymentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ConfigurationName")
            Parser
  (Maybe DeploymentState
   -> Maybe Int
   -> Maybe Text
   -> Maybe Double
   -> Maybe POSIX
   -> Maybe Natural
   -> Maybe POSIX
   -> Maybe Natural
   -> Maybe GrowthType
   -> DeploymentSummary)
-> Parser (Maybe DeploymentState)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Double
      -> Maybe POSIX
      -> Maybe Natural
      -> Maybe POSIX
      -> Maybe Natural
      -> Maybe GrowthType
      -> DeploymentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DeploymentState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"State")
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Double
   -> Maybe POSIX
   -> Maybe Natural
   -> Maybe POSIX
   -> Maybe Natural
   -> Maybe GrowthType
   -> DeploymentSummary)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Double
      -> Maybe POSIX
      -> Maybe Natural
      -> Maybe POSIX
      -> Maybe Natural
      -> Maybe GrowthType
      -> DeploymentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DeploymentNumber")
            Parser
  (Maybe Text
   -> Maybe Double
   -> Maybe POSIX
   -> Maybe Natural
   -> Maybe POSIX
   -> Maybe Natural
   -> Maybe GrowthType
   -> DeploymentSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Double
      -> Maybe POSIX
      -> Maybe Natural
      -> Maybe POSIX
      -> Maybe Natural
      -> Maybe GrowthType
      -> DeploymentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ConfigurationVersion")
            Parser
  (Maybe Double
   -> Maybe POSIX
   -> Maybe Natural
   -> Maybe POSIX
   -> Maybe Natural
   -> Maybe GrowthType
   -> DeploymentSummary)
-> Parser (Maybe Double)
-> Parser
     (Maybe POSIX
      -> Maybe Natural
      -> Maybe POSIX
      -> Maybe Natural
      -> Maybe GrowthType
      -> DeploymentSummary)
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
"PercentageComplete")
            Parser
  (Maybe POSIX
   -> Maybe Natural
   -> Maybe POSIX
   -> Maybe Natural
   -> Maybe GrowthType
   -> DeploymentSummary)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Natural
      -> Maybe POSIX
      -> Maybe Natural
      -> Maybe GrowthType
      -> DeploymentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StartedAt")
            Parser
  (Maybe Natural
   -> Maybe POSIX
   -> Maybe Natural
   -> Maybe GrowthType
   -> DeploymentSummary)
-> Parser (Maybe Natural)
-> Parser
     (Maybe POSIX
      -> Maybe Natural -> Maybe GrowthType -> DeploymentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DeploymentDurationInMinutes")
            Parser
  (Maybe POSIX
   -> Maybe Natural -> Maybe GrowthType -> DeploymentSummary)
-> Parser (Maybe POSIX)
-> Parser (Maybe Natural -> Maybe GrowthType -> DeploymentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CompletedAt")
            Parser (Maybe Natural -> Maybe GrowthType -> DeploymentSummary)
-> Parser (Maybe Natural)
-> Parser (Maybe GrowthType -> DeploymentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FinalBakeTimeInMinutes")
            Parser (Maybe GrowthType -> DeploymentSummary)
-> Parser (Maybe GrowthType) -> Parser DeploymentSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe GrowthType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"GrowthType")
      )

instance Prelude.Hashable DeploymentSummary

instance Prelude.NFData DeploymentSummary