{-# 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.ECS.Types.Cluster where
import qualified Amazonka.Core as Core
import Amazonka.ECS.Types.Attachment
import Amazonka.ECS.Types.CapacityProviderStrategyItem
import Amazonka.ECS.Types.ClusterConfiguration
import Amazonka.ECS.Types.ClusterSetting
import Amazonka.ECS.Types.KeyValuePair
import Amazonka.ECS.Types.Tag
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Cluster = Cluster'
{
Cluster -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
Cluster -> Maybe Text
clusterArn :: Prelude.Maybe Prelude.Text,
Cluster -> Maybe [Attachment]
attachments :: Prelude.Maybe [Attachment],
Cluster -> Maybe Int
runningTasksCount :: Prelude.Maybe Prelude.Int,
Cluster -> Maybe [CapacityProviderStrategyItem]
defaultCapacityProviderStrategy :: Prelude.Maybe [CapacityProviderStrategyItem],
Cluster -> Maybe [ClusterSetting]
settings :: Prelude.Maybe [ClusterSetting],
Cluster -> Maybe Int
registeredContainerInstancesCount :: Prelude.Maybe Prelude.Int,
Cluster -> Maybe Int
pendingTasksCount :: Prelude.Maybe Prelude.Int,
Cluster -> Maybe Text
clusterName :: Prelude.Maybe Prelude.Text,
Cluster -> Maybe [KeyValuePair]
statistics :: Prelude.Maybe [KeyValuePair],
Cluster -> Maybe ClusterConfiguration
configuration :: Prelude.Maybe ClusterConfiguration,
Cluster -> Maybe Text
attachmentsStatus :: Prelude.Maybe Prelude.Text,
Cluster -> Maybe [Text]
capacityProviders :: Prelude.Maybe [Prelude.Text],
Cluster -> Maybe Int
activeServicesCount :: Prelude.Maybe Prelude.Int,
Cluster -> Maybe [Tag]
tags :: Prelude.Maybe [Tag]
}
deriving (Cluster -> Cluster -> Bool
(Cluster -> Cluster -> Bool)
-> (Cluster -> Cluster -> Bool) -> Eq Cluster
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Cluster -> Cluster -> Bool
$c/= :: Cluster -> Cluster -> Bool
== :: Cluster -> Cluster -> Bool
$c== :: Cluster -> Cluster -> Bool
Prelude.Eq, ReadPrec [Cluster]
ReadPrec Cluster
Int -> ReadS Cluster
ReadS [Cluster]
(Int -> ReadS Cluster)
-> ReadS [Cluster]
-> ReadPrec Cluster
-> ReadPrec [Cluster]
-> Read Cluster
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Cluster]
$creadListPrec :: ReadPrec [Cluster]
readPrec :: ReadPrec Cluster
$creadPrec :: ReadPrec Cluster
readList :: ReadS [Cluster]
$creadList :: ReadS [Cluster]
readsPrec :: Int -> ReadS Cluster
$creadsPrec :: Int -> ReadS Cluster
Prelude.Read, Int -> Cluster -> ShowS
[Cluster] -> ShowS
Cluster -> String
(Int -> Cluster -> ShowS)
-> (Cluster -> String) -> ([Cluster] -> ShowS) -> Show Cluster
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Cluster] -> ShowS
$cshowList :: [Cluster] -> ShowS
show :: Cluster -> String
$cshow :: Cluster -> String
showsPrec :: Int -> Cluster -> ShowS
$cshowsPrec :: Int -> Cluster -> ShowS
Prelude.Show, (forall x. Cluster -> Rep Cluster x)
-> (forall x. Rep Cluster x -> Cluster) -> Generic Cluster
forall x. Rep Cluster x -> Cluster
forall x. Cluster -> Rep Cluster x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Cluster x -> Cluster
$cfrom :: forall x. Cluster -> Rep Cluster x
Prelude.Generic)
newCluster ::
Cluster
newCluster :: Cluster
newCluster =
Cluster' :: Maybe Text
-> Maybe Text
-> Maybe [Attachment]
-> Maybe Int
-> Maybe [CapacityProviderStrategyItem]
-> Maybe [ClusterSetting]
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe [KeyValuePair]
-> Maybe ClusterConfiguration
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe [Tag]
-> Cluster
Cluster'
{ $sel:status:Cluster' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:clusterArn:Cluster' :: Maybe Text
clusterArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:attachments:Cluster' :: Maybe [Attachment]
attachments = Maybe [Attachment]
forall a. Maybe a
Prelude.Nothing,
$sel:runningTasksCount:Cluster' :: Maybe Int
runningTasksCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:defaultCapacityProviderStrategy:Cluster' :: Maybe [CapacityProviderStrategyItem]
defaultCapacityProviderStrategy = Maybe [CapacityProviderStrategyItem]
forall a. Maybe a
Prelude.Nothing,
$sel:settings:Cluster' :: Maybe [ClusterSetting]
settings = Maybe [ClusterSetting]
forall a. Maybe a
Prelude.Nothing,
$sel:registeredContainerInstancesCount:Cluster' :: Maybe Int
registeredContainerInstancesCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:pendingTasksCount:Cluster' :: Maybe Int
pendingTasksCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:clusterName:Cluster' :: Maybe Text
clusterName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:statistics:Cluster' :: Maybe [KeyValuePair]
statistics = Maybe [KeyValuePair]
forall a. Maybe a
Prelude.Nothing,
$sel:configuration:Cluster' :: Maybe ClusterConfiguration
configuration = Maybe ClusterConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:attachmentsStatus:Cluster' :: Maybe Text
attachmentsStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:capacityProviders:Cluster' :: Maybe [Text]
capacityProviders = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:activeServicesCount:Cluster' :: Maybe Int
activeServicesCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:tags:Cluster' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing
}
cluster_status :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_status :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_status = (Cluster -> Maybe Text)
-> (Cluster -> Maybe Text -> Cluster)
-> Lens Cluster Cluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Text
status :: Maybe Text
$sel:status:Cluster' :: Cluster -> Maybe Text
status} -> Maybe Text
status) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:status:Cluster' :: Maybe Text
status = Maybe Text
a} :: Cluster)
cluster_clusterArn :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_clusterArn :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_clusterArn = (Cluster -> Maybe Text)
-> (Cluster -> Maybe Text -> Cluster)
-> Lens Cluster Cluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Text
clusterArn :: Maybe Text
$sel:clusterArn:Cluster' :: Cluster -> Maybe Text
clusterArn} -> Maybe Text
clusterArn) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:clusterArn:Cluster' :: Maybe Text
clusterArn = Maybe Text
a} :: Cluster)
cluster_attachments :: Lens.Lens' Cluster (Prelude.Maybe [Attachment])
cluster_attachments :: (Maybe [Attachment] -> f (Maybe [Attachment]))
-> Cluster -> f Cluster
cluster_attachments = (Cluster -> Maybe [Attachment])
-> (Cluster -> Maybe [Attachment] -> Cluster)
-> Lens Cluster Cluster (Maybe [Attachment]) (Maybe [Attachment])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe [Attachment]
attachments :: Maybe [Attachment]
$sel:attachments:Cluster' :: Cluster -> Maybe [Attachment]
attachments} -> Maybe [Attachment]
attachments) (\s :: Cluster
s@Cluster' {} Maybe [Attachment]
a -> Cluster
s {$sel:attachments:Cluster' :: Maybe [Attachment]
attachments = Maybe [Attachment]
a} :: Cluster) ((Maybe [Attachment] -> f (Maybe [Attachment]))
-> Cluster -> f Cluster)
-> ((Maybe [Attachment] -> f (Maybe [Attachment]))
-> Maybe [Attachment] -> f (Maybe [Attachment]))
-> (Maybe [Attachment] -> f (Maybe [Attachment]))
-> Cluster
-> f Cluster
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Attachment] [Attachment] [Attachment] [Attachment]
-> Iso
(Maybe [Attachment])
(Maybe [Attachment])
(Maybe [Attachment])
(Maybe [Attachment])
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 [Attachment] [Attachment] [Attachment] [Attachment]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
cluster_runningTasksCount :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Int)
cluster_runningTasksCount :: (Maybe Int -> f (Maybe Int)) -> Cluster -> f Cluster
cluster_runningTasksCount = (Cluster -> Maybe Int)
-> (Cluster -> Maybe Int -> Cluster)
-> Lens Cluster Cluster (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Int
runningTasksCount :: Maybe Int
$sel:runningTasksCount:Cluster' :: Cluster -> Maybe Int
runningTasksCount} -> Maybe Int
runningTasksCount) (\s :: Cluster
s@Cluster' {} Maybe Int
a -> Cluster
s {$sel:runningTasksCount:Cluster' :: Maybe Int
runningTasksCount = Maybe Int
a} :: Cluster)
cluster_defaultCapacityProviderStrategy :: Lens.Lens' Cluster (Prelude.Maybe [CapacityProviderStrategyItem])
cluster_defaultCapacityProviderStrategy :: (Maybe [CapacityProviderStrategyItem]
-> f (Maybe [CapacityProviderStrategyItem]))
-> Cluster -> f Cluster
cluster_defaultCapacityProviderStrategy = (Cluster -> Maybe [CapacityProviderStrategyItem])
-> (Cluster -> Maybe [CapacityProviderStrategyItem] -> Cluster)
-> Lens
Cluster
Cluster
(Maybe [CapacityProviderStrategyItem])
(Maybe [CapacityProviderStrategyItem])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe [CapacityProviderStrategyItem]
defaultCapacityProviderStrategy :: Maybe [CapacityProviderStrategyItem]
$sel:defaultCapacityProviderStrategy:Cluster' :: Cluster -> Maybe [CapacityProviderStrategyItem]
defaultCapacityProviderStrategy} -> Maybe [CapacityProviderStrategyItem]
defaultCapacityProviderStrategy) (\s :: Cluster
s@Cluster' {} Maybe [CapacityProviderStrategyItem]
a -> Cluster
s {$sel:defaultCapacityProviderStrategy:Cluster' :: Maybe [CapacityProviderStrategyItem]
defaultCapacityProviderStrategy = Maybe [CapacityProviderStrategyItem]
a} :: Cluster) ((Maybe [CapacityProviderStrategyItem]
-> f (Maybe [CapacityProviderStrategyItem]))
-> Cluster -> f Cluster)
-> ((Maybe [CapacityProviderStrategyItem]
-> f (Maybe [CapacityProviderStrategyItem]))
-> Maybe [CapacityProviderStrategyItem]
-> f (Maybe [CapacityProviderStrategyItem]))
-> (Maybe [CapacityProviderStrategyItem]
-> f (Maybe [CapacityProviderStrategyItem]))
-> Cluster
-> f Cluster
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
cluster_settings :: Lens.Lens' Cluster (Prelude.Maybe [ClusterSetting])
cluster_settings :: (Maybe [ClusterSetting] -> f (Maybe [ClusterSetting]))
-> Cluster -> f Cluster
cluster_settings = (Cluster -> Maybe [ClusterSetting])
-> (Cluster -> Maybe [ClusterSetting] -> Cluster)
-> Lens
Cluster Cluster (Maybe [ClusterSetting]) (Maybe [ClusterSetting])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe [ClusterSetting]
settings :: Maybe [ClusterSetting]
$sel:settings:Cluster' :: Cluster -> Maybe [ClusterSetting]
settings} -> Maybe [ClusterSetting]
settings) (\s :: Cluster
s@Cluster' {} Maybe [ClusterSetting]
a -> Cluster
s {$sel:settings:Cluster' :: Maybe [ClusterSetting]
settings = Maybe [ClusterSetting]
a} :: Cluster) ((Maybe [ClusterSetting] -> f (Maybe [ClusterSetting]))
-> Cluster -> f Cluster)
-> ((Maybe [ClusterSetting] -> f (Maybe [ClusterSetting]))
-> Maybe [ClusterSetting] -> f (Maybe [ClusterSetting]))
-> (Maybe [ClusterSetting] -> f (Maybe [ClusterSetting]))
-> Cluster
-> f Cluster
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ClusterSetting] [ClusterSetting] [ClusterSetting] [ClusterSetting]
-> Iso
(Maybe [ClusterSetting])
(Maybe [ClusterSetting])
(Maybe [ClusterSetting])
(Maybe [ClusterSetting])
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
[ClusterSetting] [ClusterSetting] [ClusterSetting] [ClusterSetting]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
cluster_registeredContainerInstancesCount :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Int)
cluster_registeredContainerInstancesCount :: (Maybe Int -> f (Maybe Int)) -> Cluster -> f Cluster
cluster_registeredContainerInstancesCount = (Cluster -> Maybe Int)
-> (Cluster -> Maybe Int -> Cluster)
-> Lens Cluster Cluster (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Int
registeredContainerInstancesCount :: Maybe Int
$sel:registeredContainerInstancesCount:Cluster' :: Cluster -> Maybe Int
registeredContainerInstancesCount} -> Maybe Int
registeredContainerInstancesCount) (\s :: Cluster
s@Cluster' {} Maybe Int
a -> Cluster
s {$sel:registeredContainerInstancesCount:Cluster' :: Maybe Int
registeredContainerInstancesCount = Maybe Int
a} :: Cluster)
cluster_pendingTasksCount :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Int)
cluster_pendingTasksCount :: (Maybe Int -> f (Maybe Int)) -> Cluster -> f Cluster
cluster_pendingTasksCount = (Cluster -> Maybe Int)
-> (Cluster -> Maybe Int -> Cluster)
-> Lens Cluster Cluster (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Int
pendingTasksCount :: Maybe Int
$sel:pendingTasksCount:Cluster' :: Cluster -> Maybe Int
pendingTasksCount} -> Maybe Int
pendingTasksCount) (\s :: Cluster
s@Cluster' {} Maybe Int
a -> Cluster
s {$sel:pendingTasksCount:Cluster' :: Maybe Int
pendingTasksCount = Maybe Int
a} :: Cluster)
cluster_clusterName :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_clusterName :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_clusterName = (Cluster -> Maybe Text)
-> (Cluster -> Maybe Text -> Cluster)
-> Lens Cluster Cluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Text
clusterName :: Maybe Text
$sel:clusterName:Cluster' :: Cluster -> Maybe Text
clusterName} -> Maybe Text
clusterName) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:clusterName:Cluster' :: Maybe Text
clusterName = Maybe Text
a} :: Cluster)
cluster_statistics :: Lens.Lens' Cluster (Prelude.Maybe [KeyValuePair])
cluster_statistics :: (Maybe [KeyValuePair] -> f (Maybe [KeyValuePair]))
-> Cluster -> f Cluster
cluster_statistics = (Cluster -> Maybe [KeyValuePair])
-> (Cluster -> Maybe [KeyValuePair] -> Cluster)
-> Lens
Cluster Cluster (Maybe [KeyValuePair]) (Maybe [KeyValuePair])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe [KeyValuePair]
statistics :: Maybe [KeyValuePair]
$sel:statistics:Cluster' :: Cluster -> Maybe [KeyValuePair]
statistics} -> Maybe [KeyValuePair]
statistics) (\s :: Cluster
s@Cluster' {} Maybe [KeyValuePair]
a -> Cluster
s {$sel:statistics:Cluster' :: Maybe [KeyValuePair]
statistics = Maybe [KeyValuePair]
a} :: Cluster) ((Maybe [KeyValuePair] -> f (Maybe [KeyValuePair]))
-> Cluster -> f Cluster)
-> ((Maybe [KeyValuePair] -> f (Maybe [KeyValuePair]))
-> Maybe [KeyValuePair] -> f (Maybe [KeyValuePair]))
-> (Maybe [KeyValuePair] -> f (Maybe [KeyValuePair]))
-> Cluster
-> f Cluster
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [KeyValuePair] [KeyValuePair] [KeyValuePair] [KeyValuePair]
-> Iso
(Maybe [KeyValuePair])
(Maybe [KeyValuePair])
(Maybe [KeyValuePair])
(Maybe [KeyValuePair])
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 [KeyValuePair] [KeyValuePair] [KeyValuePair] [KeyValuePair]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
cluster_configuration :: Lens.Lens' Cluster (Prelude.Maybe ClusterConfiguration)
cluster_configuration :: (Maybe ClusterConfiguration -> f (Maybe ClusterConfiguration))
-> Cluster -> f Cluster
cluster_configuration = (Cluster -> Maybe ClusterConfiguration)
-> (Cluster -> Maybe ClusterConfiguration -> Cluster)
-> Lens
Cluster
Cluster
(Maybe ClusterConfiguration)
(Maybe ClusterConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe ClusterConfiguration
configuration :: Maybe ClusterConfiguration
$sel:configuration:Cluster' :: Cluster -> Maybe ClusterConfiguration
configuration} -> Maybe ClusterConfiguration
configuration) (\s :: Cluster
s@Cluster' {} Maybe ClusterConfiguration
a -> Cluster
s {$sel:configuration:Cluster' :: Maybe ClusterConfiguration
configuration = Maybe ClusterConfiguration
a} :: Cluster)
cluster_attachmentsStatus :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_attachmentsStatus :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_attachmentsStatus = (Cluster -> Maybe Text)
-> (Cluster -> Maybe Text -> Cluster)
-> Lens Cluster Cluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Text
attachmentsStatus :: Maybe Text
$sel:attachmentsStatus:Cluster' :: Cluster -> Maybe Text
attachmentsStatus} -> Maybe Text
attachmentsStatus) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:attachmentsStatus:Cluster' :: Maybe Text
attachmentsStatus = Maybe Text
a} :: Cluster)
cluster_capacityProviders :: Lens.Lens' Cluster (Prelude.Maybe [Prelude.Text])
cluster_capacityProviders :: (Maybe [Text] -> f (Maybe [Text])) -> Cluster -> f Cluster
cluster_capacityProviders = (Cluster -> Maybe [Text])
-> (Cluster -> Maybe [Text] -> Cluster)
-> Lens Cluster Cluster (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe [Text]
capacityProviders :: Maybe [Text]
$sel:capacityProviders:Cluster' :: Cluster -> Maybe [Text]
capacityProviders} -> Maybe [Text]
capacityProviders) (\s :: Cluster
s@Cluster' {} Maybe [Text]
a -> Cluster
s {$sel:capacityProviders:Cluster' :: Maybe [Text]
capacityProviders = Maybe [Text]
a} :: Cluster) ((Maybe [Text] -> f (Maybe [Text])) -> Cluster -> f Cluster)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> Cluster
-> f Cluster
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
cluster_activeServicesCount :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Int)
cluster_activeServicesCount :: (Maybe Int -> f (Maybe Int)) -> Cluster -> f Cluster
cluster_activeServicesCount = (Cluster -> Maybe Int)
-> (Cluster -> Maybe Int -> Cluster)
-> Lens Cluster Cluster (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Int
activeServicesCount :: Maybe Int
$sel:activeServicesCount:Cluster' :: Cluster -> Maybe Int
activeServicesCount} -> Maybe Int
activeServicesCount) (\s :: Cluster
s@Cluster' {} Maybe Int
a -> Cluster
s {$sel:activeServicesCount:Cluster' :: Maybe Int
activeServicesCount = Maybe Int
a} :: Cluster)
cluster_tags :: Lens.Lens' Cluster (Prelude.Maybe [Tag])
cluster_tags :: (Maybe [Tag] -> f (Maybe [Tag])) -> Cluster -> f Cluster
cluster_tags = (Cluster -> Maybe [Tag])
-> (Cluster -> Maybe [Tag] -> Cluster)
-> Lens Cluster Cluster (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:Cluster' :: Cluster -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: Cluster
s@Cluster' {} Maybe [Tag]
a -> Cluster
s {$sel:tags:Cluster' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: Cluster) ((Maybe [Tag] -> f (Maybe [Tag])) -> Cluster -> f Cluster)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> Cluster
-> f Cluster
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 Cluster where
parseJSON :: Value -> Parser Cluster
parseJSON =
String -> (Object -> Parser Cluster) -> Value -> Parser Cluster
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Cluster"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe [Attachment]
-> Maybe Int
-> Maybe [CapacityProviderStrategyItem]
-> Maybe [ClusterSetting]
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe [KeyValuePair]
-> Maybe ClusterConfiguration
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe [Tag]
-> Cluster
Cluster'
(Maybe Text
-> Maybe Text
-> Maybe [Attachment]
-> Maybe Int
-> Maybe [CapacityProviderStrategyItem]
-> Maybe [ClusterSetting]
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe [KeyValuePair]
-> Maybe ClusterConfiguration
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe [Tag]
-> Cluster)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe [Attachment]
-> Maybe Int
-> Maybe [CapacityProviderStrategyItem]
-> Maybe [ClusterSetting]
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe [KeyValuePair]
-> Maybe ClusterConfiguration
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe [Tag]
-> Cluster)
forall (f :: * -> *) a b. Functor 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 [Attachment]
-> Maybe Int
-> Maybe [CapacityProviderStrategyItem]
-> Maybe [ClusterSetting]
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe [KeyValuePair]
-> Maybe ClusterConfiguration
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe [Tag]
-> Cluster)
-> Parser (Maybe Text)
-> Parser
(Maybe [Attachment]
-> Maybe Int
-> Maybe [CapacityProviderStrategyItem]
-> Maybe [ClusterSetting]
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe [KeyValuePair]
-> Maybe ClusterConfiguration
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe [Tag]
-> Cluster)
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 [Attachment]
-> Maybe Int
-> Maybe [CapacityProviderStrategyItem]
-> Maybe [ClusterSetting]
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe [KeyValuePair]
-> Maybe ClusterConfiguration
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe [Tag]
-> Cluster)
-> Parser (Maybe [Attachment])
-> Parser
(Maybe Int
-> Maybe [CapacityProviderStrategyItem]
-> Maybe [ClusterSetting]
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe [KeyValuePair]
-> Maybe ClusterConfiguration
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe [Tag]
-> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Attachment]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"attachments" Parser (Maybe (Maybe [Attachment]))
-> Maybe [Attachment] -> Parser (Maybe [Attachment])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Attachment]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Int
-> Maybe [CapacityProviderStrategyItem]
-> Maybe [ClusterSetting]
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe [KeyValuePair]
-> Maybe ClusterConfiguration
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe [Tag]
-> Cluster)
-> Parser (Maybe Int)
-> Parser
(Maybe [CapacityProviderStrategyItem]
-> Maybe [ClusterSetting]
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe [KeyValuePair]
-> Maybe ClusterConfiguration
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe [Tag]
-> Cluster)
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
"runningTasksCount")
Parser
(Maybe [CapacityProviderStrategyItem]
-> Maybe [ClusterSetting]
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe [KeyValuePair]
-> Maybe ClusterConfiguration
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe [Tag]
-> Cluster)
-> Parser (Maybe [CapacityProviderStrategyItem])
-> Parser
(Maybe [ClusterSetting]
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe [KeyValuePair]
-> Maybe ClusterConfiguration
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe [Tag]
-> Cluster)
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
"defaultCapacityProviderStrategy"
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 [ClusterSetting]
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe [KeyValuePair]
-> Maybe ClusterConfiguration
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe [Tag]
-> Cluster)
-> Parser (Maybe [ClusterSetting])
-> Parser
(Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe [KeyValuePair]
-> Maybe ClusterConfiguration
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe [Tag]
-> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [ClusterSetting]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"settings" Parser (Maybe (Maybe [ClusterSetting]))
-> Maybe [ClusterSetting] -> Parser (Maybe [ClusterSetting])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ClusterSetting]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe [KeyValuePair]
-> Maybe ClusterConfiguration
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe [Tag]
-> Cluster)
-> Parser (Maybe Int)
-> Parser
(Maybe Int
-> Maybe Text
-> Maybe [KeyValuePair]
-> Maybe ClusterConfiguration
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe [Tag]
-> Cluster)
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
"registeredContainerInstancesCount")
Parser
(Maybe Int
-> Maybe Text
-> Maybe [KeyValuePair]
-> Maybe ClusterConfiguration
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe [Tag]
-> Cluster)
-> Parser (Maybe Int)
-> Parser
(Maybe Text
-> Maybe [KeyValuePair]
-> Maybe ClusterConfiguration
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe [Tag]
-> Cluster)
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
"pendingTasksCount")
Parser
(Maybe Text
-> Maybe [KeyValuePair]
-> Maybe ClusterConfiguration
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe [Tag]
-> Cluster)
-> Parser (Maybe Text)
-> Parser
(Maybe [KeyValuePair]
-> Maybe ClusterConfiguration
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe [Tag]
-> Cluster)
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
"clusterName")
Parser
(Maybe [KeyValuePair]
-> Maybe ClusterConfiguration
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe [Tag]
-> Cluster)
-> Parser (Maybe [KeyValuePair])
-> Parser
(Maybe ClusterConfiguration
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe [Tag]
-> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [KeyValuePair]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"statistics" Parser (Maybe (Maybe [KeyValuePair]))
-> Maybe [KeyValuePair] -> Parser (Maybe [KeyValuePair])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [KeyValuePair]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe ClusterConfiguration
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe [Tag]
-> Cluster)
-> Parser (Maybe ClusterConfiguration)
-> Parser
(Maybe Text -> Maybe [Text] -> Maybe Int -> Maybe [Tag] -> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ClusterConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"configuration")
Parser
(Maybe Text -> Maybe [Text] -> Maybe Int -> Maybe [Tag] -> Cluster)
-> Parser (Maybe Text)
-> Parser (Maybe [Text] -> Maybe Int -> Maybe [Tag] -> Cluster)
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
"attachmentsStatus")
Parser (Maybe [Text] -> Maybe Int -> Maybe [Tag] -> Cluster)
-> Parser (Maybe [Text])
-> Parser (Maybe Int -> Maybe [Tag] -> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"capacityProviders"
Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
)
Parser (Maybe Int -> Maybe [Tag] -> Cluster)
-> Parser (Maybe Int) -> Parser (Maybe [Tag] -> Cluster)
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
"activeServicesCount")
Parser (Maybe [Tag] -> Cluster)
-> Parser (Maybe [Tag]) -> Parser Cluster
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 Cluster
instance Prelude.NFData Cluster