{-# 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.ManagedBlockChain.CreateNetwork
(
CreateNetwork (..),
newCreateNetwork,
createNetwork_frameworkConfiguration,
createNetwork_description,
createNetwork_tags,
createNetwork_clientRequestToken,
createNetwork_name,
createNetwork_framework,
createNetwork_frameworkVersion,
createNetwork_votingPolicy,
createNetwork_memberConfiguration,
CreateNetworkResponse (..),
newCreateNetworkResponse,
createNetworkResponse_memberId,
createNetworkResponse_networkId,
createNetworkResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.ManagedBlockChain.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateNetwork = CreateNetwork'
{
CreateNetwork -> Maybe NetworkFrameworkConfiguration
frameworkConfiguration :: Prelude.Maybe NetworkFrameworkConfiguration,
CreateNetwork -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateNetwork -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateNetwork -> Text
clientRequestToken :: Prelude.Text,
CreateNetwork -> Text
name :: Prelude.Text,
CreateNetwork -> Framework
framework :: Framework,
CreateNetwork -> Text
frameworkVersion :: Prelude.Text,
CreateNetwork -> VotingPolicy
votingPolicy :: VotingPolicy,
CreateNetwork -> MemberConfiguration
memberConfiguration :: MemberConfiguration
}
deriving (CreateNetwork -> CreateNetwork -> Bool
(CreateNetwork -> CreateNetwork -> Bool)
-> (CreateNetwork -> CreateNetwork -> Bool) -> Eq CreateNetwork
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateNetwork -> CreateNetwork -> Bool
$c/= :: CreateNetwork -> CreateNetwork -> Bool
== :: CreateNetwork -> CreateNetwork -> Bool
$c== :: CreateNetwork -> CreateNetwork -> Bool
Prelude.Eq, Int -> CreateNetwork -> ShowS
[CreateNetwork] -> ShowS
CreateNetwork -> String
(Int -> CreateNetwork -> ShowS)
-> (CreateNetwork -> String)
-> ([CreateNetwork] -> ShowS)
-> Show CreateNetwork
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateNetwork] -> ShowS
$cshowList :: [CreateNetwork] -> ShowS
show :: CreateNetwork -> String
$cshow :: CreateNetwork -> String
showsPrec :: Int -> CreateNetwork -> ShowS
$cshowsPrec :: Int -> CreateNetwork -> ShowS
Prelude.Show, (forall x. CreateNetwork -> Rep CreateNetwork x)
-> (forall x. Rep CreateNetwork x -> CreateNetwork)
-> Generic CreateNetwork
forall x. Rep CreateNetwork x -> CreateNetwork
forall x. CreateNetwork -> Rep CreateNetwork x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateNetwork x -> CreateNetwork
$cfrom :: forall x. CreateNetwork -> Rep CreateNetwork x
Prelude.Generic)
newCreateNetwork ::
Prelude.Text ->
Prelude.Text ->
Framework ->
Prelude.Text ->
VotingPolicy ->
MemberConfiguration ->
CreateNetwork
newCreateNetwork :: Text
-> Text
-> Framework
-> Text
-> VotingPolicy
-> MemberConfiguration
-> CreateNetwork
newCreateNetwork
Text
pClientRequestToken_
Text
pName_
Framework
pFramework_
Text
pFrameworkVersion_
VotingPolicy
pVotingPolicy_
MemberConfiguration
pMemberConfiguration_ =
CreateNetwork' :: Maybe NetworkFrameworkConfiguration
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Framework
-> Text
-> VotingPolicy
-> MemberConfiguration
-> CreateNetwork
CreateNetwork'
{ $sel:frameworkConfiguration:CreateNetwork' :: Maybe NetworkFrameworkConfiguration
frameworkConfiguration =
Maybe NetworkFrameworkConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateNetwork' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateNetwork' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:clientRequestToken:CreateNetwork' :: Text
clientRequestToken = Text
pClientRequestToken_,
$sel:name:CreateNetwork' :: Text
name = Text
pName_,
$sel:framework:CreateNetwork' :: Framework
framework = Framework
pFramework_,
$sel:frameworkVersion:CreateNetwork' :: Text
frameworkVersion = Text
pFrameworkVersion_,
$sel:votingPolicy:CreateNetwork' :: VotingPolicy
votingPolicy = VotingPolicy
pVotingPolicy_,
$sel:memberConfiguration:CreateNetwork' :: MemberConfiguration
memberConfiguration = MemberConfiguration
pMemberConfiguration_
}
createNetwork_frameworkConfiguration :: Lens.Lens' CreateNetwork (Prelude.Maybe NetworkFrameworkConfiguration)
createNetwork_frameworkConfiguration :: (Maybe NetworkFrameworkConfiguration
-> f (Maybe NetworkFrameworkConfiguration))
-> CreateNetwork -> f CreateNetwork
createNetwork_frameworkConfiguration = (CreateNetwork -> Maybe NetworkFrameworkConfiguration)
-> (CreateNetwork
-> Maybe NetworkFrameworkConfiguration -> CreateNetwork)
-> Lens
CreateNetwork
CreateNetwork
(Maybe NetworkFrameworkConfiguration)
(Maybe NetworkFrameworkConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetwork' {Maybe NetworkFrameworkConfiguration
frameworkConfiguration :: Maybe NetworkFrameworkConfiguration
$sel:frameworkConfiguration:CreateNetwork' :: CreateNetwork -> Maybe NetworkFrameworkConfiguration
frameworkConfiguration} -> Maybe NetworkFrameworkConfiguration
frameworkConfiguration) (\s :: CreateNetwork
s@CreateNetwork' {} Maybe NetworkFrameworkConfiguration
a -> CreateNetwork
s {$sel:frameworkConfiguration:CreateNetwork' :: Maybe NetworkFrameworkConfiguration
frameworkConfiguration = Maybe NetworkFrameworkConfiguration
a} :: CreateNetwork)
createNetwork_description :: Lens.Lens' CreateNetwork (Prelude.Maybe Prelude.Text)
createNetwork_description :: (Maybe Text -> f (Maybe Text)) -> CreateNetwork -> f CreateNetwork
createNetwork_description = (CreateNetwork -> Maybe Text)
-> (CreateNetwork -> Maybe Text -> CreateNetwork)
-> Lens CreateNetwork CreateNetwork (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetwork' {Maybe Text
description :: Maybe Text
$sel:description:CreateNetwork' :: CreateNetwork -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateNetwork
s@CreateNetwork' {} Maybe Text
a -> CreateNetwork
s {$sel:description:CreateNetwork' :: Maybe Text
description = Maybe Text
a} :: CreateNetwork)
createNetwork_tags :: Lens.Lens' CreateNetwork (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createNetwork_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateNetwork -> f CreateNetwork
createNetwork_tags = (CreateNetwork -> Maybe (HashMap Text Text))
-> (CreateNetwork -> Maybe (HashMap Text Text) -> CreateNetwork)
-> Lens
CreateNetwork
CreateNetwork
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetwork' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateNetwork' :: CreateNetwork -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateNetwork
s@CreateNetwork' {} Maybe (HashMap Text Text)
a -> CreateNetwork
s {$sel:tags:CreateNetwork' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateNetwork) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateNetwork -> f CreateNetwork)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateNetwork
-> f CreateNetwork
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text 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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createNetwork_clientRequestToken :: Lens.Lens' CreateNetwork Prelude.Text
createNetwork_clientRequestToken :: (Text -> f Text) -> CreateNetwork -> f CreateNetwork
createNetwork_clientRequestToken = (CreateNetwork -> Text)
-> (CreateNetwork -> Text -> CreateNetwork)
-> Lens CreateNetwork CreateNetwork Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetwork' {Text
clientRequestToken :: Text
$sel:clientRequestToken:CreateNetwork' :: CreateNetwork -> Text
clientRequestToken} -> Text
clientRequestToken) (\s :: CreateNetwork
s@CreateNetwork' {} Text
a -> CreateNetwork
s {$sel:clientRequestToken:CreateNetwork' :: Text
clientRequestToken = Text
a} :: CreateNetwork)
createNetwork_name :: Lens.Lens' CreateNetwork Prelude.Text
createNetwork_name :: (Text -> f Text) -> CreateNetwork -> f CreateNetwork
createNetwork_name = (CreateNetwork -> Text)
-> (CreateNetwork -> Text -> CreateNetwork)
-> Lens CreateNetwork CreateNetwork Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetwork' {Text
name :: Text
$sel:name:CreateNetwork' :: CreateNetwork -> Text
name} -> Text
name) (\s :: CreateNetwork
s@CreateNetwork' {} Text
a -> CreateNetwork
s {$sel:name:CreateNetwork' :: Text
name = Text
a} :: CreateNetwork)
createNetwork_framework :: Lens.Lens' CreateNetwork Framework
createNetwork_framework :: (Framework -> f Framework) -> CreateNetwork -> f CreateNetwork
createNetwork_framework = (CreateNetwork -> Framework)
-> (CreateNetwork -> Framework -> CreateNetwork)
-> Lens CreateNetwork CreateNetwork Framework Framework
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetwork' {Framework
framework :: Framework
$sel:framework:CreateNetwork' :: CreateNetwork -> Framework
framework} -> Framework
framework) (\s :: CreateNetwork
s@CreateNetwork' {} Framework
a -> CreateNetwork
s {$sel:framework:CreateNetwork' :: Framework
framework = Framework
a} :: CreateNetwork)
createNetwork_frameworkVersion :: Lens.Lens' CreateNetwork Prelude.Text
createNetwork_frameworkVersion :: (Text -> f Text) -> CreateNetwork -> f CreateNetwork
createNetwork_frameworkVersion = (CreateNetwork -> Text)
-> (CreateNetwork -> Text -> CreateNetwork)
-> Lens CreateNetwork CreateNetwork Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetwork' {Text
frameworkVersion :: Text
$sel:frameworkVersion:CreateNetwork' :: CreateNetwork -> Text
frameworkVersion} -> Text
frameworkVersion) (\s :: CreateNetwork
s@CreateNetwork' {} Text
a -> CreateNetwork
s {$sel:frameworkVersion:CreateNetwork' :: Text
frameworkVersion = Text
a} :: CreateNetwork)
createNetwork_votingPolicy :: Lens.Lens' CreateNetwork VotingPolicy
createNetwork_votingPolicy :: (VotingPolicy -> f VotingPolicy)
-> CreateNetwork -> f CreateNetwork
createNetwork_votingPolicy = (CreateNetwork -> VotingPolicy)
-> (CreateNetwork -> VotingPolicy -> CreateNetwork)
-> Lens CreateNetwork CreateNetwork VotingPolicy VotingPolicy
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetwork' {VotingPolicy
votingPolicy :: VotingPolicy
$sel:votingPolicy:CreateNetwork' :: CreateNetwork -> VotingPolicy
votingPolicy} -> VotingPolicy
votingPolicy) (\s :: CreateNetwork
s@CreateNetwork' {} VotingPolicy
a -> CreateNetwork
s {$sel:votingPolicy:CreateNetwork' :: VotingPolicy
votingPolicy = VotingPolicy
a} :: CreateNetwork)
createNetwork_memberConfiguration :: Lens.Lens' CreateNetwork MemberConfiguration
createNetwork_memberConfiguration :: (MemberConfiguration -> f MemberConfiguration)
-> CreateNetwork -> f CreateNetwork
createNetwork_memberConfiguration = (CreateNetwork -> MemberConfiguration)
-> (CreateNetwork -> MemberConfiguration -> CreateNetwork)
-> Lens
CreateNetwork CreateNetwork MemberConfiguration MemberConfiguration
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetwork' {MemberConfiguration
memberConfiguration :: MemberConfiguration
$sel:memberConfiguration:CreateNetwork' :: CreateNetwork -> MemberConfiguration
memberConfiguration} -> MemberConfiguration
memberConfiguration) (\s :: CreateNetwork
s@CreateNetwork' {} MemberConfiguration
a -> CreateNetwork
s {$sel:memberConfiguration:CreateNetwork' :: MemberConfiguration
memberConfiguration = MemberConfiguration
a} :: CreateNetwork)
instance Core.AWSRequest CreateNetwork where
type
AWSResponse CreateNetwork =
CreateNetworkResponse
request :: CreateNetwork -> Request CreateNetwork
request = Service -> CreateNetwork -> Request CreateNetwork
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateNetwork
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateNetwork)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateNetwork))
-> Logger
-> Service
-> Proxy CreateNetwork
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateNetwork)))
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 Text -> Maybe Text -> Int -> CreateNetworkResponse
CreateNetworkResponse'
(Maybe Text -> Maybe Text -> Int -> CreateNetworkResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> CreateNetworkResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"MemberId")
Either String (Maybe Text -> Int -> CreateNetworkResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateNetworkResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NetworkId")
Either String (Int -> CreateNetworkResponse)
-> Either String Int -> Either String CreateNetworkResponse
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 CreateNetwork
instance Prelude.NFData CreateNetwork
instance Core.ToHeaders CreateNetwork where
toHeaders :: CreateNetwork -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateNetwork -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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 CreateNetwork where
toJSON :: CreateNetwork -> Value
toJSON CreateNetwork' {Maybe Text
Maybe (HashMap Text Text)
Maybe NetworkFrameworkConfiguration
Text
Framework
MemberConfiguration
VotingPolicy
memberConfiguration :: MemberConfiguration
votingPolicy :: VotingPolicy
frameworkVersion :: Text
framework :: Framework
name :: Text
clientRequestToken :: Text
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
frameworkConfiguration :: Maybe NetworkFrameworkConfiguration
$sel:memberConfiguration:CreateNetwork' :: CreateNetwork -> MemberConfiguration
$sel:votingPolicy:CreateNetwork' :: CreateNetwork -> VotingPolicy
$sel:frameworkVersion:CreateNetwork' :: CreateNetwork -> Text
$sel:framework:CreateNetwork' :: CreateNetwork -> Framework
$sel:name:CreateNetwork' :: CreateNetwork -> Text
$sel:clientRequestToken:CreateNetwork' :: CreateNetwork -> Text
$sel:tags:CreateNetwork' :: CreateNetwork -> Maybe (HashMap Text Text)
$sel:description:CreateNetwork' :: CreateNetwork -> Maybe Text
$sel:frameworkConfiguration:CreateNetwork' :: CreateNetwork -> Maybe NetworkFrameworkConfiguration
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"FrameworkConfiguration" Text -> NetworkFrameworkConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(NetworkFrameworkConfiguration -> Pair)
-> Maybe NetworkFrameworkConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NetworkFrameworkConfiguration
frameworkConfiguration,
(Text
"Description" 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
description,
(Text
"Tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ClientRequestToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
clientRequestToken),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Framework" Text -> Framework -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Framework
framework),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"FrameworkVersion" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
frameworkVersion),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"VotingPolicy" Text -> VotingPolicy -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= VotingPolicy
votingPolicy),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"MemberConfiguration" Text -> MemberConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= MemberConfiguration
memberConfiguration)
]
)
instance Core.ToPath CreateNetwork where
toPath :: CreateNetwork -> ByteString
toPath = ByteString -> CreateNetwork -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/networks"
instance Core.ToQuery CreateNetwork where
toQuery :: CreateNetwork -> QueryString
toQuery = QueryString -> CreateNetwork -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateNetworkResponse = CreateNetworkResponse'
{
CreateNetworkResponse -> Maybe Text
memberId :: Prelude.Maybe Prelude.Text,
CreateNetworkResponse -> Maybe Text
networkId :: Prelude.Maybe Prelude.Text,
CreateNetworkResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateNetworkResponse -> CreateNetworkResponse -> Bool
(CreateNetworkResponse -> CreateNetworkResponse -> Bool)
-> (CreateNetworkResponse -> CreateNetworkResponse -> Bool)
-> Eq CreateNetworkResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateNetworkResponse -> CreateNetworkResponse -> Bool
$c/= :: CreateNetworkResponse -> CreateNetworkResponse -> Bool
== :: CreateNetworkResponse -> CreateNetworkResponse -> Bool
$c== :: CreateNetworkResponse -> CreateNetworkResponse -> Bool
Prelude.Eq, ReadPrec [CreateNetworkResponse]
ReadPrec CreateNetworkResponse
Int -> ReadS CreateNetworkResponse
ReadS [CreateNetworkResponse]
(Int -> ReadS CreateNetworkResponse)
-> ReadS [CreateNetworkResponse]
-> ReadPrec CreateNetworkResponse
-> ReadPrec [CreateNetworkResponse]
-> Read CreateNetworkResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateNetworkResponse]
$creadListPrec :: ReadPrec [CreateNetworkResponse]
readPrec :: ReadPrec CreateNetworkResponse
$creadPrec :: ReadPrec CreateNetworkResponse
readList :: ReadS [CreateNetworkResponse]
$creadList :: ReadS [CreateNetworkResponse]
readsPrec :: Int -> ReadS CreateNetworkResponse
$creadsPrec :: Int -> ReadS CreateNetworkResponse
Prelude.Read, Int -> CreateNetworkResponse -> ShowS
[CreateNetworkResponse] -> ShowS
CreateNetworkResponse -> String
(Int -> CreateNetworkResponse -> ShowS)
-> (CreateNetworkResponse -> String)
-> ([CreateNetworkResponse] -> ShowS)
-> Show CreateNetworkResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateNetworkResponse] -> ShowS
$cshowList :: [CreateNetworkResponse] -> ShowS
show :: CreateNetworkResponse -> String
$cshow :: CreateNetworkResponse -> String
showsPrec :: Int -> CreateNetworkResponse -> ShowS
$cshowsPrec :: Int -> CreateNetworkResponse -> ShowS
Prelude.Show, (forall x. CreateNetworkResponse -> Rep CreateNetworkResponse x)
-> (forall x. Rep CreateNetworkResponse x -> CreateNetworkResponse)
-> Generic CreateNetworkResponse
forall x. Rep CreateNetworkResponse x -> CreateNetworkResponse
forall x. CreateNetworkResponse -> Rep CreateNetworkResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateNetworkResponse x -> CreateNetworkResponse
$cfrom :: forall x. CreateNetworkResponse -> Rep CreateNetworkResponse x
Prelude.Generic)
newCreateNetworkResponse ::
Prelude.Int ->
CreateNetworkResponse
newCreateNetworkResponse :: Int -> CreateNetworkResponse
newCreateNetworkResponse Int
pHttpStatus_ =
CreateNetworkResponse' :: Maybe Text -> Maybe Text -> Int -> CreateNetworkResponse
CreateNetworkResponse'
{ $sel:memberId:CreateNetworkResponse' :: Maybe Text
memberId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:networkId:CreateNetworkResponse' :: Maybe Text
networkId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateNetworkResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createNetworkResponse_memberId :: Lens.Lens' CreateNetworkResponse (Prelude.Maybe Prelude.Text)
createNetworkResponse_memberId :: (Maybe Text -> f (Maybe Text))
-> CreateNetworkResponse -> f CreateNetworkResponse
createNetworkResponse_memberId = (CreateNetworkResponse -> Maybe Text)
-> (CreateNetworkResponse -> Maybe Text -> CreateNetworkResponse)
-> Lens
CreateNetworkResponse
CreateNetworkResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetworkResponse' {Maybe Text
memberId :: Maybe Text
$sel:memberId:CreateNetworkResponse' :: CreateNetworkResponse -> Maybe Text
memberId} -> Maybe Text
memberId) (\s :: CreateNetworkResponse
s@CreateNetworkResponse' {} Maybe Text
a -> CreateNetworkResponse
s {$sel:memberId:CreateNetworkResponse' :: Maybe Text
memberId = Maybe Text
a} :: CreateNetworkResponse)
createNetworkResponse_networkId :: Lens.Lens' CreateNetworkResponse (Prelude.Maybe Prelude.Text)
createNetworkResponse_networkId :: (Maybe Text -> f (Maybe Text))
-> CreateNetworkResponse -> f CreateNetworkResponse
createNetworkResponse_networkId = (CreateNetworkResponse -> Maybe Text)
-> (CreateNetworkResponse -> Maybe Text -> CreateNetworkResponse)
-> Lens
CreateNetworkResponse
CreateNetworkResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetworkResponse' {Maybe Text
networkId :: Maybe Text
$sel:networkId:CreateNetworkResponse' :: CreateNetworkResponse -> Maybe Text
networkId} -> Maybe Text
networkId) (\s :: CreateNetworkResponse
s@CreateNetworkResponse' {} Maybe Text
a -> CreateNetworkResponse
s {$sel:networkId:CreateNetworkResponse' :: Maybe Text
networkId = Maybe Text
a} :: CreateNetworkResponse)
createNetworkResponse_httpStatus :: Lens.Lens' CreateNetworkResponse Prelude.Int
createNetworkResponse_httpStatus :: (Int -> f Int) -> CreateNetworkResponse -> f CreateNetworkResponse
createNetworkResponse_httpStatus = (CreateNetworkResponse -> Int)
-> (CreateNetworkResponse -> Int -> CreateNetworkResponse)
-> Lens CreateNetworkResponse CreateNetworkResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetworkResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateNetworkResponse' :: CreateNetworkResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateNetworkResponse
s@CreateNetworkResponse' {} Int
a -> CreateNetworkResponse
s {$sel:httpStatus:CreateNetworkResponse' :: Int
httpStatus = Int
a} :: CreateNetworkResponse)
instance Prelude.NFData CreateNetworkResponse