{-# 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.SecurityHub.Types.AwsEcsServiceDeploymentConfigurationDetails
-- 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.SecurityHub.Types.AwsEcsServiceDeploymentConfigurationDetails where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SecurityHub.Types.AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails

-- | Optional deployment parameters for the service.
--
-- /See:/ 'newAwsEcsServiceDeploymentConfigurationDetails' smart constructor.
data AwsEcsServiceDeploymentConfigurationDetails = AwsEcsServiceDeploymentConfigurationDetails'
  { -- | For a service that uses the rolling update (@ECS@) deployment type, the
    -- minimum number of tasks in a service that must remain in the @RUNNING@
    -- state during a deployment, and while any container instances are in the
    -- @DRAINING@ state if the service contains tasks using the EC2 launch
    -- type. Expressed as a percentage of the desired number of tasks. The
    -- default value is 100%.
    --
    -- For a service that uses the blue\/green (@CODE_DEPLOY@) or @EXTERNAL@
    -- deployment types and tasks that use the EC2 launch type, the minimum
    -- number of the tasks in the service that remain in the @RUNNING@ state
    -- while the container instances are in the @DRAINING@ state.
    --
    -- For the Fargate launch type, the minimum healthy percent value is not
    -- used.
    AwsEcsServiceDeploymentConfigurationDetails -> Maybe Int
minimumHealthyPercent :: Prelude.Maybe Prelude.Int,
    -- | For a service that uses the rolling update (@ECS@) deployment type, the
    -- maximum number of tasks in a service that are allowed in the @RUNNING@
    -- or @PENDING@ state during a deployment, and for tasks that use the EC2
    -- launch type, when any container instances are in the @DRAINING@ state.
    -- Provided as a percentage of the desired number of tasks. The default
    -- value is 200%.
    --
    -- For a service that uses the blue\/green (@CODE_DEPLOY@) or @EXTERNAL@
    -- deployment types, and tasks that use the EC2 launch type, the maximum
    -- number of tasks in the service that remain in the @RUNNING@ state while
    -- the container instances are in the @DRAINING@ state.
    --
    -- For the Fargate launch type, the maximum percent value is not used.
    AwsEcsServiceDeploymentConfigurationDetails -> Maybe Int
maximumPercent :: Prelude.Maybe Prelude.Int,
    -- | Determines whether a service deployment fails if a service cannot reach
    -- a steady state.
    AwsEcsServiceDeploymentConfigurationDetails
-> Maybe
     AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
deploymentCircuitBreaker :: Prelude.Maybe AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
  }
  deriving (AwsEcsServiceDeploymentConfigurationDetails
-> AwsEcsServiceDeploymentConfigurationDetails -> Bool
(AwsEcsServiceDeploymentConfigurationDetails
 -> AwsEcsServiceDeploymentConfigurationDetails -> Bool)
-> (AwsEcsServiceDeploymentConfigurationDetails
    -> AwsEcsServiceDeploymentConfigurationDetails -> Bool)
-> Eq AwsEcsServiceDeploymentConfigurationDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsEcsServiceDeploymentConfigurationDetails
-> AwsEcsServiceDeploymentConfigurationDetails -> Bool
$c/= :: AwsEcsServiceDeploymentConfigurationDetails
-> AwsEcsServiceDeploymentConfigurationDetails -> Bool
== :: AwsEcsServiceDeploymentConfigurationDetails
-> AwsEcsServiceDeploymentConfigurationDetails -> Bool
$c== :: AwsEcsServiceDeploymentConfigurationDetails
-> AwsEcsServiceDeploymentConfigurationDetails -> Bool
Prelude.Eq, ReadPrec [AwsEcsServiceDeploymentConfigurationDetails]
ReadPrec AwsEcsServiceDeploymentConfigurationDetails
Int -> ReadS AwsEcsServiceDeploymentConfigurationDetails
ReadS [AwsEcsServiceDeploymentConfigurationDetails]
(Int -> ReadS AwsEcsServiceDeploymentConfigurationDetails)
-> ReadS [AwsEcsServiceDeploymentConfigurationDetails]
-> ReadPrec AwsEcsServiceDeploymentConfigurationDetails
-> ReadPrec [AwsEcsServiceDeploymentConfigurationDetails]
-> Read AwsEcsServiceDeploymentConfigurationDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsEcsServiceDeploymentConfigurationDetails]
$creadListPrec :: ReadPrec [AwsEcsServiceDeploymentConfigurationDetails]
readPrec :: ReadPrec AwsEcsServiceDeploymentConfigurationDetails
$creadPrec :: ReadPrec AwsEcsServiceDeploymentConfigurationDetails
readList :: ReadS [AwsEcsServiceDeploymentConfigurationDetails]
$creadList :: ReadS [AwsEcsServiceDeploymentConfigurationDetails]
readsPrec :: Int -> ReadS AwsEcsServiceDeploymentConfigurationDetails
$creadsPrec :: Int -> ReadS AwsEcsServiceDeploymentConfigurationDetails
Prelude.Read, Int -> AwsEcsServiceDeploymentConfigurationDetails -> ShowS
[AwsEcsServiceDeploymentConfigurationDetails] -> ShowS
AwsEcsServiceDeploymentConfigurationDetails -> String
(Int -> AwsEcsServiceDeploymentConfigurationDetails -> ShowS)
-> (AwsEcsServiceDeploymentConfigurationDetails -> String)
-> ([AwsEcsServiceDeploymentConfigurationDetails] -> ShowS)
-> Show AwsEcsServiceDeploymentConfigurationDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsEcsServiceDeploymentConfigurationDetails] -> ShowS
$cshowList :: [AwsEcsServiceDeploymentConfigurationDetails] -> ShowS
show :: AwsEcsServiceDeploymentConfigurationDetails -> String
$cshow :: AwsEcsServiceDeploymentConfigurationDetails -> String
showsPrec :: Int -> AwsEcsServiceDeploymentConfigurationDetails -> ShowS
$cshowsPrec :: Int -> AwsEcsServiceDeploymentConfigurationDetails -> ShowS
Prelude.Show, (forall x.
 AwsEcsServiceDeploymentConfigurationDetails
 -> Rep AwsEcsServiceDeploymentConfigurationDetails x)
-> (forall x.
    Rep AwsEcsServiceDeploymentConfigurationDetails x
    -> AwsEcsServiceDeploymentConfigurationDetails)
-> Generic AwsEcsServiceDeploymentConfigurationDetails
forall x.
Rep AwsEcsServiceDeploymentConfigurationDetails x
-> AwsEcsServiceDeploymentConfigurationDetails
forall x.
AwsEcsServiceDeploymentConfigurationDetails
-> Rep AwsEcsServiceDeploymentConfigurationDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsEcsServiceDeploymentConfigurationDetails x
-> AwsEcsServiceDeploymentConfigurationDetails
$cfrom :: forall x.
AwsEcsServiceDeploymentConfigurationDetails
-> Rep AwsEcsServiceDeploymentConfigurationDetails x
Prelude.Generic)

-- |
-- Create a value of 'AwsEcsServiceDeploymentConfigurationDetails' 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:
--
-- 'minimumHealthyPercent', 'awsEcsServiceDeploymentConfigurationDetails_minimumHealthyPercent' - For a service that uses the rolling update (@ECS@) deployment type, the
-- minimum number of tasks in a service that must remain in the @RUNNING@
-- state during a deployment, and while any container instances are in the
-- @DRAINING@ state if the service contains tasks using the EC2 launch
-- type. Expressed as a percentage of the desired number of tasks. The
-- default value is 100%.
--
-- For a service that uses the blue\/green (@CODE_DEPLOY@) or @EXTERNAL@
-- deployment types and tasks that use the EC2 launch type, the minimum
-- number of the tasks in the service that remain in the @RUNNING@ state
-- while the container instances are in the @DRAINING@ state.
--
-- For the Fargate launch type, the minimum healthy percent value is not
-- used.
--
-- 'maximumPercent', 'awsEcsServiceDeploymentConfigurationDetails_maximumPercent' - For a service that uses the rolling update (@ECS@) deployment type, the
-- maximum number of tasks in a service that are allowed in the @RUNNING@
-- or @PENDING@ state during a deployment, and for tasks that use the EC2
-- launch type, when any container instances are in the @DRAINING@ state.
-- Provided as a percentage of the desired number of tasks. The default
-- value is 200%.
--
-- For a service that uses the blue\/green (@CODE_DEPLOY@) or @EXTERNAL@
-- deployment types, and tasks that use the EC2 launch type, the maximum
-- number of tasks in the service that remain in the @RUNNING@ state while
-- the container instances are in the @DRAINING@ state.
--
-- For the Fargate launch type, the maximum percent value is not used.
--
-- 'deploymentCircuitBreaker', 'awsEcsServiceDeploymentConfigurationDetails_deploymentCircuitBreaker' - Determines whether a service deployment fails if a service cannot reach
-- a steady state.
newAwsEcsServiceDeploymentConfigurationDetails ::
  AwsEcsServiceDeploymentConfigurationDetails
newAwsEcsServiceDeploymentConfigurationDetails :: AwsEcsServiceDeploymentConfigurationDetails
newAwsEcsServiceDeploymentConfigurationDetails =
  AwsEcsServiceDeploymentConfigurationDetails' :: Maybe Int
-> Maybe Int
-> Maybe
     AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
-> AwsEcsServiceDeploymentConfigurationDetails
AwsEcsServiceDeploymentConfigurationDetails'
    { $sel:minimumHealthyPercent:AwsEcsServiceDeploymentConfigurationDetails' :: Maybe Int
minimumHealthyPercent =
        Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:maximumPercent:AwsEcsServiceDeploymentConfigurationDetails' :: Maybe Int
maximumPercent =
        Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:deploymentCircuitBreaker:AwsEcsServiceDeploymentConfigurationDetails' :: Maybe
  AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
deploymentCircuitBreaker =
        Maybe
  AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
forall a. Maybe a
Prelude.Nothing
    }

-- | For a service that uses the rolling update (@ECS@) deployment type, the
-- minimum number of tasks in a service that must remain in the @RUNNING@
-- state during a deployment, and while any container instances are in the
-- @DRAINING@ state if the service contains tasks using the EC2 launch
-- type. Expressed as a percentage of the desired number of tasks. The
-- default value is 100%.
--
-- For a service that uses the blue\/green (@CODE_DEPLOY@) or @EXTERNAL@
-- deployment types and tasks that use the EC2 launch type, the minimum
-- number of the tasks in the service that remain in the @RUNNING@ state
-- while the container instances are in the @DRAINING@ state.
--
-- For the Fargate launch type, the minimum healthy percent value is not
-- used.
awsEcsServiceDeploymentConfigurationDetails_minimumHealthyPercent :: Lens.Lens' AwsEcsServiceDeploymentConfigurationDetails (Prelude.Maybe Prelude.Int)
awsEcsServiceDeploymentConfigurationDetails_minimumHealthyPercent :: (Maybe Int -> f (Maybe Int))
-> AwsEcsServiceDeploymentConfigurationDetails
-> f AwsEcsServiceDeploymentConfigurationDetails
awsEcsServiceDeploymentConfigurationDetails_minimumHealthyPercent = (AwsEcsServiceDeploymentConfigurationDetails -> Maybe Int)
-> (AwsEcsServiceDeploymentConfigurationDetails
    -> Maybe Int -> AwsEcsServiceDeploymentConfigurationDetails)
-> Lens
     AwsEcsServiceDeploymentConfigurationDetails
     AwsEcsServiceDeploymentConfigurationDetails
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcsServiceDeploymentConfigurationDetails' {Maybe Int
minimumHealthyPercent :: Maybe Int
$sel:minimumHealthyPercent:AwsEcsServiceDeploymentConfigurationDetails' :: AwsEcsServiceDeploymentConfigurationDetails -> Maybe Int
minimumHealthyPercent} -> Maybe Int
minimumHealthyPercent) (\s :: AwsEcsServiceDeploymentConfigurationDetails
s@AwsEcsServiceDeploymentConfigurationDetails' {} Maybe Int
a -> AwsEcsServiceDeploymentConfigurationDetails
s {$sel:minimumHealthyPercent:AwsEcsServiceDeploymentConfigurationDetails' :: Maybe Int
minimumHealthyPercent = Maybe Int
a} :: AwsEcsServiceDeploymentConfigurationDetails)

-- | For a service that uses the rolling update (@ECS@) deployment type, the
-- maximum number of tasks in a service that are allowed in the @RUNNING@
-- or @PENDING@ state during a deployment, and for tasks that use the EC2
-- launch type, when any container instances are in the @DRAINING@ state.
-- Provided as a percentage of the desired number of tasks. The default
-- value is 200%.
--
-- For a service that uses the blue\/green (@CODE_DEPLOY@) or @EXTERNAL@
-- deployment types, and tasks that use the EC2 launch type, the maximum
-- number of tasks in the service that remain in the @RUNNING@ state while
-- the container instances are in the @DRAINING@ state.
--
-- For the Fargate launch type, the maximum percent value is not used.
awsEcsServiceDeploymentConfigurationDetails_maximumPercent :: Lens.Lens' AwsEcsServiceDeploymentConfigurationDetails (Prelude.Maybe Prelude.Int)
awsEcsServiceDeploymentConfigurationDetails_maximumPercent :: (Maybe Int -> f (Maybe Int))
-> AwsEcsServiceDeploymentConfigurationDetails
-> f AwsEcsServiceDeploymentConfigurationDetails
awsEcsServiceDeploymentConfigurationDetails_maximumPercent = (AwsEcsServiceDeploymentConfigurationDetails -> Maybe Int)
-> (AwsEcsServiceDeploymentConfigurationDetails
    -> Maybe Int -> AwsEcsServiceDeploymentConfigurationDetails)
-> Lens
     AwsEcsServiceDeploymentConfigurationDetails
     AwsEcsServiceDeploymentConfigurationDetails
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcsServiceDeploymentConfigurationDetails' {Maybe Int
maximumPercent :: Maybe Int
$sel:maximumPercent:AwsEcsServiceDeploymentConfigurationDetails' :: AwsEcsServiceDeploymentConfigurationDetails -> Maybe Int
maximumPercent} -> Maybe Int
maximumPercent) (\s :: AwsEcsServiceDeploymentConfigurationDetails
s@AwsEcsServiceDeploymentConfigurationDetails' {} Maybe Int
a -> AwsEcsServiceDeploymentConfigurationDetails
s {$sel:maximumPercent:AwsEcsServiceDeploymentConfigurationDetails' :: Maybe Int
maximumPercent = Maybe Int
a} :: AwsEcsServiceDeploymentConfigurationDetails)

-- | Determines whether a service deployment fails if a service cannot reach
-- a steady state.
awsEcsServiceDeploymentConfigurationDetails_deploymentCircuitBreaker :: Lens.Lens' AwsEcsServiceDeploymentConfigurationDetails (Prelude.Maybe AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails)
awsEcsServiceDeploymentConfigurationDetails_deploymentCircuitBreaker :: (Maybe
   AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
 -> f (Maybe
         AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails))
-> AwsEcsServiceDeploymentConfigurationDetails
-> f AwsEcsServiceDeploymentConfigurationDetails
awsEcsServiceDeploymentConfigurationDetails_deploymentCircuitBreaker = (AwsEcsServiceDeploymentConfigurationDetails
 -> Maybe
      AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails)
-> (AwsEcsServiceDeploymentConfigurationDetails
    -> Maybe
         AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
    -> AwsEcsServiceDeploymentConfigurationDetails)
-> Lens
     AwsEcsServiceDeploymentConfigurationDetails
     AwsEcsServiceDeploymentConfigurationDetails
     (Maybe
        AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails)
     (Maybe
        AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcsServiceDeploymentConfigurationDetails' {Maybe
  AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
deploymentCircuitBreaker :: Maybe
  AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
$sel:deploymentCircuitBreaker:AwsEcsServiceDeploymentConfigurationDetails' :: AwsEcsServiceDeploymentConfigurationDetails
-> Maybe
     AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
deploymentCircuitBreaker} -> Maybe
  AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
deploymentCircuitBreaker) (\s :: AwsEcsServiceDeploymentConfigurationDetails
s@AwsEcsServiceDeploymentConfigurationDetails' {} Maybe
  AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
a -> AwsEcsServiceDeploymentConfigurationDetails
s {$sel:deploymentCircuitBreaker:AwsEcsServiceDeploymentConfigurationDetails' :: Maybe
  AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
deploymentCircuitBreaker = Maybe
  AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
a} :: AwsEcsServiceDeploymentConfigurationDetails)

instance
  Core.FromJSON
    AwsEcsServiceDeploymentConfigurationDetails
  where
  parseJSON :: Value -> Parser AwsEcsServiceDeploymentConfigurationDetails
parseJSON =
    String
-> (Object -> Parser AwsEcsServiceDeploymentConfigurationDetails)
-> Value
-> Parser AwsEcsServiceDeploymentConfigurationDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AwsEcsServiceDeploymentConfigurationDetails"
      ( \Object
x ->
          Maybe Int
-> Maybe Int
-> Maybe
     AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
-> AwsEcsServiceDeploymentConfigurationDetails
AwsEcsServiceDeploymentConfigurationDetails'
            (Maybe Int
 -> Maybe Int
 -> Maybe
      AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
 -> AwsEcsServiceDeploymentConfigurationDetails)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe
           AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
      -> AwsEcsServiceDeploymentConfigurationDetails)
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
"MinimumHealthyPercent")
              Parser
  (Maybe Int
   -> Maybe
        AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
   -> AwsEcsServiceDeploymentConfigurationDetails)
-> Parser (Maybe Int)
-> Parser
     (Maybe
        AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
      -> AwsEcsServiceDeploymentConfigurationDetails)
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
"MaximumPercent")
              Parser
  (Maybe
     AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
   -> AwsEcsServiceDeploymentConfigurationDetails)
-> Parser
     (Maybe
        AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails)
-> Parser AwsEcsServiceDeploymentConfigurationDetails
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Parser
     (Maybe
        AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DeploymentCircuitBreaker")
      )

instance
  Prelude.Hashable
    AwsEcsServiceDeploymentConfigurationDetails

instance
  Prelude.NFData
    AwsEcsServiceDeploymentConfigurationDetails

instance
  Core.ToJSON
    AwsEcsServiceDeploymentConfigurationDetails
  where
  toJSON :: AwsEcsServiceDeploymentConfigurationDetails -> Value
toJSON
    AwsEcsServiceDeploymentConfigurationDetails' {Maybe Int
Maybe
  AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
deploymentCircuitBreaker :: Maybe
  AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
maximumPercent :: Maybe Int
minimumHealthyPercent :: Maybe Int
$sel:deploymentCircuitBreaker:AwsEcsServiceDeploymentConfigurationDetails' :: AwsEcsServiceDeploymentConfigurationDetails
-> Maybe
     AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
$sel:maximumPercent:AwsEcsServiceDeploymentConfigurationDetails' :: AwsEcsServiceDeploymentConfigurationDetails -> Maybe Int
$sel:minimumHealthyPercent:AwsEcsServiceDeploymentConfigurationDetails' :: AwsEcsServiceDeploymentConfigurationDetails -> Maybe Int
..} =
      [Pair] -> Value
Core.object
        ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
            [ (Text
"MinimumHealthyPercent" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
                (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
minimumHealthyPercent,
              (Text
"MaximumPercent" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
                (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maximumPercent,
              (Text
"DeploymentCircuitBreaker" Text
-> AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
-> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
                (AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
 -> Pair)
-> Maybe
     AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
-> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe
  AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
deploymentCircuitBreaker
            ]
        )