LINKFACE SDK Auto Released By jhon.zh,Version:1.21.3
Signed-off-by: yixiong.jxy <yixiong.jxy@alibaba-inc.com>
This commit is contained in:
593
linkface/src/LinkFaceClient.cc
Normal file
593
linkface/src/LinkFaceClient.cc
Normal file
@@ -0,0 +1,593 @@
|
||||
/*
|
||||
* 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/LinkFaceClient.h>
|
||||
#include <alibabacloud/core/SimpleCredentialsProvider.h>
|
||||
|
||||
using namespace AlibabaCloud;
|
||||
using namespace AlibabaCloud::Location;
|
||||
using namespace AlibabaCloud::LinkFace;
|
||||
using namespace AlibabaCloud::LinkFace::Model;
|
||||
|
||||
namespace
|
||||
{
|
||||
const std::string SERVICE_NAME = "LinkFace";
|
||||
}
|
||||
|
||||
LinkFaceClient::LinkFaceClient(const Credentials &credentials, const ClientConfiguration &configuration) :
|
||||
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, "");
|
||||
}
|
||||
|
||||
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, "");
|
||||
}
|
||||
|
||||
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, "");
|
||||
}
|
||||
|
||||
LinkFaceClient::~LinkFaceClient()
|
||||
{}
|
||||
|
||||
LinkFaceClient::UnlinkFaceOutcome LinkFaceClient::unlinkFace(const UnlinkFaceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UnlinkFaceOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UnlinkFaceOutcome(UnlinkFaceResult(outcome.result()));
|
||||
else
|
||||
return UnlinkFaceOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void LinkFaceClient::unlinkFaceAsync(const UnlinkFaceRequest& request, const UnlinkFaceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, unlinkFace(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
LinkFaceClient::UnlinkFaceOutcomeCallable LinkFaceClient::unlinkFaceCallable(const UnlinkFaceRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UnlinkFaceOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->unlinkFace(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
LinkFaceClient::UpdateFaceOutcome LinkFaceClient::updateFace(const UpdateFaceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UpdateFaceOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UpdateFaceOutcome(UpdateFaceResult(outcome.result()));
|
||||
else
|
||||
return UpdateFaceOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void LinkFaceClient::updateFaceAsync(const UpdateFaceRequest& request, const UpdateFaceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, updateFace(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
LinkFaceClient::UpdateFaceOutcomeCallable LinkFaceClient::updateFaceCallable(const UpdateFaceRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UpdateFaceOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->updateFace(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
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();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return SyncFacePicturesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return SyncFacePicturesOutcome(SyncFacePicturesResult(outcome.result()));
|
||||
else
|
||||
return SyncFacePicturesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void LinkFaceClient::syncFacePicturesAsync(const SyncFacePicturesRequest& request, const SyncFacePicturesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, syncFacePictures(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
LinkFaceClient::SyncFacePicturesOutcomeCallable LinkFaceClient::syncFacePicturesCallable(const SyncFacePicturesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<SyncFacePicturesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->syncFacePictures(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
LinkFaceClient::CreateGroupOutcome LinkFaceClient::createGroup(const CreateGroupRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CreateGroupOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CreateGroupOutcome(CreateGroupResult(outcome.result()));
|
||||
else
|
||||
return CreateGroupOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void LinkFaceClient::createGroupAsync(const CreateGroupRequest& request, const CreateGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, createGroup(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
LinkFaceClient::CreateGroupOutcomeCallable LinkFaceClient::createGroupCallable(const CreateGroupRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CreateGroupOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->createGroup(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
LinkFaceClient::DeleteGroupOutcome LinkFaceClient::deleteGroup(const DeleteGroupRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DeleteGroupOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DeleteGroupOutcome(DeleteGroupResult(outcome.result()));
|
||||
else
|
||||
return DeleteGroupOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void LinkFaceClient::deleteGroupAsync(const DeleteGroupRequest& request, const DeleteGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, deleteGroup(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
LinkFaceClient::DeleteGroupOutcomeCallable LinkFaceClient::deleteGroupCallable(const DeleteGroupRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DeleteGroupOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->deleteGroup(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
LinkFaceClient::DeleteFaceOutcome LinkFaceClient::deleteFace(const DeleteFaceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DeleteFaceOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DeleteFaceOutcome(DeleteFaceResult(outcome.result()));
|
||||
else
|
||||
return DeleteFaceOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void LinkFaceClient::deleteFaceAsync(const DeleteFaceRequest& request, const DeleteFaceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, deleteFace(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
LinkFaceClient::DeleteFaceOutcomeCallable LinkFaceClient::deleteFaceCallable(const DeleteFaceRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DeleteFaceOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->deleteFace(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
LinkFaceClient::QueryAuthenticationOutcome LinkFaceClient::queryAuthentication(const QueryAuthenticationRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return QueryAuthenticationOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return QueryAuthenticationOutcome(QueryAuthenticationResult(outcome.result()));
|
||||
else
|
||||
return QueryAuthenticationOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void LinkFaceClient::queryAuthenticationAsync(const QueryAuthenticationRequest& request, const QueryAuthenticationAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, queryAuthentication(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
LinkFaceClient::QueryAuthenticationOutcomeCallable LinkFaceClient::queryAuthenticationCallable(const QueryAuthenticationRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<QueryAuthenticationOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->queryAuthentication(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
LinkFaceClient::QueryGroupUsersOutcome LinkFaceClient::queryGroupUsers(const QueryGroupUsersRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return QueryGroupUsersOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return QueryGroupUsersOutcome(QueryGroupUsersResult(outcome.result()));
|
||||
else
|
||||
return QueryGroupUsersOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void LinkFaceClient::queryGroupUsersAsync(const QueryGroupUsersRequest& request, const QueryGroupUsersAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, queryGroupUsers(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
LinkFaceClient::QueryGroupUsersOutcomeCallable LinkFaceClient::queryGroupUsersCallable(const QueryGroupUsersRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<QueryGroupUsersOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->queryGroupUsers(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
LinkFaceClient::LinkFaceOutcome LinkFaceClient::linkFace(const LinkFaceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return LinkFaceOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return LinkFaceOutcome(LinkFaceResult(outcome.result()));
|
||||
else
|
||||
return LinkFaceOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void LinkFaceClient::linkFaceAsync(const LinkFaceRequest& request, const LinkFaceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, linkFace(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
LinkFaceClient::LinkFaceOutcomeCallable LinkFaceClient::linkFaceCallable(const LinkFaceRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<LinkFaceOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->linkFace(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
LinkFaceClient::QueryAllGroupsOutcome LinkFaceClient::queryAllGroups(const QueryAllGroupsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return QueryAllGroupsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return QueryAllGroupsOutcome(QueryAllGroupsResult(outcome.result()));
|
||||
else
|
||||
return QueryAllGroupsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void LinkFaceClient::queryAllGroupsAsync(const QueryAllGroupsRequest& request, const QueryAllGroupsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, queryAllGroups(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
LinkFaceClient::QueryAllGroupsOutcomeCallable LinkFaceClient::queryAllGroupsCallable(const QueryAllGroupsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<QueryAllGroupsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->queryAllGroups(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
LinkFaceClient::RegisterFaceOutcome LinkFaceClient::registerFace(const RegisterFaceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return RegisterFaceOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return RegisterFaceOutcome(RegisterFaceResult(outcome.result()));
|
||||
else
|
||||
return RegisterFaceOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void LinkFaceClient::registerFaceAsync(const RegisterFaceRequest& request, const RegisterFaceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, registerFace(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
LinkFaceClient::RegisterFaceOutcomeCallable LinkFaceClient::registerFaceCallable(const RegisterFaceRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<RegisterFaceOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->registerFace(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
LinkFaceClient::QueryAddUserInfoOutcome LinkFaceClient::queryAddUserInfo(const QueryAddUserInfoRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return QueryAddUserInfoOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return QueryAddUserInfoOutcome(QueryAddUserInfoResult(outcome.result()));
|
||||
else
|
||||
return QueryAddUserInfoOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void LinkFaceClient::queryAddUserInfoAsync(const QueryAddUserInfoRequest& request, const QueryAddUserInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, queryAddUserInfo(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
LinkFaceClient::QueryAddUserInfoOutcomeCallable LinkFaceClient::queryAddUserInfoCallable(const QueryAddUserInfoRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<QueryAddUserInfoOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->queryAddUserInfo(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
LinkFaceClient::QueryLicensesOutcome LinkFaceClient::queryLicenses(const QueryLicensesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return QueryLicensesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return QueryLicensesOutcome(QueryLicensesResult(outcome.result()));
|
||||
else
|
||||
return QueryLicensesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void LinkFaceClient::queryLicensesAsync(const QueryLicensesRequest& request, const QueryLicensesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, queryLicenses(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
LinkFaceClient::QueryLicensesOutcomeCallable LinkFaceClient::queryLicensesCallable(const QueryLicensesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<QueryLicensesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->queryLicenses(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
LinkFaceClient::QueryFaceOutcome LinkFaceClient::queryFace(const QueryFaceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return QueryFaceOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return QueryFaceOutcome(QueryFaceResult(outcome.result()));
|
||||
else
|
||||
return QueryFaceOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void LinkFaceClient::queryFaceAsync(const QueryFaceRequest& request, const QueryFaceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, queryFace(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
LinkFaceClient::QueryFaceOutcomeCallable LinkFaceClient::queryFaceCallable(const QueryFaceRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<QueryFaceOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->queryFace(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
38
linkface/src/model/CreateGroupRequest.cc
Normal file
38
linkface/src/model/CreateGroupRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* 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/CreateGroupRequest.h>
|
||||
|
||||
using AlibabaCloud::LinkFace::Model::CreateGroupRequest;
|
||||
|
||||
CreateGroupRequest::CreateGroupRequest() :
|
||||
RpcServiceRequest("linkface", "2018-07-20", "CreateGroup")
|
||||
{}
|
||||
|
||||
CreateGroupRequest::~CreateGroupRequest()
|
||||
{}
|
||||
|
||||
std::string CreateGroupRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void CreateGroupRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
66
linkface/src/model/CreateGroupResult.cc
Normal file
66
linkface/src/model/CreateGroupResult.cc
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* 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/CreateGroupResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::LinkFace;
|
||||
using namespace AlibabaCloud::LinkFace::Model;
|
||||
|
||||
CreateGroupResult::CreateGroupResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateGroupResult::CreateGroupResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateGroupResult::~CreateGroupResult()
|
||||
{}
|
||||
|
||||
void CreateGroupResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
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 CreateGroupResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int CreateGroupResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool CreateGroupResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
49
linkface/src/model/DeleteFaceRequest.cc
Normal file
49
linkface/src/model/DeleteFaceRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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/DeleteFaceRequest.h>
|
||||
|
||||
using AlibabaCloud::LinkFace::Model::DeleteFaceRequest;
|
||||
|
||||
DeleteFaceRequest::DeleteFaceRequest() :
|
||||
RpcServiceRequest("linkface", "2018-07-20", "DeleteFace")
|
||||
{}
|
||||
|
||||
DeleteFaceRequest::~DeleteFaceRequest()
|
||||
{}
|
||||
|
||||
std::string DeleteFaceRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void DeleteFaceRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string DeleteFaceRequest::getUserId()const
|
||||
{
|
||||
return userId_;
|
||||
}
|
||||
|
||||
void DeleteFaceRequest::setUserId(const std::string& userId)
|
||||
{
|
||||
userId_ = userId;
|
||||
setParameter("UserId", userId);
|
||||
}
|
||||
|
||||
66
linkface/src/model/DeleteFaceResult.cc
Normal file
66
linkface/src/model/DeleteFaceResult.cc
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* 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/DeleteFaceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::LinkFace;
|
||||
using namespace AlibabaCloud::LinkFace::Model;
|
||||
|
||||
DeleteFaceResult::DeleteFaceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteFaceResult::DeleteFaceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteFaceResult::~DeleteFaceResult()
|
||||
{}
|
||||
|
||||
void DeleteFaceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
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 DeleteFaceResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int DeleteFaceResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool DeleteFaceResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
38
linkface/src/model/DeleteGroupRequest.cc
Normal file
38
linkface/src/model/DeleteGroupRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* 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/DeleteGroupRequest.h>
|
||||
|
||||
using AlibabaCloud::LinkFace::Model::DeleteGroupRequest;
|
||||
|
||||
DeleteGroupRequest::DeleteGroupRequest() :
|
||||
RpcServiceRequest("linkface", "2018-07-20", "DeleteGroup")
|
||||
{}
|
||||
|
||||
DeleteGroupRequest::~DeleteGroupRequest()
|
||||
{}
|
||||
|
||||
std::string DeleteGroupRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void DeleteGroupRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
66
linkface/src/model/DeleteGroupResult.cc
Normal file
66
linkface/src/model/DeleteGroupResult.cc
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* 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/DeleteGroupResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::LinkFace;
|
||||
using namespace AlibabaCloud::LinkFace::Model;
|
||||
|
||||
DeleteGroupResult::DeleteGroupResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteGroupResult::DeleteGroupResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteGroupResult::~DeleteGroupResult()
|
||||
{}
|
||||
|
||||
void DeleteGroupResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
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 DeleteGroupResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int DeleteGroupResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool DeleteGroupResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
49
linkface/src/model/LinkFaceRequest.cc
Normal file
49
linkface/src/model/LinkFaceRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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/LinkFaceRequest.h>
|
||||
|
||||
using AlibabaCloud::LinkFace::Model::LinkFaceRequest;
|
||||
|
||||
LinkFaceRequest::LinkFaceRequest() :
|
||||
RpcServiceRequest("linkface", "2018-07-20", "LinkFace")
|
||||
{}
|
||||
|
||||
LinkFaceRequest::~LinkFaceRequest()
|
||||
{}
|
||||
|
||||
std::string LinkFaceRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void LinkFaceRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string LinkFaceRequest::getUserId()const
|
||||
{
|
||||
return userId_;
|
||||
}
|
||||
|
||||
void LinkFaceRequest::setUserId(const std::string& userId)
|
||||
{
|
||||
userId_ = userId;
|
||||
setParameter("UserId", userId);
|
||||
}
|
||||
|
||||
66
linkface/src/model/LinkFaceResult.cc
Normal file
66
linkface/src/model/LinkFaceResult.cc
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* 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/LinkFaceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::LinkFace;
|
||||
using namespace AlibabaCloud::LinkFace::Model;
|
||||
|
||||
LinkFaceResult::LinkFaceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
LinkFaceResult::LinkFaceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
LinkFaceResult::~LinkFaceResult()
|
||||
{}
|
||||
|
||||
void LinkFaceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
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 LinkFaceResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int LinkFaceResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool LinkFaceResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
38
linkface/src/model/QueryAddUserInfoRequest.cc
Normal file
38
linkface/src/model/QueryAddUserInfoRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* 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/QueryAddUserInfoRequest.h>
|
||||
|
||||
using AlibabaCloud::LinkFace::Model::QueryAddUserInfoRequest;
|
||||
|
||||
QueryAddUserInfoRequest::QueryAddUserInfoRequest() :
|
||||
RpcServiceRequest("linkface", "2018-07-20", "QueryAddUserInfo")
|
||||
{}
|
||||
|
||||
QueryAddUserInfoRequest::~QueryAddUserInfoRequest()
|
||||
{}
|
||||
|
||||
std::string QueryAddUserInfoRequest::getIotId()const
|
||||
{
|
||||
return iotId_;
|
||||
}
|
||||
|
||||
void QueryAddUserInfoRequest::setIotId(const std::string& iotId)
|
||||
{
|
||||
iotId_ = iotId;
|
||||
setParameter("IotId", iotId);
|
||||
}
|
||||
|
||||
96
linkface/src/model/QueryAddUserInfoResult.cc
Normal file
96
linkface/src/model/QueryAddUserInfoResult.cc
Normal file
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
* 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/QueryAddUserInfoResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::LinkFace;
|
||||
using namespace AlibabaCloud::LinkFace::Model;
|
||||
|
||||
QueryAddUserInfoResult::QueryAddUserInfoResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
QueryAddUserInfoResult::QueryAddUserInfoResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
QueryAddUserInfoResult::~QueryAddUserInfoResult()
|
||||
{}
|
||||
|
||||
void QueryAddUserInfoResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
auto allCurrentFaceInfos = value["CurrentFaceInfos"]["CurrentFaceInfosItem"];
|
||||
for (auto value : allCurrentFaceInfos)
|
||||
{
|
||||
Data::CurrentFaceInfosItem currentFaceInfosItemObject;
|
||||
if(!value["UserId"].isNull())
|
||||
currentFaceInfosItemObject.userId = value["UserId"].asString();
|
||||
if(!value["ClientTag"].isNull())
|
||||
currentFaceInfosItemObject.clientTag = value["ClientTag"].asString();
|
||||
if(!value["Index"].isNull())
|
||||
currentFaceInfosItemObject.index = std::stoi(value["Index"].asString());
|
||||
data_.currentFaceInfos.push_back(currentFaceInfosItemObject);
|
||||
}
|
||||
auto allFailedFaceInfos = value["FailedFaceInfos"]["FailedFaceInfosItem"];
|
||||
for (auto value : allFailedFaceInfos)
|
||||
{
|
||||
Data::FailedFaceInfosItem failedFaceInfosItemObject;
|
||||
if(!value["UserId"].isNull())
|
||||
failedFaceInfosItemObject.userId = value["UserId"].asString();
|
||||
if(!value["ClientTag"].isNull())
|
||||
failedFaceInfosItemObject.clientTag = value["ClientTag"].asString();
|
||||
if(!value["Index"].isNull())
|
||||
failedFaceInfosItemObject.index = std::stoi(value["Index"].asString());
|
||||
data_.failedFaceInfos.push_back(failedFaceInfosItemObject);
|
||||
}
|
||||
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 QueryAddUserInfoResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
QueryAddUserInfoResult::Data QueryAddUserInfoResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
int QueryAddUserInfoResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool QueryAddUserInfoResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
49
linkface/src/model/QueryAllGroupsRequest.cc
Normal file
49
linkface/src/model/QueryAllGroupsRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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/QueryAllGroupsRequest.h>
|
||||
|
||||
using AlibabaCloud::LinkFace::Model::QueryAllGroupsRequest;
|
||||
|
||||
QueryAllGroupsRequest::QueryAllGroupsRequest() :
|
||||
RpcServiceRequest("linkface", "2018-07-20", "QueryAllGroups")
|
||||
{}
|
||||
|
||||
QueryAllGroupsRequest::~QueryAllGroupsRequest()
|
||||
{}
|
||||
|
||||
int QueryAllGroupsRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void QueryAllGroupsRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
int QueryAllGroupsRequest::getCurrentPage()const
|
||||
{
|
||||
return currentPage_;
|
||||
}
|
||||
|
||||
void QueryAllGroupsRequest::setCurrentPage(int currentPage)
|
||||
{
|
||||
currentPage_ = currentPage;
|
||||
setParameter("CurrentPage", std::to_string(currentPage));
|
||||
}
|
||||
|
||||
103
linkface/src/model/QueryAllGroupsResult.cc
Normal file
103
linkface/src/model/QueryAllGroupsResult.cc
Normal file
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
* 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/QueryAllGroupsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::LinkFace;
|
||||
using namespace AlibabaCloud::LinkFace::Model;
|
||||
|
||||
QueryAllGroupsResult::QueryAllGroupsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
QueryAllGroupsResult::QueryAllGroupsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
QueryAllGroupsResult::~QueryAllGroupsResult()
|
||||
{}
|
||||
|
||||
void QueryAllGroupsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
auto allGroups = dataNode["Groups"]["Groups"];
|
||||
for (auto value : allGroups)
|
||||
data_.groups.push_back(value.asString());
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["PageCount"].isNull())
|
||||
pageCount_ = std::stoi(value["PageCount"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
if(!value["Page"].isNull())
|
||||
page_ = std::stoi(value["Page"].asString());
|
||||
if(!value["Total"].isNull())
|
||||
total_ = std::stoi(value["Total"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
std::string QueryAllGroupsResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int QueryAllGroupsResult::getPageCount()const
|
||||
{
|
||||
return pageCount_;
|
||||
}
|
||||
|
||||
int QueryAllGroupsResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int QueryAllGroupsResult::getTotal()const
|
||||
{
|
||||
return total_;
|
||||
}
|
||||
|
||||
QueryAllGroupsResult::Data QueryAllGroupsResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
int QueryAllGroupsResult::getPage()const
|
||||
{
|
||||
return page_;
|
||||
}
|
||||
|
||||
int QueryAllGroupsResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool QueryAllGroupsResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
71
linkface/src/model/QueryAuthenticationRequest.cc
Normal file
71
linkface/src/model/QueryAuthenticationRequest.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/QueryAuthenticationRequest.h>
|
||||
|
||||
using AlibabaCloud::LinkFace::Model::QueryAuthenticationRequest;
|
||||
|
||||
QueryAuthenticationRequest::QueryAuthenticationRequest() :
|
||||
RpcServiceRequest("linkface", "2018-07-20", "QueryAuthentication")
|
||||
{}
|
||||
|
||||
QueryAuthenticationRequest::~QueryAuthenticationRequest()
|
||||
{}
|
||||
|
||||
int QueryAuthenticationRequest::getLicenseType()const
|
||||
{
|
||||
return licenseType_;
|
||||
}
|
||||
|
||||
void QueryAuthenticationRequest::setLicenseType(int licenseType)
|
||||
{
|
||||
licenseType_ = licenseType;
|
||||
setParameter("LicenseType", std::to_string(licenseType));
|
||||
}
|
||||
|
||||
std::string QueryAuthenticationRequest::getIotId()const
|
||||
{
|
||||
return iotId_;
|
||||
}
|
||||
|
||||
void QueryAuthenticationRequest::setIotId(const std::string& iotId)
|
||||
{
|
||||
iotId_ = iotId;
|
||||
setParameter("IotId", iotId);
|
||||
}
|
||||
|
||||
int QueryAuthenticationRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void QueryAuthenticationRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
int QueryAuthenticationRequest::getCurrentPage()const
|
||||
{
|
||||
return currentPage_;
|
||||
}
|
||||
|
||||
void QueryAuthenticationRequest::setCurrentPage(int currentPage)
|
||||
{
|
||||
currentPage_ = currentPage;
|
||||
setParameter("CurrentPage", std::to_string(currentPage));
|
||||
}
|
||||
|
||||
113
linkface/src/model/QueryAuthenticationResult.cc
Normal file
113
linkface/src/model/QueryAuthenticationResult.cc
Normal file
@@ -0,0 +1,113 @@
|
||||
/*
|
||||
* 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/QueryAuthenticationResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::LinkFace;
|
||||
using namespace AlibabaCloud::LinkFace::Model;
|
||||
|
||||
QueryAuthenticationResult::QueryAuthenticationResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
QueryAuthenticationResult::QueryAuthenticationResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
QueryAuthenticationResult::~QueryAuthenticationResult()
|
||||
{}
|
||||
|
||||
void QueryAuthenticationResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allData = value["Data"]["DataItem"];
|
||||
for (auto value : allData)
|
||||
{
|
||||
DataItem dataObject;
|
||||
if(!value["LicenseType"].isNull())
|
||||
dataObject.licenseType = std::stoi(value["LicenseType"].asString());
|
||||
if(!value["IotId"].isNull())
|
||||
dataObject.iotId = value["IotId"].asString();
|
||||
if(!value["BeginTime"].isNull())
|
||||
dataObject.beginTime = value["BeginTime"].asString();
|
||||
if(!value["ExpiredTime"].isNull())
|
||||
dataObject.expiredTime = value["ExpiredTime"].asString();
|
||||
data_.push_back(dataObject);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["PageCount"].isNull())
|
||||
pageCount_ = std::stoi(value["PageCount"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
if(!value["Page"].isNull())
|
||||
page_ = std::stoi(value["Page"].asString());
|
||||
if(!value["Total"].isNull())
|
||||
total_ = std::stoi(value["Total"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
std::string QueryAuthenticationResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int QueryAuthenticationResult::getPageCount()const
|
||||
{
|
||||
return pageCount_;
|
||||
}
|
||||
|
||||
int QueryAuthenticationResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int QueryAuthenticationResult::getTotal()const
|
||||
{
|
||||
return total_;
|
||||
}
|
||||
|
||||
std::vector<QueryAuthenticationResult::DataItem> QueryAuthenticationResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
int QueryAuthenticationResult::getPage()const
|
||||
{
|
||||
return page_;
|
||||
}
|
||||
|
||||
int QueryAuthenticationResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool QueryAuthenticationResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
38
linkface/src/model/QueryFaceRequest.cc
Normal file
38
linkface/src/model/QueryFaceRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* 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/QueryFaceRequest.h>
|
||||
|
||||
using AlibabaCloud::LinkFace::Model::QueryFaceRequest;
|
||||
|
||||
QueryFaceRequest::QueryFaceRequest() :
|
||||
RpcServiceRequest("linkface", "2018-07-20", "QueryFace")
|
||||
{}
|
||||
|
||||
QueryFaceRequest::~QueryFaceRequest()
|
||||
{}
|
||||
|
||||
std::string QueryFaceRequest::getUserId()const
|
||||
{
|
||||
return userId_;
|
||||
}
|
||||
|
||||
void QueryFaceRequest::setUserId(const std::string& userId)
|
||||
{
|
||||
userId_ = userId;
|
||||
setParameter("UserId", userId);
|
||||
}
|
||||
|
||||
87
linkface/src/model/QueryFaceResult.cc
Normal file
87
linkface/src/model/QueryFaceResult.cc
Normal file
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* 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/QueryFaceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::LinkFace;
|
||||
using namespace AlibabaCloud::LinkFace::Model;
|
||||
|
||||
QueryFaceResult::QueryFaceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
QueryFaceResult::QueryFaceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
QueryFaceResult::~QueryFaceResult()
|
||||
{}
|
||||
|
||||
void QueryFaceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
auto allUserFaceMetas = value["UserFaceMetas"]["UserFaceMetasItem"];
|
||||
for (auto value : allUserFaceMetas)
|
||||
{
|
||||
Data::UserFaceMetasItem userFaceMetasItemObject;
|
||||
if(!value["ClientTag"].isNull())
|
||||
userFaceMetasItemObject.clientTag = value["ClientTag"].asString();
|
||||
if(!value["Index"].isNull())
|
||||
userFaceMetasItemObject.index = std::stoi(value["Index"].asString());
|
||||
if(!value["FaceUrl"].isNull())
|
||||
userFaceMetasItemObject.faceUrl = value["FaceUrl"].asString();
|
||||
data_.userFaceMetas.push_back(userFaceMetasItemObject);
|
||||
}
|
||||
auto allGroupIds = dataNode["GroupIds"]["GroupIds"];
|
||||
for (auto value : allGroupIds)
|
||||
data_.groupIds.push_back(value.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 QueryFaceResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
QueryFaceResult::Data QueryFaceResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
int QueryFaceResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool QueryFaceResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
60
linkface/src/model/QueryGroupUsersRequest.cc
Normal file
60
linkface/src/model/QueryGroupUsersRequest.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/QueryGroupUsersRequest.h>
|
||||
|
||||
using AlibabaCloud::LinkFace::Model::QueryGroupUsersRequest;
|
||||
|
||||
QueryGroupUsersRequest::QueryGroupUsersRequest() :
|
||||
RpcServiceRequest("linkface", "2018-07-20", "QueryGroupUsers")
|
||||
{}
|
||||
|
||||
QueryGroupUsersRequest::~QueryGroupUsersRequest()
|
||||
{}
|
||||
|
||||
std::string QueryGroupUsersRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void QueryGroupUsersRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
int QueryGroupUsersRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void QueryGroupUsersRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
int QueryGroupUsersRequest::getCurrentPage()const
|
||||
{
|
||||
return currentPage_;
|
||||
}
|
||||
|
||||
void QueryGroupUsersRequest::setCurrentPage(int currentPage)
|
||||
{
|
||||
currentPage_ = currentPage;
|
||||
setParameter("CurrentPage", std::to_string(currentPage));
|
||||
}
|
||||
|
||||
107
linkface/src/model/QueryGroupUsersResult.cc
Normal file
107
linkface/src/model/QueryGroupUsersResult.cc
Normal file
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
* 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/QueryGroupUsersResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::LinkFace;
|
||||
using namespace AlibabaCloud::LinkFace::Model;
|
||||
|
||||
QueryGroupUsersResult::QueryGroupUsersResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
QueryGroupUsersResult::QueryGroupUsersResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
QueryGroupUsersResult::~QueryGroupUsersResult()
|
||||
{}
|
||||
|
||||
void QueryGroupUsersResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allData = value["Data"]["DataItem"];
|
||||
for (auto value : allData)
|
||||
{
|
||||
DataItem dataObject;
|
||||
if(!value["UserId"].isNull())
|
||||
dataObject.userId = value["UserId"].asString();
|
||||
data_.push_back(dataObject);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["PageCount"].isNull())
|
||||
pageCount_ = std::stoi(value["PageCount"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
if(!value["Page"].isNull())
|
||||
page_ = std::stoi(value["Page"].asString());
|
||||
if(!value["Total"].isNull())
|
||||
total_ = std::stoi(value["Total"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
std::string QueryGroupUsersResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int QueryGroupUsersResult::getPageCount()const
|
||||
{
|
||||
return pageCount_;
|
||||
}
|
||||
|
||||
int QueryGroupUsersResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int QueryGroupUsersResult::getTotal()const
|
||||
{
|
||||
return total_;
|
||||
}
|
||||
|
||||
std::vector<QueryGroupUsersResult::DataItem> QueryGroupUsersResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
int QueryGroupUsersResult::getPage()const
|
||||
{
|
||||
return page_;
|
||||
}
|
||||
|
||||
int QueryGroupUsersResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool QueryGroupUsersResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
60
linkface/src/model/QueryLicensesRequest.cc
Normal file
60
linkface/src/model/QueryLicensesRequest.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/QueryLicensesRequest.h>
|
||||
|
||||
using AlibabaCloud::LinkFace::Model::QueryLicensesRequest;
|
||||
|
||||
QueryLicensesRequest::QueryLicensesRequest() :
|
||||
RpcServiceRequest("linkface", "2018-07-20", "QueryLicenses")
|
||||
{}
|
||||
|
||||
QueryLicensesRequest::~QueryLicensesRequest()
|
||||
{}
|
||||
|
||||
int QueryLicensesRequest::getLicenseType()const
|
||||
{
|
||||
return licenseType_;
|
||||
}
|
||||
|
||||
void QueryLicensesRequest::setLicenseType(int licenseType)
|
||||
{
|
||||
licenseType_ = licenseType;
|
||||
setParameter("LicenseType", std::to_string(licenseType));
|
||||
}
|
||||
|
||||
int QueryLicensesRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void QueryLicensesRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
int QueryLicensesRequest::getCurrentPage()const
|
||||
{
|
||||
return currentPage_;
|
||||
}
|
||||
|
||||
void QueryLicensesRequest::setCurrentPage(int currentPage)
|
||||
{
|
||||
currentPage_ = currentPage;
|
||||
setParameter("CurrentPage", std::to_string(currentPage));
|
||||
}
|
||||
|
||||
111
linkface/src/model/QueryLicensesResult.cc
Normal file
111
linkface/src/model/QueryLicensesResult.cc
Normal file
@@ -0,0 +1,111 @@
|
||||
/*
|
||||
* 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/QueryLicensesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::LinkFace;
|
||||
using namespace AlibabaCloud::LinkFace::Model;
|
||||
|
||||
QueryLicensesResult::QueryLicensesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
QueryLicensesResult::QueryLicensesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
QueryLicensesResult::~QueryLicensesResult()
|
||||
{}
|
||||
|
||||
void QueryLicensesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allData = value["Data"]["DataItem"];
|
||||
for (auto value : allData)
|
||||
{
|
||||
DataItem dataObject;
|
||||
if(!value["LicenseType"].isNull())
|
||||
dataObject.licenseType = std::stoi(value["LicenseType"].asString());
|
||||
if(!value["Quantity"].isNull())
|
||||
dataObject.quantity = std::stoi(value["Quantity"].asString());
|
||||
if(!value["CostQuantity"].isNull())
|
||||
dataObject.costQuantity = std::stoi(value["CostQuantity"].asString());
|
||||
data_.push_back(dataObject);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["PageCount"].isNull())
|
||||
pageCount_ = std::stoi(value["PageCount"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
if(!value["Page"].isNull())
|
||||
page_ = std::stoi(value["Page"].asString());
|
||||
if(!value["Total"].isNull())
|
||||
total_ = std::stoi(value["Total"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
std::string QueryLicensesResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int QueryLicensesResult::getPageCount()const
|
||||
{
|
||||
return pageCount_;
|
||||
}
|
||||
|
||||
int QueryLicensesResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int QueryLicensesResult::getTotal()const
|
||||
{
|
||||
return total_;
|
||||
}
|
||||
|
||||
std::vector<QueryLicensesResult::DataItem> QueryLicensesResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
int QueryLicensesResult::getPage()const
|
||||
{
|
||||
return page_;
|
||||
}
|
||||
|
||||
int QueryLicensesResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool QueryLicensesResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
38
linkface/src/model/QuerySyncPicScheduleRequest.cc
Normal file
38
linkface/src/model/QuerySyncPicScheduleRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* 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/QuerySyncPicScheduleRequest.h>
|
||||
|
||||
using AlibabaCloud::LinkFace::Model::QuerySyncPicScheduleRequest;
|
||||
|
||||
QuerySyncPicScheduleRequest::QuerySyncPicScheduleRequest() :
|
||||
RpcServiceRequest("linkface", "2018-07-20", "QuerySyncPicSchedule")
|
||||
{}
|
||||
|
||||
QuerySyncPicScheduleRequest::~QuerySyncPicScheduleRequest()
|
||||
{}
|
||||
|
||||
std::string QuerySyncPicScheduleRequest::getIotId()const
|
||||
{
|
||||
return iotId_;
|
||||
}
|
||||
|
||||
void QuerySyncPicScheduleRequest::setIotId(const std::string& iotId)
|
||||
{
|
||||
iotId_ = iotId;
|
||||
setParameter("IotId", iotId);
|
||||
}
|
||||
|
||||
74
linkface/src/model/QuerySyncPicScheduleResult.cc
Normal file
74
linkface/src/model/QuerySyncPicScheduleResult.cc
Normal file
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* 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/QuerySyncPicScheduleResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::LinkFace;
|
||||
using namespace AlibabaCloud::LinkFace::Model;
|
||||
|
||||
QuerySyncPicScheduleResult::QuerySyncPicScheduleResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
QuerySyncPicScheduleResult::QuerySyncPicScheduleResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
QuerySyncPicScheduleResult::~QuerySyncPicScheduleResult()
|
||||
{}
|
||||
|
||||
void QuerySyncPicScheduleResult::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["Rate"].isNull())
|
||||
data_.rate = std::stof(dataNode["Rate"].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 QuerySyncPicScheduleResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
QuerySyncPicScheduleResult::Data QuerySyncPicScheduleResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
int QuerySyncPicScheduleResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool QuerySyncPicScheduleResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
60
linkface/src/model/RegisterFaceRequest.cc
Normal file
60
linkface/src/model/RegisterFaceRequest.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/RegisterFaceRequest.h>
|
||||
|
||||
using AlibabaCloud::LinkFace::Model::RegisterFaceRequest;
|
||||
|
||||
RegisterFaceRequest::RegisterFaceRequest() :
|
||||
RpcServiceRequest("linkface", "2018-07-20", "RegisterFace")
|
||||
{}
|
||||
|
||||
RegisterFaceRequest::~RegisterFaceRequest()
|
||||
{}
|
||||
|
||||
std::string RegisterFaceRequest::getImage()const
|
||||
{
|
||||
return image_;
|
||||
}
|
||||
|
||||
void RegisterFaceRequest::setImage(const std::string& image)
|
||||
{
|
||||
image_ = image;
|
||||
setParameter("Image", image);
|
||||
}
|
||||
|
||||
std::string RegisterFaceRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void RegisterFaceRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string RegisterFaceRequest::getUserId()const
|
||||
{
|
||||
return userId_;
|
||||
}
|
||||
|
||||
void RegisterFaceRequest::setUserId(const std::string& userId)
|
||||
{
|
||||
userId_ = userId;
|
||||
setParameter("UserId", userId);
|
||||
}
|
||||
|
||||
66
linkface/src/model/RegisterFaceResult.cc
Normal file
66
linkface/src/model/RegisterFaceResult.cc
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* 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/RegisterFaceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::LinkFace;
|
||||
using namespace AlibabaCloud::LinkFace::Model;
|
||||
|
||||
RegisterFaceResult::RegisterFaceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RegisterFaceResult::RegisterFaceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RegisterFaceResult::~RegisterFaceResult()
|
||||
{}
|
||||
|
||||
void RegisterFaceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
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 RegisterFaceResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int RegisterFaceResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool RegisterFaceResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
49
linkface/src/model/SyncFacePicturesRequest.cc
Normal file
49
linkface/src/model/SyncFacePicturesRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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/SyncFacePicturesRequest.h>
|
||||
|
||||
using AlibabaCloud::LinkFace::Model::SyncFacePicturesRequest;
|
||||
|
||||
SyncFacePicturesRequest::SyncFacePicturesRequest() :
|
||||
RpcServiceRequest("linkface", "2018-07-20", "SyncFacePictures")
|
||||
{}
|
||||
|
||||
SyncFacePicturesRequest::~SyncFacePicturesRequest()
|
||||
{}
|
||||
|
||||
std::string SyncFacePicturesRequest::getIotId()const
|
||||
{
|
||||
return iotId_;
|
||||
}
|
||||
|
||||
void SyncFacePicturesRequest::setIotId(const std::string& iotId)
|
||||
{
|
||||
iotId_ = iotId;
|
||||
setParameter("IotId", iotId);
|
||||
}
|
||||
|
||||
std::string SyncFacePicturesRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void SyncFacePicturesRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
66
linkface/src/model/SyncFacePicturesResult.cc
Normal file
66
linkface/src/model/SyncFacePicturesResult.cc
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* 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/SyncFacePicturesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::LinkFace;
|
||||
using namespace AlibabaCloud::LinkFace::Model;
|
||||
|
||||
SyncFacePicturesResult::SyncFacePicturesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
SyncFacePicturesResult::SyncFacePicturesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
SyncFacePicturesResult::~SyncFacePicturesResult()
|
||||
{}
|
||||
|
||||
void SyncFacePicturesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
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 SyncFacePicturesResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int SyncFacePicturesResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool SyncFacePicturesResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
49
linkface/src/model/UnlinkFaceRequest.cc
Normal file
49
linkface/src/model/UnlinkFaceRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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/UnlinkFaceRequest.h>
|
||||
|
||||
using AlibabaCloud::LinkFace::Model::UnlinkFaceRequest;
|
||||
|
||||
UnlinkFaceRequest::UnlinkFaceRequest() :
|
||||
RpcServiceRequest("linkface", "2018-07-20", "UnlinkFace")
|
||||
{}
|
||||
|
||||
UnlinkFaceRequest::~UnlinkFaceRequest()
|
||||
{}
|
||||
|
||||
std::string UnlinkFaceRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void UnlinkFaceRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string UnlinkFaceRequest::getUserId()const
|
||||
{
|
||||
return userId_;
|
||||
}
|
||||
|
||||
void UnlinkFaceRequest::setUserId(const std::string& userId)
|
||||
{
|
||||
userId_ = userId;
|
||||
setParameter("UserId", userId);
|
||||
}
|
||||
|
||||
66
linkface/src/model/UnlinkFaceResult.cc
Normal file
66
linkface/src/model/UnlinkFaceResult.cc
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* 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/UnlinkFaceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::LinkFace;
|
||||
using namespace AlibabaCloud::LinkFace::Model;
|
||||
|
||||
UnlinkFaceResult::UnlinkFaceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UnlinkFaceResult::UnlinkFaceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UnlinkFaceResult::~UnlinkFaceResult()
|
||||
{}
|
||||
|
||||
void UnlinkFaceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
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 UnlinkFaceResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int UnlinkFaceResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool UnlinkFaceResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
49
linkface/src/model/UpdateFaceRequest.cc
Normal file
49
linkface/src/model/UpdateFaceRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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/UpdateFaceRequest.h>
|
||||
|
||||
using AlibabaCloud::LinkFace::Model::UpdateFaceRequest;
|
||||
|
||||
UpdateFaceRequest::UpdateFaceRequest() :
|
||||
RpcServiceRequest("linkface", "2018-07-20", "UpdateFace")
|
||||
{}
|
||||
|
||||
UpdateFaceRequest::~UpdateFaceRequest()
|
||||
{}
|
||||
|
||||
std::string UpdateFaceRequest::getImage()const
|
||||
{
|
||||
return image_;
|
||||
}
|
||||
|
||||
void UpdateFaceRequest::setImage(const std::string& image)
|
||||
{
|
||||
image_ = image;
|
||||
setParameter("Image", image);
|
||||
}
|
||||
|
||||
std::string UpdateFaceRequest::getUserId()const
|
||||
{
|
||||
return userId_;
|
||||
}
|
||||
|
||||
void UpdateFaceRequest::setUserId(const std::string& userId)
|
||||
{
|
||||
userId_ = userId;
|
||||
setParameter("UserId", userId);
|
||||
}
|
||||
|
||||
66
linkface/src/model/UpdateFaceResult.cc
Normal file
66
linkface/src/model/UpdateFaceResult.cc
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* 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/UpdateFaceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::LinkFace;
|
||||
using namespace AlibabaCloud::LinkFace::Model;
|
||||
|
||||
UpdateFaceResult::UpdateFaceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateFaceResult::UpdateFaceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateFaceResult::~UpdateFaceResult()
|
||||
{}
|
||||
|
||||
void UpdateFaceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
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 UpdateFaceResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int UpdateFaceResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool UpdateFaceResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user