diff --git a/CHANGELOG b/CHANGELOG index c57525479..4bdc6680f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +2020-05-13 Version: 1.36.410 +- Add ListDevicesImages DescribeIpcLiveAddress. +- Modify DescribeDevices. + 2020-05-13 Version: 1.36.409 - Add ExportTas apis. diff --git a/VERSION b/VERSION index 38e4157e9..7c5ef8c9e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.409 \ No newline at end of file +1.36.410 \ No newline at end of file diff --git a/reid/CMakeLists.txt b/reid/CMakeLists.txt index af310f328..58a92aed4 100644 --- a/reid/CMakeLists.txt +++ b/reid/CMakeLists.txt @@ -35,12 +35,16 @@ set(reid_public_header_model include/alibabacloud/reid/model/DescribeHeatMapResult.h include/alibabacloud/reid/model/DescribeImageUrlsRequest.h include/alibabacloud/reid/model/DescribeImageUrlsResult.h + include/alibabacloud/reid/model/DescribeIpcLiveAddressRequest.h + include/alibabacloud/reid/model/DescribeIpcLiveAddressResult.h include/alibabacloud/reid/model/DescribeOverviewDataRequest.h include/alibabacloud/reid/model/DescribeOverviewDataResult.h include/alibabacloud/reid/model/ImportSpecialPersonnelRequest.h include/alibabacloud/reid/model/ImportSpecialPersonnelResult.h include/alibabacloud/reid/model/ListActionDataRequest.h include/alibabacloud/reid/model/ListActionDataResult.h + include/alibabacloud/reid/model/ListDevicesImagesRequest.h + include/alibabacloud/reid/model/ListDevicesImagesResult.h include/alibabacloud/reid/model/ListEmapRequest.h include/alibabacloud/reid/model/ListEmapResult.h include/alibabacloud/reid/model/ListLocationRequest.h @@ -70,12 +74,16 @@ set(reid_src src/model/DescribeHeatMapResult.cc src/model/DescribeImageUrlsRequest.cc src/model/DescribeImageUrlsResult.cc + src/model/DescribeIpcLiveAddressRequest.cc + src/model/DescribeIpcLiveAddressResult.cc src/model/DescribeOverviewDataRequest.cc src/model/DescribeOverviewDataResult.cc src/model/ImportSpecialPersonnelRequest.cc src/model/ImportSpecialPersonnelResult.cc src/model/ListActionDataRequest.cc src/model/ListActionDataResult.cc + src/model/ListDevicesImagesRequest.cc + src/model/ListDevicesImagesResult.cc src/model/ListEmapRequest.cc src/model/ListEmapResult.cc src/model/ListLocationRequest.cc diff --git a/reid/include/alibabacloud/reid/ReidClient.h b/reid/include/alibabacloud/reid/ReidClient.h index d3b2f903e..caf137c45 100644 --- a/reid/include/alibabacloud/reid/ReidClient.h +++ b/reid/include/alibabacloud/reid/ReidClient.h @@ -36,12 +36,16 @@ #include "model/DescribeHeatMapResult.h" #include "model/DescribeImageUrlsRequest.h" #include "model/DescribeImageUrlsResult.h" +#include "model/DescribeIpcLiveAddressRequest.h" +#include "model/DescribeIpcLiveAddressResult.h" #include "model/DescribeOverviewDataRequest.h" #include "model/DescribeOverviewDataResult.h" #include "model/ImportSpecialPersonnelRequest.h" #include "model/ImportSpecialPersonnelResult.h" #include "model/ListActionDataRequest.h" #include "model/ListActionDataResult.h" +#include "model/ListDevicesImagesRequest.h" +#include "model/ListDevicesImagesResult.h" #include "model/ListEmapRequest.h" #include "model/ListEmapResult.h" #include "model/ListLocationRequest.h" @@ -84,6 +88,9 @@ namespace AlibabaCloud typedef Outcome DescribeImageUrlsOutcome; typedef std::future DescribeImageUrlsOutcomeCallable; typedef std::function&)> DescribeImageUrlsAsyncHandler; + typedef Outcome DescribeIpcLiveAddressOutcome; + typedef std::future DescribeIpcLiveAddressOutcomeCallable; + typedef std::function&)> DescribeIpcLiveAddressAsyncHandler; typedef Outcome DescribeOverviewDataOutcome; typedef std::future DescribeOverviewDataOutcomeCallable; typedef std::function&)> DescribeOverviewDataAsyncHandler; @@ -93,6 +100,9 @@ namespace AlibabaCloud typedef Outcome ListActionDataOutcome; typedef std::future ListActionDataOutcomeCallable; typedef std::function&)> ListActionDataAsyncHandler; + typedef Outcome ListDevicesImagesOutcome; + typedef std::future ListDevicesImagesOutcomeCallable; + typedef std::function&)> ListDevicesImagesAsyncHandler; typedef Outcome ListEmapOutcome; typedef std::future ListEmapOutcomeCallable; typedef std::function&)> ListEmapAsyncHandler; @@ -137,6 +147,9 @@ namespace AlibabaCloud DescribeImageUrlsOutcome describeImageUrls(const Model::DescribeImageUrlsRequest &request)const; void describeImageUrlsAsync(const Model::DescribeImageUrlsRequest& request, const DescribeImageUrlsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeImageUrlsOutcomeCallable describeImageUrlsCallable(const Model::DescribeImageUrlsRequest& request) const; + DescribeIpcLiveAddressOutcome describeIpcLiveAddress(const Model::DescribeIpcLiveAddressRequest &request)const; + void describeIpcLiveAddressAsync(const Model::DescribeIpcLiveAddressRequest& request, const DescribeIpcLiveAddressAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeIpcLiveAddressOutcomeCallable describeIpcLiveAddressCallable(const Model::DescribeIpcLiveAddressRequest& request) const; DescribeOverviewDataOutcome describeOverviewData(const Model::DescribeOverviewDataRequest &request)const; void describeOverviewDataAsync(const Model::DescribeOverviewDataRequest& request, const DescribeOverviewDataAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeOverviewDataOutcomeCallable describeOverviewDataCallable(const Model::DescribeOverviewDataRequest& request) const; @@ -146,6 +159,9 @@ namespace AlibabaCloud ListActionDataOutcome listActionData(const Model::ListActionDataRequest &request)const; void listActionDataAsync(const Model::ListActionDataRequest& request, const ListActionDataAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListActionDataOutcomeCallable listActionDataCallable(const Model::ListActionDataRequest& request) const; + ListDevicesImagesOutcome listDevicesImages(const Model::ListDevicesImagesRequest &request)const; + void listDevicesImagesAsync(const Model::ListDevicesImagesRequest& request, const ListDevicesImagesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListDevicesImagesOutcomeCallable listDevicesImagesCallable(const Model::ListDevicesImagesRequest& request) const; ListEmapOutcome listEmap(const Model::ListEmapRequest &request)const; void listEmapAsync(const Model::ListEmapRequest& request, const ListEmapAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListEmapOutcomeCallable listEmapCallable(const Model::ListEmapRequest& request) const; diff --git a/reid/include/alibabacloud/reid/model/DescribeCameraStatisticsResult.h b/reid/include/alibabacloud/reid/model/DescribeCameraStatisticsResult.h index f5d93323a..7208cf868 100644 --- a/reid/include/alibabacloud/reid/model/DescribeCameraStatisticsResult.h +++ b/reid/include/alibabacloud/reid/model/DescribeCameraStatisticsResult.h @@ -44,6 +44,7 @@ namespace AlibabaCloud std::vector pvRects; long locationId; long processCursor; + std::string pvType; long pvCount; long ipcId; }; diff --git a/reid/include/alibabacloud/reid/model/DescribeDevicesResult.h b/reid/include/alibabacloud/reid/model/DescribeDevicesResult.h index 26ed08436..46f920bc6 100644 --- a/reid/include/alibabacloud/reid/model/DescribeDevicesResult.h +++ b/reid/include/alibabacloud/reid/model/DescribeDevicesResult.h @@ -39,8 +39,10 @@ namespace AlibabaCloud std::string agentIp; std::string ipcIp; long ipcReceiveTime; + std::string ipcName; std::string ipcStatus; long agentReceiveTime; + long ipcId; }; diff --git a/reid/include/alibabacloud/reid/model/DescribeIpcLiveAddressRequest.h b/reid/include/alibabacloud/reid/model/DescribeIpcLiveAddressRequest.h new file mode 100644 index 000000000..57ba3609d --- /dev/null +++ b/reid/include/alibabacloud/reid/model/DescribeIpcLiveAddressRequest.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_REID_MODEL_DESCRIBEIPCLIVEADDRESSREQUEST_H_ +#define ALIBABACLOUD_REID_MODEL_DESCRIBEIPCLIVEADDRESSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Reid + { + namespace Model + { + class ALIBABACLOUD_REID_EXPORT DescribeIpcLiveAddressRequest : public RpcServiceRequest + { + + public: + DescribeIpcLiveAddressRequest(); + ~DescribeIpcLiveAddressRequest(); + + long getIpcId()const; + void setIpcId(long ipcId); + long getStoreId()const; + void setStoreId(long storeId); + + private: + long ipcId_; + long storeId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_REID_MODEL_DESCRIBEIPCLIVEADDRESSREQUEST_H_ \ No newline at end of file diff --git a/reid/include/alibabacloud/reid/model/DescribeIpcLiveAddressResult.h b/reid/include/alibabacloud/reid/model/DescribeIpcLiveAddressResult.h new file mode 100644 index 000000000..26d02158d --- /dev/null +++ b/reid/include/alibabacloud/reid/model/DescribeIpcLiveAddressResult.h @@ -0,0 +1,69 @@ +/* + * 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_REID_MODEL_DESCRIBEIPCLIVEADDRESSRESULT_H_ +#define ALIBABACLOUD_REID_MODEL_DESCRIBEIPCLIVEADDRESSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Reid + { + namespace Model + { + class ALIBABACLOUD_REID_EXPORT DescribeIpcLiveAddressResult : public ServiceResult + { + public: + + + DescribeIpcLiveAddressResult(); + explicit DescribeIpcLiveAddressResult(const std::string &payload); + ~DescribeIpcLiveAddressResult(); + std::string getMessage()const; + std::string getExpiredTime()const; + std::string getDynamicCode()const; + std::string getErrorCode()const; + std::string getDynamicMessage()const; + std::string getErrorMessage()const; + std::string getCode()const; + bool getSuccess()const; + long getIpcId()const; + std::string getRtmpUrl()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + std::string expiredTime_; + std::string dynamicCode_; + std::string errorCode_; + std::string dynamicMessage_; + std::string errorMessage_; + std::string code_; + bool success_; + long ipcId_; + std::string rtmpUrl_; + + }; + } + } +} +#endif // !ALIBABACLOUD_REID_MODEL_DESCRIBEIPCLIVEADDRESSRESULT_H_ \ No newline at end of file diff --git a/reid/include/alibabacloud/reid/model/ListDevicesImagesRequest.h b/reid/include/alibabacloud/reid/model/ListDevicesImagesRequest.h new file mode 100644 index 000000000..ff733f3d2 --- /dev/null +++ b/reid/include/alibabacloud/reid/model/ListDevicesImagesRequest.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_REID_MODEL_LISTDEVICESIMAGESREQUEST_H_ +#define ALIBABACLOUD_REID_MODEL_LISTDEVICESIMAGESREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Reid + { + namespace Model + { + class ALIBABACLOUD_REID_EXPORT ListDevicesImagesRequest : public RpcServiceRequest + { + + public: + ListDevicesImagesRequest(); + ~ListDevicesImagesRequest(); + + std::string getIpcIdList()const; + void setIpcIdList(const std::string& ipcIdList); + long getStoreId()const; + void setStoreId(long storeId); + + private: + std::string ipcIdList_; + long storeId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_REID_MODEL_LISTDEVICESIMAGESREQUEST_H_ \ No newline at end of file diff --git a/reid/include/alibabacloud/reid/model/ListDevicesImagesResult.h b/reid/include/alibabacloud/reid/model/ListDevicesImagesResult.h new file mode 100644 index 000000000..1631e6fab --- /dev/null +++ b/reid/include/alibabacloud/reid/model/ListDevicesImagesResult.h @@ -0,0 +1,70 @@ +/* + * 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_REID_MODEL_LISTDEVICESIMAGESRESULT_H_ +#define ALIBABACLOUD_REID_MODEL_LISTDEVICESIMAGESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Reid + { + namespace Model + { + class ALIBABACLOUD_REID_EXPORT ListDevicesImagesResult : public ServiceResult + { + public: + struct DeviceImage + { + std::string imageUrl; + long ipcId; + }; + + + ListDevicesImagesResult(); + explicit ListDevicesImagesResult(const std::string &payload); + ~ListDevicesImagesResult(); + std::vector getDeviceImages()const; + std::string getMessage()const; + std::string getDynamicCode()const; + std::string getErrorCode()const; + std::string getDynamicMessage()const; + std::string getErrorMessage()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::vector deviceImages_; + std::string message_; + std::string dynamicCode_; + std::string errorCode_; + std::string dynamicMessage_; + std::string errorMessage_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_REID_MODEL_LISTDEVICESIMAGESRESULT_H_ \ No newline at end of file diff --git a/reid/src/ReidClient.cc b/reid/src/ReidClient.cc index cc9da860e..4e97ff515 100644 --- a/reid/src/ReidClient.cc +++ b/reid/src/ReidClient.cc @@ -31,21 +31,21 @@ ReidClient::ReidClient(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, "1.1.2"); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); } ReidClient::ReidClient(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, "1.1.2"); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); } ReidClient::ReidClient(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, "1.1.2"); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); } ReidClient::~ReidClient() @@ -303,6 +303,42 @@ ReidClient::DescribeImageUrlsOutcomeCallable ReidClient::describeImageUrlsCallab return task->get_future(); } +ReidClient::DescribeIpcLiveAddressOutcome ReidClient::describeIpcLiveAddress(const DescribeIpcLiveAddressRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeIpcLiveAddressOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeIpcLiveAddressOutcome(DescribeIpcLiveAddressResult(outcome.result())); + else + return DescribeIpcLiveAddressOutcome(outcome.error()); +} + +void ReidClient::describeIpcLiveAddressAsync(const DescribeIpcLiveAddressRequest& request, const DescribeIpcLiveAddressAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeIpcLiveAddress(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ReidClient::DescribeIpcLiveAddressOutcomeCallable ReidClient::describeIpcLiveAddressCallable(const DescribeIpcLiveAddressRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeIpcLiveAddress(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + ReidClient::DescribeOverviewDataOutcome ReidClient::describeOverviewData(const DescribeOverviewDataRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -411,6 +447,42 @@ ReidClient::ListActionDataOutcomeCallable ReidClient::listActionDataCallable(con return task->get_future(); } +ReidClient::ListDevicesImagesOutcome ReidClient::listDevicesImages(const ListDevicesImagesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListDevicesImagesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListDevicesImagesOutcome(ListDevicesImagesResult(outcome.result())); + else + return ListDevicesImagesOutcome(outcome.error()); +} + +void ReidClient::listDevicesImagesAsync(const ListDevicesImagesRequest& request, const ListDevicesImagesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listDevicesImages(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ReidClient::ListDevicesImagesOutcomeCallable ReidClient::listDevicesImagesCallable(const ListDevicesImagesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listDevicesImages(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + ReidClient::ListEmapOutcome ReidClient::listEmap(const ListEmapRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/reid/src/model/DescribeCameraStatisticsResult.cc b/reid/src/model/DescribeCameraStatisticsResult.cc index 051090cff..4c5e4852b 100644 --- a/reid/src/model/DescribeCameraStatisticsResult.cc +++ b/reid/src/model/DescribeCameraStatisticsResult.cc @@ -51,6 +51,8 @@ void DescribeCameraStatisticsResult::parse(const std::string &payload) pvStatisticResultsObject.pvCount = std::stol(valuePvStatisticResultsPvStatisticResult["PvCount"].asString()); if(!valuePvStatisticResultsPvStatisticResult["LocationId"].isNull()) pvStatisticResultsObject.locationId = std::stol(valuePvStatisticResultsPvStatisticResult["LocationId"].asString()); + if(!valuePvStatisticResultsPvStatisticResult["PvType"].isNull()) + pvStatisticResultsObject.pvType = valuePvStatisticResultsPvStatisticResult["PvType"].asString(); auto allPvRectsNode = allPvStatisticResultsNode["PvRects"]["Rect"]; for (auto allPvStatisticResultsNodePvRectsRect : allPvRectsNode) { diff --git a/reid/src/model/DescribeDevicesResult.cc b/reid/src/model/DescribeDevicesResult.cc index 4e4aa1cd2..02bfa483c 100644 --- a/reid/src/model/DescribeDevicesResult.cc +++ b/reid/src/model/DescribeDevicesResult.cc @@ -57,6 +57,10 @@ void DescribeDevicesResult::parse(const std::string &payload) devicesObject.agentMac = valueDevicesDevice["AgentMac"].asString(); if(!valueDevicesDevice["IpcReceiveTime"].isNull()) devicesObject.ipcReceiveTime = std::stol(valueDevicesDevice["IpcReceiveTime"].asString()); + if(!valueDevicesDevice["IpcId"].isNull()) + devicesObject.ipcId = std::stol(valueDevicesDevice["IpcId"].asString()); + if(!valueDevicesDevice["IpcName"].isNull()) + devicesObject.ipcName = valueDevicesDevice["IpcName"].asString(); devices_.push_back(devicesObject); } if(!value["ErrorCode"].isNull()) diff --git a/reid/src/model/DescribeIpcLiveAddressRequest.cc b/reid/src/model/DescribeIpcLiveAddressRequest.cc new file mode 100644 index 000000000..caa8a9fcd --- /dev/null +++ b/reid/src/model/DescribeIpcLiveAddressRequest.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::Reid::Model::DescribeIpcLiveAddressRequest; + +DescribeIpcLiveAddressRequest::DescribeIpcLiveAddressRequest() : + RpcServiceRequest("reid", "2019-09-28", "DescribeIpcLiveAddress") +{ + setMethod(HttpRequest::Method::Post); +} + +DescribeIpcLiveAddressRequest::~DescribeIpcLiveAddressRequest() +{} + +long DescribeIpcLiveAddressRequest::getIpcId()const +{ + return ipcId_; +} + +void DescribeIpcLiveAddressRequest::setIpcId(long ipcId) +{ + ipcId_ = ipcId; + setBodyParameter("IpcId", std::to_string(ipcId)); +} + +long DescribeIpcLiveAddressRequest::getStoreId()const +{ + return storeId_; +} + +void DescribeIpcLiveAddressRequest::setStoreId(long storeId) +{ + storeId_ = storeId; + setBodyParameter("StoreId", std::to_string(storeId)); +} + diff --git a/reid/src/model/DescribeIpcLiveAddressResult.cc b/reid/src/model/DescribeIpcLiveAddressResult.cc new file mode 100644 index 000000000..360c771b2 --- /dev/null +++ b/reid/src/model/DescribeIpcLiveAddressResult.cc @@ -0,0 +1,114 @@ +/* + * 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::Reid; +using namespace AlibabaCloud::Reid::Model; + +DescribeIpcLiveAddressResult::DescribeIpcLiveAddressResult() : + ServiceResult() +{} + +DescribeIpcLiveAddressResult::DescribeIpcLiveAddressResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeIpcLiveAddressResult::~DescribeIpcLiveAddressResult() +{} + +void DescribeIpcLiveAddressResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["RtmpUrl"].isNull()) + rtmpUrl_ = value["RtmpUrl"].asString(); + if(!value["ErrorCode"].isNull()) + errorCode_ = value["ErrorCode"].asString(); + if(!value["ErrorMessage"].isNull()) + errorMessage_ = value["ErrorMessage"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["ExpiredTime"].isNull()) + expiredTime_ = value["ExpiredTime"].asString(); + if(!value["DynamicCode"].isNull()) + dynamicCode_ = value["DynamicCode"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + if(!value["IpcId"].isNull()) + ipcId_ = std::stol(value["IpcId"].asString()); + if(!value["DynamicMessage"].isNull()) + dynamicMessage_ = value["DynamicMessage"].asString(); + +} + +std::string DescribeIpcLiveAddressResult::getMessage()const +{ + return message_; +} + +std::string DescribeIpcLiveAddressResult::getExpiredTime()const +{ + return expiredTime_; +} + +std::string DescribeIpcLiveAddressResult::getDynamicCode()const +{ + return dynamicCode_; +} + +std::string DescribeIpcLiveAddressResult::getErrorCode()const +{ + return errorCode_; +} + +std::string DescribeIpcLiveAddressResult::getDynamicMessage()const +{ + return dynamicMessage_; +} + +std::string DescribeIpcLiveAddressResult::getErrorMessage()const +{ + return errorMessage_; +} + +std::string DescribeIpcLiveAddressResult::getCode()const +{ + return code_; +} + +bool DescribeIpcLiveAddressResult::getSuccess()const +{ + return success_; +} + +long DescribeIpcLiveAddressResult::getIpcId()const +{ + return ipcId_; +} + +std::string DescribeIpcLiveAddressResult::getRtmpUrl()const +{ + return rtmpUrl_; +} + diff --git a/reid/src/model/ListDevicesImagesRequest.cc b/reid/src/model/ListDevicesImagesRequest.cc new file mode 100644 index 000000000..c38a9254b --- /dev/null +++ b/reid/src/model/ListDevicesImagesRequest.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::Reid::Model::ListDevicesImagesRequest; + +ListDevicesImagesRequest::ListDevicesImagesRequest() : + RpcServiceRequest("reid", "2019-09-28", "ListDevicesImages") +{ + setMethod(HttpRequest::Method::Post); +} + +ListDevicesImagesRequest::~ListDevicesImagesRequest() +{} + +std::string ListDevicesImagesRequest::getIpcIdList()const +{ + return ipcIdList_; +} + +void ListDevicesImagesRequest::setIpcIdList(const std::string& ipcIdList) +{ + ipcIdList_ = ipcIdList; + setBodyParameter("IpcIdList", ipcIdList); +} + +long ListDevicesImagesRequest::getStoreId()const +{ + return storeId_; +} + +void ListDevicesImagesRequest::setStoreId(long storeId) +{ + storeId_ = storeId; + setBodyParameter("StoreId", std::to_string(storeId)); +} + diff --git a/reid/src/model/ListDevicesImagesResult.cc b/reid/src/model/ListDevicesImagesResult.cc new file mode 100644 index 000000000..dd3e1c64d --- /dev/null +++ b/reid/src/model/ListDevicesImagesResult.cc @@ -0,0 +1,108 @@ +/* + * 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::Reid; +using namespace AlibabaCloud::Reid::Model; + +ListDevicesImagesResult::ListDevicesImagesResult() : + ServiceResult() +{} + +ListDevicesImagesResult::ListDevicesImagesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListDevicesImagesResult::~ListDevicesImagesResult() +{} + +void ListDevicesImagesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allDeviceImagesNode = value["DeviceImages"]["DeviceImage"]; + for (auto valueDeviceImagesDeviceImage : allDeviceImagesNode) + { + DeviceImage deviceImagesObject; + if(!valueDeviceImagesDeviceImage["IpcId"].isNull()) + deviceImagesObject.ipcId = std::stol(valueDeviceImagesDeviceImage["IpcId"].asString()); + if(!valueDeviceImagesDeviceImage["ImageUrl"].isNull()) + deviceImagesObject.imageUrl = valueDeviceImagesDeviceImage["ImageUrl"].asString(); + deviceImages_.push_back(deviceImagesObject); + } + if(!value["ErrorCode"].isNull()) + errorCode_ = value["ErrorCode"].asString(); + if(!value["ErrorMessage"].isNull()) + errorMessage_ = value["ErrorMessage"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["DynamicCode"].isNull()) + dynamicCode_ = value["DynamicCode"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + if(!value["DynamicMessage"].isNull()) + dynamicMessage_ = value["DynamicMessage"].asString(); + +} + +std::vector ListDevicesImagesResult::getDeviceImages()const +{ + return deviceImages_; +} + +std::string ListDevicesImagesResult::getMessage()const +{ + return message_; +} + +std::string ListDevicesImagesResult::getDynamicCode()const +{ + return dynamicCode_; +} + +std::string ListDevicesImagesResult::getErrorCode()const +{ + return errorCode_; +} + +std::string ListDevicesImagesResult::getDynamicMessage()const +{ + return dynamicMessage_; +} + +std::string ListDevicesImagesResult::getErrorMessage()const +{ + return errorMessage_; +} + +std::string ListDevicesImagesResult::getCode()const +{ + return code_; +} + +bool ListDevicesImagesResult::getSuccess()const +{ + return success_; +} +