Add ListFace-MotorAlgorithmResults API.

This commit is contained in:
sdk-team
2020-07-01 22:37:33 +08:00
parent a57f6ec422
commit 3ee66cb2b2
13 changed files with 824 additions and 1 deletions

View File

@@ -49,8 +49,12 @@ set(vcs_public_header_model
include/alibabacloud/vcs/model/ListCorpsResult.h
include/alibabacloud/vcs/model/ListDevicesRequest.h
include/alibabacloud/vcs/model/ListDevicesResult.h
include/alibabacloud/vcs/model/ListFaceAlgorithmResultsRequest.h
include/alibabacloud/vcs/model/ListFaceAlgorithmResultsResult.h
include/alibabacloud/vcs/model/ListMetricsRequest.h
include/alibabacloud/vcs/model/ListMetricsResult.h
include/alibabacloud/vcs/model/ListMotorAlgorithmResultsRequest.h
include/alibabacloud/vcs/model/ListMotorAlgorithmResultsResult.h
include/alibabacloud/vcs/model/ListPersonsRequest.h
include/alibabacloud/vcs/model/ListPersonsResult.h
include/alibabacloud/vcs/model/RecognizeFaceQualityRequest.h
@@ -100,8 +104,12 @@ set(vcs_src
src/model/ListCorpsResult.cc
src/model/ListDevicesRequest.cc
src/model/ListDevicesResult.cc
src/model/ListFaceAlgorithmResultsRequest.cc
src/model/ListFaceAlgorithmResultsResult.cc
src/model/ListMetricsRequest.cc
src/model/ListMetricsResult.cc
src/model/ListMotorAlgorithmResultsRequest.cc
src/model/ListMotorAlgorithmResultsResult.cc
src/model/ListPersonsRequest.cc
src/model/ListPersonsResult.cc
src/model/RecognizeFaceQualityRequest.cc

View File

@@ -50,8 +50,12 @@
#include "model/ListCorpsResult.h"
#include "model/ListDevicesRequest.h"
#include "model/ListDevicesResult.h"
#include "model/ListFaceAlgorithmResultsRequest.h"
#include "model/ListFaceAlgorithmResultsResult.h"
#include "model/ListMetricsRequest.h"
#include "model/ListMetricsResult.h"
#include "model/ListMotorAlgorithmResultsRequest.h"
#include "model/ListMotorAlgorithmResultsResult.h"
#include "model/ListPersonsRequest.h"
#include "model/ListPersonsResult.h"
#include "model/RecognizeFaceQualityRequest.h"
@@ -121,9 +125,15 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::ListDevicesResult> ListDevicesOutcome;
typedef std::future<ListDevicesOutcome> ListDevicesOutcomeCallable;
typedef std::function<void(const VcsClient*, const Model::ListDevicesRequest&, const ListDevicesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListDevicesAsyncHandler;
typedef Outcome<Error, Model::ListFaceAlgorithmResultsResult> ListFaceAlgorithmResultsOutcome;
typedef std::future<ListFaceAlgorithmResultsOutcome> ListFaceAlgorithmResultsOutcomeCallable;
typedef std::function<void(const VcsClient*, const Model::ListFaceAlgorithmResultsRequest&, const ListFaceAlgorithmResultsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListFaceAlgorithmResultsAsyncHandler;
typedef Outcome<Error, Model::ListMetricsResult> ListMetricsOutcome;
typedef std::future<ListMetricsOutcome> ListMetricsOutcomeCallable;
typedef std::function<void(const VcsClient*, const Model::ListMetricsRequest&, const ListMetricsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListMetricsAsyncHandler;
typedef Outcome<Error, Model::ListMotorAlgorithmResultsResult> ListMotorAlgorithmResultsOutcome;
typedef std::future<ListMotorAlgorithmResultsOutcome> ListMotorAlgorithmResultsOutcomeCallable;
typedef std::function<void(const VcsClient*, const Model::ListMotorAlgorithmResultsRequest&, const ListMotorAlgorithmResultsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListMotorAlgorithmResultsAsyncHandler;
typedef Outcome<Error, Model::ListPersonsResult> ListPersonsOutcome;
typedef std::future<ListPersonsOutcome> ListPersonsOutcomeCallable;
typedef std::function<void(const VcsClient*, const Model::ListPersonsRequest&, const ListPersonsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListPersonsAsyncHandler;
@@ -198,9 +208,15 @@ namespace AlibabaCloud
ListDevicesOutcome listDevices(const Model::ListDevicesRequest &request)const;
void listDevicesAsync(const Model::ListDevicesRequest& request, const ListDevicesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListDevicesOutcomeCallable listDevicesCallable(const Model::ListDevicesRequest& request) const;
ListFaceAlgorithmResultsOutcome listFaceAlgorithmResults(const Model::ListFaceAlgorithmResultsRequest &request)const;
void listFaceAlgorithmResultsAsync(const Model::ListFaceAlgorithmResultsRequest& request, const ListFaceAlgorithmResultsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListFaceAlgorithmResultsOutcomeCallable listFaceAlgorithmResultsCallable(const Model::ListFaceAlgorithmResultsRequest& request) const;
ListMetricsOutcome listMetrics(const Model::ListMetricsRequest &request)const;
void listMetricsAsync(const Model::ListMetricsRequest& request, const ListMetricsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListMetricsOutcomeCallable listMetricsCallable(const Model::ListMetricsRequest& request) const;
ListMotorAlgorithmResultsOutcome listMotorAlgorithmResults(const Model::ListMotorAlgorithmResultsRequest &request)const;
void listMotorAlgorithmResultsAsync(const Model::ListMotorAlgorithmResultsRequest& request, const ListMotorAlgorithmResultsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListMotorAlgorithmResultsOutcomeCallable listMotorAlgorithmResultsCallable(const Model::ListMotorAlgorithmResultsRequest& request) const;
ListPersonsOutcome listPersons(const Model::ListPersonsRequest &request)const;
void listPersonsAsync(const Model::ListPersonsRequest& request, const ListPersonsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListPersonsOutcomeCallable listPersonsCallable(const Model::ListPersonsRequest& request) const;

View File

@@ -0,0 +1,66 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_VCS_MODEL_LISTFACEALGORITHMRESULTSREQUEST_H_
#define ALIBABACLOUD_VCS_MODEL_LISTFACEALGORITHMRESULTSREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/vcs/VcsExport.h>
namespace AlibabaCloud
{
namespace Vcs
{
namespace Model
{
class ALIBABACLOUD_VCS_EXPORT ListFaceAlgorithmResultsRequest : public RpcServiceRequest
{
public:
ListFaceAlgorithmResultsRequest();
~ListFaceAlgorithmResultsRequest();
std::string getAlgorithmType()const;
void setAlgorithmType(const std::string& algorithmType);
std::string getCorpId()const;
void setCorpId(const std::string& corpId);
std::string getEndTime()const;
void setEndTime(const std::string& endTime);
std::string getStartTime()const;
void setStartTime(const std::string& startTime);
std::string getPageNumber()const;
void setPageNumber(const std::string& pageNumber);
std::string getDataSourceId()const;
void setDataSourceId(const std::string& dataSourceId);
std::string getPageSize()const;
void setPageSize(const std::string& pageSize);
private:
std::string algorithmType_;
std::string corpId_;
std::string endTime_;
std::string startTime_;
std::string pageNumber_;
std::string dataSourceId_;
std::string pageSize_;
};
}
}
}
#endif // !ALIBABACLOUD_VCS_MODEL_LISTFACEALGORITHMRESULTSREQUEST_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_VCS_MODEL_LISTFACEALGORITHMRESULTSRESULT_H_
#define ALIBABACLOUD_VCS_MODEL_LISTFACEALGORITHMRESULTSRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/vcs/VcsExport.h>
namespace AlibabaCloud
{
namespace Vcs
{
namespace Model
{
class ALIBABACLOUD_VCS_EXPORT ListFaceAlgorithmResultsResult : public ServiceResult
{
public:
struct Data
{
struct RecordsItem
{
std::string faceId;
std::string genderCode;
std::string picUrlPath;
std::string corpId;
float rightBottomX;
float rightBottomY;
std::string targetPicUrlPath;
std::string maxAge;
float leftTopY;
std::string capStyle;
float leftTopX;
std::string minAge;
std::string shotTime;
std::string dataSourceId;
std::string hairStyle;
};
int totalCount;
int pageSize;
int totalPage;
int pageNumber;
std::vector<RecordsItem> records;
};
ListFaceAlgorithmResultsResult();
explicit ListFaceAlgorithmResultsResult(const std::string &payload);
~ListFaceAlgorithmResultsResult();
std::string getMessage()const;
Data getData()const;
std::string getCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
Data data_;
std::string code_;
};
}
}
}
#endif // !ALIBABACLOUD_VCS_MODEL_LISTFACEALGORITHMRESULTSRESULT_H_

View File

@@ -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_VCS_MODEL_LISTMOTORALGORITHMRESULTSREQUEST_H_
#define ALIBABACLOUD_VCS_MODEL_LISTMOTORALGORITHMRESULTSREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/vcs/VcsExport.h>
namespace AlibabaCloud
{
namespace Vcs
{
namespace Model
{
class ALIBABACLOUD_VCS_EXPORT ListMotorAlgorithmResultsRequest : public RpcServiceRequest
{
public:
ListMotorAlgorithmResultsRequest();
~ListMotorAlgorithmResultsRequest();
std::string getAlgorithmType()const;
void setAlgorithmType(const std::string& algorithmType);
std::string getCorpId()const;
void setCorpId(const std::string& corpId);
std::string getEndTime()const;
void setEndTime(const std::string& endTime);
std::string getStartTime()const;
void setStartTime(const std::string& startTime);
std::string getPageNumber()const;
void setPageNumber(const std::string& pageNumber);
std::string getPlateNumber()const;
void setPlateNumber(const std::string& plateNumber);
std::string getDataSourceId()const;
void setDataSourceId(const std::string& dataSourceId);
std::string getPageSize()const;
void setPageSize(const std::string& pageSize);
private:
std::string algorithmType_;
std::string corpId_;
std::string endTime_;
std::string startTime_;
std::string pageNumber_;
std::string plateNumber_;
std::string dataSourceId_;
std::string pageSize_;
};
}
}
}
#endif // !ALIBABACLOUD_VCS_MODEL_LISTMOTORALGORITHMRESULTSREQUEST_H_

View File

@@ -0,0 +1,77 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_VCS_MODEL_LISTMOTORALGORITHMRESULTSRESULT_H_
#define ALIBABACLOUD_VCS_MODEL_LISTMOTORALGORITHMRESULTSRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/vcs/VcsExport.h>
namespace AlibabaCloud
{
namespace Vcs
{
namespace Model
{
class ALIBABACLOUD_VCS_EXPORT ListMotorAlgorithmResultsResult : public ServiceResult
{
public:
struct Data
{
struct RecordsItem
{
std::string motorId;
std::string picUrlPath;
std::string plateNumber;
std::string corpId;
float rightBottomX;
float rightBottomY;
std::string targetPicUrlPath;
std::string shotTime;
float leftTopY;
float leftTopX;
std::string dataSourceId;
};
int totalCount;
int pageSize;
int totalPage;
int pageNumber;
std::vector<RecordsItem> records;
};
ListMotorAlgorithmResultsResult();
explicit ListMotorAlgorithmResultsResult(const std::string &payload);
~ListMotorAlgorithmResultsResult();
std::string getMessage()const;
Data getData()const;
std::string getCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
Data data_;
std::string code_;
};
}
}
}
#endif // !ALIBABACLOUD_VCS_MODEL_LISTMOTORALGORITHMRESULTSRESULT_H_

View File

@@ -555,6 +555,42 @@ VcsClient::ListDevicesOutcomeCallable VcsClient::listDevicesCallable(const ListD
return task->get_future();
}
VcsClient::ListFaceAlgorithmResultsOutcome VcsClient::listFaceAlgorithmResults(const ListFaceAlgorithmResultsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListFaceAlgorithmResultsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListFaceAlgorithmResultsOutcome(ListFaceAlgorithmResultsResult(outcome.result()));
else
return ListFaceAlgorithmResultsOutcome(outcome.error());
}
void VcsClient::listFaceAlgorithmResultsAsync(const ListFaceAlgorithmResultsRequest& request, const ListFaceAlgorithmResultsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listFaceAlgorithmResults(request), context);
};
asyncExecute(new Runnable(fn));
}
VcsClient::ListFaceAlgorithmResultsOutcomeCallable VcsClient::listFaceAlgorithmResultsCallable(const ListFaceAlgorithmResultsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListFaceAlgorithmResultsOutcome()>>(
[this, request]()
{
return this->listFaceAlgorithmResults(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
VcsClient::ListMetricsOutcome VcsClient::listMetrics(const ListMetricsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -591,6 +627,42 @@ VcsClient::ListMetricsOutcomeCallable VcsClient::listMetricsCallable(const ListM
return task->get_future();
}
VcsClient::ListMotorAlgorithmResultsOutcome VcsClient::listMotorAlgorithmResults(const ListMotorAlgorithmResultsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListMotorAlgorithmResultsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListMotorAlgorithmResultsOutcome(ListMotorAlgorithmResultsResult(outcome.result()));
else
return ListMotorAlgorithmResultsOutcome(outcome.error());
}
void VcsClient::listMotorAlgorithmResultsAsync(const ListMotorAlgorithmResultsRequest& request, const ListMotorAlgorithmResultsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listMotorAlgorithmResults(request), context);
};
asyncExecute(new Runnable(fn));
}
VcsClient::ListMotorAlgorithmResultsOutcomeCallable VcsClient::listMotorAlgorithmResultsCallable(const ListMotorAlgorithmResultsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListMotorAlgorithmResultsOutcome()>>(
[this, request]()
{
return this->listMotorAlgorithmResults(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
VcsClient::ListPersonsOutcome VcsClient::listPersons(const ListPersonsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,106 @@
/*
* 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/vcs/model/ListFaceAlgorithmResultsRequest.h>
using AlibabaCloud::Vcs::Model::ListFaceAlgorithmResultsRequest;
ListFaceAlgorithmResultsRequest::ListFaceAlgorithmResultsRequest() :
RpcServiceRequest("vcs", "2020-05-15", "ListFaceAlgorithmResults")
{
setMethod(HttpRequest::Method::Post);
}
ListFaceAlgorithmResultsRequest::~ListFaceAlgorithmResultsRequest()
{}
std::string ListFaceAlgorithmResultsRequest::getAlgorithmType()const
{
return algorithmType_;
}
void ListFaceAlgorithmResultsRequest::setAlgorithmType(const std::string& algorithmType)
{
algorithmType_ = algorithmType;
setBodyParameter("AlgorithmType", algorithmType);
}
std::string ListFaceAlgorithmResultsRequest::getCorpId()const
{
return corpId_;
}
void ListFaceAlgorithmResultsRequest::setCorpId(const std::string& corpId)
{
corpId_ = corpId;
setBodyParameter("CorpId", corpId);
}
std::string ListFaceAlgorithmResultsRequest::getEndTime()const
{
return endTime_;
}
void ListFaceAlgorithmResultsRequest::setEndTime(const std::string& endTime)
{
endTime_ = endTime;
setBodyParameter("EndTime", endTime);
}
std::string ListFaceAlgorithmResultsRequest::getStartTime()const
{
return startTime_;
}
void ListFaceAlgorithmResultsRequest::setStartTime(const std::string& startTime)
{
startTime_ = startTime;
setBodyParameter("StartTime", startTime);
}
std::string ListFaceAlgorithmResultsRequest::getPageNumber()const
{
return pageNumber_;
}
void ListFaceAlgorithmResultsRequest::setPageNumber(const std::string& pageNumber)
{
pageNumber_ = pageNumber;
setBodyParameter("PageNumber", pageNumber);
}
std::string ListFaceAlgorithmResultsRequest::getDataSourceId()const
{
return dataSourceId_;
}
void ListFaceAlgorithmResultsRequest::setDataSourceId(const std::string& dataSourceId)
{
dataSourceId_ = dataSourceId;
setBodyParameter("DataSourceId", dataSourceId);
}
std::string ListFaceAlgorithmResultsRequest::getPageSize()const
{
return pageSize_;
}
void ListFaceAlgorithmResultsRequest::setPageSize(const std::string& pageSize)
{
pageSize_ = pageSize;
setBodyParameter("PageSize", pageSize);
}

View File

@@ -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 <alibabacloud/vcs/model/ListFaceAlgorithmResultsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Vcs;
using namespace AlibabaCloud::Vcs::Model;
ListFaceAlgorithmResultsResult::ListFaceAlgorithmResultsResult() :
ServiceResult()
{}
ListFaceAlgorithmResultsResult::ListFaceAlgorithmResultsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListFaceAlgorithmResultsResult::~ListFaceAlgorithmResultsResult()
{}
void ListFaceAlgorithmResultsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["PageNumber"].isNull())
data_.pageNumber = std::stoi(dataNode["PageNumber"].asString());
if(!dataNode["PageSize"].isNull())
data_.pageSize = std::stoi(dataNode["PageSize"].asString());
if(!dataNode["TotalCount"].isNull())
data_.totalCount = std::stoi(dataNode["TotalCount"].asString());
if(!dataNode["TotalPage"].isNull())
data_.totalPage = std::stoi(dataNode["TotalPage"].asString());
auto allRecordsNode = dataNode["Records"]["RecordsItem"];
for (auto dataNodeRecordsRecordsItem : allRecordsNode)
{
Data::RecordsItem recordsItemObject;
if(!dataNodeRecordsRecordsItem["FaceId"].isNull())
recordsItemObject.faceId = dataNodeRecordsRecordsItem["FaceId"].asString();
if(!dataNodeRecordsRecordsItem["CorpId"].isNull())
recordsItemObject.corpId = dataNodeRecordsRecordsItem["CorpId"].asString();
if(!dataNodeRecordsRecordsItem["DataSourceId"].isNull())
recordsItemObject.dataSourceId = dataNodeRecordsRecordsItem["DataSourceId"].asString();
if(!dataNodeRecordsRecordsItem["ShotTime"].isNull())
recordsItemObject.shotTime = dataNodeRecordsRecordsItem["ShotTime"].asString();
if(!dataNodeRecordsRecordsItem["GenderCode"].isNull())
recordsItemObject.genderCode = dataNodeRecordsRecordsItem["GenderCode"].asString();
if(!dataNodeRecordsRecordsItem["MinAge"].isNull())
recordsItemObject.minAge = dataNodeRecordsRecordsItem["MinAge"].asString();
if(!dataNodeRecordsRecordsItem["MaxAge"].isNull())
recordsItemObject.maxAge = dataNodeRecordsRecordsItem["MaxAge"].asString();
if(!dataNodeRecordsRecordsItem["CapStyle"].isNull())
recordsItemObject.capStyle = dataNodeRecordsRecordsItem["CapStyle"].asString();
if(!dataNodeRecordsRecordsItem["HairStyle"].isNull())
recordsItemObject.hairStyle = dataNodeRecordsRecordsItem["HairStyle"].asString();
if(!dataNodeRecordsRecordsItem["LeftTopX"].isNull())
recordsItemObject.leftTopX = std::stof(dataNodeRecordsRecordsItem["LeftTopX"].asString());
if(!dataNodeRecordsRecordsItem["LeftTopY"].isNull())
recordsItemObject.leftTopY = std::stof(dataNodeRecordsRecordsItem["LeftTopY"].asString());
if(!dataNodeRecordsRecordsItem["RightBottomX"].isNull())
recordsItemObject.rightBottomX = std::stof(dataNodeRecordsRecordsItem["RightBottomX"].asString());
if(!dataNodeRecordsRecordsItem["RightBottomY"].isNull())
recordsItemObject.rightBottomY = std::stof(dataNodeRecordsRecordsItem["RightBottomY"].asString());
if(!dataNodeRecordsRecordsItem["PicUrlPath"].isNull())
recordsItemObject.picUrlPath = dataNodeRecordsRecordsItem["PicUrlPath"].asString();
if(!dataNodeRecordsRecordsItem["TargetPicUrlPath"].isNull())
recordsItemObject.targetPicUrlPath = dataNodeRecordsRecordsItem["TargetPicUrlPath"].asString();
data_.records.push_back(recordsItemObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string ListFaceAlgorithmResultsResult::getMessage()const
{
return message_;
}
ListFaceAlgorithmResultsResult::Data ListFaceAlgorithmResultsResult::getData()const
{
return data_;
}
std::string ListFaceAlgorithmResultsResult::getCode()const
{
return code_;
}

View File

@@ -0,0 +1,117 @@
/*
* 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/vcs/model/ListMotorAlgorithmResultsRequest.h>
using AlibabaCloud::Vcs::Model::ListMotorAlgorithmResultsRequest;
ListMotorAlgorithmResultsRequest::ListMotorAlgorithmResultsRequest() :
RpcServiceRequest("vcs", "2020-05-15", "ListMotorAlgorithmResults")
{
setMethod(HttpRequest::Method::Post);
}
ListMotorAlgorithmResultsRequest::~ListMotorAlgorithmResultsRequest()
{}
std::string ListMotorAlgorithmResultsRequest::getAlgorithmType()const
{
return algorithmType_;
}
void ListMotorAlgorithmResultsRequest::setAlgorithmType(const std::string& algorithmType)
{
algorithmType_ = algorithmType;
setBodyParameter("AlgorithmType", algorithmType);
}
std::string ListMotorAlgorithmResultsRequest::getCorpId()const
{
return corpId_;
}
void ListMotorAlgorithmResultsRequest::setCorpId(const std::string& corpId)
{
corpId_ = corpId;
setBodyParameter("CorpId", corpId);
}
std::string ListMotorAlgorithmResultsRequest::getEndTime()const
{
return endTime_;
}
void ListMotorAlgorithmResultsRequest::setEndTime(const std::string& endTime)
{
endTime_ = endTime;
setBodyParameter("EndTime", endTime);
}
std::string ListMotorAlgorithmResultsRequest::getStartTime()const
{
return startTime_;
}
void ListMotorAlgorithmResultsRequest::setStartTime(const std::string& startTime)
{
startTime_ = startTime;
setBodyParameter("StartTime", startTime);
}
std::string ListMotorAlgorithmResultsRequest::getPageNumber()const
{
return pageNumber_;
}
void ListMotorAlgorithmResultsRequest::setPageNumber(const std::string& pageNumber)
{
pageNumber_ = pageNumber;
setBodyParameter("PageNumber", pageNumber);
}
std::string ListMotorAlgorithmResultsRequest::getPlateNumber()const
{
return plateNumber_;
}
void ListMotorAlgorithmResultsRequest::setPlateNumber(const std::string& plateNumber)
{
plateNumber_ = plateNumber;
setBodyParameter("PlateNumber", plateNumber);
}
std::string ListMotorAlgorithmResultsRequest::getDataSourceId()const
{
return dataSourceId_;
}
void ListMotorAlgorithmResultsRequest::setDataSourceId(const std::string& dataSourceId)
{
dataSourceId_ = dataSourceId;
setBodyParameter("DataSourceId", dataSourceId);
}
std::string ListMotorAlgorithmResultsRequest::getPageSize()const
{
return pageSize_;
}
void ListMotorAlgorithmResultsRequest::setPageSize(const std::string& pageSize)
{
pageSize_ = pageSize;
setBodyParameter("PageSize", pageSize);
}

View File

@@ -0,0 +1,100 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/vcs/model/ListMotorAlgorithmResultsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Vcs;
using namespace AlibabaCloud::Vcs::Model;
ListMotorAlgorithmResultsResult::ListMotorAlgorithmResultsResult() :
ServiceResult()
{}
ListMotorAlgorithmResultsResult::ListMotorAlgorithmResultsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListMotorAlgorithmResultsResult::~ListMotorAlgorithmResultsResult()
{}
void ListMotorAlgorithmResultsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["PageNumber"].isNull())
data_.pageNumber = std::stoi(dataNode["PageNumber"].asString());
if(!dataNode["PageSize"].isNull())
data_.pageSize = std::stoi(dataNode["PageSize"].asString());
if(!dataNode["TotalCount"].isNull())
data_.totalCount = std::stoi(dataNode["TotalCount"].asString());
if(!dataNode["TotalPage"].isNull())
data_.totalPage = std::stoi(dataNode["TotalPage"].asString());
auto allRecordsNode = dataNode["Records"]["RecordsItem"];
for (auto dataNodeRecordsRecordsItem : allRecordsNode)
{
Data::RecordsItem recordsItemObject;
if(!dataNodeRecordsRecordsItem["CorpId"].isNull())
recordsItemObject.corpId = dataNodeRecordsRecordsItem["CorpId"].asString();
if(!dataNodeRecordsRecordsItem["DataSourceId"].isNull())
recordsItemObject.dataSourceId = dataNodeRecordsRecordsItem["DataSourceId"].asString();
if(!dataNodeRecordsRecordsItem["LeftTopX"].isNull())
recordsItemObject.leftTopX = std::stof(dataNodeRecordsRecordsItem["LeftTopX"].asString());
if(!dataNodeRecordsRecordsItem["LeftTopY"].isNull())
recordsItemObject.leftTopY = std::stof(dataNodeRecordsRecordsItem["LeftTopY"].asString());
if(!dataNodeRecordsRecordsItem["MotorId"].isNull())
recordsItemObject.motorId = dataNodeRecordsRecordsItem["MotorId"].asString();
if(!dataNodeRecordsRecordsItem["PicUrlPath"].isNull())
recordsItemObject.picUrlPath = dataNodeRecordsRecordsItem["PicUrlPath"].asString();
if(!dataNodeRecordsRecordsItem["PlateNumber"].isNull())
recordsItemObject.plateNumber = dataNodeRecordsRecordsItem["PlateNumber"].asString();
if(!dataNodeRecordsRecordsItem["RightBottomX"].isNull())
recordsItemObject.rightBottomX = std::stof(dataNodeRecordsRecordsItem["RightBottomX"].asString());
if(!dataNodeRecordsRecordsItem["RightBottomY"].isNull())
recordsItemObject.rightBottomY = std::stof(dataNodeRecordsRecordsItem["RightBottomY"].asString());
if(!dataNodeRecordsRecordsItem["ShotTime"].isNull())
recordsItemObject.shotTime = dataNodeRecordsRecordsItem["ShotTime"].asString();
if(!dataNodeRecordsRecordsItem["TargetPicUrlPath"].isNull())
recordsItemObject.targetPicUrlPath = dataNodeRecordsRecordsItem["TargetPicUrlPath"].asString();
data_.records.push_back(recordsItemObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string ListMotorAlgorithmResultsResult::getMessage()const
{
return message_;
}
ListMotorAlgorithmResultsResult::Data ListMotorAlgorithmResultsResult::getData()const
{
return data_;
}
std::string ListMotorAlgorithmResultsResult::getCode()const
{
return code_;
}