Update to support new apis.
This commit is contained in:
@@ -5271,6 +5271,42 @@ LiveClient::DescribeLiveDomainDetailOutcomeCallable LiveClient::describeLiveDoma
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
LiveClient::DescribeLiveDomainEdgeLogOutcome LiveClient::describeLiveDomainEdgeLog(const DescribeLiveDomainEdgeLogRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeLiveDomainEdgeLogOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeLiveDomainEdgeLogOutcome(DescribeLiveDomainEdgeLogResult(outcome.result()));
|
||||
else
|
||||
return DescribeLiveDomainEdgeLogOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void LiveClient::describeLiveDomainEdgeLogAsync(const DescribeLiveDomainEdgeLogRequest& request, const DescribeLiveDomainEdgeLogAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeLiveDomainEdgeLog(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
LiveClient::DescribeLiveDomainEdgeLogOutcomeCallable LiveClient::describeLiveDomainEdgeLogCallable(const DescribeLiveDomainEdgeLogRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeLiveDomainEdgeLogOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeLiveDomainEdgeLog(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
LiveClient::DescribeLiveDomainFrameRateAndBitRateDataOutcome LiveClient::describeLiveDomainFrameRateAndBitRateData(const DescribeLiveDomainFrameRateAndBitRateDataRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -9771,6 +9807,78 @@ LiveClient::ListEdgeTranscodeTemplateOutcomeCallable LiveClient::listEdgeTransco
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
LiveClient::ListEventSubOutcome LiveClient::listEventSub(const ListEventSubRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListEventSubOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListEventSubOutcome(ListEventSubResult(outcome.result()));
|
||||
else
|
||||
return ListEventSubOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void LiveClient::listEventSubAsync(const ListEventSubRequest& request, const ListEventSubAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listEventSub(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
LiveClient::ListEventSubOutcomeCallable LiveClient::listEventSubCallable(const ListEventSubRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListEventSubOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listEventSub(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
LiveClient::ListEventSubEventOutcome LiveClient::listEventSubEvent(const ListEventSubEventRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListEventSubEventOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListEventSubEventOutcome(ListEventSubEventResult(outcome.result()));
|
||||
else
|
||||
return ListEventSubEventOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void LiveClient::listEventSubEventAsync(const ListEventSubEventRequest& request, const ListEventSubEventAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listEventSubEvent(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
LiveClient::ListEventSubEventOutcomeCallable LiveClient::listEventSubEventCallable(const ListEventSubEventRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListEventSubEventOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listEventSubEvent(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
LiveClient::ListLiveDelayConfigOutcome LiveClient::listLiveDelayConfig(const ListLiveDelayConfigRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -12867,6 +12975,42 @@ LiveClient::UpdateEdgeTranscodeJobOutcomeCallable LiveClient::updateEdgeTranscod
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
LiveClient::UpdateEventSubOutcome LiveClient::updateEventSub(const UpdateEventSubRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UpdateEventSubOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UpdateEventSubOutcome(UpdateEventSubResult(outcome.result()));
|
||||
else
|
||||
return UpdateEventSubOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void LiveClient::updateEventSubAsync(const UpdateEventSubRequest& request, const UpdateEventSubAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, updateEventSub(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
LiveClient::UpdateEventSubOutcomeCallable LiveClient::updateEventSubCallable(const UpdateEventSubRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UpdateEventSubOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->updateEventSub(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
LiveClient::UpdateLiveAppRecordConfigOutcome LiveClient::updateLiveAppRecordConfig(const UpdateLiveAppRecordConfigRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
90
live/src/model/DescribeLiveDomainEdgeLogRequest.cc
Normal file
90
live/src/model/DescribeLiveDomainEdgeLogRequest.cc
Normal file
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* 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/DescribeLiveDomainEdgeLogRequest.h>
|
||||
|
||||
using AlibabaCloud::Live::Model::DescribeLiveDomainEdgeLogRequest;
|
||||
|
||||
DescribeLiveDomainEdgeLogRequest::DescribeLiveDomainEdgeLogRequest()
|
||||
: RpcServiceRequest("live", "2016-11-01", "DescribeLiveDomainEdgeLog") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeLiveDomainEdgeLogRequest::~DescribeLiveDomainEdgeLogRequest() {}
|
||||
|
||||
std::string DescribeLiveDomainEdgeLogRequest::getStartTime() const {
|
||||
return startTime_;
|
||||
}
|
||||
|
||||
void DescribeLiveDomainEdgeLogRequest::setStartTime(const std::string &startTime) {
|
||||
startTime_ = startTime;
|
||||
setParameter(std::string("StartTime"), startTime);
|
||||
}
|
||||
|
||||
long DescribeLiveDomainEdgeLogRequest::getPageNumber() const {
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void DescribeLiveDomainEdgeLogRequest::setPageNumber(long pageNumber) {
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter(std::string("PageNumber"), std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
std::string DescribeLiveDomainEdgeLogRequest::getLogType() const {
|
||||
return logType_;
|
||||
}
|
||||
|
||||
void DescribeLiveDomainEdgeLogRequest::setLogType(const std::string &logType) {
|
||||
logType_ = logType;
|
||||
setParameter(std::string("LogType"), logType);
|
||||
}
|
||||
|
||||
long DescribeLiveDomainEdgeLogRequest::getPageSize() const {
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void DescribeLiveDomainEdgeLogRequest::setPageSize(long pageSize) {
|
||||
pageSize_ = pageSize;
|
||||
setParameter(std::string("PageSize"), std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string DescribeLiveDomainEdgeLogRequest::getDomainName() const {
|
||||
return domainName_;
|
||||
}
|
||||
|
||||
void DescribeLiveDomainEdgeLogRequest::setDomainName(const std::string &domainName) {
|
||||
domainName_ = domainName;
|
||||
setParameter(std::string("DomainName"), domainName);
|
||||
}
|
||||
|
||||
std::string DescribeLiveDomainEdgeLogRequest::getEndTime() const {
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
void DescribeLiveDomainEdgeLogRequest::setEndTime(const std::string &endTime) {
|
||||
endTime_ = endTime;
|
||||
setParameter(std::string("EndTime"), endTime);
|
||||
}
|
||||
|
||||
long DescribeLiveDomainEdgeLogRequest::getOwnerId() const {
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void DescribeLiveDomainEdgeLogRequest::setOwnerId(long ownerId) {
|
||||
ownerId_ = ownerId;
|
||||
setParameter(std::string("OwnerId"), std::to_string(ownerId));
|
||||
}
|
||||
|
||||
87
live/src/model/DescribeLiveDomainEdgeLogResult.cc
Normal file
87
live/src/model/DescribeLiveDomainEdgeLogResult.cc
Normal file
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* 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/DescribeLiveDomainEdgeLogResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Live;
|
||||
using namespace AlibabaCloud::Live::Model;
|
||||
|
||||
DescribeLiveDomainEdgeLogResult::DescribeLiveDomainEdgeLogResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeLiveDomainEdgeLogResult::DescribeLiveDomainEdgeLogResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeLiveDomainEdgeLogResult::~DescribeLiveDomainEdgeLogResult()
|
||||
{}
|
||||
|
||||
void DescribeLiveDomainEdgeLogResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allDomainLogDetailsNode = value["DomainLogDetails"]["DomainLogDetail"];
|
||||
for (auto valueDomainLogDetailsDomainLogDetail : allDomainLogDetailsNode)
|
||||
{
|
||||
DomainLogDetail domainLogDetailsObject;
|
||||
if(!valueDomainLogDetailsDomainLogDetail["LogCount"].isNull())
|
||||
domainLogDetailsObject.logCount = std::stol(valueDomainLogDetailsDomainLogDetail["LogCount"].asString());
|
||||
auto allLogInfosNode = valueDomainLogDetailsDomainLogDetail["LogInfos"]["LogInfoDetail"];
|
||||
for (auto valueDomainLogDetailsDomainLogDetailLogInfosLogInfoDetail : allLogInfosNode)
|
||||
{
|
||||
DomainLogDetail::LogInfoDetail logInfosObject;
|
||||
if(!valueDomainLogDetailsDomainLogDetailLogInfosLogInfoDetail["EndTime"].isNull())
|
||||
logInfosObject.endTime = valueDomainLogDetailsDomainLogDetailLogInfosLogInfoDetail["EndTime"].asString();
|
||||
if(!valueDomainLogDetailsDomainLogDetailLogInfosLogInfoDetail["LogSize"].isNull())
|
||||
logInfosObject.logSize = std::stol(valueDomainLogDetailsDomainLogDetailLogInfosLogInfoDetail["LogSize"].asString());
|
||||
if(!valueDomainLogDetailsDomainLogDetailLogInfosLogInfoDetail["StartTime"].isNull())
|
||||
logInfosObject.startTime = valueDomainLogDetailsDomainLogDetailLogInfosLogInfoDetail["StartTime"].asString();
|
||||
if(!valueDomainLogDetailsDomainLogDetailLogInfosLogInfoDetail["LogName"].isNull())
|
||||
logInfosObject.logName = valueDomainLogDetailsDomainLogDetailLogInfosLogInfoDetail["LogName"].asString();
|
||||
if(!valueDomainLogDetailsDomainLogDetailLogInfosLogInfoDetail["LogPath"].isNull())
|
||||
logInfosObject.logPath = valueDomainLogDetailsDomainLogDetailLogInfosLogInfoDetail["LogPath"].asString();
|
||||
domainLogDetailsObject.logInfos.push_back(logInfosObject);
|
||||
}
|
||||
auto pageInfosNode = value["PageInfos"];
|
||||
if(!pageInfosNode["PageIndex"].isNull())
|
||||
domainLogDetailsObject.pageInfos.pageIndex = std::stol(pageInfosNode["PageIndex"].asString());
|
||||
if(!pageInfosNode["PageSize"].isNull())
|
||||
domainLogDetailsObject.pageInfos.pageSize = std::stol(pageInfosNode["PageSize"].asString());
|
||||
if(!pageInfosNode["Total"].isNull())
|
||||
domainLogDetailsObject.pageInfos.total = std::stol(pageInfosNode["Total"].asString());
|
||||
domainLogDetails_.push_back(domainLogDetailsObject);
|
||||
}
|
||||
if(!value["DomainName"].isNull())
|
||||
domainName_ = value["DomainName"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string DescribeLiveDomainEdgeLogResult::getDomainName()const
|
||||
{
|
||||
return domainName_;
|
||||
}
|
||||
|
||||
std::vector<DescribeLiveDomainEdgeLogResult::DomainLogDetail> DescribeLiveDomainEdgeLogResult::getDomainLogDetails()const
|
||||
{
|
||||
return domainLogDetails_;
|
||||
}
|
||||
|
||||
81
live/src/model/ListEventSubEventRequest.cc
Normal file
81
live/src/model/ListEventSubEventRequest.cc
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* 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/ListEventSubEventRequest.h>
|
||||
|
||||
using AlibabaCloud::Live::Model::ListEventSubEventRequest;
|
||||
|
||||
ListEventSubEventRequest::ListEventSubEventRequest()
|
||||
: RpcServiceRequest("live", "2016-11-01", "ListEventSubEvent") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
ListEventSubEventRequest::~ListEventSubEventRequest() {}
|
||||
|
||||
std::string ListEventSubEventRequest::getSubscribeId() const {
|
||||
return subscribeId_;
|
||||
}
|
||||
|
||||
void ListEventSubEventRequest::setSubscribeId(const std::string &subscribeId) {
|
||||
subscribeId_ = subscribeId;
|
||||
setParameter(std::string("SubscribeId"), subscribeId);
|
||||
}
|
||||
|
||||
long ListEventSubEventRequest::getEndTime() const {
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
void ListEventSubEventRequest::setEndTime(long endTime) {
|
||||
endTime_ = endTime;
|
||||
setParameter(std::string("EndTime"), std::to_string(endTime));
|
||||
}
|
||||
|
||||
long ListEventSubEventRequest::getStartTime() const {
|
||||
return startTime_;
|
||||
}
|
||||
|
||||
void ListEventSubEventRequest::setStartTime(long startTime) {
|
||||
startTime_ = startTime;
|
||||
setParameter(std::string("StartTime"), std::to_string(startTime));
|
||||
}
|
||||
|
||||
long ListEventSubEventRequest::getPageNo() const {
|
||||
return pageNo_;
|
||||
}
|
||||
|
||||
void ListEventSubEventRequest::setPageNo(long pageNo) {
|
||||
pageNo_ = pageNo;
|
||||
setParameter(std::string("PageNo"), std::to_string(pageNo));
|
||||
}
|
||||
|
||||
std::string ListEventSubEventRequest::getAppId() const {
|
||||
return appId_;
|
||||
}
|
||||
|
||||
void ListEventSubEventRequest::setAppId(const std::string &appId) {
|
||||
appId_ = appId;
|
||||
setParameter(std::string("AppId"), appId);
|
||||
}
|
||||
|
||||
long ListEventSubEventRequest::getPageSize() const {
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListEventSubEventRequest::setPageSize(long pageSize) {
|
||||
pageSize_ = pageSize;
|
||||
setParameter(std::string("PageSize"), std::to_string(pageSize));
|
||||
}
|
||||
|
||||
85
live/src/model/ListEventSubEventResult.cc
Normal file
85
live/src/model/ListEventSubEventResult.cc
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* 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/ListEventSubEventResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Live;
|
||||
using namespace AlibabaCloud::Live::Model;
|
||||
|
||||
ListEventSubEventResult::ListEventSubEventResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListEventSubEventResult::ListEventSubEventResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListEventSubEventResult::~ListEventSubEventResult()
|
||||
{}
|
||||
|
||||
void ListEventSubEventResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allLogsNode = value["Logs"]["logsItem"];
|
||||
for (auto valueLogslogsItem : allLogsNode)
|
||||
{
|
||||
LogsItem logsObject;
|
||||
if(!valueLogslogsItem["AppId"].isNull())
|
||||
logsObject.appId = valueLogslogsItem["AppId"].asString();
|
||||
if(!valueLogslogsItem["SubId"].isNull())
|
||||
logsObject.subId = valueLogslogsItem["SubId"].asString();
|
||||
if(!valueLogslogsItem["MessageId"].isNull())
|
||||
logsObject.messageId = valueLogslogsItem["MessageId"].asString();
|
||||
if(!valueLogslogsItem["Data"].isNull())
|
||||
logsObject.data = valueLogslogsItem["Data"].asString();
|
||||
if(!valueLogslogsItem["Cost"].isNull())
|
||||
logsObject.cost = std::stoi(valueLogslogsItem["Cost"].asString());
|
||||
if(!valueLogslogsItem["Time"].isNull())
|
||||
logsObject.time = valueLogslogsItem["Time"].asString();
|
||||
if(!valueLogslogsItem["Url"].isNull())
|
||||
logsObject.url = valueLogslogsItem["Url"].asString();
|
||||
if(!valueLogslogsItem["Code"].isNull())
|
||||
logsObject.code = std::stoi(valueLogslogsItem["Code"].asString());
|
||||
logs_.push_back(logsObject);
|
||||
}
|
||||
if(!value["Count"].isNull())
|
||||
count_ = std::stol(value["Count"].asString());
|
||||
if(!value["HasMore"].isNull())
|
||||
hasMore_ = value["HasMore"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
bool ListEventSubEventResult::getHasMore()const
|
||||
{
|
||||
return hasMore_;
|
||||
}
|
||||
|
||||
std::vector<ListEventSubEventResult::LogsItem> ListEventSubEventResult::getLogs()const
|
||||
{
|
||||
return logs_;
|
||||
}
|
||||
|
||||
long ListEventSubEventResult::getCount()const
|
||||
{
|
||||
return count_;
|
||||
}
|
||||
|
||||
36
live/src/model/ListEventSubRequest.cc
Normal file
36
live/src/model/ListEventSubRequest.cc
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* 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/ListEventSubRequest.h>
|
||||
|
||||
using AlibabaCloud::Live::Model::ListEventSubRequest;
|
||||
|
||||
ListEventSubRequest::ListEventSubRequest()
|
||||
: RpcServiceRequest("live", "2016-11-01", "ListEventSub") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
ListEventSubRequest::~ListEventSubRequest() {}
|
||||
|
||||
std::string ListEventSubRequest::getAppId() const {
|
||||
return appId_;
|
||||
}
|
||||
|
||||
void ListEventSubRequest::setAppId(const std::string &appId) {
|
||||
appId_ = appId;
|
||||
setParameter(std::string("AppId"), appId);
|
||||
}
|
||||
|
||||
73
live/src/model/ListEventSubResult.cc
Normal file
73
live/src/model/ListEventSubResult.cc
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* 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/ListEventSubResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Live;
|
||||
using namespace AlibabaCloud::Live::Model;
|
||||
|
||||
ListEventSubResult::ListEventSubResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListEventSubResult::ListEventSubResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListEventSubResult::~ListEventSubResult()
|
||||
{}
|
||||
|
||||
void ListEventSubResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allSubscribersNode = value["Subscribers"]["data"];
|
||||
for (auto valueSubscribersdata : allSubscribersNode)
|
||||
{
|
||||
Data subscribersObject;
|
||||
if(!valueSubscribersdata["SubId"].isNull())
|
||||
subscribersObject.subId = valueSubscribersdata["SubId"].asString();
|
||||
if(!valueSubscribersdata["ChannelId"].isNull())
|
||||
subscribersObject.channelId = valueSubscribersdata["ChannelId"].asString();
|
||||
if(!valueSubscribersdata["CallbackUrl"].isNull())
|
||||
subscribersObject.callbackUrl = valueSubscribersdata["CallbackUrl"].asString();
|
||||
if(!valueSubscribersdata["CreateTime"].isNull())
|
||||
subscribersObject.createTime = valueSubscribersdata["CreateTime"].asString();
|
||||
if(!valueSubscribersdata["ModifyTime"].isNull())
|
||||
subscribersObject.modifyTime = valueSubscribersdata["ModifyTime"].asString();
|
||||
if(!valueSubscribersdata["Roles"].isNull())
|
||||
subscribersObject.roles = std::stoi(valueSubscribersdata["Roles"].asString());
|
||||
auto allEvents = value["Events"]["events"];
|
||||
for (auto value : allEvents)
|
||||
subscribersObject.events.push_back(value.asString());
|
||||
auto allUsers = value["Users"]["users"];
|
||||
for (auto value : allUsers)
|
||||
subscribersObject.users.push_back(value.asString());
|
||||
subscribers_.push_back(subscribersObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<ListEventSubResult::Data> ListEventSubResult::getSubscribers()const
|
||||
{
|
||||
return subscribers_;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,51 @@ SendLiveMessageGroupRequest::SendLiveMessageGroupRequest()
|
||||
|
||||
SendLiveMessageGroupRequest::~SendLiveMessageGroupRequest() {}
|
||||
|
||||
std::string SendLiveMessageGroupRequest::getSenderMetaInfo() const {
|
||||
return senderMetaInfo_;
|
||||
}
|
||||
|
||||
void SendLiveMessageGroupRequest::setSenderMetaInfo(const std::string &senderMetaInfo) {
|
||||
senderMetaInfo_ = senderMetaInfo;
|
||||
setParameter(std::string("SenderMetaInfo"), senderMetaInfo);
|
||||
}
|
||||
|
||||
std::string SendLiveMessageGroupRequest::getBody() const {
|
||||
return body_;
|
||||
}
|
||||
|
||||
void SendLiveMessageGroupRequest::setBody(const std::string &body) {
|
||||
body_ = body;
|
||||
setParameter(std::string("Body"), body);
|
||||
}
|
||||
|
||||
long SendLiveMessageGroupRequest::getStaticsIncrease() const {
|
||||
return staticsIncrease_;
|
||||
}
|
||||
|
||||
void SendLiveMessageGroupRequest::setStaticsIncrease(long staticsIncrease) {
|
||||
staticsIncrease_ = staticsIncrease;
|
||||
setParameter(std::string("StaticsIncrease"), std::to_string(staticsIncrease));
|
||||
}
|
||||
|
||||
long SendLiveMessageGroupRequest::getMsgType() const {
|
||||
return msgType_;
|
||||
}
|
||||
|
||||
void SendLiveMessageGroupRequest::setMsgType(long msgType) {
|
||||
msgType_ = msgType;
|
||||
setParameter(std::string("MsgType"), std::to_string(msgType));
|
||||
}
|
||||
|
||||
bool SendLiveMessageGroupRequest::getNoStorage() const {
|
||||
return noStorage_;
|
||||
}
|
||||
|
||||
void SendLiveMessageGroupRequest::setNoStorage(bool noStorage) {
|
||||
noStorage_ = noStorage;
|
||||
setParameter(std::string("NoStorage"), noStorage ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string SendLiveMessageGroupRequest::getGroupId() const {
|
||||
return groupId_;
|
||||
}
|
||||
@@ -34,13 +79,13 @@ void SendLiveMessageGroupRequest::setGroupId(const std::string &groupId) {
|
||||
setParameter(std::string("GroupId"), groupId);
|
||||
}
|
||||
|
||||
std::string SendLiveMessageGroupRequest::getSenderMetaInfo() const {
|
||||
return senderMetaInfo_;
|
||||
long SendLiveMessageGroupRequest::getWeight() const {
|
||||
return weight_;
|
||||
}
|
||||
|
||||
void SendLiveMessageGroupRequest::setSenderMetaInfo(const std::string &senderMetaInfo) {
|
||||
senderMetaInfo_ = senderMetaInfo;
|
||||
setParameter(std::string("SenderMetaInfo"), senderMetaInfo);
|
||||
void SendLiveMessageGroupRequest::setWeight(long weight) {
|
||||
weight_ = weight;
|
||||
setParameter(std::string("Weight"), std::to_string(weight));
|
||||
}
|
||||
|
||||
std::string SendLiveMessageGroupRequest::getDataCenter() const {
|
||||
@@ -61,15 +106,6 @@ void SendLiveMessageGroupRequest::setMsgTid(const std::string &msgTid) {
|
||||
setParameter(std::string("MsgTid"), msgTid);
|
||||
}
|
||||
|
||||
std::string SendLiveMessageGroupRequest::getBody() const {
|
||||
return body_;
|
||||
}
|
||||
|
||||
void SendLiveMessageGroupRequest::setBody(const std::string &body) {
|
||||
body_ = body;
|
||||
setParameter(std::string("Body"), body);
|
||||
}
|
||||
|
||||
std::string SendLiveMessageGroupRequest::getSenderId() const {
|
||||
return senderId_;
|
||||
}
|
||||
@@ -88,12 +124,3 @@ void SendLiveMessageGroupRequest::setAppId(const std::string &appId) {
|
||||
setParameter(std::string("AppId"), appId);
|
||||
}
|
||||
|
||||
long SendLiveMessageGroupRequest::getMsgType() const {
|
||||
return msgType_;
|
||||
}
|
||||
|
||||
void SendLiveMessageGroupRequest::setMsgType(long msgType) {
|
||||
msgType_ = msgType;
|
||||
setParameter(std::string("MsgType"), std::to_string(msgType));
|
||||
}
|
||||
|
||||
|
||||
79
live/src/model/UpdateEventSubRequest.cc
Normal file
79
live/src/model/UpdateEventSubRequest.cc
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* 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/UpdateEventSubRequest.h>
|
||||
|
||||
using AlibabaCloud::Live::Model::UpdateEventSubRequest;
|
||||
|
||||
UpdateEventSubRequest::UpdateEventSubRequest()
|
||||
: RpcServiceRequest("live", "2016-11-01", "UpdateEventSub") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
UpdateEventSubRequest::~UpdateEventSubRequest() {}
|
||||
|
||||
std::string UpdateEventSubRequest::getSubscribeId() const {
|
||||
return subscribeId_;
|
||||
}
|
||||
|
||||
void UpdateEventSubRequest::setSubscribeId(const std::string &subscribeId) {
|
||||
subscribeId_ = subscribeId;
|
||||
setParameter(std::string("SubscribeId"), subscribeId);
|
||||
}
|
||||
|
||||
std::vector<std::string> UpdateEventSubRequest::getUsers() const {
|
||||
return users_;
|
||||
}
|
||||
|
||||
void UpdateEventSubRequest::setUsers(const std::vector<std::string> &users) {
|
||||
users_ = users;
|
||||
}
|
||||
|
||||
std::string UpdateEventSubRequest::getAppId() const {
|
||||
return appId_;
|
||||
}
|
||||
|
||||
void UpdateEventSubRequest::setAppId(const std::string &appId) {
|
||||
appId_ = appId;
|
||||
setParameter(std::string("AppId"), appId);
|
||||
}
|
||||
|
||||
std::string UpdateEventSubRequest::getCallbackUrl() const {
|
||||
return callbackUrl_;
|
||||
}
|
||||
|
||||
void UpdateEventSubRequest::setCallbackUrl(const std::string &callbackUrl) {
|
||||
callbackUrl_ = callbackUrl;
|
||||
setParameter(std::string("CallbackUrl"), callbackUrl);
|
||||
}
|
||||
|
||||
std::string UpdateEventSubRequest::getChannelId() const {
|
||||
return channelId_;
|
||||
}
|
||||
|
||||
void UpdateEventSubRequest::setChannelId(const std::string &channelId) {
|
||||
channelId_ = channelId;
|
||||
setParameter(std::string("ChannelId"), channelId);
|
||||
}
|
||||
|
||||
std::vector<std::string> UpdateEventSubRequest::getEvents() const {
|
||||
return events_;
|
||||
}
|
||||
|
||||
void UpdateEventSubRequest::setEvents(const std::vector<std::string> &events) {
|
||||
events_ = events;
|
||||
}
|
||||
|
||||
44
live/src/model/UpdateEventSubResult.cc
Normal file
44
live/src/model/UpdateEventSubResult.cc
Normal file
@@ -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/UpdateEventSubResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Live;
|
||||
using namespace AlibabaCloud::Live::Model;
|
||||
|
||||
UpdateEventSubResult::UpdateEventSubResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateEventSubResult::UpdateEventSubResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateEventSubResult::~UpdateEventSubResult()
|
||||
{}
|
||||
|
||||
void UpdateEventSubResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user