sdk-team před 3 roky
rodič
revize
c2b3070859

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.36.1404
+1.36.1405

+ 4 - 0
live/CMakeLists.txt

@@ -45,6 +45,8 @@ set(live_public_header_model
 	include/alibabacloud/live/model/AddLiveAudioAuditConfigResult.h
 	include/alibabacloud/live/model/AddLiveAudioAuditConfigResult.h
 	include/alibabacloud/live/model/AddLiveAudioAuditNotifyConfigRequest.h
 	include/alibabacloud/live/model/AddLiveAudioAuditNotifyConfigRequest.h
 	include/alibabacloud/live/model/AddLiveAudioAuditNotifyConfigResult.h
 	include/alibabacloud/live/model/AddLiveAudioAuditNotifyConfigResult.h
+	include/alibabacloud/live/model/AddLiveCenterTransferRequest.h
+	include/alibabacloud/live/model/AddLiveCenterTransferResult.h
 	include/alibabacloud/live/model/AddLiveDetectNotifyConfigRequest.h
 	include/alibabacloud/live/model/AddLiveDetectNotifyConfigRequest.h
 	include/alibabacloud/live/model/AddLiveDetectNotifyConfigResult.h
 	include/alibabacloud/live/model/AddLiveDetectNotifyConfigResult.h
 	include/alibabacloud/live/model/AddLiveDomainRequest.h
 	include/alibabacloud/live/model/AddLiveDomainRequest.h
@@ -650,6 +652,8 @@ set(live_src
 	src/model/AddLiveAudioAuditConfigResult.cc
 	src/model/AddLiveAudioAuditConfigResult.cc
 	src/model/AddLiveAudioAuditNotifyConfigRequest.cc
 	src/model/AddLiveAudioAuditNotifyConfigRequest.cc
 	src/model/AddLiveAudioAuditNotifyConfigResult.cc
 	src/model/AddLiveAudioAuditNotifyConfigResult.cc
+	src/model/AddLiveCenterTransferRequest.cc
+	src/model/AddLiveCenterTransferResult.cc
 	src/model/AddLiveDetectNotifyConfigRequest.cc
 	src/model/AddLiveDetectNotifyConfigRequest.cc
 	src/model/AddLiveDetectNotifyConfigResult.cc
 	src/model/AddLiveDetectNotifyConfigResult.cc
 	src/model/AddLiveDomainRequest.cc
 	src/model/AddLiveDomainRequest.cc

+ 8 - 0
live/include/alibabacloud/live/LiveClient.h

@@ -46,6 +46,8 @@
 #include "model/AddLiveAudioAuditConfigResult.h"
 #include "model/AddLiveAudioAuditConfigResult.h"
 #include "model/AddLiveAudioAuditNotifyConfigRequest.h"
 #include "model/AddLiveAudioAuditNotifyConfigRequest.h"
 #include "model/AddLiveAudioAuditNotifyConfigResult.h"
 #include "model/AddLiveAudioAuditNotifyConfigResult.h"
+#include "model/AddLiveCenterTransferRequest.h"
+#include "model/AddLiveCenterTransferResult.h"
 #include "model/AddLiveDetectNotifyConfigRequest.h"
 #include "model/AddLiveDetectNotifyConfigRequest.h"
 #include "model/AddLiveDetectNotifyConfigResult.h"
 #include "model/AddLiveDetectNotifyConfigResult.h"
 #include "model/AddLiveDomainRequest.h"
 #include "model/AddLiveDomainRequest.h"
@@ -669,6 +671,9 @@ namespace AlibabaCloud
 			typedef Outcome<Error, Model::AddLiveAudioAuditNotifyConfigResult> AddLiveAudioAuditNotifyConfigOutcome;
 			typedef Outcome<Error, Model::AddLiveAudioAuditNotifyConfigResult> AddLiveAudioAuditNotifyConfigOutcome;
 			typedef std::future<AddLiveAudioAuditNotifyConfigOutcome> AddLiveAudioAuditNotifyConfigOutcomeCallable;
 			typedef std::future<AddLiveAudioAuditNotifyConfigOutcome> AddLiveAudioAuditNotifyConfigOutcomeCallable;
 			typedef std::function<void(const LiveClient*, const Model::AddLiveAudioAuditNotifyConfigRequest&, const AddLiveAudioAuditNotifyConfigOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AddLiveAudioAuditNotifyConfigAsyncHandler;
 			typedef std::function<void(const LiveClient*, const Model::AddLiveAudioAuditNotifyConfigRequest&, const AddLiveAudioAuditNotifyConfigOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AddLiveAudioAuditNotifyConfigAsyncHandler;
+			typedef Outcome<Error, Model::AddLiveCenterTransferResult> AddLiveCenterTransferOutcome;
+			typedef std::future<AddLiveCenterTransferOutcome> AddLiveCenterTransferOutcomeCallable;
+			typedef std::function<void(const LiveClient*, const Model::AddLiveCenterTransferRequest&, const AddLiveCenterTransferOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AddLiveCenterTransferAsyncHandler;
 			typedef Outcome<Error, Model::AddLiveDetectNotifyConfigResult> AddLiveDetectNotifyConfigOutcome;
 			typedef Outcome<Error, Model::AddLiveDetectNotifyConfigResult> AddLiveDetectNotifyConfigOutcome;
 			typedef std::future<AddLiveDetectNotifyConfigOutcome> AddLiveDetectNotifyConfigOutcomeCallable;
 			typedef std::future<AddLiveDetectNotifyConfigOutcome> AddLiveDetectNotifyConfigOutcomeCallable;
 			typedef std::function<void(const LiveClient*, const Model::AddLiveDetectNotifyConfigRequest&, const AddLiveDetectNotifyConfigOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AddLiveDetectNotifyConfigAsyncHandler;
 			typedef std::function<void(const LiveClient*, const Model::AddLiveDetectNotifyConfigRequest&, const AddLiveDetectNotifyConfigOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AddLiveDetectNotifyConfigAsyncHandler;
@@ -1577,6 +1582,9 @@ namespace AlibabaCloud
 			AddLiveAudioAuditNotifyConfigOutcome addLiveAudioAuditNotifyConfig(const Model::AddLiveAudioAuditNotifyConfigRequest &request)const;
 			AddLiveAudioAuditNotifyConfigOutcome addLiveAudioAuditNotifyConfig(const Model::AddLiveAudioAuditNotifyConfigRequest &request)const;
 			void addLiveAudioAuditNotifyConfigAsync(const Model::AddLiveAudioAuditNotifyConfigRequest& request, const AddLiveAudioAuditNotifyConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			void addLiveAudioAuditNotifyConfigAsync(const Model::AddLiveAudioAuditNotifyConfigRequest& request, const AddLiveAudioAuditNotifyConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			AddLiveAudioAuditNotifyConfigOutcomeCallable addLiveAudioAuditNotifyConfigCallable(const Model::AddLiveAudioAuditNotifyConfigRequest& request) const;
 			AddLiveAudioAuditNotifyConfigOutcomeCallable addLiveAudioAuditNotifyConfigCallable(const Model::AddLiveAudioAuditNotifyConfigRequest& request) const;
+			AddLiveCenterTransferOutcome addLiveCenterTransfer(const Model::AddLiveCenterTransferRequest &request)const;
+			void addLiveCenterTransferAsync(const Model::AddLiveCenterTransferRequest& request, const AddLiveCenterTransferAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
+			AddLiveCenterTransferOutcomeCallable addLiveCenterTransferCallable(const Model::AddLiveCenterTransferRequest& request) const;
 			AddLiveDetectNotifyConfigOutcome addLiveDetectNotifyConfig(const Model::AddLiveDetectNotifyConfigRequest &request)const;
 			AddLiveDetectNotifyConfigOutcome addLiveDetectNotifyConfig(const Model::AddLiveDetectNotifyConfigRequest &request)const;
 			void addLiveDetectNotifyConfigAsync(const Model::AddLiveDetectNotifyConfigRequest& request, const AddLiveDetectNotifyConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			void addLiveDetectNotifyConfigAsync(const Model::AddLiveDetectNotifyConfigRequest& request, const AddLiveDetectNotifyConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			AddLiveDetectNotifyConfigOutcomeCallable addLiveDetectNotifyConfigCallable(const Model::AddLiveDetectNotifyConfigRequest& request) const;
 			AddLiveDetectNotifyConfigOutcomeCallable addLiveDetectNotifyConfigCallable(const Model::AddLiveDetectNotifyConfigRequest& request) const;

+ 63 - 0
live/include/alibabacloud/live/model/AddLiveCenterTransferRequest.h

@@ -0,0 +1,63 @@
+/*
+ * 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_LIVE_MODEL_ADDLIVECENTERTRANSFERREQUEST_H_
+#define ALIBABACLOUD_LIVE_MODEL_ADDLIVECENTERTRANSFERREQUEST_H_
+
+#include <alibabacloud/live/LiveExport.h>
+#include <alibabacloud/core/RpcServiceRequest.h>
+#include <string>
+#include <vector>
+#include <map>
+
+namespace AlibabaCloud {
+namespace Live {
+namespace Model {
+class ALIBABACLOUD_LIVE_EXPORT AddLiveCenterTransferRequest : public RpcServiceRequest {
+public:
+	AddLiveCenterTransferRequest();
+	~AddLiveCenterTransferRequest();
+	std::string getTransferArgs() const;
+	void setTransferArgs(const std::string &transferArgs);
+	std::string getStartTime() const;
+	void setStartTime(const std::string &startTime);
+	std::string getAppName() const;
+	void setAppName(const std::string &appName);
+	std::string getStreamName() const;
+	void setStreamName(const std::string &streamName);
+	std::string getDstUrl() const;
+	void setDstUrl(const std::string &dstUrl);
+	std::string getDomainName() const;
+	void setDomainName(const std::string &domainName);
+	std::string getEndTime() const;
+	void setEndTime(const std::string &endTime);
+	long getOwnerId() const;
+	void setOwnerId(long ownerId);
+
+private:
+	std::string transferArgs_;
+	std::string startTime_;
+	std::string appName_;
+	std::string streamName_;
+	std::string dstUrl_;
+	std::string domainName_;
+	std::string endTime_;
+	long ownerId_;
+};
+} // namespace Model
+} // namespace Live
+} // namespace AlibabaCloud
+#endif // !ALIBABACLOUD_LIVE_MODEL_ADDLIVECENTERTRANSFERREQUEST_H_

+ 49 - 0
live/include/alibabacloud/live/model/AddLiveCenterTransferResult.h

@@ -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_LIVE_MODEL_ADDLIVECENTERTRANSFERRESULT_H_
+#define ALIBABACLOUD_LIVE_MODEL_ADDLIVECENTERTRANSFERRESULT_H_
+
+#include <string>
+#include <vector>
+#include <utility>
+#include <alibabacloud/core/ServiceResult.h>
+#include <alibabacloud/live/LiveExport.h>
+
+namespace AlibabaCloud
+{
+	namespace Live
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_LIVE_EXPORT AddLiveCenterTransferResult : public ServiceResult
+			{
+			public:
+
+
+				AddLiveCenterTransferResult();
+				explicit AddLiveCenterTransferResult(const std::string &payload);
+				~AddLiveCenterTransferResult();
+
+			protected:
+				void parse(const std::string &payload);
+			private:
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_LIVE_MODEL_ADDLIVECENTERTRANSFERRESULT_H_

+ 36 - 0
live/src/LiveClient.cc

@@ -483,6 +483,42 @@ LiveClient::AddLiveAudioAuditNotifyConfigOutcomeCallable LiveClient::addLiveAudi
 	return task->get_future();
 	return task->get_future();
 }
 }
 
 
+LiveClient::AddLiveCenterTransferOutcome LiveClient::addLiveCenterTransfer(const AddLiveCenterTransferRequest &request) const
+{
+	auto endpointOutcome = endpointProvider_->getEndpoint();
+	if (!endpointOutcome.isSuccess())
+		return AddLiveCenterTransferOutcome(endpointOutcome.error());
+
+	auto outcome = makeRequest(endpointOutcome.result(), request);
+
+	if (outcome.isSuccess())
+		return AddLiveCenterTransferOutcome(AddLiveCenterTransferResult(outcome.result()));
+	else
+		return AddLiveCenterTransferOutcome(outcome.error());
+}
+
+void LiveClient::addLiveCenterTransferAsync(const AddLiveCenterTransferRequest& request, const AddLiveCenterTransferAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
+{
+	auto fn = [this, request, handler, context]()
+	{
+		handler(this, request, addLiveCenterTransfer(request), context);
+	};
+
+	asyncExecute(new Runnable(fn));
+}
+
+LiveClient::AddLiveCenterTransferOutcomeCallable LiveClient::addLiveCenterTransferCallable(const AddLiveCenterTransferRequest &request) const
+{
+	auto task = std::make_shared<std::packaged_task<AddLiveCenterTransferOutcome()>>(
+			[this, request]()
+			{
+			return this->addLiveCenterTransfer(request);
+			});
+
+	asyncExecute(new Runnable([task]() { (*task)(); }));
+	return task->get_future();
+}
+
 LiveClient::AddLiveDetectNotifyConfigOutcome LiveClient::addLiveDetectNotifyConfig(const AddLiveDetectNotifyConfigRequest &request) const
 LiveClient::AddLiveDetectNotifyConfigOutcome LiveClient::addLiveDetectNotifyConfig(const AddLiveDetectNotifyConfigRequest &request) const
 {
 {
 	auto endpointOutcome = endpointProvider_->getEndpoint();
 	auto endpointOutcome = endpointProvider_->getEndpoint();

+ 99 - 0
live/src/model/AddLiveCenterTransferRequest.cc

@@ -0,0 +1,99 @@
+/*
+ * 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/live/model/AddLiveCenterTransferRequest.h>
+
+using AlibabaCloud::Live::Model::AddLiveCenterTransferRequest;
+
+AddLiveCenterTransferRequest::AddLiveCenterTransferRequest()
+    : RpcServiceRequest("live", "2016-11-01", "AddLiveCenterTransfer") {
+  setMethod(HttpRequest::Method::Post);
+}
+
+AddLiveCenterTransferRequest::~AddLiveCenterTransferRequest() {}
+
+std::string AddLiveCenterTransferRequest::getTransferArgs() const {
+  return transferArgs_;
+}
+
+void AddLiveCenterTransferRequest::setTransferArgs(const std::string &transferArgs) {
+  transferArgs_ = transferArgs;
+  setParameter(std::string("TransferArgs"), transferArgs);
+}
+
+std::string AddLiveCenterTransferRequest::getStartTime() const {
+  return startTime_;
+}
+
+void AddLiveCenterTransferRequest::setStartTime(const std::string &startTime) {
+  startTime_ = startTime;
+  setParameter(std::string("StartTime"), startTime);
+}
+
+std::string AddLiveCenterTransferRequest::getAppName() const {
+  return appName_;
+}
+
+void AddLiveCenterTransferRequest::setAppName(const std::string &appName) {
+  appName_ = appName;
+  setParameter(std::string("AppName"), appName);
+}
+
+std::string AddLiveCenterTransferRequest::getStreamName() const {
+  return streamName_;
+}
+
+void AddLiveCenterTransferRequest::setStreamName(const std::string &streamName) {
+  streamName_ = streamName;
+  setParameter(std::string("StreamName"), streamName);
+}
+
+std::string AddLiveCenterTransferRequest::getDstUrl() const {
+  return dstUrl_;
+}
+
+void AddLiveCenterTransferRequest::setDstUrl(const std::string &dstUrl) {
+  dstUrl_ = dstUrl;
+  setParameter(std::string("DstUrl"), dstUrl);
+}
+
+std::string AddLiveCenterTransferRequest::getDomainName() const {
+  return domainName_;
+}
+
+void AddLiveCenterTransferRequest::setDomainName(const std::string &domainName) {
+  domainName_ = domainName;
+  setParameter(std::string("DomainName"), domainName);
+}
+
+std::string AddLiveCenterTransferRequest::getEndTime() const {
+  return endTime_;
+}
+
+void AddLiveCenterTransferRequest::setEndTime(const std::string &endTime) {
+  endTime_ = endTime;
+  setParameter(std::string("EndTime"), endTime);
+}
+
+long AddLiveCenterTransferRequest::getOwnerId() const {
+  return ownerId_;
+}
+
+void AddLiveCenterTransferRequest::setOwnerId(long ownerId) {
+  ownerId_ = ownerId;
+  setParameter(std::string("OwnerId"), std::to_string(ownerId));
+}
+

+ 44 - 0
live/src/model/AddLiveCenterTransferResult.cc

@@ -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/live/model/AddLiveCenterTransferResult.h>
+#include <json/json.h>
+
+using namespace AlibabaCloud::Live;
+using namespace AlibabaCloud::Live::Model;
+
+AddLiveCenterTransferResult::AddLiveCenterTransferResult() :
+	ServiceResult()
+{}
+
+AddLiveCenterTransferResult::AddLiveCenterTransferResult(const std::string &payload) :
+	ServiceResult()
+{
+	parse(payload);
+}
+
+AddLiveCenterTransferResult::~AddLiveCenterTransferResult()
+{}
+
+void AddLiveCenterTransferResult::parse(const std::string &payload)
+{
+	Json::Reader reader;
+	Json::Value value;
+	reader.parse(payload, value);
+	setRequestId(value["RequestId"].asString());
+
+}
+