diff --git a/CHANGELOG b/CHANGELOG index 253687dca..40b610a7b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,9 @@ +2020-04-24 Version: 1.36.376 +- Publish apis for ledger instances. +- Publish apis for members. +- Publish apis for time anchors. +- Publish apis for endpoints. + 2020-04-23 Version: 1.36.375 - GetUser API return user execute query count information. diff --git a/VERSION b/VERSION index 340a3240c..15f6feb3e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.375 \ No newline at end of file +1.36.376 \ No newline at end of file diff --git a/ledgerdb/CMakeLists.txt b/ledgerdb/CMakeLists.txt new file mode 100644 index 000000000..44c770c58 --- /dev/null +++ b/ledgerdb/CMakeLists.txt @@ -0,0 +1,162 @@ +# +# Copyright 2009-2017 Alibaba Cloud All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +set(public_header_dir ${CMAKE_CURRENT_SOURCE_DIR}/../include) + +set(ledgerdb_public_header + include/alibabacloud/ledgerdb/LedgerdbClient.h + include/alibabacloud/ledgerdb/LedgerdbExport.h ) + +set(ledgerdb_public_header_model + include/alibabacloud/ledgerdb/model/AcceptMemberRequest.h + include/alibabacloud/ledgerdb/model/AcceptMemberResult.h + include/alibabacloud/ledgerdb/model/CreateVpcEndpointRequest.h + include/alibabacloud/ledgerdb/model/CreateVpcEndpointResult.h + include/alibabacloud/ledgerdb/model/DeleteLedgerRequest.h + include/alibabacloud/ledgerdb/model/DeleteLedgerResult.h + include/alibabacloud/ledgerdb/model/DeleteMemberRequest.h + include/alibabacloud/ledgerdb/model/DeleteMemberResult.h + include/alibabacloud/ledgerdb/model/DeleteVpcEndpointRequest.h + include/alibabacloud/ledgerdb/model/DeleteVpcEndpointResult.h + include/alibabacloud/ledgerdb/model/DescribeLedgerRequest.h + include/alibabacloud/ledgerdb/model/DescribeLedgerResult.h + include/alibabacloud/ledgerdb/model/DescribeLedgersRequest.h + include/alibabacloud/ledgerdb/model/DescribeLedgersResult.h + include/alibabacloud/ledgerdb/model/DescribeRegionsRequest.h + include/alibabacloud/ledgerdb/model/DescribeRegionsResult.h + include/alibabacloud/ledgerdb/model/DisableMemberRequest.h + include/alibabacloud/ledgerdb/model/DisableMemberResult.h + include/alibabacloud/ledgerdb/model/EnableMemberRequest.h + include/alibabacloud/ledgerdb/model/EnableMemberResult.h + include/alibabacloud/ledgerdb/model/GetJournalRequest.h + include/alibabacloud/ledgerdb/model/GetJournalResult.h + include/alibabacloud/ledgerdb/model/GetMemberRequest.h + include/alibabacloud/ledgerdb/model/GetMemberResult.h + include/alibabacloud/ledgerdb/model/InviteMembersRequest.h + include/alibabacloud/ledgerdb/model/InviteMembersResult.h + include/alibabacloud/ledgerdb/model/ListJournalsRequest.h + include/alibabacloud/ledgerdb/model/ListJournalsResult.h + include/alibabacloud/ledgerdb/model/ListMembersRequest.h + include/alibabacloud/ledgerdb/model/ListMembersResult.h + include/alibabacloud/ledgerdb/model/ListTimeAnchorsRequest.h + include/alibabacloud/ledgerdb/model/ListTimeAnchorsResult.h + include/alibabacloud/ledgerdb/model/ListVpcEndpointsRequest.h + include/alibabacloud/ledgerdb/model/ListVpcEndpointsResult.h + include/alibabacloud/ledgerdb/model/ModifyLedgerAttributeRequest.h + include/alibabacloud/ledgerdb/model/ModifyLedgerAttributeResult.h + include/alibabacloud/ledgerdb/model/ModifyMemberACLsRequest.h + include/alibabacloud/ledgerdb/model/ModifyMemberACLsResult.h + include/alibabacloud/ledgerdb/model/ModifyMemberKeyRequest.h + include/alibabacloud/ledgerdb/model/ModifyMemberKeyResult.h ) + +set(ledgerdb_src + src/LedgerdbClient.cc + src/model/AcceptMemberRequest.cc + src/model/AcceptMemberResult.cc + src/model/CreateVpcEndpointRequest.cc + src/model/CreateVpcEndpointResult.cc + src/model/DeleteLedgerRequest.cc + src/model/DeleteLedgerResult.cc + src/model/DeleteMemberRequest.cc + src/model/DeleteMemberResult.cc + src/model/DeleteVpcEndpointRequest.cc + src/model/DeleteVpcEndpointResult.cc + src/model/DescribeLedgerRequest.cc + src/model/DescribeLedgerResult.cc + src/model/DescribeLedgersRequest.cc + src/model/DescribeLedgersResult.cc + src/model/DescribeRegionsRequest.cc + src/model/DescribeRegionsResult.cc + src/model/DisableMemberRequest.cc + src/model/DisableMemberResult.cc + src/model/EnableMemberRequest.cc + src/model/EnableMemberResult.cc + src/model/GetJournalRequest.cc + src/model/GetJournalResult.cc + src/model/GetMemberRequest.cc + src/model/GetMemberResult.cc + src/model/InviteMembersRequest.cc + src/model/InviteMembersResult.cc + src/model/ListJournalsRequest.cc + src/model/ListJournalsResult.cc + src/model/ListMembersRequest.cc + src/model/ListMembersResult.cc + src/model/ListTimeAnchorsRequest.cc + src/model/ListTimeAnchorsResult.cc + src/model/ListVpcEndpointsRequest.cc + src/model/ListVpcEndpointsResult.cc + src/model/ModifyLedgerAttributeRequest.cc + src/model/ModifyLedgerAttributeResult.cc + src/model/ModifyMemberACLsRequest.cc + src/model/ModifyMemberACLsResult.cc + src/model/ModifyMemberKeyRequest.cc + src/model/ModifyMemberKeyResult.cc ) + +add_library(ledgerdb ${LIB_TYPE} + ${ledgerdb_public_header} + ${ledgerdb_public_header_model} + ${ledgerdb_src}) + +set_target_properties(ledgerdb + PROPERTIES + LINKER_LANGUAGE CXX + ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib + RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin + OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX}ledgerdb + ) + +if(${LIB_TYPE} STREQUAL "SHARED") + set_target_properties(ledgerdb + PROPERTIES + DEFINE_SYMBOL ALIBABACLOUD_LEDGERDB_LIBRARY) +endif() + +target_include_directories(ledgerdb + PRIVATE include + ${CMAKE_SOURCE_DIR}/core/include + ) +target_link_libraries(ledgerdb + core) + +if(CMAKE_HOST_WIN32) + ExternalProject_Get_Property(jsoncpp INSTALL_DIR) + set(jsoncpp_install_dir ${INSTALL_DIR}) + add_dependencies(ledgerdb + jsoncpp) + target_include_directories(ledgerdb + PRIVATE ${jsoncpp_install_dir}/include) + target_link_libraries(ledgerdb + ${jsoncpp_install_dir}/lib/jsoncpp.lib) + set_target_properties(ledgerdb + PROPERTIES + COMPILE_OPTIONS "/bigobj") +else() + target_include_directories(ledgerdb + PRIVATE /usr/include/jsoncpp) + target_link_libraries(ledgerdb + jsoncpp) +endif() + +install(FILES ${ledgerdb_public_header} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/ledgerdb) +install(FILES ${ledgerdb_public_header_model} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/ledgerdb/model) +install(TARGETS ledgerdb + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ) \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/LedgerdbClient.h b/ledgerdb/include/alibabacloud/ledgerdb/LedgerdbClient.h new file mode 100644 index 000000000..0878c33b1 --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/LedgerdbClient.h @@ -0,0 +1,206 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_LEDGERDBCLIENT_H_ +#define ALIBABACLOUD_LEDGERDB_LEDGERDBCLIENT_H_ + +#include +#include +#include +#include +#include "LedgerdbExport.h" +#include "model/AcceptMemberRequest.h" +#include "model/AcceptMemberResult.h" +#include "model/CreateVpcEndpointRequest.h" +#include "model/CreateVpcEndpointResult.h" +#include "model/DeleteLedgerRequest.h" +#include "model/DeleteLedgerResult.h" +#include "model/DeleteMemberRequest.h" +#include "model/DeleteMemberResult.h" +#include "model/DeleteVpcEndpointRequest.h" +#include "model/DeleteVpcEndpointResult.h" +#include "model/DescribeLedgerRequest.h" +#include "model/DescribeLedgerResult.h" +#include "model/DescribeLedgersRequest.h" +#include "model/DescribeLedgersResult.h" +#include "model/DescribeRegionsRequest.h" +#include "model/DescribeRegionsResult.h" +#include "model/DisableMemberRequest.h" +#include "model/DisableMemberResult.h" +#include "model/EnableMemberRequest.h" +#include "model/EnableMemberResult.h" +#include "model/GetJournalRequest.h" +#include "model/GetJournalResult.h" +#include "model/GetMemberRequest.h" +#include "model/GetMemberResult.h" +#include "model/InviteMembersRequest.h" +#include "model/InviteMembersResult.h" +#include "model/ListJournalsRequest.h" +#include "model/ListJournalsResult.h" +#include "model/ListMembersRequest.h" +#include "model/ListMembersResult.h" +#include "model/ListTimeAnchorsRequest.h" +#include "model/ListTimeAnchorsResult.h" +#include "model/ListVpcEndpointsRequest.h" +#include "model/ListVpcEndpointsResult.h" +#include "model/ModifyLedgerAttributeRequest.h" +#include "model/ModifyLedgerAttributeResult.h" +#include "model/ModifyMemberACLsRequest.h" +#include "model/ModifyMemberACLsResult.h" +#include "model/ModifyMemberKeyRequest.h" +#include "model/ModifyMemberKeyResult.h" + + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + class ALIBABACLOUD_LEDGERDB_EXPORT LedgerdbClient : public RpcServiceClient + { + public: + typedef Outcome AcceptMemberOutcome; + typedef std::future AcceptMemberOutcomeCallable; + typedef std::function&)> AcceptMemberAsyncHandler; + typedef Outcome CreateVpcEndpointOutcome; + typedef std::future CreateVpcEndpointOutcomeCallable; + typedef std::function&)> CreateVpcEndpointAsyncHandler; + typedef Outcome DeleteLedgerOutcome; + typedef std::future DeleteLedgerOutcomeCallable; + typedef std::function&)> DeleteLedgerAsyncHandler; + typedef Outcome DeleteMemberOutcome; + typedef std::future DeleteMemberOutcomeCallable; + typedef std::function&)> DeleteMemberAsyncHandler; + typedef Outcome DeleteVpcEndpointOutcome; + typedef std::future DeleteVpcEndpointOutcomeCallable; + typedef std::function&)> DeleteVpcEndpointAsyncHandler; + typedef Outcome DescribeLedgerOutcome; + typedef std::future DescribeLedgerOutcomeCallable; + typedef std::function&)> DescribeLedgerAsyncHandler; + typedef Outcome DescribeLedgersOutcome; + typedef std::future DescribeLedgersOutcomeCallable; + typedef std::function&)> DescribeLedgersAsyncHandler; + typedef Outcome DescribeRegionsOutcome; + typedef std::future DescribeRegionsOutcomeCallable; + typedef std::function&)> DescribeRegionsAsyncHandler; + typedef Outcome DisableMemberOutcome; + typedef std::future DisableMemberOutcomeCallable; + typedef std::function&)> DisableMemberAsyncHandler; + typedef Outcome EnableMemberOutcome; + typedef std::future EnableMemberOutcomeCallable; + typedef std::function&)> EnableMemberAsyncHandler; + typedef Outcome GetJournalOutcome; + typedef std::future GetJournalOutcomeCallable; + typedef std::function&)> GetJournalAsyncHandler; + typedef Outcome GetMemberOutcome; + typedef std::future GetMemberOutcomeCallable; + typedef std::function&)> GetMemberAsyncHandler; + typedef Outcome InviteMembersOutcome; + typedef std::future InviteMembersOutcomeCallable; + typedef std::function&)> InviteMembersAsyncHandler; + typedef Outcome ListJournalsOutcome; + typedef std::future ListJournalsOutcomeCallable; + typedef std::function&)> ListJournalsAsyncHandler; + typedef Outcome ListMembersOutcome; + typedef std::future ListMembersOutcomeCallable; + typedef std::function&)> ListMembersAsyncHandler; + typedef Outcome ListTimeAnchorsOutcome; + typedef std::future ListTimeAnchorsOutcomeCallable; + typedef std::function&)> ListTimeAnchorsAsyncHandler; + typedef Outcome ListVpcEndpointsOutcome; + typedef std::future ListVpcEndpointsOutcomeCallable; + typedef std::function&)> ListVpcEndpointsAsyncHandler; + typedef Outcome ModifyLedgerAttributeOutcome; + typedef std::future ModifyLedgerAttributeOutcomeCallable; + typedef std::function&)> ModifyLedgerAttributeAsyncHandler; + typedef Outcome ModifyMemberACLsOutcome; + typedef std::future ModifyMemberACLsOutcomeCallable; + typedef std::function&)> ModifyMemberACLsAsyncHandler; + typedef Outcome ModifyMemberKeyOutcome; + typedef std::future ModifyMemberKeyOutcomeCallable; + typedef std::function&)> ModifyMemberKeyAsyncHandler; + + LedgerdbClient(const Credentials &credentials, const ClientConfiguration &configuration); + LedgerdbClient(const std::shared_ptr &credentialsProvider, const ClientConfiguration &configuration); + LedgerdbClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration); + ~LedgerdbClient(); + AcceptMemberOutcome acceptMember(const Model::AcceptMemberRequest &request)const; + void acceptMemberAsync(const Model::AcceptMemberRequest& request, const AcceptMemberAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + AcceptMemberOutcomeCallable acceptMemberCallable(const Model::AcceptMemberRequest& request) const; + CreateVpcEndpointOutcome createVpcEndpoint(const Model::CreateVpcEndpointRequest &request)const; + void createVpcEndpointAsync(const Model::CreateVpcEndpointRequest& request, const CreateVpcEndpointAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CreateVpcEndpointOutcomeCallable createVpcEndpointCallable(const Model::CreateVpcEndpointRequest& request) const; + DeleteLedgerOutcome deleteLedger(const Model::DeleteLedgerRequest &request)const; + void deleteLedgerAsync(const Model::DeleteLedgerRequest& request, const DeleteLedgerAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DeleteLedgerOutcomeCallable deleteLedgerCallable(const Model::DeleteLedgerRequest& request) const; + DeleteMemberOutcome deleteMember(const Model::DeleteMemberRequest &request)const; + void deleteMemberAsync(const Model::DeleteMemberRequest& request, const DeleteMemberAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DeleteMemberOutcomeCallable deleteMemberCallable(const Model::DeleteMemberRequest& request) const; + DeleteVpcEndpointOutcome deleteVpcEndpoint(const Model::DeleteVpcEndpointRequest &request)const; + void deleteVpcEndpointAsync(const Model::DeleteVpcEndpointRequest& request, const DeleteVpcEndpointAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DeleteVpcEndpointOutcomeCallable deleteVpcEndpointCallable(const Model::DeleteVpcEndpointRequest& request) const; + DescribeLedgerOutcome describeLedger(const Model::DescribeLedgerRequest &request)const; + void describeLedgerAsync(const Model::DescribeLedgerRequest& request, const DescribeLedgerAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeLedgerOutcomeCallable describeLedgerCallable(const Model::DescribeLedgerRequest& request) const; + DescribeLedgersOutcome describeLedgers(const Model::DescribeLedgersRequest &request)const; + void describeLedgersAsync(const Model::DescribeLedgersRequest& request, const DescribeLedgersAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeLedgersOutcomeCallable describeLedgersCallable(const Model::DescribeLedgersRequest& request) const; + DescribeRegionsOutcome describeRegions(const Model::DescribeRegionsRequest &request)const; + void describeRegionsAsync(const Model::DescribeRegionsRequest& request, const DescribeRegionsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeRegionsOutcomeCallable describeRegionsCallable(const Model::DescribeRegionsRequest& request) const; + DisableMemberOutcome disableMember(const Model::DisableMemberRequest &request)const; + void disableMemberAsync(const Model::DisableMemberRequest& request, const DisableMemberAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DisableMemberOutcomeCallable disableMemberCallable(const Model::DisableMemberRequest& request) const; + EnableMemberOutcome enableMember(const Model::EnableMemberRequest &request)const; + void enableMemberAsync(const Model::EnableMemberRequest& request, const EnableMemberAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + EnableMemberOutcomeCallable enableMemberCallable(const Model::EnableMemberRequest& request) const; + GetJournalOutcome getJournal(const Model::GetJournalRequest &request)const; + void getJournalAsync(const Model::GetJournalRequest& request, const GetJournalAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetJournalOutcomeCallable getJournalCallable(const Model::GetJournalRequest& request) const; + GetMemberOutcome getMember(const Model::GetMemberRequest &request)const; + void getMemberAsync(const Model::GetMemberRequest& request, const GetMemberAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetMemberOutcomeCallable getMemberCallable(const Model::GetMemberRequest& request) const; + InviteMembersOutcome inviteMembers(const Model::InviteMembersRequest &request)const; + void inviteMembersAsync(const Model::InviteMembersRequest& request, const InviteMembersAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + InviteMembersOutcomeCallable inviteMembersCallable(const Model::InviteMembersRequest& request) const; + ListJournalsOutcome listJournals(const Model::ListJournalsRequest &request)const; + void listJournalsAsync(const Model::ListJournalsRequest& request, const ListJournalsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListJournalsOutcomeCallable listJournalsCallable(const Model::ListJournalsRequest& request) const; + ListMembersOutcome listMembers(const Model::ListMembersRequest &request)const; + void listMembersAsync(const Model::ListMembersRequest& request, const ListMembersAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListMembersOutcomeCallable listMembersCallable(const Model::ListMembersRequest& request) const; + ListTimeAnchorsOutcome listTimeAnchors(const Model::ListTimeAnchorsRequest &request)const; + void listTimeAnchorsAsync(const Model::ListTimeAnchorsRequest& request, const ListTimeAnchorsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListTimeAnchorsOutcomeCallable listTimeAnchorsCallable(const Model::ListTimeAnchorsRequest& request) const; + ListVpcEndpointsOutcome listVpcEndpoints(const Model::ListVpcEndpointsRequest &request)const; + void listVpcEndpointsAsync(const Model::ListVpcEndpointsRequest& request, const ListVpcEndpointsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListVpcEndpointsOutcomeCallable listVpcEndpointsCallable(const Model::ListVpcEndpointsRequest& request) const; + ModifyLedgerAttributeOutcome modifyLedgerAttribute(const Model::ModifyLedgerAttributeRequest &request)const; + void modifyLedgerAttributeAsync(const Model::ModifyLedgerAttributeRequest& request, const ModifyLedgerAttributeAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ModifyLedgerAttributeOutcomeCallable modifyLedgerAttributeCallable(const Model::ModifyLedgerAttributeRequest& request) const; + ModifyMemberACLsOutcome modifyMemberACLs(const Model::ModifyMemberACLsRequest &request)const; + void modifyMemberACLsAsync(const Model::ModifyMemberACLsRequest& request, const ModifyMemberACLsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ModifyMemberACLsOutcomeCallable modifyMemberACLsCallable(const Model::ModifyMemberACLsRequest& request) const; + ModifyMemberKeyOutcome modifyMemberKey(const Model::ModifyMemberKeyRequest &request)const; + void modifyMemberKeyAsync(const Model::ModifyMemberKeyRequest& request, const ModifyMemberKeyAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ModifyMemberKeyOutcomeCallable modifyMemberKeyCallable(const Model::ModifyMemberKeyRequest& request) const; + + private: + std::shared_ptr endpointProvider_; + }; + } +} + +#endif // !ALIBABACLOUD_LEDGERDB_LEDGERDBCLIENT_H_ diff --git a/ledgerdb/include/alibabacloud/ledgerdb/LedgerdbExport.h b/ledgerdb/include/alibabacloud/ledgerdb/LedgerdbExport.h new file mode 100644 index 000000000..268937dc5 --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/LedgerdbExport.h @@ -0,0 +1,32 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_LEDGERDBEXPORT_H_ +#define ALIBABACLOUD_LEDGERDB_LEDGERDBEXPORT_H_ + +#include + +#if defined(ALIBABACLOUD_SHARED) +# if defined(ALIBABACLOUD_LEDGERDB_LIBRARY) +# define ALIBABACLOUD_LEDGERDB_EXPORT ALIBABACLOUD_DECL_EXPORT +# else +# define ALIBABACLOUD_LEDGERDB_EXPORT ALIBABACLOUD_DECL_IMPORT +# endif +#else +# define ALIBABACLOUD_LEDGERDB_EXPORT +#endif + +#endif // !ALIBABACLOUD_LEDGERDB_LEDGERDBEXPORT_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/AcceptMemberRequest.h b/ledgerdb/include/alibabacloud/ledgerdb/model/AcceptMemberRequest.h new file mode 100644 index 000000000..b9ce9df80 --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/AcceptMemberRequest.h @@ -0,0 +1,54 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_ACCEPTMEMBERREQUEST_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_ACCEPTMEMBERREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT AcceptMemberRequest : public RpcServiceRequest + { + + public: + AcceptMemberRequest(); + ~AcceptMemberRequest(); + + std::string getPublicKey()const; + void setPublicKey(const std::string& publicKey); + std::string getKeyType()const; + void setKeyType(const std::string& keyType); + std::string getLedgerId()const; + void setLedgerId(const std::string& ledgerId); + + private: + std::string publicKey_; + std::string keyType_; + std::string ledgerId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_ACCEPTMEMBERREQUEST_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/AcceptMemberResult.h b/ledgerdb/include/alibabacloud/ledgerdb/model/AcceptMemberResult.h new file mode 100644 index 000000000..816826047 --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/AcceptMemberResult.h @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_ACCEPTMEMBERRESULT_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_ACCEPTMEMBERRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT AcceptMemberResult : public ServiceResult + { + public: + + + AcceptMemberResult(); + explicit AcceptMemberResult(const std::string &payload); + ~AcceptMemberResult(); + std::string getMemberId()const; + + protected: + void parse(const std::string &payload); + private: + std::string memberId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_ACCEPTMEMBERRESULT_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/CreateVpcEndpointRequest.h b/ledgerdb/include/alibabacloud/ledgerdb/model/CreateVpcEndpointRequest.h new file mode 100644 index 000000000..8a9997c05 --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/CreateVpcEndpointRequest.h @@ -0,0 +1,57 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_CREATEVPCENDPOINTREQUEST_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_CREATEVPCENDPOINTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT CreateVpcEndpointRequest : public RpcServiceRequest + { + + public: + CreateVpcEndpointRequest(); + ~CreateVpcEndpointRequest(); + + std::string getClientToken()const; + void setClientToken(const std::string& clientToken); + std::string getLedgerId()const; + void setLedgerId(const std::string& ledgerId); + std::string getVSwitchId()const; + void setVSwitchId(const std::string& vSwitchId); + std::string getVpcId()const; + void setVpcId(const std::string& vpcId); + + private: + std::string clientToken_; + std::string ledgerId_; + std::string vSwitchId_; + std::string vpcId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_CREATEVPCENDPOINTREQUEST_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/CreateVpcEndpointResult.h b/ledgerdb/include/alibabacloud/ledgerdb/model/CreateVpcEndpointResult.h new file mode 100644 index 000000000..87179b3d8 --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/CreateVpcEndpointResult.h @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_CREATEVPCENDPOINTRESULT_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_CREATEVPCENDPOINTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT CreateVpcEndpointResult : public ServiceResult + { + public: + + + CreateVpcEndpointResult(); + explicit CreateVpcEndpointResult(const std::string &payload); + ~CreateVpcEndpointResult(); + std::string getVpcEndpointId()const; + + protected: + void parse(const std::string &payload); + private: + std::string vpcEndpointId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_CREATEVPCENDPOINTRESULT_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/DeleteLedgerRequest.h b/ledgerdb/include/alibabacloud/ledgerdb/model/DeleteLedgerRequest.h new file mode 100644 index 000000000..6221a08a7 --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/DeleteLedgerRequest.h @@ -0,0 +1,48 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_DELETELEDGERREQUEST_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_DELETELEDGERREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT DeleteLedgerRequest : public RpcServiceRequest + { + + public: + DeleteLedgerRequest(); + ~DeleteLedgerRequest(); + + std::string getLedgerId()const; + void setLedgerId(const std::string& ledgerId); + + private: + std::string ledgerId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_DELETELEDGERREQUEST_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/DeleteLedgerResult.h b/ledgerdb/include/alibabacloud/ledgerdb/model/DeleteLedgerResult.h new file mode 100644 index 000000000..d22d8a32e --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/DeleteLedgerResult.h @@ -0,0 +1,49 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_DELETELEDGERRESULT_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_DELETELEDGERRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT DeleteLedgerResult : public ServiceResult + { + public: + + + DeleteLedgerResult(); + explicit DeleteLedgerResult(const std::string &payload); + ~DeleteLedgerResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_DELETELEDGERRESULT_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/DeleteMemberRequest.h b/ledgerdb/include/alibabacloud/ledgerdb/model/DeleteMemberRequest.h new file mode 100644 index 000000000..d08855696 --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/DeleteMemberRequest.h @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_DELETEMEMBERREQUEST_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_DELETEMEMBERREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT DeleteMemberRequest : public RpcServiceRequest + { + + public: + DeleteMemberRequest(); + ~DeleteMemberRequest(); + + std::string getLedgerId()const; + void setLedgerId(const std::string& ledgerId); + std::string getMemberId()const; + void setMemberId(const std::string& memberId); + + private: + std::string ledgerId_; + std::string memberId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_DELETEMEMBERREQUEST_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/DeleteMemberResult.h b/ledgerdb/include/alibabacloud/ledgerdb/model/DeleteMemberResult.h new file mode 100644 index 000000000..23ff69d8f --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/DeleteMemberResult.h @@ -0,0 +1,49 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_DELETEMEMBERRESULT_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_DELETEMEMBERRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT DeleteMemberResult : public ServiceResult + { + public: + + + DeleteMemberResult(); + explicit DeleteMemberResult(const std::string &payload); + ~DeleteMemberResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_DELETEMEMBERRESULT_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/DeleteVpcEndpointRequest.h b/ledgerdb/include/alibabacloud/ledgerdb/model/DeleteVpcEndpointRequest.h new file mode 100644 index 000000000..62e7f019c --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/DeleteVpcEndpointRequest.h @@ -0,0 +1,57 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_DELETEVPCENDPOINTREQUEST_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_DELETEVPCENDPOINTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT DeleteVpcEndpointRequest : public RpcServiceRequest + { + + public: + DeleteVpcEndpointRequest(); + ~DeleteVpcEndpointRequest(); + + std::string getLedgerId()const; + void setLedgerId(const std::string& ledgerId); + std::string getVSwitchId()const; + void setVSwitchId(const std::string& vSwitchId); + std::string getVpcId()const; + void setVpcId(const std::string& vpcId); + std::string getVpcEndpointId()const; + void setVpcEndpointId(const std::string& vpcEndpointId); + + private: + std::string ledgerId_; + std::string vSwitchId_; + std::string vpcId_; + std::string vpcEndpointId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_DELETEVPCENDPOINTREQUEST_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/DeleteVpcEndpointResult.h b/ledgerdb/include/alibabacloud/ledgerdb/model/DeleteVpcEndpointResult.h new file mode 100644 index 000000000..b9ee7c79a --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/DeleteVpcEndpointResult.h @@ -0,0 +1,49 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_DELETEVPCENDPOINTRESULT_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_DELETEVPCENDPOINTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT DeleteVpcEndpointResult : public ServiceResult + { + public: + + + DeleteVpcEndpointResult(); + explicit DeleteVpcEndpointResult(const std::string &payload); + ~DeleteVpcEndpointResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_DELETEVPCENDPOINTRESULT_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/DescribeLedgerRequest.h b/ledgerdb/include/alibabacloud/ledgerdb/model/DescribeLedgerRequest.h new file mode 100644 index 000000000..6321afc39 --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/DescribeLedgerRequest.h @@ -0,0 +1,48 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_DESCRIBELEDGERREQUEST_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_DESCRIBELEDGERREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT DescribeLedgerRequest : public RpcServiceRequest + { + + public: + DescribeLedgerRequest(); + ~DescribeLedgerRequest(); + + std::string getLedgerId()const; + void setLedgerId(const std::string& ledgerId); + + private: + std::string ledgerId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_DESCRIBELEDGERREQUEST_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/DescribeLedgerResult.h b/ledgerdb/include/alibabacloud/ledgerdb/model/DescribeLedgerResult.h new file mode 100644 index 000000000..f6ce7f262 --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/DescribeLedgerResult.h @@ -0,0 +1,77 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_DESCRIBELEDGERRESULT_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_DESCRIBELEDGERRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT DescribeLedgerResult : public ServiceResult + { + public: + struct Ledger + { + struct LastTimeAnchor + { + std::string ledgerDigest; + std::string journalId; + std::string ledgerDigestType; + std::string proof; + std::string ledgerVersion; + std::string timeStamp; + }; + long journalCount; + std::string zoneId; + long timeAnchorCount; + std::string createTime; + long memberCount; + std::string ledgerId; + LastTimeAnchor lastTimeAnchor; + std::string ledgerDescription; + std::string ownerAliUid; + std::string ledgerType; + std::string updateTime; + std::string regionId; + std::string ledgerStatus; + std::string ledgerName; + }; + + + DescribeLedgerResult(); + explicit DescribeLedgerResult(const std::string &payload); + ~DescribeLedgerResult(); + Ledger getLedger()const; + + protected: + void parse(const std::string &payload); + private: + Ledger ledger_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_DESCRIBELEDGERRESULT_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/DescribeLedgersRequest.h b/ledgerdb/include/alibabacloud/ledgerdb/model/DescribeLedgersRequest.h new file mode 100644 index 000000000..cd1ff0e7e --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/DescribeLedgersRequest.h @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_DESCRIBELEDGERSREQUEST_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_DESCRIBELEDGERSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT DescribeLedgersRequest : public RpcServiceRequest + { + + public: + DescribeLedgersRequest(); + ~DescribeLedgersRequest(); + + std::string getNextToken()const; + void setNextToken(const std::string& nextToken); + int getMaxResults()const; + void setMaxResults(int maxResults); + + private: + std::string nextToken_; + int maxResults_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_DESCRIBELEDGERSREQUEST_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/DescribeLedgersResult.h b/ledgerdb/include/alibabacloud/ledgerdb/model/DescribeLedgersResult.h new file mode 100644 index 000000000..79a033085 --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/DescribeLedgersResult.h @@ -0,0 +1,81 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_DESCRIBELEDGERSRESULT_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_DESCRIBELEDGERSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT DescribeLedgersResult : public ServiceResult + { + public: + struct Ledger + { + struct LastTimeAnchor + { + std::string ledgerDigest; + std::string journalId; + std::string ledgerDigestType; + std::string proof; + std::string ledgerVersion; + std::string timeStamp; + }; + long journalCount; + std::string zoneId; + long timeAnchorCount; + std::string createTime; + long memberCount; + std::string ledgerId; + LastTimeAnchor lastTimeAnchor; + std::string ledgerDescription; + std::string ownerAliUid; + std::string ledgerType; + std::string updateTime; + std::string regionId; + std::string ledgerStatus; + std::string ledgerName; + }; + + + DescribeLedgersResult(); + explicit DescribeLedgersResult(const std::string &payload); + ~DescribeLedgersResult(); + std::string getNextToken()const; + int getMaxResults()const; + std::vector getLedgers()const; + + protected: + void parse(const std::string &payload); + private: + std::string nextToken_; + int maxResults_; + std::vector ledgers_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_DESCRIBELEDGERSRESULT_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/DescribeRegionsRequest.h b/ledgerdb/include/alibabacloud/ledgerdb/model/DescribeRegionsRequest.h new file mode 100644 index 000000000..e194be3e8 --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/DescribeRegionsRequest.h @@ -0,0 +1,48 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_DESCRIBEREGIONSREQUEST_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_DESCRIBEREGIONSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT DescribeRegionsRequest : public RpcServiceRequest + { + + public: + DescribeRegionsRequest(); + ~DescribeRegionsRequest(); + + std::string getRegionId()const; + void setRegionId(const std::string& regionId); + + private: + std::string regionId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_DESCRIBEREGIONSREQUEST_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/DescribeRegionsResult.h b/ledgerdb/include/alibabacloud/ledgerdb/model/DescribeRegionsResult.h new file mode 100644 index 000000000..2e8a55cdc --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/DescribeRegionsResult.h @@ -0,0 +1,61 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_DESCRIBEREGIONSRESULT_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_DESCRIBEREGIONSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT DescribeRegionsResult : public ServiceResult + { + public: + struct Result + { + std::string regionId; + std::string regionEndpoint; + std::string localName; + }; + + + DescribeRegionsResult(); + explicit DescribeRegionsResult(const std::string &payload); + ~DescribeRegionsResult(); + std::vector getRegions()const; + int getErrorCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::vector regions_; + int errorCode_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_DESCRIBEREGIONSRESULT_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/DisableMemberRequest.h b/ledgerdb/include/alibabacloud/ledgerdb/model/DisableMemberRequest.h new file mode 100644 index 000000000..eb41e0b11 --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/DisableMemberRequest.h @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_DISABLEMEMBERREQUEST_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_DISABLEMEMBERREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT DisableMemberRequest : public RpcServiceRequest + { + + public: + DisableMemberRequest(); + ~DisableMemberRequest(); + + std::string getLedgerId()const; + void setLedgerId(const std::string& ledgerId); + std::string getMemberId()const; + void setMemberId(const std::string& memberId); + + private: + std::string ledgerId_; + std::string memberId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_DISABLEMEMBERREQUEST_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/DisableMemberResult.h b/ledgerdb/include/alibabacloud/ledgerdb/model/DisableMemberResult.h new file mode 100644 index 000000000..3c654d027 --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/DisableMemberResult.h @@ -0,0 +1,49 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_DISABLEMEMBERRESULT_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_DISABLEMEMBERRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT DisableMemberResult : public ServiceResult + { + public: + + + DisableMemberResult(); + explicit DisableMemberResult(const std::string &payload); + ~DisableMemberResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_DISABLEMEMBERRESULT_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/EnableMemberRequest.h b/ledgerdb/include/alibabacloud/ledgerdb/model/EnableMemberRequest.h new file mode 100644 index 000000000..d8c3f6c5b --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/EnableMemberRequest.h @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_ENABLEMEMBERREQUEST_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_ENABLEMEMBERREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT EnableMemberRequest : public RpcServiceRequest + { + + public: + EnableMemberRequest(); + ~EnableMemberRequest(); + + std::string getLedgerId()const; + void setLedgerId(const std::string& ledgerId); + std::string getMemberId()const; + void setMemberId(const std::string& memberId); + + private: + std::string ledgerId_; + std::string memberId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_ENABLEMEMBERREQUEST_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/EnableMemberResult.h b/ledgerdb/include/alibabacloud/ledgerdb/model/EnableMemberResult.h new file mode 100644 index 000000000..183dddb34 --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/EnableMemberResult.h @@ -0,0 +1,49 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_ENABLEMEMBERRESULT_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_ENABLEMEMBERRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT EnableMemberResult : public ServiceResult + { + public: + + + EnableMemberResult(); + explicit EnableMemberResult(const std::string &payload); + ~EnableMemberResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_ENABLEMEMBERRESULT_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/GetJournalRequest.h b/ledgerdb/include/alibabacloud/ledgerdb/model/GetJournalRequest.h new file mode 100644 index 000000000..6a098225d --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/GetJournalRequest.h @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_GETJOURNALREQUEST_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_GETJOURNALREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT GetJournalRequest : public RpcServiceRequest + { + + public: + GetJournalRequest(); + ~GetJournalRequest(); + + long getJournalId()const; + void setJournalId(long journalId); + std::string getLedgerId()const; + void setLedgerId(const std::string& ledgerId); + + private: + long journalId_; + std::string ledgerId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_GETJOURNALREQUEST_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/GetJournalResult.h b/ledgerdb/include/alibabacloud/ledgerdb/model/GetJournalResult.h new file mode 100644 index 000000000..bdebd810a --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/GetJournalResult.h @@ -0,0 +1,63 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_GETJOURNALRESULT_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_GETJOURNALRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT GetJournalResult : public ServiceResult + { + public: + struct Journal + { + std::string memberId; + std::string journalId; + std::string clientId; + std::vector clues; + std::string ledgerId; + std::string journalHash; + long timestamp; + std::string payloadType; + std::string payloadJsonString; + }; + + + GetJournalResult(); + explicit GetJournalResult(const std::string &payload); + ~GetJournalResult(); + Journal getJournal()const; + + protected: + void parse(const std::string &payload); + private: + Journal journal_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_GETJOURNALRESULT_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/GetMemberRequest.h b/ledgerdb/include/alibabacloud/ledgerdb/model/GetMemberRequest.h new file mode 100644 index 000000000..7998f2e41 --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/GetMemberRequest.h @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_GETMEMBERREQUEST_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_GETMEMBERREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT GetMemberRequest : public RpcServiceRequest + { + + public: + GetMemberRequest(); + ~GetMemberRequest(); + + std::string getLedgerId()const; + void setLedgerId(const std::string& ledgerId); + std::string getMemberId()const; + void setMemberId(const std::string& memberId); + + private: + std::string ledgerId_; + std::string memberId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_GETMEMBERREQUEST_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/GetMemberResult.h b/ledgerdb/include/alibabacloud/ledgerdb/model/GetMemberResult.h new file mode 100644 index 000000000..c61736637 --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/GetMemberResult.h @@ -0,0 +1,67 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_GETMEMBERRESULT_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_GETMEMBERRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT GetMemberResult : public ServiceResult + { + public: + + + GetMemberResult(); + explicit GetMemberResult(const std::string &payload); + ~GetMemberResult(); + std::string getRole()const; + std::string getMemberId()const; + std::string getKeyType()const; + std::string getPublicKey()const; + std::string getState()const; + long getCreateTime()const; + long getUpdateTime()const; + std::string getLedgerId()const; + std::string getAliUid()const; + + protected: + void parse(const std::string &payload); + private: + std::string role_; + std::string memberId_; + std::string keyType_; + std::string publicKey_; + std::string state_; + long createTime_; + long updateTime_; + std::string ledgerId_; + std::string aliUid_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_GETMEMBERRESULT_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/InviteMembersRequest.h b/ledgerdb/include/alibabacloud/ledgerdb/model/InviteMembersRequest.h new file mode 100644 index 000000000..c524f8365 --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/InviteMembersRequest.h @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_INVITEMEMBERSREQUEST_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_INVITEMEMBERSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT InviteMembersRequest : public RpcServiceRequest + { + + public: + InviteMembersRequest(); + ~InviteMembersRequest(); + + std::string getAliUids()const; + void setAliUids(const std::string& aliUids); + std::string getLedgerId()const; + void setLedgerId(const std::string& ledgerId); + + private: + std::string aliUids_; + std::string ledgerId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_INVITEMEMBERSREQUEST_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/InviteMembersResult.h b/ledgerdb/include/alibabacloud/ledgerdb/model/InviteMembersResult.h new file mode 100644 index 000000000..34667d7a5 --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/InviteMembersResult.h @@ -0,0 +1,49 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_INVITEMEMBERSRESULT_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_INVITEMEMBERSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT InviteMembersResult : public ServiceResult + { + public: + + + InviteMembersResult(); + explicit InviteMembersResult(const std::string &payload); + ~InviteMembersResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_INVITEMEMBERSRESULT_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/ListJournalsRequest.h b/ledgerdb/include/alibabacloud/ledgerdb/model/ListJournalsRequest.h new file mode 100644 index 000000000..82d5f8986 --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/ListJournalsRequest.h @@ -0,0 +1,60 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_LISTJOURNALSREQUEST_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_LISTJOURNALSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT ListJournalsRequest : public RpcServiceRequest + { + + public: + ListJournalsRequest(); + ~ListJournalsRequest(); + + std::string getLedgerId()const; + void setLedgerId(const std::string& ledgerId); + std::string getNextToken()const; + void setNextToken(const std::string& nextToken); + std::string getClue()const; + void setClue(const std::string& clue); + int getMaxResults()const; + void setMaxResults(int maxResults); + std::string getMemberId()const; + void setMemberId(const std::string& memberId); + + private: + std::string ledgerId_; + std::string nextToken_; + std::string clue_; + int maxResults_; + std::string memberId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_LISTJOURNALSREQUEST_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/ListJournalsResult.h b/ledgerdb/include/alibabacloud/ledgerdb/model/ListJournalsResult.h new file mode 100644 index 000000000..586b72692 --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/ListJournalsResult.h @@ -0,0 +1,67 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_LISTJOURNALSRESULT_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_LISTJOURNALSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT ListJournalsResult : public ServiceResult + { + public: + struct Journal + { + std::string memberId; + std::string journalId; + std::string clientId; + std::vector clues; + std::string ledgerId; + std::string journalHash; + long timestamp; + std::string payloadType; + std::string payloadJsonString; + }; + + + ListJournalsResult(); + explicit ListJournalsResult(const std::string &payload); + ~ListJournalsResult(); + std::string getNextToken()const; + std::vector getJournals()const; + int getMaxResults()const; + + protected: + void parse(const std::string &payload); + private: + std::string nextToken_; + std::vector journals_; + int maxResults_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_LISTJOURNALSRESULT_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/ListMembersRequest.h b/ledgerdb/include/alibabacloud/ledgerdb/model/ListMembersRequest.h new file mode 100644 index 000000000..f42a86d10 --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/ListMembersRequest.h @@ -0,0 +1,54 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_LISTMEMBERSREQUEST_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_LISTMEMBERSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT ListMembersRequest : public RpcServiceRequest + { + + public: + ListMembersRequest(); + ~ListMembersRequest(); + + std::string getLedgerId()const; + void setLedgerId(const std::string& ledgerId); + std::string getNextToken()const; + void setNextToken(const std::string& nextToken); + int getMaxResults()const; + void setMaxResults(int maxResults); + + private: + std::string ledgerId_; + std::string nextToken_; + int maxResults_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_LISTMEMBERSREQUEST_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/ListMembersResult.h b/ledgerdb/include/alibabacloud/ledgerdb/model/ListMembersResult.h new file mode 100644 index 000000000..3399e7204 --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/ListMembersResult.h @@ -0,0 +1,67 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_LISTMEMBERSRESULT_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_LISTMEMBERSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT ListMembersResult : public ServiceResult + { + public: + struct Member + { + std::string role; + std::string memberId; + std::string keyType; + std::string publicKey; + std::string state; + long createTime; + long updateTime; + std::string ledgerId; + std::string aliUid; + }; + + + ListMembersResult(); + explicit ListMembersResult(const std::string &payload); + ~ListMembersResult(); + std::string getNextToken()const; + int getMaxResults()const; + std::vector getMembers()const; + + protected: + void parse(const std::string &payload); + private: + std::string nextToken_; + int maxResults_; + std::vector members_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_LISTMEMBERSRESULT_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/ListTimeAnchorsRequest.h b/ledgerdb/include/alibabacloud/ledgerdb/model/ListTimeAnchorsRequest.h new file mode 100644 index 000000000..09f83b033 --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/ListTimeAnchorsRequest.h @@ -0,0 +1,57 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_LISTTIMEANCHORSREQUEST_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_LISTTIMEANCHORSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT ListTimeAnchorsRequest : public RpcServiceRequest + { + + public: + ListTimeAnchorsRequest(); + ~ListTimeAnchorsRequest(); + + bool getReverse()const; + void setReverse(bool reverse); + std::string getLedgerId()const; + void setLedgerId(const std::string& ledgerId); + std::string getNextToken()const; + void setNextToken(const std::string& nextToken); + int getMaxResults()const; + void setMaxResults(int maxResults); + + private: + bool reverse_; + std::string ledgerId_; + std::string nextToken_; + int maxResults_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_LISTTIMEANCHORSREQUEST_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/ListTimeAnchorsResult.h b/ledgerdb/include/alibabacloud/ledgerdb/model/ListTimeAnchorsResult.h new file mode 100644 index 000000000..f4f03aafb --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/ListTimeAnchorsResult.h @@ -0,0 +1,64 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_LISTTIMEANCHORSRESULT_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_LISTTIMEANCHORSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT ListTimeAnchorsResult : public ServiceResult + { + public: + struct TimeAnchor + { + std::string ledgerDigest; + long journalId; + std::string ledgerDigestType; + std::string proof; + long ledgerVersion; + long timeStamp; + }; + + + ListTimeAnchorsResult(); + explicit ListTimeAnchorsResult(const std::string &payload); + ~ListTimeAnchorsResult(); + std::vector getTimeAnchors()const; + std::string getNextToken()const; + int getMaxResults()const; + + protected: + void parse(const std::string &payload); + private: + std::vector timeAnchors_; + std::string nextToken_; + int maxResults_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_LISTTIMEANCHORSRESULT_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/ListVpcEndpointsRequest.h b/ledgerdb/include/alibabacloud/ledgerdb/model/ListVpcEndpointsRequest.h new file mode 100644 index 000000000..f0ba5c5da --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/ListVpcEndpointsRequest.h @@ -0,0 +1,54 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_LISTVPCENDPOINTSREQUEST_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_LISTVPCENDPOINTSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT ListVpcEndpointsRequest : public RpcServiceRequest + { + + public: + ListVpcEndpointsRequest(); + ~ListVpcEndpointsRequest(); + + std::string getLedgerId()const; + void setLedgerId(const std::string& ledgerId); + std::string getNextToken()const; + void setNextToken(const std::string& nextToken); + int getMaxResults()const; + void setMaxResults(int maxResults); + + private: + std::string ledgerId_; + std::string nextToken_; + int maxResults_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_LISTVPCENDPOINTSREQUEST_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/ListVpcEndpointsResult.h b/ledgerdb/include/alibabacloud/ledgerdb/model/ListVpcEndpointsResult.h new file mode 100644 index 000000000..61bc7d709 --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/ListVpcEndpointsResult.h @@ -0,0 +1,67 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_LISTVPCENDPOINTSRESULT_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_LISTVPCENDPOINTSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT ListVpcEndpointsResult : public ServiceResult + { + public: + struct VpcEndpoint + { + std::string status; + std::string memberId; + std::string vpcId; + std::string address; + std::string vSwitchId; + long createTime; + std::string ledgerId; + std::string regionId; + std::string vpcEndpointId; + }; + + + ListVpcEndpointsResult(); + explicit ListVpcEndpointsResult(const std::string &payload); + ~ListVpcEndpointsResult(); + std::vector getVpcEndpoints()const; + std::string getNextToken()const; + int getMaxResults()const; + + protected: + void parse(const std::string &payload); + private: + std::vector vpcEndpoints_; + std::string nextToken_; + int maxResults_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_LISTVPCENDPOINTSRESULT_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/ModifyLedgerAttributeRequest.h b/ledgerdb/include/alibabacloud/ledgerdb/model/ModifyLedgerAttributeRequest.h new file mode 100644 index 000000000..0aef86d8f --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/ModifyLedgerAttributeRequest.h @@ -0,0 +1,54 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_MODIFYLEDGERATTRIBUTEREQUEST_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_MODIFYLEDGERATTRIBUTEREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT ModifyLedgerAttributeRequest : public RpcServiceRequest + { + + public: + ModifyLedgerAttributeRequest(); + ~ModifyLedgerAttributeRequest(); + + std::string getLedgerId()const; + void setLedgerId(const std::string& ledgerId); + std::string getLedgerName()const; + void setLedgerName(const std::string& ledgerName); + std::string getLedgerDescription()const; + void setLedgerDescription(const std::string& ledgerDescription); + + private: + std::string ledgerId_; + std::string ledgerName_; + std::string ledgerDescription_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_MODIFYLEDGERATTRIBUTEREQUEST_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/ModifyLedgerAttributeResult.h b/ledgerdb/include/alibabacloud/ledgerdb/model/ModifyLedgerAttributeResult.h new file mode 100644 index 000000000..87fd12513 --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/ModifyLedgerAttributeResult.h @@ -0,0 +1,49 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_MODIFYLEDGERATTRIBUTERESULT_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_MODIFYLEDGERATTRIBUTERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT ModifyLedgerAttributeResult : public ServiceResult + { + public: + + + ModifyLedgerAttributeResult(); + explicit ModifyLedgerAttributeResult(const std::string &payload); + ~ModifyLedgerAttributeResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_MODIFYLEDGERATTRIBUTERESULT_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/ModifyMemberACLsRequest.h b/ledgerdb/include/alibabacloud/ledgerdb/model/ModifyMemberACLsRequest.h new file mode 100644 index 000000000..ab394a83c --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/ModifyMemberACLsRequest.h @@ -0,0 +1,54 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_MODIFYMEMBERACLSREQUEST_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_MODIFYMEMBERACLSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT ModifyMemberACLsRequest : public RpcServiceRequest + { + + public: + ModifyMemberACLsRequest(); + ~ModifyMemberACLsRequest(); + + std::string getRole()const; + void setRole(const std::string& role); + std::string getLedgerId()const; + void setLedgerId(const std::string& ledgerId); + std::string getMemberId()const; + void setMemberId(const std::string& memberId); + + private: + std::string role_; + std::string ledgerId_; + std::string memberId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_MODIFYMEMBERACLSREQUEST_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/ModifyMemberACLsResult.h b/ledgerdb/include/alibabacloud/ledgerdb/model/ModifyMemberACLsResult.h new file mode 100644 index 000000000..01ad1b731 --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/ModifyMemberACLsResult.h @@ -0,0 +1,49 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_MODIFYMEMBERACLSRESULT_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_MODIFYMEMBERACLSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT ModifyMemberACLsResult : public ServiceResult + { + public: + + + ModifyMemberACLsResult(); + explicit ModifyMemberACLsResult(const std::string &payload); + ~ModifyMemberACLsResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_MODIFYMEMBERACLSRESULT_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/ModifyMemberKeyRequest.h b/ledgerdb/include/alibabacloud/ledgerdb/model/ModifyMemberKeyRequest.h new file mode 100644 index 000000000..781743a98 --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/ModifyMemberKeyRequest.h @@ -0,0 +1,57 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_MODIFYMEMBERKEYREQUEST_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_MODIFYMEMBERKEYREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT ModifyMemberKeyRequest : public RpcServiceRequest + { + + public: + ModifyMemberKeyRequest(); + ~ModifyMemberKeyRequest(); + + std::string getPublicKey()const; + void setPublicKey(const std::string& publicKey); + std::string getKeyType()const; + void setKeyType(const std::string& keyType); + std::string getLedgerId()const; + void setLedgerId(const std::string& ledgerId); + std::string getMemberId()const; + void setMemberId(const std::string& memberId); + + private: + std::string publicKey_; + std::string keyType_; + std::string ledgerId_; + std::string memberId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_MODIFYMEMBERKEYREQUEST_H_ \ No newline at end of file diff --git a/ledgerdb/include/alibabacloud/ledgerdb/model/ModifyMemberKeyResult.h b/ledgerdb/include/alibabacloud/ledgerdb/model/ModifyMemberKeyResult.h new file mode 100644 index 000000000..1b1905b0e --- /dev/null +++ b/ledgerdb/include/alibabacloud/ledgerdb/model/ModifyMemberKeyResult.h @@ -0,0 +1,49 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LEDGERDB_MODEL_MODIFYMEMBERKEYRESULT_H_ +#define ALIBABACLOUD_LEDGERDB_MODEL_MODIFYMEMBERKEYRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ledgerdb + { + namespace Model + { + class ALIBABACLOUD_LEDGERDB_EXPORT ModifyMemberKeyResult : public ServiceResult + { + public: + + + ModifyMemberKeyResult(); + explicit ModifyMemberKeyResult(const std::string &payload); + ~ModifyMemberKeyResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_LEDGERDB_MODEL_MODIFYMEMBERKEYRESULT_H_ \ No newline at end of file diff --git a/ledgerdb/src/LedgerdbClient.cc b/ledgerdb/src/LedgerdbClient.cc new file mode 100644 index 000000000..232d2e8b6 --- /dev/null +++ b/ledgerdb/src/LedgerdbClient.cc @@ -0,0 +1,773 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud; +using namespace AlibabaCloud::Location; +using namespace AlibabaCloud::Ledgerdb; +using namespace AlibabaCloud::Ledgerdb::Model; + +namespace +{ + const std::string SERVICE_NAME = "ledgerdb"; +} + +LedgerdbClient::LedgerdbClient(const Credentials &credentials, const ClientConfiguration &configuration) : + RpcServiceClient(SERVICE_NAME, std::make_shared(credentials), configuration) +{ + auto locationClient = std::make_shared(credentials, configuration); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "ledgerdb"); +} + +LedgerdbClient::LedgerdbClient(const std::shared_ptr& credentialsProvider, const ClientConfiguration & configuration) : + RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration) +{ + auto locationClient = std::make_shared(credentialsProvider, configuration); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "ledgerdb"); +} + +LedgerdbClient::LedgerdbClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) : + RpcServiceClient(SERVICE_NAME, std::make_shared(accessKeyId, accessKeySecret), configuration) +{ + auto locationClient = std::make_shared(accessKeyId, accessKeySecret, configuration); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "ledgerdb"); +} + +LedgerdbClient::~LedgerdbClient() +{} + +LedgerdbClient::AcceptMemberOutcome LedgerdbClient::acceptMember(const AcceptMemberRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return AcceptMemberOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return AcceptMemberOutcome(AcceptMemberResult(outcome.result())); + else + return AcceptMemberOutcome(outcome.error()); +} + +void LedgerdbClient::acceptMemberAsync(const AcceptMemberRequest& request, const AcceptMemberAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, acceptMember(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +LedgerdbClient::AcceptMemberOutcomeCallable LedgerdbClient::acceptMemberCallable(const AcceptMemberRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->acceptMember(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +LedgerdbClient::CreateVpcEndpointOutcome LedgerdbClient::createVpcEndpoint(const CreateVpcEndpointRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CreateVpcEndpointOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CreateVpcEndpointOutcome(CreateVpcEndpointResult(outcome.result())); + else + return CreateVpcEndpointOutcome(outcome.error()); +} + +void LedgerdbClient::createVpcEndpointAsync(const CreateVpcEndpointRequest& request, const CreateVpcEndpointAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, createVpcEndpoint(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +LedgerdbClient::CreateVpcEndpointOutcomeCallable LedgerdbClient::createVpcEndpointCallable(const CreateVpcEndpointRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->createVpcEndpoint(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +LedgerdbClient::DeleteLedgerOutcome LedgerdbClient::deleteLedger(const DeleteLedgerRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DeleteLedgerOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DeleteLedgerOutcome(DeleteLedgerResult(outcome.result())); + else + return DeleteLedgerOutcome(outcome.error()); +} + +void LedgerdbClient::deleteLedgerAsync(const DeleteLedgerRequest& request, const DeleteLedgerAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, deleteLedger(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +LedgerdbClient::DeleteLedgerOutcomeCallable LedgerdbClient::deleteLedgerCallable(const DeleteLedgerRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->deleteLedger(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +LedgerdbClient::DeleteMemberOutcome LedgerdbClient::deleteMember(const DeleteMemberRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DeleteMemberOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DeleteMemberOutcome(DeleteMemberResult(outcome.result())); + else + return DeleteMemberOutcome(outcome.error()); +} + +void LedgerdbClient::deleteMemberAsync(const DeleteMemberRequest& request, const DeleteMemberAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, deleteMember(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +LedgerdbClient::DeleteMemberOutcomeCallable LedgerdbClient::deleteMemberCallable(const DeleteMemberRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->deleteMember(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +LedgerdbClient::DeleteVpcEndpointOutcome LedgerdbClient::deleteVpcEndpoint(const DeleteVpcEndpointRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DeleteVpcEndpointOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DeleteVpcEndpointOutcome(DeleteVpcEndpointResult(outcome.result())); + else + return DeleteVpcEndpointOutcome(outcome.error()); +} + +void LedgerdbClient::deleteVpcEndpointAsync(const DeleteVpcEndpointRequest& request, const DeleteVpcEndpointAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, deleteVpcEndpoint(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +LedgerdbClient::DeleteVpcEndpointOutcomeCallable LedgerdbClient::deleteVpcEndpointCallable(const DeleteVpcEndpointRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->deleteVpcEndpoint(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +LedgerdbClient::DescribeLedgerOutcome LedgerdbClient::describeLedger(const DescribeLedgerRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeLedgerOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeLedgerOutcome(DescribeLedgerResult(outcome.result())); + else + return DescribeLedgerOutcome(outcome.error()); +} + +void LedgerdbClient::describeLedgerAsync(const DescribeLedgerRequest& request, const DescribeLedgerAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeLedger(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +LedgerdbClient::DescribeLedgerOutcomeCallable LedgerdbClient::describeLedgerCallable(const DescribeLedgerRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeLedger(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +LedgerdbClient::DescribeLedgersOutcome LedgerdbClient::describeLedgers(const DescribeLedgersRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeLedgersOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeLedgersOutcome(DescribeLedgersResult(outcome.result())); + else + return DescribeLedgersOutcome(outcome.error()); +} + +void LedgerdbClient::describeLedgersAsync(const DescribeLedgersRequest& request, const DescribeLedgersAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeLedgers(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +LedgerdbClient::DescribeLedgersOutcomeCallable LedgerdbClient::describeLedgersCallable(const DescribeLedgersRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeLedgers(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +LedgerdbClient::DescribeRegionsOutcome LedgerdbClient::describeRegions(const DescribeRegionsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeRegionsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeRegionsOutcome(DescribeRegionsResult(outcome.result())); + else + return DescribeRegionsOutcome(outcome.error()); +} + +void LedgerdbClient::describeRegionsAsync(const DescribeRegionsRequest& request, const DescribeRegionsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeRegions(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +LedgerdbClient::DescribeRegionsOutcomeCallable LedgerdbClient::describeRegionsCallable(const DescribeRegionsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeRegions(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +LedgerdbClient::DisableMemberOutcome LedgerdbClient::disableMember(const DisableMemberRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DisableMemberOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DisableMemberOutcome(DisableMemberResult(outcome.result())); + else + return DisableMemberOutcome(outcome.error()); +} + +void LedgerdbClient::disableMemberAsync(const DisableMemberRequest& request, const DisableMemberAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, disableMember(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +LedgerdbClient::DisableMemberOutcomeCallable LedgerdbClient::disableMemberCallable(const DisableMemberRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->disableMember(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +LedgerdbClient::EnableMemberOutcome LedgerdbClient::enableMember(const EnableMemberRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return EnableMemberOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return EnableMemberOutcome(EnableMemberResult(outcome.result())); + else + return EnableMemberOutcome(outcome.error()); +} + +void LedgerdbClient::enableMemberAsync(const EnableMemberRequest& request, const EnableMemberAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, enableMember(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +LedgerdbClient::EnableMemberOutcomeCallable LedgerdbClient::enableMemberCallable(const EnableMemberRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->enableMember(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +LedgerdbClient::GetJournalOutcome LedgerdbClient::getJournal(const GetJournalRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetJournalOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetJournalOutcome(GetJournalResult(outcome.result())); + else + return GetJournalOutcome(outcome.error()); +} + +void LedgerdbClient::getJournalAsync(const GetJournalRequest& request, const GetJournalAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getJournal(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +LedgerdbClient::GetJournalOutcomeCallable LedgerdbClient::getJournalCallable(const GetJournalRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getJournal(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +LedgerdbClient::GetMemberOutcome LedgerdbClient::getMember(const GetMemberRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetMemberOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetMemberOutcome(GetMemberResult(outcome.result())); + else + return GetMemberOutcome(outcome.error()); +} + +void LedgerdbClient::getMemberAsync(const GetMemberRequest& request, const GetMemberAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getMember(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +LedgerdbClient::GetMemberOutcomeCallable LedgerdbClient::getMemberCallable(const GetMemberRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getMember(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +LedgerdbClient::InviteMembersOutcome LedgerdbClient::inviteMembers(const InviteMembersRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return InviteMembersOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return InviteMembersOutcome(InviteMembersResult(outcome.result())); + else + return InviteMembersOutcome(outcome.error()); +} + +void LedgerdbClient::inviteMembersAsync(const InviteMembersRequest& request, const InviteMembersAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, inviteMembers(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +LedgerdbClient::InviteMembersOutcomeCallable LedgerdbClient::inviteMembersCallable(const InviteMembersRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->inviteMembers(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +LedgerdbClient::ListJournalsOutcome LedgerdbClient::listJournals(const ListJournalsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListJournalsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListJournalsOutcome(ListJournalsResult(outcome.result())); + else + return ListJournalsOutcome(outcome.error()); +} + +void LedgerdbClient::listJournalsAsync(const ListJournalsRequest& request, const ListJournalsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listJournals(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +LedgerdbClient::ListJournalsOutcomeCallable LedgerdbClient::listJournalsCallable(const ListJournalsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listJournals(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +LedgerdbClient::ListMembersOutcome LedgerdbClient::listMembers(const ListMembersRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListMembersOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListMembersOutcome(ListMembersResult(outcome.result())); + else + return ListMembersOutcome(outcome.error()); +} + +void LedgerdbClient::listMembersAsync(const ListMembersRequest& request, const ListMembersAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listMembers(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +LedgerdbClient::ListMembersOutcomeCallable LedgerdbClient::listMembersCallable(const ListMembersRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listMembers(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +LedgerdbClient::ListTimeAnchorsOutcome LedgerdbClient::listTimeAnchors(const ListTimeAnchorsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListTimeAnchorsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListTimeAnchorsOutcome(ListTimeAnchorsResult(outcome.result())); + else + return ListTimeAnchorsOutcome(outcome.error()); +} + +void LedgerdbClient::listTimeAnchorsAsync(const ListTimeAnchorsRequest& request, const ListTimeAnchorsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listTimeAnchors(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +LedgerdbClient::ListTimeAnchorsOutcomeCallable LedgerdbClient::listTimeAnchorsCallable(const ListTimeAnchorsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listTimeAnchors(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +LedgerdbClient::ListVpcEndpointsOutcome LedgerdbClient::listVpcEndpoints(const ListVpcEndpointsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListVpcEndpointsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListVpcEndpointsOutcome(ListVpcEndpointsResult(outcome.result())); + else + return ListVpcEndpointsOutcome(outcome.error()); +} + +void LedgerdbClient::listVpcEndpointsAsync(const ListVpcEndpointsRequest& request, const ListVpcEndpointsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listVpcEndpoints(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +LedgerdbClient::ListVpcEndpointsOutcomeCallable LedgerdbClient::listVpcEndpointsCallable(const ListVpcEndpointsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listVpcEndpoints(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +LedgerdbClient::ModifyLedgerAttributeOutcome LedgerdbClient::modifyLedgerAttribute(const ModifyLedgerAttributeRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ModifyLedgerAttributeOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ModifyLedgerAttributeOutcome(ModifyLedgerAttributeResult(outcome.result())); + else + return ModifyLedgerAttributeOutcome(outcome.error()); +} + +void LedgerdbClient::modifyLedgerAttributeAsync(const ModifyLedgerAttributeRequest& request, const ModifyLedgerAttributeAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, modifyLedgerAttribute(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +LedgerdbClient::ModifyLedgerAttributeOutcomeCallable LedgerdbClient::modifyLedgerAttributeCallable(const ModifyLedgerAttributeRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->modifyLedgerAttribute(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +LedgerdbClient::ModifyMemberACLsOutcome LedgerdbClient::modifyMemberACLs(const ModifyMemberACLsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ModifyMemberACLsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ModifyMemberACLsOutcome(ModifyMemberACLsResult(outcome.result())); + else + return ModifyMemberACLsOutcome(outcome.error()); +} + +void LedgerdbClient::modifyMemberACLsAsync(const ModifyMemberACLsRequest& request, const ModifyMemberACLsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, modifyMemberACLs(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +LedgerdbClient::ModifyMemberACLsOutcomeCallable LedgerdbClient::modifyMemberACLsCallable(const ModifyMemberACLsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->modifyMemberACLs(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +LedgerdbClient::ModifyMemberKeyOutcome LedgerdbClient::modifyMemberKey(const ModifyMemberKeyRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ModifyMemberKeyOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ModifyMemberKeyOutcome(ModifyMemberKeyResult(outcome.result())); + else + return ModifyMemberKeyOutcome(outcome.error()); +} + +void LedgerdbClient::modifyMemberKeyAsync(const ModifyMemberKeyRequest& request, const ModifyMemberKeyAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, modifyMemberKey(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +LedgerdbClient::ModifyMemberKeyOutcomeCallable LedgerdbClient::modifyMemberKeyCallable(const ModifyMemberKeyRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->modifyMemberKey(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + diff --git a/ledgerdb/src/model/AcceptMemberRequest.cc b/ledgerdb/src/model/AcceptMemberRequest.cc new file mode 100644 index 000000000..4048a4a87 --- /dev/null +++ b/ledgerdb/src/model/AcceptMemberRequest.cc @@ -0,0 +1,62 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Ledgerdb::Model::AcceptMemberRequest; + +AcceptMemberRequest::AcceptMemberRequest() : + RpcServiceRequest("ledgerdb", "2019-11-22", "AcceptMember") +{ + setMethod(HttpRequest::Method::Post); +} + +AcceptMemberRequest::~AcceptMemberRequest() +{} + +std::string AcceptMemberRequest::getPublicKey()const +{ + return publicKey_; +} + +void AcceptMemberRequest::setPublicKey(const std::string& publicKey) +{ + publicKey_ = publicKey; + setBodyParameter("PublicKey", publicKey); +} + +std::string AcceptMemberRequest::getKeyType()const +{ + return keyType_; +} + +void AcceptMemberRequest::setKeyType(const std::string& keyType) +{ + keyType_ = keyType; + setBodyParameter("KeyType", keyType); +} + +std::string AcceptMemberRequest::getLedgerId()const +{ + return ledgerId_; +} + +void AcceptMemberRequest::setLedgerId(const std::string& ledgerId) +{ + ledgerId_ = ledgerId; + setBodyParameter("LedgerId", ledgerId); +} + diff --git a/ledgerdb/src/model/AcceptMemberResult.cc b/ledgerdb/src/model/AcceptMemberResult.cc new file mode 100644 index 000000000..c655557f0 --- /dev/null +++ b/ledgerdb/src/model/AcceptMemberResult.cc @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Ledgerdb; +using namespace AlibabaCloud::Ledgerdb::Model; + +AcceptMemberResult::AcceptMemberResult() : + ServiceResult() +{} + +AcceptMemberResult::AcceptMemberResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +AcceptMemberResult::~AcceptMemberResult() +{} + +void AcceptMemberResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["MemberId"].isNull()) + memberId_ = value["MemberId"].asString(); + +} + +std::string AcceptMemberResult::getMemberId()const +{ + return memberId_; +} + diff --git a/ledgerdb/src/model/CreateVpcEndpointRequest.cc b/ledgerdb/src/model/CreateVpcEndpointRequest.cc new file mode 100644 index 000000000..cfe42a3b4 --- /dev/null +++ b/ledgerdb/src/model/CreateVpcEndpointRequest.cc @@ -0,0 +1,73 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Ledgerdb::Model::CreateVpcEndpointRequest; + +CreateVpcEndpointRequest::CreateVpcEndpointRequest() : + RpcServiceRequest("ledgerdb", "2019-11-22", "CreateVpcEndpoint") +{ + setMethod(HttpRequest::Method::Post); +} + +CreateVpcEndpointRequest::~CreateVpcEndpointRequest() +{} + +std::string CreateVpcEndpointRequest::getClientToken()const +{ + return clientToken_; +} + +void CreateVpcEndpointRequest::setClientToken(const std::string& clientToken) +{ + clientToken_ = clientToken; + setBodyParameter("ClientToken", clientToken); +} + +std::string CreateVpcEndpointRequest::getLedgerId()const +{ + return ledgerId_; +} + +void CreateVpcEndpointRequest::setLedgerId(const std::string& ledgerId) +{ + ledgerId_ = ledgerId; + setBodyParameter("LedgerId", ledgerId); +} + +std::string CreateVpcEndpointRequest::getVSwitchId()const +{ + return vSwitchId_; +} + +void CreateVpcEndpointRequest::setVSwitchId(const std::string& vSwitchId) +{ + vSwitchId_ = vSwitchId; + setBodyParameter("VSwitchId", vSwitchId); +} + +std::string CreateVpcEndpointRequest::getVpcId()const +{ + return vpcId_; +} + +void CreateVpcEndpointRequest::setVpcId(const std::string& vpcId) +{ + vpcId_ = vpcId; + setBodyParameter("VpcId", vpcId); +} + diff --git a/ledgerdb/src/model/CreateVpcEndpointResult.cc b/ledgerdb/src/model/CreateVpcEndpointResult.cc new file mode 100644 index 000000000..0502c78ba --- /dev/null +++ b/ledgerdb/src/model/CreateVpcEndpointResult.cc @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Ledgerdb; +using namespace AlibabaCloud::Ledgerdb::Model; + +CreateVpcEndpointResult::CreateVpcEndpointResult() : + ServiceResult() +{} + +CreateVpcEndpointResult::CreateVpcEndpointResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CreateVpcEndpointResult::~CreateVpcEndpointResult() +{} + +void CreateVpcEndpointResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["VpcEndpointId"].isNull()) + vpcEndpointId_ = value["VpcEndpointId"].asString(); + +} + +std::string CreateVpcEndpointResult::getVpcEndpointId()const +{ + return vpcEndpointId_; +} + diff --git a/ledgerdb/src/model/DeleteLedgerRequest.cc b/ledgerdb/src/model/DeleteLedgerRequest.cc new file mode 100644 index 000000000..0c8360e65 --- /dev/null +++ b/ledgerdb/src/model/DeleteLedgerRequest.cc @@ -0,0 +1,40 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Ledgerdb::Model::DeleteLedgerRequest; + +DeleteLedgerRequest::DeleteLedgerRequest() : + RpcServiceRequest("ledgerdb", "2019-11-22", "DeleteLedger") +{ + setMethod(HttpRequest::Method::Post); +} + +DeleteLedgerRequest::~DeleteLedgerRequest() +{} + +std::string DeleteLedgerRequest::getLedgerId()const +{ + return ledgerId_; +} + +void DeleteLedgerRequest::setLedgerId(const std::string& ledgerId) +{ + ledgerId_ = ledgerId; + setParameter("LedgerId", ledgerId); +} + diff --git a/ledgerdb/src/model/DeleteLedgerResult.cc b/ledgerdb/src/model/DeleteLedgerResult.cc new file mode 100644 index 000000000..7a7f0dc98 --- /dev/null +++ b/ledgerdb/src/model/DeleteLedgerResult.cc @@ -0,0 +1,44 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Ledgerdb; +using namespace AlibabaCloud::Ledgerdb::Model; + +DeleteLedgerResult::DeleteLedgerResult() : + ServiceResult() +{} + +DeleteLedgerResult::DeleteLedgerResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DeleteLedgerResult::~DeleteLedgerResult() +{} + +void DeleteLedgerResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} + diff --git a/ledgerdb/src/model/DeleteMemberRequest.cc b/ledgerdb/src/model/DeleteMemberRequest.cc new file mode 100644 index 000000000..405511dcd --- /dev/null +++ b/ledgerdb/src/model/DeleteMemberRequest.cc @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Ledgerdb::Model::DeleteMemberRequest; + +DeleteMemberRequest::DeleteMemberRequest() : + RpcServiceRequest("ledgerdb", "2019-11-22", "DeleteMember") +{ + setMethod(HttpRequest::Method::Post); +} + +DeleteMemberRequest::~DeleteMemberRequest() +{} + +std::string DeleteMemberRequest::getLedgerId()const +{ + return ledgerId_; +} + +void DeleteMemberRequest::setLedgerId(const std::string& ledgerId) +{ + ledgerId_ = ledgerId; + setParameter("LedgerId", ledgerId); +} + +std::string DeleteMemberRequest::getMemberId()const +{ + return memberId_; +} + +void DeleteMemberRequest::setMemberId(const std::string& memberId) +{ + memberId_ = memberId; + setParameter("MemberId", memberId); +} + diff --git a/ledgerdb/src/model/DeleteMemberResult.cc b/ledgerdb/src/model/DeleteMemberResult.cc new file mode 100644 index 000000000..634bbbf17 --- /dev/null +++ b/ledgerdb/src/model/DeleteMemberResult.cc @@ -0,0 +1,44 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Ledgerdb; +using namespace AlibabaCloud::Ledgerdb::Model; + +DeleteMemberResult::DeleteMemberResult() : + ServiceResult() +{} + +DeleteMemberResult::DeleteMemberResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DeleteMemberResult::~DeleteMemberResult() +{} + +void DeleteMemberResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} + diff --git a/ledgerdb/src/model/DeleteVpcEndpointRequest.cc b/ledgerdb/src/model/DeleteVpcEndpointRequest.cc new file mode 100644 index 000000000..6d5a28c3b --- /dev/null +++ b/ledgerdb/src/model/DeleteVpcEndpointRequest.cc @@ -0,0 +1,73 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Ledgerdb::Model::DeleteVpcEndpointRequest; + +DeleteVpcEndpointRequest::DeleteVpcEndpointRequest() : + RpcServiceRequest("ledgerdb", "2019-11-22", "DeleteVpcEndpoint") +{ + setMethod(HttpRequest::Method::Post); +} + +DeleteVpcEndpointRequest::~DeleteVpcEndpointRequest() +{} + +std::string DeleteVpcEndpointRequest::getLedgerId()const +{ + return ledgerId_; +} + +void DeleteVpcEndpointRequest::setLedgerId(const std::string& ledgerId) +{ + ledgerId_ = ledgerId; + setParameter("LedgerId", ledgerId); +} + +std::string DeleteVpcEndpointRequest::getVSwitchId()const +{ + return vSwitchId_; +} + +void DeleteVpcEndpointRequest::setVSwitchId(const std::string& vSwitchId) +{ + vSwitchId_ = vSwitchId; + setParameter("VSwitchId", vSwitchId); +} + +std::string DeleteVpcEndpointRequest::getVpcId()const +{ + return vpcId_; +} + +void DeleteVpcEndpointRequest::setVpcId(const std::string& vpcId) +{ + vpcId_ = vpcId; + setParameter("VpcId", vpcId); +} + +std::string DeleteVpcEndpointRequest::getVpcEndpointId()const +{ + return vpcEndpointId_; +} + +void DeleteVpcEndpointRequest::setVpcEndpointId(const std::string& vpcEndpointId) +{ + vpcEndpointId_ = vpcEndpointId; + setParameter("VpcEndpointId", vpcEndpointId); +} + diff --git a/ledgerdb/src/model/DeleteVpcEndpointResult.cc b/ledgerdb/src/model/DeleteVpcEndpointResult.cc new file mode 100644 index 000000000..9f41b3aec --- /dev/null +++ b/ledgerdb/src/model/DeleteVpcEndpointResult.cc @@ -0,0 +1,44 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Ledgerdb; +using namespace AlibabaCloud::Ledgerdb::Model; + +DeleteVpcEndpointResult::DeleteVpcEndpointResult() : + ServiceResult() +{} + +DeleteVpcEndpointResult::DeleteVpcEndpointResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DeleteVpcEndpointResult::~DeleteVpcEndpointResult() +{} + +void DeleteVpcEndpointResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} + diff --git a/ledgerdb/src/model/DescribeLedgerRequest.cc b/ledgerdb/src/model/DescribeLedgerRequest.cc new file mode 100644 index 000000000..fed4bb26f --- /dev/null +++ b/ledgerdb/src/model/DescribeLedgerRequest.cc @@ -0,0 +1,40 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Ledgerdb::Model::DescribeLedgerRequest; + +DescribeLedgerRequest::DescribeLedgerRequest() : + RpcServiceRequest("ledgerdb", "2019-11-22", "DescribeLedger") +{ + setMethod(HttpRequest::Method::Get); +} + +DescribeLedgerRequest::~DescribeLedgerRequest() +{} + +std::string DescribeLedgerRequest::getLedgerId()const +{ + return ledgerId_; +} + +void DescribeLedgerRequest::setLedgerId(const std::string& ledgerId) +{ + ledgerId_ = ledgerId; + setParameter("LedgerId", ledgerId); +} + diff --git a/ledgerdb/src/model/DescribeLedgerResult.cc b/ledgerdb/src/model/DescribeLedgerResult.cc new file mode 100644 index 000000000..b21005dcc --- /dev/null +++ b/ledgerdb/src/model/DescribeLedgerResult.cc @@ -0,0 +1,89 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Ledgerdb; +using namespace AlibabaCloud::Ledgerdb::Model; + +DescribeLedgerResult::DescribeLedgerResult() : + ServiceResult() +{} + +DescribeLedgerResult::DescribeLedgerResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeLedgerResult::~DescribeLedgerResult() +{} + +void DescribeLedgerResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto ledgerNode = value["Ledger"]; + if(!ledgerNode["LedgerId"].isNull()) + ledger_.ledgerId = ledgerNode["LedgerId"].asString(); + if(!ledgerNode["LedgerName"].isNull()) + ledger_.ledgerName = ledgerNode["LedgerName"].asString(); + if(!ledgerNode["LedgerDescription"].isNull()) + ledger_.ledgerDescription = ledgerNode["LedgerDescription"].asString(); + if(!ledgerNode["LedgerType"].isNull()) + ledger_.ledgerType = ledgerNode["LedgerType"].asString(); + if(!ledgerNode["OwnerAliUid"].isNull()) + ledger_.ownerAliUid = ledgerNode["OwnerAliUid"].asString(); + if(!ledgerNode["RegionId"].isNull()) + ledger_.regionId = ledgerNode["RegionId"].asString(); + if(!ledgerNode["ZoneId"].isNull()) + ledger_.zoneId = ledgerNode["ZoneId"].asString(); + if(!ledgerNode["CreateTime"].isNull()) + ledger_.createTime = ledgerNode["CreateTime"].asString(); + if(!ledgerNode["UpdateTime"].isNull()) + ledger_.updateTime = ledgerNode["UpdateTime"].asString(); + if(!ledgerNode["LedgerStatus"].isNull()) + ledger_.ledgerStatus = ledgerNode["LedgerStatus"].asString(); + if(!ledgerNode["JournalCount"].isNull()) + ledger_.journalCount = std::stol(ledgerNode["JournalCount"].asString()); + if(!ledgerNode["MemberCount"].isNull()) + ledger_.memberCount = std::stol(ledgerNode["MemberCount"].asString()); + if(!ledgerNode["TimeAnchorCount"].isNull()) + ledger_.timeAnchorCount = std::stol(ledgerNode["TimeAnchorCount"].asString()); + auto lastTimeAnchorNode = ledgerNode["LastTimeAnchor"]; + if(!lastTimeAnchorNode["JournalId"].isNull()) + ledger_.lastTimeAnchor.journalId = lastTimeAnchorNode["JournalId"].asString(); + if(!lastTimeAnchorNode["LedgerDigest"].isNull()) + ledger_.lastTimeAnchor.ledgerDigest = lastTimeAnchorNode["LedgerDigest"].asString(); + if(!lastTimeAnchorNode["LedgerDigestType"].isNull()) + ledger_.lastTimeAnchor.ledgerDigestType = lastTimeAnchorNode["LedgerDigestType"].asString(); + if(!lastTimeAnchorNode["LedgerVersion"].isNull()) + ledger_.lastTimeAnchor.ledgerVersion = lastTimeAnchorNode["LedgerVersion"].asString(); + if(!lastTimeAnchorNode["Proof"].isNull()) + ledger_.lastTimeAnchor.proof = lastTimeAnchorNode["Proof"].asString(); + if(!lastTimeAnchorNode["TimeStamp"].isNull()) + ledger_.lastTimeAnchor.timeStamp = lastTimeAnchorNode["TimeStamp"].asString(); + +} + +DescribeLedgerResult::Ledger DescribeLedgerResult::getLedger()const +{ + return ledger_; +} + diff --git a/ledgerdb/src/model/DescribeLedgersRequest.cc b/ledgerdb/src/model/DescribeLedgersRequest.cc new file mode 100644 index 000000000..8f76750d5 --- /dev/null +++ b/ledgerdb/src/model/DescribeLedgersRequest.cc @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Ledgerdb::Model::DescribeLedgersRequest; + +DescribeLedgersRequest::DescribeLedgersRequest() : + RpcServiceRequest("ledgerdb", "2019-11-22", "DescribeLedgers") +{ + setMethod(HttpRequest::Method::Get); +} + +DescribeLedgersRequest::~DescribeLedgersRequest() +{} + +std::string DescribeLedgersRequest::getNextToken()const +{ + return nextToken_; +} + +void DescribeLedgersRequest::setNextToken(const std::string& nextToken) +{ + nextToken_ = nextToken; + setParameter("NextToken", nextToken); +} + +int DescribeLedgersRequest::getMaxResults()const +{ + return maxResults_; +} + +void DescribeLedgersRequest::setMaxResults(int maxResults) +{ + maxResults_ = maxResults; + setParameter("MaxResults", std::to_string(maxResults)); +} + diff --git a/ledgerdb/src/model/DescribeLedgersResult.cc b/ledgerdb/src/model/DescribeLedgersResult.cc new file mode 100644 index 000000000..c6837f8a1 --- /dev/null +++ b/ledgerdb/src/model/DescribeLedgersResult.cc @@ -0,0 +1,108 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Ledgerdb; +using namespace AlibabaCloud::Ledgerdb::Model; + +DescribeLedgersResult::DescribeLedgersResult() : + ServiceResult() +{} + +DescribeLedgersResult::DescribeLedgersResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeLedgersResult::~DescribeLedgersResult() +{} + +void DescribeLedgersResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allLedgersNode = value["Ledgers"]["Ledger"]; + for (auto valueLedgersLedger : allLedgersNode) + { + Ledger ledgersObject; + if(!valueLedgersLedger["LedgerId"].isNull()) + ledgersObject.ledgerId = valueLedgersLedger["LedgerId"].asString(); + if(!valueLedgersLedger["LedgerName"].isNull()) + ledgersObject.ledgerName = valueLedgersLedger["LedgerName"].asString(); + if(!valueLedgersLedger["LedgerDescription"].isNull()) + ledgersObject.ledgerDescription = valueLedgersLedger["LedgerDescription"].asString(); + if(!valueLedgersLedger["LedgerType"].isNull()) + ledgersObject.ledgerType = valueLedgersLedger["LedgerType"].asString(); + if(!valueLedgersLedger["OwnerAliUid"].isNull()) + ledgersObject.ownerAliUid = valueLedgersLedger["OwnerAliUid"].asString(); + if(!valueLedgersLedger["RegionId"].isNull()) + ledgersObject.regionId = valueLedgersLedger["RegionId"].asString(); + if(!valueLedgersLedger["ZoneId"].isNull()) + ledgersObject.zoneId = valueLedgersLedger["ZoneId"].asString(); + if(!valueLedgersLedger["CreateTime"].isNull()) + ledgersObject.createTime = valueLedgersLedger["CreateTime"].asString(); + if(!valueLedgersLedger["UpdateTime"].isNull()) + ledgersObject.updateTime = valueLedgersLedger["UpdateTime"].asString(); + if(!valueLedgersLedger["LedgerStatus"].isNull()) + ledgersObject.ledgerStatus = valueLedgersLedger["LedgerStatus"].asString(); + if(!valueLedgersLedger["JournalCount"].isNull()) + ledgersObject.journalCount = std::stol(valueLedgersLedger["JournalCount"].asString()); + if(!valueLedgersLedger["MemberCount"].isNull()) + ledgersObject.memberCount = std::stol(valueLedgersLedger["MemberCount"].asString()); + if(!valueLedgersLedger["TimeAnchorCount"].isNull()) + ledgersObject.timeAnchorCount = std::stol(valueLedgersLedger["TimeAnchorCount"].asString()); + auto lastTimeAnchorNode = value["LastTimeAnchor"]; + if(!lastTimeAnchorNode["JournalId"].isNull()) + ledgersObject.lastTimeAnchor.journalId = lastTimeAnchorNode["JournalId"].asString(); + if(!lastTimeAnchorNode["LedgerDigest"].isNull()) + ledgersObject.lastTimeAnchor.ledgerDigest = lastTimeAnchorNode["LedgerDigest"].asString(); + if(!lastTimeAnchorNode["LedgerDigestType"].isNull()) + ledgersObject.lastTimeAnchor.ledgerDigestType = lastTimeAnchorNode["LedgerDigestType"].asString(); + if(!lastTimeAnchorNode["LedgerVersion"].isNull()) + ledgersObject.lastTimeAnchor.ledgerVersion = lastTimeAnchorNode["LedgerVersion"].asString(); + if(!lastTimeAnchorNode["Proof"].isNull()) + ledgersObject.lastTimeAnchor.proof = lastTimeAnchorNode["Proof"].asString(); + if(!lastTimeAnchorNode["TimeStamp"].isNull()) + ledgersObject.lastTimeAnchor.timeStamp = lastTimeAnchorNode["TimeStamp"].asString(); + ledgers_.push_back(ledgersObject); + } + if(!value["NextToken"].isNull()) + nextToken_ = value["NextToken"].asString(); + if(!value["MaxResults"].isNull()) + maxResults_ = std::stoi(value["MaxResults"].asString()); + +} + +std::string DescribeLedgersResult::getNextToken()const +{ + return nextToken_; +} + +int DescribeLedgersResult::getMaxResults()const +{ + return maxResults_; +} + +std::vector DescribeLedgersResult::getLedgers()const +{ + return ledgers_; +} + diff --git a/ledgerdb/src/model/DescribeRegionsRequest.cc b/ledgerdb/src/model/DescribeRegionsRequest.cc new file mode 100644 index 000000000..fc2441775 --- /dev/null +++ b/ledgerdb/src/model/DescribeRegionsRequest.cc @@ -0,0 +1,40 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Ledgerdb::Model::DescribeRegionsRequest; + +DescribeRegionsRequest::DescribeRegionsRequest() : + RpcServiceRequest("ledgerdb", "2019-11-22", "DescribeRegions") +{ + setMethod(HttpRequest::Method::Post); +} + +DescribeRegionsRequest::~DescribeRegionsRequest() +{} + +std::string DescribeRegionsRequest::getRegionId()const +{ + return regionId_; +} + +void DescribeRegionsRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + diff --git a/ledgerdb/src/model/DescribeRegionsResult.cc b/ledgerdb/src/model/DescribeRegionsResult.cc new file mode 100644 index 000000000..18f1c0ff1 --- /dev/null +++ b/ledgerdb/src/model/DescribeRegionsResult.cc @@ -0,0 +1,75 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Ledgerdb; +using namespace AlibabaCloud::Ledgerdb::Model; + +DescribeRegionsResult::DescribeRegionsResult() : + ServiceResult() +{} + +DescribeRegionsResult::DescribeRegionsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeRegionsResult::~DescribeRegionsResult() +{} + +void DescribeRegionsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allRegionsNode = value["Regions"]["Result"]; + for (auto valueRegionsResult : allRegionsNode) + { + Result regionsObject; + if(!valueRegionsResult["LocalName"].isNull()) + regionsObject.localName = valueRegionsResult["LocalName"].asString(); + if(!valueRegionsResult["RegionEndpoint"].isNull()) + regionsObject.regionEndpoint = valueRegionsResult["RegionEndpoint"].asString(); + if(!valueRegionsResult["RegionId"].isNull()) + regionsObject.regionId = valueRegionsResult["RegionId"].asString(); + regions_.push_back(regionsObject); + } + if(!value["ErrorCode"].isNull()) + errorCode_ = std::stoi(value["ErrorCode"].asString()); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +std::vector DescribeRegionsResult::getRegions()const +{ + return regions_; +} + +int DescribeRegionsResult::getErrorCode()const +{ + return errorCode_; +} + +bool DescribeRegionsResult::getSuccess()const +{ + return success_; +} + diff --git a/ledgerdb/src/model/DisableMemberRequest.cc b/ledgerdb/src/model/DisableMemberRequest.cc new file mode 100644 index 000000000..fccabbfbb --- /dev/null +++ b/ledgerdb/src/model/DisableMemberRequest.cc @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Ledgerdb::Model::DisableMemberRequest; + +DisableMemberRequest::DisableMemberRequest() : + RpcServiceRequest("ledgerdb", "2019-11-22", "DisableMember") +{ + setMethod(HttpRequest::Method::Post); +} + +DisableMemberRequest::~DisableMemberRequest() +{} + +std::string DisableMemberRequest::getLedgerId()const +{ + return ledgerId_; +} + +void DisableMemberRequest::setLedgerId(const std::string& ledgerId) +{ + ledgerId_ = ledgerId; + setBodyParameter("LedgerId", ledgerId); +} + +std::string DisableMemberRequest::getMemberId()const +{ + return memberId_; +} + +void DisableMemberRequest::setMemberId(const std::string& memberId) +{ + memberId_ = memberId; + setBodyParameter("MemberId", memberId); +} + diff --git a/ledgerdb/src/model/DisableMemberResult.cc b/ledgerdb/src/model/DisableMemberResult.cc new file mode 100644 index 000000000..4bc92564d --- /dev/null +++ b/ledgerdb/src/model/DisableMemberResult.cc @@ -0,0 +1,44 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Ledgerdb; +using namespace AlibabaCloud::Ledgerdb::Model; + +DisableMemberResult::DisableMemberResult() : + ServiceResult() +{} + +DisableMemberResult::DisableMemberResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DisableMemberResult::~DisableMemberResult() +{} + +void DisableMemberResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} + diff --git a/ledgerdb/src/model/EnableMemberRequest.cc b/ledgerdb/src/model/EnableMemberRequest.cc new file mode 100644 index 000000000..cf3b31e49 --- /dev/null +++ b/ledgerdb/src/model/EnableMemberRequest.cc @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Ledgerdb::Model::EnableMemberRequest; + +EnableMemberRequest::EnableMemberRequest() : + RpcServiceRequest("ledgerdb", "2019-11-22", "EnableMember") +{ + setMethod(HttpRequest::Method::Post); +} + +EnableMemberRequest::~EnableMemberRequest() +{} + +std::string EnableMemberRequest::getLedgerId()const +{ + return ledgerId_; +} + +void EnableMemberRequest::setLedgerId(const std::string& ledgerId) +{ + ledgerId_ = ledgerId; + setBodyParameter("LedgerId", ledgerId); +} + +std::string EnableMemberRequest::getMemberId()const +{ + return memberId_; +} + +void EnableMemberRequest::setMemberId(const std::string& memberId) +{ + memberId_ = memberId; + setBodyParameter("MemberId", memberId); +} + diff --git a/ledgerdb/src/model/EnableMemberResult.cc b/ledgerdb/src/model/EnableMemberResult.cc new file mode 100644 index 000000000..8642710af --- /dev/null +++ b/ledgerdb/src/model/EnableMemberResult.cc @@ -0,0 +1,44 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Ledgerdb; +using namespace AlibabaCloud::Ledgerdb::Model; + +EnableMemberResult::EnableMemberResult() : + ServiceResult() +{} + +EnableMemberResult::EnableMemberResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +EnableMemberResult::~EnableMemberResult() +{} + +void EnableMemberResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} + diff --git a/ledgerdb/src/model/GetJournalRequest.cc b/ledgerdb/src/model/GetJournalRequest.cc new file mode 100644 index 000000000..e2c4e3818 --- /dev/null +++ b/ledgerdb/src/model/GetJournalRequest.cc @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Ledgerdb::Model::GetJournalRequest; + +GetJournalRequest::GetJournalRequest() : + RpcServiceRequest("ledgerdb", "2019-11-22", "GetJournal") +{ + setMethod(HttpRequest::Method::Get); +} + +GetJournalRequest::~GetJournalRequest() +{} + +long GetJournalRequest::getJournalId()const +{ + return journalId_; +} + +void GetJournalRequest::setJournalId(long journalId) +{ + journalId_ = journalId; + setParameter("JournalId", std::to_string(journalId)); +} + +std::string GetJournalRequest::getLedgerId()const +{ + return ledgerId_; +} + +void GetJournalRequest::setLedgerId(const std::string& ledgerId) +{ + ledgerId_ = ledgerId; + setParameter("LedgerId", ledgerId); +} + diff --git a/ledgerdb/src/model/GetJournalResult.cc b/ledgerdb/src/model/GetJournalResult.cc new file mode 100644 index 000000000..f93de1f7c --- /dev/null +++ b/ledgerdb/src/model/GetJournalResult.cc @@ -0,0 +1,69 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Ledgerdb; +using namespace AlibabaCloud::Ledgerdb::Model; + +GetJournalResult::GetJournalResult() : + ServiceResult() +{} + +GetJournalResult::GetJournalResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetJournalResult::~GetJournalResult() +{} + +void GetJournalResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto journalNode = value["Journal"]; + if(!journalNode["JournalId"].isNull()) + journal_.journalId = journalNode["JournalId"].asString(); + if(!journalNode["LedgerId"].isNull()) + journal_.ledgerId = journalNode["LedgerId"].asString(); + if(!journalNode["PayloadType"].isNull()) + journal_.payloadType = journalNode["PayloadType"].asString(); + if(!journalNode["PayloadJsonString"].isNull()) + journal_.payloadJsonString = journalNode["PayloadJsonString"].asString(); + if(!journalNode["MemberId"].isNull()) + journal_.memberId = journalNode["MemberId"].asString(); + if(!journalNode["ClientId"].isNull()) + journal_.clientId = journalNode["ClientId"].asString(); + if(!journalNode["JournalHash"].isNull()) + journal_.journalHash = journalNode["JournalHash"].asString(); + if(!journalNode["Timestamp"].isNull()) + journal_.timestamp = std::stol(journalNode["Timestamp"].asString()); + auto allClues = journalNode["Clues"]["Clue"]; + for (auto value : allClues) + journal_.clues.push_back(value.asString()); + +} + +GetJournalResult::Journal GetJournalResult::getJournal()const +{ + return journal_; +} + diff --git a/ledgerdb/src/model/GetMemberRequest.cc b/ledgerdb/src/model/GetMemberRequest.cc new file mode 100644 index 000000000..33eece154 --- /dev/null +++ b/ledgerdb/src/model/GetMemberRequest.cc @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Ledgerdb::Model::GetMemberRequest; + +GetMemberRequest::GetMemberRequest() : + RpcServiceRequest("ledgerdb", "2019-11-22", "GetMember") +{ + setMethod(HttpRequest::Method::Get); +} + +GetMemberRequest::~GetMemberRequest() +{} + +std::string GetMemberRequest::getLedgerId()const +{ + return ledgerId_; +} + +void GetMemberRequest::setLedgerId(const std::string& ledgerId) +{ + ledgerId_ = ledgerId; + setParameter("LedgerId", ledgerId); +} + +std::string GetMemberRequest::getMemberId()const +{ + return memberId_; +} + +void GetMemberRequest::setMemberId(const std::string& memberId) +{ + memberId_ = memberId; + setParameter("MemberId", memberId); +} + diff --git a/ledgerdb/src/model/GetMemberResult.cc b/ledgerdb/src/model/GetMemberResult.cc new file mode 100644 index 000000000..16416dbfa --- /dev/null +++ b/ledgerdb/src/model/GetMemberResult.cc @@ -0,0 +1,107 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Ledgerdb; +using namespace AlibabaCloud::Ledgerdb::Model; + +GetMemberResult::GetMemberResult() : + ServiceResult() +{} + +GetMemberResult::GetMemberResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetMemberResult::~GetMemberResult() +{} + +void GetMemberResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["LedgerId"].isNull()) + ledgerId_ = value["LedgerId"].asString(); + if(!value["MemberId"].isNull()) + memberId_ = value["MemberId"].asString(); + if(!value["AliUid"].isNull()) + aliUid_ = value["AliUid"].asString(); + if(!value["KeyType"].isNull()) + keyType_ = value["KeyType"].asString(); + if(!value["PublicKey"].isNull()) + publicKey_ = value["PublicKey"].asString(); + if(!value["Role"].isNull()) + role_ = value["Role"].asString(); + if(!value["State"].isNull()) + state_ = value["State"].asString(); + if(!value["CreateTime"].isNull()) + createTime_ = std::stol(value["CreateTime"].asString()); + if(!value["UpdateTime"].isNull()) + updateTime_ = std::stol(value["UpdateTime"].asString()); + +} + +std::string GetMemberResult::getRole()const +{ + return role_; +} + +std::string GetMemberResult::getMemberId()const +{ + return memberId_; +} + +std::string GetMemberResult::getKeyType()const +{ + return keyType_; +} + +std::string GetMemberResult::getPublicKey()const +{ + return publicKey_; +} + +std::string GetMemberResult::getState()const +{ + return state_; +} + +long GetMemberResult::getCreateTime()const +{ + return createTime_; +} + +long GetMemberResult::getUpdateTime()const +{ + return updateTime_; +} + +std::string GetMemberResult::getLedgerId()const +{ + return ledgerId_; +} + +std::string GetMemberResult::getAliUid()const +{ + return aliUid_; +} + diff --git a/ledgerdb/src/model/InviteMembersRequest.cc b/ledgerdb/src/model/InviteMembersRequest.cc new file mode 100644 index 000000000..31c2a7f7d --- /dev/null +++ b/ledgerdb/src/model/InviteMembersRequest.cc @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Ledgerdb::Model::InviteMembersRequest; + +InviteMembersRequest::InviteMembersRequest() : + RpcServiceRequest("ledgerdb", "2019-11-22", "InviteMembers") +{ + setMethod(HttpRequest::Method::Post); +} + +InviteMembersRequest::~InviteMembersRequest() +{} + +std::string InviteMembersRequest::getAliUids()const +{ + return aliUids_; +} + +void InviteMembersRequest::setAliUids(const std::string& aliUids) +{ + aliUids_ = aliUids; + setBodyParameter("AliUids", aliUids); +} + +std::string InviteMembersRequest::getLedgerId()const +{ + return ledgerId_; +} + +void InviteMembersRequest::setLedgerId(const std::string& ledgerId) +{ + ledgerId_ = ledgerId; + setBodyParameter("LedgerId", ledgerId); +} + diff --git a/ledgerdb/src/model/InviteMembersResult.cc b/ledgerdb/src/model/InviteMembersResult.cc new file mode 100644 index 000000000..dedfcd237 --- /dev/null +++ b/ledgerdb/src/model/InviteMembersResult.cc @@ -0,0 +1,44 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Ledgerdb; +using namespace AlibabaCloud::Ledgerdb::Model; + +InviteMembersResult::InviteMembersResult() : + ServiceResult() +{} + +InviteMembersResult::InviteMembersResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +InviteMembersResult::~InviteMembersResult() +{} + +void InviteMembersResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} + diff --git a/ledgerdb/src/model/ListJournalsRequest.cc b/ledgerdb/src/model/ListJournalsRequest.cc new file mode 100644 index 000000000..7767ae8d4 --- /dev/null +++ b/ledgerdb/src/model/ListJournalsRequest.cc @@ -0,0 +1,84 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Ledgerdb::Model::ListJournalsRequest; + +ListJournalsRequest::ListJournalsRequest() : + RpcServiceRequest("ledgerdb", "2019-11-22", "ListJournals") +{ + setMethod(HttpRequest::Method::Get); +} + +ListJournalsRequest::~ListJournalsRequest() +{} + +std::string ListJournalsRequest::getLedgerId()const +{ + return ledgerId_; +} + +void ListJournalsRequest::setLedgerId(const std::string& ledgerId) +{ + ledgerId_ = ledgerId; + setParameter("LedgerId", ledgerId); +} + +std::string ListJournalsRequest::getNextToken()const +{ + return nextToken_; +} + +void ListJournalsRequest::setNextToken(const std::string& nextToken) +{ + nextToken_ = nextToken; + setParameter("NextToken", nextToken); +} + +std::string ListJournalsRequest::getClue()const +{ + return clue_; +} + +void ListJournalsRequest::setClue(const std::string& clue) +{ + clue_ = clue; + setParameter("Clue", clue); +} + +int ListJournalsRequest::getMaxResults()const +{ + return maxResults_; +} + +void ListJournalsRequest::setMaxResults(int maxResults) +{ + maxResults_ = maxResults; + setParameter("MaxResults", std::to_string(maxResults)); +} + +std::string ListJournalsRequest::getMemberId()const +{ + return memberId_; +} + +void ListJournalsRequest::setMemberId(const std::string& memberId) +{ + memberId_ = memberId; + setParameter("MemberId", memberId); +} + diff --git a/ledgerdb/src/model/ListJournalsResult.cc b/ledgerdb/src/model/ListJournalsResult.cc new file mode 100644 index 000000000..77ebb0a43 --- /dev/null +++ b/ledgerdb/src/model/ListJournalsResult.cc @@ -0,0 +1,88 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Ledgerdb; +using namespace AlibabaCloud::Ledgerdb::Model; + +ListJournalsResult::ListJournalsResult() : + ServiceResult() +{} + +ListJournalsResult::ListJournalsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListJournalsResult::~ListJournalsResult() +{} + +void ListJournalsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allJournalsNode = value["Journals"]["Journal"]; + for (auto valueJournalsJournal : allJournalsNode) + { + Journal journalsObject; + if(!valueJournalsJournal["JournalId"].isNull()) + journalsObject.journalId = valueJournalsJournal["JournalId"].asString(); + if(!valueJournalsJournal["LedgerId"].isNull()) + journalsObject.ledgerId = valueJournalsJournal["LedgerId"].asString(); + if(!valueJournalsJournal["PayloadType"].isNull()) + journalsObject.payloadType = valueJournalsJournal["PayloadType"].asString(); + if(!valueJournalsJournal["PayloadJsonString"].isNull()) + journalsObject.payloadJsonString = valueJournalsJournal["PayloadJsonString"].asString(); + if(!valueJournalsJournal["MemberId"].isNull()) + journalsObject.memberId = valueJournalsJournal["MemberId"].asString(); + if(!valueJournalsJournal["ClientId"].isNull()) + journalsObject.clientId = valueJournalsJournal["ClientId"].asString(); + if(!valueJournalsJournal["JournalHash"].isNull()) + journalsObject.journalHash = valueJournalsJournal["JournalHash"].asString(); + if(!valueJournalsJournal["Timestamp"].isNull()) + journalsObject.timestamp = std::stol(valueJournalsJournal["Timestamp"].asString()); + auto allClues = value["Clues"]["Clue"]; + for (auto value : allClues) + journalsObject.clues.push_back(value.asString()); + journals_.push_back(journalsObject); + } + if(!value["NextToken"].isNull()) + nextToken_ = value["NextToken"].asString(); + if(!value["MaxResults"].isNull()) + maxResults_ = std::stoi(value["MaxResults"].asString()); + +} + +std::string ListJournalsResult::getNextToken()const +{ + return nextToken_; +} + +std::vector ListJournalsResult::getJournals()const +{ + return journals_; +} + +int ListJournalsResult::getMaxResults()const +{ + return maxResults_; +} + diff --git a/ledgerdb/src/model/ListMembersRequest.cc b/ledgerdb/src/model/ListMembersRequest.cc new file mode 100644 index 000000000..4dd3703b8 --- /dev/null +++ b/ledgerdb/src/model/ListMembersRequest.cc @@ -0,0 +1,62 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Ledgerdb::Model::ListMembersRequest; + +ListMembersRequest::ListMembersRequest() : + RpcServiceRequest("ledgerdb", "2019-11-22", "ListMembers") +{ + setMethod(HttpRequest::Method::Get); +} + +ListMembersRequest::~ListMembersRequest() +{} + +std::string ListMembersRequest::getLedgerId()const +{ + return ledgerId_; +} + +void ListMembersRequest::setLedgerId(const std::string& ledgerId) +{ + ledgerId_ = ledgerId; + setParameter("LedgerId", ledgerId); +} + +std::string ListMembersRequest::getNextToken()const +{ + return nextToken_; +} + +void ListMembersRequest::setNextToken(const std::string& nextToken) +{ + nextToken_ = nextToken; + setParameter("NextToken", nextToken); +} + +int ListMembersRequest::getMaxResults()const +{ + return maxResults_; +} + +void ListMembersRequest::setMaxResults(int maxResults) +{ + maxResults_ = maxResults; + setParameter("MaxResults", std::to_string(maxResults)); +} + diff --git a/ledgerdb/src/model/ListMembersResult.cc b/ledgerdb/src/model/ListMembersResult.cc new file mode 100644 index 000000000..a0583ea85 --- /dev/null +++ b/ledgerdb/src/model/ListMembersResult.cc @@ -0,0 +1,87 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Ledgerdb; +using namespace AlibabaCloud::Ledgerdb::Model; + +ListMembersResult::ListMembersResult() : + ServiceResult() +{} + +ListMembersResult::ListMembersResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListMembersResult::~ListMembersResult() +{} + +void ListMembersResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allMembersNode = value["Members"]["Member"]; + for (auto valueMembersMember : allMembersNode) + { + Member membersObject; + if(!valueMembersMember["LedgerId"].isNull()) + membersObject.ledgerId = valueMembersMember["LedgerId"].asString(); + if(!valueMembersMember["MemberId"].isNull()) + membersObject.memberId = valueMembersMember["MemberId"].asString(); + if(!valueMembersMember["AliUid"].isNull()) + membersObject.aliUid = valueMembersMember["AliUid"].asString(); + if(!valueMembersMember["KeyType"].isNull()) + membersObject.keyType = valueMembersMember["KeyType"].asString(); + if(!valueMembersMember["PublicKey"].isNull()) + membersObject.publicKey = valueMembersMember["PublicKey"].asString(); + if(!valueMembersMember["Role"].isNull()) + membersObject.role = valueMembersMember["Role"].asString(); + if(!valueMembersMember["State"].isNull()) + membersObject.state = valueMembersMember["State"].asString(); + if(!valueMembersMember["CreateTime"].isNull()) + membersObject.createTime = std::stol(valueMembersMember["CreateTime"].asString()); + if(!valueMembersMember["UpdateTime"].isNull()) + membersObject.updateTime = std::stol(valueMembersMember["UpdateTime"].asString()); + members_.push_back(membersObject); + } + if(!value["NextToken"].isNull()) + nextToken_ = value["NextToken"].asString(); + if(!value["MaxResults"].isNull()) + maxResults_ = std::stoi(value["MaxResults"].asString()); + +} + +std::string ListMembersResult::getNextToken()const +{ + return nextToken_; +} + +int ListMembersResult::getMaxResults()const +{ + return maxResults_; +} + +std::vector ListMembersResult::getMembers()const +{ + return members_; +} + diff --git a/ledgerdb/src/model/ListTimeAnchorsRequest.cc b/ledgerdb/src/model/ListTimeAnchorsRequest.cc new file mode 100644 index 000000000..8069da6eb --- /dev/null +++ b/ledgerdb/src/model/ListTimeAnchorsRequest.cc @@ -0,0 +1,73 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Ledgerdb::Model::ListTimeAnchorsRequest; + +ListTimeAnchorsRequest::ListTimeAnchorsRequest() : + RpcServiceRequest("ledgerdb", "2019-11-22", "ListTimeAnchors") +{ + setMethod(HttpRequest::Method::Get); +} + +ListTimeAnchorsRequest::~ListTimeAnchorsRequest() +{} + +bool ListTimeAnchorsRequest::getReverse()const +{ + return reverse_; +} + +void ListTimeAnchorsRequest::setReverse(bool reverse) +{ + reverse_ = reverse; + setParameter("Reverse", reverse ? "true" : "false"); +} + +std::string ListTimeAnchorsRequest::getLedgerId()const +{ + return ledgerId_; +} + +void ListTimeAnchorsRequest::setLedgerId(const std::string& ledgerId) +{ + ledgerId_ = ledgerId; + setParameter("LedgerId", ledgerId); +} + +std::string ListTimeAnchorsRequest::getNextToken()const +{ + return nextToken_; +} + +void ListTimeAnchorsRequest::setNextToken(const std::string& nextToken) +{ + nextToken_ = nextToken; + setParameter("NextToken", nextToken); +} + +int ListTimeAnchorsRequest::getMaxResults()const +{ + return maxResults_; +} + +void ListTimeAnchorsRequest::setMaxResults(int maxResults) +{ + maxResults_ = maxResults; + setParameter("MaxResults", std::to_string(maxResults)); +} + diff --git a/ledgerdb/src/model/ListTimeAnchorsResult.cc b/ledgerdb/src/model/ListTimeAnchorsResult.cc new file mode 100644 index 000000000..dcc2e3f6b --- /dev/null +++ b/ledgerdb/src/model/ListTimeAnchorsResult.cc @@ -0,0 +1,81 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Ledgerdb; +using namespace AlibabaCloud::Ledgerdb::Model; + +ListTimeAnchorsResult::ListTimeAnchorsResult() : + ServiceResult() +{} + +ListTimeAnchorsResult::ListTimeAnchorsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListTimeAnchorsResult::~ListTimeAnchorsResult() +{} + +void ListTimeAnchorsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allTimeAnchorsNode = value["TimeAnchors"]["TimeAnchor"]; + for (auto valueTimeAnchorsTimeAnchor : allTimeAnchorsNode) + { + TimeAnchor timeAnchorsObject; + if(!valueTimeAnchorsTimeAnchor["JournalId"].isNull()) + timeAnchorsObject.journalId = std::stol(valueTimeAnchorsTimeAnchor["JournalId"].asString()); + if(!valueTimeAnchorsTimeAnchor["LedgerVersion"].isNull()) + timeAnchorsObject.ledgerVersion = std::stol(valueTimeAnchorsTimeAnchor["LedgerVersion"].asString()); + if(!valueTimeAnchorsTimeAnchor["LedgerDigest"].isNull()) + timeAnchorsObject.ledgerDigest = valueTimeAnchorsTimeAnchor["LedgerDigest"].asString(); + if(!valueTimeAnchorsTimeAnchor["LedgerDigestType"].isNull()) + timeAnchorsObject.ledgerDigestType = valueTimeAnchorsTimeAnchor["LedgerDigestType"].asString(); + if(!valueTimeAnchorsTimeAnchor["TimeStamp"].isNull()) + timeAnchorsObject.timeStamp = std::stol(valueTimeAnchorsTimeAnchor["TimeStamp"].asString()); + if(!valueTimeAnchorsTimeAnchor["Proof"].isNull()) + timeAnchorsObject.proof = valueTimeAnchorsTimeAnchor["Proof"].asString(); + timeAnchors_.push_back(timeAnchorsObject); + } + if(!value["NextToken"].isNull()) + nextToken_ = value["NextToken"].asString(); + if(!value["MaxResults"].isNull()) + maxResults_ = std::stoi(value["MaxResults"].asString()); + +} + +std::vector ListTimeAnchorsResult::getTimeAnchors()const +{ + return timeAnchors_; +} + +std::string ListTimeAnchorsResult::getNextToken()const +{ + return nextToken_; +} + +int ListTimeAnchorsResult::getMaxResults()const +{ + return maxResults_; +} + diff --git a/ledgerdb/src/model/ListVpcEndpointsRequest.cc b/ledgerdb/src/model/ListVpcEndpointsRequest.cc new file mode 100644 index 000000000..85d289bae --- /dev/null +++ b/ledgerdb/src/model/ListVpcEndpointsRequest.cc @@ -0,0 +1,62 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Ledgerdb::Model::ListVpcEndpointsRequest; + +ListVpcEndpointsRequest::ListVpcEndpointsRequest() : + RpcServiceRequest("ledgerdb", "2019-11-22", "ListVpcEndpoints") +{ + setMethod(HttpRequest::Method::Get); +} + +ListVpcEndpointsRequest::~ListVpcEndpointsRequest() +{} + +std::string ListVpcEndpointsRequest::getLedgerId()const +{ + return ledgerId_; +} + +void ListVpcEndpointsRequest::setLedgerId(const std::string& ledgerId) +{ + ledgerId_ = ledgerId; + setParameter("LedgerId", ledgerId); +} + +std::string ListVpcEndpointsRequest::getNextToken()const +{ + return nextToken_; +} + +void ListVpcEndpointsRequest::setNextToken(const std::string& nextToken) +{ + nextToken_ = nextToken; + setParameter("NextToken", nextToken); +} + +int ListVpcEndpointsRequest::getMaxResults()const +{ + return maxResults_; +} + +void ListVpcEndpointsRequest::setMaxResults(int maxResults) +{ + maxResults_ = maxResults; + setParameter("MaxResults", std::to_string(maxResults)); +} + diff --git a/ledgerdb/src/model/ListVpcEndpointsResult.cc b/ledgerdb/src/model/ListVpcEndpointsResult.cc new file mode 100644 index 000000000..6d3db3bed --- /dev/null +++ b/ledgerdb/src/model/ListVpcEndpointsResult.cc @@ -0,0 +1,87 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Ledgerdb; +using namespace AlibabaCloud::Ledgerdb::Model; + +ListVpcEndpointsResult::ListVpcEndpointsResult() : + ServiceResult() +{} + +ListVpcEndpointsResult::ListVpcEndpointsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListVpcEndpointsResult::~ListVpcEndpointsResult() +{} + +void ListVpcEndpointsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allVpcEndpointsNode = value["VpcEndpoints"]["VpcEndpoint"]; + for (auto valueVpcEndpointsVpcEndpoint : allVpcEndpointsNode) + { + VpcEndpoint vpcEndpointsObject; + if(!valueVpcEndpointsVpcEndpoint["VpcEndpointId"].isNull()) + vpcEndpointsObject.vpcEndpointId = valueVpcEndpointsVpcEndpoint["VpcEndpointId"].asString(); + if(!valueVpcEndpointsVpcEndpoint["LedgerId"].isNull()) + vpcEndpointsObject.ledgerId = valueVpcEndpointsVpcEndpoint["LedgerId"].asString(); + if(!valueVpcEndpointsVpcEndpoint["MemberId"].isNull()) + vpcEndpointsObject.memberId = valueVpcEndpointsVpcEndpoint["MemberId"].asString(); + if(!valueVpcEndpointsVpcEndpoint["RegionId"].isNull()) + vpcEndpointsObject.regionId = valueVpcEndpointsVpcEndpoint["RegionId"].asString(); + if(!valueVpcEndpointsVpcEndpoint["VpcId"].isNull()) + vpcEndpointsObject.vpcId = valueVpcEndpointsVpcEndpoint["VpcId"].asString(); + if(!valueVpcEndpointsVpcEndpoint["VSwitchId"].isNull()) + vpcEndpointsObject.vSwitchId = valueVpcEndpointsVpcEndpoint["VSwitchId"].asString(); + if(!valueVpcEndpointsVpcEndpoint["Address"].isNull()) + vpcEndpointsObject.address = valueVpcEndpointsVpcEndpoint["Address"].asString(); + if(!valueVpcEndpointsVpcEndpoint["CreateTime"].isNull()) + vpcEndpointsObject.createTime = std::stol(valueVpcEndpointsVpcEndpoint["CreateTime"].asString()); + if(!valueVpcEndpointsVpcEndpoint["Status"].isNull()) + vpcEndpointsObject.status = valueVpcEndpointsVpcEndpoint["Status"].asString(); + vpcEndpoints_.push_back(vpcEndpointsObject); + } + if(!value["NextToken"].isNull()) + nextToken_ = value["NextToken"].asString(); + if(!value["MaxResults"].isNull()) + maxResults_ = std::stoi(value["MaxResults"].asString()); + +} + +std::vector ListVpcEndpointsResult::getVpcEndpoints()const +{ + return vpcEndpoints_; +} + +std::string ListVpcEndpointsResult::getNextToken()const +{ + return nextToken_; +} + +int ListVpcEndpointsResult::getMaxResults()const +{ + return maxResults_; +} + diff --git a/ledgerdb/src/model/ModifyLedgerAttributeRequest.cc b/ledgerdb/src/model/ModifyLedgerAttributeRequest.cc new file mode 100644 index 000000000..05ef5106e --- /dev/null +++ b/ledgerdb/src/model/ModifyLedgerAttributeRequest.cc @@ -0,0 +1,62 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Ledgerdb::Model::ModifyLedgerAttributeRequest; + +ModifyLedgerAttributeRequest::ModifyLedgerAttributeRequest() : + RpcServiceRequest("ledgerdb", "2019-11-22", "ModifyLedgerAttribute") +{ + setMethod(HttpRequest::Method::Post); +} + +ModifyLedgerAttributeRequest::~ModifyLedgerAttributeRequest() +{} + +std::string ModifyLedgerAttributeRequest::getLedgerId()const +{ + return ledgerId_; +} + +void ModifyLedgerAttributeRequest::setLedgerId(const std::string& ledgerId) +{ + ledgerId_ = ledgerId; + setBodyParameter("LedgerId", ledgerId); +} + +std::string ModifyLedgerAttributeRequest::getLedgerName()const +{ + return ledgerName_; +} + +void ModifyLedgerAttributeRequest::setLedgerName(const std::string& ledgerName) +{ + ledgerName_ = ledgerName; + setBodyParameter("LedgerName", ledgerName); +} + +std::string ModifyLedgerAttributeRequest::getLedgerDescription()const +{ + return ledgerDescription_; +} + +void ModifyLedgerAttributeRequest::setLedgerDescription(const std::string& ledgerDescription) +{ + ledgerDescription_ = ledgerDescription; + setBodyParameter("LedgerDescription", ledgerDescription); +} + diff --git a/ledgerdb/src/model/ModifyLedgerAttributeResult.cc b/ledgerdb/src/model/ModifyLedgerAttributeResult.cc new file mode 100644 index 000000000..dbb75c150 --- /dev/null +++ b/ledgerdb/src/model/ModifyLedgerAttributeResult.cc @@ -0,0 +1,44 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Ledgerdb; +using namespace AlibabaCloud::Ledgerdb::Model; + +ModifyLedgerAttributeResult::ModifyLedgerAttributeResult() : + ServiceResult() +{} + +ModifyLedgerAttributeResult::ModifyLedgerAttributeResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ModifyLedgerAttributeResult::~ModifyLedgerAttributeResult() +{} + +void ModifyLedgerAttributeResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} + diff --git a/ledgerdb/src/model/ModifyMemberACLsRequest.cc b/ledgerdb/src/model/ModifyMemberACLsRequest.cc new file mode 100644 index 000000000..b35e13df7 --- /dev/null +++ b/ledgerdb/src/model/ModifyMemberACLsRequest.cc @@ -0,0 +1,62 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Ledgerdb::Model::ModifyMemberACLsRequest; + +ModifyMemberACLsRequest::ModifyMemberACLsRequest() : + RpcServiceRequest("ledgerdb", "2019-11-22", "ModifyMemberACLs") +{ + setMethod(HttpRequest::Method::Post); +} + +ModifyMemberACLsRequest::~ModifyMemberACLsRequest() +{} + +std::string ModifyMemberACLsRequest::getRole()const +{ + return role_; +} + +void ModifyMemberACLsRequest::setRole(const std::string& role) +{ + role_ = role; + setBodyParameter("Role", role); +} + +std::string ModifyMemberACLsRequest::getLedgerId()const +{ + return ledgerId_; +} + +void ModifyMemberACLsRequest::setLedgerId(const std::string& ledgerId) +{ + ledgerId_ = ledgerId; + setBodyParameter("LedgerId", ledgerId); +} + +std::string ModifyMemberACLsRequest::getMemberId()const +{ + return memberId_; +} + +void ModifyMemberACLsRequest::setMemberId(const std::string& memberId) +{ + memberId_ = memberId; + setBodyParameter("MemberId", memberId); +} + diff --git a/ledgerdb/src/model/ModifyMemberACLsResult.cc b/ledgerdb/src/model/ModifyMemberACLsResult.cc new file mode 100644 index 000000000..f8bd1a11a --- /dev/null +++ b/ledgerdb/src/model/ModifyMemberACLsResult.cc @@ -0,0 +1,44 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Ledgerdb; +using namespace AlibabaCloud::Ledgerdb::Model; + +ModifyMemberACLsResult::ModifyMemberACLsResult() : + ServiceResult() +{} + +ModifyMemberACLsResult::ModifyMemberACLsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ModifyMemberACLsResult::~ModifyMemberACLsResult() +{} + +void ModifyMemberACLsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} + diff --git a/ledgerdb/src/model/ModifyMemberKeyRequest.cc b/ledgerdb/src/model/ModifyMemberKeyRequest.cc new file mode 100644 index 000000000..0ae67d145 --- /dev/null +++ b/ledgerdb/src/model/ModifyMemberKeyRequest.cc @@ -0,0 +1,73 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Ledgerdb::Model::ModifyMemberKeyRequest; + +ModifyMemberKeyRequest::ModifyMemberKeyRequest() : + RpcServiceRequest("ledgerdb", "2019-11-22", "ModifyMemberKey") +{ + setMethod(HttpRequest::Method::Post); +} + +ModifyMemberKeyRequest::~ModifyMemberKeyRequest() +{} + +std::string ModifyMemberKeyRequest::getPublicKey()const +{ + return publicKey_; +} + +void ModifyMemberKeyRequest::setPublicKey(const std::string& publicKey) +{ + publicKey_ = publicKey; + setBodyParameter("PublicKey", publicKey); +} + +std::string ModifyMemberKeyRequest::getKeyType()const +{ + return keyType_; +} + +void ModifyMemberKeyRequest::setKeyType(const std::string& keyType) +{ + keyType_ = keyType; + setBodyParameter("KeyType", keyType); +} + +std::string ModifyMemberKeyRequest::getLedgerId()const +{ + return ledgerId_; +} + +void ModifyMemberKeyRequest::setLedgerId(const std::string& ledgerId) +{ + ledgerId_ = ledgerId; + setBodyParameter("LedgerId", ledgerId); +} + +std::string ModifyMemberKeyRequest::getMemberId()const +{ + return memberId_; +} + +void ModifyMemberKeyRequest::setMemberId(const std::string& memberId) +{ + memberId_ = memberId; + setBodyParameter("MemberId", memberId); +} + diff --git a/ledgerdb/src/model/ModifyMemberKeyResult.cc b/ledgerdb/src/model/ModifyMemberKeyResult.cc new file mode 100644 index 000000000..da147b87a --- /dev/null +++ b/ledgerdb/src/model/ModifyMemberKeyResult.cc @@ -0,0 +1,44 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Ledgerdb; +using namespace AlibabaCloud::Ledgerdb::Model; + +ModifyMemberKeyResult::ModifyMemberKeyResult() : + ServiceResult() +{} + +ModifyMemberKeyResult::ModifyMemberKeyResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ModifyMemberKeyResult::~ModifyMemberKeyResult() +{} + +void ModifyMemberKeyResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} +