From 3eaac1a3287a8a6519c22982078fb5d1550482fd Mon Sep 17 00:00:00 2001 From: sdk-team Date: Wed, 13 Dec 2023 11:42:34 +0000 Subject: [PATCH] Update to support new apis. --- VERSION | 2 +- live/CMakeLists.txt | 16 ++ live/include/alibabacloud/live/LiveClient.h | 32 ++++ .../model/DescribeLiveDomainEdgeLogRequest.h | 60 ++++++++ .../model/DescribeLiveDomainEdgeLogResult.h | 73 +++++++++ .../live/model/ListEventSubEventRequest.h | 57 +++++++ .../live/model/ListEventSubEventResult.h | 66 ++++++++ .../live/model/ListEventSubRequest.h | 42 +++++ .../live/model/ListEventSubResult.h | 62 ++++++++ .../live/model/SendLiveMessageGroupRequest.h | 27 ++-- .../live/model/UpdateEventSubRequest.h | 57 +++++++ .../live/model/UpdateEventSubResult.h | 49 ++++++ live/src/LiveClient.cc | 144 ++++++++++++++++++ .../model/DescribeLiveDomainEdgeLogRequest.cc | 90 +++++++++++ .../model/DescribeLiveDomainEdgeLogResult.cc | 87 +++++++++++ live/src/model/ListEventSubEventRequest.cc | 81 ++++++++++ live/src/model/ListEventSubEventResult.cc | 85 +++++++++++ live/src/model/ListEventSubRequest.cc | 36 +++++ live/src/model/ListEventSubResult.cc | 73 +++++++++ live/src/model/SendLiveMessageGroupRequest.cc | 73 ++++++--- live/src/model/UpdateEventSubRequest.cc | 79 ++++++++++ live/src/model/UpdateEventSubResult.cc | 44 ++++++ 22 files changed, 1302 insertions(+), 33 deletions(-) create mode 100644 live/include/alibabacloud/live/model/DescribeLiveDomainEdgeLogRequest.h create mode 100644 live/include/alibabacloud/live/model/DescribeLiveDomainEdgeLogResult.h create mode 100644 live/include/alibabacloud/live/model/ListEventSubEventRequest.h create mode 100644 live/include/alibabacloud/live/model/ListEventSubEventResult.h create mode 100644 live/include/alibabacloud/live/model/ListEventSubRequest.h create mode 100644 live/include/alibabacloud/live/model/ListEventSubResult.h create mode 100644 live/include/alibabacloud/live/model/UpdateEventSubRequest.h create mode 100644 live/include/alibabacloud/live/model/UpdateEventSubResult.h create mode 100644 live/src/model/DescribeLiveDomainEdgeLogRequest.cc create mode 100644 live/src/model/DescribeLiveDomainEdgeLogResult.cc create mode 100644 live/src/model/ListEventSubEventRequest.cc create mode 100644 live/src/model/ListEventSubEventResult.cc create mode 100644 live/src/model/ListEventSubRequest.cc create mode 100644 live/src/model/ListEventSubResult.cc create mode 100644 live/src/model/UpdateEventSubRequest.cc create mode 100644 live/src/model/UpdateEventSubResult.cc diff --git a/VERSION b/VERSION index fb26737ed..e902d6f9a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1825 \ No newline at end of file +1.36.1826 \ No newline at end of file diff --git a/live/CMakeLists.txt b/live/CMakeLists.txt index 089564735..66879c917 100644 --- a/live/CMakeLists.txt +++ b/live/CMakeLists.txt @@ -311,6 +311,8 @@ set(live_public_header_model include/alibabacloud/live/model/DescribeLiveDomainConfigsResult.h include/alibabacloud/live/model/DescribeLiveDomainDetailRequest.h include/alibabacloud/live/model/DescribeLiveDomainDetailResult.h + include/alibabacloud/live/model/DescribeLiveDomainEdgeLogRequest.h + include/alibabacloud/live/model/DescribeLiveDomainEdgeLogResult.h include/alibabacloud/live/model/DescribeLiveDomainFrameRateAndBitRateDataRequest.h include/alibabacloud/live/model/DescribeLiveDomainFrameRateAndBitRateDataResult.h include/alibabacloud/live/model/DescribeLiveDomainLimitRequest.h @@ -561,6 +563,10 @@ set(live_public_header_model include/alibabacloud/live/model/ListEdgeTranscodeJobResult.h include/alibabacloud/live/model/ListEdgeTranscodeTemplateRequest.h include/alibabacloud/live/model/ListEdgeTranscodeTemplateResult.h + include/alibabacloud/live/model/ListEventSubRequest.h + include/alibabacloud/live/model/ListEventSubResult.h + include/alibabacloud/live/model/ListEventSubEventRequest.h + include/alibabacloud/live/model/ListEventSubEventResult.h include/alibabacloud/live/model/ListLiveDelayConfigRequest.h include/alibabacloud/live/model/ListLiveDelayConfigResult.h include/alibabacloud/live/model/ListLiveMessageAppsRequest.h @@ -733,6 +739,8 @@ set(live_public_header_model include/alibabacloud/live/model/UpdateCasterSceneConfigResult.h include/alibabacloud/live/model/UpdateEdgeTranscodeJobRequest.h include/alibabacloud/live/model/UpdateEdgeTranscodeJobResult.h + include/alibabacloud/live/model/UpdateEventSubRequest.h + include/alibabacloud/live/model/UpdateEventSubResult.h include/alibabacloud/live/model/UpdateLiveAppRecordConfigRequest.h include/alibabacloud/live/model/UpdateLiveAppRecordConfigResult.h include/alibabacloud/live/model/UpdateLiveAppSnapshotConfigRequest.h @@ -1070,6 +1078,8 @@ set(live_src src/model/DescribeLiveDomainConfigsResult.cc src/model/DescribeLiveDomainDetailRequest.cc src/model/DescribeLiveDomainDetailResult.cc + src/model/DescribeLiveDomainEdgeLogRequest.cc + src/model/DescribeLiveDomainEdgeLogResult.cc src/model/DescribeLiveDomainFrameRateAndBitRateDataRequest.cc src/model/DescribeLiveDomainFrameRateAndBitRateDataResult.cc src/model/DescribeLiveDomainLimitRequest.cc @@ -1320,6 +1330,10 @@ set(live_src src/model/ListEdgeTranscodeJobResult.cc src/model/ListEdgeTranscodeTemplateRequest.cc src/model/ListEdgeTranscodeTemplateResult.cc + src/model/ListEventSubRequest.cc + src/model/ListEventSubResult.cc + src/model/ListEventSubEventRequest.cc + src/model/ListEventSubEventResult.cc src/model/ListLiveDelayConfigRequest.cc src/model/ListLiveDelayConfigResult.cc src/model/ListLiveMessageAppsRequest.cc @@ -1492,6 +1506,8 @@ set(live_src src/model/UpdateCasterSceneConfigResult.cc src/model/UpdateEdgeTranscodeJobRequest.cc src/model/UpdateEdgeTranscodeJobResult.cc + src/model/UpdateEventSubRequest.cc + src/model/UpdateEventSubResult.cc src/model/UpdateLiveAppRecordConfigRequest.cc src/model/UpdateLiveAppRecordConfigResult.cc src/model/UpdateLiveAppSnapshotConfigRequest.cc diff --git a/live/include/alibabacloud/live/LiveClient.h b/live/include/alibabacloud/live/LiveClient.h index 5d7415e96..859fb4bc6 100644 --- a/live/include/alibabacloud/live/LiveClient.h +++ b/live/include/alibabacloud/live/LiveClient.h @@ -312,6 +312,8 @@ #include "model/DescribeLiveDomainConfigsResult.h" #include "model/DescribeLiveDomainDetailRequest.h" #include "model/DescribeLiveDomainDetailResult.h" +#include "model/DescribeLiveDomainEdgeLogRequest.h" +#include "model/DescribeLiveDomainEdgeLogResult.h" #include "model/DescribeLiveDomainFrameRateAndBitRateDataRequest.h" #include "model/DescribeLiveDomainFrameRateAndBitRateDataResult.h" #include "model/DescribeLiveDomainLimitRequest.h" @@ -562,6 +564,10 @@ #include "model/ListEdgeTranscodeJobResult.h" #include "model/ListEdgeTranscodeTemplateRequest.h" #include "model/ListEdgeTranscodeTemplateResult.h" +#include "model/ListEventSubRequest.h" +#include "model/ListEventSubResult.h" +#include "model/ListEventSubEventRequest.h" +#include "model/ListEventSubEventResult.h" #include "model/ListLiveDelayConfigRequest.h" #include "model/ListLiveDelayConfigResult.h" #include "model/ListLiveMessageAppsRequest.h" @@ -734,6 +740,8 @@ #include "model/UpdateCasterSceneConfigResult.h" #include "model/UpdateEdgeTranscodeJobRequest.h" #include "model/UpdateEdgeTranscodeJobResult.h" +#include "model/UpdateEventSubRequest.h" +#include "model/UpdateEventSubResult.h" #include "model/UpdateLiveAppRecordConfigRequest.h" #include "model/UpdateLiveAppRecordConfigResult.h" #include "model/UpdateLiveAppSnapshotConfigRequest.h" @@ -1222,6 +1230,9 @@ namespace AlibabaCloud typedef Outcome DescribeLiveDomainDetailOutcome; typedef std::future DescribeLiveDomainDetailOutcomeCallable; typedef std::function&)> DescribeLiveDomainDetailAsyncHandler; + typedef Outcome DescribeLiveDomainEdgeLogOutcome; + typedef std::future DescribeLiveDomainEdgeLogOutcomeCallable; + typedef std::function&)> DescribeLiveDomainEdgeLogAsyncHandler; typedef Outcome DescribeLiveDomainFrameRateAndBitRateDataOutcome; typedef std::future DescribeLiveDomainFrameRateAndBitRateDataOutcomeCallable; typedef std::function&)> DescribeLiveDomainFrameRateAndBitRateDataAsyncHandler; @@ -1597,6 +1608,12 @@ namespace AlibabaCloud typedef Outcome ListEdgeTranscodeTemplateOutcome; typedef std::future ListEdgeTranscodeTemplateOutcomeCallable; typedef std::function&)> ListEdgeTranscodeTemplateAsyncHandler; + typedef Outcome ListEventSubOutcome; + typedef std::future ListEventSubOutcomeCallable; + typedef std::function&)> ListEventSubAsyncHandler; + typedef Outcome ListEventSubEventOutcome; + typedef std::future ListEventSubEventOutcomeCallable; + typedef std::function&)> ListEventSubEventAsyncHandler; typedef Outcome ListLiveDelayConfigOutcome; typedef std::future ListLiveDelayConfigOutcomeCallable; typedef std::function&)> ListLiveDelayConfigAsyncHandler; @@ -1855,6 +1872,9 @@ namespace AlibabaCloud typedef Outcome UpdateEdgeTranscodeJobOutcome; typedef std::future UpdateEdgeTranscodeJobOutcomeCallable; typedef std::function&)> UpdateEdgeTranscodeJobAsyncHandler; + typedef Outcome UpdateEventSubOutcome; + typedef std::future UpdateEventSubOutcomeCallable; + typedef std::function&)> UpdateEventSubAsyncHandler; typedef Outcome UpdateLiveAppRecordConfigOutcome; typedef std::future UpdateLiveAppRecordConfigOutcomeCallable; typedef std::function&)> UpdateLiveAppRecordConfigAsyncHandler; @@ -2361,6 +2381,9 @@ namespace AlibabaCloud DescribeLiveDomainDetailOutcome describeLiveDomainDetail(const Model::DescribeLiveDomainDetailRequest &request)const; void describeLiveDomainDetailAsync(const Model::DescribeLiveDomainDetailRequest& request, const DescribeLiveDomainDetailAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeLiveDomainDetailOutcomeCallable describeLiveDomainDetailCallable(const Model::DescribeLiveDomainDetailRequest& request) const; + DescribeLiveDomainEdgeLogOutcome describeLiveDomainEdgeLog(const Model::DescribeLiveDomainEdgeLogRequest &request)const; + void describeLiveDomainEdgeLogAsync(const Model::DescribeLiveDomainEdgeLogRequest& request, const DescribeLiveDomainEdgeLogAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeLiveDomainEdgeLogOutcomeCallable describeLiveDomainEdgeLogCallable(const Model::DescribeLiveDomainEdgeLogRequest& request) const; DescribeLiveDomainFrameRateAndBitRateDataOutcome describeLiveDomainFrameRateAndBitRateData(const Model::DescribeLiveDomainFrameRateAndBitRateDataRequest &request)const; void describeLiveDomainFrameRateAndBitRateDataAsync(const Model::DescribeLiveDomainFrameRateAndBitRateDataRequest& request, const DescribeLiveDomainFrameRateAndBitRateDataAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeLiveDomainFrameRateAndBitRateDataOutcomeCallable describeLiveDomainFrameRateAndBitRateDataCallable(const Model::DescribeLiveDomainFrameRateAndBitRateDataRequest& request) const; @@ -2736,6 +2759,12 @@ namespace AlibabaCloud ListEdgeTranscodeTemplateOutcome listEdgeTranscodeTemplate(const Model::ListEdgeTranscodeTemplateRequest &request)const; void listEdgeTranscodeTemplateAsync(const Model::ListEdgeTranscodeTemplateRequest& request, const ListEdgeTranscodeTemplateAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListEdgeTranscodeTemplateOutcomeCallable listEdgeTranscodeTemplateCallable(const Model::ListEdgeTranscodeTemplateRequest& request) const; + ListEventSubOutcome listEventSub(const Model::ListEventSubRequest &request)const; + void listEventSubAsync(const Model::ListEventSubRequest& request, const ListEventSubAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListEventSubOutcomeCallable listEventSubCallable(const Model::ListEventSubRequest& request) const; + ListEventSubEventOutcome listEventSubEvent(const Model::ListEventSubEventRequest &request)const; + void listEventSubEventAsync(const Model::ListEventSubEventRequest& request, const ListEventSubEventAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListEventSubEventOutcomeCallable listEventSubEventCallable(const Model::ListEventSubEventRequest& request) const; ListLiveDelayConfigOutcome listLiveDelayConfig(const Model::ListLiveDelayConfigRequest &request)const; void listLiveDelayConfigAsync(const Model::ListLiveDelayConfigRequest& request, const ListLiveDelayConfigAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListLiveDelayConfigOutcomeCallable listLiveDelayConfigCallable(const Model::ListLiveDelayConfigRequest& request) const; @@ -2994,6 +3023,9 @@ namespace AlibabaCloud UpdateEdgeTranscodeJobOutcome updateEdgeTranscodeJob(const Model::UpdateEdgeTranscodeJobRequest &request)const; void updateEdgeTranscodeJobAsync(const Model::UpdateEdgeTranscodeJobRequest& request, const UpdateEdgeTranscodeJobAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; UpdateEdgeTranscodeJobOutcomeCallable updateEdgeTranscodeJobCallable(const Model::UpdateEdgeTranscodeJobRequest& request) const; + UpdateEventSubOutcome updateEventSub(const Model::UpdateEventSubRequest &request)const; + void updateEventSubAsync(const Model::UpdateEventSubRequest& request, const UpdateEventSubAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + UpdateEventSubOutcomeCallable updateEventSubCallable(const Model::UpdateEventSubRequest& request) const; UpdateLiveAppRecordConfigOutcome updateLiveAppRecordConfig(const Model::UpdateLiveAppRecordConfigRequest &request)const; void updateLiveAppRecordConfigAsync(const Model::UpdateLiveAppRecordConfigRequest& request, const UpdateLiveAppRecordConfigAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; UpdateLiveAppRecordConfigOutcomeCallable updateLiveAppRecordConfigCallable(const Model::UpdateLiveAppRecordConfigRequest& request) const; diff --git a/live/include/alibabacloud/live/model/DescribeLiveDomainEdgeLogRequest.h b/live/include/alibabacloud/live/model/DescribeLiveDomainEdgeLogRequest.h new file mode 100644 index 000000000..7c28b1a94 --- /dev/null +++ b/live/include/alibabacloud/live/model/DescribeLiveDomainEdgeLogRequest.h @@ -0,0 +1,60 @@ +/* + * 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_DESCRIBELIVEDOMAINEDGELOGREQUEST_H_ +#define ALIBABACLOUD_LIVE_MODEL_DESCRIBELIVEDOMAINEDGELOGREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Live { +namespace Model { +class ALIBABACLOUD_LIVE_EXPORT DescribeLiveDomainEdgeLogRequest : public RpcServiceRequest { +public: + DescribeLiveDomainEdgeLogRequest(); + ~DescribeLiveDomainEdgeLogRequest(); + std::string getStartTime() const; + void setStartTime(const std::string &startTime); + long getPageNumber() const; + void setPageNumber(long pageNumber); + std::string getLogType() const; + void setLogType(const std::string &logType); + long getPageSize() const; + void setPageSize(long pageSize); + 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 startTime_; + long pageNumber_; + std::string logType_; + long pageSize_; + std::string domainName_; + std::string endTime_; + long ownerId_; +}; +} // namespace Model +} // namespace Live +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_LIVE_MODEL_DESCRIBELIVEDOMAINEDGELOGREQUEST_H_ diff --git a/live/include/alibabacloud/live/model/DescribeLiveDomainEdgeLogResult.h b/live/include/alibabacloud/live/model/DescribeLiveDomainEdgeLogResult.h new file mode 100644 index 000000000..9d36f2a9c --- /dev/null +++ b/live/include/alibabacloud/live/model/DescribeLiveDomainEdgeLogResult.h @@ -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. + */ + +#ifndef ALIBABACLOUD_LIVE_MODEL_DESCRIBELIVEDOMAINEDGELOGRESULT_H_ +#define ALIBABACLOUD_LIVE_MODEL_DESCRIBELIVEDOMAINEDGELOGRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Live + { + namespace Model + { + class ALIBABACLOUD_LIVE_EXPORT DescribeLiveDomainEdgeLogResult : public ServiceResult + { + public: + struct DomainLogDetail + { + struct PageInfos + { + long pageSize; + long total; + long pageIndex; + }; + struct LogInfoDetail + { + long logSize; + std::string endTime; + std::string startTime; + std::string logName; + std::string logPath; + }; + std::vector logInfos; + PageInfos pageInfos; + long logCount; + }; + + + DescribeLiveDomainEdgeLogResult(); + explicit DescribeLiveDomainEdgeLogResult(const std::string &payload); + ~DescribeLiveDomainEdgeLogResult(); + std::string getDomainName()const; + std::vector getDomainLogDetails()const; + + protected: + void parse(const std::string &payload); + private: + std::string domainName_; + std::vector domainLogDetails_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LIVE_MODEL_DESCRIBELIVEDOMAINEDGELOGRESULT_H_ \ No newline at end of file diff --git a/live/include/alibabacloud/live/model/ListEventSubEventRequest.h b/live/include/alibabacloud/live/model/ListEventSubEventRequest.h new file mode 100644 index 000000000..b5245dae6 --- /dev/null +++ b/live/include/alibabacloud/live/model/ListEventSubEventRequest.h @@ -0,0 +1,57 @@ +/* + * 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_LISTEVENTSUBEVENTREQUEST_H_ +#define ALIBABACLOUD_LIVE_MODEL_LISTEVENTSUBEVENTREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Live { +namespace Model { +class ALIBABACLOUD_LIVE_EXPORT ListEventSubEventRequest : public RpcServiceRequest { +public: + ListEventSubEventRequest(); + ~ListEventSubEventRequest(); + std::string getSubscribeId() const; + void setSubscribeId(const std::string &subscribeId); + long getEndTime() const; + void setEndTime(long endTime); + long getStartTime() const; + void setStartTime(long startTime); + long getPageNo() const; + void setPageNo(long pageNo); + std::string getAppId() const; + void setAppId(const std::string &appId); + long getPageSize() const; + void setPageSize(long pageSize); + +private: + std::string subscribeId_; + long endTime_; + long startTime_; + long pageNo_; + std::string appId_; + long pageSize_; +}; +} // namespace Model +} // namespace Live +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_LIVE_MODEL_LISTEVENTSUBEVENTREQUEST_H_ diff --git a/live/include/alibabacloud/live/model/ListEventSubEventResult.h b/live/include/alibabacloud/live/model/ListEventSubEventResult.h new file mode 100644 index 000000000..dc21b1384 --- /dev/null +++ b/live/include/alibabacloud/live/model/ListEventSubEventResult.h @@ -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. + */ + +#ifndef ALIBABACLOUD_LIVE_MODEL_LISTEVENTSUBEVENTRESULT_H_ +#define ALIBABACLOUD_LIVE_MODEL_LISTEVENTSUBEVENTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Live + { + namespace Model + { + class ALIBABACLOUD_LIVE_EXPORT ListEventSubEventResult : public ServiceResult + { + public: + struct LogsItem + { + std::string subId; + std::string appId; + std::string data; + std::string time; + int cost; + int code; + std::string url; + std::string messageId; + }; + + + ListEventSubEventResult(); + explicit ListEventSubEventResult(const std::string &payload); + ~ListEventSubEventResult(); + bool getHasMore()const; + std::vector getLogs()const; + long getCount()const; + + protected: + void parse(const std::string &payload); + private: + bool hasMore_; + std::vector logs_; + long count_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LIVE_MODEL_LISTEVENTSUBEVENTRESULT_H_ \ No newline at end of file diff --git a/live/include/alibabacloud/live/model/ListEventSubRequest.h b/live/include/alibabacloud/live/model/ListEventSubRequest.h new file mode 100644 index 000000000..c8a1b263f --- /dev/null +++ b/live/include/alibabacloud/live/model/ListEventSubRequest.h @@ -0,0 +1,42 @@ +/* + * 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_LISTEVENTSUBREQUEST_H_ +#define ALIBABACLOUD_LIVE_MODEL_LISTEVENTSUBREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Live { +namespace Model { +class ALIBABACLOUD_LIVE_EXPORT ListEventSubRequest : public RpcServiceRequest { +public: + ListEventSubRequest(); + ~ListEventSubRequest(); + std::string getAppId() const; + void setAppId(const std::string &appId); + +private: + std::string appId_; +}; +} // namespace Model +} // namespace Live +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_LIVE_MODEL_LISTEVENTSUBREQUEST_H_ diff --git a/live/include/alibabacloud/live/model/ListEventSubResult.h b/live/include/alibabacloud/live/model/ListEventSubResult.h new file mode 100644 index 000000000..8a1df4993 --- /dev/null +++ b/live/include/alibabacloud/live/model/ListEventSubResult.h @@ -0,0 +1,62 @@ +/* + * 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_LISTEVENTSUBRESULT_H_ +#define ALIBABACLOUD_LIVE_MODEL_LISTEVENTSUBRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Live + { + namespace Model + { + class ALIBABACLOUD_LIVE_EXPORT ListEventSubResult : public ServiceResult + { + public: + struct Data + { + std::string callbackUrl; + std::string modifyTime; + std::string subId; + std::vector events; + std::string createTime; + int roles; + std::vector users; + std::string channelId; + }; + + + ListEventSubResult(); + explicit ListEventSubResult(const std::string &payload); + ~ListEventSubResult(); + std::vector getSubscribers()const; + + protected: + void parse(const std::string &payload); + private: + std::vector subscribers_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LIVE_MODEL_LISTEVENTSUBRESULT_H_ \ No newline at end of file diff --git a/live/include/alibabacloud/live/model/SendLiveMessageGroupRequest.h b/live/include/alibabacloud/live/model/SendLiveMessageGroupRequest.h index 97cf728dd..543c21b16 100644 --- a/live/include/alibabacloud/live/model/SendLiveMessageGroupRequest.h +++ b/live/include/alibabacloud/live/model/SendLiveMessageGroupRequest.h @@ -30,32 +30,41 @@ class ALIBABACLOUD_LIVE_EXPORT SendLiveMessageGroupRequest : public RpcServiceRe public: SendLiveMessageGroupRequest(); ~SendLiveMessageGroupRequest(); - std::string getGroupId() const; - void setGroupId(const std::string &groupId); std::string getSenderMetaInfo() const; void setSenderMetaInfo(const std::string &senderMetaInfo); + std::string getBody() const; + void setBody(const std::string &body); + long getStaticsIncrease() const; + void setStaticsIncrease(long staticsIncrease); + long getMsgType() const; + void setMsgType(long msgType); + bool getNoStorage() const; + void setNoStorage(bool noStorage); + std::string getGroupId() const; + void setGroupId(const std::string &groupId); + long getWeight() const; + void setWeight(long weight); std::string getDataCenter() const; void setDataCenter(const std::string &dataCenter); std::string getMsgTid() const; void setMsgTid(const std::string &msgTid); - std::string getBody() const; - void setBody(const std::string &body); std::string getSenderId() const; void setSenderId(const std::string &senderId); std::string getAppId() const; void setAppId(const std::string &appId); - long getMsgType() const; - void setMsgType(long msgType); private: - std::string groupId_; std::string senderMetaInfo_; + std::string body_; + long staticsIncrease_; + long msgType_; + bool noStorage_; + std::string groupId_; + long weight_; std::string dataCenter_; std::string msgTid_; - std::string body_; std::string senderId_; std::string appId_; - long msgType_; }; } // namespace Model } // namespace Live diff --git a/live/include/alibabacloud/live/model/UpdateEventSubRequest.h b/live/include/alibabacloud/live/model/UpdateEventSubRequest.h new file mode 100644 index 000000000..63e9dda4c --- /dev/null +++ b/live/include/alibabacloud/live/model/UpdateEventSubRequest.h @@ -0,0 +1,57 @@ +/* + * 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_UPDATEEVENTSUBREQUEST_H_ +#define ALIBABACLOUD_LIVE_MODEL_UPDATEEVENTSUBREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Live { +namespace Model { +class ALIBABACLOUD_LIVE_EXPORT UpdateEventSubRequest : public RpcServiceRequest { +public: + UpdateEventSubRequest(); + ~UpdateEventSubRequest(); + std::string getSubscribeId() const; + void setSubscribeId(const std::string &subscribeId); + std::vector getUsers() const; + void setUsers(const std::vector &users); + std::string getAppId() const; + void setAppId(const std::string &appId); + std::string getCallbackUrl() const; + void setCallbackUrl(const std::string &callbackUrl); + std::string getChannelId() const; + void setChannelId(const std::string &channelId); + std::vector getEvents() const; + void setEvents(const std::vector &events); + +private: + std::string subscribeId_; + std::vector users_; + std::string appId_; + std::string callbackUrl_; + std::string channelId_; + std::vector events_; +}; +} // namespace Model +} // namespace Live +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_LIVE_MODEL_UPDATEEVENTSUBREQUEST_H_ diff --git a/live/include/alibabacloud/live/model/UpdateEventSubResult.h b/live/include/alibabacloud/live/model/UpdateEventSubResult.h new file mode 100644 index 000000000..c5e2c662f --- /dev/null +++ b/live/include/alibabacloud/live/model/UpdateEventSubResult.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_UPDATEEVENTSUBRESULT_H_ +#define ALIBABACLOUD_LIVE_MODEL_UPDATEEVENTSUBRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Live + { + namespace Model + { + class ALIBABACLOUD_LIVE_EXPORT UpdateEventSubResult : public ServiceResult + { + public: + + + UpdateEventSubResult(); + explicit UpdateEventSubResult(const std::string &payload); + ~UpdateEventSubResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_LIVE_MODEL_UPDATEEVENTSUBRESULT_H_ \ No newline at end of file diff --git a/live/src/LiveClient.cc b/live/src/LiveClient.cc index 929ddfce2..0221bb469 100644 --- a/live/src/LiveClient.cc +++ b/live/src/LiveClient.cc @@ -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& 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>( + [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& 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>( + [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& 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>( + [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& 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>( + [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(); diff --git a/live/src/model/DescribeLiveDomainEdgeLogRequest.cc b/live/src/model/DescribeLiveDomainEdgeLogRequest.cc new file mode 100644 index 000000000..b930c15dd --- /dev/null +++ b/live/src/model/DescribeLiveDomainEdgeLogRequest.cc @@ -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 + +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)); +} + diff --git a/live/src/model/DescribeLiveDomainEdgeLogResult.cc b/live/src/model/DescribeLiveDomainEdgeLogResult.cc new file mode 100644 index 000000000..859c222b3 --- /dev/null +++ b/live/src/model/DescribeLiveDomainEdgeLogResult.cc @@ -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 +#include + +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::getDomainLogDetails()const +{ + return domainLogDetails_; +} + diff --git a/live/src/model/ListEventSubEventRequest.cc b/live/src/model/ListEventSubEventRequest.cc new file mode 100644 index 000000000..dff899819 --- /dev/null +++ b/live/src/model/ListEventSubEventRequest.cc @@ -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 + +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)); +} + diff --git a/live/src/model/ListEventSubEventResult.cc b/live/src/model/ListEventSubEventResult.cc new file mode 100644 index 000000000..0399ef6a5 --- /dev/null +++ b/live/src/model/ListEventSubEventResult.cc @@ -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 +#include + +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::getLogs()const +{ + return logs_; +} + +long ListEventSubEventResult::getCount()const +{ + return count_; +} + diff --git a/live/src/model/ListEventSubRequest.cc b/live/src/model/ListEventSubRequest.cc new file mode 100644 index 000000000..b012c1eb1 --- /dev/null +++ b/live/src/model/ListEventSubRequest.cc @@ -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 + +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); +} + diff --git a/live/src/model/ListEventSubResult.cc b/live/src/model/ListEventSubResult.cc new file mode 100644 index 000000000..73f0a440b --- /dev/null +++ b/live/src/model/ListEventSubResult.cc @@ -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 +#include + +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::getSubscribers()const +{ + return subscribers_; +} + diff --git a/live/src/model/SendLiveMessageGroupRequest.cc b/live/src/model/SendLiveMessageGroupRequest.cc index 91168c724..0cf7c17de 100644 --- a/live/src/model/SendLiveMessageGroupRequest.cc +++ b/live/src/model/SendLiveMessageGroupRequest.cc @@ -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)); -} - diff --git a/live/src/model/UpdateEventSubRequest.cc b/live/src/model/UpdateEventSubRequest.cc new file mode 100644 index 000000000..c0b06ff19 --- /dev/null +++ b/live/src/model/UpdateEventSubRequest.cc @@ -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 + +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 UpdateEventSubRequest::getUsers() const { + return users_; +} + +void UpdateEventSubRequest::setUsers(const std::vector &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 UpdateEventSubRequest::getEvents() const { + return events_; +} + +void UpdateEventSubRequest::setEvents(const std::vector &events) { + events_ = events; +} + diff --git a/live/src/model/UpdateEventSubResult.cc b/live/src/model/UpdateEventSubResult.cc new file mode 100644 index 000000000..9e9609096 --- /dev/null +++ b/live/src/model/UpdateEventSubResult.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 +#include + +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()); + +} +