About 2019-03-07 and 2018-09-16 Version.

This commit is contained in:
sdk-team
2020-05-13 11:27:22 +08:00
parent 6c1dbc8b06
commit f60556764e
32 changed files with 1765 additions and 8 deletions

View File

@@ -915,6 +915,114 @@ CloudauthClient::DetectFaceAttributesOutcomeCallable CloudauthClient::detectFace
return task->get_future();
}
CloudauthClient::GetMaterialsOutcome CloudauthClient::getMaterials(const GetMaterialsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetMaterialsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetMaterialsOutcome(GetMaterialsResult(outcome.result()));
else
return GetMaterialsOutcome(outcome.error());
}
void CloudauthClient::getMaterialsAsync(const GetMaterialsRequest& request, const GetMaterialsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getMaterials(request), context);
};
asyncExecute(new Runnable(fn));
}
CloudauthClient::GetMaterialsOutcomeCallable CloudauthClient::getMaterialsCallable(const GetMaterialsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetMaterialsOutcome()>>(
[this, request]()
{
return this->getMaterials(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CloudauthClient::GetStatusOutcome CloudauthClient::getStatus(const GetStatusRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetStatusOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetStatusOutcome(GetStatusResult(outcome.result()));
else
return GetStatusOutcome(outcome.error());
}
void CloudauthClient::getStatusAsync(const GetStatusRequest& request, const GetStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getStatus(request), context);
};
asyncExecute(new Runnable(fn));
}
CloudauthClient::GetStatusOutcomeCallable CloudauthClient::getStatusCallable(const GetStatusRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetStatusOutcome()>>(
[this, request]()
{
return this->getStatus(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CloudauthClient::GetVerifyTokenOutcome CloudauthClient::getVerifyToken(const GetVerifyTokenRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetVerifyTokenOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetVerifyTokenOutcome(GetVerifyTokenResult(outcome.result()));
else
return GetVerifyTokenOutcome(outcome.error());
}
void CloudauthClient::getVerifyTokenAsync(const GetVerifyTokenRequest& request, const GetVerifyTokenAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getVerifyToken(request), context);
};
asyncExecute(new Runnable(fn));
}
CloudauthClient::GetVerifyTokenOutcomeCallable CloudauthClient::getVerifyTokenCallable(const GetVerifyTokenRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetVerifyTokenOutcome()>>(
[this, request]()
{
return this->getVerifyToken(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CloudauthClient::InitDeviceOutcome CloudauthClient::initDevice(const InitDeviceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1023,6 +1131,78 @@ CloudauthClient::ModifyDeviceInfoOutcomeCallable CloudauthClient::modifyDeviceIn
return task->get_future();
}
CloudauthClient::SubmitMaterialsOutcome CloudauthClient::submitMaterials(const SubmitMaterialsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return SubmitMaterialsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return SubmitMaterialsOutcome(SubmitMaterialsResult(outcome.result()));
else
return SubmitMaterialsOutcome(outcome.error());
}
void CloudauthClient::submitMaterialsAsync(const SubmitMaterialsRequest& request, const SubmitMaterialsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, submitMaterials(request), context);
};
asyncExecute(new Runnable(fn));
}
CloudauthClient::SubmitMaterialsOutcomeCallable CloudauthClient::submitMaterialsCallable(const SubmitMaterialsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<SubmitMaterialsOutcome()>>(
[this, request]()
{
return this->submitMaterials(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CloudauthClient::SubmitVerificationOutcome CloudauthClient::submitVerification(const SubmitVerificationRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return SubmitVerificationOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return SubmitVerificationOutcome(SubmitVerificationResult(outcome.result()));
else
return SubmitVerificationOutcome(outcome.error());
}
void CloudauthClient::submitVerificationAsync(const SubmitVerificationRequest& request, const SubmitVerificationAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, submitVerification(request), context);
};
asyncExecute(new Runnable(fn));
}
CloudauthClient::SubmitVerificationOutcomeCallable CloudauthClient::submitVerificationCallable(const SubmitVerificationRequest &request) const
{
auto task = std::make_shared<std::packaged_task<SubmitVerificationOutcome()>>(
[this, request]()
{
return this->submitVerification(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CloudauthClient::UpdateAppPackageOutcome CloudauthClient::updateAppPackage(const UpdateAppPackageRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Cloudauth::Model::CompareFacesRequest;
CompareFacesRequest::CompareFacesRequest() :
RpcServiceRequest("cloudauth", "2019-03-07", "CompareFaces")
RpcServiceRequest("cloudauth", "2018-09-16", "CompareFaces")
{
setMethod(HttpRequest::Method::Post);
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Cloudauth::Model::CreateAuthKeyRequest;
CreateAuthKeyRequest::CreateAuthKeyRequest() :
RpcServiceRequest("cloudauth", "2019-03-07", "CreateAuthKey")
RpcServiceRequest("cloudauth", "2018-09-16", "CreateAuthKey")
{
setMethod(HttpRequest::Method::Post);
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Cloudauth::Model::CreateVerifySDKRequest;
CreateVerifySDKRequest::CreateVerifySDKRequest() :
RpcServiceRequest("cloudauth", "2019-03-07", "CreateVerifySDK")
RpcServiceRequest("cloudauth", "2018-09-16", "CreateVerifySDK")
{
setMethod(HttpRequest::Method::Post);
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Cloudauth::Model::DescribeDeviceInfoRequest;
DescribeDeviceInfoRequest::DescribeDeviceInfoRequest() :
RpcServiceRequest("cloudauth", "2019-03-07", "DescribeDeviceInfo")
RpcServiceRequest("cloudauth", "2018-09-16", "DescribeDeviceInfo")
{
setMethod(HttpRequest::Method::Post);
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Cloudauth::Model::DescribeVerifySDKRequest;
DescribeVerifySDKRequest::DescribeVerifySDKRequest() :
RpcServiceRequest("cloudauth", "2019-03-07", "DescribeVerifySDK")
RpcServiceRequest("cloudauth", "2018-09-16", "DescribeVerifySDK")
{
setMethod(HttpRequest::Method::Post);
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Cloudauth::Model::DetectFaceAttributesRequest;
DetectFaceAttributesRequest::DetectFaceAttributesRequest() :
RpcServiceRequest("cloudauth", "2019-03-07", "DetectFaceAttributes")
RpcServiceRequest("cloudauth", "2018-09-16", "DetectFaceAttributes")
{
setMethod(HttpRequest::Method::Post);
}

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/cloudauth/model/GetMaterialsRequest.h>
using AlibabaCloud::Cloudauth::Model::GetMaterialsRequest;
GetMaterialsRequest::GetMaterialsRequest() :
RpcServiceRequest("cloudauth", "2018-09-16", "GetMaterials")
{
setMethod(HttpRequest::Method::Post);
}
GetMaterialsRequest::~GetMaterialsRequest()
{}
long GetMaterialsRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void GetMaterialsRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string GetMaterialsRequest::getBiz()const
{
return biz_;
}
void GetMaterialsRequest::setBiz(const std::string& biz)
{
biz_ = biz;
setParameter("Biz", biz);
}
std::string GetMaterialsRequest::getSourceIp()const
{
return sourceIp_;
}
void GetMaterialsRequest::setSourceIp(const std::string& sourceIp)
{
sourceIp_ = sourceIp;
setParameter("SourceIp", sourceIp);
}
std::string GetMaterialsRequest::getTicketId()const
{
return ticketId_;
}
void GetMaterialsRequest::setTicketId(const std::string& ticketId)
{
ticketId_ = ticketId;
setParameter("TicketId", ticketId);
}

View File

@@ -0,0 +1,95 @@
/*
* 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/cloudauth/model/GetMaterialsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cloudauth;
using namespace AlibabaCloud::Cloudauth::Model;
GetMaterialsResult::GetMaterialsResult() :
ServiceResult()
{}
GetMaterialsResult::GetMaterialsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetMaterialsResult::~GetMaterialsResult()
{}
void GetMaterialsResult::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["Name"].isNull())
data_.name = dataNode["Name"].asString();
if(!dataNode["IdentificationNumber"].isNull())
data_.identificationNumber = dataNode["IdentificationNumber"].asString();
if(!dataNode["IdCardType"].isNull())
data_.idCardType = dataNode["IdCardType"].asString();
if(!dataNode["IdCardStartDate"].isNull())
data_.idCardStartDate = dataNode["IdCardStartDate"].asString();
if(!dataNode["IdCardExpiry"].isNull())
data_.idCardExpiry = dataNode["IdCardExpiry"].asString();
if(!dataNode["Address"].isNull())
data_.address = dataNode["Address"].asString();
if(!dataNode["Sex"].isNull())
data_.sex = dataNode["Sex"].asString();
if(!dataNode["IdCardFrontPic"].isNull())
data_.idCardFrontPic = dataNode["IdCardFrontPic"].asString();
if(!dataNode["IdCardBackPic"].isNull())
data_.idCardBackPic = dataNode["IdCardBackPic"].asString();
if(!dataNode["FacePic"].isNull())
data_.facePic = dataNode["FacePic"].asString();
if(!dataNode["EthnicGroup"].isNull())
data_.ethnicGroup = dataNode["EthnicGroup"].asString();
if(!dataNode["Authority"].isNull())
data_.authority = dataNode["Authority"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string GetMaterialsResult::getMessage()const
{
return message_;
}
GetMaterialsResult::Data GetMaterialsResult::getData()const
{
return data_;
}
std::string GetMaterialsResult::getCode()const
{
return code_;
}
bool GetMaterialsResult::getSuccess()const
{
return success_;
}

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/cloudauth/model/GetStatusRequest.h>
using AlibabaCloud::Cloudauth::Model::GetStatusRequest;
GetStatusRequest::GetStatusRequest() :
RpcServiceRequest("cloudauth", "2018-09-16", "GetStatus")
{
setMethod(HttpRequest::Method::Post);
}
GetStatusRequest::~GetStatusRequest()
{}
long GetStatusRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void GetStatusRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string GetStatusRequest::getBiz()const
{
return biz_;
}
void GetStatusRequest::setBiz(const std::string& biz)
{
biz_ = biz;
setParameter("Biz", biz);
}
std::string GetStatusRequest::getSourceIp()const
{
return sourceIp_;
}
void GetStatusRequest::setSourceIp(const std::string& sourceIp)
{
sourceIp_ = sourceIp;
setParameter("SourceIp", sourceIp);
}
std::string GetStatusRequest::getTicketId()const
{
return ticketId_;
}
void GetStatusRequest::setTicketId(const std::string& ticketId)
{
ticketId_ = ticketId;
setParameter("TicketId", ticketId);
}

View File

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

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/cloudauth/model/GetVerifyTokenRequest.h>
using AlibabaCloud::Cloudauth::Model::GetVerifyTokenRequest;
GetVerifyTokenRequest::GetVerifyTokenRequest() :
RpcServiceRequest("cloudauth", "2018-09-16", "GetVerifyToken")
{
setMethod(HttpRequest::Method::Post);
}
GetVerifyTokenRequest::~GetVerifyTokenRequest()
{}
long GetVerifyTokenRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void GetVerifyTokenRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string GetVerifyTokenRequest::getBinding()const
{
return binding_;
}
void GetVerifyTokenRequest::setBinding(const std::string& binding)
{
binding_ = binding;
setBodyParameter("Binding", binding);
}
std::string GetVerifyTokenRequest::getVerifyConfigs()const
{
return verifyConfigs_;
}
void GetVerifyTokenRequest::setVerifyConfigs(const std::string& verifyConfigs)
{
verifyConfigs_ = verifyConfigs;
setParameter("VerifyConfigs", verifyConfigs);
}
std::string GetVerifyTokenRequest::getUserData()const
{
return userData_;
}
void GetVerifyTokenRequest::setUserData(const std::string& userData)
{
userData_ = userData;
setParameter("UserData", userData);
}
std::string GetVerifyTokenRequest::getBiz()const
{
return biz_;
}
void GetVerifyTokenRequest::setBiz(const std::string& biz)
{
biz_ = biz;
setParameter("Biz", biz);
}
std::string GetVerifyTokenRequest::getSourceIp()const
{
return sourceIp_;
}
void GetVerifyTokenRequest::setSourceIp(const std::string& sourceIp)
{
sourceIp_ = sourceIp;
setParameter("SourceIp", sourceIp);
}
std::string GetVerifyTokenRequest::getTicketId()const
{
return ticketId_;
}
void GetVerifyTokenRequest::setTicketId(const std::string& ticketId)
{
ticketId_ = ticketId;
setParameter("TicketId", ticketId);
}

View File

@@ -0,0 +1,93 @@
/*
* 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/cloudauth/model/GetVerifyTokenResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cloudauth;
using namespace AlibabaCloud::Cloudauth::Model;
GetVerifyTokenResult::GetVerifyTokenResult() :
ServiceResult()
{}
GetVerifyTokenResult::GetVerifyTokenResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetVerifyTokenResult::~GetVerifyTokenResult()
{}
void GetVerifyTokenResult::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["CloudauthPageUrl"].isNull())
data_.cloudauthPageUrl = dataNode["CloudauthPageUrl"].asString();
auto verifyTokenNode = dataNode["VerifyToken"];
if(!verifyTokenNode["Token"].isNull())
data_.verifyToken.token = verifyTokenNode["Token"].asString();
if(!verifyTokenNode["DurationSeconds"].isNull())
data_.verifyToken.durationSeconds = std::stoi(verifyTokenNode["DurationSeconds"].asString());
auto stsTokenNode = dataNode["StsToken"];
if(!stsTokenNode["AccessKeyId"].isNull())
data_.stsToken.accessKeyId = stsTokenNode["AccessKeyId"].asString();
if(!stsTokenNode["AccessKeySecret"].isNull())
data_.stsToken.accessKeySecret = stsTokenNode["AccessKeySecret"].asString();
if(!stsTokenNode["Expiration"].isNull())
data_.stsToken.expiration = stsTokenNode["Expiration"].asString();
if(!stsTokenNode["EndPoint"].isNull())
data_.stsToken.endPoint = stsTokenNode["EndPoint"].asString();
if(!stsTokenNode["BucketName"].isNull())
data_.stsToken.bucketName = stsTokenNode["BucketName"].asString();
if(!stsTokenNode["Path"].isNull())
data_.stsToken.path = stsTokenNode["Path"].asString();
if(!stsTokenNode["Token"].isNull())
data_.stsToken.token = stsTokenNode["Token"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string GetVerifyTokenResult::getMessage()const
{
return message_;
}
GetVerifyTokenResult::Data GetVerifyTokenResult::getData()const
{
return data_;
}
std::string GetVerifyTokenResult::getCode()const
{
return code_;
}
bool GetVerifyTokenResult::getSuccess()const
{
return success_;
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Cloudauth::Model::ModifyDeviceInfoRequest;
ModifyDeviceInfoRequest::ModifyDeviceInfoRequest() :
RpcServiceRequest("cloudauth", "2019-03-07", "ModifyDeviceInfo")
RpcServiceRequest("cloudauth", "2018-09-16", "ModifyDeviceInfo")
{
setMethod(HttpRequest::Method::Post);
}

View File

@@ -0,0 +1,78 @@
/*
* 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/cloudauth/model/SubmitMaterialsRequest.h>
using AlibabaCloud::Cloudauth::Model::SubmitMaterialsRequest;
SubmitMaterialsRequest::SubmitMaterialsRequest() :
RpcServiceRequest("cloudauth", "2018-09-16", "SubmitMaterials")
{
setMethod(HttpRequest::Method::Post);
}
SubmitMaterialsRequest::~SubmitMaterialsRequest()
{}
long SubmitMaterialsRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void SubmitMaterialsRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string SubmitMaterialsRequest::getVerifyToken()const
{
return verifyToken_;
}
void SubmitMaterialsRequest::setVerifyToken(const std::string& verifyToken)
{
verifyToken_ = verifyToken;
setBodyParameter("VerifyToken", verifyToken);
}
std::string SubmitMaterialsRequest::getSourceIp()const
{
return sourceIp_;
}
void SubmitMaterialsRequest::setSourceIp(const std::string& sourceIp)
{
sourceIp_ = sourceIp;
setParameter("SourceIp", sourceIp);
}
std::vector<SubmitMaterialsRequest::Material> SubmitMaterialsRequest::getMaterial()const
{
return material_;
}
void SubmitMaterialsRequest::setMaterial(const std::vector<Material>& material)
{
material_ = material;
for(int dep1 = 0; dep1!= material.size(); dep1++) {
auto materialObj = material.at(dep1);
std::string materialObjStr = "Material." + std::to_string(dep1 + 1);
setParameter(materialObjStr + ".MaterialType", materialObj.materialType);
setParameter(materialObjStr + ".Value", materialObj.value);
}
}

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/cloudauth/model/SubmitMaterialsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cloudauth;
using namespace AlibabaCloud::Cloudauth::Model;
SubmitMaterialsResult::SubmitMaterialsResult() :
ServiceResult()
{}
SubmitMaterialsResult::SubmitMaterialsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
SubmitMaterialsResult::~SubmitMaterialsResult()
{}
void SubmitMaterialsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto verifyStatusNode = dataNode["VerifyStatus"];
if(!verifyStatusNode["StatusCode"].isNull())
data_.verifyStatus.statusCode = std::stoi(verifyStatusNode["StatusCode"].asString());
if(!verifyStatusNode["TrustedScore"].isNull())
data_.verifyStatus.trustedScore = std::stof(verifyStatusNode["TrustedScore"].asString());
if(!verifyStatusNode["SimilarityScore"].isNull())
data_.verifyStatus.similarityScore = std::stof(verifyStatusNode["SimilarityScore"].asString());
if(!verifyStatusNode["AuditConclusions"].isNull())
data_.verifyStatus.auditConclusions = verifyStatusNode["AuditConclusions"].asString();
if(!verifyStatusNode["AuthorityComparisonScore"].isNull())
data_.verifyStatus.authorityComparisonScore = std::stof(verifyStatusNode["AuthorityComparisonScore"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string SubmitMaterialsResult::getMessage()const
{
return message_;
}
SubmitMaterialsResult::Data SubmitMaterialsResult::getData()const
{
return data_;
}
std::string SubmitMaterialsResult::getCode()const
{
return code_;
}
bool SubmitMaterialsResult::getSuccess()const
{
return success_;
}

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/cloudauth/model/SubmitVerificationRequest.h>
using AlibabaCloud::Cloudauth::Model::SubmitVerificationRequest;
SubmitVerificationRequest::SubmitVerificationRequest() :
RpcServiceRequest("cloudauth", "2018-09-16", "SubmitVerification")
{
setMethod(HttpRequest::Method::Post);
}
SubmitVerificationRequest::~SubmitVerificationRequest()
{}
long SubmitVerificationRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void SubmitVerificationRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string SubmitVerificationRequest::getBiz()const
{
return biz_;
}
void SubmitVerificationRequest::setBiz(const std::string& biz)
{
biz_ = biz;
setBodyParameter("Biz", biz);
}
std::string SubmitVerificationRequest::getSourceIp()const
{
return sourceIp_;
}
void SubmitVerificationRequest::setSourceIp(const std::string& sourceIp)
{
sourceIp_ = sourceIp;
setParameter("SourceIp", sourceIp);
}
std::vector<SubmitVerificationRequest::Material> SubmitVerificationRequest::getMaterial()const
{
return material_;
}
void SubmitVerificationRequest::setMaterial(const std::vector<Material>& material)
{
material_ = material;
for(int dep1 = 0; dep1!= material.size(); dep1++) {
auto materialObj = material.at(dep1);
std::string materialObjStr = "Material." + std::to_string(dep1 + 1);
setParameter(materialObjStr + ".MaterialType", materialObj.materialType);
setParameter(materialObjStr + ".Value", materialObj.value);
}
}
std::string SubmitVerificationRequest::getTicketId()const
{
return ticketId_;
}
void SubmitVerificationRequest::setTicketId(const std::string& ticketId)
{
ticketId_ = ticketId;
setBodyParameter("TicketId", ticketId);
}

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/cloudauth/model/SubmitVerificationResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cloudauth;
using namespace AlibabaCloud::Cloudauth::Model;
SubmitVerificationResult::SubmitVerificationResult() :
ServiceResult()
{}
SubmitVerificationResult::SubmitVerificationResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
SubmitVerificationResult::~SubmitVerificationResult()
{}
void SubmitVerificationResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto verifyStatusNode = dataNode["VerifyStatus"];
if(!verifyStatusNode["StatusCode"].isNull())
data_.verifyStatus.statusCode = std::stoi(verifyStatusNode["StatusCode"].asString());
if(!verifyStatusNode["TrustedScore"].isNull())
data_.verifyStatus.trustedScore = std::stof(verifyStatusNode["TrustedScore"].asString());
if(!verifyStatusNode["SimilarityScore"].isNull())
data_.verifyStatus.similarityScore = std::stof(verifyStatusNode["SimilarityScore"].asString());
if(!verifyStatusNode["AuditConclusions"].isNull())
data_.verifyStatus.auditConclusions = verifyStatusNode["AuditConclusions"].asString();
if(!verifyStatusNode["AuthorityComparisonScore"].isNull())
data_.verifyStatus.authorityComparisonScore = std::stof(verifyStatusNode["AuthorityComparisonScore"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string SubmitVerificationResult::getMessage()const
{
return message_;
}
SubmitVerificationResult::Data SubmitVerificationResult::getData()const
{
return data_;
}
std::string SubmitVerificationResult::getCode()const
{
return code_;
}
bool SubmitVerificationResult::getSuccess()const
{
return success_;
}