diff --git a/CHANGELOG b/CHANGELOG index 26900dfdc..a4a99c4a0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2020-09-05 Version: patch +- Add describes devices API. + 2020-09-04 Version: patch - Sync cdn APIs. diff --git a/vcs/CMakeLists.txt b/vcs/CMakeLists.txt index 76b1bc7f5..068dca4c4 100644 --- a/vcs/CMakeLists.txt +++ b/vcs/CMakeLists.txt @@ -67,6 +67,8 @@ set(vcs_public_header_model include/alibabacloud/vcs/model/DeleteUserGroupResult.h include/alibabacloud/vcs/model/DeleteVideoSummaryTaskRequest.h include/alibabacloud/vcs/model/DeleteVideoSummaryTaskResult.h + include/alibabacloud/vcs/model/DescribeDevicesRequest.h + include/alibabacloud/vcs/model/DescribeDevicesResult.h include/alibabacloud/vcs/model/GetBodyOptionsRequest.h include/alibabacloud/vcs/model/GetBodyOptionsResult.h include/alibabacloud/vcs/model/GetCatalogListRequest.h @@ -224,6 +226,8 @@ set(vcs_src src/model/DeleteUserGroupResult.cc src/model/DeleteVideoSummaryTaskRequest.cc src/model/DeleteVideoSummaryTaskResult.cc + src/model/DescribeDevicesRequest.cc + src/model/DescribeDevicesResult.cc src/model/GetBodyOptionsRequest.cc src/model/GetBodyOptionsResult.cc src/model/GetCatalogListRequest.cc diff --git a/vcs/include/alibabacloud/vcs/VcsClient.h b/vcs/include/alibabacloud/vcs/VcsClient.h index d2a31fdd3..fca895a62 100644 --- a/vcs/include/alibabacloud/vcs/VcsClient.h +++ b/vcs/include/alibabacloud/vcs/VcsClient.h @@ -68,6 +68,8 @@ #include "model/DeleteUserGroupResult.h" #include "model/DeleteVideoSummaryTaskRequest.h" #include "model/DeleteVideoSummaryTaskResult.h" +#include "model/DescribeDevicesRequest.h" +#include "model/DescribeDevicesResult.h" #include "model/GetBodyOptionsRequest.h" #include "model/GetBodyOptionsResult.h" #include "model/GetCatalogListRequest.h" @@ -254,6 +256,9 @@ namespace AlibabaCloud typedef Outcome DeleteVideoSummaryTaskOutcome; typedef std::future DeleteVideoSummaryTaskOutcomeCallable; typedef std::function&)> DeleteVideoSummaryTaskAsyncHandler; + typedef Outcome DescribeDevicesOutcome; + typedef std::future DescribeDevicesOutcomeCallable; + typedef std::function&)> DescribeDevicesAsyncHandler; typedef Outcome GetBodyOptionsOutcome; typedef std::future GetBodyOptionsOutcomeCallable; typedef std::function&)> GetBodyOptionsAsyncHandler; @@ -490,6 +495,9 @@ namespace AlibabaCloud DeleteVideoSummaryTaskOutcome deleteVideoSummaryTask(const Model::DeleteVideoSummaryTaskRequest &request)const; void deleteVideoSummaryTaskAsync(const Model::DeleteVideoSummaryTaskRequest& request, const DeleteVideoSummaryTaskAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DeleteVideoSummaryTaskOutcomeCallable deleteVideoSummaryTaskCallable(const Model::DeleteVideoSummaryTaskRequest& request) const; + DescribeDevicesOutcome describeDevices(const Model::DescribeDevicesRequest &request)const; + void describeDevicesAsync(const Model::DescribeDevicesRequest& request, const DescribeDevicesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeDevicesOutcomeCallable describeDevicesCallable(const Model::DescribeDevicesRequest& request) const; GetBodyOptionsOutcome getBodyOptions(const Model::GetBodyOptionsRequest &request)const; void getBodyOptionsAsync(const Model::GetBodyOptionsRequest& request, const GetBodyOptionsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetBodyOptionsOutcomeCallable getBodyOptionsCallable(const Model::GetBodyOptionsRequest& request) const; diff --git a/vcs/include/alibabacloud/vcs/model/DescribeDevicesRequest.h b/vcs/include/alibabacloud/vcs/model/DescribeDevicesRequest.h new file mode 100644 index 000000000..02d213860 --- /dev/null +++ b/vcs/include/alibabacloud/vcs/model/DescribeDevicesRequest.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_VCS_MODEL_DESCRIBEDEVICESREQUEST_H_ +#define ALIBABACLOUD_VCS_MODEL_DESCRIBEDEVICESREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Vcs + { + namespace Model + { + class ALIBABACLOUD_VCS_EXPORT DescribeDevicesRequest : public RpcServiceRequest + { + + public: + DescribeDevicesRequest(); + ~DescribeDevicesRequest(); + + int getPageNum()const; + void setPageNum(int pageNum); + std::string getCorpIdList()const; + void setCorpIdList(const std::string& corpIdList); + int getPageSize()const; + void setPageSize(int pageSize); + + private: + int pageNum_; + std::string corpIdList_; + int pageSize_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VCS_MODEL_DESCRIBEDEVICESREQUEST_H_ \ No newline at end of file diff --git a/vcs/include/alibabacloud/vcs/model/DescribeDevicesResult.h b/vcs/include/alibabacloud/vcs/model/DescribeDevicesResult.h new file mode 100644 index 000000000..332c7259b --- /dev/null +++ b/vcs/include/alibabacloud/vcs/model/DescribeDevicesResult.h @@ -0,0 +1,77 @@ +/* + * 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_VCS_MODEL_DESCRIBEDEVICESRESULT_H_ +#define ALIBABACLOUD_VCS_MODEL_DESCRIBEDEVICESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Vcs + { + namespace Model + { + class ALIBABACLOUD_VCS_EXPORT DescribeDevicesResult : public ServiceResult + { + public: + struct Data + { + struct Record + { + std::string inProtocol; + int status; + std::string deviceType; + std::string corpId; + std::string deviceAddress; + std::string deviceId; + std::string createTime; + std::string latitude; + std::string vendor; + std::string longitude; + std::string deviceName; + }; + int totalCount; + int pageNum; + int pageSize; + int totalPage; + std::vector records; + }; + + + DescribeDevicesResult(); + explicit DescribeDevicesResult(const std::string &payload); + ~DescribeDevicesResult(); + std::string getMessage()const; + Data getData()const; + std::string getCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + Data data_; + std::string code_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VCS_MODEL_DESCRIBEDEVICESRESULT_H_ \ No newline at end of file diff --git a/vcs/include/alibabacloud/vcs/model/GetDeviceLiveUrlRequest.h b/vcs/include/alibabacloud/vcs/model/GetDeviceLiveUrlRequest.h index 2803535f9..5f6e5e29e 100644 --- a/vcs/include/alibabacloud/vcs/model/GetDeviceLiveUrlRequest.h +++ b/vcs/include/alibabacloud/vcs/model/GetDeviceLiveUrlRequest.h @@ -35,14 +35,23 @@ namespace AlibabaCloud GetDeviceLiveUrlRequest(); ~GetDeviceLiveUrlRequest(); + std::string getOutProtocol()const; + void setOutProtocol(const std::string& outProtocol); + int getStreamType()const; + void setStreamType(int streamType); std::string getCorpId()const; void setCorpId(const std::string& corpId); std::string getGbId()const; void setGbId(const std::string& gbId); + std::string getDeviceId()const; + void setDeviceId(const std::string& deviceId); private: + std::string outProtocol_; + int streamType_; std::string corpId_; std::string gbId_; + std::string deviceId_; }; } diff --git a/vcs/include/alibabacloud/vcs/model/GetDeviceLiveUrlResult.h b/vcs/include/alibabacloud/vcs/model/GetDeviceLiveUrlResult.h index ab24d4610..950df99f8 100644 --- a/vcs/include/alibabacloud/vcs/model/GetDeviceLiveUrlResult.h +++ b/vcs/include/alibabacloud/vcs/model/GetDeviceLiveUrlResult.h @@ -37,15 +37,19 @@ namespace AlibabaCloud GetDeviceLiveUrlResult(); explicit GetDeviceLiveUrlResult(const std::string &payload); ~GetDeviceLiveUrlResult(); + int getStreamType()const; std::string getMessage()const; std::string getCode()const; + std::string getOutProtocol()const; std::string getUrl()const; protected: void parse(const std::string &payload); private: + int streamType_; std::string message_; std::string code_; + std::string outProtocol_; std::string url_; }; diff --git a/vcs/include/alibabacloud/vcs/model/GetDeviceVideoUrlRequest.h b/vcs/include/alibabacloud/vcs/model/GetDeviceVideoUrlRequest.h index fb91bbacc..cbfb2d5fd 100644 --- a/vcs/include/alibabacloud/vcs/model/GetDeviceVideoUrlRequest.h +++ b/vcs/include/alibabacloud/vcs/model/GetDeviceVideoUrlRequest.h @@ -35,6 +35,8 @@ namespace AlibabaCloud GetDeviceVideoUrlRequest(); ~GetDeviceVideoUrlRequest(); + std::string getOutProtocol()const; + void setOutProtocol(const std::string& outProtocol); std::string getCorpId()const; void setCorpId(const std::string& corpId); std::string getGbId()const; @@ -43,12 +45,16 @@ namespace AlibabaCloud void setEndTime(long endTime); long getStartTime()const; void setStartTime(long startTime); + std::string getDeviceId()const; + void setDeviceId(const std::string& deviceId); private: + std::string outProtocol_; std::string corpId_; std::string gbId_; long endTime_; long startTime_; + std::string deviceId_; }; } diff --git a/vcs/include/alibabacloud/vcs/model/GetDeviceVideoUrlResult.h b/vcs/include/alibabacloud/vcs/model/GetDeviceVideoUrlResult.h index dc2edf619..865302c72 100644 --- a/vcs/include/alibabacloud/vcs/model/GetDeviceVideoUrlResult.h +++ b/vcs/include/alibabacloud/vcs/model/GetDeviceVideoUrlResult.h @@ -39,6 +39,7 @@ namespace AlibabaCloud ~GetDeviceVideoUrlResult(); std::string getMessage()const; std::string getCode()const; + std::string getOutProtocol()const; std::string getUrl()const; protected: @@ -46,6 +47,7 @@ namespace AlibabaCloud private: std::string message_; std::string code_; + std::string outProtocol_; std::string url_; }; diff --git a/vcs/include/alibabacloud/vcs/model/GetProfileListRequest.h b/vcs/include/alibabacloud/vcs/model/GetProfileListRequest.h index d5e8620c8..7d76da774 100644 --- a/vcs/include/alibabacloud/vcs/model/GetProfileListRequest.h +++ b/vcs/include/alibabacloud/vcs/model/GetProfileListRequest.h @@ -47,6 +47,8 @@ namespace AlibabaCloud void setIdNumber(const std::string& idNumber); long getPageNumber()const; void setPageNumber(long pageNumber); + std::string getFaceImageId()const; + void setFaceImageId(const std::string& faceImageId); std::string getFaceUrl()const; void setFaceUrl(const std::string& faceUrl); long getPageSize()const; @@ -77,6 +79,7 @@ namespace AlibabaCloud std::string plateNo_; std::string idNumber_; long pageNumber_; + std::string faceImageId_; std::string faceUrl_; long pageSize_; std::map personIdList_; diff --git a/vcs/src/VcsClient.cc b/vcs/src/VcsClient.cc index 41714e34c..c0bb302f8 100644 --- a/vcs/src/VcsClient.cc +++ b/vcs/src/VcsClient.cc @@ -31,21 +31,21 @@ VcsClient::VcsClient(const Credentials &credentials, const ClientConfiguration & RpcServiceClient(SERVICE_NAME, std::make_shared(credentials), configuration) { auto locationClient = std::make_shared(credentials, configuration); - endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "vcs"); } VcsClient::VcsClient(const std::shared_ptr& credentialsProvider, const ClientConfiguration & configuration) : RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration) { auto locationClient = std::make_shared(credentialsProvider, configuration); - endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "vcs"); } VcsClient::VcsClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) : RpcServiceClient(SERVICE_NAME, std::make_shared(accessKeyId, accessKeySecret), configuration) { auto locationClient = std::make_shared(accessKeyId, accessKeySecret, configuration); - endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "vcs"); } VcsClient::~VcsClient() @@ -879,6 +879,42 @@ VcsClient::DeleteVideoSummaryTaskOutcomeCallable VcsClient::deleteVideoSummaryTa return task->get_future(); } +VcsClient::DescribeDevicesOutcome VcsClient::describeDevices(const DescribeDevicesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeDevicesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeDevicesOutcome(DescribeDevicesResult(outcome.result())); + else + return DescribeDevicesOutcome(outcome.error()); +} + +void VcsClient::describeDevicesAsync(const DescribeDevicesRequest& request, const DescribeDevicesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeDevices(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +VcsClient::DescribeDevicesOutcomeCallable VcsClient::describeDevicesCallable(const DescribeDevicesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeDevices(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + VcsClient::GetBodyOptionsOutcome VcsClient::getBodyOptions(const GetBodyOptionsRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/vcs/src/model/DescribeDevicesRequest.cc b/vcs/src/model/DescribeDevicesRequest.cc new file mode 100644 index 000000000..4f142a7e9 --- /dev/null +++ b/vcs/src/model/DescribeDevicesRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Vcs::Model::DescribeDevicesRequest; + +DescribeDevicesRequest::DescribeDevicesRequest() : + RpcServiceRequest("vcs", "2020-05-15", "DescribeDevices") +{ + setMethod(HttpRequest::Method::Post); +} + +DescribeDevicesRequest::~DescribeDevicesRequest() +{} + +int DescribeDevicesRequest::getPageNum()const +{ + return pageNum_; +} + +void DescribeDevicesRequest::setPageNum(int pageNum) +{ + pageNum_ = pageNum; + setBodyParameter("PageNum", std::to_string(pageNum)); +} + +std::string DescribeDevicesRequest::getCorpIdList()const +{ + return corpIdList_; +} + +void DescribeDevicesRequest::setCorpIdList(const std::string& corpIdList) +{ + corpIdList_ = corpIdList; + setBodyParameter("CorpIdList", corpIdList); +} + +int DescribeDevicesRequest::getPageSize()const +{ + return pageSize_; +} + +void DescribeDevicesRequest::setPageSize(int pageSize) +{ + pageSize_ = pageSize; + setBodyParameter("PageSize", std::to_string(pageSize)); +} + diff --git a/vcs/src/model/DescribeDevicesResult.cc b/vcs/src/model/DescribeDevicesResult.cc new file mode 100644 index 000000000..e2bdfabc6 --- /dev/null +++ b/vcs/src/model/DescribeDevicesResult.cc @@ -0,0 +1,100 @@ +/* + * 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::Vcs; +using namespace AlibabaCloud::Vcs::Model; + +DescribeDevicesResult::DescribeDevicesResult() : + ServiceResult() +{} + +DescribeDevicesResult::DescribeDevicesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeDevicesResult::~DescribeDevicesResult() +{} + +void DescribeDevicesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto dataNode = value["Data"]; + if(!dataNode["PageNum"].isNull()) + data_.pageNum = std::stoi(dataNode["PageNum"].asString()); + if(!dataNode["PageSize"].isNull()) + data_.pageSize = std::stoi(dataNode["PageSize"].asString()); + if(!dataNode["TotalCount"].isNull()) + data_.totalCount = std::stoi(dataNode["TotalCount"].asString()); + if(!dataNode["TotalPage"].isNull()) + data_.totalPage = std::stoi(dataNode["TotalPage"].asString()); + auto allRecordsNode = dataNode["Records"]["Record"]; + for (auto dataNodeRecordsRecord : allRecordsNode) + { + Data::Record recordObject; + if(!dataNodeRecordsRecord["InProtocol"].isNull()) + recordObject.inProtocol = dataNodeRecordsRecord["InProtocol"].asString(); + if(!dataNodeRecordsRecord["CreateTime"].isNull()) + recordObject.createTime = dataNodeRecordsRecord["CreateTime"].asString(); + if(!dataNodeRecordsRecord["DeviceAddress"].isNull()) + recordObject.deviceAddress = dataNodeRecordsRecord["DeviceAddress"].asString(); + if(!dataNodeRecordsRecord["DeviceId"].isNull()) + recordObject.deviceId = dataNodeRecordsRecord["DeviceId"].asString(); + if(!dataNodeRecordsRecord["DeviceName"].isNull()) + recordObject.deviceName = dataNodeRecordsRecord["DeviceName"].asString(); + if(!dataNodeRecordsRecord["DeviceType"].isNull()) + recordObject.deviceType = dataNodeRecordsRecord["DeviceType"].asString(); + if(!dataNodeRecordsRecord["Latitude"].isNull()) + recordObject.latitude = dataNodeRecordsRecord["Latitude"].asString(); + if(!dataNodeRecordsRecord["Longitude"].isNull()) + recordObject.longitude = dataNodeRecordsRecord["Longitude"].asString(); + if(!dataNodeRecordsRecord["Status"].isNull()) + recordObject.status = std::stoi(dataNodeRecordsRecord["Status"].asString()); + if(!dataNodeRecordsRecord["Vendor"].isNull()) + recordObject.vendor = dataNodeRecordsRecord["Vendor"].asString(); + if(!dataNodeRecordsRecord["CorpId"].isNull()) + recordObject.corpId = dataNodeRecordsRecord["CorpId"].asString(); + data_.records.push_back(recordObject); + } + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + +} + +std::string DescribeDevicesResult::getMessage()const +{ + return message_; +} + +DescribeDevicesResult::Data DescribeDevicesResult::getData()const +{ + return data_; +} + +std::string DescribeDevicesResult::getCode()const +{ + return code_; +} + diff --git a/vcs/src/model/GetDeviceLiveUrlRequest.cc b/vcs/src/model/GetDeviceLiveUrlRequest.cc index b12db2f93..31d92b3a2 100644 --- a/vcs/src/model/GetDeviceLiveUrlRequest.cc +++ b/vcs/src/model/GetDeviceLiveUrlRequest.cc @@ -27,6 +27,28 @@ GetDeviceLiveUrlRequest::GetDeviceLiveUrlRequest() : GetDeviceLiveUrlRequest::~GetDeviceLiveUrlRequest() {} +std::string GetDeviceLiveUrlRequest::getOutProtocol()const +{ + return outProtocol_; +} + +void GetDeviceLiveUrlRequest::setOutProtocol(const std::string& outProtocol) +{ + outProtocol_ = outProtocol; + setBodyParameter("OutProtocol", outProtocol); +} + +int GetDeviceLiveUrlRequest::getStreamType()const +{ + return streamType_; +} + +void GetDeviceLiveUrlRequest::setStreamType(int streamType) +{ + streamType_ = streamType; + setBodyParameter("StreamType", std::to_string(streamType)); +} + std::string GetDeviceLiveUrlRequest::getCorpId()const { return corpId_; @@ -49,3 +71,14 @@ void GetDeviceLiveUrlRequest::setGbId(const std::string& gbId) setBodyParameter("GbId", gbId); } +std::string GetDeviceLiveUrlRequest::getDeviceId()const +{ + return deviceId_; +} + +void GetDeviceLiveUrlRequest::setDeviceId(const std::string& deviceId) +{ + deviceId_ = deviceId; + setBodyParameter("DeviceId", deviceId); +} + diff --git a/vcs/src/model/GetDeviceLiveUrlResult.cc b/vcs/src/model/GetDeviceLiveUrlResult.cc index 4cd38a488..607b555f1 100644 --- a/vcs/src/model/GetDeviceLiveUrlResult.cc +++ b/vcs/src/model/GetDeviceLiveUrlResult.cc @@ -41,13 +41,22 @@ void GetDeviceLiveUrlResult::parse(const std::string &payload) setRequestId(value["RequestId"].asString()); if(!value["Code"].isNull()) code_ = value["Code"].asString(); - if(!value["Url"].isNull()) - url_ = value["Url"].asString(); if(!value["Message"].isNull()) message_ = value["Message"].asString(); + if(!value["Url"].isNull()) + url_ = value["Url"].asString(); + if(!value["OutProtocol"].isNull()) + outProtocol_ = value["OutProtocol"].asString(); + if(!value["StreamType"].isNull()) + streamType_ = std::stoi(value["StreamType"].asString()); } +int GetDeviceLiveUrlResult::getStreamType()const +{ + return streamType_; +} + std::string GetDeviceLiveUrlResult::getMessage()const { return message_; @@ -58,6 +67,11 @@ std::string GetDeviceLiveUrlResult::getCode()const return code_; } +std::string GetDeviceLiveUrlResult::getOutProtocol()const +{ + return outProtocol_; +} + std::string GetDeviceLiveUrlResult::getUrl()const { return url_; diff --git a/vcs/src/model/GetDeviceVideoUrlRequest.cc b/vcs/src/model/GetDeviceVideoUrlRequest.cc index a1b86f23d..bbf53e860 100644 --- a/vcs/src/model/GetDeviceVideoUrlRequest.cc +++ b/vcs/src/model/GetDeviceVideoUrlRequest.cc @@ -27,6 +27,17 @@ GetDeviceVideoUrlRequest::GetDeviceVideoUrlRequest() : GetDeviceVideoUrlRequest::~GetDeviceVideoUrlRequest() {} +std::string GetDeviceVideoUrlRequest::getOutProtocol()const +{ + return outProtocol_; +} + +void GetDeviceVideoUrlRequest::setOutProtocol(const std::string& outProtocol) +{ + outProtocol_ = outProtocol; + setBodyParameter("OutProtocol", outProtocol); +} + std::string GetDeviceVideoUrlRequest::getCorpId()const { return corpId_; @@ -71,3 +82,14 @@ void GetDeviceVideoUrlRequest::setStartTime(long startTime) setBodyParameter("StartTime", std::to_string(startTime)); } +std::string GetDeviceVideoUrlRequest::getDeviceId()const +{ + return deviceId_; +} + +void GetDeviceVideoUrlRequest::setDeviceId(const std::string& deviceId) +{ + deviceId_ = deviceId; + setBodyParameter("DeviceId", deviceId); +} + diff --git a/vcs/src/model/GetDeviceVideoUrlResult.cc b/vcs/src/model/GetDeviceVideoUrlResult.cc index 318075b84..1724612d5 100644 --- a/vcs/src/model/GetDeviceVideoUrlResult.cc +++ b/vcs/src/model/GetDeviceVideoUrlResult.cc @@ -45,6 +45,8 @@ void GetDeviceVideoUrlResult::parse(const std::string &payload) message_ = value["Message"].asString(); if(!value["Url"].isNull()) url_ = value["Url"].asString(); + if(!value["OutProtocol"].isNull()) + outProtocol_ = value["OutProtocol"].asString(); } @@ -58,6 +60,11 @@ std::string GetDeviceVideoUrlResult::getCode()const return code_; } +std::string GetDeviceVideoUrlResult::getOutProtocol()const +{ + return outProtocol_; +} + std::string GetDeviceVideoUrlResult::getUrl()const { return url_; diff --git a/vcs/src/model/GetProfileListRequest.cc b/vcs/src/model/GetProfileListRequest.cc index 741ed0131..79365c668 100644 --- a/vcs/src/model/GetProfileListRequest.cc +++ b/vcs/src/model/GetProfileListRequest.cc @@ -93,6 +93,17 @@ void GetProfileListRequest::setPageNumber(long pageNumber) setBodyParameter("PageNumber", std::to_string(pageNumber)); } +std::string GetProfileListRequest::getFaceImageId()const +{ + return faceImageId_; +} + +void GetProfileListRequest::setFaceImageId(const std::string& faceImageId) +{ + faceImageId_ = faceImageId; + setBodyParameter("FaceImageId", faceImageId); +} + std::string GetProfileListRequest::getFaceUrl()const { return faceUrl_;