Przeglądaj źródła

Generated 2019-01-01 for Cassandra.

sdk-team 6 lat temu
rodzic
commit
32e4dafba9

+ 3 - 0
CHANGELOG

@@ -1,3 +1,6 @@
+2020-05-09 Version: 1.36.401
+- Generated 2019-01-01 for `Cassandra`.
+
 2020-05-09 Version: 1.36.400
 - VideoSearch deploy SDK.
 

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.36.400
+1.36.401

+ 4 - 0
cassandra/CMakeLists.txt

@@ -57,6 +57,8 @@ set(cassandra_public_header_model
 	include/alibabacloud/cassandra/model/DescribeClustersResult.h
 	include/alibabacloud/cassandra/model/DescribeContactPointsRequest.h
 	include/alibabacloud/cassandra/model/DescribeContactPointsResult.h
+	include/alibabacloud/cassandra/model/DescribeDataCenterRequest.h
+	include/alibabacloud/cassandra/model/DescribeDataCenterResult.h
 	include/alibabacloud/cassandra/model/DescribeDataCentersRequest.h
 	include/alibabacloud/cassandra/model/DescribeDataCentersResult.h
 	include/alibabacloud/cassandra/model/DescribeDeletedClustersRequest.h
@@ -160,6 +162,8 @@ set(cassandra_src
 	src/model/DescribeClustersResult.cc
 	src/model/DescribeContactPointsRequest.cc
 	src/model/DescribeContactPointsResult.cc
+	src/model/DescribeDataCenterRequest.cc
+	src/model/DescribeDataCenterResult.cc
 	src/model/DescribeDataCentersRequest.cc
 	src/model/DescribeDataCentersResult.cc
 	src/model/DescribeDeletedClustersRequest.cc

+ 8 - 0
cassandra/include/alibabacloud/cassandra/CassandraClient.h

@@ -58,6 +58,8 @@
 #include "model/DescribeClustersResult.h"
 #include "model/DescribeContactPointsRequest.h"
 #include "model/DescribeContactPointsResult.h"
+#include "model/DescribeDataCenterRequest.h"
+#include "model/DescribeDataCenterResult.h"
 #include "model/DescribeDataCentersRequest.h"
 #include "model/DescribeDataCentersResult.h"
 #include "model/DescribeDeletedClustersRequest.h"
@@ -185,6 +187,9 @@ namespace AlibabaCloud
 			typedef Outcome<Error, Model::DescribeContactPointsResult> DescribeContactPointsOutcome;
 			typedef std::future<DescribeContactPointsOutcome> DescribeContactPointsOutcomeCallable;
 			typedef std::function<void(const CassandraClient*, const Model::DescribeContactPointsRequest&, const DescribeContactPointsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeContactPointsAsyncHandler;
+			typedef Outcome<Error, Model::DescribeDataCenterResult> DescribeDataCenterOutcome;
+			typedef std::future<DescribeDataCenterOutcome> DescribeDataCenterOutcomeCallable;
+			typedef std::function<void(const CassandraClient*, const Model::DescribeDataCenterRequest&, const DescribeDataCenterOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeDataCenterAsyncHandler;
 			typedef Outcome<Error, Model::DescribeDataCentersResult> DescribeDataCentersOutcome;
 			typedef std::future<DescribeDataCentersOutcome> DescribeDataCentersOutcomeCallable;
 			typedef std::function<void(const CassandraClient*, const Model::DescribeDataCentersRequest&, const DescribeDataCentersOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeDataCentersAsyncHandler;
@@ -340,6 +345,9 @@ namespace AlibabaCloud
 			DescribeContactPointsOutcome describeContactPoints(const Model::DescribeContactPointsRequest &request)const;
 			void describeContactPointsAsync(const Model::DescribeContactPointsRequest& request, const DescribeContactPointsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			DescribeContactPointsOutcomeCallable describeContactPointsCallable(const Model::DescribeContactPointsRequest& request) const;
+			DescribeDataCenterOutcome describeDataCenter(const Model::DescribeDataCenterRequest &request)const;
+			void describeDataCenterAsync(const Model::DescribeDataCenterRequest& request, const DescribeDataCenterAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
+			DescribeDataCenterOutcomeCallable describeDataCenterCallable(const Model::DescribeDataCenterRequest& request) const;
 			DescribeDataCentersOutcome describeDataCenters(const Model::DescribeDataCentersRequest &request)const;
 			void describeDataCentersAsync(const Model::DescribeDataCentersRequest& request, const DescribeDataCentersAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			DescribeDataCentersOutcomeCallable describeDataCentersCallable(const Model::DescribeDataCentersRequest& request) const;

+ 51 - 0
cassandra/include/alibabacloud/cassandra/model/DescribeDataCenterRequest.h

@@ -0,0 +1,51 @@
+/*
+ * Copyright 2009-2017 Alibaba Cloud All rights reserved.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ALIBABACLOUD_CASSANDRA_MODEL_DESCRIBEDATACENTERREQUEST_H_
+#define ALIBABACLOUD_CASSANDRA_MODEL_DESCRIBEDATACENTERREQUEST_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 DescribeDataCenterRequest : public RpcServiceRequest
+			{
+
+			public:
+				DescribeDataCenterRequest();
+				~DescribeDataCenterRequest();
+
+				std::string getDataCenterId()const;
+				void setDataCenterId(const std::string& dataCenterId);
+				std::string getClusterId()const;
+				void setClusterId(const std::string& clusterId);
+
+            private:
+				std::string dataCenterId_;
+				std::string clusterId_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_CASSANDRA_MODEL_DESCRIBEDATACENTERREQUEST_H_

+ 83 - 0
cassandra/include/alibabacloud/cassandra/model/DescribeDataCenterResult.h

@@ -0,0 +1,83 @@
+/*
+ * 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_DESCRIBEDATACENTERRESULT_H_
+#define ALIBABACLOUD_CASSANDRA_MODEL_DESCRIBEDATACENTERRESULT_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 DescribeDataCenterResult : public ServiceResult
+			{
+			public:
+
+
+				DescribeDataCenterResult();
+				explicit DescribeDataCenterResult(const std::string &payload);
+				~DescribeDataCenterResult();
+				std::string getStatus()const;
+				std::string getDataCenterId()const;
+				std::string getCreatedTime()const;
+				std::string getCommodityInstance()const;
+				std::string getZoneId()const;
+				int getNodeCount()const;
+				std::string getClusterId()const;
+				std::string getPayType()const;
+				std::string getLockMode()const;
+				std::string getDataCenterName()const;
+				std::string getVswitchId()const;
+				std::string getDiskType()const;
+				std::string getVpcId()const;
+				int getDiskSize()const;
+				std::string getRegionId()const;
+				std::string getInstanceType()const;
+				std::string getExpireTime()const;
+
+			protected:
+				void parse(const std::string &payload);
+			private:
+				std::string status_;
+				std::string dataCenterId_;
+				std::string createdTime_;
+				std::string commodityInstance_;
+				std::string zoneId_;
+				int nodeCount_;
+				std::string clusterId_;
+				std::string payType_;
+				std::string lockMode_;
+				std::string dataCenterName_;
+				std::string vswitchId_;
+				std::string diskType_;
+				std::string vpcId_;
+				int diskSize_;
+				std::string regionId_;
+				std::string instanceType_;
+				std::string expireTime_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_CASSANDRA_MODEL_DESCRIBEDATACENTERRESULT_H_

+ 36 - 0
cassandra/src/CassandraClient.cc

@@ -699,6 +699,42 @@ CassandraClient::DescribeContactPointsOutcomeCallable CassandraClient::describeC
 	return task->get_future();
 }
 
+CassandraClient::DescribeDataCenterOutcome CassandraClient::describeDataCenter(const DescribeDataCenterRequest &request) const
+{
+	auto endpointOutcome = endpointProvider_->getEndpoint();
+	if (!endpointOutcome.isSuccess())
+		return DescribeDataCenterOutcome(endpointOutcome.error());
+
+	auto outcome = makeRequest(endpointOutcome.result(), request);
+
+	if (outcome.isSuccess())
+		return DescribeDataCenterOutcome(DescribeDataCenterResult(outcome.result()));
+	else
+		return DescribeDataCenterOutcome(outcome.error());
+}
+
+void CassandraClient::describeDataCenterAsync(const DescribeDataCenterRequest& request, const DescribeDataCenterAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
+{
+	auto fn = [this, request, handler, context]()
+	{
+		handler(this, request, describeDataCenter(request), context);
+	};
+
+	asyncExecute(new Runnable(fn));
+}
+
+CassandraClient::DescribeDataCenterOutcomeCallable CassandraClient::describeDataCenterCallable(const DescribeDataCenterRequest &request) const
+{
+	auto task = std::make_shared<std::packaged_task<DescribeDataCenterOutcome()>>(
+			[this, request]()
+			{
+			return this->describeDataCenter(request);
+			});
+
+	asyncExecute(new Runnable([task]() { (*task)(); }));
+	return task->get_future();
+}
+
 CassandraClient::DescribeDataCentersOutcome CassandraClient::describeDataCenters(const DescribeDataCentersRequest &request) const
 {
 	auto endpointOutcome = endpointProvider_->getEndpoint();

+ 51 - 0
cassandra/src/model/DescribeDataCenterRequest.cc

@@ -0,0 +1,51 @@
+/*
+ * Copyright 2009-2017 Alibaba Cloud All rights reserved.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <alibabacloud/cassandra/model/DescribeDataCenterRequest.h>
+
+using AlibabaCloud::Cassandra::Model::DescribeDataCenterRequest;
+
+DescribeDataCenterRequest::DescribeDataCenterRequest() :
+	RpcServiceRequest("cassandra", "2019-01-01", "DescribeDataCenter")
+{
+	setMethod(HttpRequest::Method::Post);
+}
+
+DescribeDataCenterRequest::~DescribeDataCenterRequest()
+{}
+
+std::string DescribeDataCenterRequest::getDataCenterId()const
+{
+	return dataCenterId_;
+}
+
+void DescribeDataCenterRequest::setDataCenterId(const std::string& dataCenterId)
+{
+	dataCenterId_ = dataCenterId;
+	setParameter("DataCenterId", dataCenterId);
+}
+
+std::string DescribeDataCenterRequest::getClusterId()const
+{
+	return clusterId_;
+}
+
+void DescribeDataCenterRequest::setClusterId(const std::string& clusterId)
+{
+	clusterId_ = clusterId;
+	setParameter("ClusterId", clusterId);
+}
+

+ 163 - 0
cassandra/src/model/DescribeDataCenterResult.cc

@@ -0,0 +1,163 @@
+/*
+ * 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/DescribeDataCenterResult.h>
+#include <json/json.h>
+
+using namespace AlibabaCloud::Cassandra;
+using namespace AlibabaCloud::Cassandra::Model;
+
+DescribeDataCenterResult::DescribeDataCenterResult() :
+	ServiceResult()
+{}
+
+DescribeDataCenterResult::DescribeDataCenterResult(const std::string &payload) :
+	ServiceResult()
+{
+	parse(payload);
+}
+
+DescribeDataCenterResult::~DescribeDataCenterResult()
+{}
+
+void DescribeDataCenterResult::parse(const std::string &payload)
+{
+	Json::Reader reader;
+	Json::Value value;
+	reader.parse(payload, value);
+	setRequestId(value["RequestId"].asString());
+	if(!value["DataCenterId"].isNull())
+		dataCenterId_ = value["DataCenterId"].asString();
+	if(!value["RegionId"].isNull())
+		regionId_ = value["RegionId"].asString();
+	if(!value["ZoneId"].isNull())
+		zoneId_ = value["ZoneId"].asString();
+	if(!value["ClusterId"].isNull())
+		clusterId_ = value["ClusterId"].asString();
+	if(!value["DataCenterName"].isNull())
+		dataCenterName_ = value["DataCenterName"].asString();
+	if(!value["Status"].isNull())
+		status_ = value["Status"].asString();
+	if(!value["CreatedTime"].isNull())
+		createdTime_ = value["CreatedTime"].asString();
+	if(!value["InstanceType"].isNull())
+		instanceType_ = value["InstanceType"].asString();
+	if(!value["NodeCount"].isNull())
+		nodeCount_ = std::stoi(value["NodeCount"].asString());
+	if(!value["DiskType"].isNull())
+		diskType_ = value["DiskType"].asString();
+	if(!value["DiskSize"].isNull())
+		diskSize_ = std::stoi(value["DiskSize"].asString());
+	if(!value["VpcId"].isNull())
+		vpcId_ = value["VpcId"].asString();
+	if(!value["VswitchId"].isNull())
+		vswitchId_ = value["VswitchId"].asString();
+	if(!value["PayType"].isNull())
+		payType_ = value["PayType"].asString();
+	if(!value["CommodityInstance"].isNull())
+		commodityInstance_ = value["CommodityInstance"].asString();
+	if(!value["ExpireTime"].isNull())
+		expireTime_ = value["ExpireTime"].asString();
+	if(!value["LockMode"].isNull())
+		lockMode_ = value["LockMode"].asString();
+
+}
+
+std::string DescribeDataCenterResult::getStatus()const
+{
+	return status_;
+}
+
+std::string DescribeDataCenterResult::getDataCenterId()const
+{
+	return dataCenterId_;
+}
+
+std::string DescribeDataCenterResult::getCreatedTime()const
+{
+	return createdTime_;
+}
+
+std::string DescribeDataCenterResult::getCommodityInstance()const
+{
+	return commodityInstance_;
+}
+
+std::string DescribeDataCenterResult::getZoneId()const
+{
+	return zoneId_;
+}
+
+int DescribeDataCenterResult::getNodeCount()const
+{
+	return nodeCount_;
+}
+
+std::string DescribeDataCenterResult::getClusterId()const
+{
+	return clusterId_;
+}
+
+std::string DescribeDataCenterResult::getPayType()const
+{
+	return payType_;
+}
+
+std::string DescribeDataCenterResult::getLockMode()const
+{
+	return lockMode_;
+}
+
+std::string DescribeDataCenterResult::getDataCenterName()const
+{
+	return dataCenterName_;
+}
+
+std::string DescribeDataCenterResult::getVswitchId()const
+{
+	return vswitchId_;
+}
+
+std::string DescribeDataCenterResult::getDiskType()const
+{
+	return diskType_;
+}
+
+std::string DescribeDataCenterResult::getVpcId()const
+{
+	return vpcId_;
+}
+
+int DescribeDataCenterResult::getDiskSize()const
+{
+	return diskSize_;
+}
+
+std::string DescribeDataCenterResult::getRegionId()const
+{
+	return regionId_;
+}
+
+std::string DescribeDataCenterResult::getInstanceType()const
+{
+	return instanceType_;
+}
+
+std::string DescribeDataCenterResult::getExpireTime()const
+{
+	return expireTime_;
+}
+