Generated 2020-10-29 for reid_cloud.
This commit is contained in:
@@ -31,21 +31,21 @@ Reid_cloudClient::Reid_cloudClient(const Credentials &credentials, const ClientC
|
||||
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, "1.1.9");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "1.2.0");
|
||||
}
|
||||
|
||||
Reid_cloudClient::Reid_cloudClient(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, "1.1.9");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "1.2.0");
|
||||
}
|
||||
|
||||
Reid_cloudClient::Reid_cloudClient(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, "1.1.9");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "1.2.0");
|
||||
}
|
||||
|
||||
Reid_cloudClient::~Reid_cloudClient()
|
||||
@@ -627,6 +627,42 @@ Reid_cloudClient::ListPersonByImageOutcomeCallable Reid_cloudClient::listPersonB
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Reid_cloudClient::ListSpecialPersonnelByImageOutcome Reid_cloudClient::listSpecialPersonnelByImage(const ListSpecialPersonnelByImageRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListSpecialPersonnelByImageOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListSpecialPersonnelByImageOutcome(ListSpecialPersonnelByImageResult(outcome.result()));
|
||||
else
|
||||
return ListSpecialPersonnelByImageOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Reid_cloudClient::listSpecialPersonnelByImageAsync(const ListSpecialPersonnelByImageRequest& request, const ListSpecialPersonnelByImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listSpecialPersonnelByImage(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Reid_cloudClient::ListSpecialPersonnelByImageOutcomeCallable Reid_cloudClient::listSpecialPersonnelByImageCallable(const ListSpecialPersonnelByImageRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListSpecialPersonnelByImageOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listSpecialPersonnelByImage(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Reid_cloudClient::ListStoreOutcome Reid_cloudClient::listStore(const ListStoreRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -60,6 +60,17 @@ void ImportSpecialPersonnelRequest::setExternalId(const std::string& externalId)
|
||||
setBodyParameter("ExternalId", externalId);
|
||||
}
|
||||
|
||||
long ImportSpecialPersonnelRequest::getSource()const
|
||||
{
|
||||
return source_;
|
||||
}
|
||||
|
||||
void ImportSpecialPersonnelRequest::setSource(long source)
|
||||
{
|
||||
source_ = source;
|
||||
setBodyParameter("Source", std::to_string(source));
|
||||
}
|
||||
|
||||
std::string ImportSpecialPersonnelRequest::getPersonType()const
|
||||
{
|
||||
return personType_;
|
||||
|
||||
@@ -43,26 +43,26 @@ void ImportSpecialPersonnelResult::parse(const std::string &payload)
|
||||
for (auto valueSpecialPersonnelMapsSpecialPersonnelMap : allSpecialPersonnelMapsNode)
|
||||
{
|
||||
SpecialPersonnelMap specialPersonnelMapsObject;
|
||||
if(!valueSpecialPersonnelMapsSpecialPersonnelMap["UkId"].isNull())
|
||||
specialPersonnelMapsObject.ukId = std::stol(valueSpecialPersonnelMapsSpecialPersonnelMap["UkId"].asString());
|
||||
if(!valueSpecialPersonnelMapsSpecialPersonnelMap["StoreId"].isNull())
|
||||
specialPersonnelMapsObject.storeId = std::stol(valueSpecialPersonnelMapsSpecialPersonnelMap["StoreId"].asString());
|
||||
if(!valueSpecialPersonnelMapsSpecialPersonnelMap["UkId"].isNull())
|
||||
specialPersonnelMapsObject.ukId = std::stol(valueSpecialPersonnelMapsSpecialPersonnelMap["UkId"].asString());
|
||||
specialPersonnelMaps_.push_back(specialPersonnelMapsObject);
|
||||
}
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["DynamicCode"].isNull())
|
||||
dynamicCode_ = value["DynamicCode"].asString();
|
||||
if(!value["DynamicMessage"].isNull())
|
||||
dynamicMessage_ = value["DynamicMessage"].asString();
|
||||
if(!value["ErrorCode"].isNull())
|
||||
errorCode_ = value["ErrorCode"].asString();
|
||||
if(!value["ErrorMessage"].isNull())
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["DynamicCode"].isNull())
|
||||
dynamicCode_ = value["DynamicCode"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["DynamicMessage"].isNull())
|
||||
dynamicMessage_ = value["DynamicMessage"].asString();
|
||||
|
||||
}
|
||||
|
||||
@@ -76,16 +76,16 @@ std::string ImportSpecialPersonnelResult::getDynamicCode()const
|
||||
return dynamicCode_;
|
||||
}
|
||||
|
||||
std::string ImportSpecialPersonnelResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
std::string ImportSpecialPersonnelResult::getDynamicMessage()const
|
||||
{
|
||||
return dynamicMessage_;
|
||||
}
|
||||
|
||||
std::string ImportSpecialPersonnelResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
std::string ImportSpecialPersonnelResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
|
||||
73
reid_cloud/src/model/ListSpecialPersonnelByImageRequest.cc
Normal file
73
reid_cloud/src/model/ListSpecialPersonnelByImageRequest.cc
Normal 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/reid_cloud/model/ListSpecialPersonnelByImageRequest.h>
|
||||
|
||||
using AlibabaCloud::Reid_cloud::Model::ListSpecialPersonnelByImageRequest;
|
||||
|
||||
ListSpecialPersonnelByImageRequest::ListSpecialPersonnelByImageRequest() :
|
||||
RpcServiceRequest("reid_cloud", "2020-10-29", "ListSpecialPersonnelByImage")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListSpecialPersonnelByImageRequest::~ListSpecialPersonnelByImageRequest()
|
||||
{}
|
||||
|
||||
long ListSpecialPersonnelByImageRequest::getSource()const
|
||||
{
|
||||
return source_;
|
||||
}
|
||||
|
||||
void ListSpecialPersonnelByImageRequest::setSource(long source)
|
||||
{
|
||||
source_ = source;
|
||||
setBodyParameter("Source", std::to_string(source));
|
||||
}
|
||||
|
||||
long ListSpecialPersonnelByImageRequest::getStoreId()const
|
||||
{
|
||||
return storeId_;
|
||||
}
|
||||
|
||||
void ListSpecialPersonnelByImageRequest::setStoreId(long storeId)
|
||||
{
|
||||
storeId_ = storeId;
|
||||
setBodyParameter("StoreId", std::to_string(storeId));
|
||||
}
|
||||
|
||||
std::string ListSpecialPersonnelByImageRequest::getPersonType()const
|
||||
{
|
||||
return personType_;
|
||||
}
|
||||
|
||||
void ListSpecialPersonnelByImageRequest::setPersonType(const std::string& personType)
|
||||
{
|
||||
personType_ = personType;
|
||||
setBodyParameter("PersonType", personType);
|
||||
}
|
||||
|
||||
std::string ListSpecialPersonnelByImageRequest::getImageUrl()const
|
||||
{
|
||||
return imageUrl_;
|
||||
}
|
||||
|
||||
void ListSpecialPersonnelByImageRequest::setImageUrl(const std::string& imageUrl)
|
||||
{
|
||||
imageUrl_ = imageUrl;
|
||||
setBodyParameter("ImageUrl", imageUrl);
|
||||
}
|
||||
|
||||
108
reid_cloud/src/model/ListSpecialPersonnelByImageResult.cc
Normal file
108
reid_cloud/src/model/ListSpecialPersonnelByImageResult.cc
Normal file
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
* 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/reid_cloud/model/ListSpecialPersonnelByImageResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Reid_cloud;
|
||||
using namespace AlibabaCloud::Reid_cloud::Model;
|
||||
|
||||
ListSpecialPersonnelByImageResult::ListSpecialPersonnelByImageResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListSpecialPersonnelByImageResult::ListSpecialPersonnelByImageResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListSpecialPersonnelByImageResult::~ListSpecialPersonnelByImageResult()
|
||||
{}
|
||||
|
||||
void ListSpecialPersonnelByImageResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allListPersonResultItemsNode = value["ListPersonResultItems"]["ListPersonResultItem"];
|
||||
for (auto valueListPersonResultItemsListPersonResultItem : allListPersonResultItemsNode)
|
||||
{
|
||||
ListPersonResultItem listPersonResultItemsObject;
|
||||
if(!valueListPersonResultItemsListPersonResultItem["Score"].isNull())
|
||||
listPersonResultItemsObject.score = std::stof(valueListPersonResultItemsListPersonResultItem["Score"].asString());
|
||||
if(!valueListPersonResultItemsListPersonResultItem["UkId"].isNull())
|
||||
listPersonResultItemsObject.ukId = std::stol(valueListPersonResultItemsListPersonResultItem["UkId"].asString());
|
||||
listPersonResultItems_.push_back(listPersonResultItemsObject);
|
||||
}
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["DynamicCode"].isNull())
|
||||
dynamicCode_ = value["DynamicCode"].asString();
|
||||
if(!value["DynamicMessage"].isNull())
|
||||
dynamicMessage_ = value["DynamicMessage"].asString();
|
||||
if(!value["ErrorCode"].isNull())
|
||||
errorCode_ = value["ErrorCode"].asString();
|
||||
if(!value["ErrorMessage"].isNull())
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
std::string ListSpecialPersonnelByImageResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string ListSpecialPersonnelByImageResult::getDynamicCode()const
|
||||
{
|
||||
return dynamicCode_;
|
||||
}
|
||||
|
||||
std::string ListSpecialPersonnelByImageResult::getDynamicMessage()const
|
||||
{
|
||||
return dynamicMessage_;
|
||||
}
|
||||
|
||||
std::string ListSpecialPersonnelByImageResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
std::vector<ListSpecialPersonnelByImageResult::ListPersonResultItem> ListSpecialPersonnelByImageResult::getListPersonResultItems()const
|
||||
{
|
||||
return listPersonResultItems_;
|
||||
}
|
||||
|
||||
std::string ListSpecialPersonnelByImageResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
std::string ListSpecialPersonnelByImageResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool ListSpecialPersonnelByImageResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user