Add new interface ListMaskDetectionResults to support to pull mask detection results.

This commit is contained in:
sdk-team
2020-02-20 18:03:02 +08:00
parent b2ee54bbfa
commit 9263bd3fcd
22 changed files with 465 additions and 50 deletions

View File

@@ -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.

View File

@@ -1 +1 @@
1.36.275
1.36.276

View File

@@ -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

View File

@@ -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<Error, Model::ListLocationResult> ListLocationOutcome;
typedef std::future<ListLocationOutcome> ListLocationOutcomeCallable;
typedef std::function<void(const ReidClient*, const Model::ListLocationRequest&, const ListLocationOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListLocationAsyncHandler;
typedef Outcome<Error, Model::ListMaskDetectionResultsResult> ListMaskDetectionResultsOutcome;
typedef std::future<ListMaskDetectionResultsOutcome> ListMaskDetectionResultsOutcomeCallable;
typedef std::function<void(const ReidClient*, const Model::ListMaskDetectionResultsRequest&, const ListMaskDetectionResultsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListMaskDetectionResultsAsyncHandler;
typedef Outcome<Error, Model::ListPersonByImageResult> ListPersonByImageOutcome;
typedef std::future<ListPersonByImageOutcome> ListPersonByImageOutcomeCallable;
typedef std::function<void(const ReidClient*, const Model::ListPersonByImageRequest&, const ListPersonByImageOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& context = nullptr) const;
ListPersonByImageOutcomeCallable listPersonByImageCallable(const Model::ListPersonByImageRequest& request) const;

View File

@@ -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 <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/reid/ReidExport.h>
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_

View File

@@ -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 <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/reid/ReidExport.h>
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<DetectionResult> 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<DetectionResult> maskDetectionResults_;
std::string dynamicCode_;
std::string errorCode_;
std::string dynamicMessage_;
std::string errorMessage_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_REID_MODEL_LISTMASKDETECTIONRESULTSRESULT_H_

View File

@@ -31,21 +31,21 @@ ReidClient::ReidClient(const Credentials &credentials, const ClientConfiguration
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "1.0.0");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "reid");
}
ReidClient::ReidClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "1.0.0");
endpointProvider_ = std::make_shared<EndpointProvider>(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<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
{
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "1.0.0");
endpointProvider_ = std::make_shared<EndpointProvider>(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<const AsyncCallerContext>& 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<std::packaged_task<ListMaskDetectionResultsOutcome()>>(
[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();

View File

@@ -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));
}

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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));
}

View File

@@ -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));
}

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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");
}

View File

@@ -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));
}

View File

@@ -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));
}

View File

@@ -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 <alibabacloud/reid/model/ListMaskDetectionResultsRequest.h>
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));
}

View File

@@ -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 <alibabacloud/reid/model/ListMaskDetectionResultsResult.h>
#include <json/json.h>
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::DetectionResult> 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_;
}

View File

@@ -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);
}

View File

@@ -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));
}