{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.ECS.CreateCluster
(
CreateCluster (..),
newCreateCluster,
createCluster_defaultCapacityProviderStrategy,
createCluster_settings,
createCluster_clusterName,
createCluster_configuration,
createCluster_capacityProviders,
createCluster_tags,
CreateClusterResponse (..),
newCreateClusterResponse,
createClusterResponse_cluster,
createClusterResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.ECS.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateCluster = CreateCluster'
{
CreateCluster -> Maybe [CapacityProviderStrategyItem]
defaultCapacityProviderStrategy :: Prelude.Maybe [CapacityProviderStrategyItem],
CreateCluster -> Maybe [ClusterSetting]
settings :: Prelude.Maybe [ClusterSetting],
CreateCluster -> Maybe Text
clusterName :: Prelude.Maybe Prelude.Text,
CreateCluster -> Maybe ClusterConfiguration
configuration :: Prelude.Maybe ClusterConfiguration,
CreateCluster -> Maybe [Text]
capacityProviders :: Prelude.Maybe [Prelude.Text],
CreateCluster -> Maybe [Tag]
tags :: Prelude.Maybe [Tag]
}
deriving (CreateCluster -> CreateCluster -> Bool
(CreateCluster -> CreateCluster -> Bool)
-> (CreateCluster -> CreateCluster -> Bool) -> Eq CreateCluster
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateCluster -> CreateCluster -> Bool
$c/= :: CreateCluster -> CreateCluster -> Bool
== :: CreateCluster -> CreateCluster -> Bool
$c== :: CreateCluster -> CreateCluster -> Bool
Prelude.Eq, ReadPrec [CreateCluster]
ReadPrec CreateCluster
Int -> ReadS CreateCluster
ReadS [CreateCluster]
(Int -> ReadS CreateCluster)
-> ReadS [CreateCluster]
-> ReadPrec CreateCluster
-> ReadPrec [CreateCluster]
-> Read CreateCluster
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateCluster]
$creadListPrec :: ReadPrec [CreateCluster]
readPrec :: ReadPrec CreateCluster
$creadPrec :: ReadPrec CreateCluster
readList :: ReadS [CreateCluster]
$creadList :: ReadS [CreateCluster]
readsPrec :: Int -> ReadS CreateCluster
$creadsPrec :: Int -> ReadS CreateCluster
Prelude.Read, Int -> CreateCluster -> ShowS
[CreateCluster] -> ShowS
CreateCluster -> String
(Int -> CreateCluster -> ShowS)
-> (CreateCluster -> String)
-> ([CreateCluster] -> ShowS)
-> Show CreateCluster
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateCluster] -> ShowS
$cshowList :: [CreateCluster] -> ShowS
show :: CreateCluster -> String
$cshow :: CreateCluster -> String
showsPrec :: Int -> CreateCluster -> ShowS
$cshowsPrec :: Int -> CreateCluster -> ShowS
Prelude.Show, (forall x. CreateCluster -> Rep CreateCluster x)
-> (forall x. Rep CreateCluster x -> CreateCluster)
-> Generic CreateCluster
forall x. Rep CreateCluster x -> CreateCluster
forall x. CreateCluster -> Rep CreateCluster x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateCluster x -> CreateCluster
$cfrom :: forall x. CreateCluster -> Rep CreateCluster x
Prelude.Generic)
newCreateCluster ::
CreateCluster
newCreateCluster :: CreateCluster
newCreateCluster =
CreateCluster' :: Maybe [CapacityProviderStrategyItem]
-> Maybe [ClusterSetting]
-> Maybe Text
-> Maybe ClusterConfiguration
-> Maybe [Text]
-> Maybe [Tag]
-> CreateCluster
CreateCluster'
{ $sel:defaultCapacityProviderStrategy:CreateCluster' :: Maybe [CapacityProviderStrategyItem]
defaultCapacityProviderStrategy =
Maybe [CapacityProviderStrategyItem]
forall a. Maybe a
Prelude.Nothing,
$sel:settings:CreateCluster' :: Maybe [ClusterSetting]
settings = Maybe [ClusterSetting]
forall a. Maybe a
Prelude.Nothing,
$sel:clusterName:CreateCluster' :: Maybe Text
clusterName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:configuration:CreateCluster' :: Maybe ClusterConfiguration
configuration = Maybe ClusterConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:capacityProviders:CreateCluster' :: Maybe [Text]
capacityProviders = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateCluster' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing
}
createCluster_defaultCapacityProviderStrategy :: Lens.Lens' CreateCluster (Prelude.Maybe [CapacityProviderStrategyItem])
createCluster_defaultCapacityProviderStrategy :: (Maybe [CapacityProviderStrategyItem]
-> f (Maybe [CapacityProviderStrategyItem]))
-> CreateCluster -> f CreateCluster
createCluster_defaultCapacityProviderStrategy = (CreateCluster -> Maybe [CapacityProviderStrategyItem])
-> (CreateCluster
-> Maybe [CapacityProviderStrategyItem] -> CreateCluster)
-> Lens
CreateCluster
CreateCluster
(Maybe [CapacityProviderStrategyItem])
(Maybe [CapacityProviderStrategyItem])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe [CapacityProviderStrategyItem]
defaultCapacityProviderStrategy :: Maybe [CapacityProviderStrategyItem]
$sel:defaultCapacityProviderStrategy:CreateCluster' :: CreateCluster -> Maybe [CapacityProviderStrategyItem]
defaultCapacityProviderStrategy} -> Maybe [CapacityProviderStrategyItem]
defaultCapacityProviderStrategy) (\s :: CreateCluster
s@CreateCluster' {} Maybe [CapacityProviderStrategyItem]
a -> CreateCluster
s {$sel:defaultCapacityProviderStrategy:CreateCluster' :: Maybe [CapacityProviderStrategyItem]
defaultCapacityProviderStrategy = Maybe [CapacityProviderStrategyItem]
a} :: CreateCluster) ((Maybe [CapacityProviderStrategyItem]
-> f (Maybe [CapacityProviderStrategyItem]))
-> CreateCluster -> f CreateCluster)
-> ((Maybe [CapacityProviderStrategyItem]
-> f (Maybe [CapacityProviderStrategyItem]))
-> Maybe [CapacityProviderStrategyItem]
-> f (Maybe [CapacityProviderStrategyItem]))
-> (Maybe [CapacityProviderStrategyItem]
-> f (Maybe [CapacityProviderStrategyItem]))
-> CreateCluster
-> f CreateCluster
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
createCluster_settings :: Lens.Lens' CreateCluster (Prelude.Maybe [ClusterSetting])
createCluster_settings :: (Maybe [ClusterSetting] -> f (Maybe [ClusterSetting]))
-> CreateCluster -> f CreateCluster
createCluster_settings = (CreateCluster -> Maybe [ClusterSetting])
-> (CreateCluster -> Maybe [ClusterSetting] -> CreateCluster)
-> Lens
CreateCluster
CreateCluster
(Maybe [ClusterSetting])
(Maybe [ClusterSetting])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe [ClusterSetting]
settings :: Maybe [ClusterSetting]
$sel:settings:CreateCluster' :: CreateCluster -> Maybe [ClusterSetting]
settings} -> Maybe [ClusterSetting]
settings) (\s :: CreateCluster
s@CreateCluster' {} Maybe [ClusterSetting]
a -> CreateCluster
s {$sel:settings:CreateCluster' :: Maybe [ClusterSetting]
settings = Maybe [ClusterSetting]
a} :: CreateCluster) ((Maybe [ClusterSetting] -> f (Maybe [ClusterSetting]))
-> CreateCluster -> f CreateCluster)
-> ((Maybe [ClusterSetting] -> f (Maybe [ClusterSetting]))
-> Maybe [ClusterSetting] -> f (Maybe [ClusterSetting]))
-> (Maybe [ClusterSetting] -> f (Maybe [ClusterSetting]))
-> CreateCluster
-> f CreateCluster
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
createCluster_clusterName :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Text)
createCluster_clusterName :: (Maybe Text -> f (Maybe Text)) -> CreateCluster -> f CreateCluster
createCluster_clusterName = (CreateCluster -> Maybe Text)
-> (CreateCluster -> Maybe Text -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe Text
clusterName :: Maybe Text
$sel:clusterName:CreateCluster' :: CreateCluster -> Maybe Text
clusterName} -> Maybe Text
clusterName) (\s :: CreateCluster
s@CreateCluster' {} Maybe Text
a -> CreateCluster
s {$sel:clusterName:CreateCluster' :: Maybe Text
clusterName = Maybe Text
a} :: CreateCluster)
createCluster_configuration :: Lens.Lens' CreateCluster (Prelude.Maybe ClusterConfiguration)
createCluster_configuration :: (Maybe ClusterConfiguration -> f (Maybe ClusterConfiguration))
-> CreateCluster -> f CreateCluster
createCluster_configuration = (CreateCluster -> Maybe ClusterConfiguration)
-> (CreateCluster -> Maybe ClusterConfiguration -> CreateCluster)
-> Lens
CreateCluster
CreateCluster
(Maybe ClusterConfiguration)
(Maybe ClusterConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe ClusterConfiguration
configuration :: Maybe ClusterConfiguration
$sel:configuration:CreateCluster' :: CreateCluster -> Maybe ClusterConfiguration
configuration} -> Maybe ClusterConfiguration
configuration) (\s :: CreateCluster
s@CreateCluster' {} Maybe ClusterConfiguration
a -> CreateCluster
s {$sel:configuration:CreateCluster' :: Maybe ClusterConfiguration
configuration = Maybe ClusterConfiguration
a} :: CreateCluster)
createCluster_capacityProviders :: Lens.Lens' CreateCluster (Prelude.Maybe [Prelude.Text])
createCluster_capacityProviders :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateCluster -> f CreateCluster
createCluster_capacityProviders = (CreateCluster -> Maybe [Text])
-> (CreateCluster -> Maybe [Text] -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe [Text]
capacityProviders :: Maybe [Text]
$sel:capacityProviders:CreateCluster' :: CreateCluster -> Maybe [Text]
capacityProviders} -> Maybe [Text]
capacityProviders) (\s :: CreateCluster
s@CreateCluster' {} Maybe [Text]
a -> CreateCluster
s {$sel:capacityProviders:CreateCluster' :: Maybe [Text]
capacityProviders = Maybe [Text]
a} :: CreateCluster) ((Maybe [Text] -> f (Maybe [Text]))
-> CreateCluster -> f CreateCluster)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateCluster
-> f CreateCluster
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
createCluster_tags :: Lens.Lens' CreateCluster (Prelude.Maybe [Tag])
createCluster_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateCluster -> f CreateCluster
createCluster_tags = (CreateCluster -> Maybe [Tag])
-> (CreateCluster -> Maybe [Tag] -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateCluster' :: CreateCluster -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateCluster
s@CreateCluster' {} Maybe [Tag]
a -> CreateCluster
s {$sel:tags:CreateCluster' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateCluster) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CreateCluster -> f CreateCluster)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateCluster
-> f CreateCluster
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.AWSRequest CreateCluster where
type
AWSResponse CreateCluster =
CreateClusterResponse
request :: CreateCluster -> Request CreateCluster
request = Service -> CreateCluster -> Request CreateCluster
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateCluster
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateCluster)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateCluster))
-> Logger
-> Service
-> Proxy CreateCluster
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateCluster)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Cluster -> Int -> CreateClusterResponse
CreateClusterResponse'
(Maybe Cluster -> Int -> CreateClusterResponse)
-> Either String (Maybe Cluster)
-> Either String (Int -> CreateClusterResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Cluster)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"cluster")
Either String (Int -> CreateClusterResponse)
-> Either String Int -> Either String CreateClusterResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable CreateCluster
instance Prelude.NFData CreateCluster
instance Core.ToHeaders CreateCluster where
toHeaders :: CreateCluster -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateCluster -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AmazonEC2ContainerServiceV20141113.CreateCluster" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON CreateCluster where
toJSON :: CreateCluster -> Value
toJSON CreateCluster' {Maybe [Text]
Maybe [CapacityProviderStrategyItem]
Maybe [ClusterSetting]
Maybe [Tag]
Maybe Text
Maybe ClusterConfiguration
tags :: Maybe [Tag]
capacityProviders :: Maybe [Text]
configuration :: Maybe ClusterConfiguration
clusterName :: Maybe Text
settings :: Maybe [ClusterSetting]
defaultCapacityProviderStrategy :: Maybe [CapacityProviderStrategyItem]
$sel:tags:CreateCluster' :: CreateCluster -> Maybe [Tag]
$sel:capacityProviders:CreateCluster' :: CreateCluster -> Maybe [Text]
$sel:configuration:CreateCluster' :: CreateCluster -> Maybe ClusterConfiguration
$sel:clusterName:CreateCluster' :: CreateCluster -> Maybe Text
$sel:settings:CreateCluster' :: CreateCluster -> Maybe [ClusterSetting]
$sel:defaultCapacityProviderStrategy:CreateCluster' :: CreateCluster -> Maybe [CapacityProviderStrategyItem]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"defaultCapacityProviderStrategy" Text -> [CapacityProviderStrategyItem] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([CapacityProviderStrategyItem] -> Pair)
-> Maybe [CapacityProviderStrategyItem] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [CapacityProviderStrategyItem]
defaultCapacityProviderStrategy,
(Text
"settings" Text -> [ClusterSetting] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([ClusterSetting] -> Pair) -> Maybe [ClusterSetting] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ClusterSetting]
settings,
(Text
"clusterName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clusterName,
(Text
"configuration" Text -> ClusterConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ClusterConfiguration -> Pair)
-> Maybe ClusterConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ClusterConfiguration
configuration,
(Text
"capacityProviders" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
capacityProviders,
(Text
"tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags
]
)
instance Core.ToPath CreateCluster where
toPath :: CreateCluster -> ByteString
toPath = ByteString -> CreateCluster -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateCluster where
toQuery :: CreateCluster -> QueryString
toQuery = QueryString -> CreateCluster -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateClusterResponse = CreateClusterResponse'
{
CreateClusterResponse -> Maybe Cluster
cluster :: Prelude.Maybe Cluster,
CreateClusterResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateClusterResponse -> CreateClusterResponse -> Bool
(CreateClusterResponse -> CreateClusterResponse -> Bool)
-> (CreateClusterResponse -> CreateClusterResponse -> Bool)
-> Eq CreateClusterResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateClusterResponse -> CreateClusterResponse -> Bool
$c/= :: CreateClusterResponse -> CreateClusterResponse -> Bool
== :: CreateClusterResponse -> CreateClusterResponse -> Bool
$c== :: CreateClusterResponse -> CreateClusterResponse -> Bool
Prelude.Eq, ReadPrec [CreateClusterResponse]
ReadPrec CreateClusterResponse
Int -> ReadS CreateClusterResponse
ReadS [CreateClusterResponse]
(Int -> ReadS CreateClusterResponse)
-> ReadS [CreateClusterResponse]
-> ReadPrec CreateClusterResponse
-> ReadPrec [CreateClusterResponse]
-> Read CreateClusterResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateClusterResponse]
$creadListPrec :: ReadPrec [CreateClusterResponse]
readPrec :: ReadPrec CreateClusterResponse
$creadPrec :: ReadPrec CreateClusterResponse
readList :: ReadS [CreateClusterResponse]
$creadList :: ReadS [CreateClusterResponse]
readsPrec :: Int -> ReadS CreateClusterResponse
$creadsPrec :: Int -> ReadS CreateClusterResponse
Prelude.Read, Int -> CreateClusterResponse -> ShowS
[CreateClusterResponse] -> ShowS
CreateClusterResponse -> String
(Int -> CreateClusterResponse -> ShowS)
-> (CreateClusterResponse -> String)
-> ([CreateClusterResponse] -> ShowS)
-> Show CreateClusterResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateClusterResponse] -> ShowS
$cshowList :: [CreateClusterResponse] -> ShowS
show :: CreateClusterResponse -> String
$cshow :: CreateClusterResponse -> String
showsPrec :: Int -> CreateClusterResponse -> ShowS
$cshowsPrec :: Int -> CreateClusterResponse -> ShowS
Prelude.Show, (forall x. CreateClusterResponse -> Rep CreateClusterResponse x)
-> (forall x. Rep CreateClusterResponse x -> CreateClusterResponse)
-> Generic CreateClusterResponse
forall x. Rep CreateClusterResponse x -> CreateClusterResponse
forall x. CreateClusterResponse -> Rep CreateClusterResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateClusterResponse x -> CreateClusterResponse
$cfrom :: forall x. CreateClusterResponse -> Rep CreateClusterResponse x
Prelude.Generic)
newCreateClusterResponse ::
Prelude.Int ->
CreateClusterResponse
newCreateClusterResponse :: Int -> CreateClusterResponse
newCreateClusterResponse Int
pHttpStatus_ =
CreateClusterResponse' :: Maybe Cluster -> Int -> CreateClusterResponse
CreateClusterResponse'
{ $sel:cluster:CreateClusterResponse' :: Maybe Cluster
cluster = Maybe Cluster
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateClusterResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createClusterResponse_cluster :: Lens.Lens' CreateClusterResponse (Prelude.Maybe Cluster)
createClusterResponse_cluster :: (Maybe Cluster -> f (Maybe Cluster))
-> CreateClusterResponse -> f CreateClusterResponse
createClusterResponse_cluster = (CreateClusterResponse -> Maybe Cluster)
-> (CreateClusterResponse
-> Maybe Cluster -> CreateClusterResponse)
-> Lens
CreateClusterResponse
CreateClusterResponse
(Maybe Cluster)
(Maybe Cluster)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateClusterResponse' {Maybe Cluster
cluster :: Maybe Cluster
$sel:cluster:CreateClusterResponse' :: CreateClusterResponse -> Maybe Cluster
cluster} -> Maybe Cluster
cluster) (\s :: CreateClusterResponse
s@CreateClusterResponse' {} Maybe Cluster
a -> CreateClusterResponse
s {$sel:cluster:CreateClusterResponse' :: Maybe Cluster
cluster = Maybe Cluster
a} :: CreateClusterResponse)
createClusterResponse_httpStatus :: Lens.Lens' CreateClusterResponse Prelude.Int
createClusterResponse_httpStatus :: (Int -> f Int) -> CreateClusterResponse -> f CreateClusterResponse
createClusterResponse_httpStatus = (CreateClusterResponse -> Int)
-> (CreateClusterResponse -> Int -> CreateClusterResponse)
-> Lens CreateClusterResponse CreateClusterResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateClusterResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateClusterResponse' :: CreateClusterResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateClusterResponse
s@CreateClusterResponse' {} Int
a -> CreateClusterResponse
s {$sel:httpStatus:CreateClusterResponse' :: Int
httpStatus = Int
a} :: CreateClusterResponse)
instance Prelude.NFData CreateClusterResponse