Generated 2019-01-01 for Cassandra.
This commit is contained in:
@@ -1635,6 +1635,42 @@ CassandraClient::ModifySecurityGroupsOutcomeCallable CassandraClient::modifySecu
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CassandraClient::MoveResourceGroupOutcome CassandraClient::moveResourceGroup(const MoveResourceGroupRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return MoveResourceGroupOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return MoveResourceGroupOutcome(MoveResourceGroupResult(outcome.result()));
|
||||
else
|
||||
return MoveResourceGroupOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CassandraClient::moveResourceGroupAsync(const MoveResourceGroupRequest& request, const MoveResourceGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, moveResourceGroup(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CassandraClient::MoveResourceGroupOutcomeCallable CassandraClient::moveResourceGroupCallable(const MoveResourceGroupRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<MoveResourceGroupOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->moveResourceGroup(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CassandraClient::PurgeClusterOutcome CassandraClient::purgeCluster(const PurgeClusterRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -27,6 +27,17 @@ AllocatePublicContactPointsRequest::AllocatePublicContactPointsRequest() :
|
||||
AllocatePublicContactPointsRequest::~AllocatePublicContactPointsRequest()
|
||||
{}
|
||||
|
||||
std::string AllocatePublicContactPointsRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void AllocatePublicContactPointsRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string AllocatePublicContactPointsRequest::getDataCenterId()const
|
||||
{
|
||||
return dataCenterId_;
|
||||
|
||||
@@ -27,6 +27,17 @@ CreateBackupPlanRequest::CreateBackupPlanRequest() :
|
||||
CreateBackupPlanRequest::~CreateBackupPlanRequest()
|
||||
{}
|
||||
|
||||
std::string CreateBackupPlanRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void CreateBackupPlanRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
int CreateBackupPlanRequest::getRetentionPeriod()const
|
||||
{
|
||||
return retentionPeriod_;
|
||||
|
||||
@@ -49,6 +49,17 @@ void CreateClusterRequest::setClusterName(const std::string& clusterName)
|
||||
setParameter("ClusterName", clusterName);
|
||||
}
|
||||
|
||||
std::string CreateClusterRequest::getResourceGroupId()const
|
||||
{
|
||||
return resourceGroupId_;
|
||||
}
|
||||
|
||||
void CreateClusterRequest::setResourceGroupId(const std::string& resourceGroupId)
|
||||
{
|
||||
resourceGroupId_ = resourceGroupId;
|
||||
setParameter("ResourceGroupId", resourceGroupId);
|
||||
}
|
||||
|
||||
std::string CreateClusterRequest::getPassword()const
|
||||
{
|
||||
return password_;
|
||||
|
||||
@@ -70,6 +70,8 @@ void DescribeClusterResult::parse(const std::string &payload)
|
||||
cluster_.autoRenewal = clusterNode["AutoRenewal"].asString() == "true";
|
||||
if(!clusterNode["AutoRenewPeriod"].isNull())
|
||||
cluster_.autoRenewPeriod = std::stoi(clusterNode["AutoRenewPeriod"].asString());
|
||||
if(!clusterNode["ResourceGroupId"].isNull())
|
||||
cluster_.resourceGroupId = clusterNode["ResourceGroupId"].asString();
|
||||
auto allTagsNode = clusterNode["Tags"]["Tag"];
|
||||
for (auto clusterNodeTagsTag : allTagsNode)
|
||||
{
|
||||
|
||||
@@ -49,6 +49,17 @@ void DescribeClustersRequest::setPageNumber(int pageNumber)
|
||||
setParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
std::string DescribeClustersRequest::getResourceGroupId()const
|
||||
{
|
||||
return resourceGroupId_;
|
||||
}
|
||||
|
||||
void DescribeClustersRequest::setResourceGroupId(const std::string& resourceGroupId)
|
||||
{
|
||||
resourceGroupId_ = resourceGroupId;
|
||||
setParameter("ResourceGroupId", resourceGroupId);
|
||||
}
|
||||
|
||||
std::string DescribeClustersRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
|
||||
@@ -67,6 +67,8 @@ void DescribeClustersResult::parse(const std::string &payload)
|
||||
clustersObject.autoRenewal = valueClustersCluster["AutoRenewal"].asString() == "true";
|
||||
if(!valueClustersCluster["AutoRenewPeriod"].isNull())
|
||||
clustersObject.autoRenewPeriod = std::stoi(valueClustersCluster["AutoRenewPeriod"].asString());
|
||||
if(!valueClustersCluster["ResourceGroupId"].isNull())
|
||||
clustersObject.resourceGroupId = valueClustersCluster["ResourceGroupId"].asString();
|
||||
auto allTagsNode = valueClustersCluster["Tags"]["Tag"];
|
||||
for (auto valueClustersClusterTagsTag : allTagsNode)
|
||||
{
|
||||
|
||||
51
cassandra/src/model/MoveResourceGroupRequest.cc
Normal file
51
cassandra/src/model/MoveResourceGroupRequest.cc
Normal 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/cassandra/model/MoveResourceGroupRequest.h>
|
||||
|
||||
using AlibabaCloud::Cassandra::Model::MoveResourceGroupRequest;
|
||||
|
||||
MoveResourceGroupRequest::MoveResourceGroupRequest() :
|
||||
RpcServiceRequest("cassandra", "2019-01-01", "MoveResourceGroup")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
MoveResourceGroupRequest::~MoveResourceGroupRequest()
|
||||
{}
|
||||
|
||||
std::string MoveResourceGroupRequest::getClusterId()const
|
||||
{
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void MoveResourceGroupRequest::setClusterId(const std::string& clusterId)
|
||||
{
|
||||
clusterId_ = clusterId;
|
||||
setParameter("ClusterId", clusterId);
|
||||
}
|
||||
|
||||
std::string MoveResourceGroupRequest::getNewResourceGroupId()const
|
||||
{
|
||||
return newResourceGroupId_;
|
||||
}
|
||||
|
||||
void MoveResourceGroupRequest::setNewResourceGroupId(const std::string& newResourceGroupId)
|
||||
{
|
||||
newResourceGroupId_ = newResourceGroupId;
|
||||
setParameter("NewResourceGroupId", newResourceGroupId);
|
||||
}
|
||||
|
||||
44
cassandra/src/model/MoveResourceGroupResult.cc
Normal file
44
cassandra/src/model/MoveResourceGroupResult.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/cassandra/model/MoveResourceGroupResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Cassandra;
|
||||
using namespace AlibabaCloud::Cassandra::Model;
|
||||
|
||||
MoveResourceGroupResult::MoveResourceGroupResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
MoveResourceGroupResult::MoveResourceGroupResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
MoveResourceGroupResult::~MoveResourceGroupResult()
|
||||
{}
|
||||
|
||||
void MoveResourceGroupResult::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