1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #include <aws/core/utils/Outcome.h>
7 #include <aws/core/auth/AWSAuthSigner.h>
8 #include <aws/core/client/CoreErrors.h>
9 #include <aws/core/client/RetryStrategy.h>
10 #include <aws/core/http/HttpClient.h>
11 #include <aws/core/http/HttpResponse.h>
12 #include <aws/core/http/HttpClientFactory.h>
13 #include <aws/core/auth/AWSCredentialsProviderChain.h>
14 #include <aws/core/utils/json/JsonSerializer.h>
15 #include <aws/core/utils/memory/stl/AWSStringStream.h>
16 #include <aws/core/utils/threading/Executor.h>
17 #include <aws/core/utils/DNS.h>
18 #include <aws/core/utils/logging/LogMacros.h>
19 
20 #include <aws/managedblockchain/ManagedBlockchainClient.h>
21 #include <aws/managedblockchain/ManagedBlockchainEndpoint.h>
22 #include <aws/managedblockchain/ManagedBlockchainErrorMarshaller.h>
23 #include <aws/managedblockchain/model/CreateMemberRequest.h>
24 #include <aws/managedblockchain/model/CreateNetworkRequest.h>
25 #include <aws/managedblockchain/model/CreateNodeRequest.h>
26 #include <aws/managedblockchain/model/CreateProposalRequest.h>
27 #include <aws/managedblockchain/model/DeleteMemberRequest.h>
28 #include <aws/managedblockchain/model/DeleteNodeRequest.h>
29 #include <aws/managedblockchain/model/GetMemberRequest.h>
30 #include <aws/managedblockchain/model/GetNetworkRequest.h>
31 #include <aws/managedblockchain/model/GetNodeRequest.h>
32 #include <aws/managedblockchain/model/GetProposalRequest.h>
33 #include <aws/managedblockchain/model/ListInvitationsRequest.h>
34 #include <aws/managedblockchain/model/ListMembersRequest.h>
35 #include <aws/managedblockchain/model/ListNetworksRequest.h>
36 #include <aws/managedblockchain/model/ListNodesRequest.h>
37 #include <aws/managedblockchain/model/ListProposalVotesRequest.h>
38 #include <aws/managedblockchain/model/ListProposalsRequest.h>
39 #include <aws/managedblockchain/model/ListTagsForResourceRequest.h>
40 #include <aws/managedblockchain/model/RejectInvitationRequest.h>
41 #include <aws/managedblockchain/model/TagResourceRequest.h>
42 #include <aws/managedblockchain/model/UntagResourceRequest.h>
43 #include <aws/managedblockchain/model/UpdateMemberRequest.h>
44 #include <aws/managedblockchain/model/UpdateNodeRequest.h>
45 #include <aws/managedblockchain/model/VoteOnProposalRequest.h>
46 
47 using namespace Aws;
48 using namespace Aws::Auth;
49 using namespace Aws::Client;
50 using namespace Aws::ManagedBlockchain;
51 using namespace Aws::ManagedBlockchain::Model;
52 using namespace Aws::Http;
53 using namespace Aws::Utils::Json;
54 
55 static const char* SERVICE_NAME = "managedblockchain";
56 static const char* ALLOCATION_TAG = "ManagedBlockchainClient";
57 
58 
ManagedBlockchainClient(const Client::ClientConfiguration & clientConfiguration)59 ManagedBlockchainClient::ManagedBlockchainClient(const Client::ClientConfiguration& clientConfiguration) :
60   BASECLASS(clientConfiguration,
61     Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, Aws::MakeShared<DefaultAWSCredentialsProviderChain>(ALLOCATION_TAG),
62         SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
63     Aws::MakeShared<ManagedBlockchainErrorMarshaller>(ALLOCATION_TAG)),
64     m_executor(clientConfiguration.executor)
65 {
66   init(clientConfiguration);
67 }
68 
ManagedBlockchainClient(const AWSCredentials & credentials,const Client::ClientConfiguration & clientConfiguration)69 ManagedBlockchainClient::ManagedBlockchainClient(const AWSCredentials& credentials, const Client::ClientConfiguration& clientConfiguration) :
70   BASECLASS(clientConfiguration,
71     Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, Aws::MakeShared<SimpleAWSCredentialsProvider>(ALLOCATION_TAG, credentials),
72          SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
73     Aws::MakeShared<ManagedBlockchainErrorMarshaller>(ALLOCATION_TAG)),
74     m_executor(clientConfiguration.executor)
75 {
76   init(clientConfiguration);
77 }
78 
ManagedBlockchainClient(const std::shared_ptr<AWSCredentialsProvider> & credentialsProvider,const Client::ClientConfiguration & clientConfiguration)79 ManagedBlockchainClient::ManagedBlockchainClient(const std::shared_ptr<AWSCredentialsProvider>& credentialsProvider,
80   const Client::ClientConfiguration& clientConfiguration) :
81   BASECLASS(clientConfiguration,
82     Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, credentialsProvider,
83          SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
84     Aws::MakeShared<ManagedBlockchainErrorMarshaller>(ALLOCATION_TAG)),
85     m_executor(clientConfiguration.executor)
86 {
87   init(clientConfiguration);
88 }
89 
~ManagedBlockchainClient()90 ManagedBlockchainClient::~ManagedBlockchainClient()
91 {
92 }
93 
init(const Client::ClientConfiguration & config)94 void ManagedBlockchainClient::init(const Client::ClientConfiguration& config)
95 {
96   SetServiceClientName("ManagedBlockchain");
97   m_configScheme = SchemeMapper::ToString(config.scheme);
98   if (config.endpointOverride.empty())
99   {
100       m_uri = m_configScheme + "://" + ManagedBlockchainEndpoint::ForRegion(config.region, config.useDualStack);
101   }
102   else
103   {
104       OverrideEndpoint(config.endpointOverride);
105   }
106 }
107 
OverrideEndpoint(const Aws::String & endpoint)108 void ManagedBlockchainClient::OverrideEndpoint(const Aws::String& endpoint)
109 {
110   if (endpoint.compare(0, 7, "http://") == 0 || endpoint.compare(0, 8, "https://") == 0)
111   {
112       m_uri = endpoint;
113   }
114   else
115   {
116       m_uri = m_configScheme + "://" + endpoint;
117   }
118 }
119 
CreateMember(const CreateMemberRequest & request) const120 CreateMemberOutcome ManagedBlockchainClient::CreateMember(const CreateMemberRequest& request) const
121 {
122   if (!request.NetworkIdHasBeenSet())
123   {
124     AWS_LOGSTREAM_ERROR("CreateMember", "Required field: NetworkId, is not set");
125     return CreateMemberOutcome(Aws::Client::AWSError<ManagedBlockchainErrors>(ManagedBlockchainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [NetworkId]", false));
126   }
127   Aws::Http::URI uri = m_uri;
128   uri.AddPathSegments("/networks/");
129   uri.AddPathSegment(request.GetNetworkId());
130   uri.AddPathSegments("/members");
131   return CreateMemberOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
132 }
133 
CreateMemberCallable(const CreateMemberRequest & request) const134 CreateMemberOutcomeCallable ManagedBlockchainClient::CreateMemberCallable(const CreateMemberRequest& request) const
135 {
136   auto task = Aws::MakeShared< std::packaged_task< CreateMemberOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CreateMember(request); } );
137   auto packagedFunction = [task]() { (*task)(); };
138   m_executor->Submit(packagedFunction);
139   return task->get_future();
140 }
141 
CreateMemberAsync(const CreateMemberRequest & request,const CreateMemberResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const142 void ManagedBlockchainClient::CreateMemberAsync(const CreateMemberRequest& request, const CreateMemberResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
143 {
144   m_executor->Submit( [this, request, handler, context](){ this->CreateMemberAsyncHelper( request, handler, context ); } );
145 }
146 
CreateMemberAsyncHelper(const CreateMemberRequest & request,const CreateMemberResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const147 void ManagedBlockchainClient::CreateMemberAsyncHelper(const CreateMemberRequest& request, const CreateMemberResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
148 {
149   handler(this, request, CreateMember(request), context);
150 }
151 
CreateNetwork(const CreateNetworkRequest & request) const152 CreateNetworkOutcome ManagedBlockchainClient::CreateNetwork(const CreateNetworkRequest& request) const
153 {
154   Aws::Http::URI uri = m_uri;
155   uri.AddPathSegments("/networks");
156   return CreateNetworkOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
157 }
158 
CreateNetworkCallable(const CreateNetworkRequest & request) const159 CreateNetworkOutcomeCallable ManagedBlockchainClient::CreateNetworkCallable(const CreateNetworkRequest& request) const
160 {
161   auto task = Aws::MakeShared< std::packaged_task< CreateNetworkOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CreateNetwork(request); } );
162   auto packagedFunction = [task]() { (*task)(); };
163   m_executor->Submit(packagedFunction);
164   return task->get_future();
165 }
166 
CreateNetworkAsync(const CreateNetworkRequest & request,const CreateNetworkResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const167 void ManagedBlockchainClient::CreateNetworkAsync(const CreateNetworkRequest& request, const CreateNetworkResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
168 {
169   m_executor->Submit( [this, request, handler, context](){ this->CreateNetworkAsyncHelper( request, handler, context ); } );
170 }
171 
CreateNetworkAsyncHelper(const CreateNetworkRequest & request,const CreateNetworkResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const172 void ManagedBlockchainClient::CreateNetworkAsyncHelper(const CreateNetworkRequest& request, const CreateNetworkResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
173 {
174   handler(this, request, CreateNetwork(request), context);
175 }
176 
CreateNode(const CreateNodeRequest & request) const177 CreateNodeOutcome ManagedBlockchainClient::CreateNode(const CreateNodeRequest& request) const
178 {
179   if (!request.NetworkIdHasBeenSet())
180   {
181     AWS_LOGSTREAM_ERROR("CreateNode", "Required field: NetworkId, is not set");
182     return CreateNodeOutcome(Aws::Client::AWSError<ManagedBlockchainErrors>(ManagedBlockchainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [NetworkId]", false));
183   }
184   Aws::Http::URI uri = m_uri;
185   uri.AddPathSegments("/networks/");
186   uri.AddPathSegment(request.GetNetworkId());
187   uri.AddPathSegments("/nodes");
188   return CreateNodeOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
189 }
190 
CreateNodeCallable(const CreateNodeRequest & request) const191 CreateNodeOutcomeCallable ManagedBlockchainClient::CreateNodeCallable(const CreateNodeRequest& request) const
192 {
193   auto task = Aws::MakeShared< std::packaged_task< CreateNodeOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CreateNode(request); } );
194   auto packagedFunction = [task]() { (*task)(); };
195   m_executor->Submit(packagedFunction);
196   return task->get_future();
197 }
198 
CreateNodeAsync(const CreateNodeRequest & request,const CreateNodeResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const199 void ManagedBlockchainClient::CreateNodeAsync(const CreateNodeRequest& request, const CreateNodeResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
200 {
201   m_executor->Submit( [this, request, handler, context](){ this->CreateNodeAsyncHelper( request, handler, context ); } );
202 }
203 
CreateNodeAsyncHelper(const CreateNodeRequest & request,const CreateNodeResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const204 void ManagedBlockchainClient::CreateNodeAsyncHelper(const CreateNodeRequest& request, const CreateNodeResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
205 {
206   handler(this, request, CreateNode(request), context);
207 }
208 
CreateProposal(const CreateProposalRequest & request) const209 CreateProposalOutcome ManagedBlockchainClient::CreateProposal(const CreateProposalRequest& request) const
210 {
211   if (!request.NetworkIdHasBeenSet())
212   {
213     AWS_LOGSTREAM_ERROR("CreateProposal", "Required field: NetworkId, is not set");
214     return CreateProposalOutcome(Aws::Client::AWSError<ManagedBlockchainErrors>(ManagedBlockchainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [NetworkId]", false));
215   }
216   Aws::Http::URI uri = m_uri;
217   uri.AddPathSegments("/networks/");
218   uri.AddPathSegment(request.GetNetworkId());
219   uri.AddPathSegments("/proposals");
220   return CreateProposalOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
221 }
222 
CreateProposalCallable(const CreateProposalRequest & request) const223 CreateProposalOutcomeCallable ManagedBlockchainClient::CreateProposalCallable(const CreateProposalRequest& request) const
224 {
225   auto task = Aws::MakeShared< std::packaged_task< CreateProposalOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CreateProposal(request); } );
226   auto packagedFunction = [task]() { (*task)(); };
227   m_executor->Submit(packagedFunction);
228   return task->get_future();
229 }
230 
CreateProposalAsync(const CreateProposalRequest & request,const CreateProposalResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const231 void ManagedBlockchainClient::CreateProposalAsync(const CreateProposalRequest& request, const CreateProposalResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
232 {
233   m_executor->Submit( [this, request, handler, context](){ this->CreateProposalAsyncHelper( request, handler, context ); } );
234 }
235 
CreateProposalAsyncHelper(const CreateProposalRequest & request,const CreateProposalResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const236 void ManagedBlockchainClient::CreateProposalAsyncHelper(const CreateProposalRequest& request, const CreateProposalResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
237 {
238   handler(this, request, CreateProposal(request), context);
239 }
240 
DeleteMember(const DeleteMemberRequest & request) const241 DeleteMemberOutcome ManagedBlockchainClient::DeleteMember(const DeleteMemberRequest& request) const
242 {
243   if (!request.NetworkIdHasBeenSet())
244   {
245     AWS_LOGSTREAM_ERROR("DeleteMember", "Required field: NetworkId, is not set");
246     return DeleteMemberOutcome(Aws::Client::AWSError<ManagedBlockchainErrors>(ManagedBlockchainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [NetworkId]", false));
247   }
248   if (!request.MemberIdHasBeenSet())
249   {
250     AWS_LOGSTREAM_ERROR("DeleteMember", "Required field: MemberId, is not set");
251     return DeleteMemberOutcome(Aws::Client::AWSError<ManagedBlockchainErrors>(ManagedBlockchainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [MemberId]", false));
252   }
253   Aws::Http::URI uri = m_uri;
254   uri.AddPathSegments("/networks/");
255   uri.AddPathSegment(request.GetNetworkId());
256   uri.AddPathSegments("/members/");
257   uri.AddPathSegment(request.GetMemberId());
258   return DeleteMemberOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER));
259 }
260 
DeleteMemberCallable(const DeleteMemberRequest & request) const261 DeleteMemberOutcomeCallable ManagedBlockchainClient::DeleteMemberCallable(const DeleteMemberRequest& request) const
262 {
263   auto task = Aws::MakeShared< std::packaged_task< DeleteMemberOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DeleteMember(request); } );
264   auto packagedFunction = [task]() { (*task)(); };
265   m_executor->Submit(packagedFunction);
266   return task->get_future();
267 }
268 
DeleteMemberAsync(const DeleteMemberRequest & request,const DeleteMemberResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const269 void ManagedBlockchainClient::DeleteMemberAsync(const DeleteMemberRequest& request, const DeleteMemberResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
270 {
271   m_executor->Submit( [this, request, handler, context](){ this->DeleteMemberAsyncHelper( request, handler, context ); } );
272 }
273 
DeleteMemberAsyncHelper(const DeleteMemberRequest & request,const DeleteMemberResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const274 void ManagedBlockchainClient::DeleteMemberAsyncHelper(const DeleteMemberRequest& request, const DeleteMemberResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
275 {
276   handler(this, request, DeleteMember(request), context);
277 }
278 
DeleteNode(const DeleteNodeRequest & request) const279 DeleteNodeOutcome ManagedBlockchainClient::DeleteNode(const DeleteNodeRequest& request) const
280 {
281   if (!request.NetworkIdHasBeenSet())
282   {
283     AWS_LOGSTREAM_ERROR("DeleteNode", "Required field: NetworkId, is not set");
284     return DeleteNodeOutcome(Aws::Client::AWSError<ManagedBlockchainErrors>(ManagedBlockchainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [NetworkId]", false));
285   }
286   if (!request.NodeIdHasBeenSet())
287   {
288     AWS_LOGSTREAM_ERROR("DeleteNode", "Required field: NodeId, is not set");
289     return DeleteNodeOutcome(Aws::Client::AWSError<ManagedBlockchainErrors>(ManagedBlockchainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [NodeId]", false));
290   }
291   Aws::Http::URI uri = m_uri;
292   uri.AddPathSegments("/networks/");
293   uri.AddPathSegment(request.GetNetworkId());
294   uri.AddPathSegments("/nodes/");
295   uri.AddPathSegment(request.GetNodeId());
296   return DeleteNodeOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER));
297 }
298 
DeleteNodeCallable(const DeleteNodeRequest & request) const299 DeleteNodeOutcomeCallable ManagedBlockchainClient::DeleteNodeCallable(const DeleteNodeRequest& request) const
300 {
301   auto task = Aws::MakeShared< std::packaged_task< DeleteNodeOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DeleteNode(request); } );
302   auto packagedFunction = [task]() { (*task)(); };
303   m_executor->Submit(packagedFunction);
304   return task->get_future();
305 }
306 
DeleteNodeAsync(const DeleteNodeRequest & request,const DeleteNodeResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const307 void ManagedBlockchainClient::DeleteNodeAsync(const DeleteNodeRequest& request, const DeleteNodeResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
308 {
309   m_executor->Submit( [this, request, handler, context](){ this->DeleteNodeAsyncHelper( request, handler, context ); } );
310 }
311 
DeleteNodeAsyncHelper(const DeleteNodeRequest & request,const DeleteNodeResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const312 void ManagedBlockchainClient::DeleteNodeAsyncHelper(const DeleteNodeRequest& request, const DeleteNodeResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
313 {
314   handler(this, request, DeleteNode(request), context);
315 }
316 
GetMember(const GetMemberRequest & request) const317 GetMemberOutcome ManagedBlockchainClient::GetMember(const GetMemberRequest& request) const
318 {
319   if (!request.NetworkIdHasBeenSet())
320   {
321     AWS_LOGSTREAM_ERROR("GetMember", "Required field: NetworkId, is not set");
322     return GetMemberOutcome(Aws::Client::AWSError<ManagedBlockchainErrors>(ManagedBlockchainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [NetworkId]", false));
323   }
324   if (!request.MemberIdHasBeenSet())
325   {
326     AWS_LOGSTREAM_ERROR("GetMember", "Required field: MemberId, is not set");
327     return GetMemberOutcome(Aws::Client::AWSError<ManagedBlockchainErrors>(ManagedBlockchainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [MemberId]", false));
328   }
329   Aws::Http::URI uri = m_uri;
330   uri.AddPathSegments("/networks/");
331   uri.AddPathSegment(request.GetNetworkId());
332   uri.AddPathSegments("/members/");
333   uri.AddPathSegment(request.GetMemberId());
334   return GetMemberOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
335 }
336 
GetMemberCallable(const GetMemberRequest & request) const337 GetMemberOutcomeCallable ManagedBlockchainClient::GetMemberCallable(const GetMemberRequest& request) const
338 {
339   auto task = Aws::MakeShared< std::packaged_task< GetMemberOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetMember(request); } );
340   auto packagedFunction = [task]() { (*task)(); };
341   m_executor->Submit(packagedFunction);
342   return task->get_future();
343 }
344 
GetMemberAsync(const GetMemberRequest & request,const GetMemberResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const345 void ManagedBlockchainClient::GetMemberAsync(const GetMemberRequest& request, const GetMemberResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
346 {
347   m_executor->Submit( [this, request, handler, context](){ this->GetMemberAsyncHelper( request, handler, context ); } );
348 }
349 
GetMemberAsyncHelper(const GetMemberRequest & request,const GetMemberResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const350 void ManagedBlockchainClient::GetMemberAsyncHelper(const GetMemberRequest& request, const GetMemberResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
351 {
352   handler(this, request, GetMember(request), context);
353 }
354 
GetNetwork(const GetNetworkRequest & request) const355 GetNetworkOutcome ManagedBlockchainClient::GetNetwork(const GetNetworkRequest& request) const
356 {
357   if (!request.NetworkIdHasBeenSet())
358   {
359     AWS_LOGSTREAM_ERROR("GetNetwork", "Required field: NetworkId, is not set");
360     return GetNetworkOutcome(Aws::Client::AWSError<ManagedBlockchainErrors>(ManagedBlockchainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [NetworkId]", false));
361   }
362   Aws::Http::URI uri = m_uri;
363   uri.AddPathSegments("/networks/");
364   uri.AddPathSegment(request.GetNetworkId());
365   return GetNetworkOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
366 }
367 
GetNetworkCallable(const GetNetworkRequest & request) const368 GetNetworkOutcomeCallable ManagedBlockchainClient::GetNetworkCallable(const GetNetworkRequest& request) const
369 {
370   auto task = Aws::MakeShared< std::packaged_task< GetNetworkOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetNetwork(request); } );
371   auto packagedFunction = [task]() { (*task)(); };
372   m_executor->Submit(packagedFunction);
373   return task->get_future();
374 }
375 
GetNetworkAsync(const GetNetworkRequest & request,const GetNetworkResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const376 void ManagedBlockchainClient::GetNetworkAsync(const GetNetworkRequest& request, const GetNetworkResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
377 {
378   m_executor->Submit( [this, request, handler, context](){ this->GetNetworkAsyncHelper( request, handler, context ); } );
379 }
380 
GetNetworkAsyncHelper(const GetNetworkRequest & request,const GetNetworkResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const381 void ManagedBlockchainClient::GetNetworkAsyncHelper(const GetNetworkRequest& request, const GetNetworkResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
382 {
383   handler(this, request, GetNetwork(request), context);
384 }
385 
GetNode(const GetNodeRequest & request) const386 GetNodeOutcome ManagedBlockchainClient::GetNode(const GetNodeRequest& request) const
387 {
388   if (!request.NetworkIdHasBeenSet())
389   {
390     AWS_LOGSTREAM_ERROR("GetNode", "Required field: NetworkId, is not set");
391     return GetNodeOutcome(Aws::Client::AWSError<ManagedBlockchainErrors>(ManagedBlockchainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [NetworkId]", false));
392   }
393   if (!request.NodeIdHasBeenSet())
394   {
395     AWS_LOGSTREAM_ERROR("GetNode", "Required field: NodeId, is not set");
396     return GetNodeOutcome(Aws::Client::AWSError<ManagedBlockchainErrors>(ManagedBlockchainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [NodeId]", false));
397   }
398   Aws::Http::URI uri = m_uri;
399   uri.AddPathSegments("/networks/");
400   uri.AddPathSegment(request.GetNetworkId());
401   uri.AddPathSegments("/nodes/");
402   uri.AddPathSegment(request.GetNodeId());
403   return GetNodeOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
404 }
405 
GetNodeCallable(const GetNodeRequest & request) const406 GetNodeOutcomeCallable ManagedBlockchainClient::GetNodeCallable(const GetNodeRequest& request) const
407 {
408   auto task = Aws::MakeShared< std::packaged_task< GetNodeOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetNode(request); } );
409   auto packagedFunction = [task]() { (*task)(); };
410   m_executor->Submit(packagedFunction);
411   return task->get_future();
412 }
413 
GetNodeAsync(const GetNodeRequest & request,const GetNodeResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const414 void ManagedBlockchainClient::GetNodeAsync(const GetNodeRequest& request, const GetNodeResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
415 {
416   m_executor->Submit( [this, request, handler, context](){ this->GetNodeAsyncHelper( request, handler, context ); } );
417 }
418 
GetNodeAsyncHelper(const GetNodeRequest & request,const GetNodeResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const419 void ManagedBlockchainClient::GetNodeAsyncHelper(const GetNodeRequest& request, const GetNodeResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
420 {
421   handler(this, request, GetNode(request), context);
422 }
423 
GetProposal(const GetProposalRequest & request) const424 GetProposalOutcome ManagedBlockchainClient::GetProposal(const GetProposalRequest& request) const
425 {
426   if (!request.NetworkIdHasBeenSet())
427   {
428     AWS_LOGSTREAM_ERROR("GetProposal", "Required field: NetworkId, is not set");
429     return GetProposalOutcome(Aws::Client::AWSError<ManagedBlockchainErrors>(ManagedBlockchainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [NetworkId]", false));
430   }
431   if (!request.ProposalIdHasBeenSet())
432   {
433     AWS_LOGSTREAM_ERROR("GetProposal", "Required field: ProposalId, is not set");
434     return GetProposalOutcome(Aws::Client::AWSError<ManagedBlockchainErrors>(ManagedBlockchainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ProposalId]", false));
435   }
436   Aws::Http::URI uri = m_uri;
437   uri.AddPathSegments("/networks/");
438   uri.AddPathSegment(request.GetNetworkId());
439   uri.AddPathSegments("/proposals/");
440   uri.AddPathSegment(request.GetProposalId());
441   return GetProposalOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
442 }
443 
GetProposalCallable(const GetProposalRequest & request) const444 GetProposalOutcomeCallable ManagedBlockchainClient::GetProposalCallable(const GetProposalRequest& request) const
445 {
446   auto task = Aws::MakeShared< std::packaged_task< GetProposalOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetProposal(request); } );
447   auto packagedFunction = [task]() { (*task)(); };
448   m_executor->Submit(packagedFunction);
449   return task->get_future();
450 }
451 
GetProposalAsync(const GetProposalRequest & request,const GetProposalResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const452 void ManagedBlockchainClient::GetProposalAsync(const GetProposalRequest& request, const GetProposalResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
453 {
454   m_executor->Submit( [this, request, handler, context](){ this->GetProposalAsyncHelper( request, handler, context ); } );
455 }
456 
GetProposalAsyncHelper(const GetProposalRequest & request,const GetProposalResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const457 void ManagedBlockchainClient::GetProposalAsyncHelper(const GetProposalRequest& request, const GetProposalResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
458 {
459   handler(this, request, GetProposal(request), context);
460 }
461 
ListInvitations(const ListInvitationsRequest & request) const462 ListInvitationsOutcome ManagedBlockchainClient::ListInvitations(const ListInvitationsRequest& request) const
463 {
464   Aws::Http::URI uri = m_uri;
465   uri.AddPathSegments("/invitations");
466   return ListInvitationsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
467 }
468 
ListInvitationsCallable(const ListInvitationsRequest & request) const469 ListInvitationsOutcomeCallable ManagedBlockchainClient::ListInvitationsCallable(const ListInvitationsRequest& request) const
470 {
471   auto task = Aws::MakeShared< std::packaged_task< ListInvitationsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListInvitations(request); } );
472   auto packagedFunction = [task]() { (*task)(); };
473   m_executor->Submit(packagedFunction);
474   return task->get_future();
475 }
476 
ListInvitationsAsync(const ListInvitationsRequest & request,const ListInvitationsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const477 void ManagedBlockchainClient::ListInvitationsAsync(const ListInvitationsRequest& request, const ListInvitationsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
478 {
479   m_executor->Submit( [this, request, handler, context](){ this->ListInvitationsAsyncHelper( request, handler, context ); } );
480 }
481 
ListInvitationsAsyncHelper(const ListInvitationsRequest & request,const ListInvitationsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const482 void ManagedBlockchainClient::ListInvitationsAsyncHelper(const ListInvitationsRequest& request, const ListInvitationsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
483 {
484   handler(this, request, ListInvitations(request), context);
485 }
486 
ListMembers(const ListMembersRequest & request) const487 ListMembersOutcome ManagedBlockchainClient::ListMembers(const ListMembersRequest& request) const
488 {
489   if (!request.NetworkIdHasBeenSet())
490   {
491     AWS_LOGSTREAM_ERROR("ListMembers", "Required field: NetworkId, is not set");
492     return ListMembersOutcome(Aws::Client::AWSError<ManagedBlockchainErrors>(ManagedBlockchainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [NetworkId]", false));
493   }
494   Aws::Http::URI uri = m_uri;
495   uri.AddPathSegments("/networks/");
496   uri.AddPathSegment(request.GetNetworkId());
497   uri.AddPathSegments("/members");
498   return ListMembersOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
499 }
500 
ListMembersCallable(const ListMembersRequest & request) const501 ListMembersOutcomeCallable ManagedBlockchainClient::ListMembersCallable(const ListMembersRequest& request) const
502 {
503   auto task = Aws::MakeShared< std::packaged_task< ListMembersOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListMembers(request); } );
504   auto packagedFunction = [task]() { (*task)(); };
505   m_executor->Submit(packagedFunction);
506   return task->get_future();
507 }
508 
ListMembersAsync(const ListMembersRequest & request,const ListMembersResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const509 void ManagedBlockchainClient::ListMembersAsync(const ListMembersRequest& request, const ListMembersResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
510 {
511   m_executor->Submit( [this, request, handler, context](){ this->ListMembersAsyncHelper( request, handler, context ); } );
512 }
513 
ListMembersAsyncHelper(const ListMembersRequest & request,const ListMembersResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const514 void ManagedBlockchainClient::ListMembersAsyncHelper(const ListMembersRequest& request, const ListMembersResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
515 {
516   handler(this, request, ListMembers(request), context);
517 }
518 
ListNetworks(const ListNetworksRequest & request) const519 ListNetworksOutcome ManagedBlockchainClient::ListNetworks(const ListNetworksRequest& request) const
520 {
521   Aws::Http::URI uri = m_uri;
522   uri.AddPathSegments("/networks");
523   return ListNetworksOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
524 }
525 
ListNetworksCallable(const ListNetworksRequest & request) const526 ListNetworksOutcomeCallable ManagedBlockchainClient::ListNetworksCallable(const ListNetworksRequest& request) const
527 {
528   auto task = Aws::MakeShared< std::packaged_task< ListNetworksOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListNetworks(request); } );
529   auto packagedFunction = [task]() { (*task)(); };
530   m_executor->Submit(packagedFunction);
531   return task->get_future();
532 }
533 
ListNetworksAsync(const ListNetworksRequest & request,const ListNetworksResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const534 void ManagedBlockchainClient::ListNetworksAsync(const ListNetworksRequest& request, const ListNetworksResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
535 {
536   m_executor->Submit( [this, request, handler, context](){ this->ListNetworksAsyncHelper( request, handler, context ); } );
537 }
538 
ListNetworksAsyncHelper(const ListNetworksRequest & request,const ListNetworksResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const539 void ManagedBlockchainClient::ListNetworksAsyncHelper(const ListNetworksRequest& request, const ListNetworksResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
540 {
541   handler(this, request, ListNetworks(request), context);
542 }
543 
ListNodes(const ListNodesRequest & request) const544 ListNodesOutcome ManagedBlockchainClient::ListNodes(const ListNodesRequest& request) const
545 {
546   if (!request.NetworkIdHasBeenSet())
547   {
548     AWS_LOGSTREAM_ERROR("ListNodes", "Required field: NetworkId, is not set");
549     return ListNodesOutcome(Aws::Client::AWSError<ManagedBlockchainErrors>(ManagedBlockchainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [NetworkId]", false));
550   }
551   Aws::Http::URI uri = m_uri;
552   uri.AddPathSegments("/networks/");
553   uri.AddPathSegment(request.GetNetworkId());
554   uri.AddPathSegments("/nodes");
555   return ListNodesOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
556 }
557 
ListNodesCallable(const ListNodesRequest & request) const558 ListNodesOutcomeCallable ManagedBlockchainClient::ListNodesCallable(const ListNodesRequest& request) const
559 {
560   auto task = Aws::MakeShared< std::packaged_task< ListNodesOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListNodes(request); } );
561   auto packagedFunction = [task]() { (*task)(); };
562   m_executor->Submit(packagedFunction);
563   return task->get_future();
564 }
565 
ListNodesAsync(const ListNodesRequest & request,const ListNodesResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const566 void ManagedBlockchainClient::ListNodesAsync(const ListNodesRequest& request, const ListNodesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
567 {
568   m_executor->Submit( [this, request, handler, context](){ this->ListNodesAsyncHelper( request, handler, context ); } );
569 }
570 
ListNodesAsyncHelper(const ListNodesRequest & request,const ListNodesResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const571 void ManagedBlockchainClient::ListNodesAsyncHelper(const ListNodesRequest& request, const ListNodesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
572 {
573   handler(this, request, ListNodes(request), context);
574 }
575 
ListProposalVotes(const ListProposalVotesRequest & request) const576 ListProposalVotesOutcome ManagedBlockchainClient::ListProposalVotes(const ListProposalVotesRequest& request) const
577 {
578   if (!request.NetworkIdHasBeenSet())
579   {
580     AWS_LOGSTREAM_ERROR("ListProposalVotes", "Required field: NetworkId, is not set");
581     return ListProposalVotesOutcome(Aws::Client::AWSError<ManagedBlockchainErrors>(ManagedBlockchainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [NetworkId]", false));
582   }
583   if (!request.ProposalIdHasBeenSet())
584   {
585     AWS_LOGSTREAM_ERROR("ListProposalVotes", "Required field: ProposalId, is not set");
586     return ListProposalVotesOutcome(Aws::Client::AWSError<ManagedBlockchainErrors>(ManagedBlockchainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ProposalId]", false));
587   }
588   Aws::Http::URI uri = m_uri;
589   uri.AddPathSegments("/networks/");
590   uri.AddPathSegment(request.GetNetworkId());
591   uri.AddPathSegments("/proposals/");
592   uri.AddPathSegment(request.GetProposalId());
593   uri.AddPathSegments("/votes");
594   return ListProposalVotesOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
595 }
596 
ListProposalVotesCallable(const ListProposalVotesRequest & request) const597 ListProposalVotesOutcomeCallable ManagedBlockchainClient::ListProposalVotesCallable(const ListProposalVotesRequest& request) const
598 {
599   auto task = Aws::MakeShared< std::packaged_task< ListProposalVotesOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListProposalVotes(request); } );
600   auto packagedFunction = [task]() { (*task)(); };
601   m_executor->Submit(packagedFunction);
602   return task->get_future();
603 }
604 
ListProposalVotesAsync(const ListProposalVotesRequest & request,const ListProposalVotesResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const605 void ManagedBlockchainClient::ListProposalVotesAsync(const ListProposalVotesRequest& request, const ListProposalVotesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
606 {
607   m_executor->Submit( [this, request, handler, context](){ this->ListProposalVotesAsyncHelper( request, handler, context ); } );
608 }
609 
ListProposalVotesAsyncHelper(const ListProposalVotesRequest & request,const ListProposalVotesResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const610 void ManagedBlockchainClient::ListProposalVotesAsyncHelper(const ListProposalVotesRequest& request, const ListProposalVotesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
611 {
612   handler(this, request, ListProposalVotes(request), context);
613 }
614 
ListProposals(const ListProposalsRequest & request) const615 ListProposalsOutcome ManagedBlockchainClient::ListProposals(const ListProposalsRequest& request) const
616 {
617   if (!request.NetworkIdHasBeenSet())
618   {
619     AWS_LOGSTREAM_ERROR("ListProposals", "Required field: NetworkId, is not set");
620     return ListProposalsOutcome(Aws::Client::AWSError<ManagedBlockchainErrors>(ManagedBlockchainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [NetworkId]", false));
621   }
622   Aws::Http::URI uri = m_uri;
623   uri.AddPathSegments("/networks/");
624   uri.AddPathSegment(request.GetNetworkId());
625   uri.AddPathSegments("/proposals");
626   return ListProposalsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
627 }
628 
ListProposalsCallable(const ListProposalsRequest & request) const629 ListProposalsOutcomeCallable ManagedBlockchainClient::ListProposalsCallable(const ListProposalsRequest& request) const
630 {
631   auto task = Aws::MakeShared< std::packaged_task< ListProposalsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListProposals(request); } );
632   auto packagedFunction = [task]() { (*task)(); };
633   m_executor->Submit(packagedFunction);
634   return task->get_future();
635 }
636 
ListProposalsAsync(const ListProposalsRequest & request,const ListProposalsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const637 void ManagedBlockchainClient::ListProposalsAsync(const ListProposalsRequest& request, const ListProposalsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
638 {
639   m_executor->Submit( [this, request, handler, context](){ this->ListProposalsAsyncHelper( request, handler, context ); } );
640 }
641 
ListProposalsAsyncHelper(const ListProposalsRequest & request,const ListProposalsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const642 void ManagedBlockchainClient::ListProposalsAsyncHelper(const ListProposalsRequest& request, const ListProposalsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
643 {
644   handler(this, request, ListProposals(request), context);
645 }
646 
ListTagsForResource(const ListTagsForResourceRequest & request) const647 ListTagsForResourceOutcome ManagedBlockchainClient::ListTagsForResource(const ListTagsForResourceRequest& request) const
648 {
649   if (!request.ResourceArnHasBeenSet())
650   {
651     AWS_LOGSTREAM_ERROR("ListTagsForResource", "Required field: ResourceArn, is not set");
652     return ListTagsForResourceOutcome(Aws::Client::AWSError<ManagedBlockchainErrors>(ManagedBlockchainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ResourceArn]", false));
653   }
654   Aws::Http::URI uri = m_uri;
655   uri.AddPathSegments("/tags/");
656   uri.AddPathSegment(request.GetResourceArn());
657   return ListTagsForResourceOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
658 }
659 
ListTagsForResourceCallable(const ListTagsForResourceRequest & request) const660 ListTagsForResourceOutcomeCallable ManagedBlockchainClient::ListTagsForResourceCallable(const ListTagsForResourceRequest& request) const
661 {
662   auto task = Aws::MakeShared< std::packaged_task< ListTagsForResourceOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListTagsForResource(request); } );
663   auto packagedFunction = [task]() { (*task)(); };
664   m_executor->Submit(packagedFunction);
665   return task->get_future();
666 }
667 
ListTagsForResourceAsync(const ListTagsForResourceRequest & request,const ListTagsForResourceResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const668 void ManagedBlockchainClient::ListTagsForResourceAsync(const ListTagsForResourceRequest& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
669 {
670   m_executor->Submit( [this, request, handler, context](){ this->ListTagsForResourceAsyncHelper( request, handler, context ); } );
671 }
672 
ListTagsForResourceAsyncHelper(const ListTagsForResourceRequest & request,const ListTagsForResourceResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const673 void ManagedBlockchainClient::ListTagsForResourceAsyncHelper(const ListTagsForResourceRequest& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
674 {
675   handler(this, request, ListTagsForResource(request), context);
676 }
677 
RejectInvitation(const RejectInvitationRequest & request) const678 RejectInvitationOutcome ManagedBlockchainClient::RejectInvitation(const RejectInvitationRequest& request) const
679 {
680   if (!request.InvitationIdHasBeenSet())
681   {
682     AWS_LOGSTREAM_ERROR("RejectInvitation", "Required field: InvitationId, is not set");
683     return RejectInvitationOutcome(Aws::Client::AWSError<ManagedBlockchainErrors>(ManagedBlockchainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [InvitationId]", false));
684   }
685   Aws::Http::URI uri = m_uri;
686   uri.AddPathSegments("/invitations/");
687   uri.AddPathSegment(request.GetInvitationId());
688   return RejectInvitationOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER));
689 }
690 
RejectInvitationCallable(const RejectInvitationRequest & request) const691 RejectInvitationOutcomeCallable ManagedBlockchainClient::RejectInvitationCallable(const RejectInvitationRequest& request) const
692 {
693   auto task = Aws::MakeShared< std::packaged_task< RejectInvitationOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->RejectInvitation(request); } );
694   auto packagedFunction = [task]() { (*task)(); };
695   m_executor->Submit(packagedFunction);
696   return task->get_future();
697 }
698 
RejectInvitationAsync(const RejectInvitationRequest & request,const RejectInvitationResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const699 void ManagedBlockchainClient::RejectInvitationAsync(const RejectInvitationRequest& request, const RejectInvitationResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
700 {
701   m_executor->Submit( [this, request, handler, context](){ this->RejectInvitationAsyncHelper( request, handler, context ); } );
702 }
703 
RejectInvitationAsyncHelper(const RejectInvitationRequest & request,const RejectInvitationResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const704 void ManagedBlockchainClient::RejectInvitationAsyncHelper(const RejectInvitationRequest& request, const RejectInvitationResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
705 {
706   handler(this, request, RejectInvitation(request), context);
707 }
708 
TagResource(const TagResourceRequest & request) const709 TagResourceOutcome ManagedBlockchainClient::TagResource(const TagResourceRequest& request) const
710 {
711   if (!request.ResourceArnHasBeenSet())
712   {
713     AWS_LOGSTREAM_ERROR("TagResource", "Required field: ResourceArn, is not set");
714     return TagResourceOutcome(Aws::Client::AWSError<ManagedBlockchainErrors>(ManagedBlockchainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ResourceArn]", false));
715   }
716   Aws::Http::URI uri = m_uri;
717   uri.AddPathSegments("/tags/");
718   uri.AddPathSegment(request.GetResourceArn());
719   return TagResourceOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
720 }
721 
TagResourceCallable(const TagResourceRequest & request) const722 TagResourceOutcomeCallable ManagedBlockchainClient::TagResourceCallable(const TagResourceRequest& request) const
723 {
724   auto task = Aws::MakeShared< std::packaged_task< TagResourceOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->TagResource(request); } );
725   auto packagedFunction = [task]() { (*task)(); };
726   m_executor->Submit(packagedFunction);
727   return task->get_future();
728 }
729 
TagResourceAsync(const TagResourceRequest & request,const TagResourceResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const730 void ManagedBlockchainClient::TagResourceAsync(const TagResourceRequest& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
731 {
732   m_executor->Submit( [this, request, handler, context](){ this->TagResourceAsyncHelper( request, handler, context ); } );
733 }
734 
TagResourceAsyncHelper(const TagResourceRequest & request,const TagResourceResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const735 void ManagedBlockchainClient::TagResourceAsyncHelper(const TagResourceRequest& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
736 {
737   handler(this, request, TagResource(request), context);
738 }
739 
UntagResource(const UntagResourceRequest & request) const740 UntagResourceOutcome ManagedBlockchainClient::UntagResource(const UntagResourceRequest& request) const
741 {
742   if (!request.ResourceArnHasBeenSet())
743   {
744     AWS_LOGSTREAM_ERROR("UntagResource", "Required field: ResourceArn, is not set");
745     return UntagResourceOutcome(Aws::Client::AWSError<ManagedBlockchainErrors>(ManagedBlockchainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ResourceArn]", false));
746   }
747   if (!request.TagKeysHasBeenSet())
748   {
749     AWS_LOGSTREAM_ERROR("UntagResource", "Required field: TagKeys, is not set");
750     return UntagResourceOutcome(Aws::Client::AWSError<ManagedBlockchainErrors>(ManagedBlockchainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [TagKeys]", false));
751   }
752   Aws::Http::URI uri = m_uri;
753   uri.AddPathSegments("/tags/");
754   uri.AddPathSegment(request.GetResourceArn());
755   return UntagResourceOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER));
756 }
757 
UntagResourceCallable(const UntagResourceRequest & request) const758 UntagResourceOutcomeCallable ManagedBlockchainClient::UntagResourceCallable(const UntagResourceRequest& request) const
759 {
760   auto task = Aws::MakeShared< std::packaged_task< UntagResourceOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UntagResource(request); } );
761   auto packagedFunction = [task]() { (*task)(); };
762   m_executor->Submit(packagedFunction);
763   return task->get_future();
764 }
765 
UntagResourceAsync(const UntagResourceRequest & request,const UntagResourceResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const766 void ManagedBlockchainClient::UntagResourceAsync(const UntagResourceRequest& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
767 {
768   m_executor->Submit( [this, request, handler, context](){ this->UntagResourceAsyncHelper( request, handler, context ); } );
769 }
770 
UntagResourceAsyncHelper(const UntagResourceRequest & request,const UntagResourceResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const771 void ManagedBlockchainClient::UntagResourceAsyncHelper(const UntagResourceRequest& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
772 {
773   handler(this, request, UntagResource(request), context);
774 }
775 
UpdateMember(const UpdateMemberRequest & request) const776 UpdateMemberOutcome ManagedBlockchainClient::UpdateMember(const UpdateMemberRequest& request) const
777 {
778   if (!request.NetworkIdHasBeenSet())
779   {
780     AWS_LOGSTREAM_ERROR("UpdateMember", "Required field: NetworkId, is not set");
781     return UpdateMemberOutcome(Aws::Client::AWSError<ManagedBlockchainErrors>(ManagedBlockchainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [NetworkId]", false));
782   }
783   if (!request.MemberIdHasBeenSet())
784   {
785     AWS_LOGSTREAM_ERROR("UpdateMember", "Required field: MemberId, is not set");
786     return UpdateMemberOutcome(Aws::Client::AWSError<ManagedBlockchainErrors>(ManagedBlockchainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [MemberId]", false));
787   }
788   Aws::Http::URI uri = m_uri;
789   uri.AddPathSegments("/networks/");
790   uri.AddPathSegment(request.GetNetworkId());
791   uri.AddPathSegments("/members/");
792   uri.AddPathSegment(request.GetMemberId());
793   return UpdateMemberOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER));
794 }
795 
UpdateMemberCallable(const UpdateMemberRequest & request) const796 UpdateMemberOutcomeCallable ManagedBlockchainClient::UpdateMemberCallable(const UpdateMemberRequest& request) const
797 {
798   auto task = Aws::MakeShared< std::packaged_task< UpdateMemberOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UpdateMember(request); } );
799   auto packagedFunction = [task]() { (*task)(); };
800   m_executor->Submit(packagedFunction);
801   return task->get_future();
802 }
803 
UpdateMemberAsync(const UpdateMemberRequest & request,const UpdateMemberResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const804 void ManagedBlockchainClient::UpdateMemberAsync(const UpdateMemberRequest& request, const UpdateMemberResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
805 {
806   m_executor->Submit( [this, request, handler, context](){ this->UpdateMemberAsyncHelper( request, handler, context ); } );
807 }
808 
UpdateMemberAsyncHelper(const UpdateMemberRequest & request,const UpdateMemberResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const809 void ManagedBlockchainClient::UpdateMemberAsyncHelper(const UpdateMemberRequest& request, const UpdateMemberResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
810 {
811   handler(this, request, UpdateMember(request), context);
812 }
813 
UpdateNode(const UpdateNodeRequest & request) const814 UpdateNodeOutcome ManagedBlockchainClient::UpdateNode(const UpdateNodeRequest& request) const
815 {
816   if (!request.NetworkIdHasBeenSet())
817   {
818     AWS_LOGSTREAM_ERROR("UpdateNode", "Required field: NetworkId, is not set");
819     return UpdateNodeOutcome(Aws::Client::AWSError<ManagedBlockchainErrors>(ManagedBlockchainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [NetworkId]", false));
820   }
821   if (!request.NodeIdHasBeenSet())
822   {
823     AWS_LOGSTREAM_ERROR("UpdateNode", "Required field: NodeId, is not set");
824     return UpdateNodeOutcome(Aws::Client::AWSError<ManagedBlockchainErrors>(ManagedBlockchainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [NodeId]", false));
825   }
826   Aws::Http::URI uri = m_uri;
827   uri.AddPathSegments("/networks/");
828   uri.AddPathSegment(request.GetNetworkId());
829   uri.AddPathSegments("/nodes/");
830   uri.AddPathSegment(request.GetNodeId());
831   return UpdateNodeOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER));
832 }
833 
UpdateNodeCallable(const UpdateNodeRequest & request) const834 UpdateNodeOutcomeCallable ManagedBlockchainClient::UpdateNodeCallable(const UpdateNodeRequest& request) const
835 {
836   auto task = Aws::MakeShared< std::packaged_task< UpdateNodeOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UpdateNode(request); } );
837   auto packagedFunction = [task]() { (*task)(); };
838   m_executor->Submit(packagedFunction);
839   return task->get_future();
840 }
841 
UpdateNodeAsync(const UpdateNodeRequest & request,const UpdateNodeResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const842 void ManagedBlockchainClient::UpdateNodeAsync(const UpdateNodeRequest& request, const UpdateNodeResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
843 {
844   m_executor->Submit( [this, request, handler, context](){ this->UpdateNodeAsyncHelper( request, handler, context ); } );
845 }
846 
UpdateNodeAsyncHelper(const UpdateNodeRequest & request,const UpdateNodeResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const847 void ManagedBlockchainClient::UpdateNodeAsyncHelper(const UpdateNodeRequest& request, const UpdateNodeResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
848 {
849   handler(this, request, UpdateNode(request), context);
850 }
851 
VoteOnProposal(const VoteOnProposalRequest & request) const852 VoteOnProposalOutcome ManagedBlockchainClient::VoteOnProposal(const VoteOnProposalRequest& request) const
853 {
854   if (!request.NetworkIdHasBeenSet())
855   {
856     AWS_LOGSTREAM_ERROR("VoteOnProposal", "Required field: NetworkId, is not set");
857     return VoteOnProposalOutcome(Aws::Client::AWSError<ManagedBlockchainErrors>(ManagedBlockchainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [NetworkId]", false));
858   }
859   if (!request.ProposalIdHasBeenSet())
860   {
861     AWS_LOGSTREAM_ERROR("VoteOnProposal", "Required field: ProposalId, is not set");
862     return VoteOnProposalOutcome(Aws::Client::AWSError<ManagedBlockchainErrors>(ManagedBlockchainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ProposalId]", false));
863   }
864   Aws::Http::URI uri = m_uri;
865   uri.AddPathSegments("/networks/");
866   uri.AddPathSegment(request.GetNetworkId());
867   uri.AddPathSegments("/proposals/");
868   uri.AddPathSegment(request.GetProposalId());
869   uri.AddPathSegments("/votes");
870   return VoteOnProposalOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
871 }
872 
VoteOnProposalCallable(const VoteOnProposalRequest & request) const873 VoteOnProposalOutcomeCallable ManagedBlockchainClient::VoteOnProposalCallable(const VoteOnProposalRequest& request) const
874 {
875   auto task = Aws::MakeShared< std::packaged_task< VoteOnProposalOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->VoteOnProposal(request); } );
876   auto packagedFunction = [task]() { (*task)(); };
877   m_executor->Submit(packagedFunction);
878   return task->get_future();
879 }
880 
VoteOnProposalAsync(const VoteOnProposalRequest & request,const VoteOnProposalResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const881 void ManagedBlockchainClient::VoteOnProposalAsync(const VoteOnProposalRequest& request, const VoteOnProposalResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
882 {
883   m_executor->Submit( [this, request, handler, context](){ this->VoteOnProposalAsyncHelper( request, handler, context ); } );
884 }
885 
VoteOnProposalAsyncHelper(const VoteOnProposalRequest & request,const VoteOnProposalResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const886 void ManagedBlockchainClient::VoteOnProposalAsyncHelper(const VoteOnProposalRequest& request, const VoteOnProposalResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
887 {
888   handler(this, request, VoteOnProposal(request), context);
889 }
890 
891