diff --git a/CHANGELOG b/CHANGELOG index 5b942325b..6a1b3af32 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +2020-06-17 Version: 1.36.464 +- Public beta version. +- Add Api Overseas. + 2020-06-16 Version: 1.36.463 - Support TargetImageId in ApplyNodes Interface. diff --git a/VERSION b/VERSION index f5fa0e571..1e95b740e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.463 \ No newline at end of file +1.36.464 \ No newline at end of file diff --git a/aliyuncvc/CMakeLists.txt b/aliyuncvc/CMakeLists.txt index 80e9f9177..83a3c9807 100644 --- a/aliyuncvc/CMakeLists.txt +++ b/aliyuncvc/CMakeLists.txt @@ -27,6 +27,10 @@ set(aliyuncvc_public_header_model include/alibabacloud/aliyuncvc/model/ActiveMeetingResult.h include/alibabacloud/aliyuncvc/model/BatchCreateDeviceRequest.h include/alibabacloud/aliyuncvc/model/BatchCreateDeviceResult.h + include/alibabacloud/aliyuncvc/model/BatchDeleteDevicesRequest.h + include/alibabacloud/aliyuncvc/model/BatchDeleteDevicesResult.h + include/alibabacloud/aliyuncvc/model/CallDeviceRequest.h + include/alibabacloud/aliyuncvc/model/CallDeviceResult.h include/alibabacloud/aliyuncvc/model/CreateDeviceMeetingRequest.h include/alibabacloud/aliyuncvc/model/CreateDeviceMeetingResult.h include/alibabacloud/aliyuncvc/model/CreateEvaluationRequest.h @@ -63,6 +67,8 @@ set(aliyuncvc_public_header_model include/alibabacloud/aliyuncvc/model/GetMeetingInternationalResult.h include/alibabacloud/aliyuncvc/model/GetMeetingMemberRequest.h include/alibabacloud/aliyuncvc/model/GetMeetingMemberResult.h + include/alibabacloud/aliyuncvc/model/GetMembersRequest.h + include/alibabacloud/aliyuncvc/model/GetMembersResult.h include/alibabacloud/aliyuncvc/model/GetUserRequest.h include/alibabacloud/aliyuncvc/model/GetUserResult.h include/alibabacloud/aliyuncvc/model/JoinDeviceMeetingRequest.h @@ -108,6 +114,10 @@ set(aliyuncvc_src src/model/ActiveMeetingResult.cc src/model/BatchCreateDeviceRequest.cc src/model/BatchCreateDeviceResult.cc + src/model/BatchDeleteDevicesRequest.cc + src/model/BatchDeleteDevicesResult.cc + src/model/CallDeviceRequest.cc + src/model/CallDeviceResult.cc src/model/CreateDeviceMeetingRequest.cc src/model/CreateDeviceMeetingResult.cc src/model/CreateEvaluationRequest.cc @@ -144,6 +154,8 @@ set(aliyuncvc_src src/model/GetMeetingInternationalResult.cc src/model/GetMeetingMemberRequest.cc src/model/GetMeetingMemberResult.cc + src/model/GetMembersRequest.cc + src/model/GetMembersResult.cc src/model/GetUserRequest.cc src/model/GetUserResult.cc src/model/JoinDeviceMeetingRequest.cc diff --git a/aliyuncvc/include/alibabacloud/aliyuncvc/AliyuncvcClient.h b/aliyuncvc/include/alibabacloud/aliyuncvc/AliyuncvcClient.h index a60cdaa0d..c94bbc1d1 100644 --- a/aliyuncvc/include/alibabacloud/aliyuncvc/AliyuncvcClient.h +++ b/aliyuncvc/include/alibabacloud/aliyuncvc/AliyuncvcClient.h @@ -28,6 +28,10 @@ #include "model/ActiveMeetingResult.h" #include "model/BatchCreateDeviceRequest.h" #include "model/BatchCreateDeviceResult.h" +#include "model/BatchDeleteDevicesRequest.h" +#include "model/BatchDeleteDevicesResult.h" +#include "model/CallDeviceRequest.h" +#include "model/CallDeviceResult.h" #include "model/CreateDeviceMeetingRequest.h" #include "model/CreateDeviceMeetingResult.h" #include "model/CreateEvaluationRequest.h" @@ -64,6 +68,8 @@ #include "model/GetMeetingInternationalResult.h" #include "model/GetMeetingMemberRequest.h" #include "model/GetMeetingMemberResult.h" +#include "model/GetMembersRequest.h" +#include "model/GetMembersResult.h" #include "model/GetUserRequest.h" #include "model/GetUserResult.h" #include "model/JoinDeviceMeetingRequest.h" @@ -118,6 +124,12 @@ namespace AlibabaCloud typedef Outcome BatchCreateDeviceOutcome; typedef std::future BatchCreateDeviceOutcomeCallable; typedef std::function&)> BatchCreateDeviceAsyncHandler; + typedef Outcome BatchDeleteDevicesOutcome; + typedef std::future BatchDeleteDevicesOutcomeCallable; + typedef std::function&)> BatchDeleteDevicesAsyncHandler; + typedef Outcome CallDeviceOutcome; + typedef std::future CallDeviceOutcomeCallable; + typedef std::function&)> CallDeviceAsyncHandler; typedef Outcome CreateDeviceMeetingOutcome; typedef std::future CreateDeviceMeetingOutcomeCallable; typedef std::function&)> CreateDeviceMeetingAsyncHandler; @@ -172,6 +184,9 @@ namespace AlibabaCloud typedef Outcome GetMeetingMemberOutcome; typedef std::future GetMeetingMemberOutcomeCallable; typedef std::function&)> GetMeetingMemberAsyncHandler; + typedef Outcome GetMembersOutcome; + typedef std::future GetMembersOutcomeCallable; + typedef std::function&)> GetMembersAsyncHandler; typedef Outcome GetUserOutcome; typedef std::future GetUserOutcomeCallable; typedef std::function&)> GetUserAsyncHandler; @@ -240,6 +255,12 @@ namespace AlibabaCloud BatchCreateDeviceOutcome batchCreateDevice(const Model::BatchCreateDeviceRequest &request)const; void batchCreateDeviceAsync(const Model::BatchCreateDeviceRequest& request, const BatchCreateDeviceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; BatchCreateDeviceOutcomeCallable batchCreateDeviceCallable(const Model::BatchCreateDeviceRequest& request) const; + BatchDeleteDevicesOutcome batchDeleteDevices(const Model::BatchDeleteDevicesRequest &request)const; + void batchDeleteDevicesAsync(const Model::BatchDeleteDevicesRequest& request, const BatchDeleteDevicesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + BatchDeleteDevicesOutcomeCallable batchDeleteDevicesCallable(const Model::BatchDeleteDevicesRequest& request) const; + CallDeviceOutcome callDevice(const Model::CallDeviceRequest &request)const; + void callDeviceAsync(const Model::CallDeviceRequest& request, const CallDeviceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CallDeviceOutcomeCallable callDeviceCallable(const Model::CallDeviceRequest& request) const; CreateDeviceMeetingOutcome createDeviceMeeting(const Model::CreateDeviceMeetingRequest &request)const; void createDeviceMeetingAsync(const Model::CreateDeviceMeetingRequest& request, const CreateDeviceMeetingAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CreateDeviceMeetingOutcomeCallable createDeviceMeetingCallable(const Model::CreateDeviceMeetingRequest& request) const; @@ -294,6 +315,9 @@ namespace AlibabaCloud GetMeetingMemberOutcome getMeetingMember(const Model::GetMeetingMemberRequest &request)const; void getMeetingMemberAsync(const Model::GetMeetingMemberRequest& request, const GetMeetingMemberAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetMeetingMemberOutcomeCallable getMeetingMemberCallable(const Model::GetMeetingMemberRequest& request) const; + GetMembersOutcome getMembers(const Model::GetMembersRequest &request)const; + void getMembersAsync(const Model::GetMembersRequest& request, const GetMembersAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetMembersOutcomeCallable getMembersCallable(const Model::GetMembersRequest& request) const; GetUserOutcome getUser(const Model::GetUserRequest &request)const; void getUserAsync(const Model::GetUserRequest& request, const GetUserAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetUserOutcomeCallable getUserCallable(const Model::GetUserRequest& request) const; diff --git a/aliyuncvc/include/alibabacloud/aliyuncvc/model/BatchDeleteDevicesRequest.h b/aliyuncvc/include/alibabacloud/aliyuncvc/model/BatchDeleteDevicesRequest.h new file mode 100644 index 000000000..2640b39ac --- /dev/null +++ b/aliyuncvc/include/alibabacloud/aliyuncvc/model/BatchDeleteDevicesRequest.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_ALIYUNCVC_MODEL_BATCHDELETEDEVICESREQUEST_H_ +#define ALIBABACLOUD_ALIYUNCVC_MODEL_BATCHDELETEDEVICESREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Aliyuncvc + { + namespace Model + { + class ALIBABACLOUD_ALIYUNCVC_EXPORT BatchDeleteDevicesRequest : public RpcServiceRequest + { + + public: + BatchDeleteDevicesRequest(); + ~BatchDeleteDevicesRequest(); + + std::string getGroupId()const; + void setGroupId(const std::string& groupId); + std::string getSN()const; + void setSN(const std::string& sN); + + private: + std::string groupId_; + std::string sN_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ALIYUNCVC_MODEL_BATCHDELETEDEVICESREQUEST_H_ \ No newline at end of file diff --git a/aliyuncvc/include/alibabacloud/aliyuncvc/model/BatchDeleteDevicesResult.h b/aliyuncvc/include/alibabacloud/aliyuncvc/model/BatchDeleteDevicesResult.h new file mode 100644 index 000000000..6b4afbf23 --- /dev/null +++ b/aliyuncvc/include/alibabacloud/aliyuncvc/model/BatchDeleteDevicesResult.h @@ -0,0 +1,55 @@ +/* + * 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_ALIYUNCVC_MODEL_BATCHDELETEDEVICESRESULT_H_ +#define ALIBABACLOUD_ALIYUNCVC_MODEL_BATCHDELETEDEVICESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Aliyuncvc + { + namespace Model + { + class ALIBABACLOUD_ALIYUNCVC_EXPORT BatchDeleteDevicesResult : public ServiceResult + { + public: + + + BatchDeleteDevicesResult(); + explicit BatchDeleteDevicesResult(const std::string &payload); + ~BatchDeleteDevicesResult(); + std::string getMessage()const; + int getErrorCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + int errorCode_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ALIYUNCVC_MODEL_BATCHDELETEDEVICESRESULT_H_ \ No newline at end of file diff --git a/aliyuncvc/include/alibabacloud/aliyuncvc/model/CallDeviceRequest.h b/aliyuncvc/include/alibabacloud/aliyuncvc/model/CallDeviceRequest.h new file mode 100644 index 000000000..69c469622 --- /dev/null +++ b/aliyuncvc/include/alibabacloud/aliyuncvc/model/CallDeviceRequest.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_ALIYUNCVC_MODEL_CALLDEVICEREQUEST_H_ +#define ALIBABACLOUD_ALIYUNCVC_MODEL_CALLDEVICEREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Aliyuncvc + { + namespace Model + { + class ALIBABACLOUD_ALIYUNCVC_EXPORT CallDeviceRequest : public RpcServiceRequest + { + + public: + CallDeviceRequest(); + ~CallDeviceRequest(); + + std::string getOperateUserId()const; + void setOperateUserId(const std::string& operateUserId); + bool getJoinMeetingFlag()const; + void setJoinMeetingFlag(bool joinMeetingFlag); + std::string getMeetingCode()const; + void setMeetingCode(const std::string& meetingCode); + std::string getSN()const; + void setSN(const std::string& sN); + + private: + std::string operateUserId_; + bool joinMeetingFlag_; + std::string meetingCode_; + std::string sN_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ALIYUNCVC_MODEL_CALLDEVICEREQUEST_H_ \ No newline at end of file diff --git a/aliyuncvc/include/alibabacloud/aliyuncvc/model/CallDeviceResult.h b/aliyuncvc/include/alibabacloud/aliyuncvc/model/CallDeviceResult.h new file mode 100644 index 000000000..f227125bb --- /dev/null +++ b/aliyuncvc/include/alibabacloud/aliyuncvc/model/CallDeviceResult.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_ALIYUNCVC_MODEL_CALLDEVICERESULT_H_ +#define ALIBABACLOUD_ALIYUNCVC_MODEL_CALLDEVICERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Aliyuncvc + { + namespace Model + { + class ALIBABACLOUD_ALIYUNCVC_EXPORT CallDeviceResult : public ServiceResult + { + public: + + + CallDeviceResult(); + explicit CallDeviceResult(const std::string &payload); + ~CallDeviceResult(); + std::string getMessage()const; + int getErrorCode()const; + bool getSuccess()const; + std::string getMessageId()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + int errorCode_; + bool success_; + std::string messageId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ALIYUNCVC_MODEL_CALLDEVICERESULT_H_ \ No newline at end of file diff --git a/aliyuncvc/include/alibabacloud/aliyuncvc/model/GetMembersRequest.h b/aliyuncvc/include/alibabacloud/aliyuncvc/model/GetMembersRequest.h new file mode 100644 index 000000000..1faed2a47 --- /dev/null +++ b/aliyuncvc/include/alibabacloud/aliyuncvc/model/GetMembersRequest.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_ALIYUNCVC_MODEL_GETMEMBERSREQUEST_H_ +#define ALIBABACLOUD_ALIYUNCVC_MODEL_GETMEMBERSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Aliyuncvc + { + namespace Model + { + class ALIBABACLOUD_ALIYUNCVC_EXPORT GetMembersRequest : public RpcServiceRequest + { + + public: + GetMembersRequest(); + ~GetMembersRequest(); + + std::string getMeetingUUID()const; + void setMeetingUUID(const std::string& meetingUUID); + + private: + std::string meetingUUID_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ALIYUNCVC_MODEL_GETMEMBERSREQUEST_H_ \ No newline at end of file diff --git a/aliyuncvc/include/alibabacloud/aliyuncvc/model/GetMembersResult.h b/aliyuncvc/include/alibabacloud/aliyuncvc/model/GetMembersResult.h new file mode 100644 index 000000000..5520c0e5e --- /dev/null +++ b/aliyuncvc/include/alibabacloud/aliyuncvc/model/GetMembersResult.h @@ -0,0 +1,75 @@ +/* + * 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_ALIYUNCVC_MODEL_GETMEMBERSRESULT_H_ +#define ALIBABACLOUD_ALIYUNCVC_MODEL_GETMEMBERSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Aliyuncvc + { + namespace Model + { + class ALIBABACLOUD_ALIYUNCVC_EXPORT GetMembersResult : public ServiceResult + { + public: + struct MeetingInfo + { + struct MemberListItem + { + std::string status; + std::string userName; + std::string memberUUID; + std::string userId; + std::string userAvatarUrl; + }; + std::string meetingCode; + std::string meetingUUID; + std::vector memberList; + std::string userId; + long createTime; + std::string meetingName; + long validTime; + }; + + + GetMembersResult(); + explicit GetMembersResult(const std::string &payload); + ~GetMembersResult(); + MeetingInfo getMeetingInfo()const; + std::string getMessage()const; + int getErrorCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + MeetingInfo meetingInfo_; + std::string message_; + int errorCode_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ALIYUNCVC_MODEL_GETMEMBERSRESULT_H_ \ No newline at end of file diff --git a/aliyuncvc/src/AliyuncvcClient.cc b/aliyuncvc/src/AliyuncvcClient.cc index 5e4bd5b28..f84948e6c 100644 --- a/aliyuncvc/src/AliyuncvcClient.cc +++ b/aliyuncvc/src/AliyuncvcClient.cc @@ -159,6 +159,78 @@ AliyuncvcClient::BatchCreateDeviceOutcomeCallable AliyuncvcClient::batchCreateDe return task->get_future(); } +AliyuncvcClient::BatchDeleteDevicesOutcome AliyuncvcClient::batchDeleteDevices(const BatchDeleteDevicesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return BatchDeleteDevicesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return BatchDeleteDevicesOutcome(BatchDeleteDevicesResult(outcome.result())); + else + return BatchDeleteDevicesOutcome(outcome.error()); +} + +void AliyuncvcClient::batchDeleteDevicesAsync(const BatchDeleteDevicesRequest& request, const BatchDeleteDevicesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, batchDeleteDevices(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +AliyuncvcClient::BatchDeleteDevicesOutcomeCallable AliyuncvcClient::batchDeleteDevicesCallable(const BatchDeleteDevicesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->batchDeleteDevices(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +AliyuncvcClient::CallDeviceOutcome AliyuncvcClient::callDevice(const CallDeviceRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CallDeviceOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CallDeviceOutcome(CallDeviceResult(outcome.result())); + else + return CallDeviceOutcome(outcome.error()); +} + +void AliyuncvcClient::callDeviceAsync(const CallDeviceRequest& request, const CallDeviceAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, callDevice(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +AliyuncvcClient::CallDeviceOutcomeCallable AliyuncvcClient::callDeviceCallable(const CallDeviceRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->callDevice(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + AliyuncvcClient::CreateDeviceMeetingOutcome AliyuncvcClient::createDeviceMeeting(const CreateDeviceMeetingRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -807,6 +879,42 @@ AliyuncvcClient::GetMeetingMemberOutcomeCallable AliyuncvcClient::getMeetingMemb return task->get_future(); } +AliyuncvcClient::GetMembersOutcome AliyuncvcClient::getMembers(const GetMembersRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetMembersOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetMembersOutcome(GetMembersResult(outcome.result())); + else + return GetMembersOutcome(outcome.error()); +} + +void AliyuncvcClient::getMembersAsync(const GetMembersRequest& request, const GetMembersAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getMembers(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +AliyuncvcClient::GetMembersOutcomeCallable AliyuncvcClient::getMembersCallable(const GetMembersRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getMembers(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + AliyuncvcClient::GetUserOutcome AliyuncvcClient::getUser(const GetUserRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/aliyuncvc/src/model/BatchDeleteDevicesRequest.cc b/aliyuncvc/src/model/BatchDeleteDevicesRequest.cc new file mode 100644 index 000000000..4c8405185 --- /dev/null +++ b/aliyuncvc/src/model/BatchDeleteDevicesRequest.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 + +using AlibabaCloud::Aliyuncvc::Model::BatchDeleteDevicesRequest; + +BatchDeleteDevicesRequest::BatchDeleteDevicesRequest() : + RpcServiceRequest("aliyuncvc", "2020-03-30", "BatchDeleteDevices") +{ + setMethod(HttpRequest::Method::Post); +} + +BatchDeleteDevicesRequest::~BatchDeleteDevicesRequest() +{} + +std::string BatchDeleteDevicesRequest::getGroupId()const +{ + return groupId_; +} + +void BatchDeleteDevicesRequest::setGroupId(const std::string& groupId) +{ + groupId_ = groupId; + setBodyParameter("GroupId", groupId); +} + +std::string BatchDeleteDevicesRequest::getSN()const +{ + return sN_; +} + +void BatchDeleteDevicesRequest::setSN(const std::string& sN) +{ + sN_ = sN; + setBodyParameter("SN", sN); +} + diff --git a/aliyuncvc/src/model/BatchDeleteDevicesResult.cc b/aliyuncvc/src/model/BatchDeleteDevicesResult.cc new file mode 100644 index 000000000..f9c94da59 --- /dev/null +++ b/aliyuncvc/src/model/BatchDeleteDevicesResult.cc @@ -0,0 +1,65 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Aliyuncvc; +using namespace AlibabaCloud::Aliyuncvc::Model; + +BatchDeleteDevicesResult::BatchDeleteDevicesResult() : + ServiceResult() +{} + +BatchDeleteDevicesResult::BatchDeleteDevicesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +BatchDeleteDevicesResult::~BatchDeleteDevicesResult() +{} + +void BatchDeleteDevicesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["ErrorCode"].isNull()) + errorCode_ = std::stoi(value["ErrorCode"].asString()); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +std::string BatchDeleteDevicesResult::getMessage()const +{ + return message_; +} + +int BatchDeleteDevicesResult::getErrorCode()const +{ + return errorCode_; +} + +bool BatchDeleteDevicesResult::getSuccess()const +{ + return success_; +} + diff --git a/aliyuncvc/src/model/CallDeviceRequest.cc b/aliyuncvc/src/model/CallDeviceRequest.cc new file mode 100644 index 000000000..a50ead3d1 --- /dev/null +++ b/aliyuncvc/src/model/CallDeviceRequest.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 + +using AlibabaCloud::Aliyuncvc::Model::CallDeviceRequest; + +CallDeviceRequest::CallDeviceRequest() : + RpcServiceRequest("aliyuncvc", "2019-10-30", "CallDevice") +{ + setMethod(HttpRequest::Method::Post); +} + +CallDeviceRequest::~CallDeviceRequest() +{} + +std::string CallDeviceRequest::getOperateUserId()const +{ + return operateUserId_; +} + +void CallDeviceRequest::setOperateUserId(const std::string& operateUserId) +{ + operateUserId_ = operateUserId; + setBodyParameter("OperateUserId", operateUserId); +} + +bool CallDeviceRequest::getJoinMeetingFlag()const +{ + return joinMeetingFlag_; +} + +void CallDeviceRequest::setJoinMeetingFlag(bool joinMeetingFlag) +{ + joinMeetingFlag_ = joinMeetingFlag; + setParameter("JoinMeetingFlag", joinMeetingFlag ? "true" : "false"); +} + +std::string CallDeviceRequest::getMeetingCode()const +{ + return meetingCode_; +} + +void CallDeviceRequest::setMeetingCode(const std::string& meetingCode) +{ + meetingCode_ = meetingCode; + setBodyParameter("MeetingCode", meetingCode); +} + +std::string CallDeviceRequest::getSN()const +{ + return sN_; +} + +void CallDeviceRequest::setSN(const std::string& sN) +{ + sN_ = sN; + setBodyParameter("SN", sN); +} + diff --git a/aliyuncvc/src/model/CallDeviceResult.cc b/aliyuncvc/src/model/CallDeviceResult.cc new file mode 100644 index 000000000..7ddadc7e4 --- /dev/null +++ b/aliyuncvc/src/model/CallDeviceResult.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 +#include + +using namespace AlibabaCloud::Aliyuncvc; +using namespace AlibabaCloud::Aliyuncvc::Model; + +CallDeviceResult::CallDeviceResult() : + ServiceResult() +{} + +CallDeviceResult::CallDeviceResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CallDeviceResult::~CallDeviceResult() +{} + +void CallDeviceResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["ErrorCode"].isNull()) + errorCode_ = std::stoi(value["ErrorCode"].asString()); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + if(!value["MessageId"].isNull()) + messageId_ = value["MessageId"].asString(); + +} + +std::string CallDeviceResult::getMessage()const +{ + return message_; +} + +int CallDeviceResult::getErrorCode()const +{ + return errorCode_; +} + +bool CallDeviceResult::getSuccess()const +{ + return success_; +} + +std::string CallDeviceResult::getMessageId()const +{ + return messageId_; +} + diff --git a/aliyuncvc/src/model/GetMembersRequest.cc b/aliyuncvc/src/model/GetMembersRequest.cc new file mode 100644 index 000000000..76771b849 --- /dev/null +++ b/aliyuncvc/src/model/GetMembersRequest.cc @@ -0,0 +1,40 @@ +/* + * 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::Aliyuncvc::Model::GetMembersRequest; + +GetMembersRequest::GetMembersRequest() : + RpcServiceRequest("aliyuncvc", "2020-03-30", "GetMembers") +{ + setMethod(HttpRequest::Method::Post); +} + +GetMembersRequest::~GetMembersRequest() +{} + +std::string GetMembersRequest::getMeetingUUID()const +{ + return meetingUUID_; +} + +void GetMembersRequest::setMeetingUUID(const std::string& meetingUUID) +{ + meetingUUID_ = meetingUUID; + setBodyParameter("MeetingUUID", meetingUUID); +} + diff --git a/aliyuncvc/src/model/GetMembersResult.cc b/aliyuncvc/src/model/GetMembersResult.cc new file mode 100644 index 000000000..03d0350c7 --- /dev/null +++ b/aliyuncvc/src/model/GetMembersResult.cc @@ -0,0 +1,99 @@ +/* + * 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::Aliyuncvc; +using namespace AlibabaCloud::Aliyuncvc::Model; + +GetMembersResult::GetMembersResult() : + ServiceResult() +{} + +GetMembersResult::GetMembersResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetMembersResult::~GetMembersResult() +{} + +void GetMembersResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto meetingInfoNode = value["MeetingInfo"]; + if(!meetingInfoNode["MeetingName"].isNull()) + meetingInfo_.meetingName = meetingInfoNode["MeetingName"].asString(); + if(!meetingInfoNode["ValidTime"].isNull()) + meetingInfo_.validTime = std::stol(meetingInfoNode["ValidTime"].asString()); + if(!meetingInfoNode["MeetingCode"].isNull()) + meetingInfo_.meetingCode = meetingInfoNode["MeetingCode"].asString(); + if(!meetingInfoNode["CreateTime"].isNull()) + meetingInfo_.createTime = std::stol(meetingInfoNode["CreateTime"].asString()); + if(!meetingInfoNode["UserId"].isNull()) + meetingInfo_.userId = meetingInfoNode["UserId"].asString(); + if(!meetingInfoNode["MeetingUUID"].isNull()) + meetingInfo_.meetingUUID = meetingInfoNode["MeetingUUID"].asString(); + auto allMemberListNode = meetingInfoNode["MemberList"]["MemberListItem"]; + for (auto meetingInfoNodeMemberListMemberListItem : allMemberListNode) + { + MeetingInfo::MemberListItem memberListItemObject; + if(!meetingInfoNodeMemberListMemberListItem["UserAvatarUrl"].isNull()) + memberListItemObject.userAvatarUrl = meetingInfoNodeMemberListMemberListItem["UserAvatarUrl"].asString(); + if(!meetingInfoNodeMemberListMemberListItem["MemberUUID"].isNull()) + memberListItemObject.memberUUID = meetingInfoNodeMemberListMemberListItem["MemberUUID"].asString(); + if(!meetingInfoNodeMemberListMemberListItem["UserName"].isNull()) + memberListItemObject.userName = meetingInfoNodeMemberListMemberListItem["UserName"].asString(); + if(!meetingInfoNodeMemberListMemberListItem["UserId"].isNull()) + memberListItemObject.userId = meetingInfoNodeMemberListMemberListItem["UserId"].asString(); + if(!meetingInfoNodeMemberListMemberListItem["Status"].isNull()) + memberListItemObject.status = meetingInfoNodeMemberListMemberListItem["Status"].asString(); + meetingInfo_.memberList.push_back(memberListItemObject); + } + if(!value["ErrorCode"].isNull()) + errorCode_ = std::stoi(value["ErrorCode"].asString()); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +GetMembersResult::MeetingInfo GetMembersResult::getMeetingInfo()const +{ + return meetingInfo_; +} + +std::string GetMembersResult::getMessage()const +{ + return message_; +} + +int GetMembersResult::getErrorCode()const +{ + return errorCode_; +} + +bool GetMembersResult::getSuccess()const +{ + return success_; +} +