{-# 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.CodeDeploy.Types.ECSTaskSet
-- 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.CodeDeploy.Types.ECSTaskSet where

import Amazonka.CodeDeploy.Types.TargetGroupInfo
import Amazonka.CodeDeploy.Types.TargetLabel
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Information about a set of Amazon ECS tasks in an AWS CodeDeploy
-- deployment. An Amazon ECS task set includes details such as the desired
-- number of tasks, how many tasks are running, and whether the task set
-- serves production traffic. An AWS CodeDeploy application that uses the
-- Amazon ECS compute platform deploys a containerized application in an
-- Amazon ECS service as a task set.
--
-- /See:/ 'newECSTaskSet' smart constructor.
data ECSTaskSet = ECSTaskSet'
  { -- | The number of tasks in the task set that are in the @RUNNING@ status
    -- during an Amazon ECS deployment. A task in the @RUNNING@ state is
    -- running and ready for use.
    ECSTaskSet -> Maybe Integer
runningCount :: Prelude.Maybe Prelude.Integer,
    -- | The status of the task set. There are three valid task set statuses:
    --
    -- -   @PRIMARY@: Indicates the task set is serving production traffic.
    --
    -- -   @ACTIVE@: Indicates the task set is not serving production traffic.
    --
    -- -   @DRAINING@: Indicates the tasks in the task set are being stopped
    --     and their corresponding targets are being deregistered from their
    --     target group.
    ECSTaskSet -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | A unique ID of an @ECSTaskSet@.
    ECSTaskSet -> Maybe Text
identifer :: Prelude.Maybe Prelude.Text,
    -- | The number of tasks in a task set. During a deployment that uses the
    -- Amazon ECS compute type, CodeDeploy instructs Amazon ECS to create a new
    -- task set and uses this value to determine how many tasks to create.
    -- After the updated task set is created, CodeDeploy shifts traffic to the
    -- new task set.
    ECSTaskSet -> Maybe Integer
desiredCount :: Prelude.Maybe Prelude.Integer,
    -- | The number of tasks in the task set that are in the @PENDING@ status
    -- during an Amazon ECS deployment. A task in the @PENDING@ state is
    -- preparing to enter the @RUNNING@ state. A task set enters the @PENDING@
    -- status when it launches for the first time, or when it is restarted
    -- after being in the @STOPPED@ state.
    ECSTaskSet -> Maybe Integer
pendingCount :: Prelude.Maybe Prelude.Integer,
    -- | The percentage of traffic served by this task set.
    ECSTaskSet -> Maybe Double
trafficWeight :: Prelude.Maybe Prelude.Double,
    -- | The target group associated with the task set. The target group is used
    -- by AWS CodeDeploy to manage traffic to a task set.
    ECSTaskSet -> Maybe TargetGroupInfo
targetGroup :: Prelude.Maybe TargetGroupInfo,
    -- | A label that identifies whether the ECS task set is an original target
    -- (@BLUE@) or a replacement target (@GREEN@).
    ECSTaskSet -> Maybe TargetLabel
taskSetLabel :: Prelude.Maybe TargetLabel
  }
  deriving (ECSTaskSet -> ECSTaskSet -> Bool
(ECSTaskSet -> ECSTaskSet -> Bool)
-> (ECSTaskSet -> ECSTaskSet -> Bool) -> Eq ECSTaskSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ECSTaskSet -> ECSTaskSet -> Bool
$c/= :: ECSTaskSet -> ECSTaskSet -> Bool
== :: ECSTaskSet -> ECSTaskSet -> Bool
$c== :: ECSTaskSet -> ECSTaskSet -> Bool
Prelude.Eq, ReadPrec [ECSTaskSet]
ReadPrec ECSTaskSet
Int -> ReadS ECSTaskSet
ReadS [ECSTaskSet]
(Int -> ReadS ECSTaskSet)
-> ReadS [ECSTaskSet]
-> ReadPrec ECSTaskSet
-> ReadPrec [ECSTaskSet]
-> Read ECSTaskSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ECSTaskSet]
$creadListPrec :: ReadPrec [ECSTaskSet]
readPrec :: ReadPrec ECSTaskSet
$creadPrec :: ReadPrec ECSTaskSet
readList :: ReadS [ECSTaskSet]
$creadList :: ReadS [ECSTaskSet]
readsPrec :: Int -> ReadS ECSTaskSet
$creadsPrec :: Int -> ReadS ECSTaskSet
Prelude.Read, Int -> ECSTaskSet -> ShowS
[ECSTaskSet] -> ShowS
ECSTaskSet -> String
(Int -> ECSTaskSet -> ShowS)
-> (ECSTaskSet -> String)
-> ([ECSTaskSet] -> ShowS)
-> Show ECSTaskSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ECSTaskSet] -> ShowS
$cshowList :: [ECSTaskSet] -> ShowS
show :: ECSTaskSet -> String
$cshow :: ECSTaskSet -> String
showsPrec :: Int -> ECSTaskSet -> ShowS
$cshowsPrec :: Int -> ECSTaskSet -> ShowS
Prelude.Show, (forall x. ECSTaskSet -> Rep ECSTaskSet x)
-> (forall x. Rep ECSTaskSet x -> ECSTaskSet) -> Generic ECSTaskSet
forall x. Rep ECSTaskSet x -> ECSTaskSet
forall x. ECSTaskSet -> Rep ECSTaskSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ECSTaskSet x -> ECSTaskSet
$cfrom :: forall x. ECSTaskSet -> Rep ECSTaskSet x
Prelude.Generic)

-- |
-- Create a value of 'ECSTaskSet' 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:
--
-- 'runningCount', 'eCSTaskSet_runningCount' - The number of tasks in the task set that are in the @RUNNING@ status
-- during an Amazon ECS deployment. A task in the @RUNNING@ state is
-- running and ready for use.
--
-- 'status', 'eCSTaskSet_status' - The status of the task set. There are three valid task set statuses:
--
-- -   @PRIMARY@: Indicates the task set is serving production traffic.
--
-- -   @ACTIVE@: Indicates the task set is not serving production traffic.
--
-- -   @DRAINING@: Indicates the tasks in the task set are being stopped
--     and their corresponding targets are being deregistered from their
--     target group.
--
-- 'identifer', 'eCSTaskSet_identifer' - A unique ID of an @ECSTaskSet@.
--
-- 'desiredCount', 'eCSTaskSet_desiredCount' - The number of tasks in a task set. During a deployment that uses the
-- Amazon ECS compute type, CodeDeploy instructs Amazon ECS to create a new
-- task set and uses this value to determine how many tasks to create.
-- After the updated task set is created, CodeDeploy shifts traffic to the
-- new task set.
--
-- 'pendingCount', 'eCSTaskSet_pendingCount' - The number of tasks in the task set that are in the @PENDING@ status
-- during an Amazon ECS deployment. A task in the @PENDING@ state is
-- preparing to enter the @RUNNING@ state. A task set enters the @PENDING@
-- status when it launches for the first time, or when it is restarted
-- after being in the @STOPPED@ state.
--
-- 'trafficWeight', 'eCSTaskSet_trafficWeight' - The percentage of traffic served by this task set.
--
-- 'targetGroup', 'eCSTaskSet_targetGroup' - The target group associated with the task set. The target group is used
-- by AWS CodeDeploy to manage traffic to a task set.
--
-- 'taskSetLabel', 'eCSTaskSet_taskSetLabel' - A label that identifies whether the ECS task set is an original target
-- (@BLUE@) or a replacement target (@GREEN@).
newECSTaskSet ::
  ECSTaskSet
newECSTaskSet :: ECSTaskSet
newECSTaskSet =
  ECSTaskSet' :: Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Integer
-> Maybe Double
-> Maybe TargetGroupInfo
-> Maybe TargetLabel
-> ECSTaskSet
ECSTaskSet'
    { $sel:runningCount:ECSTaskSet' :: Maybe Integer
runningCount = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:status:ECSTaskSet' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:identifer:ECSTaskSet' :: Maybe Text
identifer = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:desiredCount:ECSTaskSet' :: Maybe Integer
desiredCount = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:pendingCount:ECSTaskSet' :: Maybe Integer
pendingCount = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:trafficWeight:ECSTaskSet' :: Maybe Double
trafficWeight = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:targetGroup:ECSTaskSet' :: Maybe TargetGroupInfo
targetGroup = Maybe TargetGroupInfo
forall a. Maybe a
Prelude.Nothing,
      $sel:taskSetLabel:ECSTaskSet' :: Maybe TargetLabel
taskSetLabel = Maybe TargetLabel
forall a. Maybe a
Prelude.Nothing
    }

-- | The number of tasks in the task set that are in the @RUNNING@ status
-- during an Amazon ECS deployment. A task in the @RUNNING@ state is
-- running and ready for use.
eCSTaskSet_runningCount :: Lens.Lens' ECSTaskSet (Prelude.Maybe Prelude.Integer)
eCSTaskSet_runningCount :: (Maybe Integer -> f (Maybe Integer)) -> ECSTaskSet -> f ECSTaskSet
eCSTaskSet_runningCount = (ECSTaskSet -> Maybe Integer)
-> (ECSTaskSet -> Maybe Integer -> ECSTaskSet)
-> Lens ECSTaskSet ECSTaskSet (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ECSTaskSet' {Maybe Integer
runningCount :: Maybe Integer
$sel:runningCount:ECSTaskSet' :: ECSTaskSet -> Maybe Integer
runningCount} -> Maybe Integer
runningCount) (\s :: ECSTaskSet
s@ECSTaskSet' {} Maybe Integer
a -> ECSTaskSet
s {$sel:runningCount:ECSTaskSet' :: Maybe Integer
runningCount = Maybe Integer
a} :: ECSTaskSet)

-- | The status of the task set. There are three valid task set statuses:
--
-- -   @PRIMARY@: Indicates the task set is serving production traffic.
--
-- -   @ACTIVE@: Indicates the task set is not serving production traffic.
--
-- -   @DRAINING@: Indicates the tasks in the task set are being stopped
--     and their corresponding targets are being deregistered from their
--     target group.
eCSTaskSet_status :: Lens.Lens' ECSTaskSet (Prelude.Maybe Prelude.Text)
eCSTaskSet_status :: (Maybe Text -> f (Maybe Text)) -> ECSTaskSet -> f ECSTaskSet
eCSTaskSet_status = (ECSTaskSet -> Maybe Text)
-> (ECSTaskSet -> Maybe Text -> ECSTaskSet)
-> Lens ECSTaskSet ECSTaskSet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ECSTaskSet' {Maybe Text
status :: Maybe Text
$sel:status:ECSTaskSet' :: ECSTaskSet -> Maybe Text
status} -> Maybe Text
status) (\s :: ECSTaskSet
s@ECSTaskSet' {} Maybe Text
a -> ECSTaskSet
s {$sel:status:ECSTaskSet' :: Maybe Text
status = Maybe Text
a} :: ECSTaskSet)

-- | A unique ID of an @ECSTaskSet@.
eCSTaskSet_identifer :: Lens.Lens' ECSTaskSet (Prelude.Maybe Prelude.Text)
eCSTaskSet_identifer :: (Maybe Text -> f (Maybe Text)) -> ECSTaskSet -> f ECSTaskSet
eCSTaskSet_identifer = (ECSTaskSet -> Maybe Text)
-> (ECSTaskSet -> Maybe Text -> ECSTaskSet)
-> Lens ECSTaskSet ECSTaskSet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ECSTaskSet' {Maybe Text
identifer :: Maybe Text
$sel:identifer:ECSTaskSet' :: ECSTaskSet -> Maybe Text
identifer} -> Maybe Text
identifer) (\s :: ECSTaskSet
s@ECSTaskSet' {} Maybe Text
a -> ECSTaskSet
s {$sel:identifer:ECSTaskSet' :: Maybe Text
identifer = Maybe Text
a} :: ECSTaskSet)

-- | The number of tasks in a task set. During a deployment that uses the
-- Amazon ECS compute type, CodeDeploy instructs Amazon ECS to create a new
-- task set and uses this value to determine how many tasks to create.
-- After the updated task set is created, CodeDeploy shifts traffic to the
-- new task set.
eCSTaskSet_desiredCount :: Lens.Lens' ECSTaskSet (Prelude.Maybe Prelude.Integer)
eCSTaskSet_desiredCount :: (Maybe Integer -> f (Maybe Integer)) -> ECSTaskSet -> f ECSTaskSet
eCSTaskSet_desiredCount = (ECSTaskSet -> Maybe Integer)
-> (ECSTaskSet -> Maybe Integer -> ECSTaskSet)
-> Lens ECSTaskSet ECSTaskSet (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ECSTaskSet' {Maybe Integer
desiredCount :: Maybe Integer
$sel:desiredCount:ECSTaskSet' :: ECSTaskSet -> Maybe Integer
desiredCount} -> Maybe Integer
desiredCount) (\s :: ECSTaskSet
s@ECSTaskSet' {} Maybe Integer
a -> ECSTaskSet
s {$sel:desiredCount:ECSTaskSet' :: Maybe Integer
desiredCount = Maybe Integer
a} :: ECSTaskSet)

-- | The number of tasks in the task set that are in the @PENDING@ status
-- during an Amazon ECS deployment. A task in the @PENDING@ state is
-- preparing to enter the @RUNNING@ state. A task set enters the @PENDING@
-- status when it launches for the first time, or when it is restarted
-- after being in the @STOPPED@ state.
eCSTaskSet_pendingCount :: Lens.Lens' ECSTaskSet (Prelude.Maybe Prelude.Integer)
eCSTaskSet_pendingCount :: (Maybe Integer -> f (Maybe Integer)) -> ECSTaskSet -> f ECSTaskSet
eCSTaskSet_pendingCount = (ECSTaskSet -> Maybe Integer)
-> (ECSTaskSet -> Maybe Integer -> ECSTaskSet)
-> Lens ECSTaskSet ECSTaskSet (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ECSTaskSet' {Maybe Integer
pendingCount :: Maybe Integer
$sel:pendingCount:ECSTaskSet' :: ECSTaskSet -> Maybe Integer
pendingCount} -> Maybe Integer
pendingCount) (\s :: ECSTaskSet
s@ECSTaskSet' {} Maybe Integer
a -> ECSTaskSet
s {$sel:pendingCount:ECSTaskSet' :: Maybe Integer
pendingCount = Maybe Integer
a} :: ECSTaskSet)

-- | The percentage of traffic served by this task set.
eCSTaskSet_trafficWeight :: Lens.Lens' ECSTaskSet (Prelude.Maybe Prelude.Double)
eCSTaskSet_trafficWeight :: (Maybe Double -> f (Maybe Double)) -> ECSTaskSet -> f ECSTaskSet
eCSTaskSet_trafficWeight = (ECSTaskSet -> Maybe Double)
-> (ECSTaskSet -> Maybe Double -> ECSTaskSet)
-> Lens ECSTaskSet ECSTaskSet (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ECSTaskSet' {Maybe Double
trafficWeight :: Maybe Double
$sel:trafficWeight:ECSTaskSet' :: ECSTaskSet -> Maybe Double
trafficWeight} -> Maybe Double
trafficWeight) (\s :: ECSTaskSet
s@ECSTaskSet' {} Maybe Double
a -> ECSTaskSet
s {$sel:trafficWeight:ECSTaskSet' :: Maybe Double
trafficWeight = Maybe Double
a} :: ECSTaskSet)

-- | The target group associated with the task set. The target group is used
-- by AWS CodeDeploy to manage traffic to a task set.
eCSTaskSet_targetGroup :: Lens.Lens' ECSTaskSet (Prelude.Maybe TargetGroupInfo)
eCSTaskSet_targetGroup :: (Maybe TargetGroupInfo -> f (Maybe TargetGroupInfo))
-> ECSTaskSet -> f ECSTaskSet
eCSTaskSet_targetGroup = (ECSTaskSet -> Maybe TargetGroupInfo)
-> (ECSTaskSet -> Maybe TargetGroupInfo -> ECSTaskSet)
-> Lens
     ECSTaskSet
     ECSTaskSet
     (Maybe TargetGroupInfo)
     (Maybe TargetGroupInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ECSTaskSet' {Maybe TargetGroupInfo
targetGroup :: Maybe TargetGroupInfo
$sel:targetGroup:ECSTaskSet' :: ECSTaskSet -> Maybe TargetGroupInfo
targetGroup} -> Maybe TargetGroupInfo
targetGroup) (\s :: ECSTaskSet
s@ECSTaskSet' {} Maybe TargetGroupInfo
a -> ECSTaskSet
s {$sel:targetGroup:ECSTaskSet' :: Maybe TargetGroupInfo
targetGroup = Maybe TargetGroupInfo
a} :: ECSTaskSet)

-- | A label that identifies whether the ECS task set is an original target
-- (@BLUE@) or a replacement target (@GREEN@).
eCSTaskSet_taskSetLabel :: Lens.Lens' ECSTaskSet (Prelude.Maybe TargetLabel)
eCSTaskSet_taskSetLabel :: (Maybe TargetLabel -> f (Maybe TargetLabel))
-> ECSTaskSet -> f ECSTaskSet
eCSTaskSet_taskSetLabel = (ECSTaskSet -> Maybe TargetLabel)
-> (ECSTaskSet -> Maybe TargetLabel -> ECSTaskSet)
-> Lens
     ECSTaskSet ECSTaskSet (Maybe TargetLabel) (Maybe TargetLabel)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ECSTaskSet' {Maybe TargetLabel
taskSetLabel :: Maybe TargetLabel
$sel:taskSetLabel:ECSTaskSet' :: ECSTaskSet -> Maybe TargetLabel
taskSetLabel} -> Maybe TargetLabel
taskSetLabel) (\s :: ECSTaskSet
s@ECSTaskSet' {} Maybe TargetLabel
a -> ECSTaskSet
s {$sel:taskSetLabel:ECSTaskSet' :: Maybe TargetLabel
taskSetLabel = Maybe TargetLabel
a} :: ECSTaskSet)

instance Core.FromJSON ECSTaskSet where
  parseJSON :: Value -> Parser ECSTaskSet
parseJSON =
    String
-> (Object -> Parser ECSTaskSet) -> Value -> Parser ECSTaskSet
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ECSTaskSet"
      ( \Object
x ->
          Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Integer
-> Maybe Double
-> Maybe TargetGroupInfo
-> Maybe TargetLabel
-> ECSTaskSet
ECSTaskSet'
            (Maybe Integer
 -> Maybe Text
 -> Maybe Text
 -> Maybe Integer
 -> Maybe Integer
 -> Maybe Double
 -> Maybe TargetGroupInfo
 -> Maybe TargetLabel
 -> ECSTaskSet)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe TargetGroupInfo
      -> Maybe TargetLabel
      -> ECSTaskSet)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"runningCount")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe TargetGroupInfo
   -> Maybe TargetLabel
   -> ECSTaskSet)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe TargetGroupInfo
      -> Maybe TargetLabel
      -> ECSTaskSet)
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
"status")
            Parser
  (Maybe Text
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe TargetGroupInfo
   -> Maybe TargetLabel
   -> ECSTaskSet)
-> Parser (Maybe Text)
-> Parser
     (Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe TargetGroupInfo
      -> Maybe TargetLabel
      -> ECSTaskSet)
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
"identifer")
            Parser
  (Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe TargetGroupInfo
   -> Maybe TargetLabel
   -> ECSTaskSet)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Integer
      -> Maybe Double
      -> Maybe TargetGroupInfo
      -> Maybe TargetLabel
      -> ECSTaskSet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"desiredCount")
            Parser
  (Maybe Integer
   -> Maybe Double
   -> Maybe TargetGroupInfo
   -> Maybe TargetLabel
   -> ECSTaskSet)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Double
      -> Maybe TargetGroupInfo -> Maybe TargetLabel -> ECSTaskSet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"pendingCount")
            Parser
  (Maybe Double
   -> Maybe TargetGroupInfo -> Maybe TargetLabel -> ECSTaskSet)
-> Parser (Maybe Double)
-> Parser
     (Maybe TargetGroupInfo -> Maybe TargetLabel -> ECSTaskSet)
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
"trafficWeight")
            Parser (Maybe TargetGroupInfo -> Maybe TargetLabel -> ECSTaskSet)
-> Parser (Maybe TargetGroupInfo)
-> Parser (Maybe TargetLabel -> ECSTaskSet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TargetGroupInfo)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"targetGroup")
            Parser (Maybe TargetLabel -> ECSTaskSet)
-> Parser (Maybe TargetLabel) -> Parser ECSTaskSet
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TargetLabel)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"taskSetLabel")
      )

instance Prelude.Hashable ECSTaskSet

instance Prelude.NFData ECSTaskSet