{-# 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_description,
createNetwork_frameworkConfiguration,
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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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 Text
description :: Prelude.Maybe Prelude.Text,
CreateNetwork -> Maybe NetworkFrameworkConfiguration
frameworkConfiguration :: Prelude.Maybe NetworkFrameworkConfiguration,
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
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
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. 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'
{ $sel:description:CreateNetwork' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:frameworkConfiguration:CreateNetwork' :: Maybe NetworkFrameworkConfiguration
frameworkConfiguration = forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateNetwork' :: Maybe (HashMap Text Text)
tags = 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_description :: Lens.Lens' CreateNetwork (Prelude.Maybe Prelude.Text)
createNetwork_description :: Lens' CreateNetwork (Maybe Text)
createNetwork_description = 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_frameworkConfiguration :: Lens.Lens' CreateNetwork (Prelude.Maybe NetworkFrameworkConfiguration)
createNetwork_frameworkConfiguration :: Lens' CreateNetwork (Maybe NetworkFrameworkConfiguration)
createNetwork_frameworkConfiguration = 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_tags :: Lens.Lens' CreateNetwork (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createNetwork_tags :: Lens' CreateNetwork (Maybe (HashMap Text Text))
createNetwork_tags = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 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 :: Lens' CreateNetwork Text
createNetwork_clientRequestToken = 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 :: Lens' CreateNetwork Text
createNetwork_name = 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 :: Lens' CreateNetwork Framework
createNetwork_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 :: Lens' CreateNetwork Text
createNetwork_frameworkVersion = 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 :: Lens' CreateNetwork VotingPolicy
createNetwork_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 :: Lens' CreateNetwork MemberConfiguration
createNetwork_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 :: (Service -> Service) -> CreateNetwork -> Request CreateNetwork
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateNetwork
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateNetwork)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> 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'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"MemberId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NetworkId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable CreateNetwork where
hashWithSalt :: Int -> CreateNetwork -> Int
hashWithSalt Int
_salt 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)
frameworkConfiguration :: Maybe NetworkFrameworkConfiguration
description :: Maybe Text
$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:frameworkConfiguration:CreateNetwork' :: CreateNetwork -> Maybe NetworkFrameworkConfiguration
$sel:description:CreateNetwork' :: CreateNetwork -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe NetworkFrameworkConfiguration
frameworkConfiguration
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
clientRequestToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Framework
framework
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
frameworkVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` VotingPolicy
votingPolicy
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` MemberConfiguration
memberConfiguration
instance Prelude.NFData CreateNetwork where
rnf :: CreateNetwork -> ()
rnf 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)
frameworkConfiguration :: Maybe NetworkFrameworkConfiguration
description :: Maybe Text
$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:frameworkConfiguration:CreateNetwork' :: CreateNetwork -> Maybe NetworkFrameworkConfiguration
$sel:description:CreateNetwork' :: CreateNetwork -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe NetworkFrameworkConfiguration
frameworkConfiguration
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
clientRequestToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Framework
framework
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
frameworkVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf VotingPolicy
votingPolicy
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf MemberConfiguration
memberConfiguration
instance Data.ToHeaders CreateNetwork where
toHeaders :: CreateNetwork -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.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)
frameworkConfiguration :: Maybe NetworkFrameworkConfiguration
description :: Maybe Text
$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:frameworkConfiguration:CreateNetwork' :: CreateNetwork -> Maybe NetworkFrameworkConfiguration
$sel:description:CreateNetwork' :: CreateNetwork -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"Description" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
(Key
"FrameworkConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NetworkFrameworkConfiguration
frameworkConfiguration,
(Key
"Tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
forall a. a -> Maybe a
Prelude.Just
(Key
"ClientRequestToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
clientRequestToken),
forall a. a -> Maybe a
Prelude.Just (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name),
forall a. a -> Maybe a
Prelude.Just (Key
"Framework" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Framework
framework),
forall a. a -> Maybe a
Prelude.Just
(Key
"FrameworkVersion" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
frameworkVersion),
forall a. a -> Maybe a
Prelude.Just (Key
"VotingPolicy" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= VotingPolicy
votingPolicy),
forall a. a -> Maybe a
Prelude.Just
(Key
"MemberConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= MemberConfiguration
memberConfiguration)
]
)
instance Data.ToPath CreateNetwork where
toPath :: CreateNetwork -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/networks"
instance Data.ToQuery CreateNetwork where
toQuery :: CreateNetwork -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const 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
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]
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
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. 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'
{ $sel:memberId:CreateNetworkResponse' :: Maybe Text
memberId = forall a. Maybe a
Prelude.Nothing,
$sel:networkId:CreateNetworkResponse' :: Maybe Text
networkId = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateNetworkResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createNetworkResponse_memberId :: Lens.Lens' CreateNetworkResponse (Prelude.Maybe Prelude.Text)
createNetworkResponse_memberId :: Lens' CreateNetworkResponse (Maybe Text)
createNetworkResponse_memberId = 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 :: Lens' CreateNetworkResponse (Maybe Text)
createNetworkResponse_networkId = 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 :: Lens' CreateNetworkResponse Int
createNetworkResponse_httpStatus = 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 where
rnf :: CreateNetworkResponse -> ()
rnf CreateNetworkResponse' {Int
Maybe Text
httpStatus :: Int
networkId :: Maybe Text
memberId :: Maybe Text
$sel:httpStatus:CreateNetworkResponse' :: CreateNetworkResponse -> Int
$sel:networkId:CreateNetworkResponse' :: CreateNetworkResponse -> Maybe Text
$sel:memberId:CreateNetworkResponse' :: CreateNetworkResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
memberId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
networkId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus