Add persons API.
This commit is contained in:
@@ -41,10 +41,14 @@ set(vcs_public_header_model
|
||||
include/alibabacloud/vcs/model/GetInventoryResult.h
|
||||
include/alibabacloud/vcs/model/GetMonitorResultRequest.h
|
||||
include/alibabacloud/vcs/model/GetMonitorResultResult.h
|
||||
include/alibabacloud/vcs/model/GetPersonDetailRequest.h
|
||||
include/alibabacloud/vcs/model/GetPersonDetailResult.h
|
||||
include/alibabacloud/vcs/model/ListCorpsRequest.h
|
||||
include/alibabacloud/vcs/model/ListCorpsResult.h
|
||||
include/alibabacloud/vcs/model/ListDevicesRequest.h
|
||||
include/alibabacloud/vcs/model/ListDevicesResult.h
|
||||
include/alibabacloud/vcs/model/ListPersonsRequest.h
|
||||
include/alibabacloud/vcs/model/ListPersonsResult.h
|
||||
include/alibabacloud/vcs/model/RecognizeImageRequest.h
|
||||
include/alibabacloud/vcs/model/RecognizeImageResult.h
|
||||
include/alibabacloud/vcs/model/SearchBodyRequest.h
|
||||
@@ -82,10 +86,14 @@ set(vcs_src
|
||||
src/model/GetInventoryResult.cc
|
||||
src/model/GetMonitorResultRequest.cc
|
||||
src/model/GetMonitorResultResult.cc
|
||||
src/model/GetPersonDetailRequest.cc
|
||||
src/model/GetPersonDetailResult.cc
|
||||
src/model/ListCorpsRequest.cc
|
||||
src/model/ListCorpsResult.cc
|
||||
src/model/ListDevicesRequest.cc
|
||||
src/model/ListDevicesResult.cc
|
||||
src/model/ListPersonsRequest.cc
|
||||
src/model/ListPersonsResult.cc
|
||||
src/model/RecognizeImageRequest.cc
|
||||
src/model/RecognizeImageResult.cc
|
||||
src/model/SearchBodyRequest.cc
|
||||
|
||||
@@ -42,10 +42,14 @@
|
||||
#include "model/GetInventoryResult.h"
|
||||
#include "model/GetMonitorResultRequest.h"
|
||||
#include "model/GetMonitorResultResult.h"
|
||||
#include "model/GetPersonDetailRequest.h"
|
||||
#include "model/GetPersonDetailResult.h"
|
||||
#include "model/ListCorpsRequest.h"
|
||||
#include "model/ListCorpsResult.h"
|
||||
#include "model/ListDevicesRequest.h"
|
||||
#include "model/ListDevicesResult.h"
|
||||
#include "model/ListPersonsRequest.h"
|
||||
#include "model/ListPersonsResult.h"
|
||||
#include "model/RecognizeImageRequest.h"
|
||||
#include "model/RecognizeImageResult.h"
|
||||
#include "model/SearchBodyRequest.h"
|
||||
@@ -99,12 +103,18 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::GetMonitorResultResult> GetMonitorResultOutcome;
|
||||
typedef std::future<GetMonitorResultOutcome> GetMonitorResultOutcomeCallable;
|
||||
typedef std::function<void(const VcsClient*, const Model::GetMonitorResultRequest&, const GetMonitorResultOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetMonitorResultAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetPersonDetailResult> GetPersonDetailOutcome;
|
||||
typedef std::future<GetPersonDetailOutcome> GetPersonDetailOutcomeCallable;
|
||||
typedef std::function<void(const VcsClient*, const Model::GetPersonDetailRequest&, const GetPersonDetailOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetPersonDetailAsyncHandler;
|
||||
typedef Outcome<Error, Model::ListCorpsResult> ListCorpsOutcome;
|
||||
typedef std::future<ListCorpsOutcome> ListCorpsOutcomeCallable;
|
||||
typedef std::function<void(const VcsClient*, const Model::ListCorpsRequest&, const ListCorpsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListCorpsAsyncHandler;
|
||||
typedef Outcome<Error, Model::ListDevicesResult> ListDevicesOutcome;
|
||||
typedef std::future<ListDevicesOutcome> ListDevicesOutcomeCallable;
|
||||
typedef std::function<void(const VcsClient*, const Model::ListDevicesRequest&, const ListDevicesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListDevicesAsyncHandler;
|
||||
typedef Outcome<Error, Model::ListPersonsResult> ListPersonsOutcome;
|
||||
typedef std::future<ListPersonsOutcome> ListPersonsOutcomeCallable;
|
||||
typedef std::function<void(const VcsClient*, const Model::ListPersonsRequest&, const ListPersonsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListPersonsAsyncHandler;
|
||||
typedef Outcome<Error, Model::RecognizeImageResult> RecognizeImageOutcome;
|
||||
typedef std::future<RecognizeImageOutcome> RecognizeImageOutcomeCallable;
|
||||
typedef std::function<void(const VcsClient*, const Model::RecognizeImageRequest&, const RecognizeImageOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeImageAsyncHandler;
|
||||
@@ -161,12 +171,18 @@ namespace AlibabaCloud
|
||||
GetMonitorResultOutcome getMonitorResult(const Model::GetMonitorResultRequest &request)const;
|
||||
void getMonitorResultAsync(const Model::GetMonitorResultRequest& request, const GetMonitorResultAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetMonitorResultOutcomeCallable getMonitorResultCallable(const Model::GetMonitorResultRequest& request) const;
|
||||
GetPersonDetailOutcome getPersonDetail(const Model::GetPersonDetailRequest &request)const;
|
||||
void getPersonDetailAsync(const Model::GetPersonDetailRequest& request, const GetPersonDetailAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetPersonDetailOutcomeCallable getPersonDetailCallable(const Model::GetPersonDetailRequest& request) const;
|
||||
ListCorpsOutcome listCorps(const Model::ListCorpsRequest &request)const;
|
||||
void listCorpsAsync(const Model::ListCorpsRequest& request, const ListCorpsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListCorpsOutcomeCallable listCorpsCallable(const Model::ListCorpsRequest& request) const;
|
||||
ListDevicesOutcome listDevices(const Model::ListDevicesRequest &request)const;
|
||||
void listDevicesAsync(const Model::ListDevicesRequest& request, const ListDevicesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListDevicesOutcomeCallable listDevicesCallable(const Model::ListDevicesRequest& request) const;
|
||||
ListPersonsOutcome listPersons(const Model::ListPersonsRequest &request)const;
|
||||
void listPersonsAsync(const Model::ListPersonsRequest& request, const ListPersonsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListPersonsOutcomeCallable listPersonsCallable(const Model::ListPersonsRequest& request) const;
|
||||
RecognizeImageOutcome recognizeImage(const Model::RecognizeImageRequest &request)const;
|
||||
void recognizeImageAsync(const Model::RecognizeImageRequest& request, const RecognizeImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
RecognizeImageOutcomeCallable recognizeImageCallable(const Model::RecognizeImageRequest& request) const;
|
||||
|
||||
51
vcs/include/alibabacloud/vcs/model/GetPersonDetailRequest.h
Normal file
51
vcs/include/alibabacloud/vcs/model/GetPersonDetailRequest.h
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_VCS_MODEL_GETPERSONDETAILREQUEST_H_
|
||||
#define ALIBABACLOUD_VCS_MODEL_GETPERSONDETAILREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/vcs/VcsExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Vcs
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_VCS_EXPORT GetPersonDetailRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
GetPersonDetailRequest();
|
||||
~GetPersonDetailRequest();
|
||||
|
||||
std::string getCorpId()const;
|
||||
void setCorpId(const std::string& corpId);
|
||||
std::string getPersonID()const;
|
||||
void setPersonID(const std::string& personID);
|
||||
|
||||
private:
|
||||
std::string corpId_;
|
||||
std::string personID_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_VCS_MODEL_GETPERSONDETAILREQUEST_H_
|
||||
68
vcs/include/alibabacloud/vcs/model/GetPersonDetailResult.h
Normal file
68
vcs/include/alibabacloud/vcs/model/GetPersonDetailResult.h
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_VCS_MODEL_GETPERSONDETAILRESULT_H_
|
||||
#define ALIBABACLOUD_VCS_MODEL_GETPERSONDETAILRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/vcs/VcsExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Vcs
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_VCS_EXPORT GetPersonDetailResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct TagListItem
|
||||
{
|
||||
std::string tagName;
|
||||
std::string tagValueId;
|
||||
std::string tagCode;
|
||||
std::string tagValue;
|
||||
};
|
||||
std::string personId;
|
||||
std::vector<TagListItem> tagList;
|
||||
std::string picUrl;
|
||||
};
|
||||
|
||||
|
||||
GetPersonDetailResult();
|
||||
explicit GetPersonDetailResult(const std::string &payload);
|
||||
~GetPersonDetailResult();
|
||||
std::string getMessage()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_VCS_MODEL_GETPERSONDETAILRESULT_H_
|
||||
54
vcs/include/alibabacloud/vcs/model/ListPersonsRequest.h
Normal file
54
vcs/include/alibabacloud/vcs/model/ListPersonsRequest.h
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_VCS_MODEL_LISTPERSONSREQUEST_H_
|
||||
#define ALIBABACLOUD_VCS_MODEL_LISTPERSONSREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/vcs/VcsExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Vcs
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_VCS_EXPORT ListPersonsRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
ListPersonsRequest();
|
||||
~ListPersonsRequest();
|
||||
|
||||
std::string getCorpId()const;
|
||||
void setCorpId(const std::string& corpId);
|
||||
std::string getPageNo()const;
|
||||
void setPageNo(const std::string& pageNo);
|
||||
std::string getPageSize()const;
|
||||
void setPageSize(const std::string& pageSize);
|
||||
|
||||
private:
|
||||
std::string corpId_;
|
||||
std::string pageNo_;
|
||||
std::string pageSize_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_VCS_MODEL_LISTPERSONSREQUEST_H_
|
||||
77
vcs/include/alibabacloud/vcs/model/ListPersonsResult.h
Normal file
77
vcs/include/alibabacloud/vcs/model/ListPersonsResult.h
Normal file
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_VCS_MODEL_LISTPERSONSRESULT_H_
|
||||
#define ALIBABACLOUD_VCS_MODEL_LISTPERSONSRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/vcs/VcsExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Vcs
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_VCS_EXPORT ListPersonsResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct RecordsItem
|
||||
{
|
||||
struct TagListItem
|
||||
{
|
||||
std::string tagName;
|
||||
std::string tagValueId;
|
||||
std::string tagCode;
|
||||
std::string tagValue;
|
||||
};
|
||||
std::string firstAppearTime;
|
||||
std::string personId;
|
||||
std::vector<RecordsItem::TagListItem> tagList;
|
||||
std::string picUrl;
|
||||
};
|
||||
std::string totalCount;
|
||||
std::string pageSize;
|
||||
std::string totalPage;
|
||||
std::string pageNo;
|
||||
std::vector<RecordsItem> records;
|
||||
};
|
||||
|
||||
|
||||
ListPersonsResult();
|
||||
explicit ListPersonsResult(const std::string &payload);
|
||||
~ListPersonsResult();
|
||||
std::string getMessage()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_VCS_MODEL_LISTPERSONSRESULT_H_
|
||||
@@ -411,6 +411,42 @@ VcsClient::GetMonitorResultOutcomeCallable VcsClient::getMonitorResultCallable(c
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
VcsClient::GetPersonDetailOutcome VcsClient::getPersonDetail(const GetPersonDetailRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetPersonDetailOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetPersonDetailOutcome(GetPersonDetailResult(outcome.result()));
|
||||
else
|
||||
return GetPersonDetailOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void VcsClient::getPersonDetailAsync(const GetPersonDetailRequest& request, const GetPersonDetailAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getPersonDetail(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
VcsClient::GetPersonDetailOutcomeCallable VcsClient::getPersonDetailCallable(const GetPersonDetailRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetPersonDetailOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getPersonDetail(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
VcsClient::ListCorpsOutcome VcsClient::listCorps(const ListCorpsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -483,6 +519,42 @@ VcsClient::ListDevicesOutcomeCallable VcsClient::listDevicesCallable(const ListD
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
VcsClient::ListPersonsOutcome VcsClient::listPersons(const ListPersonsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListPersonsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListPersonsOutcome(ListPersonsResult(outcome.result()));
|
||||
else
|
||||
return ListPersonsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void VcsClient::listPersonsAsync(const ListPersonsRequest& request, const ListPersonsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listPersons(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
VcsClient::ListPersonsOutcomeCallable VcsClient::listPersonsCallable(const ListPersonsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListPersonsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listPersons(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
VcsClient::RecognizeImageOutcome VcsClient::recognizeImage(const RecognizeImageRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
51
vcs/src/model/GetPersonDetailRequest.cc
Normal file
51
vcs/src/model/GetPersonDetailRequest.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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/vcs/model/GetPersonDetailRequest.h>
|
||||
|
||||
using AlibabaCloud::Vcs::Model::GetPersonDetailRequest;
|
||||
|
||||
GetPersonDetailRequest::GetPersonDetailRequest() :
|
||||
RpcServiceRequest("vcs", "2020-05-15", "GetPersonDetail")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetPersonDetailRequest::~GetPersonDetailRequest()
|
||||
{}
|
||||
|
||||
std::string GetPersonDetailRequest::getCorpId()const
|
||||
{
|
||||
return corpId_;
|
||||
}
|
||||
|
||||
void GetPersonDetailRequest::setCorpId(const std::string& corpId)
|
||||
{
|
||||
corpId_ = corpId;
|
||||
setBodyParameter("CorpId", corpId);
|
||||
}
|
||||
|
||||
std::string GetPersonDetailRequest::getPersonID()const
|
||||
{
|
||||
return personID_;
|
||||
}
|
||||
|
||||
void GetPersonDetailRequest::setPersonID(const std::string& personID)
|
||||
{
|
||||
personID_ = personID;
|
||||
setBodyParameter("PersonID", personID);
|
||||
}
|
||||
|
||||
82
vcs/src/model/GetPersonDetailResult.cc
Normal file
82
vcs/src/model/GetPersonDetailResult.cc
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/vcs/model/GetPersonDetailResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Vcs;
|
||||
using namespace AlibabaCloud::Vcs::Model;
|
||||
|
||||
GetPersonDetailResult::GetPersonDetailResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetPersonDetailResult::GetPersonDetailResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetPersonDetailResult::~GetPersonDetailResult()
|
||||
{}
|
||||
|
||||
void GetPersonDetailResult::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["PicUrl"].isNull())
|
||||
data_.picUrl = dataNode["PicUrl"].asString();
|
||||
if(!dataNode["PersonId"].isNull())
|
||||
data_.personId = dataNode["PersonId"].asString();
|
||||
auto allTagListNode = dataNode["TagList"]["TagListItem"];
|
||||
for (auto dataNodeTagListTagListItem : allTagListNode)
|
||||
{
|
||||
Data::TagListItem tagListItemObject;
|
||||
if(!dataNodeTagListTagListItem["TagCode"].isNull())
|
||||
tagListItemObject.tagCode = dataNodeTagListTagListItem["TagCode"].asString();
|
||||
if(!dataNodeTagListTagListItem["TagName"].isNull())
|
||||
tagListItemObject.tagName = dataNodeTagListTagListItem["TagName"].asString();
|
||||
if(!dataNodeTagListTagListItem["TagValue"].isNull())
|
||||
tagListItemObject.tagValue = dataNodeTagListTagListItem["TagValue"].asString();
|
||||
if(!dataNodeTagListTagListItem["TagValueId"].isNull())
|
||||
tagListItemObject.tagValueId = dataNodeTagListTagListItem["TagValueId"].asString();
|
||||
data_.tagList.push_back(tagListItemObject);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetPersonDetailResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
GetPersonDetailResult::Data GetPersonDetailResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string GetPersonDetailResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
62
vcs/src/model/ListPersonsRequest.cc
Normal file
62
vcs/src/model/ListPersonsRequest.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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/vcs/model/ListPersonsRequest.h>
|
||||
|
||||
using AlibabaCloud::Vcs::Model::ListPersonsRequest;
|
||||
|
||||
ListPersonsRequest::ListPersonsRequest() :
|
||||
RpcServiceRequest("vcs", "2020-05-15", "ListPersons")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListPersonsRequest::~ListPersonsRequest()
|
||||
{}
|
||||
|
||||
std::string ListPersonsRequest::getCorpId()const
|
||||
{
|
||||
return corpId_;
|
||||
}
|
||||
|
||||
void ListPersonsRequest::setCorpId(const std::string& corpId)
|
||||
{
|
||||
corpId_ = corpId;
|
||||
setBodyParameter("CorpId", corpId);
|
||||
}
|
||||
|
||||
std::string ListPersonsRequest::getPageNo()const
|
||||
{
|
||||
return pageNo_;
|
||||
}
|
||||
|
||||
void ListPersonsRequest::setPageNo(const std::string& pageNo)
|
||||
{
|
||||
pageNo_ = pageNo;
|
||||
setBodyParameter("PageNo", pageNo);
|
||||
}
|
||||
|
||||
std::string ListPersonsRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListPersonsRequest::setPageSize(const std::string& pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setBodyParameter("PageSize", pageSize);
|
||||
}
|
||||
|
||||
98
vcs/src/model/ListPersonsResult.cc
Normal file
98
vcs/src/model/ListPersonsResult.cc
Normal file
@@ -0,0 +1,98 @@
|
||||
/*
|
||||
* 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/vcs/model/ListPersonsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Vcs;
|
||||
using namespace AlibabaCloud::Vcs::Model;
|
||||
|
||||
ListPersonsResult::ListPersonsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListPersonsResult::ListPersonsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListPersonsResult::~ListPersonsResult()
|
||||
{}
|
||||
|
||||
void ListPersonsResult::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["PageNo"].isNull())
|
||||
data_.pageNo = dataNode["PageNo"].asString();
|
||||
if(!dataNode["PageSize"].isNull())
|
||||
data_.pageSize = dataNode["PageSize"].asString();
|
||||
if(!dataNode["TotalCount"].isNull())
|
||||
data_.totalCount = dataNode["TotalCount"].asString();
|
||||
if(!dataNode["TotalPage"].isNull())
|
||||
data_.totalPage = dataNode["TotalPage"].asString();
|
||||
auto allRecordsNode = dataNode["Records"]["RecordsItem"];
|
||||
for (auto dataNodeRecordsRecordsItem : allRecordsNode)
|
||||
{
|
||||
Data::RecordsItem recordsItemObject;
|
||||
if(!dataNodeRecordsRecordsItem["FirstAppearTime"].isNull())
|
||||
recordsItemObject.firstAppearTime = dataNodeRecordsRecordsItem["FirstAppearTime"].asString();
|
||||
if(!dataNodeRecordsRecordsItem["PersonId"].isNull())
|
||||
recordsItemObject.personId = dataNodeRecordsRecordsItem["PersonId"].asString();
|
||||
if(!dataNodeRecordsRecordsItem["PicUrl"].isNull())
|
||||
recordsItemObject.picUrl = dataNodeRecordsRecordsItem["PicUrl"].asString();
|
||||
auto allTagListNode = allRecordsNode["TagList"]["TagListItem"];
|
||||
for (auto allRecordsNodeTagListTagListItem : allTagListNode)
|
||||
{
|
||||
Data::RecordsItem::TagListItem tagListObject;
|
||||
if(!allRecordsNodeTagListTagListItem["TagCode"].isNull())
|
||||
tagListObject.tagCode = allRecordsNodeTagListTagListItem["TagCode"].asString();
|
||||
if(!allRecordsNodeTagListTagListItem["TagName"].isNull())
|
||||
tagListObject.tagName = allRecordsNodeTagListTagListItem["TagName"].asString();
|
||||
if(!allRecordsNodeTagListTagListItem["TagValue"].isNull())
|
||||
tagListObject.tagValue = allRecordsNodeTagListTagListItem["TagValue"].asString();
|
||||
if(!allRecordsNodeTagListTagListItem["TagValueId"].isNull())
|
||||
tagListObject.tagValueId = allRecordsNodeTagListTagListItem["TagValueId"].asString();
|
||||
recordsItemObject.tagList.push_back(tagListObject);
|
||||
}
|
||||
data_.records.push_back(recordsItemObject);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ListPersonsResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
ListPersonsResult::Data ListPersonsResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string ListPersonsResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user