Publish apis for ledger instances.

This commit is contained in:
sdk-team
2020-04-24 16:01:11 +08:00
parent 7e80260525
commit d005611f56
86 changed files with 5848 additions and 1 deletions

View File

@@ -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 <alibabacloud/ledgerdb/LedgerdbClient.h>
#include <alibabacloud/core/SimpleCredentialsProvider.h>
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<SimpleCredentialsProvider>(credentials), configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "ledgerdb");
}
LedgerdbClient::LedgerdbClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(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<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
{
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(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<const AsyncCallerContext>& 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<std::packaged_task<AcceptMemberOutcome()>>(
[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<const AsyncCallerContext>& 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<std::packaged_task<CreateVpcEndpointOutcome()>>(
[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<const AsyncCallerContext>& 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<std::packaged_task<DeleteLedgerOutcome()>>(
[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<const AsyncCallerContext>& 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<std::packaged_task<DeleteMemberOutcome()>>(
[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<const AsyncCallerContext>& 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<std::packaged_task<DeleteVpcEndpointOutcome()>>(
[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<const AsyncCallerContext>& 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<std::packaged_task<DescribeLedgerOutcome()>>(
[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<const AsyncCallerContext>& 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<std::packaged_task<DescribeLedgersOutcome()>>(
[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<const AsyncCallerContext>& 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<std::packaged_task<DescribeRegionsOutcome()>>(
[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<const AsyncCallerContext>& 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<std::packaged_task<DisableMemberOutcome()>>(
[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<const AsyncCallerContext>& 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<std::packaged_task<EnableMemberOutcome()>>(
[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<const AsyncCallerContext>& 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<std::packaged_task<GetJournalOutcome()>>(
[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<const AsyncCallerContext>& 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<std::packaged_task<GetMemberOutcome()>>(
[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<const AsyncCallerContext>& 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<std::packaged_task<InviteMembersOutcome()>>(
[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<const AsyncCallerContext>& 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<std::packaged_task<ListJournalsOutcome()>>(
[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<const AsyncCallerContext>& 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<std::packaged_task<ListMembersOutcome()>>(
[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<const AsyncCallerContext>& 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<std::packaged_task<ListTimeAnchorsOutcome()>>(
[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<const AsyncCallerContext>& 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<std::packaged_task<ListVpcEndpointsOutcome()>>(
[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<const AsyncCallerContext>& 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<std::packaged_task<ModifyLedgerAttributeOutcome()>>(
[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<const AsyncCallerContext>& 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<std::packaged_task<ModifyMemberACLsOutcome()>>(
[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<const AsyncCallerContext>& 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<std::packaged_task<ModifyMemberKeyOutcome()>>(
[this, request]()
{
return this->modifyMemberKey(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -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 <alibabacloud/ledgerdb/model/AcceptMemberRequest.h>
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);
}

View File

@@ -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 <alibabacloud/ledgerdb/model/AcceptMemberResult.h>
#include <json/json.h>
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_;
}

View File

@@ -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 <alibabacloud/ledgerdb/model/CreateVpcEndpointRequest.h>
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);
}

View File

@@ -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 <alibabacloud/ledgerdb/model/CreateVpcEndpointResult.h>
#include <json/json.h>
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_;
}

View File

@@ -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 <alibabacloud/ledgerdb/model/DeleteLedgerRequest.h>
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);
}

View File

@@ -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 <alibabacloud/ledgerdb/model/DeleteLedgerResult.h>
#include <json/json.h>
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());
}

View File

@@ -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 <alibabacloud/ledgerdb/model/DeleteMemberRequest.h>
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);
}

View File

@@ -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 <alibabacloud/ledgerdb/model/DeleteMemberResult.h>
#include <json/json.h>
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());
}

View File

@@ -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 <alibabacloud/ledgerdb/model/DeleteVpcEndpointRequest.h>
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);
}

View File

@@ -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 <alibabacloud/ledgerdb/model/DeleteVpcEndpointResult.h>
#include <json/json.h>
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());
}

View File

@@ -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 <alibabacloud/ledgerdb/model/DescribeLedgerRequest.h>
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);
}

View File

@@ -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 <alibabacloud/ledgerdb/model/DescribeLedgerResult.h>
#include <json/json.h>
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_;
}

View File

@@ -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 <alibabacloud/ledgerdb/model/DescribeLedgersRequest.h>
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));
}

View File

@@ -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 <alibabacloud/ledgerdb/model/DescribeLedgersResult.h>
#include <json/json.h>
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::Ledger> DescribeLedgersResult::getLedgers()const
{
return ledgers_;
}

View File

@@ -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 <alibabacloud/ledgerdb/model/DescribeRegionsRequest.h>
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);
}

View File

@@ -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 <alibabacloud/ledgerdb/model/DescribeRegionsResult.h>
#include <json/json.h>
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::Result> DescribeRegionsResult::getRegions()const
{
return regions_;
}
int DescribeRegionsResult::getErrorCode()const
{
return errorCode_;
}
bool DescribeRegionsResult::getSuccess()const
{
return success_;
}

View File

@@ -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 <alibabacloud/ledgerdb/model/DisableMemberRequest.h>
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);
}

View File

@@ -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 <alibabacloud/ledgerdb/model/DisableMemberResult.h>
#include <json/json.h>
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());
}

View File

@@ -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 <alibabacloud/ledgerdb/model/EnableMemberRequest.h>
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);
}

View File

@@ -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 <alibabacloud/ledgerdb/model/EnableMemberResult.h>
#include <json/json.h>
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());
}

View File

@@ -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 <alibabacloud/ledgerdb/model/GetJournalRequest.h>
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);
}

View File

@@ -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 <alibabacloud/ledgerdb/model/GetJournalResult.h>
#include <json/json.h>
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_;
}

View File

@@ -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 <alibabacloud/ledgerdb/model/GetMemberRequest.h>
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);
}

View File

@@ -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 <alibabacloud/ledgerdb/model/GetMemberResult.h>
#include <json/json.h>
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_;
}

View File

@@ -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 <alibabacloud/ledgerdb/model/InviteMembersRequest.h>
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);
}

View File

@@ -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 <alibabacloud/ledgerdb/model/InviteMembersResult.h>
#include <json/json.h>
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());
}

View File

@@ -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 <alibabacloud/ledgerdb/model/ListJournalsRequest.h>
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);
}

View File

@@ -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 <alibabacloud/ledgerdb/model/ListJournalsResult.h>
#include <json/json.h>
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::Journal> ListJournalsResult::getJournals()const
{
return journals_;
}
int ListJournalsResult::getMaxResults()const
{
return maxResults_;
}

View File

@@ -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 <alibabacloud/ledgerdb/model/ListMembersRequest.h>
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));
}

View File

@@ -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 <alibabacloud/ledgerdb/model/ListMembersResult.h>
#include <json/json.h>
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::Member> ListMembersResult::getMembers()const
{
return members_;
}

View File

@@ -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 <alibabacloud/ledgerdb/model/ListTimeAnchorsRequest.h>
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));
}

View File

@@ -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 <alibabacloud/ledgerdb/model/ListTimeAnchorsResult.h>
#include <json/json.h>
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::TimeAnchor> ListTimeAnchorsResult::getTimeAnchors()const
{
return timeAnchors_;
}
std::string ListTimeAnchorsResult::getNextToken()const
{
return nextToken_;
}
int ListTimeAnchorsResult::getMaxResults()const
{
return maxResults_;
}

View File

@@ -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 <alibabacloud/ledgerdb/model/ListVpcEndpointsRequest.h>
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));
}

View File

@@ -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 <alibabacloud/ledgerdb/model/ListVpcEndpointsResult.h>
#include <json/json.h>
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::VpcEndpoint> ListVpcEndpointsResult::getVpcEndpoints()const
{
return vpcEndpoints_;
}
std::string ListVpcEndpointsResult::getNextToken()const
{
return nextToken_;
}
int ListVpcEndpointsResult::getMaxResults()const
{
return maxResults_;
}

View File

@@ -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 <alibabacloud/ledgerdb/model/ModifyLedgerAttributeRequest.h>
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);
}

View File

@@ -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 <alibabacloud/ledgerdb/model/ModifyLedgerAttributeResult.h>
#include <json/json.h>
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());
}

View File

@@ -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 <alibabacloud/ledgerdb/model/ModifyMemberACLsRequest.h>
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);
}

View File

@@ -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 <alibabacloud/ledgerdb/model/ModifyMemberACLsResult.h>
#include <json/json.h>
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());
}

View File

@@ -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 <alibabacloud/ledgerdb/model/ModifyMemberKeyRequest.h>
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);
}

View File

@@ -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 <alibabacloud/ledgerdb/model/ModifyMemberKeyResult.h>
#include <json/json.h>
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());
}