Release AddQualityScore.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
2021-10-21 Version: 1.36.904
|
||||
- Release AddQualityScore.
|
||||
|
||||
2021-10-21 Version: 1.36.903
|
||||
- Generated 2020-05-18 for `dataworks-public`.
|
||||
|
||||
|
||||
@@ -35,18 +35,23 @@ namespace AlibabaCloud
|
||||
struct Data
|
||||
{
|
||||
std::string faceId;
|
||||
float qualitieScore;
|
||||
};
|
||||
|
||||
|
||||
AddFaceResult();
|
||||
explicit AddFaceResult(const std::string &payload);
|
||||
~AddFaceResult();
|
||||
std::string getMessage()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ namespace AlibabaCloud
|
||||
struct InsertedFacesItem
|
||||
{
|
||||
std::string faceId;
|
||||
float qualitieScore;
|
||||
std::string imageURL;
|
||||
};
|
||||
struct FailedFacesItem
|
||||
|
||||
@@ -35,14 +35,41 @@ namespace AlibabaCloud
|
||||
RecognizeFaceRequest();
|
||||
~RecognizeFaceRequest();
|
||||
|
||||
bool getGender()const;
|
||||
void setGender(bool gender);
|
||||
bool getBeauty()const;
|
||||
void setBeauty(bool beauty);
|
||||
long getMaxFaceNumber()const;
|
||||
void setMaxFaceNumber(long maxFaceNumber);
|
||||
bool getHat()const;
|
||||
void setHat(bool hat);
|
||||
bool getMask()const;
|
||||
void setMask(bool mask);
|
||||
int getImageType()const;
|
||||
void setImageType(int imageType);
|
||||
bool getGlass()const;
|
||||
void setGlass(bool glass);
|
||||
bool getExpression()const;
|
||||
void setExpression(bool expression);
|
||||
bool getQuality()const;
|
||||
void setQuality(bool quality);
|
||||
std::string getImageURL()const;
|
||||
void setImageURL(const std::string& imageURL);
|
||||
bool getAge()const;
|
||||
void setAge(bool age);
|
||||
|
||||
private:
|
||||
bool gender_;
|
||||
bool beauty_;
|
||||
long maxFaceNumber_;
|
||||
bool hat_;
|
||||
bool mask_;
|
||||
int imageType_;
|
||||
bool glass_;
|
||||
bool expression_;
|
||||
bool quality_;
|
||||
std::string imageURL_;
|
||||
bool age_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -68,12 +68,16 @@ namespace AlibabaCloud
|
||||
RecognizeFaceResult();
|
||||
explicit RecognizeFaceResult(const std::string &payload);
|
||||
~RecognizeFaceResult();
|
||||
std::string getMessage()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -53,6 +53,7 @@ namespace AlibabaCloud
|
||||
std::string extraData;
|
||||
};
|
||||
std::vector<MatchListItem::FaceItemsItem> faceItems;
|
||||
float qualitieScore;
|
||||
Location location;
|
||||
};
|
||||
std::vector<MatchListItem> matchList;
|
||||
@@ -62,12 +63,16 @@ namespace AlibabaCloud
|
||||
SearchFaceResult();
|
||||
explicit SearchFaceResult(const std::string &payload);
|
||||
~SearchFaceResult();
|
||||
std::string getMessage()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -31,21 +31,21 @@ FacebodyClient::FacebodyClient(const Credentials &credentials, const ClientConfi
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "facebody");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
}
|
||||
|
||||
FacebodyClient::FacebodyClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "facebody");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
}
|
||||
|
||||
FacebodyClient::FacebodyClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "facebody");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
}
|
||||
|
||||
FacebodyClient::~FacebodyClient()
|
||||
|
||||
@@ -42,11 +42,27 @@ void AddFaceResult::parse(const std::string &payload)
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["FaceId"].isNull())
|
||||
data_.faceId = dataNode["FaceId"].asString();
|
||||
if(!dataNode["QualitieScore"].isNull())
|
||||
data_.qualitieScore = std::stof(dataNode["QualitieScore"].asString());
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string AddFaceResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
AddFaceResult::Data AddFaceResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string AddFaceResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +48,8 @@ void BatchAddFacesResult::parse(const std::string &payload)
|
||||
insertedFacesItemObject.imageURL = dataNodeInsertedFacesinsertedFacesItem["ImageURL"].asString();
|
||||
if(!dataNodeInsertedFacesinsertedFacesItem["FaceId"].isNull())
|
||||
insertedFacesItemObject.faceId = dataNodeInsertedFacesinsertedFacesItem["FaceId"].asString();
|
||||
if(!dataNodeInsertedFacesinsertedFacesItem["QualitieScore"].isNull())
|
||||
insertedFacesItemObject.qualitieScore = std::stof(dataNodeInsertedFacesinsertedFacesItem["QualitieScore"].asString());
|
||||
data_.insertedFaces.push_back(insertedFacesItemObject);
|
||||
}
|
||||
auto allFailedFacesNode = dataNode["FailedFaces"]["failedFacesItem"];
|
||||
|
||||
@@ -27,6 +27,61 @@ RecognizeFaceRequest::RecognizeFaceRequest() :
|
||||
RecognizeFaceRequest::~RecognizeFaceRequest()
|
||||
{}
|
||||
|
||||
bool RecognizeFaceRequest::getGender()const
|
||||
{
|
||||
return gender_;
|
||||
}
|
||||
|
||||
void RecognizeFaceRequest::setGender(bool gender)
|
||||
{
|
||||
gender_ = gender;
|
||||
setBodyParameter("Gender", gender ? "true" : "false");
|
||||
}
|
||||
|
||||
bool RecognizeFaceRequest::getBeauty()const
|
||||
{
|
||||
return beauty_;
|
||||
}
|
||||
|
||||
void RecognizeFaceRequest::setBeauty(bool beauty)
|
||||
{
|
||||
beauty_ = beauty;
|
||||
setBodyParameter("Beauty", beauty ? "true" : "false");
|
||||
}
|
||||
|
||||
long RecognizeFaceRequest::getMaxFaceNumber()const
|
||||
{
|
||||
return maxFaceNumber_;
|
||||
}
|
||||
|
||||
void RecognizeFaceRequest::setMaxFaceNumber(long maxFaceNumber)
|
||||
{
|
||||
maxFaceNumber_ = maxFaceNumber;
|
||||
setBodyParameter("MaxFaceNumber", std::to_string(maxFaceNumber));
|
||||
}
|
||||
|
||||
bool RecognizeFaceRequest::getHat()const
|
||||
{
|
||||
return hat_;
|
||||
}
|
||||
|
||||
void RecognizeFaceRequest::setHat(bool hat)
|
||||
{
|
||||
hat_ = hat;
|
||||
setBodyParameter("Hat", hat ? "true" : "false");
|
||||
}
|
||||
|
||||
bool RecognizeFaceRequest::getMask()const
|
||||
{
|
||||
return mask_;
|
||||
}
|
||||
|
||||
void RecognizeFaceRequest::setMask(bool mask)
|
||||
{
|
||||
mask_ = mask;
|
||||
setBodyParameter("Mask", mask ? "true" : "false");
|
||||
}
|
||||
|
||||
int RecognizeFaceRequest::getImageType()const
|
||||
{
|
||||
return imageType_;
|
||||
@@ -38,6 +93,39 @@ void RecognizeFaceRequest::setImageType(int imageType)
|
||||
setBodyParameter("ImageType", std::to_string(imageType));
|
||||
}
|
||||
|
||||
bool RecognizeFaceRequest::getGlass()const
|
||||
{
|
||||
return glass_;
|
||||
}
|
||||
|
||||
void RecognizeFaceRequest::setGlass(bool glass)
|
||||
{
|
||||
glass_ = glass;
|
||||
setBodyParameter("Glass", glass ? "true" : "false");
|
||||
}
|
||||
|
||||
bool RecognizeFaceRequest::getExpression()const
|
||||
{
|
||||
return expression_;
|
||||
}
|
||||
|
||||
void RecognizeFaceRequest::setExpression(bool expression)
|
||||
{
|
||||
expression_ = expression;
|
||||
setBodyParameter("Expression", expression ? "true" : "false");
|
||||
}
|
||||
|
||||
bool RecognizeFaceRequest::getQuality()const
|
||||
{
|
||||
return quality_;
|
||||
}
|
||||
|
||||
void RecognizeFaceRequest::setQuality(bool quality)
|
||||
{
|
||||
quality_ = quality;
|
||||
setBodyParameter("Quality", quality ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string RecognizeFaceRequest::getImageURL()const
|
||||
{
|
||||
return imageURL_;
|
||||
@@ -49,3 +137,14 @@ void RecognizeFaceRequest::setImageURL(const std::string& imageURL)
|
||||
setBodyParameter("ImageURL", imageURL);
|
||||
}
|
||||
|
||||
bool RecognizeFaceRequest::getAge()const
|
||||
{
|
||||
return age_;
|
||||
}
|
||||
|
||||
void RecognizeFaceRequest::setAge(bool age)
|
||||
{
|
||||
age_ = age;
|
||||
setBodyParameter("Age", age ? "true" : "false");
|
||||
}
|
||||
|
||||
|
||||
@@ -110,11 +110,25 @@ void RecognizeFaceResult::parse(const std::string &payload)
|
||||
auto allMasks = dataNode["Masks"]["Mask"];
|
||||
for (auto value : allMasks)
|
||||
data_.masks.push_back(value.asString());
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string RecognizeFaceResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
RecognizeFaceResult::Data RecognizeFaceResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string RecognizeFaceResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,8 @@ void SearchFaceResult::parse(const std::string &payload)
|
||||
for (auto dataNodeMatchListMatchListItem : allMatchListNode)
|
||||
{
|
||||
Data::MatchListItem matchListItemObject;
|
||||
if(!dataNodeMatchListMatchListItem["QualitieScore"].isNull())
|
||||
matchListItemObject.qualitieScore = std::stof(dataNodeMatchListMatchListItem["QualitieScore"].asString());
|
||||
auto allFaceItemsNode = dataNodeMatchListMatchListItem["FaceItems"]["FaceItemsItem"];
|
||||
for (auto dataNodeMatchListMatchListItemFaceItemsFaceItemsItem : allFaceItemsNode)
|
||||
{
|
||||
@@ -73,11 +75,25 @@ void SearchFaceResult::parse(const std::string &payload)
|
||||
matchListItemObject.location.x = std::stoi(locationNode["X"].asString());
|
||||
data_.matchList.push_back(matchListItemObject);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string SearchFaceResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
SearchFaceResult::Data SearchFaceResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string SearchFaceResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user