Add live message mute related interface.

This commit is contained in:
sdk-team
2022-12-08 11:43:06 +00:00
parent 736a166604
commit e657a8b04c
20 changed files with 1134 additions and 1 deletions

View File

@@ -1275,6 +1275,42 @@ LiveClient::CancelMuteAllGroupUserOutcomeCallable LiveClient::cancelMuteAllGroup
return task->get_future();
}
LiveClient::CancelMuteGroupUserOutcome LiveClient::cancelMuteGroupUser(const CancelMuteGroupUserRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CancelMuteGroupUserOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CancelMuteGroupUserOutcome(CancelMuteGroupUserResult(outcome.result()));
else
return CancelMuteGroupUserOutcome(outcome.error());
}
void LiveClient::cancelMuteGroupUserAsync(const CancelMuteGroupUserRequest& request, const CancelMuteGroupUserAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, cancelMuteGroupUser(request), context);
};
asyncExecute(new Runnable(fn));
}
LiveClient::CancelMuteGroupUserOutcomeCallable LiveClient::cancelMuteGroupUserCallable(const CancelMuteGroupUserRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CancelMuteGroupUserOutcome()>>(
[this, request]()
{
return this->cancelMuteGroupUser(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::CloseLiveShiftOutcome LiveClient::closeLiveShift(const CloseLiveShiftRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -6459,6 +6495,42 @@ LiveClient::DescribeLiveUserTagsOutcomeCallable LiveClient::describeLiveUserTags
return task->get_future();
}
LiveClient::DescribeMeterLiveInteractionDauOutcome LiveClient::describeMeterLiveInteractionDau(const DescribeMeterLiveInteractionDauRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeMeterLiveInteractionDauOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeMeterLiveInteractionDauOutcome(DescribeMeterLiveInteractionDauResult(outcome.result()));
else
return DescribeMeterLiveInteractionDauOutcome(outcome.error());
}
void LiveClient::describeMeterLiveInteractionDauAsync(const DescribeMeterLiveInteractionDauRequest& request, const DescribeMeterLiveInteractionDauAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeMeterLiveInteractionDau(request), context);
};
asyncExecute(new Runnable(fn));
}
LiveClient::DescribeMeterLiveInteractionDauOutcomeCallable LiveClient::describeMeterLiveInteractionDauCallable(const DescribeMeterLiveInteractionDauRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeMeterLiveInteractionDauOutcome()>>(
[this, request]()
{
return this->describeMeterLiveInteractionDau(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::DescribeMeterLiveRtcDurationOutcome LiveClient::describeMeterLiveRtcDuration(const DescribeMeterLiveRtcDurationRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -8511,6 +8583,78 @@ LiveClient::ModifyStudioLayoutOutcomeCallable LiveClient::modifyStudioLayoutCall
return task->get_future();
}
LiveClient::MuteAllGroupUserOutcome LiveClient::muteAllGroupUser(const MuteAllGroupUserRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return MuteAllGroupUserOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return MuteAllGroupUserOutcome(MuteAllGroupUserResult(outcome.result()));
else
return MuteAllGroupUserOutcome(outcome.error());
}
void LiveClient::muteAllGroupUserAsync(const MuteAllGroupUserRequest& request, const MuteAllGroupUserAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, muteAllGroupUser(request), context);
};
asyncExecute(new Runnable(fn));
}
LiveClient::MuteAllGroupUserOutcomeCallable LiveClient::muteAllGroupUserCallable(const MuteAllGroupUserRequest &request) const
{
auto task = std::make_shared<std::packaged_task<MuteAllGroupUserOutcome()>>(
[this, request]()
{
return this->muteAllGroupUser(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::MuteGroupUserOutcome LiveClient::muteGroupUser(const MuteGroupUserRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return MuteGroupUserOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return MuteGroupUserOutcome(MuteGroupUserResult(outcome.result()));
else
return MuteGroupUserOutcome(outcome.error());
}
void LiveClient::muteGroupUserAsync(const MuteGroupUserRequest& request, const MuteGroupUserAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, muteGroupUser(request), context);
};
asyncExecute(new Runnable(fn));
}
LiveClient::MuteGroupUserOutcomeCallable LiveClient::muteGroupUserCallable(const MuteGroupUserRequest &request) const
{
auto task = std::make_shared<std::packaged_task<MuteGroupUserOutcome()>>(
[this, request]()
{
return this->muteGroupUser(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::OpenLiveShiftOutcome LiveClient::openLiveShift(const OpenLiveShiftRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,74 @@
/*
* 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/CancelMuteGroupUserRequest.h>
using AlibabaCloud::Live::Model::CancelMuteGroupUserRequest;
CancelMuteGroupUserRequest::CancelMuteGroupUserRequest()
: RpcServiceRequest("live", "2016-11-01", "CancelMuteGroupUser") {
setMethod(HttpRequest::Method::Post);
}
CancelMuteGroupUserRequest::~CancelMuteGroupUserRequest() {}
std::vector<CancelMuteGroupUserRequest::std::string> CancelMuteGroupUserRequest::getCancelMuteUserList() const {
return cancelMuteUserList_;
}
void CancelMuteGroupUserRequest::setCancelMuteUserList(const std::vector<CancelMuteGroupUserRequest::std::string> &cancelMuteUserList) {
cancelMuteUserList_ = cancelMuteUserList;
for(int dep1 = 0; dep1 != cancelMuteUserList.size(); dep1++) {
setBodyParameter(std::string("CancelMuteUserList") + "." + std::to_string(dep1 + 1), cancelMuteUserList[dep1]);
}
}
std::string CancelMuteGroupUserRequest::getOperatorUserId() const {
return operatorUserId_;
}
void CancelMuteGroupUserRequest::setOperatorUserId(const std::string &operatorUserId) {
operatorUserId_ = operatorUserId;
setBodyParameter(std::string("OperatorUserId"), operatorUserId);
}
int CancelMuteGroupUserRequest::getBroadCastType() const {
return broadCastType_;
}
void CancelMuteGroupUserRequest::setBroadCastType(int broadCastType) {
broadCastType_ = broadCastType;
setBodyParameter(std::string("BroadCastType"), std::to_string(broadCastType));
}
std::string CancelMuteGroupUserRequest::getGroupId() const {
return groupId_;
}
void CancelMuteGroupUserRequest::setGroupId(const std::string &groupId) {
groupId_ = groupId;
setBodyParameter(std::string("GroupId"), groupId);
}
std::string CancelMuteGroupUserRequest::getAppId() const {
return appId_;
}
void CancelMuteGroupUserRequest::setAppId(const std::string &appId) {
appId_ = appId;
setBodyParameter(std::string("AppId"), appId);
}

View File

@@ -0,0 +1,52 @@
/*
* 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/CancelMuteGroupUserResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Live;
using namespace AlibabaCloud::Live::Model;
CancelMuteGroupUserResult::CancelMuteGroupUserResult() :
ServiceResult()
{}
CancelMuteGroupUserResult::CancelMuteGroupUserResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CancelMuteGroupUserResult::~CancelMuteGroupUserResult()
{}
void CancelMuteGroupUserResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resultNode = value["Result"];
if(!resultNode["Success"].isNull())
result_.success = resultNode["Success"].asString() == "true";
}
CancelMuteGroupUserResult::Result CancelMuteGroupUserResult::getResult()const
{
return result_;
}

View File

@@ -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/DescribeMeterLiveInteractionDauRequest.h>
using AlibabaCloud::Live::Model::DescribeMeterLiveInteractionDauRequest;
DescribeMeterLiveInteractionDauRequest::DescribeMeterLiveInteractionDauRequest()
: RpcServiceRequest("live", "2016-11-01", "DescribeMeterLiveInteractionDau") {
setMethod(HttpRequest::Method::Post);
}
DescribeMeterLiveInteractionDauRequest::~DescribeMeterLiveInteractionDauRequest() {}
long DescribeMeterLiveInteractionDauRequest::getStartTs() const {
return startTs_;
}
void DescribeMeterLiveInteractionDauRequest::setStartTs(long startTs) {
startTs_ = startTs;
setParameter(std::string("StartTs"), std::to_string(startTs));
}
std::string DescribeMeterLiveInteractionDauRequest::getServiceArea() const {
return serviceArea_;
}
void DescribeMeterLiveInteractionDauRequest::setServiceArea(const std::string &serviceArea) {
serviceArea_ = serviceArea;
setParameter(std::string("ServiceArea"), serviceArea);
}
std::string DescribeMeterLiveInteractionDauRequest::getAppId() const {
return appId_;
}
void DescribeMeterLiveInteractionDauRequest::setAppId(const std::string &appId) {
appId_ = appId;
setParameter(std::string("AppId"), appId);
}
long DescribeMeterLiveInteractionDauRequest::getEndTs() const {
return endTs_;
}
void DescribeMeterLiveInteractionDauRequest::setEndTs(long endTs) {
endTs_ = endTs;
setParameter(std::string("EndTs"), std::to_string(endTs));
}
long DescribeMeterLiveInteractionDauRequest::getInterval() const {
return interval_;
}
void DescribeMeterLiveInteractionDauRequest::setInterval(long interval) {
interval_ = interval;
setParameter(std::string("Interval"), std::to_string(interval));
}

View File

@@ -0,0 +1,66 @@
/*
* 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/DescribeMeterLiveInteractionDauResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Live;
using namespace AlibabaCloud::Live::Model;
DescribeMeterLiveInteractionDauResult::DescribeMeterLiveInteractionDauResult() :
ServiceResult()
{}
DescribeMeterLiveInteractionDauResult::DescribeMeterLiveInteractionDauResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeMeterLiveInteractionDauResult::~DescribeMeterLiveInteractionDauResult()
{}
void DescribeMeterLiveInteractionDauResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDataNode = value["Data"]["DataItem"];
for (auto valueDataDataItem : allDataNode)
{
DataItem dataObject;
if(!valueDataDataItem["Timestamp"].isNull())
dataObject.timestamp = std::stol(valueDataDataItem["Timestamp"].asString());
if(!valueDataDataItem["Dau"].isNull())
dataObject.dau = valueDataDataItem["Dau"].asString();
data_.push_back(dataObject);
}
if(!value["PeakDau"].isNull())
peakDau_ = value["PeakDau"].asString();
}
std::vector<DescribeMeterLiveInteractionDauResult::DataItem> DescribeMeterLiveInteractionDauResult::getData()const
{
return data_;
}
double DescribeMeterLiveInteractionDauResult::getPeakDau()const
{
return peakDau_;
}

View File

@@ -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.
*/
#include <alibabacloud/live/model/MuteAllGroupUserRequest.h>
using AlibabaCloud::Live::Model::MuteAllGroupUserRequest;
MuteAllGroupUserRequest::MuteAllGroupUserRequest()
: RpcServiceRequest("live", "2016-11-01", "MuteAllGroupUser") {
setMethod(HttpRequest::Method::Post);
}
MuteAllGroupUserRequest::~MuteAllGroupUserRequest() {}
std::string MuteAllGroupUserRequest::getOperatorUserId() const {
return operatorUserId_;
}
void MuteAllGroupUserRequest::setOperatorUserId(const std::string &operatorUserId) {
operatorUserId_ = operatorUserId;
setBodyParameter(std::string("OperatorUserId"), operatorUserId);
}
std::string MuteAllGroupUserRequest::getGroupId() const {
return groupId_;
}
void MuteAllGroupUserRequest::setGroupId(const std::string &groupId) {
groupId_ = groupId;
setBodyParameter(std::string("GroupId"), groupId);
}
std::string MuteAllGroupUserRequest::getAppId() const {
return appId_;
}
void MuteAllGroupUserRequest::setAppId(const std::string &appId) {
appId_ = appId;
setBodyParameter(std::string("AppId"), appId);
}

View File

@@ -0,0 +1,52 @@
/*
* 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/MuteAllGroupUserResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Live;
using namespace AlibabaCloud::Live::Model;
MuteAllGroupUserResult::MuteAllGroupUserResult() :
ServiceResult()
{}
MuteAllGroupUserResult::MuteAllGroupUserResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
MuteAllGroupUserResult::~MuteAllGroupUserResult()
{}
void MuteAllGroupUserResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resultNode = value["Result"];
if(!resultNode["Success"].isNull())
result_.success = resultNode["Success"].asString() == "true";
}
MuteAllGroupUserResult::Result MuteAllGroupUserResult::getResult()const
{
return result_;
}

View File

@@ -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.
*/
#include <alibabacloud/live/model/MuteGroupUserRequest.h>
using AlibabaCloud::Live::Model::MuteGroupUserRequest;
MuteGroupUserRequest::MuteGroupUserRequest()
: RpcServiceRequest("live", "2016-11-01", "MuteGroupUser") {
setMethod(HttpRequest::Method::Post);
}
MuteGroupUserRequest::~MuteGroupUserRequest() {}
std::vector<MuteGroupUserRequest::std::string> MuteGroupUserRequest::getMuteUserList() const {
return muteUserList_;
}
void MuteGroupUserRequest::setMuteUserList(const std::vector<MuteGroupUserRequest::std::string> &muteUserList) {
muteUserList_ = muteUserList;
for(int dep1 = 0; dep1 != muteUserList.size(); dep1++) {
setBodyParameter(std::string("MuteUserList") + "." + std::to_string(dep1 + 1), muteUserList[dep1]);
}
}
std::string MuteGroupUserRequest::getOperatorUserId() const {
return operatorUserId_;
}
void MuteGroupUserRequest::setOperatorUserId(const std::string &operatorUserId) {
operatorUserId_ = operatorUserId;
setBodyParameter(std::string("OperatorUserId"), operatorUserId);
}
int MuteGroupUserRequest::getBroadCastType() const {
return broadCastType_;
}
void MuteGroupUserRequest::setBroadCastType(int broadCastType) {
broadCastType_ = broadCastType;
setBodyParameter(std::string("BroadCastType"), std::to_string(broadCastType));
}
std::string MuteGroupUserRequest::getGroupId() const {
return groupId_;
}
void MuteGroupUserRequest::setGroupId(const std::string &groupId) {
groupId_ = groupId;
setBodyParameter(std::string("GroupId"), groupId);
}
int MuteGroupUserRequest::getMuteTime() const {
return muteTime_;
}
void MuteGroupUserRequest::setMuteTime(int muteTime) {
muteTime_ = muteTime;
setBodyParameter(std::string("MuteTime"), std::to_string(muteTime));
}
std::string MuteGroupUserRequest::getAppId() const {
return appId_;
}
void MuteGroupUserRequest::setAppId(const std::string &appId) {
appId_ = appId;
setBodyParameter(std::string("AppId"), appId);
}

View File

@@ -0,0 +1,52 @@
/*
* 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/MuteGroupUserResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Live;
using namespace AlibabaCloud::Live::Model;
MuteGroupUserResult::MuteGroupUserResult() :
ServiceResult()
{}
MuteGroupUserResult::MuteGroupUserResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
MuteGroupUserResult::~MuteGroupUserResult()
{}
void MuteGroupUserResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resultNode = value["Result"];
if(!resultNode["Success"].isNull())
result_.success = resultNode["Success"].asString() == "true";
}
MuteGroupUserResult::Result MuteGroupUserResult::getResult()const
{
return result_;
}