Explorar el Código

RTC SDK Auto Released By renrang.yl,Version:1.20.1

Signed-off-by: yixiong.jxy <yixiong.jxy@alibaba-inc.com>
yixiong.jxy hace 8 años
padre
commit
7e24ec0ded

+ 4 - 0
CHANGELOG

@@ -1,3 +1,7 @@
+2018-07-25 Version: 1.20.1
+1, Add RemoveTerminals API.
+
+
 2018-07-13 Version: 1.20.0
 1, New APIs for batch executing commands in cluster: InvokeShellCommand, ListCommands, etc.
 2, New APIs for HybridCluster (link E-HPC with cluster in local IDC): CreateHybridCluster, etc.

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.20.0
+1.20.1

+ 4 - 0
rtc/CMakeLists.txt

@@ -55,6 +55,8 @@ set(rtc_public_header_model
 	include/alibabacloud/rtc/model/DescribeRealTimeRecordListResult.h
 	include/alibabacloud/rtc/model/StopAppRequest.h
 	include/alibabacloud/rtc/model/StopAppResult.h
+	include/alibabacloud/rtc/model/RemoveTerminalsRequest.h
+	include/alibabacloud/rtc/model/RemoveTerminalsResult.h
 	include/alibabacloud/rtc/model/DeleteConferenceRequest.h
 	include/alibabacloud/rtc/model/DeleteConferenceResult.h
 	include/alibabacloud/rtc/model/UpdateChannelRequest.h
@@ -100,6 +102,8 @@ set(rtc_src
 	src/model/DescribeRealTimeRecordListResult.cc
 	src/model/StopAppRequest.cc
 	src/model/StopAppResult.cc
+	src/model/RemoveTerminalsRequest.cc
+	src/model/RemoveTerminalsResult.cc
 	src/model/DeleteConferenceRequest.cc
 	src/model/DeleteConferenceResult.cc
 	src/model/UpdateChannelRequest.cc

+ 8 - 0
rtc/include/alibabacloud/rtc/RtcClient.h

@@ -56,6 +56,8 @@
 #include "model/DescribeRealTimeRecordListResult.h"
 #include "model/StopAppRequest.h"
 #include "model/StopAppResult.h"
+#include "model/RemoveTerminalsRequest.h"
+#include "model/RemoveTerminalsResult.h"
 #include "model/DeleteConferenceRequest.h"
 #include "model/DeleteConferenceResult.h"
 #include "model/UpdateChannelRequest.h"
@@ -124,6 +126,9 @@ namespace AlibabaCloud
 			typedef Outcome<Error, Model::StopAppResult> StopAppOutcome;
 			typedef std::future<StopAppOutcome> StopAppOutcomeCallable;
 			typedef std::function<void(const RtcClient*, const Model::StopAppRequest&, const StopAppOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> StopAppAsyncHandler;
+			typedef Outcome<Error, Model::RemoveTerminalsResult> RemoveTerminalsOutcome;
+			typedef std::future<RemoveTerminalsOutcome> RemoveTerminalsOutcomeCallable;
+			typedef std::function<void(const RtcClient*, const Model::RemoveTerminalsRequest&, const RemoveTerminalsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RemoveTerminalsAsyncHandler;
 			typedef Outcome<Error, Model::DeleteConferenceResult> DeleteConferenceOutcome;
 			typedef std::future<DeleteConferenceOutcome> DeleteConferenceOutcomeCallable;
 			typedef std::function<void(const RtcClient*, const Model::DeleteConferenceRequest&, const DeleteConferenceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteConferenceAsyncHandler;
@@ -192,6 +197,9 @@ namespace AlibabaCloud
 			StopAppOutcome stopApp(const Model::StopAppRequest &request)const;
 			void stopAppAsync(const Model::StopAppRequest& request, const StopAppAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			StopAppOutcomeCallable stopAppCallable(const Model::StopAppRequest& request) const;
+			RemoveTerminalsOutcome removeTerminals(const Model::RemoveTerminalsRequest &request)const;
+			void removeTerminalsAsync(const Model::RemoveTerminalsRequest& request, const RemoveTerminalsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
+			RemoveTerminalsOutcomeCallable removeTerminalsCallable(const Model::RemoveTerminalsRequest& request) const;
 			DeleteConferenceOutcome deleteConference(const Model::DeleteConferenceRequest &request)const;
 			void deleteConferenceAsync(const Model::DeleteConferenceRequest& request, const DeleteConferenceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			DeleteConferenceOutcomeCallable deleteConferenceCallable(const Model::DeleteConferenceRequest& request) const;

+ 117 - 0
rtc/include/alibabacloud/rtc/model/RemoveTerminalsRequest.h

@@ -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.
+ */
+
+#ifndef ALIBABACLOUD_RTC_MODEL_REMOVETERMINALSREQUEST_H_
+#define ALIBABACLOUD_RTC_MODEL_REMOVETERMINALSREQUEST_H_
+
+#include <string>
+#include <vector>
+#include <alibabacloud/core/RpcServiceRequest.h>
+#include <alibabacloud/rtc/RtcExport.h>
+
+namespace AlibabaCloud
+{
+	namespace Rtc
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_RTC_EXPORT RemoveTerminalsRequest : public RpcServiceRequest
+			{
+
+			public:
+				RemoveTerminalsRequest();
+				~RemoveTerminalsRequest();
+
+				long getCallerParentId()const;
+				void setCallerParentId(long callerParentId);
+				bool getProxy_original_security_transport()const;
+				void setProxy_original_security_transport(bool proxy_original_security_transport);
+				std::string getProxy_original_source_ip()const;
+				void setProxy_original_source_ip(const std::string& proxy_original_source_ip);
+				std::string getOwnerIdLoginEmail()const;
+				void setOwnerIdLoginEmail(const std::string& ownerIdLoginEmail);
+				std::string getCallerType()const;
+				void setCallerType(const std::string& callerType);
+				std::string getAccessKeyId()const;
+				void setAccessKeyId(const std::string& accessKeyId);
+				std::string getSecurityToken()const;
+				void setSecurityToken(const std::string& securityToken);
+				std::string getRequestContent()const;
+				void setRequestContent(const std::string& requestContent);
+				std::string getCallerBidEmail()const;
+				void setCallerBidEmail(const std::string& callerBidEmail);
+				std::vector<std::string> getTerminalIds()const;
+				void setTerminalIds(const std::vector<std::string>& terminalIds);
+				std::string getCallerUidEmail()const;
+				void setCallerUidEmail(const std::string& callerUidEmail);
+				long getCallerUid()const;
+				void setCallerUid(long callerUid);
+				std::string getApp_ip()const;
+				void setApp_ip(const std::string& app_ip);
+				std::string getPopProduct()const;
+				void setPopProduct(const std::string& popProduct);
+				std::string getProduct()const;
+				void setProduct(const std::string& product);
+				std::string getCallerBid()const;
+				void setCallerBid(const std::string& callerBid);
+				long getOwnerId()const;
+				void setOwnerId(long ownerId);
+				std::string getVersion()const;
+				void setVersion(const std::string& version);
+				bool getProxy_trust_transport_info()const;
+				void setProxy_trust_transport_info(bool proxy_trust_transport_info);
+				bool getAk_mfa_present()const;
+				void setAk_mfa_present(bool ak_mfa_present);
+				bool getSecurity_transport()const;
+				void setSecurity_transport(bool security_transport);
+				std::string getRequestId()const;
+				void setRequestId(const std::string& requestId);
+				std::string getAppId()const;
+				void setAppId(const std::string& appId);
+				std::string getChannelId()const;
+				void setChannelId(const std::string& channelId);
+
+            private:
+				long callerParentId_;
+				bool proxy_original_security_transport_;
+				std::string proxy_original_source_ip_;
+				std::string ownerIdLoginEmail_;
+				std::string callerType_;
+				std::string accessKeyId_;
+				std::string securityToken_;
+				std::string requestContent_;
+				std::string callerBidEmail_;
+				std::vector<std::string> terminalIds_;
+				std::string callerUidEmail_;
+				long callerUid_;
+				std::string app_ip_;
+				std::string popProduct_;
+				std::string product_;
+				std::string callerBid_;
+				long ownerId_;
+				std::string version_;
+				bool proxy_trust_transport_info_;
+				bool ak_mfa_present_;
+				bool security_transport_;
+				std::string requestId_;
+				std::string appId_;
+				std::string channelId_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_RTC_MODEL_REMOVETERMINALSREQUEST_H_

+ 57 - 0
rtc/include/alibabacloud/rtc/model/RemoveTerminalsResult.h

@@ -0,0 +1,57 @@
+/*
+ * 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_RTC_MODEL_REMOVETERMINALSRESULT_H_
+#define ALIBABACLOUD_RTC_MODEL_REMOVETERMINALSRESULT_H_
+
+#include <string>
+#include <vector>
+#include <utility>
+#include <alibabacloud/core/ServiceResult.h>
+#include <alibabacloud/rtc/RtcExport.h>
+
+namespace AlibabaCloud
+{
+	namespace Rtc
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_RTC_EXPORT RemoveTerminalsResult : public ServiceResult
+			{
+			public:
+				struct Terminal
+				{
+					std::string message;
+					std::string id;
+					int code;
+				};
+
+
+				RemoveTerminalsResult();
+				explicit RemoveTerminalsResult(const std::string &payload);
+				~RemoveTerminalsResult();
+				std::vector<Terminal> getTerminals()const;
+
+			protected:
+				void parse(const std::string &payload);
+			private:
+				std::vector<Terminal> terminals_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_RTC_MODEL_REMOVETERMINALSRESULT_H_

+ 36 - 0
rtc/src/RtcClient.cc

@@ -663,6 +663,42 @@ RtcClient::StopAppOutcomeCallable RtcClient::stopAppCallable(const StopAppReques
 	return task->get_future();
 }
 
+RtcClient::RemoveTerminalsOutcome RtcClient::removeTerminals(const RemoveTerminalsRequest &request) const
+{
+	auto endpointOutcome = endpointProvider_->getEndpoint();
+	if (!endpointOutcome.isSuccess())
+		return RemoveTerminalsOutcome(endpointOutcome.error());
+
+	auto outcome = makeRequest(endpointOutcome.result(), request);
+
+	if (outcome.isSuccess())
+		return RemoveTerminalsOutcome(RemoveTerminalsResult(outcome.result()));
+	else
+		return RemoveTerminalsOutcome(outcome.error());
+}
+
+void RtcClient::removeTerminalsAsync(const RemoveTerminalsRequest& request, const RemoveTerminalsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
+{
+	auto fn = [this, request, handler, context]()
+	{
+		handler(this, request, removeTerminals(request), context);
+	};
+
+	asyncExecute(new Runnable(fn));
+}
+
+RtcClient::RemoveTerminalsOutcomeCallable RtcClient::removeTerminalsCallable(const RemoveTerminalsRequest &request) const
+{
+	auto task = std::make_shared<std::packaged_task<RemoveTerminalsOutcome()>>(
+			[this, request]()
+			{
+			return this->removeTerminals(request);
+			});
+
+	asyncExecute(new Runnable([task]() { (*task)(); }));
+	return task->get_future();
+}
+
 RtcClient::DeleteConferenceOutcome RtcClient::deleteConference(const DeleteConferenceRequest &request) const
 {
 	auto endpointOutcome = endpointProvider_->getEndpoint();

+ 292 - 0
rtc/src/model/RemoveTerminalsRequest.cc

@@ -0,0 +1,292 @@
+/*
+ * 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/rtc/model/RemoveTerminalsRequest.h>
+
+using AlibabaCloud::Rtc::Model::RemoveTerminalsRequest;
+
+RemoveTerminalsRequest::RemoveTerminalsRequest() :
+	RpcServiceRequest("rtc", "2018-01-11", "RemoveTerminals")
+{}
+
+RemoveTerminalsRequest::~RemoveTerminalsRequest()
+{}
+
+long RemoveTerminalsRequest::getCallerParentId()const
+{
+	return callerParentId_;
+}
+
+void RemoveTerminalsRequest::setCallerParentId(long callerParentId)
+{
+	callerParentId_ = callerParentId;
+	setParameter("CallerParentId", std::to_string(callerParentId));
+}
+
+bool RemoveTerminalsRequest::getProxy_original_security_transport()const
+{
+	return proxy_original_security_transport_;
+}
+
+void RemoveTerminalsRequest::setProxy_original_security_transport(bool proxy_original_security_transport)
+{
+	proxy_original_security_transport_ = proxy_original_security_transport;
+	setParameter("Proxy_original_security_transport", std::to_string(proxy_original_security_transport));
+}
+
+std::string RemoveTerminalsRequest::getProxy_original_source_ip()const
+{
+	return proxy_original_source_ip_;
+}
+
+void RemoveTerminalsRequest::setProxy_original_source_ip(const std::string& proxy_original_source_ip)
+{
+	proxy_original_source_ip_ = proxy_original_source_ip;
+	setParameter("Proxy_original_source_ip", proxy_original_source_ip);
+}
+
+std::string RemoveTerminalsRequest::getOwnerIdLoginEmail()const
+{
+	return ownerIdLoginEmail_;
+}
+
+void RemoveTerminalsRequest::setOwnerIdLoginEmail(const std::string& ownerIdLoginEmail)
+{
+	ownerIdLoginEmail_ = ownerIdLoginEmail;
+	setParameter("OwnerIdLoginEmail", ownerIdLoginEmail);
+}
+
+std::string RemoveTerminalsRequest::getCallerType()const
+{
+	return callerType_;
+}
+
+void RemoveTerminalsRequest::setCallerType(const std::string& callerType)
+{
+	callerType_ = callerType;
+	setParameter("CallerType", callerType);
+}
+
+std::string RemoveTerminalsRequest::getAccessKeyId()const
+{
+	return accessKeyId_;
+}
+
+void RemoveTerminalsRequest::setAccessKeyId(const std::string& accessKeyId)
+{
+	accessKeyId_ = accessKeyId;
+	setParameter("AccessKeyId", accessKeyId);
+}
+
+std::string RemoveTerminalsRequest::getSecurityToken()const
+{
+	return securityToken_;
+}
+
+void RemoveTerminalsRequest::setSecurityToken(const std::string& securityToken)
+{
+	securityToken_ = securityToken;
+	setParameter("SecurityToken", securityToken);
+}
+
+std::string RemoveTerminalsRequest::getRequestContent()const
+{
+	return requestContent_;
+}
+
+void RemoveTerminalsRequest::setRequestContent(const std::string& requestContent)
+{
+	requestContent_ = requestContent;
+	setParameter("RequestContent", requestContent);
+}
+
+std::string RemoveTerminalsRequest::getCallerBidEmail()const
+{
+	return callerBidEmail_;
+}
+
+void RemoveTerminalsRequest::setCallerBidEmail(const std::string& callerBidEmail)
+{
+	callerBidEmail_ = callerBidEmail;
+	setParameter("CallerBidEmail", callerBidEmail);
+}
+
+std::vector<std::string> RemoveTerminalsRequest::getTerminalIds()const
+{
+	return terminalIds_;
+}
+
+void RemoveTerminalsRequest::setTerminalIds(const std::vector<std::string>& terminalIds)
+{
+	terminalIds_ = terminalIds;
+	for(int i = 0; i!= terminalIds.size(); i++)
+		setParameter("TerminalIds."+ std::to_string(i), terminalIds.at(i));
+}
+
+std::string RemoveTerminalsRequest::getCallerUidEmail()const
+{
+	return callerUidEmail_;
+}
+
+void RemoveTerminalsRequest::setCallerUidEmail(const std::string& callerUidEmail)
+{
+	callerUidEmail_ = callerUidEmail;
+	setParameter("CallerUidEmail", callerUidEmail);
+}
+
+long RemoveTerminalsRequest::getCallerUid()const
+{
+	return callerUid_;
+}
+
+void RemoveTerminalsRequest::setCallerUid(long callerUid)
+{
+	callerUid_ = callerUid;
+	setParameter("CallerUid", std::to_string(callerUid));
+}
+
+std::string RemoveTerminalsRequest::getApp_ip()const
+{
+	return app_ip_;
+}
+
+void RemoveTerminalsRequest::setApp_ip(const std::string& app_ip)
+{
+	app_ip_ = app_ip;
+	setParameter("App_ip", app_ip);
+}
+
+std::string RemoveTerminalsRequest::getPopProduct()const
+{
+	return popProduct_;
+}
+
+void RemoveTerminalsRequest::setPopProduct(const std::string& popProduct)
+{
+	popProduct_ = popProduct;
+	setParameter("PopProduct", popProduct);
+}
+
+std::string RemoveTerminalsRequest::getProduct()const
+{
+	return product_;
+}
+
+void RemoveTerminalsRequest::setProduct(const std::string& product)
+{
+	product_ = product;
+	setParameter("Product", product);
+}
+
+std::string RemoveTerminalsRequest::getCallerBid()const
+{
+	return callerBid_;
+}
+
+void RemoveTerminalsRequest::setCallerBid(const std::string& callerBid)
+{
+	callerBid_ = callerBid;
+	setParameter("CallerBid", callerBid);
+}
+
+long RemoveTerminalsRequest::getOwnerId()const
+{
+	return ownerId_;
+}
+
+void RemoveTerminalsRequest::setOwnerId(long ownerId)
+{
+	ownerId_ = ownerId;
+	setParameter("OwnerId", std::to_string(ownerId));
+}
+
+std::string RemoveTerminalsRequest::getVersion()const
+{
+	return version_;
+}
+
+void RemoveTerminalsRequest::setVersion(const std::string& version)
+{
+	version_ = version;
+	setParameter("Version", version);
+}
+
+bool RemoveTerminalsRequest::getProxy_trust_transport_info()const
+{
+	return proxy_trust_transport_info_;
+}
+
+void RemoveTerminalsRequest::setProxy_trust_transport_info(bool proxy_trust_transport_info)
+{
+	proxy_trust_transport_info_ = proxy_trust_transport_info;
+	setParameter("Proxy_trust_transport_info", std::to_string(proxy_trust_transport_info));
+}
+
+bool RemoveTerminalsRequest::getAk_mfa_present()const
+{
+	return ak_mfa_present_;
+}
+
+void RemoveTerminalsRequest::setAk_mfa_present(bool ak_mfa_present)
+{
+	ak_mfa_present_ = ak_mfa_present;
+	setParameter("Ak_mfa_present", std::to_string(ak_mfa_present));
+}
+
+bool RemoveTerminalsRequest::getSecurity_transport()const
+{
+	return security_transport_;
+}
+
+void RemoveTerminalsRequest::setSecurity_transport(bool security_transport)
+{
+	security_transport_ = security_transport;
+	setParameter("Security_transport", std::to_string(security_transport));
+}
+
+std::string RemoveTerminalsRequest::getRequestId()const
+{
+	return requestId_;
+}
+
+void RemoveTerminalsRequest::setRequestId(const std::string& requestId)
+{
+	requestId_ = requestId;
+	setParameter("RequestId", requestId);
+}
+
+std::string RemoveTerminalsRequest::getAppId()const
+{
+	return appId_;
+}
+
+void RemoveTerminalsRequest::setAppId(const std::string& appId)
+{
+	appId_ = appId;
+	setParameter("AppId", appId);
+}
+
+std::string RemoveTerminalsRequest::getChannelId()const
+{
+	return channelId_;
+}
+
+void RemoveTerminalsRequest::setChannelId(const std::string& channelId)
+{
+	channelId_ = channelId;
+	setParameter("ChannelId", channelId);
+}
+

+ 62 - 0
rtc/src/model/RemoveTerminalsResult.cc

@@ -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/rtc/model/RemoveTerminalsResult.h>
+#include <json/json.h>
+
+using namespace AlibabaCloud::Rtc;
+using namespace AlibabaCloud::Rtc::Model;
+
+RemoveTerminalsResult::RemoveTerminalsResult() :
+	ServiceResult()
+{}
+
+RemoveTerminalsResult::RemoveTerminalsResult(const std::string &payload) :
+	ServiceResult()
+{
+	parse(payload);
+}
+
+RemoveTerminalsResult::~RemoveTerminalsResult()
+{}
+
+void RemoveTerminalsResult::parse(const std::string &payload)
+{
+	Json::Reader reader;
+	Json::Value value;
+	reader.parse(payload, value);
+
+	setRequestId(value["RequestId"].asString());
+	auto allTerminals = value["Terminals"]["Terminal"];
+	for (auto value : allTerminals)
+	{
+		Terminal terminalsObject;
+		if(!value["Id"].isNull())
+			terminalsObject.id = value["Id"].asString();
+		if(!value["Code"].isNull())
+			terminalsObject.code = std::stoi(value["Code"].asString());
+		if(!value["Message"].isNull())
+			terminalsObject.message = value["Message"].asString();
+		terminals_.push_back(terminalsObject);
+	}
+
+}
+
+std::vector<RemoveTerminalsResult::Terminal> RemoveTerminalsResult::getTerminals()const
+{
+	return terminals_;
+}
+