diff --git a/CHANGELOG b/CHANGELOG index 3444d34b8..b57f8878b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2020-02-20 Version 1.36.276 +- Add new interface ListMaskDetectionResults to support to pull mask detection results. + 2020-02-15 Version 1.36.275 - Add DescribeDBClusterSSL. - Add ModifyDBClusterSSL. diff --git a/VERSION b/VERSION index 37810545b..42a6ed23d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.275 \ No newline at end of file +1.36.276 \ No newline at end of file diff --git a/reid/CMakeLists.txt b/reid/CMakeLists.txt index 33670285d..5abae9021 100644 --- a/reid/CMakeLists.txt +++ b/reid/CMakeLists.txt @@ -43,6 +43,8 @@ set(reid_public_header_model include/alibabacloud/reid/model/ListEmapResult.h include/alibabacloud/reid/model/ListLocationRequest.h include/alibabacloud/reid/model/ListLocationResult.h + include/alibabacloud/reid/model/ListMaskDetectionResultsRequest.h + include/alibabacloud/reid/model/ListMaskDetectionResultsResult.h include/alibabacloud/reid/model/ListPersonByImageRequest.h include/alibabacloud/reid/model/ListPersonByImageResult.h include/alibabacloud/reid/model/ListStoreRequest.h @@ -74,6 +76,8 @@ set(reid_src src/model/ListEmapResult.cc src/model/ListLocationRequest.cc src/model/ListLocationResult.cc + src/model/ListMaskDetectionResultsRequest.cc + src/model/ListMaskDetectionResultsResult.cc src/model/ListPersonByImageRequest.cc src/model/ListPersonByImageResult.cc src/model/ListStoreRequest.cc diff --git a/reid/include/alibabacloud/reid/ReidClient.h b/reid/include/alibabacloud/reid/ReidClient.h index 0c3b5dec3..353cb5cbf 100644 --- a/reid/include/alibabacloud/reid/ReidClient.h +++ b/reid/include/alibabacloud/reid/ReidClient.h @@ -44,6 +44,8 @@ #include "model/ListEmapResult.h" #include "model/ListLocationRequest.h" #include "model/ListLocationResult.h" +#include "model/ListMaskDetectionResultsRequest.h" +#include "model/ListMaskDetectionResultsResult.h" #include "model/ListPersonByImageRequest.h" #include "model/ListPersonByImageResult.h" #include "model/ListStoreRequest.h" @@ -92,6 +94,9 @@ namespace AlibabaCloud typedef Outcome ListLocationOutcome; typedef std::future ListLocationOutcomeCallable; typedef std::function&)> ListLocationAsyncHandler; + typedef Outcome ListMaskDetectionResultsOutcome; + typedef std::future ListMaskDetectionResultsOutcomeCallable; + typedef std::function&)> ListMaskDetectionResultsAsyncHandler; typedef Outcome ListPersonByImageOutcome; typedef std::future ListPersonByImageOutcomeCallable; typedef std::function&)> ListPersonByImageAsyncHandler; @@ -139,6 +144,9 @@ namespace AlibabaCloud ListLocationOutcome listLocation(const Model::ListLocationRequest &request)const; void listLocationAsync(const Model::ListLocationRequest& request, const ListLocationAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListLocationOutcomeCallable listLocationCallable(const Model::ListLocationRequest& request) const; + ListMaskDetectionResultsOutcome listMaskDetectionResults(const Model::ListMaskDetectionResultsRequest &request)const; + void listMaskDetectionResultsAsync(const Model::ListMaskDetectionResultsRequest& request, const ListMaskDetectionResultsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListMaskDetectionResultsOutcomeCallable listMaskDetectionResultsCallable(const Model::ListMaskDetectionResultsRequest& request) const; ListPersonByImageOutcome listPersonByImage(const Model::ListPersonByImageRequest &request)const; void listPersonByImageAsync(const Model::ListPersonByImageRequest& request, const ListPersonByImageAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListPersonByImageOutcomeCallable listPersonByImageCallable(const Model::ListPersonByImageRequest& request) const; diff --git a/reid/include/alibabacloud/reid/model/ListMaskDetectionResultsRequest.h b/reid/include/alibabacloud/reid/model/ListMaskDetectionResultsRequest.h new file mode 100644 index 000000000..f1c34825c --- /dev/null +++ b/reid/include/alibabacloud/reid/model/ListMaskDetectionResultsRequest.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_REID_MODEL_LISTMASKDETECTIONRESULTSREQUEST_H_ +#define ALIBABACLOUD_REID_MODEL_LISTMASKDETECTIONRESULTSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Reid + { + namespace Model + { + class ALIBABACLOUD_REID_EXPORT ListMaskDetectionResultsRequest : public RpcServiceRequest + { + + public: + ListMaskDetectionResultsRequest(); + ~ListMaskDetectionResultsRequest(); + + long getEndTime()const; + void setEndTime(long endTime); + long getStartTime()const; + void setStartTime(long startTime); + long getStoreId()const; + void setStoreId(long storeId); + int getPageNumber()const; + void setPageNumber(int pageNumber); + int getPageSize()const; + void setPageSize(int pageSize); + + private: + long endTime_; + long startTime_; + long storeId_; + int pageNumber_; + int pageSize_; + + }; + } + } +} +#endif // !ALIBABACLOUD_REID_MODEL_LISTMASKDETECTIONRESULTSREQUEST_H_ \ No newline at end of file diff --git a/reid/include/alibabacloud/reid/model/ListMaskDetectionResultsResult.h b/reid/include/alibabacloud/reid/model/ListMaskDetectionResultsResult.h new file mode 100644 index 000000000..a7b7b0ff5 --- /dev/null +++ b/reid/include/alibabacloud/reid/model/ListMaskDetectionResultsResult.h @@ -0,0 +1,81 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_REID_MODEL_LISTMASKDETECTIONRESULTSRESULT_H_ +#define ALIBABACLOUD_REID_MODEL_LISTMASKDETECTIONRESULTSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Reid + { + namespace Model + { + class ALIBABACLOUD_REID_EXPORT ListMaskDetectionResultsResult : public ServiceResult + { + public: + struct DetectionResult + { + std::string maskResult; + std::string score; + std::string pkId; + long locationId; + std::string imageKey; + long id; + std::string ipcId; + }; + + + ListMaskDetectionResultsResult(); + explicit ListMaskDetectionResultsResult(const std::string &payload); + ~ListMaskDetectionResultsResult(); + long getTotalCount()const; + std::string getMessage()const; + int getPageSize()const; + int getPageNumber()const; + std::vector getMaskDetectionResults()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: + long totalCount_; + std::string message_; + int pageSize_; + int pageNumber_; + std::vector maskDetectionResults_; + std::string dynamicCode_; + std::string errorCode_; + std::string dynamicMessage_; + std::string errorMessage_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_REID_MODEL_LISTMASKDETECTIONRESULTSRESULT_H_ \ No newline at end of file diff --git a/reid/src/ReidClient.cc b/reid/src/ReidClient.cc index fbc82c168..1b78bae9b 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.0.0"); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "reid"); } 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.0.0"); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "reid"); } 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.0.0"); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "reid"); } ReidClient::~ReidClient() @@ -447,6 +447,42 @@ ReidClient::ListLocationOutcomeCallable ReidClient::listLocationCallable(const L return task->get_future(); } +ReidClient::ListMaskDetectionResultsOutcome ReidClient::listMaskDetectionResults(const ListMaskDetectionResultsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListMaskDetectionResultsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListMaskDetectionResultsOutcome(ListMaskDetectionResultsResult(outcome.result())); + else + return ListMaskDetectionResultsOutcome(outcome.error()); +} + +void ReidClient::listMaskDetectionResultsAsync(const ListMaskDetectionResultsRequest& request, const ListMaskDetectionResultsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listMaskDetectionResults(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ReidClient::ListMaskDetectionResultsOutcomeCallable ReidClient::listMaskDetectionResultsCallable(const ListMaskDetectionResultsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listMaskDetectionResults(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + ReidClient::ListPersonByImageOutcome ReidClient::listPersonByImage(const ListPersonByImageRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/reid/src/model/DescribeBaseStatisticsRequest.cc b/reid/src/model/DescribeBaseStatisticsRequest.cc index 824f05f00..4fe548bd6 100644 --- a/reid/src/model/DescribeBaseStatisticsRequest.cc +++ b/reid/src/model/DescribeBaseStatisticsRequest.cc @@ -35,7 +35,7 @@ std::string DescribeBaseStatisticsRequest::getDate()const void DescribeBaseStatisticsRequest::setDate(const std::string& date) { date_ = date; - setCoreParameter("Date", date); + setBodyParameter("Date", date); } std::string DescribeBaseStatisticsRequest::getExtraStatisticTypes()const @@ -46,7 +46,7 @@ std::string DescribeBaseStatisticsRequest::getExtraStatisticTypes()const void DescribeBaseStatisticsRequest::setExtraStatisticTypes(const std::string& extraStatisticTypes) { extraStatisticTypes_ = extraStatisticTypes; - setCoreParameter("ExtraStatisticTypes", extraStatisticTypes); + setBodyParameter("ExtraStatisticTypes", extraStatisticTypes); } long DescribeBaseStatisticsRequest::getStoreId()const @@ -57,7 +57,7 @@ long DescribeBaseStatisticsRequest::getStoreId()const void DescribeBaseStatisticsRequest::setStoreId(long storeId) { storeId_ = storeId; - setCoreParameter("StoreId", std::to_string(storeId)); + setBodyParameter("StoreId", std::to_string(storeId)); } std::string DescribeBaseStatisticsRequest::getSummaryType()const @@ -68,7 +68,7 @@ std::string DescribeBaseStatisticsRequest::getSummaryType()const void DescribeBaseStatisticsRequest::setSummaryType(const std::string& summaryType) { summaryType_ = summaryType; - setCoreParameter("SummaryType", summaryType); + setBodyParameter("SummaryType", summaryType); } long DescribeBaseStatisticsRequest::getLocationId()const @@ -79,6 +79,6 @@ long DescribeBaseStatisticsRequest::getLocationId()const void DescribeBaseStatisticsRequest::setLocationId(long locationId) { locationId_ = locationId; - setCoreParameter("LocationId", std::to_string(locationId)); + setBodyParameter("LocationId", std::to_string(locationId)); } diff --git a/reid/src/model/DescribeCursorRequest.cc b/reid/src/model/DescribeCursorRequest.cc index 7ce4cfecc..6a09687c7 100644 --- a/reid/src/model/DescribeCursorRequest.cc +++ b/reid/src/model/DescribeCursorRequest.cc @@ -35,7 +35,7 @@ long DescribeCursorRequest::getStoreId()const void DescribeCursorRequest::setStoreId(long storeId) { storeId_ = storeId; - setCoreParameter("StoreId", std::to_string(storeId)); + setBodyParameter("StoreId", std::to_string(storeId)); } std::string DescribeCursorRequest::getTime()const @@ -46,6 +46,6 @@ std::string DescribeCursorRequest::getTime()const void DescribeCursorRequest::setTime(const std::string& time) { time_ = time; - setCoreParameter("Time", time); + setBodyParameter("Time", time); } diff --git a/reid/src/model/DescribeCustomerFlowByLocationRequest.cc b/reid/src/model/DescribeCustomerFlowByLocationRequest.cc index 835f1b940..286f272bb 100644 --- a/reid/src/model/DescribeCustomerFlowByLocationRequest.cc +++ b/reid/src/model/DescribeCustomerFlowByLocationRequest.cc @@ -35,7 +35,7 @@ std::string DescribeCustomerFlowByLocationRequest::getStartDate()const void DescribeCustomerFlowByLocationRequest::setStartDate(const std::string& startDate) { startDate_ = startDate; - setCoreParameter("StartDate", startDate); + setBodyParameter("StartDate", startDate); } long DescribeCustomerFlowByLocationRequest::getStoreId()const @@ -46,7 +46,7 @@ long DescribeCustomerFlowByLocationRequest::getStoreId()const void DescribeCustomerFlowByLocationRequest::setStoreId(long storeId) { storeId_ = storeId; - setCoreParameter("StoreId", std::to_string(storeId)); + setBodyParameter("StoreId", std::to_string(storeId)); } long DescribeCustomerFlowByLocationRequest::getMinCount()const @@ -57,7 +57,7 @@ long DescribeCustomerFlowByLocationRequest::getMinCount()const void DescribeCustomerFlowByLocationRequest::setMinCount(long minCount) { minCount_ = minCount; - setCoreParameter("MinCount", std::to_string(minCount)); + setBodyParameter("MinCount", std::to_string(minCount)); } long DescribeCustomerFlowByLocationRequest::getParentAmount()const @@ -68,7 +68,7 @@ long DescribeCustomerFlowByLocationRequest::getParentAmount()const void DescribeCustomerFlowByLocationRequest::setParentAmount(long parentAmount) { parentAmount_ = parentAmount; - setCoreParameter("ParentAmount", std::to_string(parentAmount)); + setBodyParameter("ParentAmount", std::to_string(parentAmount)); } long DescribeCustomerFlowByLocationRequest::getMaxCount()const @@ -79,7 +79,7 @@ long DescribeCustomerFlowByLocationRequest::getMaxCount()const void DescribeCustomerFlowByLocationRequest::setMaxCount(long maxCount) { maxCount_ = maxCount; - setCoreParameter("MaxCount", std::to_string(maxCount)); + setBodyParameter("MaxCount", std::to_string(maxCount)); } std::string DescribeCustomerFlowByLocationRequest::getEndDate()const @@ -90,7 +90,7 @@ std::string DescribeCustomerFlowByLocationRequest::getEndDate()const void DescribeCustomerFlowByLocationRequest::setEndDate(const std::string& endDate) { endDate_ = endDate; - setCoreParameter("EndDate", endDate); + setBodyParameter("EndDate", endDate); } long DescribeCustomerFlowByLocationRequest::getLocationId()const @@ -101,7 +101,7 @@ long DescribeCustomerFlowByLocationRequest::getLocationId()const void DescribeCustomerFlowByLocationRequest::setLocationId(long locationId) { locationId_ = locationId; - setCoreParameter("LocationId", std::to_string(locationId)); + setBodyParameter("LocationId", std::to_string(locationId)); } std::string DescribeCustomerFlowByLocationRequest::getParentLocationIds()const @@ -112,6 +112,6 @@ std::string DescribeCustomerFlowByLocationRequest::getParentLocationIds()const void DescribeCustomerFlowByLocationRequest::setParentLocationIds(const std::string& parentLocationIds) { parentLocationIds_ = parentLocationIds; - setCoreParameter("ParentLocationIds", parentLocationIds); + setBodyParameter("ParentLocationIds", parentLocationIds); } diff --git a/reid/src/model/DescribeDevicesRequest.cc b/reid/src/model/DescribeDevicesRequest.cc index e13e18787..d3b6de49b 100644 --- a/reid/src/model/DescribeDevicesRequest.cc +++ b/reid/src/model/DescribeDevicesRequest.cc @@ -35,6 +35,6 @@ long DescribeDevicesRequest::getStoreId()const void DescribeDevicesRequest::setStoreId(long storeId) { storeId_ = storeId; - setCoreParameter("StoreId", std::to_string(storeId)); + setBodyParameter("StoreId", std::to_string(storeId)); } diff --git a/reid/src/model/DescribeHeatMapRequest.cc b/reid/src/model/DescribeHeatMapRequest.cc index d91ec4aa1..356c78a7a 100644 --- a/reid/src/model/DescribeHeatMapRequest.cc +++ b/reid/src/model/DescribeHeatMapRequest.cc @@ -35,7 +35,7 @@ std::string DescribeHeatMapRequest::getDate()const void DescribeHeatMapRequest::setDate(const std::string& date) { date_ = date; - setCoreParameter("Date", date); + setBodyParameter("Date", date); } long DescribeHeatMapRequest::getStoreId()const @@ -46,7 +46,7 @@ long DescribeHeatMapRequest::getStoreId()const void DescribeHeatMapRequest::setStoreId(long storeId) { storeId_ = storeId; - setCoreParameter("StoreId", std::to_string(storeId)); + setBodyParameter("StoreId", std::to_string(storeId)); } long DescribeHeatMapRequest::getEmapId()const @@ -57,6 +57,6 @@ long DescribeHeatMapRequest::getEmapId()const void DescribeHeatMapRequest::setEmapId(long emapId) { emapId_ = emapId; - setCoreParameter("EmapId", std::to_string(emapId)); + setBodyParameter("EmapId", std::to_string(emapId)); } diff --git a/reid/src/model/DescribeImageUrlsRequest.cc b/reid/src/model/DescribeImageUrlsRequest.cc index 7f01c80ff..5da880267 100644 --- a/reid/src/model/DescribeImageUrlsRequest.cc +++ b/reid/src/model/DescribeImageUrlsRequest.cc @@ -35,7 +35,7 @@ std::string DescribeImageUrlsRequest::getOriginUrls()const void DescribeImageUrlsRequest::setOriginUrls(const std::string& originUrls) { originUrls_ = originUrls; - setCoreParameter("OriginUrls", originUrls); + setBodyParameter("OriginUrls", originUrls); } long DescribeImageUrlsRequest::getStoreId()const @@ -46,7 +46,7 @@ long DescribeImageUrlsRequest::getStoreId()const void DescribeImageUrlsRequest::setStoreId(long storeId) { storeId_ = storeId; - setCoreParameter("StoreId", std::to_string(storeId)); + setBodyParameter("StoreId", std::to_string(storeId)); } std::string DescribeImageUrlsRequest::getObjectKeys()const @@ -57,6 +57,6 @@ std::string DescribeImageUrlsRequest::getObjectKeys()const void DescribeImageUrlsRequest::setObjectKeys(const std::string& objectKeys) { objectKeys_ = objectKeys; - setCoreParameter("ObjectKeys", objectKeys); + setBodyParameter("ObjectKeys", objectKeys); } diff --git a/reid/src/model/DescribeOverviewDataRequest.cc b/reid/src/model/DescribeOverviewDataRequest.cc index 81cb4ccb9..20ca6257e 100644 --- a/reid/src/model/DescribeOverviewDataRequest.cc +++ b/reid/src/model/DescribeOverviewDataRequest.cc @@ -35,7 +35,7 @@ std::string DescribeOverviewDataRequest::getDate()const void DescribeOverviewDataRequest::setDate(const std::string& date) { date_ = date; - setCoreParameter("Date", date); + setBodyParameter("Date", date); } std::string DescribeOverviewDataRequest::getStoreIds()const @@ -46,6 +46,6 @@ std::string DescribeOverviewDataRequest::getStoreIds()const void DescribeOverviewDataRequest::setStoreIds(const std::string& storeIds) { storeIds_ = storeIds; - setCoreParameter("StoreIds", storeIds); + setBodyParameter("StoreIds", storeIds); } diff --git a/reid/src/model/ImportSpecialPersonnelRequest.cc b/reid/src/model/ImportSpecialPersonnelRequest.cc index 51036209e..fd1e44c32 100644 --- a/reid/src/model/ImportSpecialPersonnelRequest.cc +++ b/reid/src/model/ImportSpecialPersonnelRequest.cc @@ -35,7 +35,7 @@ long ImportSpecialPersonnelRequest::getUkId()const void ImportSpecialPersonnelRequest::setUkId(long ukId) { ukId_ = ukId; - setCoreParameter("UkId", std::to_string(ukId)); + setBodyParameter("UkId", std::to_string(ukId)); } std::string ImportSpecialPersonnelRequest::getDescription()const @@ -46,7 +46,7 @@ std::string ImportSpecialPersonnelRequest::getDescription()const void ImportSpecialPersonnelRequest::setDescription(const std::string& description) { description_ = description; - setCoreParameter("Description", description); + setBodyParameter("Description", description); } std::string ImportSpecialPersonnelRequest::getExternalId()const @@ -57,7 +57,7 @@ std::string ImportSpecialPersonnelRequest::getExternalId()const void ImportSpecialPersonnelRequest::setExternalId(const std::string& externalId) { externalId_ = externalId; - setCoreParameter("ExternalId", externalId); + setBodyParameter("ExternalId", externalId); } std::string ImportSpecialPersonnelRequest::getPersonType()const @@ -68,7 +68,7 @@ std::string ImportSpecialPersonnelRequest::getPersonType()const void ImportSpecialPersonnelRequest::setPersonType(const std::string& personType) { personType_ = personType; - setCoreParameter("PersonType", personType); + setBodyParameter("PersonType", personType); } std::string ImportSpecialPersonnelRequest::getUrls()const @@ -79,7 +79,7 @@ std::string ImportSpecialPersonnelRequest::getUrls()const void ImportSpecialPersonnelRequest::setUrls(const std::string& urls) { urls_ = urls; - setCoreParameter("Urls", urls); + setBodyParameter("Urls", urls); } std::string ImportSpecialPersonnelRequest::getPersonName()const @@ -90,7 +90,7 @@ std::string ImportSpecialPersonnelRequest::getPersonName()const void ImportSpecialPersonnelRequest::setPersonName(const std::string& personName) { personName_ = personName; - setCoreParameter("PersonName", personName); + setBodyParameter("PersonName", personName); } std::string ImportSpecialPersonnelRequest::getStoreIds()const @@ -101,7 +101,7 @@ std::string ImportSpecialPersonnelRequest::getStoreIds()const void ImportSpecialPersonnelRequest::setStoreIds(const std::string& storeIds) { storeIds_ = storeIds; - setCoreParameter("StoreIds", storeIds); + setBodyParameter("StoreIds", storeIds); } std::string ImportSpecialPersonnelRequest::getStatus()const @@ -112,6 +112,6 @@ std::string ImportSpecialPersonnelRequest::getStatus()const void ImportSpecialPersonnelRequest::setStatus(const std::string& status) { status_ = status; - setCoreParameter("Status", status); + setBodyParameter("Status", status); } diff --git a/reid/src/model/ListActionDataRequest.cc b/reid/src/model/ListActionDataRequest.cc index 45ac7fe33..93a78341e 100644 --- a/reid/src/model/ListActionDataRequest.cc +++ b/reid/src/model/ListActionDataRequest.cc @@ -35,7 +35,7 @@ long ListActionDataRequest::getEndTime()const void ListActionDataRequest::setEndTime(long endTime) { endTime_ = endTime; - setCoreParameter("EndTime", std::to_string(endTime)); + setBodyParameter("EndTime", std::to_string(endTime)); } long ListActionDataRequest::getStartTime()const @@ -46,7 +46,7 @@ long ListActionDataRequest::getStartTime()const void ListActionDataRequest::setStartTime(long startTime) { startTime_ = startTime; - setCoreParameter("StartTime", std::to_string(startTime)); + setBodyParameter("StartTime", std::to_string(startTime)); } long ListActionDataRequest::getStoreId()const @@ -57,7 +57,7 @@ long ListActionDataRequest::getStoreId()const void ListActionDataRequest::setStoreId(long storeId) { storeId_ = storeId; - setCoreParameter("StoreId", std::to_string(storeId)); + setBodyParameter("StoreId", std::to_string(storeId)); } int ListActionDataRequest::getPageNumber()const @@ -68,7 +68,7 @@ int ListActionDataRequest::getPageNumber()const void ListActionDataRequest::setPageNumber(int pageNumber) { pageNumber_ = pageNumber; - setCoreParameter("PageNumber", std::to_string(pageNumber)); + setBodyParameter("PageNumber", std::to_string(pageNumber)); } int ListActionDataRequest::getPageSize()const @@ -79,7 +79,7 @@ int ListActionDataRequest::getPageSize()const void ListActionDataRequest::setPageSize(int pageSize) { pageSize_ = pageSize; - setCoreParameter("PageSize", std::to_string(pageSize)); + setBodyParameter("PageSize", std::to_string(pageSize)); } bool ListActionDataRequest::getFilterInvalidData()const @@ -90,6 +90,6 @@ bool ListActionDataRequest::getFilterInvalidData()const void ListActionDataRequest::setFilterInvalidData(bool filterInvalidData) { filterInvalidData_ = filterInvalidData; - setCoreParameter("FilterInvalidData", filterInvalidData ? "true" : "false"); + setBodyParameter("FilterInvalidData", filterInvalidData ? "true" : "false"); } diff --git a/reid/src/model/ListEmapRequest.cc b/reid/src/model/ListEmapRequest.cc index 4edae4fbc..bb898c38d 100644 --- a/reid/src/model/ListEmapRequest.cc +++ b/reid/src/model/ListEmapRequest.cc @@ -35,6 +35,6 @@ long ListEmapRequest::getStoreId()const void ListEmapRequest::setStoreId(long storeId) { storeId_ = storeId; - setCoreParameter("StoreId", std::to_string(storeId)); + setBodyParameter("StoreId", std::to_string(storeId)); } diff --git a/reid/src/model/ListLocationRequest.cc b/reid/src/model/ListLocationRequest.cc index 329717983..ac3e7ee0b 100644 --- a/reid/src/model/ListLocationRequest.cc +++ b/reid/src/model/ListLocationRequest.cc @@ -35,6 +35,6 @@ long ListLocationRequest::getStoreId()const void ListLocationRequest::setStoreId(long storeId) { storeId_ = storeId; - setCoreParameter("StoreId", std::to_string(storeId)); + setBodyParameter("StoreId", std::to_string(storeId)); } diff --git a/reid/src/model/ListMaskDetectionResultsRequest.cc b/reid/src/model/ListMaskDetectionResultsRequest.cc new file mode 100644 index 000000000..68f672bd6 --- /dev/null +++ b/reid/src/model/ListMaskDetectionResultsRequest.cc @@ -0,0 +1,84 @@ +/* + * 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::ListMaskDetectionResultsRequest; + +ListMaskDetectionResultsRequest::ListMaskDetectionResultsRequest() : + RpcServiceRequest("reid", "2019-09-28", "ListMaskDetectionResults") +{ + setMethod(HttpRequest::Method::Post); +} + +ListMaskDetectionResultsRequest::~ListMaskDetectionResultsRequest() +{} + +long ListMaskDetectionResultsRequest::getEndTime()const +{ + return endTime_; +} + +void ListMaskDetectionResultsRequest::setEndTime(long endTime) +{ + endTime_ = endTime; + setBodyParameter("EndTime", std::to_string(endTime)); +} + +long ListMaskDetectionResultsRequest::getStartTime()const +{ + return startTime_; +} + +void ListMaskDetectionResultsRequest::setStartTime(long startTime) +{ + startTime_ = startTime; + setBodyParameter("StartTime", std::to_string(startTime)); +} + +long ListMaskDetectionResultsRequest::getStoreId()const +{ + return storeId_; +} + +void ListMaskDetectionResultsRequest::setStoreId(long storeId) +{ + storeId_ = storeId; + setBodyParameter("StoreId", std::to_string(storeId)); +} + +int ListMaskDetectionResultsRequest::getPageNumber()const +{ + return pageNumber_; +} + +void ListMaskDetectionResultsRequest::setPageNumber(int pageNumber) +{ + pageNumber_ = pageNumber; + setBodyParameter("PageNumber", std::to_string(pageNumber)); +} + +int ListMaskDetectionResultsRequest::getPageSize()const +{ + return pageSize_; +} + +void ListMaskDetectionResultsRequest::setPageSize(int pageSize) +{ + pageSize_ = pageSize; + setBodyParameter("PageSize", std::to_string(pageSize)); +} + diff --git a/reid/src/model/ListMaskDetectionResultsResult.cc b/reid/src/model/ListMaskDetectionResultsResult.cc new file mode 100644 index 000000000..6c2630841 --- /dev/null +++ b/reid/src/model/ListMaskDetectionResultsResult.cc @@ -0,0 +1,139 @@ +/* + * 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; + +ListMaskDetectionResultsResult::ListMaskDetectionResultsResult() : + ServiceResult() +{} + +ListMaskDetectionResultsResult::ListMaskDetectionResultsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListMaskDetectionResultsResult::~ListMaskDetectionResultsResult() +{} + +void ListMaskDetectionResultsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allMaskDetectionResultsNode = value["MaskDetectionResults"]["DetectionResult"]; + for (auto valueMaskDetectionResultsDetectionResult : allMaskDetectionResultsNode) + { + DetectionResult maskDetectionResultsObject; + if(!valueMaskDetectionResultsDetectionResult["PkId"].isNull()) + maskDetectionResultsObject.pkId = valueMaskDetectionResultsDetectionResult["PkId"].asString(); + if(!valueMaskDetectionResultsDetectionResult["Score"].isNull()) + maskDetectionResultsObject.score = valueMaskDetectionResultsDetectionResult["Score"].asString(); + if(!valueMaskDetectionResultsDetectionResult["LocationId"].isNull()) + maskDetectionResultsObject.locationId = std::stol(valueMaskDetectionResultsDetectionResult["LocationId"].asString()); + if(!valueMaskDetectionResultsDetectionResult["ImageKey"].isNull()) + maskDetectionResultsObject.imageKey = valueMaskDetectionResultsDetectionResult["ImageKey"].asString(); + if(!valueMaskDetectionResultsDetectionResult["Id"].isNull()) + maskDetectionResultsObject.id = std::stol(valueMaskDetectionResultsDetectionResult["Id"].asString()); + if(!valueMaskDetectionResultsDetectionResult["IpcId"].isNull()) + maskDetectionResultsObject.ipcId = valueMaskDetectionResultsDetectionResult["IpcId"].asString(); + if(!valueMaskDetectionResultsDetectionResult["MaskResult"].isNull()) + maskDetectionResultsObject.maskResult = valueMaskDetectionResultsDetectionResult["MaskResult"].asString(); + maskDetectionResults_.push_back(maskDetectionResultsObject); + } + if(!value["ErrorCode"].isNull()) + errorCode_ = value["ErrorCode"].asString(); + if(!value["ErrorMessage"].isNull()) + errorMessage_ = value["ErrorMessage"].asString(); + if(!value["PageNumber"].isNull()) + pageNumber_ = std::stoi(value["PageNumber"].asString()); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["TotalCount"].isNull()) + totalCount_ = std::stol(value["TotalCount"].asString()); + if(!value["DynamicCode"].isNull()) + dynamicCode_ = value["DynamicCode"].asString(); + if(!value["PageSize"].isNull()) + pageSize_ = std::stoi(value["PageSize"].asString()); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + if(!value["DynamicMessage"].isNull()) + dynamicMessage_ = value["DynamicMessage"].asString(); + +} + +long ListMaskDetectionResultsResult::getTotalCount()const +{ + return totalCount_; +} + +std::string ListMaskDetectionResultsResult::getMessage()const +{ + return message_; +} + +int ListMaskDetectionResultsResult::getPageSize()const +{ + return pageSize_; +} + +int ListMaskDetectionResultsResult::getPageNumber()const +{ + return pageNumber_; +} + +std::vector ListMaskDetectionResultsResult::getMaskDetectionResults()const +{ + return maskDetectionResults_; +} + +std::string ListMaskDetectionResultsResult::getDynamicCode()const +{ + return dynamicCode_; +} + +std::string ListMaskDetectionResultsResult::getErrorCode()const +{ + return errorCode_; +} + +std::string ListMaskDetectionResultsResult::getDynamicMessage()const +{ + return dynamicMessage_; +} + +std::string ListMaskDetectionResultsResult::getErrorMessage()const +{ + return errorMessage_; +} + +std::string ListMaskDetectionResultsResult::getCode()const +{ + return code_; +} + +bool ListMaskDetectionResultsResult::getSuccess()const +{ + return success_; +} + diff --git a/reid/src/model/ListPersonByImageRequest.cc b/reid/src/model/ListPersonByImageRequest.cc index a163c70a6..20cfbc9c1 100644 --- a/reid/src/model/ListPersonByImageRequest.cc +++ b/reid/src/model/ListPersonByImageRequest.cc @@ -35,7 +35,7 @@ long ListPersonByImageRequest::getStoreId()const void ListPersonByImageRequest::setStoreId(long storeId) { storeId_ = storeId; - setCoreParameter("StoreId", std::to_string(storeId)); + setBodyParameter("StoreId", std::to_string(storeId)); } std::string ListPersonByImageRequest::getImageUrl()const @@ -46,6 +46,6 @@ std::string ListPersonByImageRequest::getImageUrl()const void ListPersonByImageRequest::setImageUrl(const std::string& imageUrl) { imageUrl_ = imageUrl; - setCoreParameter("ImageUrl", imageUrl); + setBodyParameter("ImageUrl", imageUrl); } diff --git a/reid/src/model/PullActionDataRequest.cc b/reid/src/model/PullActionDataRequest.cc index 84aabc5eb..0f73bb6f4 100644 --- a/reid/src/model/PullActionDataRequest.cc +++ b/reid/src/model/PullActionDataRequest.cc @@ -35,7 +35,7 @@ long PullActionDataRequest::getStoreId()const void PullActionDataRequest::setStoreId(long storeId) { storeId_ = storeId; - setCoreParameter("StoreId", std::to_string(storeId)); + setBodyParameter("StoreId", std::to_string(storeId)); } long PullActionDataRequest::getEndMessageId()const @@ -46,7 +46,7 @@ long PullActionDataRequest::getEndMessageId()const void PullActionDataRequest::setEndMessageId(long endMessageId) { endMessageId_ = endMessageId; - setCoreParameter("EndMessageId", std::to_string(endMessageId)); + setBodyParameter("EndMessageId", std::to_string(endMessageId)); } int PullActionDataRequest::getLimit()const @@ -57,7 +57,7 @@ int PullActionDataRequest::getLimit()const void PullActionDataRequest::setLimit(int limit) { limit_ = limit; - setCoreParameter("Limit", std::to_string(limit)); + setBodyParameter("Limit", std::to_string(limit)); } long PullActionDataRequest::getStartMessageId()const @@ -68,6 +68,6 @@ long PullActionDataRequest::getStartMessageId()const void PullActionDataRequest::setStartMessageId(long startMessageId) { startMessageId_ = startMessageId; - setCoreParameter("StartMessageId", std::to_string(startMessageId)); + setBodyParameter("StartMessageId", std::to_string(startMessageId)); }