{-# 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 #-}
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
data ECSTaskSet = ECSTaskSet'
{
ECSTaskSet -> Maybe Integer
runningCount :: Prelude.Maybe Prelude.Integer,
ECSTaskSet -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
ECSTaskSet -> Maybe Text
identifer :: Prelude.Maybe Prelude.Text,
ECSTaskSet -> Maybe Integer
desiredCount :: Prelude.Maybe Prelude.Integer,
ECSTaskSet -> Maybe Integer
pendingCount :: Prelude.Maybe Prelude.Integer,
ECSTaskSet -> Maybe Double
trafficWeight :: Prelude.Maybe Prelude.Double,
ECSTaskSet -> Maybe TargetGroupInfo
targetGroup :: Prelude.Maybe TargetGroupInfo,
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)
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
}
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)
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)
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)
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)
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)
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)
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)
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