diff --git a/VERSION b/VERSION index 9118d8fe4..4f6f660c6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1904 \ No newline at end of file +1.36.1905 \ No newline at end of file diff --git a/live/CMakeLists.txt b/live/CMakeLists.txt index fa3800092..d4b5fc81f 100644 --- a/live/CMakeLists.txt +++ b/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 diff --git a/live/include/alibabacloud/live/LiveClient.h b/live/include/alibabacloud/live/LiveClient.h index 5ccb30535..a8aa1fb6d 100644 --- a/live/include/alibabacloud/live/LiveClient.h +++ b/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 DescribeLiveCdnDiagnoseInfoOutcome; typedef std::future DescribeLiveCdnDiagnoseInfoOutcomeCallable; typedef std::function&)> DescribeLiveCdnDiagnoseInfoAsyncHandler; + typedef Outcome DescribeLiveCenterStreamRateDataOutcome; + typedef std::future DescribeLiveCenterStreamRateDataOutcomeCallable; + typedef std::function&)> DescribeLiveCenterStreamRateDataAsyncHandler; typedef Outcome DescribeLiveCenterTransferOutcome; typedef std::future DescribeLiveCenterTransferOutcomeCallable; typedef std::function&)> 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& 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& 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& context = nullptr) const; DescribeLiveCenterTransferOutcomeCallable describeLiveCenterTransferCallable(const Model::DescribeLiveCenterTransferRequest& request) const; diff --git a/live/include/alibabacloud/live/model/DescribeLiveCenterStreamRateDataRequest.h b/live/include/alibabacloud/live/model/DescribeLiveCenterStreamRateDataRequest.h new file mode 100644 index 000000000..879b87250 --- /dev/null +++ b/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 +#include +#include +#include +#include + +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_ diff --git a/live/include/alibabacloud/live/model/DescribeLiveCenterStreamRateDataResult.h b/live/include/alibabacloud/live/model/DescribeLiveCenterStreamRateDataResult.h new file mode 100644 index 000000000..9a06eb92f --- /dev/null +++ b/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 +#include +#include +#include +#include + +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 getRateDatas()const; + + protected: + void parse(const std::string &payload); + private: + std::vector rateDatas_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LIVE_MODEL_DESCRIBELIVECENTERSTREAMRATEDATARESULT_H_ \ No newline at end of file diff --git a/live/include/alibabacloud/live/model/ModifyLiveMessageUserInfoResult.h b/live/include/alibabacloud/live/model/ModifyLiveMessageUserInfoResult.h index 952733c9a..51dd17ad0 100644 --- a/live/include/alibabacloud/live/model/ModifyLiveMessageUserInfoResult.h +++ b/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 getSuccessList()const; + std::vector getFailList()const; protected: void parse(const std::string &payload); private: + std::vector successList_; + std::vector failList_; }; } diff --git a/live/src/LiveClient.cc b/live/src/LiveClient.cc index a8e7fc22e..9f945ff2f 100644 --- a/live/src/LiveClient.cc +++ b/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& 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>( + [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(); diff --git a/live/src/model/DescribeLiveCenterStreamRateDataRequest.cc b/live/src/model/DescribeLiveCenterStreamRateDataRequest.cc new file mode 100644 index 000000000..77aff418a --- /dev/null +++ b/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 + +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); +} + diff --git a/live/src/model/DescribeLiveCenterStreamRateDataResult.cc b/live/src/model/DescribeLiveCenterStreamRateDataResult.cc new file mode 100644 index 000000000..5c33c2952 --- /dev/null +++ b/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 +#include + +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::getRateDatas()const +{ + return rateDatas_; +} + diff --git a/live/src/model/ModifyLiveMessageUserInfoResult.cc b/live/src/model/ModifyLiveMessageUserInfoResult.cc index 54398e2d8..34aee72b5 100644 --- a/live/src/model/ModifyLiveMessageUserInfoResult.cc +++ b/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::getSuccessList()const +{ + return successList_; +} + +std::vector ModifyLiveMessageUserInfoResult::getFailList()const +{ + return failList_; +} +