Add face quality detection API.

This commit is contained in:
sdk-team
2020-06-23 18:10:55 +08:00
parent def35a6602
commit c9ae7d0b7e
13 changed files with 608 additions and 1 deletions

View File

@@ -0,0 +1,84 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/vcs/model/DeleteRecordsRequest.h>
using AlibabaCloud::Vcs::Model::DeleteRecordsRequest;
DeleteRecordsRequest::DeleteRecordsRequest() :
RpcServiceRequest("vcs", "2020-05-15", "DeleteRecords")
{
setMethod(HttpRequest::Method::Post);
}
DeleteRecordsRequest::~DeleteRecordsRequest()
{}
std::string DeleteRecordsRequest::getAlgorithmType()const
{
return algorithmType_;
}
void DeleteRecordsRequest::setAlgorithmType(const std::string& algorithmType)
{
algorithmType_ = algorithmType;
setBodyParameter("AlgorithmType", algorithmType);
}
std::string DeleteRecordsRequest::getCorpId()const
{
return corpId_;
}
void DeleteRecordsRequest::setCorpId(const std::string& corpId)
{
corpId_ = corpId;
setBodyParameter("CorpId", corpId);
}
std::string DeleteRecordsRequest::getAttributeName()const
{
return attributeName_;
}
void DeleteRecordsRequest::setAttributeName(const std::string& attributeName)
{
attributeName_ = attributeName;
setBodyParameter("AttributeName", attributeName);
}
std::string DeleteRecordsRequest::getOperatorType()const
{
return operatorType_;
}
void DeleteRecordsRequest::setOperatorType(const std::string& operatorType)
{
operatorType_ = operatorType;
setBodyParameter("OperatorType", operatorType);
}
std::string DeleteRecordsRequest::getValue()const
{
return value_;
}
void DeleteRecordsRequest::setValue(const std::string& value)
{
value_ = value;
setBodyParameter("Value", value);
}

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/vcs/model/DeleteRecordsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Vcs;
using namespace AlibabaCloud::Vcs::Model;
DeleteRecordsResult::DeleteRecordsResult() :
ServiceResult()
{}
DeleteRecordsResult::DeleteRecordsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteRecordsResult::~DeleteRecordsResult()
{}
void DeleteRecordsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Data"].isNull())
data_ = value["Data"].asString();
}
std::string DeleteRecordsResult::getMessage()const
{
return message_;
}
std::string DeleteRecordsResult::getData()const
{
return data_;
}
std::string DeleteRecordsResult::getCode()const
{
return code_;
}

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/vcs/model/RecognizeFaceQualityRequest.h>
using AlibabaCloud::Vcs::Model::RecognizeFaceQualityRequest;
RecognizeFaceQualityRequest::RecognizeFaceQualityRequest() :
RpcServiceRequest("vcs", "2020-05-15", "RecognizeFaceQuality")
{
setMethod(HttpRequest::Method::Post);
}
RecognizeFaceQualityRequest::~RecognizeFaceQualityRequest()
{}
std::string RecognizeFaceQualityRequest::getCorpId()const
{
return corpId_;
}
void RecognizeFaceQualityRequest::setCorpId(const std::string& corpId)
{
corpId_ = corpId;
setBodyParameter("CorpId", corpId);
}
std::string RecognizeFaceQualityRequest::getPicContent()const
{
return picContent_;
}
void RecognizeFaceQualityRequest::setPicContent(const std::string& picContent)
{
picContent_ = picContent;
setBodyParameter("PicContent", picContent);
}
std::string RecognizeFaceQualityRequest::getPicFormat()const
{
return picFormat_;
}
void RecognizeFaceQualityRequest::setPicFormat(const std::string& picFormat)
{
picFormat_ = picFormat;
setBodyParameter("PicFormat", picFormat);
}

View File

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