Add list person visit count API.

This commit is contained in:
sdk-team
2020-08-20 12:16:19 +08:00
parent b9a879f696
commit 5255330d62
9 changed files with 425 additions and 1 deletions

View File

@@ -1,3 +1,6 @@
2020-08-20 Version: 1.36.602
- Add list person visit count API.
2020-08-20 Version: 1.36.601
- Added Global Distribute Cache OpenAPIs.
- Added direct connection OpenAPIs.

View File

@@ -1 +1 @@
1.36.601
1.36.602

View File

@@ -93,6 +93,8 @@ set(vcs_public_header_model
include/alibabacloud/vcs/model/ListMotorAlgorithmResultsResult.h
include/alibabacloud/vcs/model/ListPersonTraceRequest.h
include/alibabacloud/vcs/model/ListPersonTraceResult.h
include/alibabacloud/vcs/model/ListPersonVisitCountRequest.h
include/alibabacloud/vcs/model/ListPersonVisitCountResult.h
include/alibabacloud/vcs/model/ListPersonsRequest.h
include/alibabacloud/vcs/model/ListPersonsResult.h
include/alibabacloud/vcs/model/RecognizeFaceQualityRequest.h
@@ -196,6 +198,8 @@ set(vcs_src
src/model/ListMotorAlgorithmResultsResult.cc
src/model/ListPersonTraceRequest.cc
src/model/ListPersonTraceResult.cc
src/model/ListPersonVisitCountRequest.cc
src/model/ListPersonVisitCountResult.cc
src/model/ListPersonsRequest.cc
src/model/ListPersonsResult.cc
src/model/RecognizeFaceQualityRequest.cc

View File

@@ -94,6 +94,8 @@
#include "model/ListMotorAlgorithmResultsResult.h"
#include "model/ListPersonTraceRequest.h"
#include "model/ListPersonTraceResult.h"
#include "model/ListPersonVisitCountRequest.h"
#include "model/ListPersonVisitCountResult.h"
#include "model/ListPersonsRequest.h"
#include "model/ListPersonsResult.h"
#include "model/RecognizeFaceQualityRequest.h"
@@ -239,6 +241,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::ListPersonTraceResult> ListPersonTraceOutcome;
typedef std::future<ListPersonTraceOutcome> ListPersonTraceOutcomeCallable;
typedef std::function<void(const VcsClient*, const Model::ListPersonTraceRequest&, const ListPersonTraceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListPersonTraceAsyncHandler;
typedef Outcome<Error, Model::ListPersonVisitCountResult> ListPersonVisitCountOutcome;
typedef std::future<ListPersonVisitCountOutcome> ListPersonVisitCountOutcomeCallable;
typedef std::function<void(const VcsClient*, const Model::ListPersonVisitCountRequest&, const ListPersonVisitCountOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListPersonVisitCountAsyncHandler;
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;
@@ -394,6 +399,9 @@ namespace AlibabaCloud
ListPersonTraceOutcome listPersonTrace(const Model::ListPersonTraceRequest &request)const;
void listPersonTraceAsync(const Model::ListPersonTraceRequest& request, const ListPersonTraceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListPersonTraceOutcomeCallable listPersonTraceCallable(const Model::ListPersonTraceRequest& request) const;
ListPersonVisitCountOutcome listPersonVisitCount(const Model::ListPersonVisitCountRequest &request)const;
void listPersonVisitCountAsync(const Model::ListPersonVisitCountRequest& request, const ListPersonVisitCountAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListPersonVisitCountOutcomeCallable listPersonVisitCountCallable(const Model::ListPersonVisitCountRequest& 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;

View File

@@ -0,0 +1,69 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_VCS_MODEL_LISTPERSONVISITCOUNTREQUEST_H_
#define ALIBABACLOUD_VCS_MODEL_LISTPERSONVISITCOUNTREQUEST_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 ListPersonVisitCountRequest : public RpcServiceRequest
{
public:
ListPersonVisitCountRequest();
~ListPersonVisitCountRequest();
std::string getCorpId()const;
void setCorpId(const std::string& corpId);
std::string getEndTime()const;
void setEndTime(const std::string& endTime);
std::string getStartTime()const;
void setStartTime(const std::string& startTime);
int getPageNumber()const;
void setPageNumber(int pageNumber);
std::string getTimeAggregateType()const;
void setTimeAggregateType(const std::string& timeAggregateType);
std::string getTagCode()const;
void setTagCode(const std::string& tagCode);
int getPageSize()const;
void setPageSize(int pageSize);
std::string getAggregateType()const;
void setAggregateType(const std::string& aggregateType);
private:
std::string corpId_;
std::string endTime_;
std::string startTime_;
int pageNumber_;
std::string timeAggregateType_;
std::string tagCode_;
int pageSize_;
std::string aggregateType_;
};
}
}
}
#endif // !ALIBABACLOUD_VCS_MODEL_LISTPERSONVISITCOUNTREQUEST_H_

View 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.
*/
#ifndef ALIBABACLOUD_VCS_MODEL_LISTPERSONVISITCOUNTRESULT_H_
#define ALIBABACLOUD_VCS_MODEL_LISTPERSONVISITCOUNTRESULT_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 ListPersonVisitCountResult : public ServiceResult
{
public:
struct Datas
{
std::string corpId;
std::string personId;
std::string deviceId;
std::string tagMetrics;
std::string tagCode;
std::string dayId;
std::string groupId;
std::string hourId;
};
ListPersonVisitCountResult();
explicit ListPersonVisitCountResult(const std::string &payload);
~ListPersonVisitCountResult();
std::string getTotalCount()const;
std::string getMessage()const;
std::string getPageSize()const;
std::vector<Datas> getData()const;
std::string getPageNo()const;
std::string getCode()const;
std::string getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string totalCount_;
std::string message_;
std::string pageSize_;
std::vector<Datas> data_;
std::string pageNo_;
std::string code_;
std::string success_;
};
}
}
}
#endif // !ALIBABACLOUD_VCS_MODEL_LISTPERSONVISITCOUNTRESULT_H_

View File

@@ -1347,6 +1347,42 @@ VcsClient::ListPersonTraceOutcomeCallable VcsClient::listPersonTraceCallable(con
return task->get_future();
}
VcsClient::ListPersonVisitCountOutcome VcsClient::listPersonVisitCount(const ListPersonVisitCountRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListPersonVisitCountOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListPersonVisitCountOutcome(ListPersonVisitCountResult(outcome.result()));
else
return ListPersonVisitCountOutcome(outcome.error());
}
void VcsClient::listPersonVisitCountAsync(const ListPersonVisitCountRequest& request, const ListPersonVisitCountAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listPersonVisitCount(request), context);
};
asyncExecute(new Runnable(fn));
}
VcsClient::ListPersonVisitCountOutcomeCallable VcsClient::listPersonVisitCountCallable(const ListPersonVisitCountRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListPersonVisitCountOutcome()>>(
[this, request]()
{
return this->listPersonVisitCount(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
VcsClient::ListPersonsOutcome VcsClient::listPersons(const ListPersonsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,117 @@
/*
* 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/ListPersonVisitCountRequest.h>
using AlibabaCloud::Vcs::Model::ListPersonVisitCountRequest;
ListPersonVisitCountRequest::ListPersonVisitCountRequest() :
RpcServiceRequest("vcs", "2020-05-15", "ListPersonVisitCount")
{
setMethod(HttpRequest::Method::Post);
}
ListPersonVisitCountRequest::~ListPersonVisitCountRequest()
{}
std::string ListPersonVisitCountRequest::getCorpId()const
{
return corpId_;
}
void ListPersonVisitCountRequest::setCorpId(const std::string& corpId)
{
corpId_ = corpId;
setBodyParameter("CorpId", corpId);
}
std::string ListPersonVisitCountRequest::getEndTime()const
{
return endTime_;
}
void ListPersonVisitCountRequest::setEndTime(const std::string& endTime)
{
endTime_ = endTime;
setBodyParameter("EndTime", endTime);
}
std::string ListPersonVisitCountRequest::getStartTime()const
{
return startTime_;
}
void ListPersonVisitCountRequest::setStartTime(const std::string& startTime)
{
startTime_ = startTime;
setBodyParameter("StartTime", startTime);
}
int ListPersonVisitCountRequest::getPageNumber()const
{
return pageNumber_;
}
void ListPersonVisitCountRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setBodyParameter("PageNumber", std::to_string(pageNumber));
}
std::string ListPersonVisitCountRequest::getTimeAggregateType()const
{
return timeAggregateType_;
}
void ListPersonVisitCountRequest::setTimeAggregateType(const std::string& timeAggregateType)
{
timeAggregateType_ = timeAggregateType;
setBodyParameter("TimeAggregateType", timeAggregateType);
}
std::string ListPersonVisitCountRequest::getTagCode()const
{
return tagCode_;
}
void ListPersonVisitCountRequest::setTagCode(const std::string& tagCode)
{
tagCode_ = tagCode;
setBodyParameter("TagCode", tagCode);
}
int ListPersonVisitCountRequest::getPageSize()const
{
return pageSize_;
}
void ListPersonVisitCountRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setBodyParameter("PageSize", std::to_string(pageSize));
}
std::string ListPersonVisitCountRequest::getAggregateType()const
{
return aggregateType_;
}
void ListPersonVisitCountRequest::setAggregateType(const std::string& aggregateType)
{
aggregateType_ = aggregateType;
setBodyParameter("AggregateType", aggregateType);
}

View 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/vcs/model/ListPersonVisitCountResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Vcs;
using namespace AlibabaCloud::Vcs::Model;
ListPersonVisitCountResult::ListPersonVisitCountResult() :
ServiceResult()
{}
ListPersonVisitCountResult::ListPersonVisitCountResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListPersonVisitCountResult::~ListPersonVisitCountResult()
{}
void ListPersonVisitCountResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDataNode = value["Data"]["Datas"];
for (auto valueDataDatas : allDataNode)
{
Datas dataObject;
if(!valueDataDatas["CorpId"].isNull())
dataObject.corpId = valueDataDatas["CorpId"].asString();
if(!valueDataDatas["DeviceId"].isNull())
dataObject.deviceId = valueDataDatas["DeviceId"].asString();
if(!valueDataDatas["GroupId"].isNull())
dataObject.groupId = valueDataDatas["GroupId"].asString();
if(!valueDataDatas["PersonId"].isNull())
dataObject.personId = valueDataDatas["PersonId"].asString();
if(!valueDataDatas["TagCode"].isNull())
dataObject.tagCode = valueDataDatas["TagCode"].asString();
if(!valueDataDatas["TagMetrics"].isNull())
dataObject.tagMetrics = valueDataDatas["TagMetrics"].asString();
if(!valueDataDatas["HourId"].isNull())
dataObject.hourId = valueDataDatas["HourId"].asString();
if(!valueDataDatas["DayId"].isNull())
dataObject.dayId = valueDataDatas["DayId"].asString();
data_.push_back(dataObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["PageNo"].isNull())
pageNo_ = value["PageNo"].asString();
if(!value["PageSize"].isNull())
pageSize_ = value["PageSize"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString();
if(!value["TotalCount"].isNull())
totalCount_ = value["TotalCount"].asString();
}
std::string ListPersonVisitCountResult::getTotalCount()const
{
return totalCount_;
}
std::string ListPersonVisitCountResult::getMessage()const
{
return message_;
}
std::string ListPersonVisitCountResult::getPageSize()const
{
return pageSize_;
}
std::vector<ListPersonVisitCountResult::Datas> ListPersonVisitCountResult::getData()const
{
return data_;
}
std::string ListPersonVisitCountResult::getPageNo()const
{
return pageNo_;
}
std::string ListPersonVisitCountResult::getCode()const
{
return code_;
}
std::string ListPersonVisitCountResult::getSuccess()const
{
return success_;
}