Add SourceId for SearchFace.

This commit is contained in:
sdk-team
2020-07-22 21:04:30 +08:00
parent 0cb799a37d
commit 70d2fb850d
4 changed files with 10 additions and 4 deletions

View File

@@ -1,3 +1,6 @@
2020-07-22 Version: 1.36.527
- Add SourceId for SearchFace.
2020-07-22 Version: 1.36.526
- Add source id for file uploader.

View File

@@ -1 +1 @@
1.36.526
1.36.527

View File

@@ -36,12 +36,13 @@ namespace AlibabaCloud
{
struct Record
{
std::string targetImageUrl;
std::string matchSuggestion;
std::string targetImageUrl;
float score;
float rightBottomX;
float rightBottomY;
std::string gbId;
std::string sourceId;
std::string imageUrl;
float leftTopY;
float leftTopX;

View File

@@ -60,6 +60,8 @@ void SearchFaceResult::parse(const std::string &payload)
recordObject.leftTopX = std::stof(dataNodeRecordsRecord["LeftTopX"].asString());
if(!dataNodeRecordsRecord["LeftTopY"].isNull())
recordObject.leftTopY = std::stof(dataNodeRecordsRecord["LeftTopY"].asString());
if(!dataNodeRecordsRecord["MatchSuggestion"].isNull())
recordObject.matchSuggestion = dataNodeRecordsRecord["MatchSuggestion"].asString();
if(!dataNodeRecordsRecord["RightBottomX"].isNull())
recordObject.rightBottomX = std::stof(dataNodeRecordsRecord["RightBottomX"].asString());
if(!dataNodeRecordsRecord["RightBottomY"].isNull())
@@ -68,8 +70,8 @@ void SearchFaceResult::parse(const std::string &payload)
recordObject.score = std::stof(dataNodeRecordsRecord["Score"].asString());
if(!dataNodeRecordsRecord["TargetImageUrl"].isNull())
recordObject.targetImageUrl = dataNodeRecordsRecord["TargetImageUrl"].asString();
if(!dataNodeRecordsRecord["MatchSuggestion"].isNull())
recordObject.matchSuggestion = dataNodeRecordsRecord["MatchSuggestion"].asString();
if(!dataNodeRecordsRecord["SourceId"].isNull())
recordObject.sourceId = dataNodeRecordsRecord["SourceId"].asString();
data_.records.push_back(recordObject);
}
if(!value["Code"].isNull())