{-# 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.ECS.Types.TaskSet
-- 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.ECS.Types.TaskSet where

import qualified Amazonka.Core as Core
import Amazonka.ECS.Types.CapacityProviderStrategyItem
import Amazonka.ECS.Types.LaunchType
import Amazonka.ECS.Types.LoadBalancer
import Amazonka.ECS.Types.NetworkConfiguration
import Amazonka.ECS.Types.Scale
import Amazonka.ECS.Types.ServiceRegistry
import Amazonka.ECS.Types.StabilityStatus
import Amazonka.ECS.Types.Tag
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Information about a set of Amazon ECS tasks in either an CodeDeploy or
-- an @EXTERNAL@ 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.
--
-- /See:/ 'newTaskSet' smart constructor.
data TaskSet = TaskSet'
  { -- | The number of tasks in the task set that are in the @RUNNING@ status
    -- during a deployment. A task in the @RUNNING@ state is running and ready
    -- for use.
    TaskSet -> Maybe Int
runningCount :: Prelude.Maybe Prelude.Int,
    -- | The status of the task set. The following describes each state:
    --
    -- [PRIMARY]
    --     The task set is serving production traffic.
    --
    -- [ACTIVE]
    --     The task set is not serving production traffic.
    --
    -- [DRAINING]
    --     The tasks in the task set are being stopped and their corresponding
    --     targets are being deregistered from their target group.
    TaskSet -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the cluster that the service that
    -- hosts the task set exists in.
    TaskSet -> Maybe Text
clusterArn :: Prelude.Maybe Prelude.Text,
    -- | The computed desired count for the task set. This is calculated by
    -- multiplying the service\'s @desiredCount@ by the task set\'s @scale@
    -- percentage. The result is always rounded up. For example, if the
    -- computed desired count is 1.2, it rounds up to 2 tasks.
    TaskSet -> Maybe Int
computedDesiredCount :: Prelude.Maybe Prelude.Int,
    -- | The Unix timestamp for when the task set was created.
    TaskSet -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | The Fargate platform version on which the tasks in the task set are
    -- running. A platform version is only specified for tasks run on Fargate.
    -- For more information, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html Fargate platform versions>
    -- in the /Amazon Elastic Container Service Developer Guide/.
    TaskSet -> Maybe Text
platformVersion :: Prelude.Maybe Prelude.Text,
    -- | A floating-point percentage of the desired number of tasks to place and
    -- keep running in the task set.
    TaskSet -> Maybe Scale
scale :: Prelude.Maybe Scale,
    -- | Details on a load balancer that is used with a task set.
    TaskSet -> Maybe [LoadBalancer]
loadBalancers :: Prelude.Maybe [LoadBalancer],
    -- | The Unix timestamp for when the task set stability status was retrieved.
    TaskSet -> Maybe POSIX
stabilityStatusAt :: Prelude.Maybe Core.POSIX,
    -- | The number of tasks in the task set that are in the @PENDING@ status
    -- during a 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.
    TaskSet -> Maybe Int
pendingCount :: Prelude.Maybe Prelude.Int,
    -- | The Amazon Resource Name (ARN) of the task set.
    TaskSet -> Maybe Text
taskSetArn :: Prelude.Maybe Prelude.Text,
    -- | The tag specified when a task set is started. If the task set is created
    -- by an CodeDeploy deployment, the @startedBy@ parameter is @CODE_DEPLOY@.
    -- For a task set created for an external deployment, the startedBy field
    -- isn\'t used.
    TaskSet -> Maybe Text
startedBy :: Prelude.Maybe Prelude.Text,
    -- | The ID of the task set.
    TaskSet -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The launch type the tasks in the task set are using. For more
    -- information, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html Amazon ECS launch types>
    -- in the /Amazon Elastic Container Service Developer Guide/.
    TaskSet -> Maybe LaunchType
launchType :: Prelude.Maybe LaunchType,
    -- | The Unix timestamp for when the task set was last updated.
    TaskSet -> Maybe POSIX
updatedAt :: Prelude.Maybe Core.POSIX,
    -- | The Amazon Resource Name (ARN) of the service the task set exists in.
    TaskSet -> Maybe Text
serviceArn :: Prelude.Maybe Prelude.Text,
    -- | The task definition the task set is using.
    TaskSet -> Maybe Text
taskDefinition :: Prelude.Maybe Prelude.Text,
    -- | The external ID associated with the task set.
    --
    -- If a task set is created by an CodeDeploy deployment, the @externalId@
    -- parameter contains the CodeDeploy deployment ID.
    --
    -- If a task set is created for an external deployment and is associated
    -- with a service discovery registry, the @externalId@ parameter contains
    -- the @ECS_TASK_SET_EXTERNAL_ID@ Cloud Map attribute.
    TaskSet -> Maybe Text
externalId :: Prelude.Maybe Prelude.Text,
    -- | The network configuration for the task set.
    TaskSet -> Maybe NetworkConfiguration
networkConfiguration :: Prelude.Maybe NetworkConfiguration,
    -- | The details of the service discovery registries to assign to this task
    -- set. For more information, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html Service discovery>.
    TaskSet -> Maybe [ServiceRegistry]
serviceRegistries :: Prelude.Maybe [ServiceRegistry],
    -- | The capacity provider strategy associated with the task set.
    TaskSet -> Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy :: Prelude.Maybe [CapacityProviderStrategyItem],
    -- | The stability status, which indicates whether the task set has reached a
    -- steady state. If the following conditions are met, the task set will be
    -- in @STEADY_STATE@:
    --
    -- -   The task @runningCount@ is equal to the @computedDesiredCount@.
    --
    -- -   The @pendingCount@ is @0@.
    --
    -- -   There are no tasks running on container instances in the @DRAINING@
    --     status.
    --
    -- -   All tasks are reporting a healthy status from the load balancers,
    --     service discovery, and container health checks.
    --
    -- If any of those conditions are not met, the stability status returns
    -- @STABILIZING@.
    TaskSet -> Maybe StabilityStatus
stabilityStatus :: Prelude.Maybe StabilityStatus,
    -- | The metadata that you apply to the task set to help you categorize and
    -- organize them. Each tag consists of a key and an optional value, both of
    -- which you define.
    --
    -- The following basic restrictions apply to tags:
    --
    -- -   Maximum number of tags per resource - 50
    --
    -- -   For each resource, each tag key must be unique, and each tag key can
    --     have only one value.
    --
    -- -   Maximum key length - 128 Unicode characters in UTF-8
    --
    -- -   Maximum value length - 256 Unicode characters in UTF-8
    --
    -- -   If your tagging schema is used across multiple services and
    --     resources, remember that other services may have restrictions on
    --     allowed characters. Generally allowed characters are: letters,
    --     numbers, and spaces representable in UTF-8, and the following
    --     characters: + - = . _ : \/ \@.
    --
    -- -   Tag keys and values are case-sensitive.
    --
    -- -   Do not use @aws:@, @AWS:@, or any upper or lowercase combination of
    --     such as a prefix for either keys or values as it is reserved for
    --     Amazon Web Services use. You cannot edit or delete tag keys or
    --     values with this prefix. Tags with this prefix do not count against
    --     your tags per resource limit.
    TaskSet -> Maybe [Tag]
tags :: Prelude.Maybe [Tag]
  }
  deriving (TaskSet -> TaskSet -> Bool
(TaskSet -> TaskSet -> Bool)
-> (TaskSet -> TaskSet -> Bool) -> Eq TaskSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TaskSet -> TaskSet -> Bool
$c/= :: TaskSet -> TaskSet -> Bool
== :: TaskSet -> TaskSet -> Bool
$c== :: TaskSet -> TaskSet -> Bool
Prelude.Eq, ReadPrec [TaskSet]
ReadPrec TaskSet
Int -> ReadS TaskSet
ReadS [TaskSet]
(Int -> ReadS TaskSet)
-> ReadS [TaskSet]
-> ReadPrec TaskSet
-> ReadPrec [TaskSet]
-> Read TaskSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TaskSet]
$creadListPrec :: ReadPrec [TaskSet]
readPrec :: ReadPrec TaskSet
$creadPrec :: ReadPrec TaskSet
readList :: ReadS [TaskSet]
$creadList :: ReadS [TaskSet]
readsPrec :: Int -> ReadS TaskSet
$creadsPrec :: Int -> ReadS TaskSet
Prelude.Read, Int -> TaskSet -> ShowS
[TaskSet] -> ShowS
TaskSet -> String
(Int -> TaskSet -> ShowS)
-> (TaskSet -> String) -> ([TaskSet] -> ShowS) -> Show TaskSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TaskSet] -> ShowS
$cshowList :: [TaskSet] -> ShowS
show :: TaskSet -> String
$cshow :: TaskSet -> String
showsPrec :: Int -> TaskSet -> ShowS
$cshowsPrec :: Int -> TaskSet -> ShowS
Prelude.Show, (forall x. TaskSet -> Rep TaskSet x)
-> (forall x. Rep TaskSet x -> TaskSet) -> Generic TaskSet
forall x. Rep TaskSet x -> TaskSet
forall x. TaskSet -> Rep TaskSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TaskSet x -> TaskSet
$cfrom :: forall x. TaskSet -> Rep TaskSet x
Prelude.Generic)

-- |
-- Create a value of 'TaskSet' 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', 'taskSet_runningCount' - The number of tasks in the task set that are in the @RUNNING@ status
-- during a deployment. A task in the @RUNNING@ state is running and ready
-- for use.
--
-- 'status', 'taskSet_status' - The status of the task set. The following describes each state:
--
-- [PRIMARY]
--     The task set is serving production traffic.
--
-- [ACTIVE]
--     The task set is not serving production traffic.
--
-- [DRAINING]
--     The tasks in the task set are being stopped and their corresponding
--     targets are being deregistered from their target group.
--
-- 'clusterArn', 'taskSet_clusterArn' - The Amazon Resource Name (ARN) of the cluster that the service that
-- hosts the task set exists in.
--
-- 'computedDesiredCount', 'taskSet_computedDesiredCount' - The computed desired count for the task set. This is calculated by
-- multiplying the service\'s @desiredCount@ by the task set\'s @scale@
-- percentage. The result is always rounded up. For example, if the
-- computed desired count is 1.2, it rounds up to 2 tasks.
--
-- 'createdAt', 'taskSet_createdAt' - The Unix timestamp for when the task set was created.
--
-- 'platformVersion', 'taskSet_platformVersion' - The Fargate platform version on which the tasks in the task set are
-- running. A platform version is only specified for tasks run on Fargate.
-- For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html Fargate platform versions>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- 'scale', 'taskSet_scale' - A floating-point percentage of the desired number of tasks to place and
-- keep running in the task set.
--
-- 'loadBalancers', 'taskSet_loadBalancers' - Details on a load balancer that is used with a task set.
--
-- 'stabilityStatusAt', 'taskSet_stabilityStatusAt' - The Unix timestamp for when the task set stability status was retrieved.
--
-- 'pendingCount', 'taskSet_pendingCount' - The number of tasks in the task set that are in the @PENDING@ status
-- during a 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.
--
-- 'taskSetArn', 'taskSet_taskSetArn' - The Amazon Resource Name (ARN) of the task set.
--
-- 'startedBy', 'taskSet_startedBy' - The tag specified when a task set is started. If the task set is created
-- by an CodeDeploy deployment, the @startedBy@ parameter is @CODE_DEPLOY@.
-- For a task set created for an external deployment, the startedBy field
-- isn\'t used.
--
-- 'id', 'taskSet_id' - The ID of the task set.
--
-- 'launchType', 'taskSet_launchType' - The launch type the tasks in the task set are using. For more
-- information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html Amazon ECS launch types>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- 'updatedAt', 'taskSet_updatedAt' - The Unix timestamp for when the task set was last updated.
--
-- 'serviceArn', 'taskSet_serviceArn' - The Amazon Resource Name (ARN) of the service the task set exists in.
--
-- 'taskDefinition', 'taskSet_taskDefinition' - The task definition the task set is using.
--
-- 'externalId', 'taskSet_externalId' - The external ID associated with the task set.
--
-- If a task set is created by an CodeDeploy deployment, the @externalId@
-- parameter contains the CodeDeploy deployment ID.
--
-- If a task set is created for an external deployment and is associated
-- with a service discovery registry, the @externalId@ parameter contains
-- the @ECS_TASK_SET_EXTERNAL_ID@ Cloud Map attribute.
--
-- 'networkConfiguration', 'taskSet_networkConfiguration' - The network configuration for the task set.
--
-- 'serviceRegistries', 'taskSet_serviceRegistries' - The details of the service discovery registries to assign to this task
-- set. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html Service discovery>.
--
-- 'capacityProviderStrategy', 'taskSet_capacityProviderStrategy' - The capacity provider strategy associated with the task set.
--
-- 'stabilityStatus', 'taskSet_stabilityStatus' - The stability status, which indicates whether the task set has reached a
-- steady state. If the following conditions are met, the task set will be
-- in @STEADY_STATE@:
--
-- -   The task @runningCount@ is equal to the @computedDesiredCount@.
--
-- -   The @pendingCount@ is @0@.
--
-- -   There are no tasks running on container instances in the @DRAINING@
--     status.
--
-- -   All tasks are reporting a healthy status from the load balancers,
--     service discovery, and container health checks.
--
-- If any of those conditions are not met, the stability status returns
-- @STABILIZING@.
--
-- 'tags', 'taskSet_tags' - The metadata that you apply to the task set to help you categorize and
-- organize them. Each tag consists of a key and an optional value, both of
-- which you define.
--
-- The following basic restrictions apply to tags:
--
-- -   Maximum number of tags per resource - 50
--
-- -   For each resource, each tag key must be unique, and each tag key can
--     have only one value.
--
-- -   Maximum key length - 128 Unicode characters in UTF-8
--
-- -   Maximum value length - 256 Unicode characters in UTF-8
--
-- -   If your tagging schema is used across multiple services and
--     resources, remember that other services may have restrictions on
--     allowed characters. Generally allowed characters are: letters,
--     numbers, and spaces representable in UTF-8, and the following
--     characters: + - = . _ : \/ \@.
--
-- -   Tag keys and values are case-sensitive.
--
-- -   Do not use @aws:@, @AWS:@, or any upper or lowercase combination of
--     such as a prefix for either keys or values as it is reserved for
--     Amazon Web Services use. You cannot edit or delete tag keys or
--     values with this prefix. Tags with this prefix do not count against
--     your tags per resource limit.
newTaskSet ::
  TaskSet
newTaskSet :: TaskSet
newTaskSet =
  TaskSet' :: Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe POSIX
-> Maybe Text
-> Maybe Scale
-> Maybe [LoadBalancer]
-> Maybe POSIX
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe LaunchType
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe NetworkConfiguration
-> Maybe [ServiceRegistry]
-> Maybe [CapacityProviderStrategyItem]
-> Maybe StabilityStatus
-> Maybe [Tag]
-> TaskSet
TaskSet'
    { $sel:runningCount:TaskSet' :: Maybe Int
runningCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:status:TaskSet' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterArn:TaskSet' :: Maybe Text
clusterArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:computedDesiredCount:TaskSet' :: Maybe Int
computedDesiredCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:TaskSet' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:platformVersion:TaskSet' :: Maybe Text
platformVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:scale:TaskSet' :: Maybe Scale
scale = Maybe Scale
forall a. Maybe a
Prelude.Nothing,
      $sel:loadBalancers:TaskSet' :: Maybe [LoadBalancer]
loadBalancers = Maybe [LoadBalancer]
forall a. Maybe a
Prelude.Nothing,
      $sel:stabilityStatusAt:TaskSet' :: Maybe POSIX
stabilityStatusAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:pendingCount:TaskSet' :: Maybe Int
pendingCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:taskSetArn:TaskSet' :: Maybe Text
taskSetArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:startedBy:TaskSet' :: Maybe Text
startedBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:TaskSet' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:launchType:TaskSet' :: Maybe LaunchType
launchType = Maybe LaunchType
forall a. Maybe a
Prelude.Nothing,
      $sel:updatedAt:TaskSet' :: Maybe POSIX
updatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceArn:TaskSet' :: Maybe Text
serviceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:taskDefinition:TaskSet' :: Maybe Text
taskDefinition = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:externalId:TaskSet' :: Maybe Text
externalId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:networkConfiguration:TaskSet' :: Maybe NetworkConfiguration
networkConfiguration = Maybe NetworkConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceRegistries:TaskSet' :: Maybe [ServiceRegistry]
serviceRegistries = Maybe [ServiceRegistry]
forall a. Maybe a
Prelude.Nothing,
      $sel:capacityProviderStrategy:TaskSet' :: Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy = Maybe [CapacityProviderStrategyItem]
forall a. Maybe a
Prelude.Nothing,
      $sel:stabilityStatus:TaskSet' :: Maybe StabilityStatus
stabilityStatus = Maybe StabilityStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:TaskSet' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing
    }

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

-- | The status of the task set. The following describes each state:
--
-- [PRIMARY]
--     The task set is serving production traffic.
--
-- [ACTIVE]
--     The task set is not serving production traffic.
--
-- [DRAINING]
--     The tasks in the task set are being stopped and their corresponding
--     targets are being deregistered from their target group.
taskSet_status :: Lens.Lens' TaskSet (Prelude.Maybe Prelude.Text)
taskSet_status :: (Maybe Text -> f (Maybe Text)) -> TaskSet -> f TaskSet
taskSet_status = (TaskSet -> Maybe Text)
-> (TaskSet -> Maybe Text -> TaskSet)
-> Lens TaskSet TaskSet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskSet' {Maybe Text
status :: Maybe Text
$sel:status:TaskSet' :: TaskSet -> Maybe Text
status} -> Maybe Text
status) (\s :: TaskSet
s@TaskSet' {} Maybe Text
a -> TaskSet
s {$sel:status:TaskSet' :: Maybe Text
status = Maybe Text
a} :: TaskSet)

-- | The Amazon Resource Name (ARN) of the cluster that the service that
-- hosts the task set exists in.
taskSet_clusterArn :: Lens.Lens' TaskSet (Prelude.Maybe Prelude.Text)
taskSet_clusterArn :: (Maybe Text -> f (Maybe Text)) -> TaskSet -> f TaskSet
taskSet_clusterArn = (TaskSet -> Maybe Text)
-> (TaskSet -> Maybe Text -> TaskSet)
-> Lens TaskSet TaskSet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskSet' {Maybe Text
clusterArn :: Maybe Text
$sel:clusterArn:TaskSet' :: TaskSet -> Maybe Text
clusterArn} -> Maybe Text
clusterArn) (\s :: TaskSet
s@TaskSet' {} Maybe Text
a -> TaskSet
s {$sel:clusterArn:TaskSet' :: Maybe Text
clusterArn = Maybe Text
a} :: TaskSet)

-- | The computed desired count for the task set. This is calculated by
-- multiplying the service\'s @desiredCount@ by the task set\'s @scale@
-- percentage. The result is always rounded up. For example, if the
-- computed desired count is 1.2, it rounds up to 2 tasks.
taskSet_computedDesiredCount :: Lens.Lens' TaskSet (Prelude.Maybe Prelude.Int)
taskSet_computedDesiredCount :: (Maybe Int -> f (Maybe Int)) -> TaskSet -> f TaskSet
taskSet_computedDesiredCount = (TaskSet -> Maybe Int)
-> (TaskSet -> Maybe Int -> TaskSet)
-> Lens TaskSet TaskSet (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskSet' {Maybe Int
computedDesiredCount :: Maybe Int
$sel:computedDesiredCount:TaskSet' :: TaskSet -> Maybe Int
computedDesiredCount} -> Maybe Int
computedDesiredCount) (\s :: TaskSet
s@TaskSet' {} Maybe Int
a -> TaskSet
s {$sel:computedDesiredCount:TaskSet' :: Maybe Int
computedDesiredCount = Maybe Int
a} :: TaskSet)

-- | The Unix timestamp for when the task set was created.
taskSet_createdAt :: Lens.Lens' TaskSet (Prelude.Maybe Prelude.UTCTime)
taskSet_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> TaskSet -> f TaskSet
taskSet_createdAt = (TaskSet -> Maybe POSIX)
-> (TaskSet -> Maybe POSIX -> TaskSet)
-> Lens TaskSet TaskSet (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskSet' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:TaskSet' :: TaskSet -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: TaskSet
s@TaskSet' {} Maybe POSIX
a -> TaskSet
s {$sel:createdAt:TaskSet' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: TaskSet) ((Maybe POSIX -> f (Maybe POSIX)) -> TaskSet -> f TaskSet)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> TaskSet
-> f TaskSet
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 Fargate platform version on which the tasks in the task set are
-- running. A platform version is only specified for tasks run on Fargate.
-- For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html Fargate platform versions>
-- in the /Amazon Elastic Container Service Developer Guide/.
taskSet_platformVersion :: Lens.Lens' TaskSet (Prelude.Maybe Prelude.Text)
taskSet_platformVersion :: (Maybe Text -> f (Maybe Text)) -> TaskSet -> f TaskSet
taskSet_platformVersion = (TaskSet -> Maybe Text)
-> (TaskSet -> Maybe Text -> TaskSet)
-> Lens TaskSet TaskSet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskSet' {Maybe Text
platformVersion :: Maybe Text
$sel:platformVersion:TaskSet' :: TaskSet -> Maybe Text
platformVersion} -> Maybe Text
platformVersion) (\s :: TaskSet
s@TaskSet' {} Maybe Text
a -> TaskSet
s {$sel:platformVersion:TaskSet' :: Maybe Text
platformVersion = Maybe Text
a} :: TaskSet)

-- | A floating-point percentage of the desired number of tasks to place and
-- keep running in the task set.
taskSet_scale :: Lens.Lens' TaskSet (Prelude.Maybe Scale)
taskSet_scale :: (Maybe Scale -> f (Maybe Scale)) -> TaskSet -> f TaskSet
taskSet_scale = (TaskSet -> Maybe Scale)
-> (TaskSet -> Maybe Scale -> TaskSet)
-> Lens TaskSet TaskSet (Maybe Scale) (Maybe Scale)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskSet' {Maybe Scale
scale :: Maybe Scale
$sel:scale:TaskSet' :: TaskSet -> Maybe Scale
scale} -> Maybe Scale
scale) (\s :: TaskSet
s@TaskSet' {} Maybe Scale
a -> TaskSet
s {$sel:scale:TaskSet' :: Maybe Scale
scale = Maybe Scale
a} :: TaskSet)

-- | Details on a load balancer that is used with a task set.
taskSet_loadBalancers :: Lens.Lens' TaskSet (Prelude.Maybe [LoadBalancer])
taskSet_loadBalancers :: (Maybe [LoadBalancer] -> f (Maybe [LoadBalancer]))
-> TaskSet -> f TaskSet
taskSet_loadBalancers = (TaskSet -> Maybe [LoadBalancer])
-> (TaskSet -> Maybe [LoadBalancer] -> TaskSet)
-> Lens
     TaskSet TaskSet (Maybe [LoadBalancer]) (Maybe [LoadBalancer])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskSet' {Maybe [LoadBalancer]
loadBalancers :: Maybe [LoadBalancer]
$sel:loadBalancers:TaskSet' :: TaskSet -> Maybe [LoadBalancer]
loadBalancers} -> Maybe [LoadBalancer]
loadBalancers) (\s :: TaskSet
s@TaskSet' {} Maybe [LoadBalancer]
a -> TaskSet
s {$sel:loadBalancers:TaskSet' :: Maybe [LoadBalancer]
loadBalancers = Maybe [LoadBalancer]
a} :: TaskSet) ((Maybe [LoadBalancer] -> f (Maybe [LoadBalancer]))
 -> TaskSet -> f TaskSet)
-> ((Maybe [LoadBalancer] -> f (Maybe [LoadBalancer]))
    -> Maybe [LoadBalancer] -> f (Maybe [LoadBalancer]))
-> (Maybe [LoadBalancer] -> f (Maybe [LoadBalancer]))
-> TaskSet
-> f TaskSet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [LoadBalancer] [LoadBalancer] [LoadBalancer] [LoadBalancer]
-> Iso
     (Maybe [LoadBalancer])
     (Maybe [LoadBalancer])
     (Maybe [LoadBalancer])
     (Maybe [LoadBalancer])
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 [LoadBalancer] [LoadBalancer] [LoadBalancer] [LoadBalancer]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Unix timestamp for when the task set stability status was retrieved.
taskSet_stabilityStatusAt :: Lens.Lens' TaskSet (Prelude.Maybe Prelude.UTCTime)
taskSet_stabilityStatusAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> TaskSet -> f TaskSet
taskSet_stabilityStatusAt = (TaskSet -> Maybe POSIX)
-> (TaskSet -> Maybe POSIX -> TaskSet)
-> Lens TaskSet TaskSet (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskSet' {Maybe POSIX
stabilityStatusAt :: Maybe POSIX
$sel:stabilityStatusAt:TaskSet' :: TaskSet -> Maybe POSIX
stabilityStatusAt} -> Maybe POSIX
stabilityStatusAt) (\s :: TaskSet
s@TaskSet' {} Maybe POSIX
a -> TaskSet
s {$sel:stabilityStatusAt:TaskSet' :: Maybe POSIX
stabilityStatusAt = Maybe POSIX
a} :: TaskSet) ((Maybe POSIX -> f (Maybe POSIX)) -> TaskSet -> f TaskSet)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> TaskSet
-> f TaskSet
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 number of tasks in the task set that are in the @PENDING@ status
-- during a 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.
taskSet_pendingCount :: Lens.Lens' TaskSet (Prelude.Maybe Prelude.Int)
taskSet_pendingCount :: (Maybe Int -> f (Maybe Int)) -> TaskSet -> f TaskSet
taskSet_pendingCount = (TaskSet -> Maybe Int)
-> (TaskSet -> Maybe Int -> TaskSet)
-> Lens TaskSet TaskSet (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskSet' {Maybe Int
pendingCount :: Maybe Int
$sel:pendingCount:TaskSet' :: TaskSet -> Maybe Int
pendingCount} -> Maybe Int
pendingCount) (\s :: TaskSet
s@TaskSet' {} Maybe Int
a -> TaskSet
s {$sel:pendingCount:TaskSet' :: Maybe Int
pendingCount = Maybe Int
a} :: TaskSet)

-- | The Amazon Resource Name (ARN) of the task set.
taskSet_taskSetArn :: Lens.Lens' TaskSet (Prelude.Maybe Prelude.Text)
taskSet_taskSetArn :: (Maybe Text -> f (Maybe Text)) -> TaskSet -> f TaskSet
taskSet_taskSetArn = (TaskSet -> Maybe Text)
-> (TaskSet -> Maybe Text -> TaskSet)
-> Lens TaskSet TaskSet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskSet' {Maybe Text
taskSetArn :: Maybe Text
$sel:taskSetArn:TaskSet' :: TaskSet -> Maybe Text
taskSetArn} -> Maybe Text
taskSetArn) (\s :: TaskSet
s@TaskSet' {} Maybe Text
a -> TaskSet
s {$sel:taskSetArn:TaskSet' :: Maybe Text
taskSetArn = Maybe Text
a} :: TaskSet)

-- | The tag specified when a task set is started. If the task set is created
-- by an CodeDeploy deployment, the @startedBy@ parameter is @CODE_DEPLOY@.
-- For a task set created for an external deployment, the startedBy field
-- isn\'t used.
taskSet_startedBy :: Lens.Lens' TaskSet (Prelude.Maybe Prelude.Text)
taskSet_startedBy :: (Maybe Text -> f (Maybe Text)) -> TaskSet -> f TaskSet
taskSet_startedBy = (TaskSet -> Maybe Text)
-> (TaskSet -> Maybe Text -> TaskSet)
-> Lens TaskSet TaskSet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskSet' {Maybe Text
startedBy :: Maybe Text
$sel:startedBy:TaskSet' :: TaskSet -> Maybe Text
startedBy} -> Maybe Text
startedBy) (\s :: TaskSet
s@TaskSet' {} Maybe Text
a -> TaskSet
s {$sel:startedBy:TaskSet' :: Maybe Text
startedBy = Maybe Text
a} :: TaskSet)

-- | The ID of the task set.
taskSet_id :: Lens.Lens' TaskSet (Prelude.Maybe Prelude.Text)
taskSet_id :: (Maybe Text -> f (Maybe Text)) -> TaskSet -> f TaskSet
taskSet_id = (TaskSet -> Maybe Text)
-> (TaskSet -> Maybe Text -> TaskSet)
-> Lens TaskSet TaskSet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskSet' {Maybe Text
id :: Maybe Text
$sel:id:TaskSet' :: TaskSet -> Maybe Text
id} -> Maybe Text
id) (\s :: TaskSet
s@TaskSet' {} Maybe Text
a -> TaskSet
s {$sel:id:TaskSet' :: Maybe Text
id = Maybe Text
a} :: TaskSet)

-- | The launch type the tasks in the task set are using. For more
-- information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html Amazon ECS launch types>
-- in the /Amazon Elastic Container Service Developer Guide/.
taskSet_launchType :: Lens.Lens' TaskSet (Prelude.Maybe LaunchType)
taskSet_launchType :: (Maybe LaunchType -> f (Maybe LaunchType)) -> TaskSet -> f TaskSet
taskSet_launchType = (TaskSet -> Maybe LaunchType)
-> (TaskSet -> Maybe LaunchType -> TaskSet)
-> Lens TaskSet TaskSet (Maybe LaunchType) (Maybe LaunchType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskSet' {Maybe LaunchType
launchType :: Maybe LaunchType
$sel:launchType:TaskSet' :: TaskSet -> Maybe LaunchType
launchType} -> Maybe LaunchType
launchType) (\s :: TaskSet
s@TaskSet' {} Maybe LaunchType
a -> TaskSet
s {$sel:launchType:TaskSet' :: Maybe LaunchType
launchType = Maybe LaunchType
a} :: TaskSet)

-- | The Unix timestamp for when the task set was last updated.
taskSet_updatedAt :: Lens.Lens' TaskSet (Prelude.Maybe Prelude.UTCTime)
taskSet_updatedAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> TaskSet -> f TaskSet
taskSet_updatedAt = (TaskSet -> Maybe POSIX)
-> (TaskSet -> Maybe POSIX -> TaskSet)
-> Lens TaskSet TaskSet (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskSet' {Maybe POSIX
updatedAt :: Maybe POSIX
$sel:updatedAt:TaskSet' :: TaskSet -> Maybe POSIX
updatedAt} -> Maybe POSIX
updatedAt) (\s :: TaskSet
s@TaskSet' {} Maybe POSIX
a -> TaskSet
s {$sel:updatedAt:TaskSet' :: Maybe POSIX
updatedAt = Maybe POSIX
a} :: TaskSet) ((Maybe POSIX -> f (Maybe POSIX)) -> TaskSet -> f TaskSet)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> TaskSet
-> f TaskSet
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 Amazon Resource Name (ARN) of the service the task set exists in.
taskSet_serviceArn :: Lens.Lens' TaskSet (Prelude.Maybe Prelude.Text)
taskSet_serviceArn :: (Maybe Text -> f (Maybe Text)) -> TaskSet -> f TaskSet
taskSet_serviceArn = (TaskSet -> Maybe Text)
-> (TaskSet -> Maybe Text -> TaskSet)
-> Lens TaskSet TaskSet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskSet' {Maybe Text
serviceArn :: Maybe Text
$sel:serviceArn:TaskSet' :: TaskSet -> Maybe Text
serviceArn} -> Maybe Text
serviceArn) (\s :: TaskSet
s@TaskSet' {} Maybe Text
a -> TaskSet
s {$sel:serviceArn:TaskSet' :: Maybe Text
serviceArn = Maybe Text
a} :: TaskSet)

-- | The task definition the task set is using.
taskSet_taskDefinition :: Lens.Lens' TaskSet (Prelude.Maybe Prelude.Text)
taskSet_taskDefinition :: (Maybe Text -> f (Maybe Text)) -> TaskSet -> f TaskSet
taskSet_taskDefinition = (TaskSet -> Maybe Text)
-> (TaskSet -> Maybe Text -> TaskSet)
-> Lens TaskSet TaskSet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskSet' {Maybe Text
taskDefinition :: Maybe Text
$sel:taskDefinition:TaskSet' :: TaskSet -> Maybe Text
taskDefinition} -> Maybe Text
taskDefinition) (\s :: TaskSet
s@TaskSet' {} Maybe Text
a -> TaskSet
s {$sel:taskDefinition:TaskSet' :: Maybe Text
taskDefinition = Maybe Text
a} :: TaskSet)

-- | The external ID associated with the task set.
--
-- If a task set is created by an CodeDeploy deployment, the @externalId@
-- parameter contains the CodeDeploy deployment ID.
--
-- If a task set is created for an external deployment and is associated
-- with a service discovery registry, the @externalId@ parameter contains
-- the @ECS_TASK_SET_EXTERNAL_ID@ Cloud Map attribute.
taskSet_externalId :: Lens.Lens' TaskSet (Prelude.Maybe Prelude.Text)
taskSet_externalId :: (Maybe Text -> f (Maybe Text)) -> TaskSet -> f TaskSet
taskSet_externalId = (TaskSet -> Maybe Text)
-> (TaskSet -> Maybe Text -> TaskSet)
-> Lens TaskSet TaskSet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskSet' {Maybe Text
externalId :: Maybe Text
$sel:externalId:TaskSet' :: TaskSet -> Maybe Text
externalId} -> Maybe Text
externalId) (\s :: TaskSet
s@TaskSet' {} Maybe Text
a -> TaskSet
s {$sel:externalId:TaskSet' :: Maybe Text
externalId = Maybe Text
a} :: TaskSet)

-- | The network configuration for the task set.
taskSet_networkConfiguration :: Lens.Lens' TaskSet (Prelude.Maybe NetworkConfiguration)
taskSet_networkConfiguration :: (Maybe NetworkConfiguration -> f (Maybe NetworkConfiguration))
-> TaskSet -> f TaskSet
taskSet_networkConfiguration = (TaskSet -> Maybe NetworkConfiguration)
-> (TaskSet -> Maybe NetworkConfiguration -> TaskSet)
-> Lens
     TaskSet
     TaskSet
     (Maybe NetworkConfiguration)
     (Maybe NetworkConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskSet' {Maybe NetworkConfiguration
networkConfiguration :: Maybe NetworkConfiguration
$sel:networkConfiguration:TaskSet' :: TaskSet -> Maybe NetworkConfiguration
networkConfiguration} -> Maybe NetworkConfiguration
networkConfiguration) (\s :: TaskSet
s@TaskSet' {} Maybe NetworkConfiguration
a -> TaskSet
s {$sel:networkConfiguration:TaskSet' :: Maybe NetworkConfiguration
networkConfiguration = Maybe NetworkConfiguration
a} :: TaskSet)

-- | The details of the service discovery registries to assign to this task
-- set. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html Service discovery>.
taskSet_serviceRegistries :: Lens.Lens' TaskSet (Prelude.Maybe [ServiceRegistry])
taskSet_serviceRegistries :: (Maybe [ServiceRegistry] -> f (Maybe [ServiceRegistry]))
-> TaskSet -> f TaskSet
taskSet_serviceRegistries = (TaskSet -> Maybe [ServiceRegistry])
-> (TaskSet -> Maybe [ServiceRegistry] -> TaskSet)
-> Lens
     TaskSet TaskSet (Maybe [ServiceRegistry]) (Maybe [ServiceRegistry])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskSet' {Maybe [ServiceRegistry]
serviceRegistries :: Maybe [ServiceRegistry]
$sel:serviceRegistries:TaskSet' :: TaskSet -> Maybe [ServiceRegistry]
serviceRegistries} -> Maybe [ServiceRegistry]
serviceRegistries) (\s :: TaskSet
s@TaskSet' {} Maybe [ServiceRegistry]
a -> TaskSet
s {$sel:serviceRegistries:TaskSet' :: Maybe [ServiceRegistry]
serviceRegistries = Maybe [ServiceRegistry]
a} :: TaskSet) ((Maybe [ServiceRegistry] -> f (Maybe [ServiceRegistry]))
 -> TaskSet -> f TaskSet)
-> ((Maybe [ServiceRegistry] -> f (Maybe [ServiceRegistry]))
    -> Maybe [ServiceRegistry] -> f (Maybe [ServiceRegistry]))
-> (Maybe [ServiceRegistry] -> f (Maybe [ServiceRegistry]))
-> TaskSet
-> f TaskSet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ServiceRegistry]
  [ServiceRegistry]
  [ServiceRegistry]
  [ServiceRegistry]
-> Iso
     (Maybe [ServiceRegistry])
     (Maybe [ServiceRegistry])
     (Maybe [ServiceRegistry])
     (Maybe [ServiceRegistry])
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
  [ServiceRegistry]
  [ServiceRegistry]
  [ServiceRegistry]
  [ServiceRegistry]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The capacity provider strategy associated with the task set.
taskSet_capacityProviderStrategy :: Lens.Lens' TaskSet (Prelude.Maybe [CapacityProviderStrategyItem])
taskSet_capacityProviderStrategy :: (Maybe [CapacityProviderStrategyItem]
 -> f (Maybe [CapacityProviderStrategyItem]))
-> TaskSet -> f TaskSet
taskSet_capacityProviderStrategy = (TaskSet -> Maybe [CapacityProviderStrategyItem])
-> (TaskSet -> Maybe [CapacityProviderStrategyItem] -> TaskSet)
-> Lens
     TaskSet
     TaskSet
     (Maybe [CapacityProviderStrategyItem])
     (Maybe [CapacityProviderStrategyItem])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskSet' {Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy :: Maybe [CapacityProviderStrategyItem]
$sel:capacityProviderStrategy:TaskSet' :: TaskSet -> Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy} -> Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy) (\s :: TaskSet
s@TaskSet' {} Maybe [CapacityProviderStrategyItem]
a -> TaskSet
s {$sel:capacityProviderStrategy:TaskSet' :: Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy = Maybe [CapacityProviderStrategyItem]
a} :: TaskSet) ((Maybe [CapacityProviderStrategyItem]
  -> f (Maybe [CapacityProviderStrategyItem]))
 -> TaskSet -> f TaskSet)
-> ((Maybe [CapacityProviderStrategyItem]
     -> f (Maybe [CapacityProviderStrategyItem]))
    -> Maybe [CapacityProviderStrategyItem]
    -> f (Maybe [CapacityProviderStrategyItem]))
-> (Maybe [CapacityProviderStrategyItem]
    -> f (Maybe [CapacityProviderStrategyItem]))
-> TaskSet
-> f TaskSet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [CapacityProviderStrategyItem]
  [CapacityProviderStrategyItem]
  [CapacityProviderStrategyItem]
  [CapacityProviderStrategyItem]
-> Iso
     (Maybe [CapacityProviderStrategyItem])
     (Maybe [CapacityProviderStrategyItem])
     (Maybe [CapacityProviderStrategyItem])
     (Maybe [CapacityProviderStrategyItem])
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
  [CapacityProviderStrategyItem]
  [CapacityProviderStrategyItem]
  [CapacityProviderStrategyItem]
  [CapacityProviderStrategyItem]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The stability status, which indicates whether the task set has reached a
-- steady state. If the following conditions are met, the task set will be
-- in @STEADY_STATE@:
--
-- -   The task @runningCount@ is equal to the @computedDesiredCount@.
--
-- -   The @pendingCount@ is @0@.
--
-- -   There are no tasks running on container instances in the @DRAINING@
--     status.
--
-- -   All tasks are reporting a healthy status from the load balancers,
--     service discovery, and container health checks.
--
-- If any of those conditions are not met, the stability status returns
-- @STABILIZING@.
taskSet_stabilityStatus :: Lens.Lens' TaskSet (Prelude.Maybe StabilityStatus)
taskSet_stabilityStatus :: (Maybe StabilityStatus -> f (Maybe StabilityStatus))
-> TaskSet -> f TaskSet
taskSet_stabilityStatus = (TaskSet -> Maybe StabilityStatus)
-> (TaskSet -> Maybe StabilityStatus -> TaskSet)
-> Lens
     TaskSet TaskSet (Maybe StabilityStatus) (Maybe StabilityStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskSet' {Maybe StabilityStatus
stabilityStatus :: Maybe StabilityStatus
$sel:stabilityStatus:TaskSet' :: TaskSet -> Maybe StabilityStatus
stabilityStatus} -> Maybe StabilityStatus
stabilityStatus) (\s :: TaskSet
s@TaskSet' {} Maybe StabilityStatus
a -> TaskSet
s {$sel:stabilityStatus:TaskSet' :: Maybe StabilityStatus
stabilityStatus = Maybe StabilityStatus
a} :: TaskSet)

-- | The metadata that you apply to the task set to help you categorize and
-- organize them. Each tag consists of a key and an optional value, both of
-- which you define.
--
-- The following basic restrictions apply to tags:
--
-- -   Maximum number of tags per resource - 50
--
-- -   For each resource, each tag key must be unique, and each tag key can
--     have only one value.
--
-- -   Maximum key length - 128 Unicode characters in UTF-8
--
-- -   Maximum value length - 256 Unicode characters in UTF-8
--
-- -   If your tagging schema is used across multiple services and
--     resources, remember that other services may have restrictions on
--     allowed characters. Generally allowed characters are: letters,
--     numbers, and spaces representable in UTF-8, and the following
--     characters: + - = . _ : \/ \@.
--
-- -   Tag keys and values are case-sensitive.
--
-- -   Do not use @aws:@, @AWS:@, or any upper or lowercase combination of
--     such as a prefix for either keys or values as it is reserved for
--     Amazon Web Services use. You cannot edit or delete tag keys or
--     values with this prefix. Tags with this prefix do not count against
--     your tags per resource limit.
taskSet_tags :: Lens.Lens' TaskSet (Prelude.Maybe [Tag])
taskSet_tags :: (Maybe [Tag] -> f (Maybe [Tag])) -> TaskSet -> f TaskSet
taskSet_tags = (TaskSet -> Maybe [Tag])
-> (TaskSet -> Maybe [Tag] -> TaskSet)
-> Lens TaskSet TaskSet (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskSet' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:TaskSet' :: TaskSet -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: TaskSet
s@TaskSet' {} Maybe [Tag]
a -> TaskSet
s {$sel:tags:TaskSet' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: TaskSet) ((Maybe [Tag] -> f (Maybe [Tag])) -> TaskSet -> f TaskSet)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> TaskSet
-> f TaskSet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromJSON TaskSet where
  parseJSON :: Value -> Parser TaskSet
parseJSON =
    String -> (Object -> Parser TaskSet) -> Value -> Parser TaskSet
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"TaskSet"
      ( \Object
x ->
          Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe POSIX
-> Maybe Text
-> Maybe Scale
-> Maybe [LoadBalancer]
-> Maybe POSIX
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe LaunchType
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe NetworkConfiguration
-> Maybe [ServiceRegistry]
-> Maybe [CapacityProviderStrategyItem]
-> Maybe StabilityStatus
-> Maybe [Tag]
-> TaskSet
TaskSet'
            (Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe Int
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Scale
 -> Maybe [LoadBalancer]
 -> Maybe POSIX
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe LaunchType
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe NetworkConfiguration
 -> Maybe [ServiceRegistry]
 -> Maybe [CapacityProviderStrategyItem]
 -> Maybe StabilityStatus
 -> Maybe [Tag]
 -> TaskSet)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Scale
      -> Maybe [LoadBalancer]
      -> Maybe POSIX
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe LaunchType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe StabilityStatus
      -> Maybe [Tag]
      -> TaskSet)
forall (f :: * -> *) a b. Functor 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
"runningCount")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Scale
   -> Maybe [LoadBalancer]
   -> Maybe POSIX
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe LaunchType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe StabilityStatus
   -> Maybe [Tag]
   -> TaskSet)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Scale
      -> Maybe [LoadBalancer]
      -> Maybe POSIX
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe LaunchType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe StabilityStatus
      -> Maybe [Tag]
      -> TaskSet)
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 Int
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Scale
   -> Maybe [LoadBalancer]
   -> Maybe POSIX
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe LaunchType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe StabilityStatus
   -> Maybe [Tag]
   -> TaskSet)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Scale
      -> Maybe [LoadBalancer]
      -> Maybe POSIX
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe LaunchType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe StabilityStatus
      -> Maybe [Tag]
      -> TaskSet)
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
"clusterArn")
            Parser
  (Maybe Int
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Scale
   -> Maybe [LoadBalancer]
   -> Maybe POSIX
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe LaunchType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe StabilityStatus
   -> Maybe [Tag]
   -> TaskSet)
-> Parser (Maybe Int)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Scale
      -> Maybe [LoadBalancer]
      -> Maybe POSIX
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe LaunchType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe StabilityStatus
      -> Maybe [Tag]
      -> TaskSet)
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
"computedDesiredCount")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Scale
   -> Maybe [LoadBalancer]
   -> Maybe POSIX
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe LaunchType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe StabilityStatus
   -> Maybe [Tag]
   -> TaskSet)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Scale
      -> Maybe [LoadBalancer]
      -> Maybe POSIX
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe LaunchType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe StabilityStatus
      -> Maybe [Tag]
      -> TaskSet)
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
"createdAt")
            Parser
  (Maybe Text
   -> Maybe Scale
   -> Maybe [LoadBalancer]
   -> Maybe POSIX
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe LaunchType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe StabilityStatus
   -> Maybe [Tag]
   -> TaskSet)
-> Parser (Maybe Text)
-> Parser
     (Maybe Scale
      -> Maybe [LoadBalancer]
      -> Maybe POSIX
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe LaunchType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe StabilityStatus
      -> Maybe [Tag]
      -> TaskSet)
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
"platformVersion")
            Parser
  (Maybe Scale
   -> Maybe [LoadBalancer]
   -> Maybe POSIX
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe LaunchType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe StabilityStatus
   -> Maybe [Tag]
   -> TaskSet)
-> Parser (Maybe Scale)
-> Parser
     (Maybe [LoadBalancer]
      -> Maybe POSIX
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe LaunchType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe StabilityStatus
      -> Maybe [Tag]
      -> TaskSet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Scale)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"scale")
            Parser
  (Maybe [LoadBalancer]
   -> Maybe POSIX
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe LaunchType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe StabilityStatus
   -> Maybe [Tag]
   -> TaskSet)
-> Parser (Maybe [LoadBalancer])
-> Parser
     (Maybe POSIX
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe LaunchType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe StabilityStatus
      -> Maybe [Tag]
      -> TaskSet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [LoadBalancer]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"loadBalancers" Parser (Maybe (Maybe [LoadBalancer]))
-> Maybe [LoadBalancer] -> Parser (Maybe [LoadBalancer])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [LoadBalancer]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe POSIX
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe LaunchType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe StabilityStatus
   -> Maybe [Tag]
   -> TaskSet)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe LaunchType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe StabilityStatus
      -> Maybe [Tag]
      -> TaskSet)
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
"stabilityStatusAt")
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe LaunchType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe StabilityStatus
   -> Maybe [Tag]
   -> TaskSet)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe LaunchType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe StabilityStatus
      -> Maybe [Tag]
      -> TaskSet)
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
"pendingCount")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe LaunchType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe StabilityStatus
   -> Maybe [Tag]
   -> TaskSet)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe LaunchType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe StabilityStatus
      -> Maybe [Tag]
      -> TaskSet)
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
"taskSetArn")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe LaunchType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe StabilityStatus
   -> Maybe [Tag]
   -> TaskSet)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe LaunchType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe StabilityStatus
      -> Maybe [Tag]
      -> TaskSet)
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
"startedBy")
            Parser
  (Maybe Text
   -> Maybe LaunchType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe StabilityStatus
   -> Maybe [Tag]
   -> TaskSet)
-> Parser (Maybe Text)
-> Parser
     (Maybe LaunchType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe StabilityStatus
      -> Maybe [Tag]
      -> TaskSet)
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
"id")
            Parser
  (Maybe LaunchType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe StabilityStatus
   -> Maybe [Tag]
   -> TaskSet)
-> Parser (Maybe LaunchType)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe StabilityStatus
      -> Maybe [Tag]
      -> TaskSet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LaunchType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"launchType")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe StabilityStatus
   -> Maybe [Tag]
   -> TaskSet)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe StabilityStatus
      -> Maybe [Tag]
      -> TaskSet)
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
"updatedAt")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe StabilityStatus
   -> Maybe [Tag]
   -> TaskSet)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe StabilityStatus
      -> Maybe [Tag]
      -> TaskSet)
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
"serviceArn")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe StabilityStatus
   -> Maybe [Tag]
   -> TaskSet)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe StabilityStatus
      -> Maybe [Tag]
      -> TaskSet)
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
"taskDefinition")
            Parser
  (Maybe Text
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe StabilityStatus
   -> Maybe [Tag]
   -> TaskSet)
-> Parser (Maybe Text)
-> Parser
     (Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe StabilityStatus
      -> Maybe [Tag]
      -> TaskSet)
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
"externalId")
            Parser
  (Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe StabilityStatus
   -> Maybe [Tag]
   -> TaskSet)
-> Parser (Maybe NetworkConfiguration)
-> Parser
     (Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe StabilityStatus
      -> Maybe [Tag]
      -> TaskSet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe NetworkConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"networkConfiguration")
            Parser
  (Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe StabilityStatus
   -> Maybe [Tag]
   -> TaskSet)
-> Parser (Maybe [ServiceRegistry])
-> Parser
     (Maybe [CapacityProviderStrategyItem]
      -> Maybe StabilityStatus -> Maybe [Tag] -> TaskSet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [ServiceRegistry]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"serviceRegistries"
                            Parser (Maybe (Maybe [ServiceRegistry]))
-> Maybe [ServiceRegistry] -> Parser (Maybe [ServiceRegistry])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ServiceRegistry]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe [CapacityProviderStrategyItem]
   -> Maybe StabilityStatus -> Maybe [Tag] -> TaskSet)
-> Parser (Maybe [CapacityProviderStrategyItem])
-> Parser (Maybe StabilityStatus -> Maybe [Tag] -> TaskSet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Parser (Maybe (Maybe [CapacityProviderStrategyItem]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"capacityProviderStrategy"
                            Parser (Maybe (Maybe [CapacityProviderStrategyItem]))
-> Maybe [CapacityProviderStrategyItem]
-> Parser (Maybe [CapacityProviderStrategyItem])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [CapacityProviderStrategyItem]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser (Maybe StabilityStatus -> Maybe [Tag] -> TaskSet)
-> Parser (Maybe StabilityStatus)
-> Parser (Maybe [Tag] -> TaskSet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe StabilityStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"stabilityStatus")
            Parser (Maybe [Tag] -> TaskSet)
-> Parser (Maybe [Tag]) -> Parser TaskSet
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Tag]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe [Tag])) -> Maybe [Tag] -> Parser (Maybe [Tag])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Tag]
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable TaskSet

instance Prelude.NFData TaskSet