@@ -31,26 +31,62 @@ LinkFaceClient::LinkFaceClient(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, "");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "linkface");
|
||||
}
|
||||
|
||||
LinkFaceClient::LinkFaceClient(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, "");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "linkface");
|
||||
}
|
||||
|
||||
LinkFaceClient::LinkFaceClient(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, "");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "linkface");
|
||||
}
|
||||
|
||||
LinkFaceClient::~LinkFaceClient()
|
||||
{}
|
||||
|
||||
LinkFaceClient::QuerySyncPicScheduleOutcome LinkFaceClient::querySyncPicSchedule(const QuerySyncPicScheduleRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return QuerySyncPicScheduleOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return QuerySyncPicScheduleOutcome(QuerySyncPicScheduleResult(outcome.result()));
|
||||
else
|
||||
return QuerySyncPicScheduleOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void LinkFaceClient::querySyncPicScheduleAsync(const QuerySyncPicScheduleRequest& request, const QuerySyncPicScheduleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, querySyncPicSchedule(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
LinkFaceClient::QuerySyncPicScheduleOutcomeCallable LinkFaceClient::querySyncPicScheduleCallable(const QuerySyncPicScheduleRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<QuerySyncPicScheduleOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->querySyncPicSchedule(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
LinkFaceClient::UnlinkFaceOutcome LinkFaceClient::unlinkFace(const UnlinkFaceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -123,42 +159,6 @@ LinkFaceClient::UpdateFaceOutcomeCallable LinkFaceClient::updateFaceCallable(con
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
LinkFaceClient::QuerySyncPicScheduleOutcome LinkFaceClient::querySyncPicSchedule(const QuerySyncPicScheduleRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return QuerySyncPicScheduleOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return QuerySyncPicScheduleOutcome(QuerySyncPicScheduleResult(outcome.result()));
|
||||
else
|
||||
return QuerySyncPicScheduleOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void LinkFaceClient::querySyncPicScheduleAsync(const QuerySyncPicScheduleRequest& request, const QuerySyncPicScheduleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, querySyncPicSchedule(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
LinkFaceClient::QuerySyncPicScheduleOutcomeCallable LinkFaceClient::querySyncPicScheduleCallable(const QuerySyncPicScheduleRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<QuerySyncPicScheduleOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->querySyncPicSchedule(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
LinkFaceClient::SyncFacePicturesOutcome LinkFaceClient::syncFacePictures(const SyncFacePicturesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -231,6 +231,42 @@ LinkFaceClient::CreateGroupOutcomeCallable LinkFaceClient::createGroupCallable(c
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
LinkFaceClient::DeleteDeviceAllGroupOutcome LinkFaceClient::deleteDeviceAllGroup(const DeleteDeviceAllGroupRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DeleteDeviceAllGroupOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DeleteDeviceAllGroupOutcome(DeleteDeviceAllGroupResult(outcome.result()));
|
||||
else
|
||||
return DeleteDeviceAllGroupOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void LinkFaceClient::deleteDeviceAllGroupAsync(const DeleteDeviceAllGroupRequest& request, const DeleteDeviceAllGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, deleteDeviceAllGroup(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
LinkFaceClient::DeleteDeviceAllGroupOutcomeCallable LinkFaceClient::deleteDeviceAllGroupCallable(const DeleteDeviceAllGroupRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DeleteDeviceAllGroupOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->deleteDeviceAllGroup(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
LinkFaceClient::DeleteGroupOutcome LinkFaceClient::deleteGroup(const DeleteGroupRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -267,6 +303,42 @@ LinkFaceClient::DeleteGroupOutcomeCallable LinkFaceClient::deleteGroupCallable(c
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
LinkFaceClient::DeleteDeviceGroupOutcome LinkFaceClient::deleteDeviceGroup(const DeleteDeviceGroupRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DeleteDeviceGroupOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DeleteDeviceGroupOutcome(DeleteDeviceGroupResult(outcome.result()));
|
||||
else
|
||||
return DeleteDeviceGroupOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void LinkFaceClient::deleteDeviceGroupAsync(const DeleteDeviceGroupRequest& request, const DeleteDeviceGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, deleteDeviceGroup(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
LinkFaceClient::DeleteDeviceGroupOutcomeCallable LinkFaceClient::deleteDeviceGroupCallable(const DeleteDeviceGroupRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DeleteDeviceGroupOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->deleteDeviceGroup(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
LinkFaceClient::DeleteFaceOutcome LinkFaceClient::deleteFace(const DeleteFaceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -33,6 +33,6 @@ std::string CreateGroupRequest::getGroupId()const
|
||||
void CreateGroupRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
setCoreParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ CreateGroupResult::~CreateGroupResult()
|
||||
|
||||
void CreateGroupResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
|
||||
60
linkface/src/model/DeleteDeviceAllGroupRequest.cc
Normal file
60
linkface/src/model/DeleteDeviceAllGroupRequest.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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/linkface/model/DeleteDeviceAllGroupRequest.h>
|
||||
|
||||
using AlibabaCloud::LinkFace::Model::DeleteDeviceAllGroupRequest;
|
||||
|
||||
DeleteDeviceAllGroupRequest::DeleteDeviceAllGroupRequest() :
|
||||
RpcServiceRequest("linkface", "2018-07-20", "DeleteDeviceAllGroup")
|
||||
{}
|
||||
|
||||
DeleteDeviceAllGroupRequest::~DeleteDeviceAllGroupRequest()
|
||||
{}
|
||||
|
||||
std::string DeleteDeviceAllGroupRequest::getIotId()const
|
||||
{
|
||||
return iotId_;
|
||||
}
|
||||
|
||||
void DeleteDeviceAllGroupRequest::setIotId(const std::string& iotId)
|
||||
{
|
||||
iotId_ = iotId;
|
||||
setCoreParameter("IotId", iotId);
|
||||
}
|
||||
|
||||
std::string DeleteDeviceAllGroupRequest::getDeviceName()const
|
||||
{
|
||||
return deviceName_;
|
||||
}
|
||||
|
||||
void DeleteDeviceAllGroupRequest::setDeviceName(const std::string& deviceName)
|
||||
{
|
||||
deviceName_ = deviceName;
|
||||
setCoreParameter("DeviceName", deviceName);
|
||||
}
|
||||
|
||||
std::string DeleteDeviceAllGroupRequest::getProductKey()const
|
||||
{
|
||||
return productKey_;
|
||||
}
|
||||
|
||||
void DeleteDeviceAllGroupRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setCoreParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
69
linkface/src/model/DeleteDeviceAllGroupResult.cc
Normal file
69
linkface/src/model/DeleteDeviceAllGroupResult.cc
Normal file
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* 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/linkface/model/DeleteDeviceAllGroupResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::LinkFace;
|
||||
using namespace AlibabaCloud::LinkFace::Model;
|
||||
|
||||
DeleteDeviceAllGroupResult::DeleteDeviceAllGroupResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteDeviceAllGroupResult::DeleteDeviceAllGroupResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteDeviceAllGroupResult::~DeleteDeviceAllGroupResult()
|
||||
{}
|
||||
|
||||
void DeleteDeviceAllGroupResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
std::string DeleteDeviceAllGroupResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int DeleteDeviceAllGroupResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool DeleteDeviceAllGroupResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
71
linkface/src/model/DeleteDeviceGroupRequest.cc
Normal file
71
linkface/src/model/DeleteDeviceGroupRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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/linkface/model/DeleteDeviceGroupRequest.h>
|
||||
|
||||
using AlibabaCloud::LinkFace::Model::DeleteDeviceGroupRequest;
|
||||
|
||||
DeleteDeviceGroupRequest::DeleteDeviceGroupRequest() :
|
||||
RpcServiceRequest("linkface", "2018-07-20", "DeleteDeviceGroup")
|
||||
{}
|
||||
|
||||
DeleteDeviceGroupRequest::~DeleteDeviceGroupRequest()
|
||||
{}
|
||||
|
||||
std::string DeleteDeviceGroupRequest::getIotId()const
|
||||
{
|
||||
return iotId_;
|
||||
}
|
||||
|
||||
void DeleteDeviceGroupRequest::setIotId(const std::string& iotId)
|
||||
{
|
||||
iotId_ = iotId;
|
||||
setCoreParameter("IotId", iotId);
|
||||
}
|
||||
|
||||
std::string DeleteDeviceGroupRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void DeleteDeviceGroupRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setCoreParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string DeleteDeviceGroupRequest::getDeviceName()const
|
||||
{
|
||||
return deviceName_;
|
||||
}
|
||||
|
||||
void DeleteDeviceGroupRequest::setDeviceName(const std::string& deviceName)
|
||||
{
|
||||
deviceName_ = deviceName;
|
||||
setCoreParameter("DeviceName", deviceName);
|
||||
}
|
||||
|
||||
std::string DeleteDeviceGroupRequest::getProductKey()const
|
||||
{
|
||||
return productKey_;
|
||||
}
|
||||
|
||||
void DeleteDeviceGroupRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setCoreParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
69
linkface/src/model/DeleteDeviceGroupResult.cc
Normal file
69
linkface/src/model/DeleteDeviceGroupResult.cc
Normal file
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* 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/linkface/model/DeleteDeviceGroupResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::LinkFace;
|
||||
using namespace AlibabaCloud::LinkFace::Model;
|
||||
|
||||
DeleteDeviceGroupResult::DeleteDeviceGroupResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteDeviceGroupResult::DeleteDeviceGroupResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteDeviceGroupResult::~DeleteDeviceGroupResult()
|
||||
{}
|
||||
|
||||
void DeleteDeviceGroupResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
std::string DeleteDeviceGroupResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int DeleteDeviceGroupResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool DeleteDeviceGroupResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string DeleteFaceRequest::getGroupId()const
|
||||
void DeleteFaceRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
setCoreParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string DeleteFaceRequest::getUserId()const
|
||||
@@ -44,6 +44,6 @@ std::string DeleteFaceRequest::getUserId()const
|
||||
void DeleteFaceRequest::setUserId(const std::string& userId)
|
||||
{
|
||||
userId_ = userId;
|
||||
setParameter("UserId", userId);
|
||||
setCoreParameter("UserId", userId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ DeleteFaceResult::~DeleteFaceResult()
|
||||
|
||||
void DeleteFaceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
|
||||
@@ -33,6 +33,6 @@ std::string DeleteGroupRequest::getGroupId()const
|
||||
void DeleteGroupRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
setCoreParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ DeleteGroupResult::~DeleteGroupResult()
|
||||
|
||||
void DeleteGroupResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string LinkFaceRequest::getGroupId()const
|
||||
void LinkFaceRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
setCoreParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string LinkFaceRequest::getUserId()const
|
||||
@@ -44,6 +44,6 @@ std::string LinkFaceRequest::getUserId()const
|
||||
void LinkFaceRequest::setUserId(const std::string& userId)
|
||||
{
|
||||
userId_ = userId;
|
||||
setParameter("UserId", userId);
|
||||
setCoreParameter("UserId", userId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ LinkFaceResult::~LinkFaceResult()
|
||||
|
||||
void LinkFaceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
|
||||
@@ -33,7 +33,18 @@ std::string QueryAddUserInfoRequest::getIotId()const
|
||||
void QueryAddUserInfoRequest::setIotId(const std::string& iotId)
|
||||
{
|
||||
iotId_ = iotId;
|
||||
setParameter("IotId", iotId);
|
||||
setCoreParameter("IotId", iotId);
|
||||
}
|
||||
|
||||
std::string QueryAddUserInfoRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void QueryAddUserInfoRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setCoreParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string QueryAddUserInfoRequest::getDeviceName()const
|
||||
@@ -44,7 +55,7 @@ std::string QueryAddUserInfoRequest::getDeviceName()const
|
||||
void QueryAddUserInfoRequest::setDeviceName(const std::string& deviceName)
|
||||
{
|
||||
deviceName_ = deviceName;
|
||||
setParameter("DeviceName", deviceName);
|
||||
setCoreParameter("DeviceName", deviceName);
|
||||
}
|
||||
|
||||
std::string QueryAddUserInfoRequest::getProductKey()const
|
||||
@@ -55,6 +66,6 @@ std::string QueryAddUserInfoRequest::getProductKey()const
|
||||
void QueryAddUserInfoRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setParameter("ProductKey", productKey);
|
||||
setCoreParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ QueryAddUserInfoResult::~QueryAddUserInfoResult()
|
||||
|
||||
void QueryAddUserInfoResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
auto allCurrentFaceInfos = value["CurrentFaceInfos"]["CurrentFaceInfosItem"];
|
||||
|
||||
@@ -33,7 +33,7 @@ int QueryAllGroupsRequest::getPageSize()const
|
||||
void QueryAllGroupsRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
setCoreParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
int QueryAllGroupsRequest::getCurrentPage()const
|
||||
@@ -44,6 +44,6 @@ int QueryAllGroupsRequest::getCurrentPage()const
|
||||
void QueryAllGroupsRequest::setCurrentPage(int currentPage)
|
||||
{
|
||||
currentPage_ = currentPage;
|
||||
setParameter("CurrentPage", std::to_string(currentPage));
|
||||
setCoreParameter("CurrentPage", std::to_string(currentPage));
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ QueryAllGroupsResult::~QueryAllGroupsResult()
|
||||
|
||||
void QueryAllGroupsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
auto allGroups = dataNode["Groups"]["Groups"];
|
||||
|
||||
@@ -33,7 +33,7 @@ int QueryAuthenticationRequest::getLicenseType()const
|
||||
void QueryAuthenticationRequest::setLicenseType(int licenseType)
|
||||
{
|
||||
licenseType_ = licenseType;
|
||||
setParameter("LicenseType", std::to_string(licenseType));
|
||||
setCoreParameter("LicenseType", std::to_string(licenseType));
|
||||
}
|
||||
|
||||
std::string QueryAuthenticationRequest::getIotId()const
|
||||
@@ -44,7 +44,7 @@ std::string QueryAuthenticationRequest::getIotId()const
|
||||
void QueryAuthenticationRequest::setIotId(const std::string& iotId)
|
||||
{
|
||||
iotId_ = iotId;
|
||||
setParameter("IotId", iotId);
|
||||
setCoreParameter("IotId", iotId);
|
||||
}
|
||||
|
||||
int QueryAuthenticationRequest::getPageSize()const
|
||||
@@ -55,7 +55,7 @@ int QueryAuthenticationRequest::getPageSize()const
|
||||
void QueryAuthenticationRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
setCoreParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
int QueryAuthenticationRequest::getCurrentPage()const
|
||||
@@ -66,7 +66,7 @@ int QueryAuthenticationRequest::getCurrentPage()const
|
||||
void QueryAuthenticationRequest::setCurrentPage(int currentPage)
|
||||
{
|
||||
currentPage_ = currentPage;
|
||||
setParameter("CurrentPage", std::to_string(currentPage));
|
||||
setCoreParameter("CurrentPage", std::to_string(currentPage));
|
||||
}
|
||||
|
||||
std::string QueryAuthenticationRequest::getDeviceName()const
|
||||
@@ -77,7 +77,7 @@ std::string QueryAuthenticationRequest::getDeviceName()const
|
||||
void QueryAuthenticationRequest::setDeviceName(const std::string& deviceName)
|
||||
{
|
||||
deviceName_ = deviceName;
|
||||
setParameter("DeviceName", deviceName);
|
||||
setCoreParameter("DeviceName", deviceName);
|
||||
}
|
||||
|
||||
std::string QueryAuthenticationRequest::getProductKey()const
|
||||
@@ -88,6 +88,6 @@ std::string QueryAuthenticationRequest::getProductKey()const
|
||||
void QueryAuthenticationRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setParameter("ProductKey", productKey);
|
||||
setCoreParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ QueryAuthenticationResult::~QueryAuthenticationResult()
|
||||
|
||||
void QueryAuthenticationResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allData = value["Data"]["DataItem"];
|
||||
for (auto value : allData)
|
||||
|
||||
@@ -33,6 +33,6 @@ std::string QueryFaceRequest::getUserId()const
|
||||
void QueryFaceRequest::setUserId(const std::string& userId)
|
||||
{
|
||||
userId_ = userId;
|
||||
setParameter("UserId", userId);
|
||||
setCoreParameter("UserId", userId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ QueryFaceResult::~QueryFaceResult()
|
||||
|
||||
void QueryFaceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
auto allUserFaceMetas = value["UserFaceMetas"]["UserFaceMetasItem"];
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string QueryGroupUsersRequest::getGroupId()const
|
||||
void QueryGroupUsersRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
setCoreParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
int QueryGroupUsersRequest::getPageSize()const
|
||||
@@ -44,7 +44,7 @@ int QueryGroupUsersRequest::getPageSize()const
|
||||
void QueryGroupUsersRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
setCoreParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
int QueryGroupUsersRequest::getCurrentPage()const
|
||||
@@ -55,6 +55,6 @@ int QueryGroupUsersRequest::getCurrentPage()const
|
||||
void QueryGroupUsersRequest::setCurrentPage(int currentPage)
|
||||
{
|
||||
currentPage_ = currentPage;
|
||||
setParameter("CurrentPage", std::to_string(currentPage));
|
||||
setCoreParameter("CurrentPage", std::to_string(currentPage));
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ QueryGroupUsersResult::~QueryGroupUsersResult()
|
||||
|
||||
void QueryGroupUsersResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allData = value["Data"]["DataItem"];
|
||||
for (auto value : allData)
|
||||
|
||||
@@ -33,7 +33,7 @@ int QueryLicensesRequest::getLicenseType()const
|
||||
void QueryLicensesRequest::setLicenseType(int licenseType)
|
||||
{
|
||||
licenseType_ = licenseType;
|
||||
setParameter("LicenseType", std::to_string(licenseType));
|
||||
setCoreParameter("LicenseType", std::to_string(licenseType));
|
||||
}
|
||||
|
||||
int QueryLicensesRequest::getPageSize()const
|
||||
@@ -44,7 +44,7 @@ int QueryLicensesRequest::getPageSize()const
|
||||
void QueryLicensesRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
setCoreParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
int QueryLicensesRequest::getCurrentPage()const
|
||||
@@ -55,6 +55,6 @@ int QueryLicensesRequest::getCurrentPage()const
|
||||
void QueryLicensesRequest::setCurrentPage(int currentPage)
|
||||
{
|
||||
currentPage_ = currentPage;
|
||||
setParameter("CurrentPage", std::to_string(currentPage));
|
||||
setCoreParameter("CurrentPage", std::to_string(currentPage));
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ QueryLicensesResult::~QueryLicensesResult()
|
||||
|
||||
void QueryLicensesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allData = value["Data"]["DataItem"];
|
||||
for (auto value : allData)
|
||||
|
||||
@@ -33,7 +33,18 @@ std::string QuerySyncPicScheduleRequest::getIotId()const
|
||||
void QuerySyncPicScheduleRequest::setIotId(const std::string& iotId)
|
||||
{
|
||||
iotId_ = iotId;
|
||||
setParameter("IotId", iotId);
|
||||
setCoreParameter("IotId", iotId);
|
||||
}
|
||||
|
||||
std::string QuerySyncPicScheduleRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void QuerySyncPicScheduleRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setCoreParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string QuerySyncPicScheduleRequest::getDeviceName()const
|
||||
@@ -44,7 +55,7 @@ std::string QuerySyncPicScheduleRequest::getDeviceName()const
|
||||
void QuerySyncPicScheduleRequest::setDeviceName(const std::string& deviceName)
|
||||
{
|
||||
deviceName_ = deviceName;
|
||||
setParameter("DeviceName", deviceName);
|
||||
setCoreParameter("DeviceName", deviceName);
|
||||
}
|
||||
|
||||
std::string QuerySyncPicScheduleRequest::getProductKey()const
|
||||
@@ -55,6 +66,6 @@ std::string QuerySyncPicScheduleRequest::getProductKey()const
|
||||
void QuerySyncPicScheduleRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setParameter("ProductKey", productKey);
|
||||
setCoreParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ QuerySyncPicScheduleResult::~QuerySyncPicScheduleResult()
|
||||
|
||||
void QuerySyncPicScheduleResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["Rate"].isNull())
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string RegisterFaceRequest::getImage()const
|
||||
void RegisterFaceRequest::setImage(const std::string& image)
|
||||
{
|
||||
image_ = image;
|
||||
setParameter("Image", image);
|
||||
setCoreParameter("Image", image);
|
||||
}
|
||||
|
||||
std::string RegisterFaceRequest::getGroupId()const
|
||||
@@ -44,7 +44,7 @@ std::string RegisterFaceRequest::getGroupId()const
|
||||
void RegisterFaceRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
setCoreParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string RegisterFaceRequest::getUserId()const
|
||||
@@ -55,7 +55,7 @@ std::string RegisterFaceRequest::getUserId()const
|
||||
void RegisterFaceRequest::setUserId(const std::string& userId)
|
||||
{
|
||||
userId_ = userId;
|
||||
setParameter("UserId", userId);
|
||||
setCoreParameter("UserId", userId);
|
||||
}
|
||||
|
||||
std::string RegisterFaceRequest::getUserInfo()const
|
||||
@@ -66,6 +66,6 @@ std::string RegisterFaceRequest::getUserInfo()const
|
||||
void RegisterFaceRequest::setUserInfo(const std::string& userInfo)
|
||||
{
|
||||
userInfo_ = userInfo;
|
||||
setParameter("UserInfo", userInfo);
|
||||
setCoreParameter("UserInfo", userInfo);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ RegisterFaceResult::~RegisterFaceResult()
|
||||
|
||||
void RegisterFaceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string SearchFaceRequest::getImage()const
|
||||
void SearchFaceRequest::setImage(const std::string& image)
|
||||
{
|
||||
image_ = image;
|
||||
setParameter("Image", image);
|
||||
setCoreParameter("Image", image);
|
||||
}
|
||||
|
||||
std::string SearchFaceRequest::getGroupId()const
|
||||
@@ -44,6 +44,6 @@ std::string SearchFaceRequest::getGroupId()const
|
||||
void SearchFaceRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
setCoreParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ SearchFaceResult::~SearchFaceResult()
|
||||
|
||||
void SearchFaceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
auto allTopUserItem = value["TopUserItem"]["TopUserItemItem"];
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string SyncFacePicturesRequest::getIotId()const
|
||||
void SyncFacePicturesRequest::setIotId(const std::string& iotId)
|
||||
{
|
||||
iotId_ = iotId;
|
||||
setParameter("IotId", iotId);
|
||||
setCoreParameter("IotId", iotId);
|
||||
}
|
||||
|
||||
std::string SyncFacePicturesRequest::getGroupId()const
|
||||
@@ -44,7 +44,7 @@ std::string SyncFacePicturesRequest::getGroupId()const
|
||||
void SyncFacePicturesRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
setCoreParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string SyncFacePicturesRequest::getDeviceName()const
|
||||
@@ -55,7 +55,7 @@ std::string SyncFacePicturesRequest::getDeviceName()const
|
||||
void SyncFacePicturesRequest::setDeviceName(const std::string& deviceName)
|
||||
{
|
||||
deviceName_ = deviceName;
|
||||
setParameter("DeviceName", deviceName);
|
||||
setCoreParameter("DeviceName", deviceName);
|
||||
}
|
||||
|
||||
std::string SyncFacePicturesRequest::getProductKey()const
|
||||
@@ -66,6 +66,6 @@ std::string SyncFacePicturesRequest::getProductKey()const
|
||||
void SyncFacePicturesRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setParameter("ProductKey", productKey);
|
||||
setCoreParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ SyncFacePicturesResult::~SyncFacePicturesResult()
|
||||
|
||||
void SyncFacePicturesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string UnlinkFaceRequest::getGroupId()const
|
||||
void UnlinkFaceRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
setCoreParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string UnlinkFaceRequest::getUserId()const
|
||||
@@ -44,6 +44,6 @@ std::string UnlinkFaceRequest::getUserId()const
|
||||
void UnlinkFaceRequest::setUserId(const std::string& userId)
|
||||
{
|
||||
userId_ = userId;
|
||||
setParameter("UserId", userId);
|
||||
setCoreParameter("UserId", userId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ UnlinkFaceResult::~UnlinkFaceResult()
|
||||
|
||||
void UnlinkFaceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string UpdateFaceRequest::getImage()const
|
||||
void UpdateFaceRequest::setImage(const std::string& image)
|
||||
{
|
||||
image_ = image;
|
||||
setParameter("Image", image);
|
||||
setCoreParameter("Image", image);
|
||||
}
|
||||
|
||||
std::string UpdateFaceRequest::getUserId()const
|
||||
@@ -44,7 +44,7 @@ std::string UpdateFaceRequest::getUserId()const
|
||||
void UpdateFaceRequest::setUserId(const std::string& userId)
|
||||
{
|
||||
userId_ = userId;
|
||||
setParameter("UserId", userId);
|
||||
setCoreParameter("UserId", userId);
|
||||
}
|
||||
|
||||
std::string UpdateFaceRequest::getUserInfo()const
|
||||
@@ -55,6 +55,6 @@ std::string UpdateFaceRequest::getUserInfo()const
|
||||
void UpdateFaceRequest::setUserInfo(const std::string& userInfo)
|
||||
{
|
||||
userInfo_ = userInfo;
|
||||
setParameter("UserInfo", userInfo);
|
||||
setCoreParameter("UserInfo", userInfo);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ UpdateFaceResult::~UpdateFaceResult()
|
||||
|
||||
void UpdateFaceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
|
||||
Reference in New Issue
Block a user