Generated 2019-09-28 for reid.

This commit is contained in:
sdk-team
2019-12-31 11:38:00 +08:00
parent 7e1ad53873
commit 1e36d3c54a
11 changed files with 410 additions and 1 deletions

View File

@@ -27,6 +27,8 @@ set(reid_public_header_model
include/alibabacloud/reid/model/DescribeCursorResult.h
include/alibabacloud/reid/model/DescribeCustomerFlowByLocationRequest.h
include/alibabacloud/reid/model/DescribeCustomerFlowByLocationResult.h
include/alibabacloud/reid/model/DescribeDevicesRequest.h
include/alibabacloud/reid/model/DescribeDevicesResult.h
include/alibabacloud/reid/model/DescribeHeatMapRequest.h
include/alibabacloud/reid/model/DescribeHeatMapResult.h
include/alibabacloud/reid/model/DescribeImageUrlsRequest.h
@@ -56,6 +58,8 @@ set(reid_src
src/model/DescribeCursorResult.cc
src/model/DescribeCustomerFlowByLocationRequest.cc
src/model/DescribeCustomerFlowByLocationResult.cc
src/model/DescribeDevicesRequest.cc
src/model/DescribeDevicesResult.cc
src/model/DescribeHeatMapRequest.cc
src/model/DescribeHeatMapResult.cc
src/model/DescribeImageUrlsRequest.cc

View File

@@ -28,6 +28,8 @@
#include "model/DescribeCursorResult.h"
#include "model/DescribeCustomerFlowByLocationRequest.h"
#include "model/DescribeCustomerFlowByLocationResult.h"
#include "model/DescribeDevicesRequest.h"
#include "model/DescribeDevicesResult.h"
#include "model/DescribeHeatMapRequest.h"
#include "model/DescribeHeatMapResult.h"
#include "model/DescribeImageUrlsRequest.h"
@@ -66,6 +68,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::DescribeCustomerFlowByLocationResult> DescribeCustomerFlowByLocationOutcome;
typedef std::future<DescribeCustomerFlowByLocationOutcome> DescribeCustomerFlowByLocationOutcomeCallable;
typedef std::function<void(const ReidClient*, const Model::DescribeCustomerFlowByLocationRequest&, const DescribeCustomerFlowByLocationOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeCustomerFlowByLocationAsyncHandler;
typedef Outcome<Error, Model::DescribeDevicesResult> DescribeDevicesOutcome;
typedef std::future<DescribeDevicesOutcome> DescribeDevicesOutcomeCallable;
typedef std::function<void(const ReidClient*, const Model::DescribeDevicesRequest&, const DescribeDevicesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeDevicesAsyncHandler;
typedef Outcome<Error, Model::DescribeHeatMapResult> DescribeHeatMapOutcome;
typedef std::future<DescribeHeatMapOutcome> DescribeHeatMapOutcomeCallable;
typedef std::function<void(const ReidClient*, const Model::DescribeHeatMapRequest&, const DescribeHeatMapOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeHeatMapAsyncHandler;
@@ -110,6 +115,9 @@ namespace AlibabaCloud
DescribeCustomerFlowByLocationOutcome describeCustomerFlowByLocation(const Model::DescribeCustomerFlowByLocationRequest &request)const;
void describeCustomerFlowByLocationAsync(const Model::DescribeCustomerFlowByLocationRequest& request, const DescribeCustomerFlowByLocationAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeCustomerFlowByLocationOutcomeCallable describeCustomerFlowByLocationCallable(const Model::DescribeCustomerFlowByLocationRequest& request) const;
DescribeDevicesOutcome describeDevices(const Model::DescribeDevicesRequest &request)const;
void describeDevicesAsync(const Model::DescribeDevicesRequest& request, const DescribeDevicesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeDevicesOutcomeCallable describeDevicesCallable(const Model::DescribeDevicesRequest& request) const;
DescribeHeatMapOutcome describeHeatMap(const Model::DescribeHeatMapRequest &request)const;
void describeHeatMapAsync(const Model::DescribeHeatMapRequest& request, const DescribeHeatMapAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeHeatMapOutcomeCallable describeHeatMapCallable(const Model::DescribeHeatMapRequest& request) const;

View File

@@ -0,0 +1,48 @@
/*
* 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_REID_MODEL_DESCRIBEDEVICESREQUEST_H_
#define ALIBABACLOUD_REID_MODEL_DESCRIBEDEVICESREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/reid/ReidExport.h>
namespace AlibabaCloud
{
namespace Reid
{
namespace Model
{
class ALIBABACLOUD_REID_EXPORT DescribeDevicesRequest : public RpcServiceRequest
{
public:
DescribeDevicesRequest();
~DescribeDevicesRequest();
long getStoreId()const;
void setStoreId(long storeId);
private:
long storeId_;
};
}
}
}
#endif // !ALIBABACLOUD_REID_MODEL_DESCRIBEDEVICESREQUEST_H_

View File

@@ -0,0 +1,75 @@
/*
* 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_REID_MODEL_DESCRIBEDEVICESRESULT_H_
#define ALIBABACLOUD_REID_MODEL_DESCRIBEDEVICESRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/reid/ReidExport.h>
namespace AlibabaCloud
{
namespace Reid
{
namespace Model
{
class ALIBABACLOUD_REID_EXPORT DescribeDevicesResult : public ServiceResult
{
public:
struct Device
{
std::string agentMac;
std::string agentStatus;
std::string agentIp;
std::string ipcIp;
long ipcReceiveTime;
std::string ipcStatus;
long agentReceiveTime;
};
DescribeDevicesResult();
explicit DescribeDevicesResult(const std::string &payload);
~DescribeDevicesResult();
std::string getMessage()const;
std::string getDynamicCode()const;
std::string getErrorCode()const;
std::string getDynamicMessage()const;
std::vector<Device> getDevices()const;
std::string getErrorMessage()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
std::string dynamicCode_;
std::string errorCode_;
std::string dynamicMessage_;
std::vector<Device> devices_;
std::string errorMessage_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_REID_MODEL_DESCRIBEDEVICESRESULT_H_

View File

@@ -45,22 +45,45 @@ namespace AlibabaCloud
float stayAvgPeriodWOWPercent;
float uvAvgWOWPercent;
};
struct AccurateOverviewDetail
{
std::string stayDeepAvg;
long uv;
std::string uvEverySqm;
std::string uvEverySqmGrowthWOWPercent;
std::string uvAvg;
std::string uvWOWPercent;
std::string stayAvgPeriod;
std::string stayDeepAvgWOWPercent;
std::string stayAvgPeriodWOWPercent;
std::string uvAvgWOWPercent;
};
DescribeOverviewDataResult();
explicit DescribeOverviewDataResult(const std::string &payload);
~DescribeOverviewDataResult();
OverviewDetail getOverviewDetail()const;
std::string getMessage()const;
AccurateOverviewDetail getAccurateOverviewDetail()const;
std::string getDynamicCode()const;
std::string getErrorCode()const;
std::string getDynamicMessage()const;
std::string getErrorMessage()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
OverviewDetail overviewDetail_;
std::string message_;
AccurateOverviewDetail accurateOverviewDetail_;
std::string dynamicCode_;
std::string errorCode_;
std::string dynamicMessage_;
std::string errorMessage_;
std::string code_;
bool success_;
};

View File

@@ -159,6 +159,42 @@ ReidClient::DescribeCustomerFlowByLocationOutcomeCallable ReidClient::describeCu
return task->get_future();
}
ReidClient::DescribeDevicesOutcome ReidClient::describeDevices(const DescribeDevicesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeDevicesOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeDevicesOutcome(DescribeDevicesResult(outcome.result()));
else
return DescribeDevicesOutcome(outcome.error());
}
void ReidClient::describeDevicesAsync(const DescribeDevicesRequest& request, const DescribeDevicesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeDevices(request), context);
};
asyncExecute(new Runnable(fn));
}
ReidClient::DescribeDevicesOutcomeCallable ReidClient::describeDevicesCallable(const DescribeDevicesRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeDevicesOutcome()>>(
[this, request]()
{
return this->describeDevices(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ReidClient::DescribeHeatMapOutcome ReidClient::describeHeatMap(const DescribeHeatMapRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,40 @@
/*
* 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/reid/model/DescribeDevicesRequest.h>
using AlibabaCloud::Reid::Model::DescribeDevicesRequest;
DescribeDevicesRequest::DescribeDevicesRequest() :
RpcServiceRequest("reid", "2019-09-28", "DescribeDevices")
{
setMethod(HttpRequest::Method::Post);
}
DescribeDevicesRequest::~DescribeDevicesRequest()
{}
long DescribeDevicesRequest::getStoreId()const
{
return storeId_;
}
void DescribeDevicesRequest::setStoreId(long storeId)
{
storeId_ = storeId;
setCoreParameter("StoreId", std::to_string(storeId));
}

View File

@@ -0,0 +1,118 @@
/*
* 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/reid/model/DescribeDevicesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Reid;
using namespace AlibabaCloud::Reid::Model;
DescribeDevicesResult::DescribeDevicesResult() :
ServiceResult()
{}
DescribeDevicesResult::DescribeDevicesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeDevicesResult::~DescribeDevicesResult()
{}
void DescribeDevicesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDevicesNode = value["Devices"]["Device"];
for (auto valueDevicesDevice : allDevicesNode)
{
Device devicesObject;
if(!valueDevicesDevice["AgentStatus"].isNull())
devicesObject.agentStatus = valueDevicesDevice["AgentStatus"].asString();
if(!valueDevicesDevice["IpcStatus"].isNull())
devicesObject.ipcStatus = valueDevicesDevice["IpcStatus"].asString();
if(!valueDevicesDevice["AgentIp"].isNull())
devicesObject.agentIp = valueDevicesDevice["AgentIp"].asString();
if(!valueDevicesDevice["IpcIp"].isNull())
devicesObject.ipcIp = valueDevicesDevice["IpcIp"].asString();
if(!valueDevicesDevice["AgentReceiveTime"].isNull())
devicesObject.agentReceiveTime = std::stol(valueDevicesDevice["AgentReceiveTime"].asString());
if(!valueDevicesDevice["AgentMac"].isNull())
devicesObject.agentMac = valueDevicesDevice["AgentMac"].asString();
if(!valueDevicesDevice["IpcReceiveTime"].isNull())
devicesObject.ipcReceiveTime = std::stol(valueDevicesDevice["IpcReceiveTime"].asString());
devices_.push_back(devicesObject);
}
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["DynamicCode"].isNull())
dynamicCode_ = value["DynamicCode"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["DynamicMessage"].isNull())
dynamicMessage_ = value["DynamicMessage"].asString();
}
std::string DescribeDevicesResult::getMessage()const
{
return message_;
}
std::string DescribeDevicesResult::getDynamicCode()const
{
return dynamicCode_;
}
std::string DescribeDevicesResult::getErrorCode()const
{
return errorCode_;
}
std::string DescribeDevicesResult::getDynamicMessage()const
{
return dynamicMessage_;
}
std::vector<DescribeDevicesResult::Device> DescribeDevicesResult::getDevices()const
{
return devices_;
}
std::string DescribeDevicesResult::getErrorMessage()const
{
return errorMessage_;
}
std::string DescribeDevicesResult::getCode()const
{
return code_;
}
bool DescribeDevicesResult::getSuccess()const
{
return success_;
}

View File

@@ -60,12 +60,41 @@ void DescribeOverviewDataResult::parse(const std::string &payload)
overviewDetail_.uvAvg = std::stof(overviewDetailNode["UvAvg"].asString());
if(!overviewDetailNode["StayAvgPeriod"].isNull())
overviewDetail_.stayAvgPeriod = std::stof(overviewDetailNode["StayAvgPeriod"].asString());
auto accurateOverviewDetailNode = value["AccurateOverviewDetail"];
if(!accurateOverviewDetailNode["StayDeepAvgWOWPercent"].isNull())
accurateOverviewDetail_.stayDeepAvgWOWPercent = accurateOverviewDetailNode["StayDeepAvgWOWPercent"].asString();
if(!accurateOverviewDetailNode["StayDeepAvg"].isNull())
accurateOverviewDetail_.stayDeepAvg = accurateOverviewDetailNode["StayDeepAvg"].asString();
if(!accurateOverviewDetailNode["UvAvgWOWPercent"].isNull())
accurateOverviewDetail_.uvAvgWOWPercent = accurateOverviewDetailNode["UvAvgWOWPercent"].asString();
if(!accurateOverviewDetailNode["StayAvgPeriodWOWPercent"].isNull())
accurateOverviewDetail_.stayAvgPeriodWOWPercent = accurateOverviewDetailNode["StayAvgPeriodWOWPercent"].asString();
if(!accurateOverviewDetailNode["UvWOWPercent"].isNull())
accurateOverviewDetail_.uvWOWPercent = accurateOverviewDetailNode["UvWOWPercent"].asString();
if(!accurateOverviewDetailNode["UvEverySqmGrowthWOWPercent"].isNull())
accurateOverviewDetail_.uvEverySqmGrowthWOWPercent = accurateOverviewDetailNode["UvEverySqmGrowthWOWPercent"].asString();
if(!accurateOverviewDetailNode["Uv"].isNull())
accurateOverviewDetail_.uv = std::stol(accurateOverviewDetailNode["Uv"].asString());
if(!accurateOverviewDetailNode["UvEverySqm"].isNull())
accurateOverviewDetail_.uvEverySqm = accurateOverviewDetailNode["UvEverySqm"].asString();
if(!accurateOverviewDetailNode["UvAvg"].isNull())
accurateOverviewDetail_.uvAvg = accurateOverviewDetailNode["UvAvg"].asString();
if(!accurateOverviewDetailNode["StayAvgPeriod"].isNull())
accurateOverviewDetail_.stayAvgPeriod = accurateOverviewDetailNode["StayAvgPeriod"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["DynamicCode"].isNull())
dynamicCode_ = value["DynamicCode"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["DynamicMessage"].isNull())
dynamicMessage_ = value["DynamicMessage"].asString();
}
@@ -74,16 +103,41 @@ DescribeOverviewDataResult::OverviewDetail DescribeOverviewDataResult::getOvervi
return overviewDetail_;
}
std::string DescribeOverviewDataResult::getMessage()const
{
return message_;
}
DescribeOverviewDataResult::AccurateOverviewDetail DescribeOverviewDataResult::getAccurateOverviewDetail()const
{
return accurateOverviewDetail_;
}
std::string DescribeOverviewDataResult::getDynamicCode()const
{
return dynamicCode_;
}
std::string DescribeOverviewDataResult::getErrorCode()const
{
return errorCode_;
}
std::string DescribeOverviewDataResult::getDynamicMessage()const
{
return dynamicMessage_;
}
std::string DescribeOverviewDataResult::getErrorMessage()const
{
return errorMessage_;
}
std::string DescribeOverviewDataResult::getCode()const
{
return code_;
}
bool DescribeOverviewDataResult::getSuccess()const
{
return success_;