Generated 2019-01-01 for Cassandra.

This commit is contained in:
sdk-team
2021-07-08 06:14:43 +00:00
parent 34d72f2b3b
commit 97c5e2c422
21 changed files with 309 additions and 1 deletions

View File

@@ -1,3 +1,6 @@
2021-07-08 Version: 1.36.814
- Generated 2019-01-01 for `Cassandra`.
2021-07-08 Version: 1.36.813
- Support APP auth.

View File

@@ -1 +1 @@
1.36.813
1.36.814

View File

@@ -109,6 +109,8 @@ set(cassandra_public_header_model
include/alibabacloud/cassandra/model/ModifyParameterResult.h
include/alibabacloud/cassandra/model/ModifySecurityGroupsRequest.h
include/alibabacloud/cassandra/model/ModifySecurityGroupsResult.h
include/alibabacloud/cassandra/model/MoveResourceGroupRequest.h
include/alibabacloud/cassandra/model/MoveResourceGroupResult.h
include/alibabacloud/cassandra/model/PurgeClusterRequest.h
include/alibabacloud/cassandra/model/PurgeClusterResult.h
include/alibabacloud/cassandra/model/RebootClusterRequest.h
@@ -216,6 +218,8 @@ set(cassandra_src
src/model/ModifyParameterResult.cc
src/model/ModifySecurityGroupsRequest.cc
src/model/ModifySecurityGroupsResult.cc
src/model/MoveResourceGroupRequest.cc
src/model/MoveResourceGroupResult.cc
src/model/PurgeClusterRequest.cc
src/model/PurgeClusterResult.cc
src/model/RebootClusterRequest.cc

View File

@@ -110,6 +110,8 @@
#include "model/ModifyParameterResult.h"
#include "model/ModifySecurityGroupsRequest.h"
#include "model/ModifySecurityGroupsResult.h"
#include "model/MoveResourceGroupRequest.h"
#include "model/MoveResourceGroupResult.h"
#include "model/PurgeClusterRequest.h"
#include "model/PurgeClusterResult.h"
#include "model/RebootClusterRequest.h"
@@ -267,6 +269,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::ModifySecurityGroupsResult> ModifySecurityGroupsOutcome;
typedef std::future<ModifySecurityGroupsOutcome> ModifySecurityGroupsOutcomeCallable;
typedef std::function<void(const CassandraClient*, const Model::ModifySecurityGroupsRequest&, const ModifySecurityGroupsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ModifySecurityGroupsAsyncHandler;
typedef Outcome<Error, Model::MoveResourceGroupResult> MoveResourceGroupOutcome;
typedef std::future<MoveResourceGroupOutcome> MoveResourceGroupOutcomeCallable;
typedef std::function<void(const CassandraClient*, const Model::MoveResourceGroupRequest&, const MoveResourceGroupOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MoveResourceGroupAsyncHandler;
typedef Outcome<Error, Model::PurgeClusterResult> PurgeClusterOutcome;
typedef std::future<PurgeClusterOutcome> PurgeClusterOutcomeCallable;
typedef std::function<void(const CassandraClient*, const Model::PurgeClusterRequest&, const PurgeClusterOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> PurgeClusterAsyncHandler;
@@ -428,6 +433,9 @@ namespace AlibabaCloud
ModifySecurityGroupsOutcome modifySecurityGroups(const Model::ModifySecurityGroupsRequest &request)const;
void modifySecurityGroupsAsync(const Model::ModifySecurityGroupsRequest& request, const ModifySecurityGroupsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ModifySecurityGroupsOutcomeCallable modifySecurityGroupsCallable(const Model::ModifySecurityGroupsRequest& request) const;
MoveResourceGroupOutcome moveResourceGroup(const Model::MoveResourceGroupRequest &request)const;
void moveResourceGroupAsync(const Model::MoveResourceGroupRequest& request, const MoveResourceGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
MoveResourceGroupOutcomeCallable moveResourceGroupCallable(const Model::MoveResourceGroupRequest& request) const;
PurgeClusterOutcome purgeCluster(const Model::PurgeClusterRequest &request)const;
void purgeClusterAsync(const Model::PurgeClusterRequest& request, const PurgeClusterAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
PurgeClusterOutcomeCallable purgeClusterCallable(const Model::PurgeClusterRequest& request) const;

View File

@@ -35,12 +35,15 @@ namespace AlibabaCloud
AllocatePublicContactPointsRequest();
~AllocatePublicContactPointsRequest();
std::string getClientToken()const;
void setClientToken(const std::string& clientToken);
std::string getDataCenterId()const;
void setDataCenterId(const std::string& dataCenterId);
std::string getClusterId()const;
void setClusterId(const std::string& clusterId);
private:
std::string clientToken_;
std::string dataCenterId_;
std::string clusterId_;

View File

@@ -35,6 +35,8 @@ namespace AlibabaCloud
CreateBackupPlanRequest();
~CreateBackupPlanRequest();
std::string getClientToken()const;
void setClientToken(const std::string& clientToken);
int getRetentionPeriod()const;
void setRetentionPeriod(int retentionPeriod);
std::string getDataCenterId()const;
@@ -49,6 +51,7 @@ namespace AlibabaCloud
void setBackupPeriod(const std::string& backupPeriod);
private:
std::string clientToken_;
int retentionPeriod_;
std::string dataCenterId_;
bool active_;

View File

@@ -39,6 +39,8 @@ namespace AlibabaCloud
void setClientToken(const std::string& clientToken);
std::string getClusterName()const;
void setClusterName(const std::string& clusterName);
std::string getResourceGroupId()const;
void setResourceGroupId(const std::string& resourceGroupId);
std::string getPassword()const;
void setPassword(const std::string& password);
std::string getRegionId()const;
@@ -75,6 +77,7 @@ namespace AlibabaCloud
private:
std::string clientToken_;
std::string clusterName_;
std::string resourceGroupId_;
std::string password_;
std::string regionId_;
std::string instanceType_;

View File

@@ -43,6 +43,7 @@ namespace AlibabaCloud
std::string majorVersion;
int autoRenewPeriod;
std::string createdTime;
std::string resourceGroupId;
std::string clusterId;
std::string minorVersion;
std::string payType;

View File

@@ -45,6 +45,8 @@ namespace AlibabaCloud
void setClusterName(const std::string& clusterName);
int getPageNumber()const;
void setPageNumber(int pageNumber);
std::string getResourceGroupId()const;
void setResourceGroupId(const std::string& resourceGroupId);
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
int getPageSize()const;
@@ -55,6 +57,7 @@ namespace AlibabaCloud
private:
std::string clusterName_;
int pageNumber_;
std::string resourceGroupId_;
std::string regionId_;
int pageSize_;
std::vector<Tag> tag_;

View File

@@ -43,6 +43,7 @@ namespace AlibabaCloud
std::string majorVersion;
int autoRenewPeriod;
std::string createdTime;
std::string resourceGroupId;
std::string clusterId;
std::string minorVersion;
std::string payType;

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.
*/
#ifndef ALIBABACLOUD_CASSANDRA_MODEL_MOVERESOURCEGROUPREQUEST_H_
#define ALIBABACLOUD_CASSANDRA_MODEL_MOVERESOURCEGROUPREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/cassandra/CassandraExport.h>
namespace AlibabaCloud
{
namespace Cassandra
{
namespace Model
{
class ALIBABACLOUD_CASSANDRA_EXPORT MoveResourceGroupRequest : public RpcServiceRequest
{
public:
MoveResourceGroupRequest();
~MoveResourceGroupRequest();
std::string getClusterId()const;
void setClusterId(const std::string& clusterId);
std::string getNewResourceGroupId()const;
void setNewResourceGroupId(const std::string& newResourceGroupId);
private:
std::string clusterId_;
std::string newResourceGroupId_;
};
}
}
}
#endif // !ALIBABACLOUD_CASSANDRA_MODEL_MOVERESOURCEGROUPREQUEST_H_

View File

@@ -0,0 +1,49 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_CASSANDRA_MODEL_MOVERESOURCEGROUPRESULT_H_
#define ALIBABACLOUD_CASSANDRA_MODEL_MOVERESOURCEGROUPRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/cassandra/CassandraExport.h>
namespace AlibabaCloud
{
namespace Cassandra
{
namespace Model
{
class ALIBABACLOUD_CASSANDRA_EXPORT MoveResourceGroupResult : public ServiceResult
{
public:
MoveResourceGroupResult();
explicit MoveResourceGroupResult(const std::string &payload);
~MoveResourceGroupResult();
protected:
void parse(const std::string &payload);
private:
};
}
}
}
#endif // !ALIBABACLOUD_CASSANDRA_MODEL_MOVERESOURCEGROUPRESULT_H_

View File

@@ -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();

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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)
{

View File

@@ -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_;

View File

@@ -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)
{

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/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);
}

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/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());
}