Prechádzať zdrojové kódy

Update to support new apis.

sdk-team 2 rokov pred
rodič
commit
3177214fec

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.36.1904
+1.36.1905

+ 4 - 0
live/CMakeLists.txt

@@ -287,6 +287,8 @@ set(live_public_header_model
 	include/alibabacloud/live/model/DescribeLiveAudioAuditNotifyConfigResult.h
 	include/alibabacloud/live/model/DescribeLiveCdnDiagnoseInfoRequest.h
 	include/alibabacloud/live/model/DescribeLiveCdnDiagnoseInfoResult.h
+	include/alibabacloud/live/model/DescribeLiveCenterStreamRateDataRequest.h
+	include/alibabacloud/live/model/DescribeLiveCenterStreamRateDataResult.h
 	include/alibabacloud/live/model/DescribeLiveCenterTransferRequest.h
 	include/alibabacloud/live/model/DescribeLiveCenterTransferResult.h
 	include/alibabacloud/live/model/DescribeLiveCertificateDetailRequest.h
@@ -1076,6 +1078,8 @@ set(live_src
 	src/model/DescribeLiveAudioAuditNotifyConfigResult.cc
 	src/model/DescribeLiveCdnDiagnoseInfoRequest.cc
 	src/model/DescribeLiveCdnDiagnoseInfoResult.cc
+	src/model/DescribeLiveCenterStreamRateDataRequest.cc
+	src/model/DescribeLiveCenterStreamRateDataResult.cc
 	src/model/DescribeLiveCenterTransferRequest.cc
 	src/model/DescribeLiveCenterTransferResult.cc
 	src/model/DescribeLiveCertificateDetailRequest.cc

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

@@ -288,6 +288,8 @@
 #include "model/DescribeLiveAudioAuditNotifyConfigResult.h"
 #include "model/DescribeLiveCdnDiagnoseInfoRequest.h"
 #include "model/DescribeLiveCdnDiagnoseInfoResult.h"
+#include "model/DescribeLiveCenterStreamRateDataRequest.h"
+#include "model/DescribeLiveCenterStreamRateDataResult.h"
 #include "model/DescribeLiveCenterTransferRequest.h"
 #include "model/DescribeLiveCenterTransferResult.h"
 #include "model/DescribeLiveCertificateDetailRequest.h"
@@ -1216,6 +1218,9 @@ namespace AlibabaCloud
 			typedef Outcome<Error, Model::DescribeLiveCdnDiagnoseInfoResult> DescribeLiveCdnDiagnoseInfoOutcome;
 			typedef std::future<DescribeLiveCdnDiagnoseInfoOutcome> DescribeLiveCdnDiagnoseInfoOutcomeCallable;
 			typedef std::function<void(const LiveClient*, const Model::DescribeLiveCdnDiagnoseInfoRequest&, const DescribeLiveCdnDiagnoseInfoOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeLiveCdnDiagnoseInfoAsyncHandler;
+			typedef Outcome<Error, Model::DescribeLiveCenterStreamRateDataResult> DescribeLiveCenterStreamRateDataOutcome;
+			typedef std::future<DescribeLiveCenterStreamRateDataOutcome> DescribeLiveCenterStreamRateDataOutcomeCallable;
+			typedef std::function<void(const LiveClient*, const Model::DescribeLiveCenterStreamRateDataRequest&, const DescribeLiveCenterStreamRateDataOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeLiveCenterStreamRateDataAsyncHandler;
 			typedef Outcome<Error, Model::DescribeLiveCenterTransferResult> DescribeLiveCenterTransferOutcome;
 			typedef std::future<DescribeLiveCenterTransferOutcome> DescribeLiveCenterTransferOutcomeCallable;
 			typedef std::function<void(const LiveClient*, const Model::DescribeLiveCenterTransferRequest&, const DescribeLiveCenterTransferOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeLiveCenterTransferAsyncHandler;
@@ -2400,6 +2405,9 @@ namespace AlibabaCloud
 			DescribeLiveCdnDiagnoseInfoOutcome describeLiveCdnDiagnoseInfo(const Model::DescribeLiveCdnDiagnoseInfoRequest &request)const;
 			void describeLiveCdnDiagnoseInfoAsync(const Model::DescribeLiveCdnDiagnoseInfoRequest& request, const DescribeLiveCdnDiagnoseInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			DescribeLiveCdnDiagnoseInfoOutcomeCallable describeLiveCdnDiagnoseInfoCallable(const Model::DescribeLiveCdnDiagnoseInfoRequest& request) const;
+			DescribeLiveCenterStreamRateDataOutcome describeLiveCenterStreamRateData(const Model::DescribeLiveCenterStreamRateDataRequest &request)const;
+			void describeLiveCenterStreamRateDataAsync(const Model::DescribeLiveCenterStreamRateDataRequest& request, const DescribeLiveCenterStreamRateDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
+			DescribeLiveCenterStreamRateDataOutcomeCallable describeLiveCenterStreamRateDataCallable(const Model::DescribeLiveCenterStreamRateDataRequest& request) const;
 			DescribeLiveCenterTransferOutcome describeLiveCenterTransfer(const Model::DescribeLiveCenterTransferRequest &request)const;
 			void describeLiveCenterTransferAsync(const Model::DescribeLiveCenterTransferRequest& request, const DescribeLiveCenterTransferAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			DescribeLiveCenterTransferOutcomeCallable describeLiveCenterTransferCallable(const Model::DescribeLiveCenterTransferRequest& request) const;

+ 54 - 0
live/include/alibabacloud/live/model/DescribeLiveCenterStreamRateDataRequest.h

@@ -0,0 +1,54 @@
+/*
+ * 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_DESCRIBELIVECENTERSTREAMRATEDATAREQUEST_H_
+#define ALIBABACLOUD_LIVE_MODEL_DESCRIBELIVECENTERSTREAMRATEDATAREQUEST_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 DescribeLiveCenterStreamRateDataRequest : public RpcServiceRequest {
+public:
+	DescribeLiveCenterStreamRateDataRequest();
+	~DescribeLiveCenterStreamRateDataRequest();
+	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 getDomainName() const;
+	void setDomainName(const std::string &domainName);
+	std::string getEndTime() const;
+	void setEndTime(const std::string &endTime);
+
+private:
+	std::string startTime_;
+	std::string appName_;
+	std::string streamName_;
+	std::string domainName_;
+	std::string endTime_;
+};
+} // namespace Model
+} // namespace Live
+} // namespace AlibabaCloud
+#endif // !ALIBABACLOUD_LIVE_MODEL_DESCRIBELIVECENTERSTREAMRATEDATAREQUEST_H_

+ 59 - 0
live/include/alibabacloud/live/model/DescribeLiveCenterStreamRateDataResult.h

@@ -0,0 +1,59 @@
+/*
+ * 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_DESCRIBELIVECENTERSTREAMRATEDATARESULT_H_
+#define ALIBABACLOUD_LIVE_MODEL_DESCRIBELIVECENTERSTREAMRATEDATARESULT_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 DescribeLiveCenterStreamRateDataResult : public ServiceResult
+			{
+			public:
+				struct Data
+				{
+					std::string videoFps;
+					std::string audioFps;
+					std::string time;
+					std::string audioRate;
+					std::string videoRate;
+				};
+
+
+				DescribeLiveCenterStreamRateDataResult();
+				explicit DescribeLiveCenterStreamRateDataResult(const std::string &payload);
+				~DescribeLiveCenterStreamRateDataResult();
+				std::vector<Data> getRateDatas()const;
+
+			protected:
+				void parse(const std::string &payload);
+			private:
+				std::vector<Data> rateDatas_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_LIVE_MODEL_DESCRIBELIVECENTERSTREAMRATEDATARESULT_H_

+ 16 - 0
live/include/alibabacloud/live/model/ModifyLiveMessageUserInfoResult.h

@@ -32,15 +32,31 @@ namespace AlibabaCloud
 			class ALIBABACLOUD_LIVE_EXPORT ModifyLiveMessageUserInfoResult : public ServiceResult
 			{
 			public:
+				struct SuccessGroups
+				{
+					bool success;
+					std::string groupId;
+				};
+				struct FailGroups
+				{
+					int code;
+					bool success;
+					std::string reason;
+					std::string groupId;
+				};
 
 
 				ModifyLiveMessageUserInfoResult();
 				explicit ModifyLiveMessageUserInfoResult(const std::string &payload);
 				~ModifyLiveMessageUserInfoResult();
+				std::vector<SuccessGroups> getSuccessList()const;
+				std::vector<FailGroups> getFailList()const;
 
 			protected:
 				void parse(const std::string &payload);
 			private:
+				std::vector<SuccessGroups> successList_;
+				std::vector<FailGroups> failList_;
 
 			};
 		}

+ 36 - 0
live/src/LiveClient.cc

@@ -4839,6 +4839,42 @@ LiveClient::DescribeLiveCdnDiagnoseInfoOutcomeCallable LiveClient::describeLiveC
 	return task->get_future();
 }
 
+LiveClient::DescribeLiveCenterStreamRateDataOutcome LiveClient::describeLiveCenterStreamRateData(const DescribeLiveCenterStreamRateDataRequest &request) const
+{
+	auto endpointOutcome = endpointProvider_->getEndpoint();
+	if (!endpointOutcome.isSuccess())
+		return DescribeLiveCenterStreamRateDataOutcome(endpointOutcome.error());
+
+	auto outcome = makeRequest(endpointOutcome.result(), request);
+
+	if (outcome.isSuccess())
+		return DescribeLiveCenterStreamRateDataOutcome(DescribeLiveCenterStreamRateDataResult(outcome.result()));
+	else
+		return DescribeLiveCenterStreamRateDataOutcome(outcome.error());
+}
+
+void LiveClient::describeLiveCenterStreamRateDataAsync(const DescribeLiveCenterStreamRateDataRequest& request, const DescribeLiveCenterStreamRateDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
+{
+	auto fn = [this, request, handler, context]()
+	{
+		handler(this, request, describeLiveCenterStreamRateData(request), context);
+	};
+
+	asyncExecute(new Runnable(fn));
+}
+
+LiveClient::DescribeLiveCenterStreamRateDataOutcomeCallable LiveClient::describeLiveCenterStreamRateDataCallable(const DescribeLiveCenterStreamRateDataRequest &request) const
+{
+	auto task = std::make_shared<std::packaged_task<DescribeLiveCenterStreamRateDataOutcome()>>(
+			[this, request]()
+			{
+			return this->describeLiveCenterStreamRateData(request);
+			});
+
+	asyncExecute(new Runnable([task]() { (*task)(); }));
+	return task->get_future();
+}
+
 LiveClient::DescribeLiveCenterTransferOutcome LiveClient::describeLiveCenterTransfer(const DescribeLiveCenterTransferRequest &request) const
 {
 	auto endpointOutcome = endpointProvider_->getEndpoint();

+ 72 - 0
live/src/model/DescribeLiveCenterStreamRateDataRequest.cc

@@ -0,0 +1,72 @@
+/*
+ * 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/DescribeLiveCenterStreamRateDataRequest.h>
+
+using AlibabaCloud::Live::Model::DescribeLiveCenterStreamRateDataRequest;
+
+DescribeLiveCenterStreamRateDataRequest::DescribeLiveCenterStreamRateDataRequest()
+    : RpcServiceRequest("live", "2016-11-01", "DescribeLiveCenterStreamRateData") {
+  setMethod(HttpRequest::Method::Post);
+}
+
+DescribeLiveCenterStreamRateDataRequest::~DescribeLiveCenterStreamRateDataRequest() {}
+
+std::string DescribeLiveCenterStreamRateDataRequest::getStartTime() const {
+  return startTime_;
+}
+
+void DescribeLiveCenterStreamRateDataRequest::setStartTime(const std::string &startTime) {
+  startTime_ = startTime;
+  setParameter(std::string("StartTime"), startTime);
+}
+
+std::string DescribeLiveCenterStreamRateDataRequest::getAppName() const {
+  return appName_;
+}
+
+void DescribeLiveCenterStreamRateDataRequest::setAppName(const std::string &appName) {
+  appName_ = appName;
+  setParameter(std::string("AppName"), appName);
+}
+
+std::string DescribeLiveCenterStreamRateDataRequest::getStreamName() const {
+  return streamName_;
+}
+
+void DescribeLiveCenterStreamRateDataRequest::setStreamName(const std::string &streamName) {
+  streamName_ = streamName;
+  setParameter(std::string("StreamName"), streamName);
+}
+
+std::string DescribeLiveCenterStreamRateDataRequest::getDomainName() const {
+  return domainName_;
+}
+
+void DescribeLiveCenterStreamRateDataRequest::setDomainName(const std::string &domainName) {
+  domainName_ = domainName;
+  setParameter(std::string("DomainName"), domainName);
+}
+
+std::string DescribeLiveCenterStreamRateDataRequest::getEndTime() const {
+  return endTime_;
+}
+
+void DescribeLiveCenterStreamRateDataRequest::setEndTime(const std::string &endTime) {
+  endTime_ = endTime;
+  setParameter(std::string("EndTime"), endTime);
+}
+

+ 65 - 0
live/src/model/DescribeLiveCenterStreamRateDataResult.cc

@@ -0,0 +1,65 @@
+/*
+ * 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/DescribeLiveCenterStreamRateDataResult.h>
+#include <json/json.h>
+
+using namespace AlibabaCloud::Live;
+using namespace AlibabaCloud::Live::Model;
+
+DescribeLiveCenterStreamRateDataResult::DescribeLiveCenterStreamRateDataResult() :
+	ServiceResult()
+{}
+
+DescribeLiveCenterStreamRateDataResult::DescribeLiveCenterStreamRateDataResult(const std::string &payload) :
+	ServiceResult()
+{
+	parse(payload);
+}
+
+DescribeLiveCenterStreamRateDataResult::~DescribeLiveCenterStreamRateDataResult()
+{}
+
+void DescribeLiveCenterStreamRateDataResult::parse(const std::string &payload)
+{
+	Json::Reader reader;
+	Json::Value value;
+	reader.parse(payload, value);
+	setRequestId(value["RequestId"].asString());
+	auto allRateDatasNode = value["RateDatas"]["Data"];
+	for (auto valueRateDatasData : allRateDatasNode)
+	{
+		Data rateDatasObject;
+		if(!valueRateDatasData["VideoFps"].isNull())
+			rateDatasObject.videoFps = valueRateDatasData["VideoFps"].asString();
+		if(!valueRateDatasData["VideoRate"].isNull())
+			rateDatasObject.videoRate = valueRateDatasData["VideoRate"].asString();
+		if(!valueRateDatasData["AudioFps"].isNull())
+			rateDatasObject.audioFps = valueRateDatasData["AudioFps"].asString();
+		if(!valueRateDatasData["AudioRate"].isNull())
+			rateDatasObject.audioRate = valueRateDatasData["AudioRate"].asString();
+		if(!valueRateDatasData["Time"].isNull())
+			rateDatasObject.time = valueRateDatasData["Time"].asString();
+		rateDatas_.push_back(rateDatasObject);
+	}
+
+}
+
+std::vector<DescribeLiveCenterStreamRateDataResult::Data> DescribeLiveCenterStreamRateDataResult::getRateDatas()const
+{
+	return rateDatas_;
+}
+

+ 34 - 0
live/src/model/ModifyLiveMessageUserInfoResult.cc

@@ -39,6 +39,40 @@ void ModifyLiveMessageUserInfoResult::parse(const std::string &payload)
 	Json::Value value;
 	reader.parse(payload, value);
 	setRequestId(value["RequestId"].asString());
+	auto allSuccessListNode = value["SuccessList"]["SuccessGroups"];
+	for (auto valueSuccessListSuccessGroups : allSuccessListNode)
+	{
+		SuccessGroups successListObject;
+		if(!valueSuccessListSuccessGroups["GroupId"].isNull())
+			successListObject.groupId = valueSuccessListSuccessGroups["GroupId"].asString();
+		if(!valueSuccessListSuccessGroups["Success"].isNull())
+			successListObject.success = valueSuccessListSuccessGroups["Success"].asString() == "true";
+		successList_.push_back(successListObject);
+	}
+	auto allFailListNode = value["FailList"]["FailGroups"];
+	for (auto valueFailListFailGroups : allFailListNode)
+	{
+		FailGroups failListObject;
+		if(!valueFailListFailGroups["GroupId"].isNull())
+			failListObject.groupId = valueFailListFailGroups["GroupId"].asString();
+		if(!valueFailListFailGroups["Success"].isNull())
+			failListObject.success = valueFailListFailGroups["Success"].asString() == "true";
+		if(!valueFailListFailGroups["Reason"].isNull())
+			failListObject.reason = valueFailListFailGroups["Reason"].asString();
+		if(!valueFailListFailGroups["Code"].isNull())
+			failListObject.code = std::stoi(valueFailListFailGroups["Code"].asString());
+		failList_.push_back(failListObject);
+	}
 
 }
 
+std::vector<ModifyLiveMessageUserInfoResult::SuccessGroups> ModifyLiveMessageUserInfoResult::getSuccessList()const
+{
+	return successList_;
+}
+
+std::vector<ModifyLiveMessageUserInfoResult::FailGroups> ModifyLiveMessageUserInfoResult::getFailList()const
+{
+	return failList_;
+}
+