Create lindorm Open api.
This commit is contained in:
197
hitsdb/src/HitsdbClient.cc
Normal file
197
hitsdb/src/HitsdbClient.cc
Normal file
@@ -0,0 +1,197 @@
|
||||
/*
|
||||
* 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/hitsdb/HitsdbClient.h>
|
||||
#include <alibabacloud/core/SimpleCredentialsProvider.h>
|
||||
|
||||
using namespace AlibabaCloud;
|
||||
using namespace AlibabaCloud::Location;
|
||||
using namespace AlibabaCloud::Hitsdb;
|
||||
using namespace AlibabaCloud::Hitsdb::Model;
|
||||
|
||||
namespace
|
||||
{
|
||||
const std::string SERVICE_NAME = "hitsdb";
|
||||
}
|
||||
|
||||
HitsdbClient::HitsdbClient(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, "hitsdb");
|
||||
}
|
||||
|
||||
HitsdbClient::HitsdbClient(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, "hitsdb");
|
||||
}
|
||||
|
||||
HitsdbClient::HitsdbClient(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, "hitsdb");
|
||||
}
|
||||
|
||||
HitsdbClient::~HitsdbClient()
|
||||
{}
|
||||
|
||||
HitsdbClient::GetInstanceIpWhiteListOutcome HitsdbClient::getInstanceIpWhiteList(const GetInstanceIpWhiteListRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetInstanceIpWhiteListOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetInstanceIpWhiteListOutcome(GetInstanceIpWhiteListResult(outcome.result()));
|
||||
else
|
||||
return GetInstanceIpWhiteListOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void HitsdbClient::getInstanceIpWhiteListAsync(const GetInstanceIpWhiteListRequest& request, const GetInstanceIpWhiteListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getInstanceIpWhiteList(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
HitsdbClient::GetInstanceIpWhiteListOutcomeCallable HitsdbClient::getInstanceIpWhiteListCallable(const GetInstanceIpWhiteListRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetInstanceIpWhiteListOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getInstanceIpWhiteList(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
HitsdbClient::GetLindormInstanceEngineListOutcome HitsdbClient::getLindormInstanceEngineList(const GetLindormInstanceEngineListRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetLindormInstanceEngineListOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetLindormInstanceEngineListOutcome(GetLindormInstanceEngineListResult(outcome.result()));
|
||||
else
|
||||
return GetLindormInstanceEngineListOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void HitsdbClient::getLindormInstanceEngineListAsync(const GetLindormInstanceEngineListRequest& request, const GetLindormInstanceEngineListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getLindormInstanceEngineList(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
HitsdbClient::GetLindormInstanceEngineListOutcomeCallable HitsdbClient::getLindormInstanceEngineListCallable(const GetLindormInstanceEngineListRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetLindormInstanceEngineListOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getLindormInstanceEngineList(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
HitsdbClient::GetLindormInstanceListOutcome HitsdbClient::getLindormInstanceList(const GetLindormInstanceListRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetLindormInstanceListOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetLindormInstanceListOutcome(GetLindormInstanceListResult(outcome.result()));
|
||||
else
|
||||
return GetLindormInstanceListOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void HitsdbClient::getLindormInstanceListAsync(const GetLindormInstanceListRequest& request, const GetLindormInstanceListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getLindormInstanceList(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
HitsdbClient::GetLindormInstanceListOutcomeCallable HitsdbClient::getLindormInstanceListCallable(const GetLindormInstanceListRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetLindormInstanceListOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getLindormInstanceList(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
HitsdbClient::UpdateInstanceIpWhiteListOutcome HitsdbClient::updateInstanceIpWhiteList(const UpdateInstanceIpWhiteListRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UpdateInstanceIpWhiteListOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UpdateInstanceIpWhiteListOutcome(UpdateInstanceIpWhiteListResult(outcome.result()));
|
||||
else
|
||||
return UpdateInstanceIpWhiteListOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void HitsdbClient::updateInstanceIpWhiteListAsync(const UpdateInstanceIpWhiteListRequest& request, const UpdateInstanceIpWhiteListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, updateInstanceIpWhiteList(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
HitsdbClient::UpdateInstanceIpWhiteListOutcomeCallable HitsdbClient::updateInstanceIpWhiteListCallable(const UpdateInstanceIpWhiteListRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UpdateInstanceIpWhiteListOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->updateInstanceIpWhiteList(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
117
hitsdb/src/model/GetInstanceIpWhiteListRequest.cc
Normal file
117
hitsdb/src/model/GetInstanceIpWhiteListRequest.cc
Normal file
@@ -0,0 +1,117 @@
|
||||
/*
|
||||
* 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/hitsdb/model/GetInstanceIpWhiteListRequest.h>
|
||||
|
||||
using AlibabaCloud::Hitsdb::Model::GetInstanceIpWhiteListRequest;
|
||||
|
||||
GetInstanceIpWhiteListRequest::GetInstanceIpWhiteListRequest() :
|
||||
RpcServiceRequest("hitsdb", "2020-06-15", "GetInstanceIpWhiteList")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetInstanceIpWhiteListRequest::~GetInstanceIpWhiteListRequest()
|
||||
{}
|
||||
|
||||
long GetInstanceIpWhiteListRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void GetInstanceIpWhiteListRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string GetInstanceIpWhiteListRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void GetInstanceIpWhiteListRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string GetInstanceIpWhiteListRequest::getSecurityToken()const
|
||||
{
|
||||
return securityToken_;
|
||||
}
|
||||
|
||||
void GetInstanceIpWhiteListRequest::setSecurityToken(const std::string& securityToken)
|
||||
{
|
||||
securityToken_ = securityToken;
|
||||
setParameter("SecurityToken", securityToken);
|
||||
}
|
||||
|
||||
std::string GetInstanceIpWhiteListRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void GetInstanceIpWhiteListRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||
{
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string GetInstanceIpWhiteListRequest::getOwnerAccount()const
|
||||
{
|
||||
return ownerAccount_;
|
||||
}
|
||||
|
||||
void GetInstanceIpWhiteListRequest::setOwnerAccount(const std::string& ownerAccount)
|
||||
{
|
||||
ownerAccount_ = ownerAccount;
|
||||
setParameter("OwnerAccount", ownerAccount);
|
||||
}
|
||||
|
||||
long GetInstanceIpWhiteListRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void GetInstanceIpWhiteListRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string GetInstanceIpWhiteListRequest::getGroupName()const
|
||||
{
|
||||
return groupName_;
|
||||
}
|
||||
|
||||
void GetInstanceIpWhiteListRequest::setGroupName(const std::string& groupName)
|
||||
{
|
||||
groupName_ = groupName;
|
||||
setParameter("GroupName", groupName);
|
||||
}
|
||||
|
||||
std::string GetInstanceIpWhiteListRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void GetInstanceIpWhiteListRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
59
hitsdb/src/model/GetInstanceIpWhiteListResult.cc
Normal file
59
hitsdb/src/model/GetInstanceIpWhiteListResult.cc
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* 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/hitsdb/model/GetInstanceIpWhiteListResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Hitsdb;
|
||||
using namespace AlibabaCloud::Hitsdb::Model;
|
||||
|
||||
GetInstanceIpWhiteListResult::GetInstanceIpWhiteListResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetInstanceIpWhiteListResult::GetInstanceIpWhiteListResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetInstanceIpWhiteListResult::~GetInstanceIpWhiteListResult()
|
||||
{}
|
||||
|
||||
void GetInstanceIpWhiteListResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allIpList = value["IpList"]["IpList"];
|
||||
for (const auto &item : allIpList)
|
||||
ipList_.push_back(item.asString());
|
||||
if(!value["InstanceId"].isNull())
|
||||
instanceId_ = value["InstanceId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::vector<std::string> GetInstanceIpWhiteListResult::getIpList()const
|
||||
{
|
||||
return ipList_;
|
||||
}
|
||||
|
||||
std::string GetInstanceIpWhiteListResult::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
106
hitsdb/src/model/GetLindormInstanceEngineListRequest.cc
Normal file
106
hitsdb/src/model/GetLindormInstanceEngineListRequest.cc
Normal file
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* 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/hitsdb/model/GetLindormInstanceEngineListRequest.h>
|
||||
|
||||
using AlibabaCloud::Hitsdb::Model::GetLindormInstanceEngineListRequest;
|
||||
|
||||
GetLindormInstanceEngineListRequest::GetLindormInstanceEngineListRequest() :
|
||||
RpcServiceRequest("hitsdb", "2020-06-15", "GetLindormInstanceEngineList")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetLindormInstanceEngineListRequest::~GetLindormInstanceEngineListRequest()
|
||||
{}
|
||||
|
||||
long GetLindormInstanceEngineListRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void GetLindormInstanceEngineListRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string GetLindormInstanceEngineListRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void GetLindormInstanceEngineListRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string GetLindormInstanceEngineListRequest::getSecurityToken()const
|
||||
{
|
||||
return securityToken_;
|
||||
}
|
||||
|
||||
void GetLindormInstanceEngineListRequest::setSecurityToken(const std::string& securityToken)
|
||||
{
|
||||
securityToken_ = securityToken;
|
||||
setParameter("SecurityToken", securityToken);
|
||||
}
|
||||
|
||||
std::string GetLindormInstanceEngineListRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void GetLindormInstanceEngineListRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||
{
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string GetLindormInstanceEngineListRequest::getOwnerAccount()const
|
||||
{
|
||||
return ownerAccount_;
|
||||
}
|
||||
|
||||
void GetLindormInstanceEngineListRequest::setOwnerAccount(const std::string& ownerAccount)
|
||||
{
|
||||
ownerAccount_ = ownerAccount;
|
||||
setParameter("OwnerAccount", ownerAccount);
|
||||
}
|
||||
|
||||
long GetLindormInstanceEngineListRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void GetLindormInstanceEngineListRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string GetLindormInstanceEngineListRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void GetLindormInstanceEngineListRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
78
hitsdb/src/model/GetLindormInstanceEngineListResult.cc
Normal file
78
hitsdb/src/model/GetLindormInstanceEngineListResult.cc
Normal file
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* 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/hitsdb/model/GetLindormInstanceEngineListResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Hitsdb;
|
||||
using namespace AlibabaCloud::Hitsdb::Model;
|
||||
|
||||
GetLindormInstanceEngineListResult::GetLindormInstanceEngineListResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetLindormInstanceEngineListResult::GetLindormInstanceEngineListResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetLindormInstanceEngineListResult::~GetLindormInstanceEngineListResult()
|
||||
{}
|
||||
|
||||
void GetLindormInstanceEngineListResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allEngineListNode = value["EngineList"]["EngineInfo"];
|
||||
for (auto valueEngineListEngineInfo : allEngineListNode)
|
||||
{
|
||||
EngineInfo engineListObject;
|
||||
if(!valueEngineListEngineInfo["EngineType"].isNull())
|
||||
engineListObject.engineType = valueEngineListEngineInfo["EngineType"].asString();
|
||||
auto allNetInfoListNode = valueEngineListEngineInfo["NetInfoList"]["NetInfo"];
|
||||
for (auto valueEngineListEngineInfoNetInfoListNetInfo : allNetInfoListNode)
|
||||
{
|
||||
EngineInfo::NetInfo netInfoListObject;
|
||||
if(!valueEngineListEngineInfoNetInfoListNetInfo["NetType"].isNull())
|
||||
netInfoListObject.netType = valueEngineListEngineInfoNetInfoListNetInfo["NetType"].asString();
|
||||
if(!valueEngineListEngineInfoNetInfoListNetInfo["ConnectionString"].isNull())
|
||||
netInfoListObject.connectionString = valueEngineListEngineInfoNetInfoListNetInfo["ConnectionString"].asString();
|
||||
if(!valueEngineListEngineInfoNetInfoListNetInfo["Port"].isNull())
|
||||
netInfoListObject.port = std::stoi(valueEngineListEngineInfoNetInfoListNetInfo["Port"].asString());
|
||||
if(!valueEngineListEngineInfoNetInfoListNetInfo["AccessType"].isNull())
|
||||
netInfoListObject.accessType = std::stoi(valueEngineListEngineInfoNetInfoListNetInfo["AccessType"].asString());
|
||||
engineListObject.netInfoList.push_back(netInfoListObject);
|
||||
}
|
||||
engineList_.push_back(engineListObject);
|
||||
}
|
||||
if(!value["InstanceId"].isNull())
|
||||
instanceId_ = value["InstanceId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::vector<GetLindormInstanceEngineListResult::EngineInfo> GetLindormInstanceEngineListResult::getEngineList()const
|
||||
{
|
||||
return engineList_;
|
||||
}
|
||||
|
||||
std::string GetLindormInstanceEngineListResult::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
150
hitsdb/src/model/GetLindormInstanceListRequest.cc
Normal file
150
hitsdb/src/model/GetLindormInstanceListRequest.cc
Normal file
@@ -0,0 +1,150 @@
|
||||
/*
|
||||
* 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/hitsdb/model/GetLindormInstanceListRequest.h>
|
||||
|
||||
using AlibabaCloud::Hitsdb::Model::GetLindormInstanceListRequest;
|
||||
|
||||
GetLindormInstanceListRequest::GetLindormInstanceListRequest() :
|
||||
RpcServiceRequest("hitsdb", "2020-06-15", "GetLindormInstanceList")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetLindormInstanceListRequest::~GetLindormInstanceListRequest()
|
||||
{}
|
||||
|
||||
long GetLindormInstanceListRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void GetLindormInstanceListRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
int GetLindormInstanceListRequest::getSupportEngine()const
|
||||
{
|
||||
return supportEngine_;
|
||||
}
|
||||
|
||||
void GetLindormInstanceListRequest::setSupportEngine(int supportEngine)
|
||||
{
|
||||
supportEngine_ = supportEngine;
|
||||
setParameter("SupportEngine", std::to_string(supportEngine));
|
||||
}
|
||||
|
||||
int GetLindormInstanceListRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void GetLindormInstanceListRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
std::string GetLindormInstanceListRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void GetLindormInstanceListRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string GetLindormInstanceListRequest::getSecurityToken()const
|
||||
{
|
||||
return securityToken_;
|
||||
}
|
||||
|
||||
void GetLindormInstanceListRequest::setSecurityToken(const std::string& securityToken)
|
||||
{
|
||||
securityToken_ = securityToken;
|
||||
setParameter("SecurityToken", securityToken);
|
||||
}
|
||||
|
||||
int GetLindormInstanceListRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void GetLindormInstanceListRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string GetLindormInstanceListRequest::getQueryStr()const
|
||||
{
|
||||
return queryStr_;
|
||||
}
|
||||
|
||||
void GetLindormInstanceListRequest::setQueryStr(const std::string& queryStr)
|
||||
{
|
||||
queryStr_ = queryStr;
|
||||
setParameter("QueryStr", queryStr);
|
||||
}
|
||||
|
||||
std::string GetLindormInstanceListRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void GetLindormInstanceListRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||
{
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string GetLindormInstanceListRequest::getOwnerAccount()const
|
||||
{
|
||||
return ownerAccount_;
|
||||
}
|
||||
|
||||
void GetLindormInstanceListRequest::setOwnerAccount(const std::string& ownerAccount)
|
||||
{
|
||||
ownerAccount_ = ownerAccount;
|
||||
setParameter("OwnerAccount", ownerAccount);
|
||||
}
|
||||
|
||||
long GetLindormInstanceListRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void GetLindormInstanceListRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string GetLindormInstanceListRequest::getServiceType()const
|
||||
{
|
||||
return serviceType_;
|
||||
}
|
||||
|
||||
void GetLindormInstanceListRequest::setServiceType(const std::string& serviceType)
|
||||
{
|
||||
serviceType_ = serviceType;
|
||||
setParameter("ServiceType", serviceType);
|
||||
}
|
||||
|
||||
104
hitsdb/src/model/GetLindormInstanceListResult.cc
Normal file
104
hitsdb/src/model/GetLindormInstanceListResult.cc
Normal file
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
* 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/hitsdb/model/GetLindormInstanceListResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Hitsdb;
|
||||
using namespace AlibabaCloud::Hitsdb::Model;
|
||||
|
||||
GetLindormInstanceListResult::GetLindormInstanceListResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetLindormInstanceListResult::GetLindormInstanceListResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetLindormInstanceListResult::~GetLindormInstanceListResult()
|
||||
{}
|
||||
|
||||
void GetLindormInstanceListResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allInstanceListNode = value["InstanceList"]["LindormInstanceSummary"];
|
||||
for (auto valueInstanceListLindormInstanceSummary : allInstanceListNode)
|
||||
{
|
||||
LindormInstanceSummary instanceListObject;
|
||||
if(!valueInstanceListLindormInstanceSummary["InstanceId"].isNull())
|
||||
instanceListObject.instanceId = valueInstanceListLindormInstanceSummary["InstanceId"].asString();
|
||||
if(!valueInstanceListLindormInstanceSummary["InstanceAlias"].isNull())
|
||||
instanceListObject.instanceAlias = valueInstanceListLindormInstanceSummary["InstanceAlias"].asString();
|
||||
if(!valueInstanceListLindormInstanceSummary["RegionId"].isNull())
|
||||
instanceListObject.regionId = valueInstanceListLindormInstanceSummary["RegionId"].asString();
|
||||
if(!valueInstanceListLindormInstanceSummary["ZoneId"].isNull())
|
||||
instanceListObject.zoneId = valueInstanceListLindormInstanceSummary["ZoneId"].asString();
|
||||
if(!valueInstanceListLindormInstanceSummary["InstanceStatus"].isNull())
|
||||
instanceListObject.instanceStatus = valueInstanceListLindormInstanceSummary["InstanceStatus"].asString();
|
||||
if(!valueInstanceListLindormInstanceSummary["PayType"].isNull())
|
||||
instanceListObject.payType = valueInstanceListLindormInstanceSummary["PayType"].asString();
|
||||
if(!valueInstanceListLindormInstanceSummary["NetworkType"].isNull())
|
||||
instanceListObject.networkType = valueInstanceListLindormInstanceSummary["NetworkType"].asString();
|
||||
if(!valueInstanceListLindormInstanceSummary["CreateTime"].isNull())
|
||||
instanceListObject.createTime = valueInstanceListLindormInstanceSummary["CreateTime"].asString();
|
||||
if(!valueInstanceListLindormInstanceSummary["ExpireTime"].isNull())
|
||||
instanceListObject.expireTime = valueInstanceListLindormInstanceSummary["ExpireTime"].asString();
|
||||
if(!valueInstanceListLindormInstanceSummary["InstanceStorage"].isNull())
|
||||
instanceListObject.instanceStorage = valueInstanceListLindormInstanceSummary["InstanceStorage"].asString();
|
||||
if(!valueInstanceListLindormInstanceSummary["ServiceType"].isNull())
|
||||
instanceListObject.serviceType = valueInstanceListLindormInstanceSummary["ServiceType"].asString();
|
||||
if(!valueInstanceListLindormInstanceSummary["EngineType"].isNull())
|
||||
instanceListObject.engineType = valueInstanceListLindormInstanceSummary["EngineType"].asString();
|
||||
if(!valueInstanceListLindormInstanceSummary["AliUid"].isNull())
|
||||
instanceListObject.aliUid = std::stol(valueInstanceListLindormInstanceSummary["AliUid"].asString());
|
||||
if(!valueInstanceListLindormInstanceSummary["VpcId"].isNull())
|
||||
instanceListObject.vpcId = valueInstanceListLindormInstanceSummary["VpcId"].asString();
|
||||
instanceList_.push_back(instanceListObject);
|
||||
}
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
if(!value["Total"].isNull())
|
||||
total_ = std::stoi(value["Total"].asString());
|
||||
|
||||
}
|
||||
|
||||
int GetLindormInstanceListResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int GetLindormInstanceListResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
int GetLindormInstanceListResult::getTotal()const
|
||||
{
|
||||
return total_;
|
||||
}
|
||||
|
||||
std::vector<GetLindormInstanceListResult::LindormInstanceSummary> GetLindormInstanceListResult::getInstanceList()const
|
||||
{
|
||||
return instanceList_;
|
||||
}
|
||||
|
||||
128
hitsdb/src/model/UpdateInstanceIpWhiteListRequest.cc
Normal file
128
hitsdb/src/model/UpdateInstanceIpWhiteListRequest.cc
Normal file
@@ -0,0 +1,128 @@
|
||||
/*
|
||||
* 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/hitsdb/model/UpdateInstanceIpWhiteListRequest.h>
|
||||
|
||||
using AlibabaCloud::Hitsdb::Model::UpdateInstanceIpWhiteListRequest;
|
||||
|
||||
UpdateInstanceIpWhiteListRequest::UpdateInstanceIpWhiteListRequest() :
|
||||
RpcServiceRequest("hitsdb", "2020-06-15", "UpdateInstanceIpWhiteList")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
UpdateInstanceIpWhiteListRequest::~UpdateInstanceIpWhiteListRequest()
|
||||
{}
|
||||
|
||||
long UpdateInstanceIpWhiteListRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void UpdateInstanceIpWhiteListRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string UpdateInstanceIpWhiteListRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void UpdateInstanceIpWhiteListRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string UpdateInstanceIpWhiteListRequest::getSecurityToken()const
|
||||
{
|
||||
return securityToken_;
|
||||
}
|
||||
|
||||
void UpdateInstanceIpWhiteListRequest::setSecurityToken(const std::string& securityToken)
|
||||
{
|
||||
securityToken_ = securityToken;
|
||||
setParameter("SecurityToken", securityToken);
|
||||
}
|
||||
|
||||
std::string UpdateInstanceIpWhiteListRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void UpdateInstanceIpWhiteListRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||
{
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string UpdateInstanceIpWhiteListRequest::getOwnerAccount()const
|
||||
{
|
||||
return ownerAccount_;
|
||||
}
|
||||
|
||||
void UpdateInstanceIpWhiteListRequest::setOwnerAccount(const std::string& ownerAccount)
|
||||
{
|
||||
ownerAccount_ = ownerAccount;
|
||||
setParameter("OwnerAccount", ownerAccount);
|
||||
}
|
||||
|
||||
long UpdateInstanceIpWhiteListRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void UpdateInstanceIpWhiteListRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string UpdateInstanceIpWhiteListRequest::getGroupName()const
|
||||
{
|
||||
return groupName_;
|
||||
}
|
||||
|
||||
void UpdateInstanceIpWhiteListRequest::setGroupName(const std::string& groupName)
|
||||
{
|
||||
groupName_ = groupName;
|
||||
setParameter("GroupName", groupName);
|
||||
}
|
||||
|
||||
std::string UpdateInstanceIpWhiteListRequest::getSecurityIpList()const
|
||||
{
|
||||
return securityIpList_;
|
||||
}
|
||||
|
||||
void UpdateInstanceIpWhiteListRequest::setSecurityIpList(const std::string& securityIpList)
|
||||
{
|
||||
securityIpList_ = securityIpList;
|
||||
setParameter("SecurityIpList", securityIpList);
|
||||
}
|
||||
|
||||
std::string UpdateInstanceIpWhiteListRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void UpdateInstanceIpWhiteListRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
44
hitsdb/src/model/UpdateInstanceIpWhiteListResult.cc
Normal file
44
hitsdb/src/model/UpdateInstanceIpWhiteListResult.cc
Normal 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/hitsdb/model/UpdateInstanceIpWhiteListResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Hitsdb;
|
||||
using namespace AlibabaCloud::Hitsdb::Model;
|
||||
|
||||
UpdateInstanceIpWhiteListResult::UpdateInstanceIpWhiteListResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateInstanceIpWhiteListResult::UpdateInstanceIpWhiteListResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateInstanceIpWhiteListResult::~UpdateInstanceIpWhiteListResult()
|
||||
{}
|
||||
|
||||
void UpdateInstanceIpWhiteListResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user