Rebuild sdk (#60)

* rebuild sdk

* fixed ut include Utils.h
This commit is contained in:
Axios
2019-08-14 14:34:09 +08:00
committed by GitHub
parent f3d9843e63
commit c43307bc80
11893 changed files with 462166 additions and 221301 deletions

View File

@@ -33,6 +33,6 @@ std::string CreateGroupRequest::getGroupId()const
void CreateGroupRequest::setGroupId(const std::string& groupId)
{
groupId_ = groupId;
setParameter("GroupId", groupId);
setCoreParameter("GroupId", groupId);
}

View File

@@ -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());

View 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);
}

View 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_;
}

View 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);
}

View 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_;
}

View File

@@ -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);
}

View File

@@ -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());

View File

@@ -33,6 +33,6 @@ std::string DeleteGroupRequest::getGroupId()const
void DeleteGroupRequest::setGroupId(const std::string& groupId)
{
groupId_ = groupId;
setParameter("GroupId", groupId);
setCoreParameter("GroupId", groupId);
}

View File

@@ -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());

View File

@@ -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);
}

View File

@@ -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());

View File

@@ -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);
}

View File

@@ -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"];

View File

@@ -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));
}

View File

@@ -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"];

View File

@@ -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);
}

View File

@@ -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)

View File

@@ -33,6 +33,6 @@ std::string QueryFaceRequest::getUserId()const
void QueryFaceRequest::setUserId(const std::string& userId)
{
userId_ = userId;
setParameter("UserId", userId);
setCoreParameter("UserId", userId);
}

View File

@@ -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"];

View File

@@ -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));
}

View File

@@ -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)

View File

@@ -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));
}

View File

@@ -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)

View File

@@ -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);
}

View File

@@ -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())

View File

@@ -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);
}

View File

@@ -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());

View File

@@ -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);
}

View File

@@ -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"];

View File

@@ -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);
}

View File

@@ -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());

View File

@@ -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);
}

View File

@@ -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());

View File

@@ -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);
}

View File

@@ -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());