Add Api DetectIPCPedestrianOptimized.

This commit is contained in:
sdk-team
2020-09-17 16:57:51 +00:00
parent 5c7994cbcb
commit 088c3010cd
152 changed files with 10281 additions and 7 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/facebody/model/AddFaceEntityRequest.h>
using AlibabaCloud::Facebody::Model::AddFaceEntityRequest;
AddFaceEntityRequest::AddFaceEntityRequest() :
RpcServiceRequest("facebody", "2019-12-30", "AddFaceEntity")
{
setMethod(HttpRequest::Method::Post);
}
AddFaceEntityRequest::~AddFaceEntityRequest()
{}
std::string AddFaceEntityRequest::getEntityId()const
{
return entityId_;
}
void AddFaceEntityRequest::setEntityId(const std::string& entityId)
{
entityId_ = entityId;
setBodyParameter("EntityId", entityId);
}
std::string AddFaceEntityRequest::getLabels()const
{
return labels_;
}
void AddFaceEntityRequest::setLabels(const std::string& labels)
{
labels_ = labels;
setBodyParameter("Labels", labels);
}
std::string AddFaceEntityRequest::getDbName()const
{
return dbName_;
}
void AddFaceEntityRequest::setDbName(const std::string& dbName)
{
dbName_ = dbName;
setBodyParameter("DbName", dbName);
}

View File

@@ -0,0 +1,44 @@
/*
* 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/facebody/model/AddFaceEntityResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
AddFaceEntityResult::AddFaceEntityResult() :
ServiceResult()
{}
AddFaceEntityResult::AddFaceEntityResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
AddFaceEntityResult::~AddFaceEntityResult()
{}
void AddFaceEntityResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

View File

@@ -0,0 +1,73 @@
/*
* 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/facebody/model/AddFaceRequest.h>
using AlibabaCloud::Facebody::Model::AddFaceRequest;
AddFaceRequest::AddFaceRequest() :
RpcServiceRequest("facebody", "2019-12-30", "AddFace")
{
setMethod(HttpRequest::Method::Post);
}
AddFaceRequest::~AddFaceRequest()
{}
std::string AddFaceRequest::getEntityId()const
{
return entityId_;
}
void AddFaceRequest::setEntityId(const std::string& entityId)
{
entityId_ = entityId;
setBodyParameter("EntityId", entityId);
}
std::string AddFaceRequest::getDbName()const
{
return dbName_;
}
void AddFaceRequest::setDbName(const std::string& dbName)
{
dbName_ = dbName;
setBodyParameter("DbName", dbName);
}
std::string AddFaceRequest::getImageUrl()const
{
return imageUrl_;
}
void AddFaceRequest::setImageUrl(const std::string& imageUrl)
{
imageUrl_ = imageUrl;
setBodyParameter("ImageUrl", imageUrl);
}
std::string AddFaceRequest::getExtraData()const
{
return extraData_;
}
void AddFaceRequest::setExtraData(const std::string& extraData)
{
extraData_ = extraData;
setBodyParameter("ExtraData", extraData);
}

View File

@@ -0,0 +1,52 @@
/*
* 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/facebody/model/AddFaceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
AddFaceResult::AddFaceResult() :
ServiceResult()
{}
AddFaceResult::AddFaceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
AddFaceResult::~AddFaceResult()
{}
void AddFaceResult::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["FaceId"].isNull())
data_.faceId = dataNode["FaceId"].asString();
}
AddFaceResult::Data AddFaceResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,40 @@
/*
* 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/facebody/model/BlurFaceRequest.h>
using AlibabaCloud::Facebody::Model::BlurFaceRequest;
BlurFaceRequest::BlurFaceRequest() :
RpcServiceRequest("facebody", "2019-12-30", "BlurFace")
{
setMethod(HttpRequest::Method::Post);
}
BlurFaceRequest::~BlurFaceRequest()
{}
std::string BlurFaceRequest::getImageURL()const
{
return imageURL_;
}
void BlurFaceRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,52 @@
/*
* 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/facebody/model/BlurFaceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
BlurFaceResult::BlurFaceResult() :
ServiceResult()
{}
BlurFaceResult::BlurFaceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
BlurFaceResult::~BlurFaceResult()
{}
void BlurFaceResult::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["ImageURL"].isNull())
data_.imageURL = dataNode["ImageURL"].asString();
}
BlurFaceResult::Data BlurFaceResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,40 @@
/*
* 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/facebody/model/BodyPostureRequest.h>
using AlibabaCloud::Facebody::Model::BodyPostureRequest;
BodyPostureRequest::BodyPostureRequest() :
RpcServiceRequest("facebody", "2019-12-30", "BodyPosture")
{
setMethod(HttpRequest::Method::Post);
}
BodyPostureRequest::~BodyPostureRequest()
{}
std::string BodyPostureRequest::getImageURL()const
{
return imageURL_;
}
void BodyPostureRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,88 @@
/*
* 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/facebody/model/BodyPostureResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
BodyPostureResult::BodyPostureResult() :
ServiceResult()
{}
BodyPostureResult::BodyPostureResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
BodyPostureResult::~BodyPostureResult()
{}
void BodyPostureResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto allOutputsNode = dataNode["Outputs"]["Output"];
for (auto dataNodeOutputsOutput : allOutputsNode)
{
Data::Output outputObject;
if(!dataNodeOutputsOutput["HumanCount"].isNull())
outputObject.humanCount = std::stoi(dataNodeOutputsOutput["HumanCount"].asString());
auto allResultsNode = allOutputsNode["Results"]["Result"];
for (auto allOutputsNodeResultsResult : allResultsNode)
{
Data::Output::Result resultsObject;
auto allBodiesNode = allResultsNode["Bodies"]["Body"];
for (auto allResultsNodeBodiesBody : allBodiesNode)
{
Data::Output::Result::Body bodiesObject;
if(!allResultsNodeBodiesBody["Confident"].isNull())
bodiesObject.confident = std::stof(allResultsNodeBodiesBody["Confident"].asString());
if(!allResultsNodeBodiesBody["Label"].isNull())
bodiesObject.label = allResultsNodeBodiesBody["Label"].asString();
auto allPositionsNode = allBodiesNode["Positions"]["Position"];
for (auto allBodiesNodePositionsPosition : allPositionsNode)
{
Data::Output::Result::Body::Position positionsObject;
auto allPoints = value["Points"]["Point"];
for (auto value : allPoints)
positionsObject.points.push_back(value.asString());
bodiesObject.positions.push_back(positionsObject);
}
resultsObject.bodies.push_back(bodiesObject);
}
outputObject.results.push_back(resultsObject);
}
data_.outputs.push_back(outputObject);
}
auto metaObjectNode = dataNode["MetaObject"];
if(!metaObjectNode["Height"].isNull())
data_.metaObject.height = std::stoi(metaObjectNode["Height"].asString());
if(!metaObjectNode["Width"].isNull())
data_.metaObject.width = std::stoi(metaObjectNode["Width"].asString());
}
BodyPostureResult::Data BodyPostureResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/facebody/model/CompareFaceRequest.h>
using AlibabaCloud::Facebody::Model::CompareFaceRequest;
CompareFaceRequest::CompareFaceRequest() :
RpcServiceRequest("facebody", "2019-12-30", "CompareFace")
{
setMethod(HttpRequest::Method::Post);
}
CompareFaceRequest::~CompareFaceRequest()
{}
int CompareFaceRequest::getImageType()const
{
return imageType_;
}
void CompareFaceRequest::setImageType(int imageType)
{
imageType_ = imageType;
setBodyParameter("ImageType", std::to_string(imageType));
}
std::string CompareFaceRequest::getImageURLB()const
{
return imageURLB_;
}
void CompareFaceRequest::setImageURLB(const std::string& imageURLB)
{
imageURLB_ = imageURLB;
setBodyParameter("ImageURLB", imageURLB);
}
std::string CompareFaceRequest::getImageURLA()const
{
return imageURLA_;
}
void CompareFaceRequest::setImageURLA(const std::string& imageURLA)
{
imageURLA_ = imageURLA;
setBodyParameter("ImageURLA", imageURLA);
}

View File

@@ -0,0 +1,61 @@
/*
* 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/facebody/model/CompareFaceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
CompareFaceResult::CompareFaceResult() :
ServiceResult()
{}
CompareFaceResult::CompareFaceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CompareFaceResult::~CompareFaceResult()
{}
void CompareFaceResult::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["Confidence"].isNull())
data_.confidence = std::stof(dataNode["Confidence"].asString());
auto allThresholds = dataNode["Thresholds"]["Threshold"];
for (auto value : allThresholds)
data_.thresholds.push_back(value.asString());
auto allRectAList = dataNode["RectAList"]["RectA"];
for (auto value : allRectAList)
data_.rectAList.push_back(value.asString());
auto allRectBList = dataNode["RectBList"]["RectB"];
for (auto value : allRectBList)
data_.rectBList.push_back(value.asString());
}
CompareFaceResult::Data CompareFaceResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,40 @@
/*
* 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/facebody/model/CreateFaceDbRequest.h>
using AlibabaCloud::Facebody::Model::CreateFaceDbRequest;
CreateFaceDbRequest::CreateFaceDbRequest() :
RpcServiceRequest("facebody", "2019-12-30", "CreateFaceDb")
{
setMethod(HttpRequest::Method::Post);
}
CreateFaceDbRequest::~CreateFaceDbRequest()
{}
std::string CreateFaceDbRequest::getName()const
{
return name_;
}
void CreateFaceDbRequest::setName(const std::string& name)
{
name_ = name;
setBodyParameter("Name", name);
}

View File

@@ -0,0 +1,44 @@
/*
* 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/facebody/model/CreateFaceDbResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
CreateFaceDbResult::CreateFaceDbResult() :
ServiceResult()
{}
CreateFaceDbResult::CreateFaceDbResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateFaceDbResult::~CreateFaceDbResult()
{}
void CreateFaceDbResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

View File

@@ -0,0 +1,40 @@
/*
* 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/facebody/model/DeleteFaceDbRequest.h>
using AlibabaCloud::Facebody::Model::DeleteFaceDbRequest;
DeleteFaceDbRequest::DeleteFaceDbRequest() :
RpcServiceRequest("facebody", "2019-12-30", "DeleteFaceDb")
{
setMethod(HttpRequest::Method::Post);
}
DeleteFaceDbRequest::~DeleteFaceDbRequest()
{}
std::string DeleteFaceDbRequest::getName()const
{
return name_;
}
void DeleteFaceDbRequest::setName(const std::string& name)
{
name_ = name;
setBodyParameter("Name", name);
}

View File

@@ -0,0 +1,44 @@
/*
* 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/facebody/model/DeleteFaceDbResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
DeleteFaceDbResult::DeleteFaceDbResult() :
ServiceResult()
{}
DeleteFaceDbResult::DeleteFaceDbResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteFaceDbResult::~DeleteFaceDbResult()
{}
void DeleteFaceDbResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/facebody/model/DeleteFaceEntityRequest.h>
using AlibabaCloud::Facebody::Model::DeleteFaceEntityRequest;
DeleteFaceEntityRequest::DeleteFaceEntityRequest() :
RpcServiceRequest("facebody", "2019-12-30", "DeleteFaceEntity")
{
setMethod(HttpRequest::Method::Post);
}
DeleteFaceEntityRequest::~DeleteFaceEntityRequest()
{}
std::string DeleteFaceEntityRequest::getEntityId()const
{
return entityId_;
}
void DeleteFaceEntityRequest::setEntityId(const std::string& entityId)
{
entityId_ = entityId;
setBodyParameter("EntityId", entityId);
}
std::string DeleteFaceEntityRequest::getDbName()const
{
return dbName_;
}
void DeleteFaceEntityRequest::setDbName(const std::string& dbName)
{
dbName_ = dbName;
setBodyParameter("DbName", dbName);
}

View File

@@ -0,0 +1,44 @@
/*
* 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/facebody/model/DeleteFaceEntityResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
DeleteFaceEntityResult::DeleteFaceEntityResult() :
ServiceResult()
{}
DeleteFaceEntityResult::DeleteFaceEntityResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteFaceEntityResult::~DeleteFaceEntityResult()
{}
void DeleteFaceEntityResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/facebody/model/DeleteFaceRequest.h>
using AlibabaCloud::Facebody::Model::DeleteFaceRequest;
DeleteFaceRequest::DeleteFaceRequest() :
RpcServiceRequest("facebody", "2019-12-30", "DeleteFace")
{
setMethod(HttpRequest::Method::Post);
}
DeleteFaceRequest::~DeleteFaceRequest()
{}
std::string DeleteFaceRequest::getFaceId()const
{
return faceId_;
}
void DeleteFaceRequest::setFaceId(const std::string& faceId)
{
faceId_ = faceId;
setBodyParameter("FaceId", faceId);
}
std::string DeleteFaceRequest::getDbName()const
{
return dbName_;
}
void DeleteFaceRequest::setDbName(const std::string& dbName)
{
dbName_ = dbName;
setBodyParameter("DbName", dbName);
}

View File

@@ -0,0 +1,44 @@
/*
* 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/facebody/model/DeleteFaceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
DeleteFaceResult::DeleteFaceResult() :
ServiceResult()
{}
DeleteFaceResult::DeleteFaceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteFaceResult::~DeleteFaceResult()
{}
void DeleteFaceResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

View File

@@ -0,0 +1,40 @@
/*
* 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/facebody/model/DetectBodyCountRequest.h>
using AlibabaCloud::Facebody::Model::DetectBodyCountRequest;
DetectBodyCountRequest::DetectBodyCountRequest() :
RpcServiceRequest("facebody", "2019-12-30", "DetectBodyCount")
{
setMethod(HttpRequest::Method::Post);
}
DetectBodyCountRequest::~DetectBodyCountRequest()
{}
std::string DetectBodyCountRequest::getImageURL()const
{
return imageURL_;
}
void DetectBodyCountRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,52 @@
/*
* 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/facebody/model/DetectBodyCountResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
DetectBodyCountResult::DetectBodyCountResult() :
ServiceResult()
{}
DetectBodyCountResult::DetectBodyCountResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DetectBodyCountResult::~DetectBodyCountResult()
{}
void DetectBodyCountResult::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["PersonNumber"].isNull())
data_.personNumber = std::stoi(dataNode["PersonNumber"].asString());
}
DetectBodyCountResult::Data DetectBodyCountResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,40 @@
/*
* 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/facebody/model/DetectCelebrityRequest.h>
using AlibabaCloud::Facebody::Model::DetectCelebrityRequest;
DetectCelebrityRequest::DetectCelebrityRequest() :
RpcServiceRequest("facebody", "2019-12-30", "DetectCelebrity")
{
setMethod(HttpRequest::Method::Post);
}
DetectCelebrityRequest::~DetectCelebrityRequest()
{}
std::string DetectCelebrityRequest::getImageURL()const
{
return imageURL_;
}
void DetectCelebrityRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,65 @@
/*
* 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/facebody/model/DetectCelebrityResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
DetectCelebrityResult::DetectCelebrityResult() :
ServiceResult()
{}
DetectCelebrityResult::DetectCelebrityResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DetectCelebrityResult::~DetectCelebrityResult()
{}
void DetectCelebrityResult::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["Width"].isNull())
data_.width = std::stoi(dataNode["Width"].asString());
if(!dataNode["Height"].isNull())
data_.height = std::stoi(dataNode["Height"].asString());
auto allFaceRecognizeResultsNode = dataNode["FaceRecognizeResults"]["FaceRecognizeResult"];
for (auto dataNodeFaceRecognizeResultsFaceRecognizeResult : allFaceRecognizeResultsNode)
{
Data::FaceRecognizeResult faceRecognizeResultObject;
if(!dataNodeFaceRecognizeResultsFaceRecognizeResult["Name"].isNull())
faceRecognizeResultObject.name = dataNodeFaceRecognizeResultsFaceRecognizeResult["Name"].asString();
auto allFaceBoxes = value["FaceBoxes"]["FaceBox"];
for (auto value : allFaceBoxes)
faceRecognizeResultObject.faceBoxes.push_back(value.asString());
data_.faceRecognizeResults.push_back(faceRecognizeResultObject);
}
}
DetectCelebrityResult::Data DetectCelebrityResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,40 @@
/*
* 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/facebody/model/DetectChefCapRequest.h>
using AlibabaCloud::Facebody::Model::DetectChefCapRequest;
DetectChefCapRequest::DetectChefCapRequest() :
RpcServiceRequest("facebody", "2019-12-30", "DetectChefCap")
{
setMethod(HttpRequest::Method::Post);
}
DetectChefCapRequest::~DetectChefCapRequest()
{}
std::string DetectChefCapRequest::getImageURL()const
{
return imageURL_;
}
void DetectChefCapRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,63 @@
/*
* 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/facebody/model/DetectChefCapResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
DetectChefCapResult::DetectChefCapResult() :
ServiceResult()
{}
DetectChefCapResult::DetectChefCapResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DetectChefCapResult::~DetectChefCapResult()
{}
void DetectChefCapResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto allElementsNode = dataNode["Elements"]["ElementsItem"];
for (auto dataNodeElementsElementsItem : allElementsNode)
{
Data::ElementsItem elementsItemObject;
if(!dataNodeElementsElementsItem["Category"].isNull())
elementsItemObject.category = dataNodeElementsElementsItem["Category"].asString();
if(!dataNodeElementsElementsItem["Confidence"].isNull())
elementsItemObject.confidence = std::stof(dataNodeElementsElementsItem["Confidence"].asString());
auto allBox = value["Box"]["Box"];
for (auto value : allBox)
elementsItemObject.box.push_back(value.asString());
data_.elements.push_back(elementsItemObject);
}
}
DetectChefCapResult::Data DetectChefCapResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/facebody/model/DetectFaceRequest.h>
using AlibabaCloud::Facebody::Model::DetectFaceRequest;
DetectFaceRequest::DetectFaceRequest() :
RpcServiceRequest("facebody", "2019-12-30", "DetectFace")
{
setMethod(HttpRequest::Method::Post);
}
DetectFaceRequest::~DetectFaceRequest()
{}
int DetectFaceRequest::getImageType()const
{
return imageType_;
}
void DetectFaceRequest::setImageType(int imageType)
{
imageType_ = imageType;
setBodyParameter("ImageType", std::to_string(imageType));
}
std::string DetectFaceRequest::getImageURL()const
{
return imageURL_;
}
void DetectFaceRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

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.
*/
#include <alibabacloud/facebody/model/DetectFaceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
DetectFaceResult::DetectFaceResult() :
ServiceResult()
{}
DetectFaceResult::DetectFaceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DetectFaceResult::~DetectFaceResult()
{}
void DetectFaceResult::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["FaceCount"].isNull())
data_.faceCount = std::stoi(dataNode["FaceCount"].asString());
if(!dataNode["LandmarkCount"].isNull())
data_.landmarkCount = std::stoi(dataNode["LandmarkCount"].asString());
auto allFaceRectangles = dataNode["FaceRectangles"]["FaceRectangle"];
for (auto value : allFaceRectangles)
data_.faceRectangles.push_back(value.asString());
auto allFaceProbabilityList = dataNode["FaceProbabilityList"]["FaceProbability"];
for (auto value : allFaceProbabilityList)
data_.faceProbabilityList.push_back(value.asString());
auto allPoseList = dataNode["PoseList"]["Pose"];
for (auto value : allPoseList)
data_.poseList.push_back(value.asString());
auto allLandmarks = dataNode["Landmarks"]["Landmark"];
for (auto value : allLandmarks)
data_.landmarks.push_back(value.asString());
auto allPupils = dataNode["Pupils"]["Pupil"];
for (auto value : allPupils)
data_.pupils.push_back(value.asString());
}
DetectFaceResult::Data DetectFaceResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,89 @@
/*
* 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/facebody/model/DetectIPCPedestrianRequest.h>
using AlibabaCloud::Facebody::Model::DetectIPCPedestrianRequest;
DetectIPCPedestrianRequest::DetectIPCPedestrianRequest() :
RpcServiceRequest("facebody", "2019-12-30", "DetectIPCPedestrian")
{
setMethod(HttpRequest::Method::Post);
}
DetectIPCPedestrianRequest::~DetectIPCPedestrianRequest()
{}
std::string DetectIPCPedestrianRequest::getImageData()const
{
return imageData_;
}
void DetectIPCPedestrianRequest::setImageData(const std::string& imageData)
{
imageData_ = imageData;
setBodyParameter("ImageData", imageData);
}
std::vector<DetectIPCPedestrianRequest::URLList> DetectIPCPedestrianRequest::getURLList()const
{
return uRLList_;
}
void DetectIPCPedestrianRequest::setURLList(const std::vector<URLList>& uRLList)
{
uRLList_ = uRLList;
for(int dep1 = 0; dep1!= uRLList.size(); dep1++) {
auto uRLListObj = uRLList.at(dep1);
std::string uRLListObjStr = "URLList." + std::to_string(dep1 + 1);
setParameter(uRLListObjStr + ".DataId", uRLListObj.dataId);
setParameter(uRLListObjStr + ".ImageURL", uRLListObj.imageURL);
}
}
bool DetectIPCPedestrianRequest::getContinueOnError()const
{
return continueOnError_;
}
void DetectIPCPedestrianRequest::setContinueOnError(bool continueOnError)
{
continueOnError_ = continueOnError;
setBodyParameter("ContinueOnError", continueOnError ? "true" : "false");
}
int DetectIPCPedestrianRequest::getWidth()const
{
return width_;
}
void DetectIPCPedestrianRequest::setWidth(int width)
{
width_ = width;
setBodyParameter("Width", std::to_string(width));
}
int DetectIPCPedestrianRequest::getHeight()const
{
return height_;
}
void DetectIPCPedestrianRequest::setHeight(int height)
{
height_ = height;
setBodyParameter("Height", std::to_string(height));
}

View File

@@ -0,0 +1,73 @@
/*
* 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/facebody/model/DetectIPCPedestrianResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
DetectIPCPedestrianResult::DetectIPCPedestrianResult() :
ServiceResult()
{}
DetectIPCPedestrianResult::DetectIPCPedestrianResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DetectIPCPedestrianResult::~DetectIPCPedestrianResult()
{}
void DetectIPCPedestrianResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto allImageInfoListNode = dataNode["ImageInfoList"]["ImageInfoListItem"];
for (auto dataNodeImageInfoListImageInfoListItem : allImageInfoListNode)
{
Data::ImageInfoListItem imageInfoListItemObject;
if(!dataNodeImageInfoListImageInfoListItem["ErrorCode"].isNull())
imageInfoListItemObject.errorCode = dataNodeImageInfoListImageInfoListItem["ErrorCode"].asString();
if(!dataNodeImageInfoListImageInfoListItem["ErrorMessage"].isNull())
imageInfoListItemObject.errorMessage = dataNodeImageInfoListImageInfoListItem["ErrorMessage"].asString();
if(!dataNodeImageInfoListImageInfoListItem["DataId"].isNull())
imageInfoListItemObject.dataId = dataNodeImageInfoListImageInfoListItem["DataId"].asString();
auto allElementsNode = allImageInfoListNode["Elements"]["Element"];
for (auto allImageInfoListNodeElementsElement : allElementsNode)
{
Data::ImageInfoListItem::Element elementsObject;
if(!allImageInfoListNodeElementsElement["Score"].isNull())
elementsObject.score = std::stof(allImageInfoListNodeElementsElement["Score"].asString());
auto allBoxes = value["Boxes"]["Box"];
for (auto value : allBoxes)
elementsObject.boxes.push_back(value.asString());
imageInfoListItemObject.elements.push_back(elementsObject);
}
data_.imageInfoList.push_back(imageInfoListItemObject);
}
}
DetectIPCPedestrianResult::Data DetectIPCPedestrianResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,44 @@
/*
* 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/facebody/model/DetectLivingFaceRequest.h>
using AlibabaCloud::Facebody::Model::DetectLivingFaceRequest;
DetectLivingFaceRequest::DetectLivingFaceRequest() :
RpcServiceRequest("facebody", "2019-12-30", "DetectLivingFace")
{
setMethod(HttpRequest::Method::Post);
}
DetectLivingFaceRequest::~DetectLivingFaceRequest()
{}
std::vector<DetectLivingFaceRequest::Tasks> DetectLivingFaceRequest::getTasks()const
{
return tasks_;
}
void DetectLivingFaceRequest::setTasks(const std::vector<Tasks>& tasks)
{
tasks_ = tasks;
for(int dep1 = 0; dep1!= tasks.size(); dep1++) {
auto tasksObj = tasks.at(dep1);
std::string tasksObjStr = "Tasks." + std::to_string(dep1 + 1);
setParameter(tasksObjStr + ".ImageURL", tasksObj.imageURL);
}
}

View File

@@ -0,0 +1,82 @@
/*
* 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/facebody/model/DetectLivingFaceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
DetectLivingFaceResult::DetectLivingFaceResult() :
ServiceResult()
{}
DetectLivingFaceResult::DetectLivingFaceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DetectLivingFaceResult::~DetectLivingFaceResult()
{}
void DetectLivingFaceResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto allElementsNode = dataNode["Elements"]["Element"];
for (auto dataNodeElementsElement : allElementsNode)
{
Data::Element elementObject;
if(!dataNodeElementsElement["TaskId"].isNull())
elementObject.taskId = dataNodeElementsElement["TaskId"].asString();
if(!dataNodeElementsElement["ImageURL"].isNull())
elementObject.imageURL = dataNodeElementsElement["ImageURL"].asString();
auto allResultsNode = allElementsNode["Results"]["Result"];
for (auto allElementsNodeResultsResult : allResultsNode)
{
Data::Element::Result resultsObject;
if(!allElementsNodeResultsResult["Label"].isNull())
resultsObject.label = allElementsNodeResultsResult["Label"].asString();
if(!allElementsNodeResultsResult["Suggestion"].isNull())
resultsObject.suggestion = allElementsNodeResultsResult["Suggestion"].asString();
if(!allElementsNodeResultsResult["Rate"].isNull())
resultsObject.rate = std::stof(allElementsNodeResultsResult["Rate"].asString());
auto allFramesNode = allResultsNode["Frames"]["Frame"];
for (auto allResultsNodeFramesFrame : allFramesNode)
{
Data::Element::Result::Frame framesObject;
if(!allResultsNodeFramesFrame["Rate"].isNull())
framesObject.rate = std::stof(allResultsNodeFramesFrame["Rate"].asString());
if(!allResultsNodeFramesFrame["Url"].isNull())
framesObject.url = allResultsNodeFramesFrame["Url"].asString();
resultsObject.frames.push_back(framesObject);
}
elementObject.results.push_back(resultsObject);
}
data_.elements.push_back(elementObject);
}
}
DetectLivingFaceResult::Data DetectLivingFaceResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,40 @@
/*
* 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/facebody/model/DetectMaskRequest.h>
using AlibabaCloud::Facebody::Model::DetectMaskRequest;
DetectMaskRequest::DetectMaskRequest() :
RpcServiceRequest("facebody", "2019-12-30", "DetectMask")
{
setMethod(HttpRequest::Method::Post);
}
DetectMaskRequest::~DetectMaskRequest()
{}
std::string DetectMaskRequest::getImageURL()const
{
return imageURL_;
}
void DetectMaskRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/facebody/model/DetectMaskResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
DetectMaskResult::DetectMaskResult() :
ServiceResult()
{}
DetectMaskResult::DetectMaskResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DetectMaskResult::~DetectMaskResult()
{}
void DetectMaskResult::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["Mask"].isNull())
data_.mask = std::stoi(dataNode["Mask"].asString());
if(!dataNode["FaceProbability"].isNull())
data_.faceProbability = std::stof(dataNode["FaceProbability"].asString());
}
DetectMaskResult::Data DetectMaskResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,40 @@
/*
* 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/facebody/model/DetectPedestrianRequest.h>
using AlibabaCloud::Facebody::Model::DetectPedestrianRequest;
DetectPedestrianRequest::DetectPedestrianRequest() :
RpcServiceRequest("facebody", "2019-12-30", "DetectPedestrian")
{
setMethod(HttpRequest::Method::Post);
}
DetectPedestrianRequest::~DetectPedestrianRequest()
{}
std::string DetectPedestrianRequest::getImageURL()const
{
return imageURL_;
}
void DetectPedestrianRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,67 @@
/*
* 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/facebody/model/DetectPedestrianResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
DetectPedestrianResult::DetectPedestrianResult() :
ServiceResult()
{}
DetectPedestrianResult::DetectPedestrianResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DetectPedestrianResult::~DetectPedestrianResult()
{}
void DetectPedestrianResult::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["Width"].isNull())
data_.width = std::stoi(dataNode["Width"].asString());
if(!dataNode["Height"].isNull())
data_.height = std::stoi(dataNode["Height"].asString());
auto allElementsNode = dataNode["Elements"]["Element"];
for (auto dataNodeElementsElement : allElementsNode)
{
Data::Element elementObject;
if(!dataNodeElementsElement["Score"].isNull())
elementObject.score = std::stof(dataNodeElementsElement["Score"].asString());
if(!dataNodeElementsElement["Type"].isNull())
elementObject.type = dataNodeElementsElement["Type"].asString();
auto allBoxes = value["Boxes"]["Box"];
for (auto value : allBoxes)
elementObject.boxes.push_back(value.asString());
data_.elements.push_back(elementObject);
}
}
DetectPedestrianResult::Data DetectPedestrianResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,40 @@
/*
* 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/facebody/model/DetectVideoLivingFaceRequest.h>
using AlibabaCloud::Facebody::Model::DetectVideoLivingFaceRequest;
DetectVideoLivingFaceRequest::DetectVideoLivingFaceRequest() :
RpcServiceRequest("facebody", "2019-12-30", "DetectVideoLivingFace")
{
setMethod(HttpRequest::Method::Post);
}
DetectVideoLivingFaceRequest::~DetectVideoLivingFaceRequest()
{}
std::string DetectVideoLivingFaceRequest::getVideoUrl()const
{
return videoUrl_;
}
void DetectVideoLivingFaceRequest::setVideoUrl(const std::string& videoUrl)
{
videoUrl_ = videoUrl;
setBodyParameter("VideoUrl", videoUrl);
}

View File

@@ -0,0 +1,63 @@
/*
* 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/facebody/model/DetectVideoLivingFaceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
DetectVideoLivingFaceResult::DetectVideoLivingFaceResult() :
ServiceResult()
{}
DetectVideoLivingFaceResult::DetectVideoLivingFaceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DetectVideoLivingFaceResult::~DetectVideoLivingFaceResult()
{}
void DetectVideoLivingFaceResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto allElementsNode = dataNode["Elements"]["Element"];
for (auto dataNodeElementsElement : allElementsNode)
{
Data::Element elementObject;
if(!dataNodeElementsElement["LiveConfidence"].isNull())
elementObject.liveConfidence = std::stof(dataNodeElementsElement["LiveConfidence"].asString());
if(!dataNodeElementsElement["FaceConfidence"].isNull())
elementObject.faceConfidence = std::stof(dataNodeElementsElement["FaceConfidence"].asString());
auto allRect = value["Rect"]["Result"];
for (auto value : allRect)
elementObject.rect.push_back(value.asString());
data_.elements.push_back(elementObject);
}
}
DetectVideoLivingFaceResult::Data DetectVideoLivingFaceResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,40 @@
/*
* 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/facebody/model/EnhanceFaceRequest.h>
using AlibabaCloud::Facebody::Model::EnhanceFaceRequest;
EnhanceFaceRequest::EnhanceFaceRequest() :
RpcServiceRequest("facebody", "2019-12-30", "EnhanceFace")
{
setMethod(HttpRequest::Method::Post);
}
EnhanceFaceRequest::~EnhanceFaceRequest()
{}
std::string EnhanceFaceRequest::getImageURL()const
{
return imageURL_;
}
void EnhanceFaceRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,52 @@
/*
* 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/facebody/model/EnhanceFaceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
EnhanceFaceResult::EnhanceFaceResult() :
ServiceResult()
{}
EnhanceFaceResult::EnhanceFaceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
EnhanceFaceResult::~EnhanceFaceResult()
{}
void EnhanceFaceResult::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["ImageURL"].isNull())
data_.imageURL = dataNode["ImageURL"].asString();
}
EnhanceFaceResult::Data EnhanceFaceResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/facebody/model/ExtractPedestrianFeatureAttrRequest.h>
using AlibabaCloud::Facebody::Model::ExtractPedestrianFeatureAttrRequest;
ExtractPedestrianFeatureAttrRequest::ExtractPedestrianFeatureAttrRequest() :
RpcServiceRequest("facebody", "2019-12-30", "ExtractPedestrianFeatureAttr")
{
setMethod(HttpRequest::Method::Post);
}
ExtractPedestrianFeatureAttrRequest::~ExtractPedestrianFeatureAttrRequest()
{}
std::string ExtractPedestrianFeatureAttrRequest::getMode()const
{
return mode_;
}
void ExtractPedestrianFeatureAttrRequest::setMode(const std::string& mode)
{
mode_ = mode;
setBodyParameter("Mode", mode);
}
std::string ExtractPedestrianFeatureAttrRequest::getImageURL()const
{
return imageURL_;
}
void ExtractPedestrianFeatureAttrRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,86 @@
/*
* 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/facebody/model/ExtractPedestrianFeatureAttrResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
ExtractPedestrianFeatureAttrResult::ExtractPedestrianFeatureAttrResult() :
ServiceResult()
{}
ExtractPedestrianFeatureAttrResult::ExtractPedestrianFeatureAttrResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ExtractPedestrianFeatureAttrResult::~ExtractPedestrianFeatureAttrResult()
{}
void ExtractPedestrianFeatureAttrResult::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["ObjType"].isNull())
data_.objType = dataNode["ObjType"].asString();
if(!dataNode["ObjTypeScore"].isNull())
data_.objTypeScore = std::stof(dataNode["ObjTypeScore"].asString());
if(!dataNode["Feature"].isNull())
data_.feature = dataNode["Feature"].asString();
if(!dataNode["QualityScore"].isNull())
data_.qualityScore = std::stof(dataNode["QualityScore"].asString());
if(!dataNode["UpperColor"].isNull())
data_.upperColor = dataNode["UpperColor"].asString();
if(!dataNode["UpperColorScore"].isNull())
data_.upperColorScore = std::stof(dataNode["UpperColorScore"].asString());
if(!dataNode["UpperType"].isNull())
data_.upperType = dataNode["UpperType"].asString();
if(!dataNode["UpperTypeScore"].isNull())
data_.upperTypeScore = std::stof(dataNode["UpperTypeScore"].asString());
if(!dataNode["LowerColor"].isNull())
data_.lowerColor = dataNode["LowerColor"].asString();
if(!dataNode["LowerColorScore"].isNull())
data_.lowerColorScore = std::stof(dataNode["LowerColorScore"].asString());
if(!dataNode["LowerType"].isNull())
data_.lowerType = dataNode["LowerType"].asString();
if(!dataNode["LowerTypeScore"].isNull())
data_.lowerTypeScore = std::stof(dataNode["LowerTypeScore"].asString());
if(!dataNode["Gender"].isNull())
data_.gender = dataNode["Gender"].asString();
if(!dataNode["GenderScore"].isNull())
data_.genderScore = std::stof(dataNode["GenderScore"].asString());
if(!dataNode["Hair"].isNull())
data_.hair = dataNode["Hair"].asString();
if(!dataNode["HairScore"].isNull())
data_.hairScore = std::stof(dataNode["HairScore"].asString());
if(!dataNode["Age"].isNull())
data_.age = dataNode["Age"].asString();
if(!dataNode["AgeScore"].isNull())
data_.ageScore = std::stof(dataNode["AgeScore"].asString());
}
ExtractPedestrianFeatureAttrResult::Data ExtractPedestrianFeatureAttrResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,40 @@
/*
* 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/facebody/model/ExtractPedestrianFeatureAttributeRequest.h>
using AlibabaCloud::Facebody::Model::ExtractPedestrianFeatureAttributeRequest;
ExtractPedestrianFeatureAttributeRequest::ExtractPedestrianFeatureAttributeRequest() :
RpcServiceRequest("facebody", "2019-12-30", "ExtractPedestrianFeatureAttribute")
{
setMethod(HttpRequest::Method::Post);
}
ExtractPedestrianFeatureAttributeRequest::~ExtractPedestrianFeatureAttributeRequest()
{}
std::string ExtractPedestrianFeatureAttributeRequest::getImageURL()const
{
return imageURL_;
}
void ExtractPedestrianFeatureAttributeRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,86 @@
/*
* 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/facebody/model/ExtractPedestrianFeatureAttributeResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
ExtractPedestrianFeatureAttributeResult::ExtractPedestrianFeatureAttributeResult() :
ServiceResult()
{}
ExtractPedestrianFeatureAttributeResult::ExtractPedestrianFeatureAttributeResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ExtractPedestrianFeatureAttributeResult::~ExtractPedestrianFeatureAttributeResult()
{}
void ExtractPedestrianFeatureAttributeResult::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["ObjType"].isNull())
data_.objType = dataNode["ObjType"].asString();
if(!dataNode["ObjTypeScore"].isNull())
data_.objTypeScore = std::stof(dataNode["ObjTypeScore"].asString());
if(!dataNode["Feature"].isNull())
data_.feature = dataNode["Feature"].asString();
if(!dataNode["QualityScore"].isNull())
data_.qualityScore = std::stof(dataNode["QualityScore"].asString());
if(!dataNode["UpperColor"].isNull())
data_.upperColor = dataNode["UpperColor"].asString();
if(!dataNode["UpperColorScore"].isNull())
data_.upperColorScore = std::stof(dataNode["UpperColorScore"].asString());
if(!dataNode["UpperType"].isNull())
data_.upperType = dataNode["UpperType"].asString();
if(!dataNode["UpperTypeScore"].isNull())
data_.upperTypeScore = std::stof(dataNode["UpperTypeScore"].asString());
if(!dataNode["LowerColor"].isNull())
data_.lowerColor = dataNode["LowerColor"].asString();
if(!dataNode["LowerColorScore"].isNull())
data_.lowerColorScore = std::stof(dataNode["LowerColorScore"].asString());
if(!dataNode["LowerType"].isNull())
data_.lowerType = dataNode["LowerType"].asString();
if(!dataNode["LowerTypeScore"].isNull())
data_.lowerTypeScore = std::stof(dataNode["LowerTypeScore"].asString());
if(!dataNode["Gender"].isNull())
data_.gender = dataNode["Gender"].asString();
if(!dataNode["GenderScore"].isNull())
data_.genderScore = std::stof(dataNode["GenderScore"].asString());
if(!dataNode["Hair"].isNull())
data_.hair = dataNode["Hair"].asString();
if(!dataNode["HairScore"].isNull())
data_.hairScore = std::stof(dataNode["HairScore"].asString());
if(!dataNode["Age"].isNull())
data_.age = dataNode["Age"].asString();
if(!dataNode["AgeScore"].isNull())
data_.ageScore = std::stof(dataNode["AgeScore"].asString());
}
ExtractPedestrianFeatureAttributeResult::Data ExtractPedestrianFeatureAttributeResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,73 @@
/*
* 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/facebody/model/FaceBeautyRequest.h>
using AlibabaCloud::Facebody::Model::FaceBeautyRequest;
FaceBeautyRequest::FaceBeautyRequest() :
RpcServiceRequest("facebody", "2019-12-30", "FaceBeauty")
{
setMethod(HttpRequest::Method::Post);
}
FaceBeautyRequest::~FaceBeautyRequest()
{}
float FaceBeautyRequest::getSharp()const
{
return sharp_;
}
void FaceBeautyRequest::setSharp(float sharp)
{
sharp_ = sharp;
setBodyParameter("Sharp", std::to_string(sharp));
}
float FaceBeautyRequest::getWhite()const
{
return white_;
}
void FaceBeautyRequest::setWhite(float white)
{
white_ = white;
setBodyParameter("White", std::to_string(white));
}
std::string FaceBeautyRequest::getImageURL()const
{
return imageURL_;
}
void FaceBeautyRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}
float FaceBeautyRequest::getSmooth()const
{
return smooth_;
}
void FaceBeautyRequest::setSmooth(float smooth)
{
smooth_ = smooth;
setBodyParameter("Smooth", std::to_string(smooth));
}

View File

@@ -0,0 +1,52 @@
/*
* 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/facebody/model/FaceBeautyResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
FaceBeautyResult::FaceBeautyResult() :
ServiceResult()
{}
FaceBeautyResult::FaceBeautyResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
FaceBeautyResult::~FaceBeautyResult()
{}
void FaceBeautyResult::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["ImageURL"].isNull())
data_.imageURL = dataNode["ImageURL"].asString();
}
FaceBeautyResult::Data FaceBeautyResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/facebody/model/FaceFilterRequest.h>
using AlibabaCloud::Facebody::Model::FaceFilterRequest;
FaceFilterRequest::FaceFilterRequest() :
RpcServiceRequest("facebody", "2019-12-30", "FaceFilter")
{
setMethod(HttpRequest::Method::Post);
}
FaceFilterRequest::~FaceFilterRequest()
{}
float FaceFilterRequest::getStrength()const
{
return strength_;
}
void FaceFilterRequest::setStrength(float strength)
{
strength_ = strength;
setBodyParameter("Strength", std::to_string(strength));
}
std::string FaceFilterRequest::getResourceType()const
{
return resourceType_;
}
void FaceFilterRequest::setResourceType(const std::string& resourceType)
{
resourceType_ = resourceType;
setBodyParameter("ResourceType", resourceType);
}
std::string FaceFilterRequest::getImageURL()const
{
return imageURL_;
}
void FaceFilterRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,52 @@
/*
* 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/facebody/model/FaceFilterResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
FaceFilterResult::FaceFilterResult() :
ServiceResult()
{}
FaceFilterResult::FaceFilterResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
FaceFilterResult::~FaceFilterResult()
{}
void FaceFilterResult::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["ImageURL"].isNull())
data_.imageURL = dataNode["ImageURL"].asString();
}
FaceFilterResult::Data FaceFilterResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,73 @@
/*
* 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/facebody/model/FaceMakeupRequest.h>
using AlibabaCloud::Facebody::Model::FaceMakeupRequest;
FaceMakeupRequest::FaceMakeupRequest() :
RpcServiceRequest("facebody", "2019-12-30", "FaceMakeup")
{
setMethod(HttpRequest::Method::Post);
}
FaceMakeupRequest::~FaceMakeupRequest()
{}
float FaceMakeupRequest::getStrength()const
{
return strength_;
}
void FaceMakeupRequest::setStrength(float strength)
{
strength_ = strength;
setBodyParameter("Strength", std::to_string(strength));
}
std::string FaceMakeupRequest::getMakeupType()const
{
return makeupType_;
}
void FaceMakeupRequest::setMakeupType(const std::string& makeupType)
{
makeupType_ = makeupType;
setBodyParameter("MakeupType", makeupType);
}
std::string FaceMakeupRequest::getResourceType()const
{
return resourceType_;
}
void FaceMakeupRequest::setResourceType(const std::string& resourceType)
{
resourceType_ = resourceType;
setBodyParameter("ResourceType", resourceType);
}
std::string FaceMakeupRequest::getImageURL()const
{
return imageURL_;
}
void FaceMakeupRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,52 @@
/*
* 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/facebody/model/FaceMakeupResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
FaceMakeupResult::FaceMakeupResult() :
ServiceResult()
{}
FaceMakeupResult::FaceMakeupResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
FaceMakeupResult::~FaceMakeupResult()
{}
void FaceMakeupResult::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["ImageURL"].isNull())
data_.imageURL = dataNode["ImageURL"].asString();
}
FaceMakeupResult::Data FaceMakeupResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/facebody/model/FaceTidyupRequest.h>
using AlibabaCloud::Facebody::Model::FaceTidyupRequest;
FaceTidyupRequest::FaceTidyupRequest() :
RpcServiceRequest("facebody", "2019-12-30", "FaceTidyup")
{
setMethod(HttpRequest::Method::Post);
}
FaceTidyupRequest::~FaceTidyupRequest()
{}
int FaceTidyupRequest::getShapeType()const
{
return shapeType_;
}
void FaceTidyupRequest::setShapeType(int shapeType)
{
shapeType_ = shapeType;
setBodyParameter("ShapeType", std::to_string(shapeType));
}
float FaceTidyupRequest::getStrength()const
{
return strength_;
}
void FaceTidyupRequest::setStrength(float strength)
{
strength_ = strength;
setBodyParameter("Strength", std::to_string(strength));
}
std::string FaceTidyupRequest::getImageURL()const
{
return imageURL_;
}
void FaceTidyupRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,52 @@
/*
* 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/facebody/model/FaceTidyupResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
FaceTidyupResult::FaceTidyupResult() :
ServiceResult()
{}
FaceTidyupResult::FaceTidyupResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
FaceTidyupResult::~FaceTidyupResult()
{}
void FaceTidyupResult::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["ImageURL"].isNull())
data_.imageURL = dataNode["ImageURL"].asString();
}
FaceTidyupResult::Data FaceTidyupResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/facebody/model/GetFaceEntityRequest.h>
using AlibabaCloud::Facebody::Model::GetFaceEntityRequest;
GetFaceEntityRequest::GetFaceEntityRequest() :
RpcServiceRequest("facebody", "2019-12-30", "GetFaceEntity")
{
setMethod(HttpRequest::Method::Post);
}
GetFaceEntityRequest::~GetFaceEntityRequest()
{}
std::string GetFaceEntityRequest::getEntityId()const
{
return entityId_;
}
void GetFaceEntityRequest::setEntityId(const std::string& entityId)
{
entityId_ = entityId;
setBodyParameter("EntityId", entityId);
}
std::string GetFaceEntityRequest::getDbName()const
{
return dbName_;
}
void GetFaceEntityRequest::setDbName(const std::string& dbName)
{
dbName_ = dbName;
setBodyParameter("DbName", dbName);
}

View File

@@ -0,0 +1,64 @@
/*
* 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/facebody/model/GetFaceEntityResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
GetFaceEntityResult::GetFaceEntityResult() :
ServiceResult()
{}
GetFaceEntityResult::GetFaceEntityResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetFaceEntityResult::~GetFaceEntityResult()
{}
void GetFaceEntityResult::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["DbName"].isNull())
data_.dbName = dataNode["DbName"].asString();
if(!dataNode["EntityId"].isNull())
data_.entityId = dataNode["EntityId"].asString();
if(!dataNode["Labels"].isNull())
data_.labels = dataNode["Labels"].asString();
auto allFacesNode = dataNode["Faces"]["Face"];
for (auto dataNodeFacesFace : allFacesNode)
{
Data::Face faceObject;
if(!dataNodeFacesFace["FaceId"].isNull())
faceObject.faceId = dataNodeFacesFace["FaceId"].asString();
data_.faces.push_back(faceObject);
}
}
GetFaceEntityResult::Data GetFaceEntityResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,40 @@
/*
* 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/facebody/model/HandPostureRequest.h>
using AlibabaCloud::Facebody::Model::HandPostureRequest;
HandPostureRequest::HandPostureRequest() :
RpcServiceRequest("facebody", "2019-12-30", "HandPosture")
{
setMethod(HttpRequest::Method::Post);
}
HandPostureRequest::~HandPostureRequest()
{}
std::string HandPostureRequest::getImageURL()const
{
return imageURL_;
}
void HandPostureRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,101 @@
/*
* 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/facebody/model/HandPostureResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
HandPostureResult::HandPostureResult() :
ServiceResult()
{}
HandPostureResult::HandPostureResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
HandPostureResult::~HandPostureResult()
{}
void HandPostureResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto allOutputsNode = dataNode["Outputs"]["Output"];
for (auto dataNodeOutputsOutput : allOutputsNode)
{
Data::Output outputObject;
if(!dataNodeOutputsOutput["HandCount"].isNull())
outputObject.handCount = std::stoi(dataNodeOutputsOutput["HandCount"].asString());
auto allResultsNode = allOutputsNode["Results"]["Result"];
for (auto allOutputsNodeResultsResult : allResultsNode)
{
Data::Output::Result resultsObject;
auto boxNode = value["Box"];
if(!boxNode["Confident"].isNull())
resultsObject.box.confident = std::stof(boxNode["Confident"].asString());
auto allPositionsNode = boxNode["Positions"]["Position"];
for (auto boxNodePositionsPosition : allPositionsNode)
{
Data::Output::Result::Box::Position positionObject;
auto allPoints = value["Points"]["Point"];
for (auto value : allPoints)
positionObject.points.push_back(value.asString());
resultsObject.box.positions.push_back(positionObject);
}
auto handsNode = value["Hands"];
if(!handsNode["Confident"].isNull())
resultsObject.hands.confident = std::stof(handsNode["Confident"].asString());
auto allKeyPointsNode = handsNode["KeyPoints"]["KeyPoint"];
for (auto handsNodeKeyPointsKeyPoint : allKeyPointsNode)
{
Data::Output::Result::Hands::KeyPoint keyPointObject;
if(!handsNodeKeyPointsKeyPoint["Label"].isNull())
keyPointObject.label = handsNodeKeyPointsKeyPoint["Label"].asString();
auto allPositions1Node = allKeyPointsNode["Positions"]["Position"];
for (auto allKeyPointsNodePositionsPosition : allPositions1Node)
{
Data::Output::Result::Hands::KeyPoint::Position2 positions1Object;
auto allPoints3 = value["Points"]["Point"];
for (auto value : allPoints3)
positions1Object.points3.push_back(value.asString());
keyPointObject.positions1.push_back(positions1Object);
}
resultsObject.hands.keyPoints.push_back(keyPointObject);
}
outputObject.results.push_back(resultsObject);
}
data_.outputs.push_back(outputObject);
}
auto metaObjectNode = dataNode["MetaObject"];
if(!metaObjectNode["Height"].isNull())
data_.metaObject.height = std::stoi(metaObjectNode["Height"].asString());
if(!metaObjectNode["Width"].isNull())
data_.metaObject.width = std::stoi(metaObjectNode["Width"].asString());
}
HandPostureResult::Data HandPostureResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,29 @@
/*
* 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/facebody/model/ListFaceDbsRequest.h>
using AlibabaCloud::Facebody::Model::ListFaceDbsRequest;
ListFaceDbsRequest::ListFaceDbsRequest() :
RpcServiceRequest("facebody", "2019-12-30", "ListFaceDbs")
{
setMethod(HttpRequest::Method::Post);
}
ListFaceDbsRequest::~ListFaceDbsRequest()
{}

View File

@@ -0,0 +1,58 @@
/*
* 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/facebody/model/ListFaceDbsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
ListFaceDbsResult::ListFaceDbsResult() :
ServiceResult()
{}
ListFaceDbsResult::ListFaceDbsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListFaceDbsResult::~ListFaceDbsResult()
{}
void ListFaceDbsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto allDbListNode = dataNode["DbList"]["DbListItem"];
for (auto dataNodeDbListDbListItem : allDbListNode)
{
Data::DbListItem dbListItemObject;
if(!dataNodeDbListDbListItem["Name"].isNull())
dbListItemObject.name = dataNodeDbListDbListItem["Name"].asString();
data_.dbList.push_back(dbListItemObject);
}
}
ListFaceDbsResult::Data ListFaceDbsResult::getData()const
{
return data_;
}

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/facebody/model/ListFaceEntitiesRequest.h>
using AlibabaCloud::Facebody::Model::ListFaceEntitiesRequest;
ListFaceEntitiesRequest::ListFaceEntitiesRequest() :
RpcServiceRequest("facebody", "2019-12-30", "ListFaceEntities")
{
setMethod(HttpRequest::Method::Post);
}
ListFaceEntitiesRequest::~ListFaceEntitiesRequest()
{}
std::string ListFaceEntitiesRequest::getEntityIdPrefix()const
{
return entityIdPrefix_;
}
void ListFaceEntitiesRequest::setEntityIdPrefix(const std::string& entityIdPrefix)
{
entityIdPrefix_ = entityIdPrefix;
setBodyParameter("EntityIdPrefix", entityIdPrefix);
}
int ListFaceEntitiesRequest::getLimit()const
{
return limit_;
}
void ListFaceEntitiesRequest::setLimit(int limit)
{
limit_ = limit;
setBodyParameter("Limit", std::to_string(limit));
}
std::string ListFaceEntitiesRequest::getOrder()const
{
return order_;
}
void ListFaceEntitiesRequest::setOrder(const std::string& order)
{
order_ = order;
setBodyParameter("Order", order);
}
int ListFaceEntitiesRequest::getOffset()const
{
return offset_;
}
void ListFaceEntitiesRequest::setOffset(int offset)
{
offset_ = offset;
setBodyParameter("Offset", std::to_string(offset));
}
std::string ListFaceEntitiesRequest::getToken()const
{
return token_;
}
void ListFaceEntitiesRequest::setToken(const std::string& token)
{
token_ = token;
setBodyParameter("Token", token);
}
std::string ListFaceEntitiesRequest::getLabels()const
{
return labels_;
}
void ListFaceEntitiesRequest::setLabels(const std::string& labels)
{
labels_ = labels;
setBodyParameter("Labels", labels);
}
std::string ListFaceEntitiesRequest::getDbName()const
{
return dbName_;
}
void ListFaceEntitiesRequest::setDbName(const std::string& dbName)
{
dbName_ = dbName;
setBodyParameter("DbName", dbName);
}

View File

@@ -0,0 +1,72 @@
/*
* 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/facebody/model/ListFaceEntitiesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
ListFaceEntitiesResult::ListFaceEntitiesResult() :
ServiceResult()
{}
ListFaceEntitiesResult::ListFaceEntitiesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListFaceEntitiesResult::~ListFaceEntitiesResult()
{}
void ListFaceEntitiesResult::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["Token"].isNull())
data_.token = dataNode["Token"].asString();
if(!dataNode["TotalCount"].isNull())
data_.totalCount = std::stoi(dataNode["TotalCount"].asString());
auto allEntitiesNode = dataNode["Entities"]["Entity"];
for (auto dataNodeEntitiesEntity : allEntitiesNode)
{
Data::Entity entityObject;
if(!dataNodeEntitiesEntity["DbName"].isNull())
entityObject.dbName = dataNodeEntitiesEntity["DbName"].asString();
if(!dataNodeEntitiesEntity["EntityId"].isNull())
entityObject.entityId = dataNodeEntitiesEntity["EntityId"].asString();
if(!dataNodeEntitiesEntity["FaceCount"].isNull())
entityObject.faceCount = std::stoi(dataNodeEntitiesEntity["FaceCount"].asString());
if(!dataNodeEntitiesEntity["Labels"].isNull())
entityObject.labels = dataNodeEntitiesEntity["Labels"].asString();
if(!dataNodeEntitiesEntity["CreatedAt"].isNull())
entityObject.createdAt = std::stol(dataNodeEntitiesEntity["CreatedAt"].asString());
if(!dataNodeEntitiesEntity["UpdatedAt"].isNull())
entityObject.updatedAt = std::stol(dataNodeEntitiesEntity["UpdatedAt"].asString());
data_.entities.push_back(entityObject);
}
}
ListFaceEntitiesResult::Data ListFaceEntitiesResult::getData()const
{
return data_;
}

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.
*/
#include <alibabacloud/facebody/model/RecognizeActionRequest.h>
using AlibabaCloud::Facebody::Model::RecognizeActionRequest;
RecognizeActionRequest::RecognizeActionRequest() :
RpcServiceRequest("facebody", "2019-12-30", "RecognizeAction")
{
setMethod(HttpRequest::Method::Post);
}
RecognizeActionRequest::~RecognizeActionRequest()
{}
std::vector<RecognizeActionRequest::URLList> RecognizeActionRequest::getURLList()const
{
return uRLList_;
}
void RecognizeActionRequest::setURLList(const std::vector<URLList>& uRLList)
{
uRLList_ = uRLList;
for(int dep1 = 0; dep1!= uRLList.size(); dep1++) {
auto uRLListObj = uRLList.at(dep1);
std::string uRLListObjStr = "URLList." + std::to_string(dep1 + 1);
setParameter(uRLListObjStr + ".URL", uRLListObj.uRL);
}
}
int RecognizeActionRequest::getType()const
{
return type_;
}
void RecognizeActionRequest::setType(int type)
{
type_ = type;
setBodyParameter("Type", std::to_string(type));
}
std::string RecognizeActionRequest::getVideoUrl()const
{
return videoUrl_;
}
void RecognizeActionRequest::setVideoUrl(const std::string& videoUrl)
{
videoUrl_ = videoUrl;
setBodyParameter("VideoUrl", videoUrl);
}

View File

@@ -0,0 +1,73 @@
/*
* 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/facebody/model/RecognizeActionResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
RecognizeActionResult::RecognizeActionResult() :
ServiceResult()
{}
RecognizeActionResult::RecognizeActionResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
RecognizeActionResult::~RecognizeActionResult()
{}
void RecognizeActionResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto allElementsNode = dataNode["Elements"]["Element"];
for (auto dataNodeElementsElement : allElementsNode)
{
Data::Element elementObject;
if(!dataNodeElementsElement["Timestamp"].isNull())
elementObject.timestamp = std::stoi(dataNodeElementsElement["Timestamp"].asString());
auto allBoxesNode = allElementsNode["Boxes"]["BoxesItem"];
for (auto allElementsNodeBoxesBoxesItem : allBoxesNode)
{
Data::Element::BoxesItem boxesObject;
auto allBox = value["Box"]["Box"];
for (auto value : allBox)
boxesObject.box.push_back(value.asString());
elementObject.boxes.push_back(boxesObject);
}
auto allScores = value["Scores"]["Score"];
for (auto value : allScores)
elementObject.scores.push_back(value.asString());
auto allLabels = value["Labels"]["Label"];
for (auto value : allLabels)
elementObject.labels.push_back(value.asString());
data_.elements.push_back(elementObject);
}
}
RecognizeActionResult::Data RecognizeActionResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,40 @@
/*
* 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/facebody/model/RecognizeExpressionRequest.h>
using AlibabaCloud::Facebody::Model::RecognizeExpressionRequest;
RecognizeExpressionRequest::RecognizeExpressionRequest() :
RpcServiceRequest("facebody", "2019-12-30", "RecognizeExpression")
{
setMethod(HttpRequest::Method::Post);
}
RecognizeExpressionRequest::~RecognizeExpressionRequest()
{}
std::string RecognizeExpressionRequest::getImageURL()const
{
return imageURL_;
}
void RecognizeExpressionRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

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.
*/
#include <alibabacloud/facebody/model/RecognizeExpressionResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
RecognizeExpressionResult::RecognizeExpressionResult() :
ServiceResult()
{}
RecognizeExpressionResult::RecognizeExpressionResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
RecognizeExpressionResult::~RecognizeExpressionResult()
{}
void RecognizeExpressionResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto allElementsNode = dataNode["Elements"]["Element"];
for (auto dataNodeElementsElement : allElementsNode)
{
Data::Element elementObject;
if(!dataNodeElementsElement["Expression"].isNull())
elementObject.expression = dataNodeElementsElement["Expression"].asString();
if(!dataNodeElementsElement["FaceProbability"].isNull())
elementObject.faceProbability = std::stof(dataNodeElementsElement["FaceProbability"].asString());
auto faceRectangleNode = value["FaceRectangle"];
if(!faceRectangleNode["Height"].isNull())
elementObject.faceRectangle.height = std::stoi(faceRectangleNode["Height"].asString());
if(!faceRectangleNode["Left"].isNull())
elementObject.faceRectangle.left = std::stoi(faceRectangleNode["Left"].asString());
if(!faceRectangleNode["Top"].isNull())
elementObject.faceRectangle.top = std::stoi(faceRectangleNode["Top"].asString());
if(!faceRectangleNode["Width"].isNull())
elementObject.faceRectangle.width = std::stoi(faceRectangleNode["Width"].asString());
data_.elements.push_back(elementObject);
}
}
RecognizeExpressionResult::Data RecognizeExpressionResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/facebody/model/RecognizeFaceRequest.h>
using AlibabaCloud::Facebody::Model::RecognizeFaceRequest;
RecognizeFaceRequest::RecognizeFaceRequest() :
RpcServiceRequest("facebody", "2019-12-30", "RecognizeFace")
{
setMethod(HttpRequest::Method::Post);
}
RecognizeFaceRequest::~RecognizeFaceRequest()
{}
int RecognizeFaceRequest::getImageType()const
{
return imageType_;
}
void RecognizeFaceRequest::setImageType(int imageType)
{
imageType_ = imageType;
setBodyParameter("ImageType", std::to_string(imageType));
}
std::string RecognizeFaceRequest::getImageURL()const
{
return imageURL_;
}
void RecognizeFaceRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,86 @@
/*
* 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/facebody/model/RecognizeFaceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
RecognizeFaceResult::RecognizeFaceResult() :
ServiceResult()
{}
RecognizeFaceResult::RecognizeFaceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
RecognizeFaceResult::~RecognizeFaceResult()
{}
void RecognizeFaceResult::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["FaceCount"].isNull())
data_.faceCount = std::stoi(dataNode["FaceCount"].asString());
if(!dataNode["LandmarkCount"].isNull())
data_.landmarkCount = std::stoi(dataNode["LandmarkCount"].asString());
if(!dataNode["DenseFeatureLength"].isNull())
data_.denseFeatureLength = std::stoi(dataNode["DenseFeatureLength"].asString());
auto allFaceRectangles = dataNode["FaceRectangles"]["FaceRectangle"];
for (auto value : allFaceRectangles)
data_.faceRectangles.push_back(value.asString());
auto allFaceProbabilityList = dataNode["FaceProbabilityList"]["FaceProbability"];
for (auto value : allFaceProbabilityList)
data_.faceProbabilityList.push_back(value.asString());
auto allPoseList = dataNode["PoseList"]["Pose"];
for (auto value : allPoseList)
data_.poseList.push_back(value.asString());
auto allLandmarks = dataNode["Landmarks"]["Landmark"];
for (auto value : allLandmarks)
data_.landmarks.push_back(value.asString());
auto allPupils = dataNode["Pupils"]["Pupil"];
for (auto value : allPupils)
data_.pupils.push_back(value.asString());
auto allGenderList = dataNode["GenderList"]["Gender"];
for (auto value : allGenderList)
data_.genderList.push_back(value.asString());
auto allAgeList = dataNode["AgeList"]["Age"];
for (auto value : allAgeList)
data_.ageList.push_back(value.asString());
auto allExpressions = dataNode["Expressions"]["Expression"];
for (auto value : allExpressions)
data_.expressions.push_back(value.asString());
auto allGlasses = dataNode["Glasses"]["Glass"];
for (auto value : allGlasses)
data_.glasses.push_back(value.asString());
auto allDenseFeatures = dataNode["DenseFeatures"]["DenseFeature"];
for (auto value : allDenseFeatures)
data_.denseFeatures.push_back(value.asString());
}
RecognizeFaceResult::Data RecognizeFaceResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,44 @@
/*
* 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/facebody/model/RecognizePublicFaceRequest.h>
using AlibabaCloud::Facebody::Model::RecognizePublicFaceRequest;
RecognizePublicFaceRequest::RecognizePublicFaceRequest() :
RpcServiceRequest("facebody", "2019-12-30", "RecognizePublicFace")
{
setMethod(HttpRequest::Method::Post);
}
RecognizePublicFaceRequest::~RecognizePublicFaceRequest()
{}
std::vector<RecognizePublicFaceRequest::Task> RecognizePublicFaceRequest::getTask()const
{
return task_;
}
void RecognizePublicFaceRequest::setTask(const std::vector<Task>& task)
{
task_ = task;
for(int dep1 = 0; dep1!= task.size(); dep1++) {
auto taskObj = task.at(dep1);
std::string taskObjStr = "Task." + std::to_string(dep1 + 1);
setParameter(taskObjStr + ".ImageURL", taskObj.imageURL);
}
}

View File

@@ -0,0 +1,98 @@
/*
* 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/facebody/model/RecognizePublicFaceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
RecognizePublicFaceResult::RecognizePublicFaceResult() :
ServiceResult()
{}
RecognizePublicFaceResult::RecognizePublicFaceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
RecognizePublicFaceResult::~RecognizePublicFaceResult()
{}
void RecognizePublicFaceResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto allElementsNode = dataNode["Elements"]["Element"];
for (auto dataNodeElementsElement : allElementsNode)
{
Data::Element elementObject;
if(!dataNodeElementsElement["TaskId"].isNull())
elementObject.taskId = dataNodeElementsElement["TaskId"].asString();
if(!dataNodeElementsElement["ImageURL"].isNull())
elementObject.imageURL = dataNodeElementsElement["ImageURL"].asString();
auto allResultsNode = allElementsNode["Results"]["Result"];
for (auto allElementsNodeResultsResult : allResultsNode)
{
Data::Element::Result resultsObject;
if(!allElementsNodeResultsResult["Label"].isNull())
resultsObject.label = allElementsNodeResultsResult["Label"].asString();
if(!allElementsNodeResultsResult["Suggestion"].isNull())
resultsObject.suggestion = allElementsNodeResultsResult["Suggestion"].asString();
if(!allElementsNodeResultsResult["Rate"].isNull())
resultsObject.rate = std::stof(allElementsNodeResultsResult["Rate"].asString());
auto allSubResultsNode = allResultsNode["SubResults"]["SubResult"];
for (auto allResultsNodeSubResultsSubResult : allSubResultsNode)
{
Data::Element::Result::SubResult subResultsObject;
if(!allResultsNodeSubResultsSubResult["H"].isNull())
subResultsObject.h = std::stof(allResultsNodeSubResultsSubResult["H"].asString());
if(!allResultsNodeSubResultsSubResult["W"].isNull())
subResultsObject.w = std::stof(allResultsNodeSubResultsSubResult["W"].asString());
if(!allResultsNodeSubResultsSubResult["X"].isNull())
subResultsObject.x = std::stof(allResultsNodeSubResultsSubResult["X"].asString());
if(!allResultsNodeSubResultsSubResult["Y"].isNull())
subResultsObject.y = std::stof(allResultsNodeSubResultsSubResult["Y"].asString());
auto allFacesNode = allSubResultsNode["Faces"]["Face"];
for (auto allSubResultsNodeFacesFace : allFacesNode)
{
Data::Element::Result::SubResult::Face facesObject;
if(!allSubResultsNodeFacesFace["Id"].isNull())
facesObject.id = allSubResultsNodeFacesFace["Id"].asString();
if(!allSubResultsNodeFacesFace["Name"].isNull())
facesObject.name = allSubResultsNodeFacesFace["Name"].asString();
if(!allSubResultsNodeFacesFace["Rate"].isNull())
facesObject.rate = std::stof(allSubResultsNodeFacesFace["Rate"].asString());
subResultsObject.faces.push_back(facesObject);
}
resultsObject.subResults.push_back(subResultsObject);
}
elementObject.results.push_back(resultsObject);
}
data_.elements.push_back(elementObject);
}
}
RecognizePublicFaceResult::Data RecognizePublicFaceResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/facebody/model/SearchFaceRequest.h>
using AlibabaCloud::Facebody::Model::SearchFaceRequest;
SearchFaceRequest::SearchFaceRequest() :
RpcServiceRequest("facebody", "2019-12-30", "SearchFace")
{
setMethod(HttpRequest::Method::Post);
}
SearchFaceRequest::~SearchFaceRequest()
{}
std::string SearchFaceRequest::getDbName()const
{
return dbName_;
}
void SearchFaceRequest::setDbName(const std::string& dbName)
{
dbName_ = dbName;
setBodyParameter("DbName", dbName);
}
std::string SearchFaceRequest::getImageUrl()const
{
return imageUrl_;
}
void SearchFaceRequest::setImageUrl(const std::string& imageUrl)
{
imageUrl_ = imageUrl;
setBodyParameter("ImageUrl", imageUrl);
}
int SearchFaceRequest::getLimit()const
{
return limit_;
}
void SearchFaceRequest::setLimit(int limit)
{
limit_ = limit;
setBodyParameter("Limit", std::to_string(limit));
}

View File

@@ -0,0 +1,79 @@
/*
* 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/facebody/model/SearchFaceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
SearchFaceResult::SearchFaceResult() :
ServiceResult()
{}
SearchFaceResult::SearchFaceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
SearchFaceResult::~SearchFaceResult()
{}
void SearchFaceResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto allMatchListNode = dataNode["MatchList"]["MatchListItem"];
for (auto dataNodeMatchListMatchListItem : allMatchListNode)
{
Data::MatchListItem matchListItemObject;
auto allFaceItemsNode = allMatchListNode["FaceItems"]["FaceItemsItem"];
for (auto allMatchListNodeFaceItemsFaceItemsItem : allFaceItemsNode)
{
Data::MatchListItem::FaceItemsItem faceItemsObject;
if(!allMatchListNodeFaceItemsFaceItemsItem["FaceId"].isNull())
faceItemsObject.faceId = allMatchListNodeFaceItemsFaceItemsItem["FaceId"].asString();
if(!allMatchListNodeFaceItemsFaceItemsItem["Score"].isNull())
faceItemsObject.score = std::stof(allMatchListNodeFaceItemsFaceItemsItem["Score"].asString());
if(!allMatchListNodeFaceItemsFaceItemsItem["ExtraData"].isNull())
faceItemsObject.extraData = allMatchListNodeFaceItemsFaceItemsItem["ExtraData"].asString();
if(!allMatchListNodeFaceItemsFaceItemsItem["EntityId"].isNull())
faceItemsObject.entityId = allMatchListNodeFaceItemsFaceItemsItem["EntityId"].asString();
matchListItemObject.faceItems.push_back(faceItemsObject);
}
auto locationNode = value["Location"];
if(!locationNode["X"].isNull())
matchListItemObject.location.x = std::stoi(locationNode["X"].asString());
if(!locationNode["Y"].isNull())
matchListItemObject.location.y = std::stoi(locationNode["Y"].asString());
if(!locationNode["Width"].isNull())
matchListItemObject.location.width = std::stoi(locationNode["Width"].asString());
if(!locationNode["Height"].isNull())
matchListItemObject.location.height = std::stoi(locationNode["Height"].asString());
data_.matchList.push_back(matchListItemObject);
}
}
SearchFaceResult::Data SearchFaceResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/facebody/model/SwapFacialFeaturesRequest.h>
using AlibabaCloud::Facebody::Model::SwapFacialFeaturesRequest;
SwapFacialFeaturesRequest::SwapFacialFeaturesRequest() :
RpcServiceRequest("facebody", "2019-12-30", "SwapFacialFeatures")
{
setMethod(HttpRequest::Method::Post);
}
SwapFacialFeaturesRequest::~SwapFacialFeaturesRequest()
{}
std::string SwapFacialFeaturesRequest::getTargetImageURL()const
{
return targetImageURL_;
}
void SwapFacialFeaturesRequest::setTargetImageURL(const std::string& targetImageURL)
{
targetImageURL_ = targetImageURL;
setBodyParameter("TargetImageURL", targetImageURL);
}
std::string SwapFacialFeaturesRequest::getSourceImageURL()const
{
return sourceImageURL_;
}
void SwapFacialFeaturesRequest::setSourceImageURL(const std::string& sourceImageURL)
{
sourceImageURL_ = sourceImageURL;
setBodyParameter("SourceImageURL", sourceImageURL);
}
std::string SwapFacialFeaturesRequest::getEditPart()const
{
return editPart_;
}
void SwapFacialFeaturesRequest::setEditPart(const std::string& editPart)
{
editPart_ = editPart;
setBodyParameter("EditPart", editPart);
}

View File

@@ -0,0 +1,52 @@
/*
* 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/facebody/model/SwapFacialFeaturesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
SwapFacialFeaturesResult::SwapFacialFeaturesResult() :
ServiceResult()
{}
SwapFacialFeaturesResult::SwapFacialFeaturesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
SwapFacialFeaturesResult::~SwapFacialFeaturesResult()
{}
void SwapFacialFeaturesResult::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["ImageURL"].isNull())
data_.imageURL = dataNode["ImageURL"].asString();
}
SwapFacialFeaturesResult::Data SwapFacialFeaturesResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/facebody/model/UpdateFaceEntityRequest.h>
using AlibabaCloud::Facebody::Model::UpdateFaceEntityRequest;
UpdateFaceEntityRequest::UpdateFaceEntityRequest() :
RpcServiceRequest("facebody", "2019-12-30", "UpdateFaceEntity")
{
setMethod(HttpRequest::Method::Post);
}
UpdateFaceEntityRequest::~UpdateFaceEntityRequest()
{}
std::string UpdateFaceEntityRequest::getEntityId()const
{
return entityId_;
}
void UpdateFaceEntityRequest::setEntityId(const std::string& entityId)
{
entityId_ = entityId;
setBodyParameter("EntityId", entityId);
}
std::string UpdateFaceEntityRequest::getLabels()const
{
return labels_;
}
void UpdateFaceEntityRequest::setLabels(const std::string& labels)
{
labels_ = labels;
setBodyParameter("Labels", labels);
}
std::string UpdateFaceEntityRequest::getDbName()const
{
return dbName_;
}
void UpdateFaceEntityRequest::setDbName(const std::string& dbName)
{
dbName_ = dbName;
setBodyParameter("DbName", dbName);
}

View File

@@ -0,0 +1,44 @@
/*
* 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/facebody/model/UpdateFaceEntityResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
UpdateFaceEntityResult::UpdateFaceEntityResult() :
ServiceResult()
{}
UpdateFaceEntityResult::UpdateFaceEntityResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UpdateFaceEntityResult::~UpdateFaceEntityResult()
{}
void UpdateFaceEntityResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/facebody/model/VerifyFaceMaskRequest.h>
using AlibabaCloud::Facebody::Model::VerifyFaceMaskRequest;
VerifyFaceMaskRequest::VerifyFaceMaskRequest() :
RpcServiceRequest("facebody", "2019-12-30", "VerifyFaceMask")
{
setMethod(HttpRequest::Method::Post);
}
VerifyFaceMaskRequest::~VerifyFaceMaskRequest()
{}
std::string VerifyFaceMaskRequest::getImageURL()const
{
return imageURL_;
}
void VerifyFaceMaskRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}
std::string VerifyFaceMaskRequest::getRefUrl()const
{
return refUrl_;
}
void VerifyFaceMaskRequest::setRefUrl(const std::string& refUrl)
{
refUrl_ = refUrl;
setBodyParameter("RefUrl", refUrl);
}

View File

@@ -0,0 +1,65 @@
/*
* 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/facebody/model/VerifyFaceMaskResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
VerifyFaceMaskResult::VerifyFaceMaskResult() :
ServiceResult()
{}
VerifyFaceMaskResult::VerifyFaceMaskResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
VerifyFaceMaskResult::~VerifyFaceMaskResult()
{}
void VerifyFaceMaskResult::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["Confidence"].isNull())
data_.confidence = std::stof(dataNode["Confidence"].asString());
if(!dataNode["Mask"].isNull())
data_.mask = std::stoi(dataNode["Mask"].asString());
if(!dataNode["MaskRef"].isNull())
data_.maskRef = std::stoi(dataNode["MaskRef"].asString());
auto allRectangle = dataNode["Rectangle"]["Rectangle"];
for (auto value : allRectangle)
data_.rectangle.push_back(value.asString());
auto allRectangleRef = dataNode["RectangleRef"]["RectangleRef"];
for (auto value : allRectangleRef)
data_.rectangleRef.push_back(value.asString());
auto allThresholds = dataNode["Thresholds"]["Thresholds"];
for (auto value : allThresholds)
data_.thresholds.push_back(value.asString());
}
VerifyFaceMaskResult::Data VerifyFaceMaskResult::getData()const
{
return data_;
}