Add data service api, including ListAnalyticsData.

This commit is contained in:
sdk-team
2021-04-01 06:55:44 +00:00
parent e43b1b44eb
commit 731984c18d
25 changed files with 932 additions and 1 deletions

View File

@@ -260,6 +260,8 @@
#include "model/InvokeThingServiceResult.h"
#include "model/InvokeThingsServiceRequest.h"
#include "model/InvokeThingsServiceResult.h"
#include "model/ListAnalyticsDataRequest.h"
#include "model/ListAnalyticsDataResult.h"
#include "model/ListDeviceDistributeJobRequest.h"
#include "model/ListDeviceDistributeJobResult.h"
#include "model/ListDistributedDeviceRequest.h"
@@ -300,6 +302,8 @@
#include "model/NotifyAddThingTopoResult.h"
#include "model/OpenIotServiceRequest.h"
#include "model/OpenIotServiceResult.h"
#include "model/PrintByTemplateRequest.h"
#include "model/PrintByTemplateResult.h"
#include "model/PubRequest.h"
#include "model/PubResult.h"
#include "model/PubBroadcastRequest.h"
@@ -888,6 +892,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::InvokeThingsServiceResult> InvokeThingsServiceOutcome;
typedef std::future<InvokeThingsServiceOutcome> InvokeThingsServiceOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::InvokeThingsServiceRequest&, const InvokeThingsServiceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> InvokeThingsServiceAsyncHandler;
typedef Outcome<Error, Model::ListAnalyticsDataResult> ListAnalyticsDataOutcome;
typedef std::future<ListAnalyticsDataOutcome> ListAnalyticsDataOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::ListAnalyticsDataRequest&, const ListAnalyticsDataOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListAnalyticsDataAsyncHandler;
typedef Outcome<Error, Model::ListDeviceDistributeJobResult> ListDeviceDistributeJobOutcome;
typedef std::future<ListDeviceDistributeJobOutcome> ListDeviceDistributeJobOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::ListDeviceDistributeJobRequest&, const ListDeviceDistributeJobOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListDeviceDistributeJobAsyncHandler;
@@ -948,6 +955,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::OpenIotServiceResult> OpenIotServiceOutcome;
typedef std::future<OpenIotServiceOutcome> OpenIotServiceOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::OpenIotServiceRequest&, const OpenIotServiceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> OpenIotServiceAsyncHandler;
typedef Outcome<Error, Model::PrintByTemplateResult> PrintByTemplateOutcome;
typedef std::future<PrintByTemplateOutcome> PrintByTemplateOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::PrintByTemplateRequest&, const PrintByTemplateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> PrintByTemplateAsyncHandler;
typedef Outcome<Error, Model::PubResult> PubOutcome;
typedef std::future<PubOutcome> PubOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::PubRequest&, const PubOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> PubAsyncHandler;
@@ -1643,6 +1653,9 @@ namespace AlibabaCloud
InvokeThingsServiceOutcome invokeThingsService(const Model::InvokeThingsServiceRequest &request)const;
void invokeThingsServiceAsync(const Model::InvokeThingsServiceRequest& request, const InvokeThingsServiceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
InvokeThingsServiceOutcomeCallable invokeThingsServiceCallable(const Model::InvokeThingsServiceRequest& request) const;
ListAnalyticsDataOutcome listAnalyticsData(const Model::ListAnalyticsDataRequest &request)const;
void listAnalyticsDataAsync(const Model::ListAnalyticsDataRequest& request, const ListAnalyticsDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListAnalyticsDataOutcomeCallable listAnalyticsDataCallable(const Model::ListAnalyticsDataRequest& request) const;
ListDeviceDistributeJobOutcome listDeviceDistributeJob(const Model::ListDeviceDistributeJobRequest &request)const;
void listDeviceDistributeJobAsync(const Model::ListDeviceDistributeJobRequest& request, const ListDeviceDistributeJobAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListDeviceDistributeJobOutcomeCallable listDeviceDistributeJobCallable(const Model::ListDeviceDistributeJobRequest& request) const;
@@ -1703,6 +1716,9 @@ namespace AlibabaCloud
OpenIotServiceOutcome openIotService(const Model::OpenIotServiceRequest &request)const;
void openIotServiceAsync(const Model::OpenIotServiceRequest& request, const OpenIotServiceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
OpenIotServiceOutcomeCallable openIotServiceCallable(const Model::OpenIotServiceRequest& request) const;
PrintByTemplateOutcome printByTemplate(const Model::PrintByTemplateRequest &request)const;
void printByTemplateAsync(const Model::PrintByTemplateRequest& request, const PrintByTemplateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
PrintByTemplateOutcomeCallable printByTemplateCallable(const Model::PrintByTemplateRequest& request) const;
PubOutcome pub(const Model::PubRequest &request)const;
void pubAsync(const Model::PubRequest& request, const PubAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
PubOutcomeCallable pubCallable(const Model::PubRequest& request) const;

View File

@@ -35,8 +35,12 @@ namespace AlibabaCloud
CreateProductTopicRequest();
~CreateProductTopicRequest();
std::string getRealTenantId()const;
void setRealTenantId(const std::string& realTenantId);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
std::string getRealTripartiteKey()const;
void setRealTripartiteKey(const std::string& realTripartiteKey);
std::string getIotInstanceId()const;
void setIotInstanceId(const std::string& iotInstanceId);
std::string getTopicShortName()const;
@@ -53,7 +57,9 @@ namespace AlibabaCloud
void setDesc(const std::string& desc);
private:
std::string realTenantId_;
std::string accessKeyId_;
std::string realTripartiteKey_;
std::string iotInstanceId_;
std::string topicShortName_;
std::string productKey_;

View File

@@ -35,6 +35,8 @@ namespace AlibabaCloud
CreateSubscribeRelationRequest();
~CreateSubscribeRelationRequest();
std::string getRealTenantId()const;
void setRealTenantId(const std::string& realTenantId);
bool getOtaEventFlag()const;
void setOtaEventFlag(bool otaEventFlag);
bool getDeviceTopoLifeCycleFlag()const;
@@ -43,6 +45,8 @@ namespace AlibabaCloud
void setDeviceLifeCycleFlag(bool deviceLifeCycleFlag);
std::string getType()const;
void setType(const std::string& type);
std::string getRealTripartiteKey()const;
void setRealTripartiteKey(const std::string& realTripartiteKey);
std::string getIotInstanceId()const;
void setIotInstanceId(const std::string& iotInstanceId);
bool getDeviceStatusChangeFlag()const;
@@ -71,10 +75,12 @@ namespace AlibabaCloud
void setMnsConfiguration(const std::string& mnsConfiguration);
private:
std::string realTenantId_;
bool otaEventFlag_;
bool deviceTopoLifeCycleFlag_;
bool deviceLifeCycleFlag_;
std::string type_;
std::string realTripartiteKey_;
std::string iotInstanceId_;
bool deviceStatusChangeFlag_;
bool otaVersionFlag_;

View File

@@ -35,8 +35,12 @@ namespace AlibabaCloud
CreateTopicRouteTableRequest();
~CreateTopicRouteTableRequest();
std::string getRealTenantId()const;
void setRealTenantId(const std::string& realTenantId);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
std::string getRealTripartiteKey()const;
void setRealTripartiteKey(const std::string& realTripartiteKey);
std::string getIotInstanceId()const;
void setIotInstanceId(const std::string& iotInstanceId);
std::vector<std::string> getDstTopic()const;
@@ -49,7 +53,9 @@ namespace AlibabaCloud
void setSrcTopic(const std::string& srcTopic);
private:
std::string realTenantId_;
std::string accessKeyId_;
std::string realTripartiteKey_;
std::string iotInstanceId_;
std::vector<std::string> dstTopic_;
std::string apiProduct_;

View File

@@ -35,6 +35,8 @@ namespace AlibabaCloud
GenerateDeviceNameListURLRequest();
~GenerateDeviceNameListURLRequest();
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
std::string getIotInstanceId()const;
void setIotInstanceId(const std::string& iotInstanceId);
std::string getApiProduct()const;
@@ -43,6 +45,7 @@ namespace AlibabaCloud
void setApiRevision(const std::string& apiRevision);
private:
std::string accessKeyId_;
std::string iotInstanceId_;
std::string apiProduct_;
std::string apiRevision_;

View File

@@ -39,6 +39,8 @@ namespace AlibabaCloud
void setFileSuffix(const std::string& fileSuffix);
std::string getIotInstanceId()const;
void setIotInstanceId(const std::string& iotInstanceId);
std::string getFileName()const;
void setFileName(const std::string& fileName);
std::string getBizCode()const;
void setBizCode(const std::string& bizCode);
std::string getApiProduct()const;
@@ -49,6 +51,7 @@ namespace AlibabaCloud
private:
std::string fileSuffix_;
std::string iotInstanceId_;
std::string fileName_;
std::string bizCode_;
std::string apiProduct_;
std::string apiRevision_;

View File

@@ -0,0 +1,78 @@
/*
* 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_IOT_MODEL_LISTANALYTICSDATAREQUEST_H_
#define ALIBABACLOUD_IOT_MODEL_LISTANALYTICSDATAREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/iot/IotExport.h>
namespace AlibabaCloud
{
namespace Iot
{
namespace Model
{
class ALIBABACLOUD_IOT_EXPORT ListAnalyticsDataRequest : public RpcServiceRequest
{
public:
struct Condition
{
std::string fieldName;
std::string operate;
std::string betweenStart;
std::string betweenEnd;
std::string value;
};
public:
ListAnalyticsDataRequest();
~ListAnalyticsDataRequest();
int getPageNum()const;
void setPageNum(int pageNum);
std::string getIotInstanceId()const;
void setIotInstanceId(const std::string& iotInstanceId);
int getPageSize()const;
void setPageSize(int pageSize);
std::string getIsoId()const;
void setIsoId(const std::string& isoId);
std::string getApiPath()const;
void setApiPath(const std::string& apiPath);
std::vector<Condition> getCondition()const;
void setCondition(const std::vector<Condition>& condition);
std::string getApiProduct()const;
void setApiProduct(const std::string& apiProduct);
std::string getApiRevision()const;
void setApiRevision(const std::string& apiRevision);
private:
int pageNum_;
std::string iotInstanceId_;
int pageSize_;
std::string isoId_;
std::string apiPath_;
std::vector<Condition> condition_;
std::string apiProduct_;
std::string apiRevision_;
};
}
}
}
#endif // !ALIBABACLOUD_IOT_MODEL_LISTANALYTICSDATAREQUEST_H_

View File

@@ -0,0 +1,65 @@
/*
* 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_IOT_MODEL_LISTANALYTICSDATARESULT_H_
#define ALIBABACLOUD_IOT_MODEL_LISTANALYTICSDATARESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/iot/IotExport.h>
namespace AlibabaCloud
{
namespace Iot
{
namespace Model
{
class ALIBABACLOUD_IOT_EXPORT ListAnalyticsDataResult : public ServiceResult
{
public:
struct Data
{
std::string resultJson;
int pageNum;
int pageSize;
long count;
bool hasNext;
};
ListAnalyticsDataResult();
explicit ListAnalyticsDataResult(const std::string &payload);
~ListAnalyticsDataResult();
Data getData()const;
std::string getErrorMessage()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
Data data_;
std::string errorMessage_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_IOT_MODEL_LISTANALYTICSDATARESULT_H_

View File

@@ -0,0 +1,72 @@
/*
* 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_IOT_MODEL_PRINTBYTEMPLATEREQUEST_H_
#define ALIBABACLOUD_IOT_MODEL_PRINTBYTEMPLATEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/iot/IotExport.h>
namespace AlibabaCloud
{
namespace Iot
{
namespace Model
{
class ALIBABACLOUD_IOT_EXPORT PrintByTemplateRequest : public RpcServiceRequest
{
public:
PrintByTemplateRequest();
~PrintByTemplateRequest();
std::string getProjectCode()const;
void setProjectCode(const std::string& projectCode);
std::string getTemplateBizCode()const;
void setTemplateBizCode(const std::string& templateBizCode);
std::string getIotId()const;
void setIotId(const std::string& iotId);
std::string getIotInstanceId()const;
void setIotInstanceId(const std::string& iotInstanceId);
std::string getProductKey()const;
void setProductKey(const std::string& productKey);
std::string getParamsJsonString()const;
void setParamsJsonString(const std::string& paramsJsonString);
std::string getApiProduct()const;
void setApiProduct(const std::string& apiProduct);
std::string getApiRevision()const;
void setApiRevision(const std::string& apiRevision);
std::string getDeviceName()const;
void setDeviceName(const std::string& deviceName);
private:
std::string projectCode_;
std::string templateBizCode_;
std::string iotId_;
std::string iotInstanceId_;
std::string productKey_;
std::string paramsJsonString_;
std::string apiProduct_;
std::string apiRevision_;
std::string deviceName_;
};
}
}
}
#endif // !ALIBABACLOUD_IOT_MODEL_PRINTBYTEMPLATEREQUEST_H_

View File

@@ -0,0 +1,65 @@
/*
* 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_IOT_MODEL_PRINTBYTEMPLATERESULT_H_
#define ALIBABACLOUD_IOT_MODEL_PRINTBYTEMPLATERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/iot/IotExport.h>
namespace AlibabaCloud
{
namespace Iot
{
namespace Model
{
class ALIBABACLOUD_IOT_EXPORT PrintByTemplateResult : public ServiceResult
{
public:
struct Data
{
int retryCount;
std::string deviceErrorCode;
std::string id;
std::string deviceErrorMessage;
bool success;
};
PrintByTemplateResult();
explicit PrintByTemplateResult(const std::string &payload);
~PrintByTemplateResult();
Data getData()const;
std::string getErrorMessage()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
Data data_;
std::string errorMessage_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_IOT_MODEL_PRINTBYTEMPLATERESULT_H_

View File

@@ -35,8 +35,10 @@ namespace AlibabaCloud
struct ConsumerGroupClientConnectionInfo
{
std::string clientId;
int accumulatedConsumeCountPerMinute;
long onlineTime;
std::string clientIpPort;
int realTimeConsumeCountPerMinute;
};
@@ -45,9 +47,11 @@ namespace AlibabaCloud
~QueryConsumerGroupStatusResult();
std::vector<ConsumerGroupClientConnectionInfo> getClientConnectionStatusList()const;
std::string getLastConsumerTime()const;
int getAccumulatedConsumeCountPerMinute()const;
std::string getErrorMessage()const;
std::string getCode()const;
bool getSuccess()const;
int getRealTimeConsumeCountPerMinute()const;
int getAccumulationCount()const;
int getConsumerSpeed()const;
@@ -56,9 +60,11 @@ namespace AlibabaCloud
private:
std::vector<ConsumerGroupClientConnectionInfo> clientConnectionStatusList_;
std::string lastConsumerTime_;
int accumulatedConsumeCountPerMinute_;
std::string errorMessage_;
std::string code_;
bool success_;
int realTimeConsumeCountPerMinute_;
int accumulationCount_;
int consumerSpeed_;