From 25cf7939ecc5cb38d7abeeca9283c1142280eb5b Mon Sep 17 00:00:00 2001 From: sdk-team Date: Tue, 16 May 2023 08:29:48 +0000 Subject: [PATCH] Live sdk update. --- VERSION | 2 +- live/CMakeLists.txt | 16 ++ live/include/alibabacloud/live/LiveClient.h | 32 ++++ .../live/model/CreateEventSubRequest.h | 60 ++++++++ .../live/model/CreateEventSubResult.h | 51 +++++++ .../live/model/DeleteEventSubRequest.h | 45 ++++++ .../live/model/DeleteEventSubResult.h | 49 ++++++ .../DescribeChannelParticipantsRequest.h | 54 +++++++ .../model/DescribeChannelParticipantsResult.h | 57 +++++++ .../live/model/RemoveTerminalsRequest.h | 48 ++++++ .../live/model/RemoveTerminalsResult.h | 57 +++++++ live/src/LiveClient.cc | 144 ++++++++++++++++++ live/src/model/CreateEventSubRequest.cc | 88 +++++++++++ live/src/model/CreateEventSubResult.cc | 51 +++++++ live/src/model/DeleteEventSubRequest.cc | 45 ++++++ live/src/model/DeleteEventSubResult.cc | 44 ++++++ .../DescribeChannelParticipantsRequest.cc | 72 +++++++++ .../DescribeChannelParticipantsResult.cc | 73 +++++++++ live/src/model/RemoveTerminalsRequest.cc | 53 +++++++ live/src/model/RemoveTerminalsResult.cc | 61 ++++++++ 20 files changed, 1101 insertions(+), 1 deletion(-) create mode 100644 live/include/alibabacloud/live/model/CreateEventSubRequest.h create mode 100644 live/include/alibabacloud/live/model/CreateEventSubResult.h create mode 100644 live/include/alibabacloud/live/model/DeleteEventSubRequest.h create mode 100644 live/include/alibabacloud/live/model/DeleteEventSubResult.h create mode 100644 live/include/alibabacloud/live/model/DescribeChannelParticipantsRequest.h create mode 100644 live/include/alibabacloud/live/model/DescribeChannelParticipantsResult.h create mode 100644 live/include/alibabacloud/live/model/RemoveTerminalsRequest.h create mode 100644 live/include/alibabacloud/live/model/RemoveTerminalsResult.h create mode 100644 live/src/model/CreateEventSubRequest.cc create mode 100644 live/src/model/CreateEventSubResult.cc create mode 100644 live/src/model/DeleteEventSubRequest.cc create mode 100644 live/src/model/DeleteEventSubResult.cc create mode 100644 live/src/model/DescribeChannelParticipantsRequest.cc create mode 100644 live/src/model/DescribeChannelParticipantsResult.cc create mode 100644 live/src/model/RemoveTerminalsRequest.cc create mode 100644 live/src/model/RemoveTerminalsResult.cc diff --git a/VERSION b/VERSION index baba3c3c1..4287775fe 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1573 \ No newline at end of file +1.36.1574 \ No newline at end of file diff --git a/live/CMakeLists.txt b/live/CMakeLists.txt index bdcec13b0..07ebe2ac7 100644 --- a/live/CMakeLists.txt +++ b/live/CMakeLists.txt @@ -105,6 +105,8 @@ set(live_public_header_model include/alibabacloud/live/model/CreateCasterResult.h include/alibabacloud/live/model/CreateCustomTemplateRequest.h include/alibabacloud/live/model/CreateCustomTemplateResult.h + include/alibabacloud/live/model/CreateEventSubRequest.h + include/alibabacloud/live/model/CreateEventSubResult.h include/alibabacloud/live/model/CreateLiveDelayConfigRequest.h include/alibabacloud/live/model/CreateLiveDelayConfigResult.h include/alibabacloud/live/model/CreateLiveRealTimeLogDeliveryRequest.h @@ -139,6 +141,8 @@ set(live_public_header_model include/alibabacloud/live/model/DeleteCasterVideoResourceResult.h include/alibabacloud/live/model/DeleteCustomTemplateRequest.h include/alibabacloud/live/model/DeleteCustomTemplateResult.h + include/alibabacloud/live/model/DeleteEventSubRequest.h + include/alibabacloud/live/model/DeleteEventSubResult.h include/alibabacloud/live/model/DeleteLiveAppRecordConfigRequest.h include/alibabacloud/live/model/DeleteLiveAppRecordConfigResult.h include/alibabacloud/live/model/DeleteLiveAppSnapshotConfigRequest.h @@ -233,6 +237,8 @@ set(live_public_header_model include/alibabacloud/live/model/DescribeCasterVideoResourcesResult.h include/alibabacloud/live/model/DescribeCastersRequest.h include/alibabacloud/live/model/DescribeCastersResult.h + include/alibabacloud/live/model/DescribeChannelParticipantsRequest.h + include/alibabacloud/live/model/DescribeChannelParticipantsResult.h include/alibabacloud/live/model/DescribeDomainUsageDataRequest.h include/alibabacloud/live/model/DescribeDomainUsageDataResult.h include/alibabacloud/live/model/DescribeDomainWithIntegrityRequest.h @@ -535,6 +541,8 @@ set(live_public_header_model include/alibabacloud/live/model/RealTimeSnapshotCommandResult.h include/alibabacloud/live/model/RemoveShowFromShowListRequest.h include/alibabacloud/live/model/RemoveShowFromShowListResult.h + include/alibabacloud/live/model/RemoveTerminalsRequest.h + include/alibabacloud/live/model/RemoveTerminalsResult.h include/alibabacloud/live/model/RestartCasterRequest.h include/alibabacloud/live/model/RestartCasterResult.h include/alibabacloud/live/model/ResumeLiveStreamRequest.h @@ -730,6 +738,8 @@ set(live_src src/model/CreateCasterResult.cc src/model/CreateCustomTemplateRequest.cc src/model/CreateCustomTemplateResult.cc + src/model/CreateEventSubRequest.cc + src/model/CreateEventSubResult.cc src/model/CreateLiveDelayConfigRequest.cc src/model/CreateLiveDelayConfigResult.cc src/model/CreateLiveRealTimeLogDeliveryRequest.cc @@ -764,6 +774,8 @@ set(live_src src/model/DeleteCasterVideoResourceResult.cc src/model/DeleteCustomTemplateRequest.cc src/model/DeleteCustomTemplateResult.cc + src/model/DeleteEventSubRequest.cc + src/model/DeleteEventSubResult.cc src/model/DeleteLiveAppRecordConfigRequest.cc src/model/DeleteLiveAppRecordConfigResult.cc src/model/DeleteLiveAppSnapshotConfigRequest.cc @@ -858,6 +870,8 @@ set(live_src src/model/DescribeCasterVideoResourcesResult.cc src/model/DescribeCastersRequest.cc src/model/DescribeCastersResult.cc + src/model/DescribeChannelParticipantsRequest.cc + src/model/DescribeChannelParticipantsResult.cc src/model/DescribeDomainUsageDataRequest.cc src/model/DescribeDomainUsageDataResult.cc src/model/DescribeDomainWithIntegrityRequest.cc @@ -1160,6 +1174,8 @@ set(live_src src/model/RealTimeSnapshotCommandResult.cc src/model/RemoveShowFromShowListRequest.cc src/model/RemoveShowFromShowListResult.cc + src/model/RemoveTerminalsRequest.cc + src/model/RemoveTerminalsResult.cc src/model/RestartCasterRequest.cc src/model/RestartCasterResult.cc src/model/ResumeLiveStreamRequest.cc diff --git a/live/include/alibabacloud/live/LiveClient.h b/live/include/alibabacloud/live/LiveClient.h index 739dd86db..5a02c2b32 100644 --- a/live/include/alibabacloud/live/LiveClient.h +++ b/live/include/alibabacloud/live/LiveClient.h @@ -106,6 +106,8 @@ #include "model/CreateCasterResult.h" #include "model/CreateCustomTemplateRequest.h" #include "model/CreateCustomTemplateResult.h" +#include "model/CreateEventSubRequest.h" +#include "model/CreateEventSubResult.h" #include "model/CreateLiveDelayConfigRequest.h" #include "model/CreateLiveDelayConfigResult.h" #include "model/CreateLiveRealTimeLogDeliveryRequest.h" @@ -140,6 +142,8 @@ #include "model/DeleteCasterVideoResourceResult.h" #include "model/DeleteCustomTemplateRequest.h" #include "model/DeleteCustomTemplateResult.h" +#include "model/DeleteEventSubRequest.h" +#include "model/DeleteEventSubResult.h" #include "model/DeleteLiveAppRecordConfigRequest.h" #include "model/DeleteLiveAppRecordConfigResult.h" #include "model/DeleteLiveAppSnapshotConfigRequest.h" @@ -234,6 +238,8 @@ #include "model/DescribeCasterVideoResourcesResult.h" #include "model/DescribeCastersRequest.h" #include "model/DescribeCastersResult.h" +#include "model/DescribeChannelParticipantsRequest.h" +#include "model/DescribeChannelParticipantsResult.h" #include "model/DescribeDomainUsageDataRequest.h" #include "model/DescribeDomainUsageDataResult.h" #include "model/DescribeDomainWithIntegrityRequest.h" @@ -536,6 +542,8 @@ #include "model/RealTimeSnapshotCommandResult.h" #include "model/RemoveShowFromShowListRequest.h" #include "model/RemoveShowFromShowListResult.h" +#include "model/RemoveTerminalsRequest.h" +#include "model/RemoveTerminalsResult.h" #include "model/RestartCasterRequest.h" #include "model/RestartCasterResult.h" #include "model/ResumeLiveStreamRequest.h" @@ -779,6 +787,9 @@ namespace AlibabaCloud typedef Outcome CreateCustomTemplateOutcome; typedef std::future CreateCustomTemplateOutcomeCallable; typedef std::function&)> CreateCustomTemplateAsyncHandler; + typedef Outcome CreateEventSubOutcome; + typedef std::future CreateEventSubOutcomeCallable; + typedef std::function&)> CreateEventSubAsyncHandler; typedef Outcome CreateLiveDelayConfigOutcome; typedef std::future CreateLiveDelayConfigOutcomeCallable; typedef std::function&)> CreateLiveDelayConfigAsyncHandler; @@ -830,6 +841,9 @@ namespace AlibabaCloud typedef Outcome DeleteCustomTemplateOutcome; typedef std::future DeleteCustomTemplateOutcomeCallable; typedef std::function&)> DeleteCustomTemplateAsyncHandler; + typedef Outcome DeleteEventSubOutcome; + typedef std::future DeleteEventSubOutcomeCallable; + typedef std::function&)> DeleteEventSubAsyncHandler; typedef Outcome DeleteLiveAppRecordConfigOutcome; typedef std::future DeleteLiveAppRecordConfigOutcomeCallable; typedef std::function&)> DeleteLiveAppRecordConfigAsyncHandler; @@ -971,6 +985,9 @@ namespace AlibabaCloud typedef Outcome DescribeCastersOutcome; typedef std::future DescribeCastersOutcomeCallable; typedef std::function&)> DescribeCastersAsyncHandler; + typedef Outcome DescribeChannelParticipantsOutcome; + typedef std::future DescribeChannelParticipantsOutcomeCallable; + typedef std::function&)> DescribeChannelParticipantsAsyncHandler; typedef Outcome DescribeDomainUsageDataOutcome; typedef std::future DescribeDomainUsageDataOutcomeCallable; typedef std::function&)> DescribeDomainUsageDataAsyncHandler; @@ -1424,6 +1441,9 @@ namespace AlibabaCloud typedef Outcome RemoveShowFromShowListOutcome; typedef std::future RemoveShowFromShowListOutcomeCallable; typedef std::function&)> RemoveShowFromShowListAsyncHandler; + typedef Outcome RemoveTerminalsOutcome; + typedef std::future RemoveTerminalsOutcomeCallable; + typedef std::function&)> RemoveTerminalsAsyncHandler; typedef Outcome RestartCasterOutcome; typedef std::future RestartCasterOutcomeCallable; typedef std::function&)> RestartCasterAsyncHandler; @@ -1717,6 +1737,9 @@ namespace AlibabaCloud CreateCustomTemplateOutcome createCustomTemplate(const Model::CreateCustomTemplateRequest &request)const; void createCustomTemplateAsync(const Model::CreateCustomTemplateRequest& request, const CreateCustomTemplateAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CreateCustomTemplateOutcomeCallable createCustomTemplateCallable(const Model::CreateCustomTemplateRequest& request) const; + CreateEventSubOutcome createEventSub(const Model::CreateEventSubRequest &request)const; + void createEventSubAsync(const Model::CreateEventSubRequest& request, const CreateEventSubAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CreateEventSubOutcomeCallable createEventSubCallable(const Model::CreateEventSubRequest& request) const; CreateLiveDelayConfigOutcome createLiveDelayConfig(const Model::CreateLiveDelayConfigRequest &request)const; void createLiveDelayConfigAsync(const Model::CreateLiveDelayConfigRequest& request, const CreateLiveDelayConfigAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CreateLiveDelayConfigOutcomeCallable createLiveDelayConfigCallable(const Model::CreateLiveDelayConfigRequest& request) const; @@ -1768,6 +1791,9 @@ namespace AlibabaCloud DeleteCustomTemplateOutcome deleteCustomTemplate(const Model::DeleteCustomTemplateRequest &request)const; void deleteCustomTemplateAsync(const Model::DeleteCustomTemplateRequest& request, const DeleteCustomTemplateAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DeleteCustomTemplateOutcomeCallable deleteCustomTemplateCallable(const Model::DeleteCustomTemplateRequest& request) const; + DeleteEventSubOutcome deleteEventSub(const Model::DeleteEventSubRequest &request)const; + void deleteEventSubAsync(const Model::DeleteEventSubRequest& request, const DeleteEventSubAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DeleteEventSubOutcomeCallable deleteEventSubCallable(const Model::DeleteEventSubRequest& request) const; DeleteLiveAppRecordConfigOutcome deleteLiveAppRecordConfig(const Model::DeleteLiveAppRecordConfigRequest &request)const; void deleteLiveAppRecordConfigAsync(const Model::DeleteLiveAppRecordConfigRequest& request, const DeleteLiveAppRecordConfigAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DeleteLiveAppRecordConfigOutcomeCallable deleteLiveAppRecordConfigCallable(const Model::DeleteLiveAppRecordConfigRequest& request) const; @@ -1909,6 +1935,9 @@ namespace AlibabaCloud DescribeCastersOutcome describeCasters(const Model::DescribeCastersRequest &request)const; void describeCastersAsync(const Model::DescribeCastersRequest& request, const DescribeCastersAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeCastersOutcomeCallable describeCastersCallable(const Model::DescribeCastersRequest& request) const; + DescribeChannelParticipantsOutcome describeChannelParticipants(const Model::DescribeChannelParticipantsRequest &request)const; + void describeChannelParticipantsAsync(const Model::DescribeChannelParticipantsRequest& request, const DescribeChannelParticipantsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeChannelParticipantsOutcomeCallable describeChannelParticipantsCallable(const Model::DescribeChannelParticipantsRequest& request) const; DescribeDomainUsageDataOutcome describeDomainUsageData(const Model::DescribeDomainUsageDataRequest &request)const; void describeDomainUsageDataAsync(const Model::DescribeDomainUsageDataRequest& request, const DescribeDomainUsageDataAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeDomainUsageDataOutcomeCallable describeDomainUsageDataCallable(const Model::DescribeDomainUsageDataRequest& request) const; @@ -2362,6 +2391,9 @@ namespace AlibabaCloud RemoveShowFromShowListOutcome removeShowFromShowList(const Model::RemoveShowFromShowListRequest &request)const; void removeShowFromShowListAsync(const Model::RemoveShowFromShowListRequest& request, const RemoveShowFromShowListAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; RemoveShowFromShowListOutcomeCallable removeShowFromShowListCallable(const Model::RemoveShowFromShowListRequest& request) const; + RemoveTerminalsOutcome removeTerminals(const Model::RemoveTerminalsRequest &request)const; + void removeTerminalsAsync(const Model::RemoveTerminalsRequest& request, const RemoveTerminalsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + RemoveTerminalsOutcomeCallable removeTerminalsCallable(const Model::RemoveTerminalsRequest& request) const; RestartCasterOutcome restartCaster(const Model::RestartCasterRequest &request)const; void restartCasterAsync(const Model::RestartCasterRequest& request, const RestartCasterAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; RestartCasterOutcomeCallable restartCasterCallable(const Model::RestartCasterRequest& request) const; diff --git a/live/include/alibabacloud/live/model/CreateEventSubRequest.h b/live/include/alibabacloud/live/model/CreateEventSubRequest.h new file mode 100644 index 000000000..ebe4f74ab --- /dev/null +++ b/live/include/alibabacloud/live/model/CreateEventSubRequest.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_CREATEEVENTSUBREQUEST_H_ +#define ALIBABACLOUD_LIVE_MODEL_CREATEEVENTSUBREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Live { +namespace Model { +class ALIBABACLOUD_LIVE_EXPORT CreateEventSubRequest : public RpcServiceRequest { +public: + CreateEventSubRequest(); + ~CreateEventSubRequest(); + int getRole() const; + void setRole(int role); + std::string getClientToken() const; + void setClientToken(const std::string &clientToken); + 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: + int role_; + std::string clientToken_; + 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_CREATEEVENTSUBREQUEST_H_ diff --git a/live/include/alibabacloud/live/model/CreateEventSubResult.h b/live/include/alibabacloud/live/model/CreateEventSubResult.h new file mode 100644 index 000000000..da990c930 --- /dev/null +++ b/live/include/alibabacloud/live/model/CreateEventSubResult.h @@ -0,0 +1,51 @@ +/* + * 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_CREATEEVENTSUBRESULT_H_ +#define ALIBABACLOUD_LIVE_MODEL_CREATEEVENTSUBRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Live + { + namespace Model + { + class ALIBABACLOUD_LIVE_EXPORT CreateEventSubResult : public ServiceResult + { + public: + + + CreateEventSubResult(); + explicit CreateEventSubResult(const std::string &payload); + ~CreateEventSubResult(); + std::string getSubscribeId()const; + + protected: + void parse(const std::string &payload); + private: + std::string subscribeId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LIVE_MODEL_CREATEEVENTSUBRESULT_H_ \ No newline at end of file diff --git a/live/include/alibabacloud/live/model/DeleteEventSubRequest.h b/live/include/alibabacloud/live/model/DeleteEventSubRequest.h new file mode 100644 index 000000000..066a03203 --- /dev/null +++ b/live/include/alibabacloud/live/model/DeleteEventSubRequest.h @@ -0,0 +1,45 @@ +/* + * 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_DELETEEVENTSUBREQUEST_H_ +#define ALIBABACLOUD_LIVE_MODEL_DELETEEVENTSUBREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Live { +namespace Model { +class ALIBABACLOUD_LIVE_EXPORT DeleteEventSubRequest : public RpcServiceRequest { +public: + DeleteEventSubRequest(); + ~DeleteEventSubRequest(); + std::string getSubscribeId() const; + void setSubscribeId(const std::string &subscribeId); + std::string getAppId() const; + void setAppId(const std::string &appId); + +private: + std::string subscribeId_; + std::string appId_; +}; +} // namespace Model +} // namespace Live +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_LIVE_MODEL_DELETEEVENTSUBREQUEST_H_ diff --git a/live/include/alibabacloud/live/model/DeleteEventSubResult.h b/live/include/alibabacloud/live/model/DeleteEventSubResult.h new file mode 100644 index 000000000..d36fce307 --- /dev/null +++ b/live/include/alibabacloud/live/model/DeleteEventSubResult.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_DELETEEVENTSUBRESULT_H_ +#define ALIBABACLOUD_LIVE_MODEL_DELETEEVENTSUBRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Live + { + namespace Model + { + class ALIBABACLOUD_LIVE_EXPORT DeleteEventSubResult : public ServiceResult + { + public: + + + DeleteEventSubResult(); + explicit DeleteEventSubResult(const std::string &payload); + ~DeleteEventSubResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_LIVE_MODEL_DELETEEVENTSUBRESULT_H_ \ No newline at end of file diff --git a/live/include/alibabacloud/live/model/DescribeChannelParticipantsRequest.h b/live/include/alibabacloud/live/model/DescribeChannelParticipantsRequest.h new file mode 100644 index 000000000..0bce66376 --- /dev/null +++ b/live/include/alibabacloud/live/model/DescribeChannelParticipantsRequest.h @@ -0,0 +1,54 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LIVE_MODEL_DESCRIBECHANNELPARTICIPANTSREQUEST_H_ +#define ALIBABACLOUD_LIVE_MODEL_DESCRIBECHANNELPARTICIPANTSREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Live { +namespace Model { +class ALIBABACLOUD_LIVE_EXPORT DescribeChannelParticipantsRequest : public RpcServiceRequest { +public: + DescribeChannelParticipantsRequest(); + ~DescribeChannelParticipantsRequest(); + int getPageNum() const; + void setPageNum(int pageNum); + std::string getAppId() const; + void setAppId(const std::string &appId); + int getPageSize() const; + void setPageSize(int pageSize); + std::string getChannelId() const; + void setChannelId(const std::string &channelId); + std::string getOrder() const; + void setOrder(const std::string &order); + +private: + int pageNum_; + std::string appId_; + int pageSize_; + std::string channelId_; + std::string order_; +}; +} // namespace Model +} // namespace Live +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_LIVE_MODEL_DESCRIBECHANNELPARTICIPANTSREQUEST_H_ diff --git a/live/include/alibabacloud/live/model/DescribeChannelParticipantsResult.h b/live/include/alibabacloud/live/model/DescribeChannelParticipantsResult.h new file mode 100644 index 000000000..9e27950c3 --- /dev/null +++ b/live/include/alibabacloud/live/model/DescribeChannelParticipantsResult.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_DESCRIBECHANNELPARTICIPANTSRESULT_H_ +#define ALIBABACLOUD_LIVE_MODEL_DESCRIBECHANNELPARTICIPANTSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Live + { + namespace Model + { + class ALIBABACLOUD_LIVE_EXPORT DescribeChannelParticipantsResult : public ServiceResult + { + public: + + + DescribeChannelParticipantsResult(); + explicit DescribeChannelParticipantsResult(const std::string &payload); + ~DescribeChannelParticipantsResult(); + int getTotalNum()const; + int getTotalPage()const; + long getTimes()const; + std::vector getUserList()const; + + protected: + void parse(const std::string &payload); + private: + int totalNum_; + int totalPage_; + long times_; + std::vector userList_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LIVE_MODEL_DESCRIBECHANNELPARTICIPANTSRESULT_H_ \ No newline at end of file diff --git a/live/include/alibabacloud/live/model/RemoveTerminalsRequest.h b/live/include/alibabacloud/live/model/RemoveTerminalsRequest.h new file mode 100644 index 000000000..c1c029258 --- /dev/null +++ b/live/include/alibabacloud/live/model/RemoveTerminalsRequest.h @@ -0,0 +1,48 @@ +/* + * 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_REMOVETERMINALSREQUEST_H_ +#define ALIBABACLOUD_LIVE_MODEL_REMOVETERMINALSREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Live { +namespace Model { +class ALIBABACLOUD_LIVE_EXPORT RemoveTerminalsRequest : public RpcServiceRequest { +public: + RemoveTerminalsRequest(); + ~RemoveTerminalsRequest(); + std::string getAppId() const; + void setAppId(const std::string &appId); + std::vector getTerminalIds() const; + void setTerminalIds(const std::vector &terminalIds); + std::string getChannelId() const; + void setChannelId(const std::string &channelId); + +private: + std::string appId_; + std::vector terminalIds_; + std::string channelId_; +}; +} // namespace Model +} // namespace Live +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_LIVE_MODEL_REMOVETERMINALSREQUEST_H_ diff --git a/live/include/alibabacloud/live/model/RemoveTerminalsResult.h b/live/include/alibabacloud/live/model/RemoveTerminalsResult.h new file mode 100644 index 000000000..12d1e5f97 --- /dev/null +++ b/live/include/alibabacloud/live/model/RemoveTerminalsResult.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_REMOVETERMINALSRESULT_H_ +#define ALIBABACLOUD_LIVE_MODEL_REMOVETERMINALSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Live + { + namespace Model + { + class ALIBABACLOUD_LIVE_EXPORT RemoveTerminalsResult : public ServiceResult + { + public: + struct Terminal + { + std::string message; + std::string id; + int code; + }; + + + RemoveTerminalsResult(); + explicit RemoveTerminalsResult(const std::string &payload); + ~RemoveTerminalsResult(); + std::vector getTerminals()const; + + protected: + void parse(const std::string &payload); + private: + std::vector terminals_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LIVE_MODEL_REMOVETERMINALSRESULT_H_ \ No newline at end of file diff --git a/live/src/LiveClient.cc b/live/src/LiveClient.cc index e82f2525f..393ee8be0 100644 --- a/live/src/LiveClient.cc +++ b/live/src/LiveClient.cc @@ -1563,6 +1563,42 @@ LiveClient::CreateCustomTemplateOutcomeCallable LiveClient::createCustomTemplate return task->get_future(); } +LiveClient::CreateEventSubOutcome LiveClient::createEventSub(const CreateEventSubRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CreateEventSubOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CreateEventSubOutcome(CreateEventSubResult(outcome.result())); + else + return CreateEventSubOutcome(outcome.error()); +} + +void LiveClient::createEventSubAsync(const CreateEventSubRequest& request, const CreateEventSubAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, createEventSub(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +LiveClient::CreateEventSubOutcomeCallable LiveClient::createEventSubCallable(const CreateEventSubRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->createEventSub(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + LiveClient::CreateLiveDelayConfigOutcome LiveClient::createLiveDelayConfig(const CreateLiveDelayConfigRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -2175,6 +2211,42 @@ LiveClient::DeleteCustomTemplateOutcomeCallable LiveClient::deleteCustomTemplate return task->get_future(); } +LiveClient::DeleteEventSubOutcome LiveClient::deleteEventSub(const DeleteEventSubRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DeleteEventSubOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DeleteEventSubOutcome(DeleteEventSubResult(outcome.result())); + else + return DeleteEventSubOutcome(outcome.error()); +} + +void LiveClient::deleteEventSubAsync(const DeleteEventSubRequest& request, const DeleteEventSubAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, deleteEventSub(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +LiveClient::DeleteEventSubOutcomeCallable LiveClient::deleteEventSubCallable(const DeleteEventSubRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->deleteEventSub(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + LiveClient::DeleteLiveAppRecordConfigOutcome LiveClient::deleteLiveAppRecordConfig(const DeleteLiveAppRecordConfigRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -3867,6 +3939,42 @@ LiveClient::DescribeCastersOutcomeCallable LiveClient::describeCastersCallable(c return task->get_future(); } +LiveClient::DescribeChannelParticipantsOutcome LiveClient::describeChannelParticipants(const DescribeChannelParticipantsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeChannelParticipantsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeChannelParticipantsOutcome(DescribeChannelParticipantsResult(outcome.result())); + else + return DescribeChannelParticipantsOutcome(outcome.error()); +} + +void LiveClient::describeChannelParticipantsAsync(const DescribeChannelParticipantsRequest& request, const DescribeChannelParticipantsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeChannelParticipants(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +LiveClient::DescribeChannelParticipantsOutcomeCallable LiveClient::describeChannelParticipantsCallable(const DescribeChannelParticipantsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeChannelParticipants(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + LiveClient::DescribeDomainUsageDataOutcome LiveClient::describeDomainUsageData(const DescribeDomainUsageDataRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -9303,6 +9411,42 @@ LiveClient::RemoveShowFromShowListOutcomeCallable LiveClient::removeShowFromShow return task->get_future(); } +LiveClient::RemoveTerminalsOutcome LiveClient::removeTerminals(const RemoveTerminalsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return RemoveTerminalsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return RemoveTerminalsOutcome(RemoveTerminalsResult(outcome.result())); + else + return RemoveTerminalsOutcome(outcome.error()); +} + +void LiveClient::removeTerminalsAsync(const RemoveTerminalsRequest& request, const RemoveTerminalsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, removeTerminals(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +LiveClient::RemoveTerminalsOutcomeCallable LiveClient::removeTerminalsCallable(const RemoveTerminalsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->removeTerminals(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + LiveClient::RestartCasterOutcome LiveClient::restartCaster(const RestartCasterRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/live/src/model/CreateEventSubRequest.cc b/live/src/model/CreateEventSubRequest.cc new file mode 100644 index 000000000..9fab06e17 --- /dev/null +++ b/live/src/model/CreateEventSubRequest.cc @@ -0,0 +1,88 @@ +/* + * 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::CreateEventSubRequest; + +CreateEventSubRequest::CreateEventSubRequest() + : RpcServiceRequest("live", "2016-11-01", "CreateEventSub") { + setMethod(HttpRequest::Method::Post); +} + +CreateEventSubRequest::~CreateEventSubRequest() {} + +int CreateEventSubRequest::getRole() const { + return role_; +} + +void CreateEventSubRequest::setRole(int role) { + role_ = role; + setParameter(std::string("Role"), std::to_string(role)); +} + +std::string CreateEventSubRequest::getClientToken() const { + return clientToken_; +} + +void CreateEventSubRequest::setClientToken(const std::string &clientToken) { + clientToken_ = clientToken; + setParameter(std::string("ClientToken"), clientToken); +} + +std::vector CreateEventSubRequest::getUsers() const { + return users_; +} + +void CreateEventSubRequest::setUsers(const std::vector &users) { + users_ = users; +} + +std::string CreateEventSubRequest::getAppId() const { + return appId_; +} + +void CreateEventSubRequest::setAppId(const std::string &appId) { + appId_ = appId; + setParameter(std::string("AppId"), appId); +} + +std::string CreateEventSubRequest::getCallbackUrl() const { + return callbackUrl_; +} + +void CreateEventSubRequest::setCallbackUrl(const std::string &callbackUrl) { + callbackUrl_ = callbackUrl; + setParameter(std::string("CallbackUrl"), callbackUrl); +} + +std::string CreateEventSubRequest::getChannelId() const { + return channelId_; +} + +void CreateEventSubRequest::setChannelId(const std::string &channelId) { + channelId_ = channelId; + setParameter(std::string("ChannelId"), channelId); +} + +std::vector CreateEventSubRequest::getEvents() const { + return events_; +} + +void CreateEventSubRequest::setEvents(const std::vector &events) { + events_ = events; +} + diff --git a/live/src/model/CreateEventSubResult.cc b/live/src/model/CreateEventSubResult.cc new file mode 100644 index 000000000..7af88185c --- /dev/null +++ b/live/src/model/CreateEventSubResult.cc @@ -0,0 +1,51 @@ +/* + * 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; + +CreateEventSubResult::CreateEventSubResult() : + ServiceResult() +{} + +CreateEventSubResult::CreateEventSubResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CreateEventSubResult::~CreateEventSubResult() +{} + +void CreateEventSubResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["SubscribeId"].isNull()) + subscribeId_ = value["SubscribeId"].asString(); + +} + +std::string CreateEventSubResult::getSubscribeId()const +{ + return subscribeId_; +} + diff --git a/live/src/model/DeleteEventSubRequest.cc b/live/src/model/DeleteEventSubRequest.cc new file mode 100644 index 000000000..fb5705372 --- /dev/null +++ b/live/src/model/DeleteEventSubRequest.cc @@ -0,0 +1,45 @@ +/* + * 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::DeleteEventSubRequest; + +DeleteEventSubRequest::DeleteEventSubRequest() + : RpcServiceRequest("live", "2016-11-01", "DeleteEventSub") { + setMethod(HttpRequest::Method::Post); +} + +DeleteEventSubRequest::~DeleteEventSubRequest() {} + +std::string DeleteEventSubRequest::getSubscribeId() const { + return subscribeId_; +} + +void DeleteEventSubRequest::setSubscribeId(const std::string &subscribeId) { + subscribeId_ = subscribeId; + setParameter(std::string("SubscribeId"), subscribeId); +} + +std::string DeleteEventSubRequest::getAppId() const { + return appId_; +} + +void DeleteEventSubRequest::setAppId(const std::string &appId) { + appId_ = appId; + setParameter(std::string("AppId"), appId); +} + diff --git a/live/src/model/DeleteEventSubResult.cc b/live/src/model/DeleteEventSubResult.cc new file mode 100644 index 000000000..a7c690efd --- /dev/null +++ b/live/src/model/DeleteEventSubResult.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; + +DeleteEventSubResult::DeleteEventSubResult() : + ServiceResult() +{} + +DeleteEventSubResult::DeleteEventSubResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DeleteEventSubResult::~DeleteEventSubResult() +{} + +void DeleteEventSubResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} + diff --git a/live/src/model/DescribeChannelParticipantsRequest.cc b/live/src/model/DescribeChannelParticipantsRequest.cc new file mode 100644 index 000000000..e5ea1a9eb --- /dev/null +++ b/live/src/model/DescribeChannelParticipantsRequest.cc @@ -0,0 +1,72 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Live::Model::DescribeChannelParticipantsRequest; + +DescribeChannelParticipantsRequest::DescribeChannelParticipantsRequest() + : RpcServiceRequest("live", "2016-11-01", "DescribeChannelParticipants") { + setMethod(HttpRequest::Method::Post); +} + +DescribeChannelParticipantsRequest::~DescribeChannelParticipantsRequest() {} + +int DescribeChannelParticipantsRequest::getPageNum() const { + return pageNum_; +} + +void DescribeChannelParticipantsRequest::setPageNum(int pageNum) { + pageNum_ = pageNum; + setParameter(std::string("PageNum"), std::to_string(pageNum)); +} + +std::string DescribeChannelParticipantsRequest::getAppId() const { + return appId_; +} + +void DescribeChannelParticipantsRequest::setAppId(const std::string &appId) { + appId_ = appId; + setParameter(std::string("AppId"), appId); +} + +int DescribeChannelParticipantsRequest::getPageSize() const { + return pageSize_; +} + +void DescribeChannelParticipantsRequest::setPageSize(int pageSize) { + pageSize_ = pageSize; + setParameter(std::string("PageSize"), std::to_string(pageSize)); +} + +std::string DescribeChannelParticipantsRequest::getChannelId() const { + return channelId_; +} + +void DescribeChannelParticipantsRequest::setChannelId(const std::string &channelId) { + channelId_ = channelId; + setParameter(std::string("ChannelId"), channelId); +} + +std::string DescribeChannelParticipantsRequest::getOrder() const { + return order_; +} + +void DescribeChannelParticipantsRequest::setOrder(const std::string &order) { + order_ = order; + setParameter(std::string("Order"), order); +} + diff --git a/live/src/model/DescribeChannelParticipantsResult.cc b/live/src/model/DescribeChannelParticipantsResult.cc new file mode 100644 index 000000000..0b6b1adb5 --- /dev/null +++ b/live/src/model/DescribeChannelParticipantsResult.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; + +DescribeChannelParticipantsResult::DescribeChannelParticipantsResult() : + ServiceResult() +{} + +DescribeChannelParticipantsResult::DescribeChannelParticipantsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeChannelParticipantsResult::~DescribeChannelParticipantsResult() +{} + +void DescribeChannelParticipantsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allUserList = value["UserList"]["Users"]; + for (const auto &item : allUserList) + userList_.push_back(item.asString()); + if(!value["TotalPage"].isNull()) + totalPage_ = std::stoi(value["TotalPage"].asString()); + if(!value["TotalNum"].isNull()) + totalNum_ = std::stoi(value["TotalNum"].asString()); + if(!value["Times"].isNull()) + times_ = std::stol(value["Times"].asString()); + +} + +int DescribeChannelParticipantsResult::getTotalNum()const +{ + return totalNum_; +} + +int DescribeChannelParticipantsResult::getTotalPage()const +{ + return totalPage_; +} + +long DescribeChannelParticipantsResult::getTimes()const +{ + return times_; +} + +std::vector DescribeChannelParticipantsResult::getUserList()const +{ + return userList_; +} + diff --git a/live/src/model/RemoveTerminalsRequest.cc b/live/src/model/RemoveTerminalsRequest.cc new file mode 100644 index 000000000..5b47c89ca --- /dev/null +++ b/live/src/model/RemoveTerminalsRequest.cc @@ -0,0 +1,53 @@ +/* + * 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::RemoveTerminalsRequest; + +RemoveTerminalsRequest::RemoveTerminalsRequest() + : RpcServiceRequest("live", "2016-11-01", "RemoveTerminals") { + setMethod(HttpRequest::Method::Post); +} + +RemoveTerminalsRequest::~RemoveTerminalsRequest() {} + +std::string RemoveTerminalsRequest::getAppId() const { + return appId_; +} + +void RemoveTerminalsRequest::setAppId(const std::string &appId) { + appId_ = appId; + setParameter(std::string("AppId"), appId); +} + +std::vector RemoveTerminalsRequest::getTerminalIds() const { + return terminalIds_; +} + +void RemoveTerminalsRequest::setTerminalIds(const std::vector &terminalIds) { + terminalIds_ = terminalIds; +} + +std::string RemoveTerminalsRequest::getChannelId() const { + return channelId_; +} + +void RemoveTerminalsRequest::setChannelId(const std::string &channelId) { + channelId_ = channelId; + setParameter(std::string("ChannelId"), channelId); +} + diff --git a/live/src/model/RemoveTerminalsResult.cc b/live/src/model/RemoveTerminalsResult.cc new file mode 100644 index 000000000..d2125239f --- /dev/null +++ b/live/src/model/RemoveTerminalsResult.cc @@ -0,0 +1,61 @@ +/* + * 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; + +RemoveTerminalsResult::RemoveTerminalsResult() : + ServiceResult() +{} + +RemoveTerminalsResult::RemoveTerminalsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +RemoveTerminalsResult::~RemoveTerminalsResult() +{} + +void RemoveTerminalsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allTerminalsNode = value["Terminals"]["Terminal"]; + for (auto valueTerminalsTerminal : allTerminalsNode) + { + Terminal terminalsObject; + if(!valueTerminalsTerminal["Code"].isNull()) + terminalsObject.code = std::stoi(valueTerminalsTerminal["Code"].asString()); + if(!valueTerminalsTerminal["Message"].isNull()) + terminalsObject.message = valueTerminalsTerminal["Message"].asString(); + if(!valueTerminalsTerminal["Id"].isNull()) + terminalsObject.id = valueTerminalsTerminal["Id"].asString(); + terminals_.push_back(terminalsObject); + } + +} + +std::vector RemoveTerminalsResult::getTerminals()const +{ + return terminals_; +} +