Update TMP API, including QueryDevice, CreateThingModel, UpdateThingModel, ImportThingModelTsl, BatchPickThingModel, ListDeviceDistributeJob.

This commit is contained in:
sdk-team
2021-06-09 06:54:22 +00:00
parent 648aacf470
commit 08cc0d55f3
35 changed files with 1282 additions and 1 deletions

View File

@@ -99,6 +99,8 @@ set(iot_public_header_model
include/alibabacloud/iot/model/ClearEdgeInstanceDriverConfigsResult.h
include/alibabacloud/iot/model/CloseEdgeInstanceDeploymentRequest.h
include/alibabacloud/iot/model/CloseEdgeInstanceDeploymentResult.h
include/alibabacloud/iot/model/ConfirmOTATaskRequest.h
include/alibabacloud/iot/model/ConfirmOTATaskResult.h
include/alibabacloud/iot/model/CopyThingModelRequest.h
include/alibabacloud/iot/model/CopyThingModelResult.h
include/alibabacloud/iot/model/CreateConsumerGroupRequest.h
@@ -313,6 +315,8 @@ set(iot_public_header_model
include/alibabacloud/iot/model/ListOTAModuleVersionsByDeviceResult.h
include/alibabacloud/iot/model/ListOTATaskByJobRequest.h
include/alibabacloud/iot/model/ListOTATaskByJobResult.h
include/alibabacloud/iot/model/ListOTAUnfinishedTaskByDeviceRequest.h
include/alibabacloud/iot/model/ListOTAUnfinishedTaskByDeviceResult.h
include/alibabacloud/iot/model/ListProductByTagsRequest.h
include/alibabacloud/iot/model/ListProductByTagsResult.h
include/alibabacloud/iot/model/ListProductTagsRequest.h
@@ -393,6 +397,8 @@ set(iot_public_header_model
include/alibabacloud/iot/model/QueryDeviceGroupListResult.h
include/alibabacloud/iot/model/QueryDeviceGroupTagListRequest.h
include/alibabacloud/iot/model/QueryDeviceGroupTagListResult.h
include/alibabacloud/iot/model/QueryDeviceInfoRequest.h
include/alibabacloud/iot/model/QueryDeviceInfoResult.h
include/alibabacloud/iot/model/QueryDeviceListByDeviceGroupRequest.h
include/alibabacloud/iot/model/QueryDeviceListByDeviceGroupResult.h
include/alibabacloud/iot/model/QueryDeviceOriginalEventDataRequest.h
@@ -680,6 +686,8 @@ set(iot_src
src/model/ClearEdgeInstanceDriverConfigsResult.cc
src/model/CloseEdgeInstanceDeploymentRequest.cc
src/model/CloseEdgeInstanceDeploymentResult.cc
src/model/ConfirmOTATaskRequest.cc
src/model/ConfirmOTATaskResult.cc
src/model/CopyThingModelRequest.cc
src/model/CopyThingModelResult.cc
src/model/CreateConsumerGroupRequest.cc
@@ -894,6 +902,8 @@ set(iot_src
src/model/ListOTAModuleVersionsByDeviceResult.cc
src/model/ListOTATaskByJobRequest.cc
src/model/ListOTATaskByJobResult.cc
src/model/ListOTAUnfinishedTaskByDeviceRequest.cc
src/model/ListOTAUnfinishedTaskByDeviceResult.cc
src/model/ListProductByTagsRequest.cc
src/model/ListProductByTagsResult.cc
src/model/ListProductTagsRequest.cc
@@ -974,6 +984,8 @@ set(iot_src
src/model/QueryDeviceGroupListResult.cc
src/model/QueryDeviceGroupTagListRequest.cc
src/model/QueryDeviceGroupTagListResult.cc
src/model/QueryDeviceInfoRequest.cc
src/model/QueryDeviceInfoResult.cc
src/model/QueryDeviceListByDeviceGroupRequest.cc
src/model/QueryDeviceListByDeviceGroupResult.cc
src/model/QueryDeviceOriginalEventDataRequest.cc

View File

@@ -100,6 +100,8 @@
#include "model/ClearEdgeInstanceDriverConfigsResult.h"
#include "model/CloseEdgeInstanceDeploymentRequest.h"
#include "model/CloseEdgeInstanceDeploymentResult.h"
#include "model/ConfirmOTATaskRequest.h"
#include "model/ConfirmOTATaskResult.h"
#include "model/CopyThingModelRequest.h"
#include "model/CopyThingModelResult.h"
#include "model/CreateConsumerGroupRequest.h"
@@ -314,6 +316,8 @@
#include "model/ListOTAModuleVersionsByDeviceResult.h"
#include "model/ListOTATaskByJobRequest.h"
#include "model/ListOTATaskByJobResult.h"
#include "model/ListOTAUnfinishedTaskByDeviceRequest.h"
#include "model/ListOTAUnfinishedTaskByDeviceResult.h"
#include "model/ListProductByTagsRequest.h"
#include "model/ListProductByTagsResult.h"
#include "model/ListProductTagsRequest.h"
@@ -394,6 +398,8 @@
#include "model/QueryDeviceGroupListResult.h"
#include "model/QueryDeviceGroupTagListRequest.h"
#include "model/QueryDeviceGroupTagListResult.h"
#include "model/QueryDeviceInfoRequest.h"
#include "model/QueryDeviceInfoResult.h"
#include "model/QueryDeviceListByDeviceGroupRequest.h"
#include "model/QueryDeviceListByDeviceGroupResult.h"
#include "model/QueryDeviceOriginalEventDataRequest.h"
@@ -726,6 +732,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::CloseEdgeInstanceDeploymentResult> CloseEdgeInstanceDeploymentOutcome;
typedef std::future<CloseEdgeInstanceDeploymentOutcome> CloseEdgeInstanceDeploymentOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::CloseEdgeInstanceDeploymentRequest&, const CloseEdgeInstanceDeploymentOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CloseEdgeInstanceDeploymentAsyncHandler;
typedef Outcome<Error, Model::ConfirmOTATaskResult> ConfirmOTATaskOutcome;
typedef std::future<ConfirmOTATaskOutcome> ConfirmOTATaskOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::ConfirmOTATaskRequest&, const ConfirmOTATaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ConfirmOTATaskAsyncHandler;
typedef Outcome<Error, Model::CopyThingModelResult> CopyThingModelOutcome;
typedef std::future<CopyThingModelOutcome> CopyThingModelOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::CopyThingModelRequest&, const CopyThingModelOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CopyThingModelAsyncHandler;
@@ -1047,6 +1056,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::ListOTATaskByJobResult> ListOTATaskByJobOutcome;
typedef std::future<ListOTATaskByJobOutcome> ListOTATaskByJobOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::ListOTATaskByJobRequest&, const ListOTATaskByJobOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListOTATaskByJobAsyncHandler;
typedef Outcome<Error, Model::ListOTAUnfinishedTaskByDeviceResult> ListOTAUnfinishedTaskByDeviceOutcome;
typedef std::future<ListOTAUnfinishedTaskByDeviceOutcome> ListOTAUnfinishedTaskByDeviceOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::ListOTAUnfinishedTaskByDeviceRequest&, const ListOTAUnfinishedTaskByDeviceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListOTAUnfinishedTaskByDeviceAsyncHandler;
typedef Outcome<Error, Model::ListProductByTagsResult> ListProductByTagsOutcome;
typedef std::future<ListProductByTagsOutcome> ListProductByTagsOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::ListProductByTagsRequest&, const ListProductByTagsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListProductByTagsAsyncHandler;
@@ -1167,6 +1179,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::QueryDeviceGroupTagListResult> QueryDeviceGroupTagListOutcome;
typedef std::future<QueryDeviceGroupTagListOutcome> QueryDeviceGroupTagListOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::QueryDeviceGroupTagListRequest&, const QueryDeviceGroupTagListOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryDeviceGroupTagListAsyncHandler;
typedef Outcome<Error, Model::QueryDeviceInfoResult> QueryDeviceInfoOutcome;
typedef std::future<QueryDeviceInfoOutcome> QueryDeviceInfoOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::QueryDeviceInfoRequest&, const QueryDeviceInfoOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryDeviceInfoAsyncHandler;
typedef Outcome<Error, Model::QueryDeviceListByDeviceGroupResult> QueryDeviceListByDeviceGroupOutcome;
typedef std::future<QueryDeviceListByDeviceGroupOutcome> QueryDeviceListByDeviceGroupOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::QueryDeviceListByDeviceGroupRequest&, const QueryDeviceListByDeviceGroupOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryDeviceListByDeviceGroupAsyncHandler;
@@ -1598,6 +1613,9 @@ namespace AlibabaCloud
CloseEdgeInstanceDeploymentOutcome closeEdgeInstanceDeployment(const Model::CloseEdgeInstanceDeploymentRequest &request)const;
void closeEdgeInstanceDeploymentAsync(const Model::CloseEdgeInstanceDeploymentRequest& request, const CloseEdgeInstanceDeploymentAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CloseEdgeInstanceDeploymentOutcomeCallable closeEdgeInstanceDeploymentCallable(const Model::CloseEdgeInstanceDeploymentRequest& request) const;
ConfirmOTATaskOutcome confirmOTATask(const Model::ConfirmOTATaskRequest &request)const;
void confirmOTATaskAsync(const Model::ConfirmOTATaskRequest& request, const ConfirmOTATaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ConfirmOTATaskOutcomeCallable confirmOTATaskCallable(const Model::ConfirmOTATaskRequest& request) const;
CopyThingModelOutcome copyThingModel(const Model::CopyThingModelRequest &request)const;
void copyThingModelAsync(const Model::CopyThingModelRequest& request, const CopyThingModelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CopyThingModelOutcomeCallable copyThingModelCallable(const Model::CopyThingModelRequest& request) const;
@@ -1919,6 +1937,9 @@ namespace AlibabaCloud
ListOTATaskByJobOutcome listOTATaskByJob(const Model::ListOTATaskByJobRequest &request)const;
void listOTATaskByJobAsync(const Model::ListOTATaskByJobRequest& request, const ListOTATaskByJobAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListOTATaskByJobOutcomeCallable listOTATaskByJobCallable(const Model::ListOTATaskByJobRequest& request) const;
ListOTAUnfinishedTaskByDeviceOutcome listOTAUnfinishedTaskByDevice(const Model::ListOTAUnfinishedTaskByDeviceRequest &request)const;
void listOTAUnfinishedTaskByDeviceAsync(const Model::ListOTAUnfinishedTaskByDeviceRequest& request, const ListOTAUnfinishedTaskByDeviceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListOTAUnfinishedTaskByDeviceOutcomeCallable listOTAUnfinishedTaskByDeviceCallable(const Model::ListOTAUnfinishedTaskByDeviceRequest& request) const;
ListProductByTagsOutcome listProductByTags(const Model::ListProductByTagsRequest &request)const;
void listProductByTagsAsync(const Model::ListProductByTagsRequest& request, const ListProductByTagsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListProductByTagsOutcomeCallable listProductByTagsCallable(const Model::ListProductByTagsRequest& request) const;
@@ -2039,6 +2060,9 @@ namespace AlibabaCloud
QueryDeviceGroupTagListOutcome queryDeviceGroupTagList(const Model::QueryDeviceGroupTagListRequest &request)const;
void queryDeviceGroupTagListAsync(const Model::QueryDeviceGroupTagListRequest& request, const QueryDeviceGroupTagListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
QueryDeviceGroupTagListOutcomeCallable queryDeviceGroupTagListCallable(const Model::QueryDeviceGroupTagListRequest& request) const;
QueryDeviceInfoOutcome queryDeviceInfo(const Model::QueryDeviceInfoRequest &request)const;
void queryDeviceInfoAsync(const Model::QueryDeviceInfoRequest& request, const QueryDeviceInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
QueryDeviceInfoOutcomeCallable queryDeviceInfoCallable(const Model::QueryDeviceInfoRequest& request) const;
QueryDeviceListByDeviceGroupOutcome queryDeviceListByDeviceGroup(const Model::QueryDeviceListByDeviceGroupRequest &request)const;
void queryDeviceListByDeviceGroupAsync(const Model::QueryDeviceListByDeviceGroupRequest& request, const QueryDeviceListByDeviceGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
QueryDeviceListByDeviceGroupOutcomeCallable queryDeviceListByDeviceGroupCallable(const Model::QueryDeviceListByDeviceGroupRequest& request) const;

View File

@@ -41,6 +41,8 @@ namespace AlibabaCloud
void setAccessKeyId(const std::string& accessKeyId);
std::string getJobId()const;
void setJobId(const std::string& jobId);
bool getCancelUnconfirmedTask()const;
void setCancelUnconfirmedTask(bool cancelUnconfirmedTask);
std::string getIotInstanceId()const;
void setIotInstanceId(const std::string& iotInstanceId);
bool getCancelQueuedTask()const;
@@ -58,6 +60,7 @@ namespace AlibabaCloud
bool cancelScheduledTask_;
std::string accessKeyId_;
std::string jobId_;
bool cancelUnconfirmedTask_;
std::string iotInstanceId_;
bool cancelQueuedTask_;
bool cancelInProgressTask_;

View 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.
*/
#ifndef ALIBABACLOUD_IOT_MODEL_CONFIRMOTATASKREQUEST_H_
#define ALIBABACLOUD_IOT_MODEL_CONFIRMOTATASKREQUEST_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 ConfirmOTATaskRequest : public RpcServiceRequest
{
public:
ConfirmOTATaskRequest();
~ConfirmOTATaskRequest();
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
std::string getIotInstanceId()const;
void setIotInstanceId(const std::string& iotInstanceId);
std::vector<std::string> getTaskId()const;
void setTaskId(const std::vector<std::string>& taskId);
std::string getApiProduct()const;
void setApiProduct(const std::string& apiProduct);
std::string getApiRevision()const;
void setApiRevision(const std::string& apiRevision);
private:
std::string accessKeyId_;
std::string iotInstanceId_;
std::vector<std::string> taskId_;
std::string apiProduct_;
std::string apiRevision_;
};
}
}
}
#endif // !ALIBABACLOUD_IOT_MODEL_CONFIRMOTATASKREQUEST_H_

View File

@@ -0,0 +1,55 @@
/*
* 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_CONFIRMOTATASKRESULT_H_
#define ALIBABACLOUD_IOT_MODEL_CONFIRMOTATASKRESULT_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 ConfirmOTATaskResult : public ServiceResult
{
public:
ConfirmOTATaskResult();
explicit ConfirmOTATaskResult(const std::string &payload);
~ConfirmOTATaskResult();
std::string getErrorMessage()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string errorMessage_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_IOT_MODEL_CONFIRMOTATASKRESULT_H_

View File

@@ -47,8 +47,12 @@ namespace AlibabaCloud
void setRetryCount(int retryCount);
int getTimeoutInMinutes()const;
void setTimeoutInMinutes(int timeoutInMinutes);
bool getNeedConfirm()const;
void setNeedConfirm(bool needConfirm);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
bool getNeedPush()const;
void setNeedPush(bool needPush);
std::string getIotInstanceId()const;
void setIotInstanceId(const std::string& iotInstanceId);
std::vector<Tag> getTag()const;
@@ -74,7 +78,9 @@ namespace AlibabaCloud
int dynamicMode_;
int retryCount_;
int timeoutInMinutes_;
bool needConfirm_;
std::string accessKeyId_;
bool needPush_;
std::string iotInstanceId_;
std::vector<Tag> tag_;
std::string firmwareId_;

View File

@@ -45,8 +45,12 @@ namespace AlibabaCloud
void setRetryCount(int retryCount);
int getTimeoutInMinutes()const;
void setTimeoutInMinutes(int timeoutInMinutes);
bool getNeedConfirm()const;
void setNeedConfirm(bool needConfirm);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
bool getNeedPush()const;
void setNeedPush(bool needPush);
std::string getIotInstanceId()const;
void setIotInstanceId(const std::string& iotInstanceId);
std::string getTargetSelection()const;
@@ -83,7 +87,9 @@ namespace AlibabaCloud
private:
int retryCount_;
int timeoutInMinutes_;
bool needConfirm_;
std::string accessKeyId_;
bool needPush_;
std::string iotInstanceId_;
std::string targetSelection_;
long scheduleFinishTime_;

View File

@@ -37,8 +37,12 @@ namespace AlibabaCloud
int getTimeoutInMinutes()const;
void setTimeoutInMinutes(int timeoutInMinutes);
bool getNeedConfirm()const;
void setNeedConfirm(bool needConfirm);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
bool getNeedPush()const;
void setNeedPush(bool needPush);
std::string getIotInstanceId()const;
void setIotInstanceId(const std::string& iotInstanceId);
std::string getFirmwareId()const;
@@ -54,7 +58,9 @@ namespace AlibabaCloud
private:
int timeoutInMinutes_;
bool needConfirm_;
std::string accessKeyId_;
bool needPush_;
std::string iotInstanceId_;
std::string firmwareId_;
std::string productKey_;

View File

@@ -37,6 +37,8 @@ namespace AlibabaCloud
std::string getJobId()const;
void setJobId(const std::string& jobId);
std::string getNextToken()const;
void setNextToken(const std::string& nextToken);
int getPageSize()const;
void setPageSize(int pageSize);
int getCurrentPage()const;
@@ -52,6 +54,7 @@ namespace AlibabaCloud
private:
std::string jobId_;
std::string nextToken_;
int pageSize_;
int currentPage_;
std::string apiProduct_;

View File

@@ -55,6 +55,7 @@ namespace AlibabaCloud
std::string jobId;
std::string productKey;
};
std::string nextToken;
std::vector<Items> jobInfo;
int total;
};

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_LISTOTAUNFINISHEDTASKBYDEVICEREQUEST_H_
#define ALIBABACLOUD_IOT_MODEL_LISTOTAUNFINISHEDTASKBYDEVICEREQUEST_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 ListOTAUnfinishedTaskByDeviceRequest : public RpcServiceRequest
{
public:
ListOTAUnfinishedTaskByDeviceRequest();
~ListOTAUnfinishedTaskByDeviceRequest();
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
std::string getTaskStatus()const;
void setTaskStatus(const std::string& taskStatus);
std::string getIotId()const;
void setIotId(const std::string& iotId);
std::string getIotInstanceId()const;
void setIotInstanceId(const std::string& iotInstanceId);
std::string getModuleName()const;
void setModuleName(const std::string& moduleName);
std::string getProductKey()const;
void setProductKey(const std::string& productKey);
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 accessKeyId_;
std::string taskStatus_;
std::string iotId_;
std::string iotInstanceId_;
std::string moduleName_;
std::string productKey_;
std::string apiProduct_;
std::string apiRevision_;
std::string deviceName_;
};
}
}
}
#endif // !ALIBABACLOUD_IOT_MODEL_LISTOTAUNFINISHEDTASKBYDEVICEREQUEST_H_

View File

@@ -0,0 +1,73 @@
/*
* 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_LISTOTAUNFINISHEDTASKBYDEVICERESULT_H_
#define ALIBABACLOUD_IOT_MODEL_LISTOTAUNFINISHEDTASKBYDEVICERESULT_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 ListOTAUnfinishedTaskByDeviceResult : public ServiceResult
{
public:
struct SimpleOTATaskInfo
{
std::string taskId;
std::string productName;
std::string moduleName;
std::string firmwareId;
std::string taskStatus;
std::string iotId;
std::string utcCreate;
std::string utcModified;
std::string destVersion;
std::string productKey;
std::string jobId;
std::string deviceName;
std::string srcVersion;
};
ListOTAUnfinishedTaskByDeviceResult();
explicit ListOTAUnfinishedTaskByDeviceResult(const std::string &payload);
~ListOTAUnfinishedTaskByDeviceResult();
std::vector<SimpleOTATaskInfo> getData()const;
std::string getErrorMessage()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::vector<SimpleOTATaskInfo> data_;
std::string errorMessage_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_IOT_MODEL_LISTOTAUNFINISHEDTASKBYDEVICERESULT_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_QUERYDEVICEINFOREQUEST_H_
#define ALIBABACLOUD_IOT_MODEL_QUERYDEVICEINFOREQUEST_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 QueryDeviceInfoRequest : public RpcServiceRequest
{
public:
QueryDeviceInfoRequest();
~QueryDeviceInfoRequest();
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 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 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 realTenantId_;
std::string accessKeyId_;
std::string realTripartiteKey_;
std::string iotId_;
std::string iotInstanceId_;
std::string productKey_;
std::string apiProduct_;
std::string apiRevision_;
std::string deviceName_;
};
}
}
}
#endif // !ALIBABACLOUD_IOT_MODEL_QUERYDEVICEINFOREQUEST_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_QUERYDEVICEINFORESULT_H_
#define ALIBABACLOUD_IOT_MODEL_QUERYDEVICEINFORESULT_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 QueryDeviceInfoResult : public ServiceResult
{
public:
struct Data
{
std::string iotId;
std::string deviceSecret;
std::string productKey;
std::string deviceName;
std::string nickname;
};
QueryDeviceInfoResult();
explicit QueryDeviceInfoResult(const std::string &payload);
~QueryDeviceInfoResult();
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_QUERYDEVICEINFORESULT_H_

View File

@@ -41,6 +41,8 @@ namespace AlibabaCloud
void setAccessKeyId(const std::string& accessKeyId);
std::string getRealTripartiteKey()const;
void setRealTripartiteKey(const std::string& realTripartiteKey);
std::string getNextToken()const;
void setNextToken(const std::string& nextToken);
std::string getIotInstanceId()const;
void setIotInstanceId(const std::string& iotInstanceId);
int getPageSize()const;
@@ -58,6 +60,7 @@ namespace AlibabaCloud
std::string realTenantId_;
std::string accessKeyId_;
std::string realTripartiteKey_;
std::string nextToken_;
std::string iotInstanceId_;
int pageSize_;
int currentPage_;

View File

@@ -54,6 +54,7 @@ namespace AlibabaCloud
~QueryDeviceResult();
int getPageSize()const;
int getPageCount()const;
std::string getNextToken()const;
int getTotal()const;
std::vector<DeviceInfo> getData()const;
int getPage()const;
@@ -66,6 +67,7 @@ namespace AlibabaCloud
private:
int pageSize_;
int pageCount_;
std::string nextToken_;
int total_;
std::vector<DeviceInfo> data_;
int page_;

View File

@@ -40,6 +40,7 @@ namespace AlibabaCloud
std::string key;
};
std::string utcEndTime;
bool needPush;
int overwriteMode;
std::string firmwareId;
std::string name;
@@ -55,6 +56,7 @@ namespace AlibabaCloud
std::string utcStartTime;
std::string utcScheduleFinishTime;
std::vector<std::string> srcVersions;
bool needConfirm;
std::string jobDesc;
std::string jobType;
std::string utcCreate;

View File

@@ -1455,6 +1455,42 @@ IotClient::CloseEdgeInstanceDeploymentOutcomeCallable IotClient::closeEdgeInstan
return task->get_future();
}
IotClient::ConfirmOTATaskOutcome IotClient::confirmOTATask(const ConfirmOTATaskRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ConfirmOTATaskOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ConfirmOTATaskOutcome(ConfirmOTATaskResult(outcome.result()));
else
return ConfirmOTATaskOutcome(outcome.error());
}
void IotClient::confirmOTATaskAsync(const ConfirmOTATaskRequest& request, const ConfirmOTATaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, confirmOTATask(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::ConfirmOTATaskOutcomeCallable IotClient::confirmOTATaskCallable(const ConfirmOTATaskRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ConfirmOTATaskOutcome()>>(
[this, request]()
{
return this->confirmOTATask(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::CopyThingModelOutcome IotClient::copyThingModel(const CopyThingModelRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -5307,6 +5343,42 @@ IotClient::ListOTATaskByJobOutcomeCallable IotClient::listOTATaskByJobCallable(c
return task->get_future();
}
IotClient::ListOTAUnfinishedTaskByDeviceOutcome IotClient::listOTAUnfinishedTaskByDevice(const ListOTAUnfinishedTaskByDeviceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListOTAUnfinishedTaskByDeviceOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListOTAUnfinishedTaskByDeviceOutcome(ListOTAUnfinishedTaskByDeviceResult(outcome.result()));
else
return ListOTAUnfinishedTaskByDeviceOutcome(outcome.error());
}
void IotClient::listOTAUnfinishedTaskByDeviceAsync(const ListOTAUnfinishedTaskByDeviceRequest& request, const ListOTAUnfinishedTaskByDeviceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listOTAUnfinishedTaskByDevice(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::ListOTAUnfinishedTaskByDeviceOutcomeCallable IotClient::listOTAUnfinishedTaskByDeviceCallable(const ListOTAUnfinishedTaskByDeviceRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListOTAUnfinishedTaskByDeviceOutcome()>>(
[this, request]()
{
return this->listOTAUnfinishedTaskByDevice(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::ListProductByTagsOutcome IotClient::listProductByTags(const ListProductByTagsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -6747,6 +6819,42 @@ IotClient::QueryDeviceGroupTagListOutcomeCallable IotClient::queryDeviceGroupTag
return task->get_future();
}
IotClient::QueryDeviceInfoOutcome IotClient::queryDeviceInfo(const QueryDeviceInfoRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return QueryDeviceInfoOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return QueryDeviceInfoOutcome(QueryDeviceInfoResult(outcome.result()));
else
return QueryDeviceInfoOutcome(outcome.error());
}
void IotClient::queryDeviceInfoAsync(const QueryDeviceInfoRequest& request, const QueryDeviceInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, queryDeviceInfo(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::QueryDeviceInfoOutcomeCallable IotClient::queryDeviceInfoCallable(const QueryDeviceInfoRequest &request) const
{
auto task = std::make_shared<std::packaged_task<QueryDeviceInfoOutcome()>>(
[this, request]()
{
return this->queryDeviceInfo(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::QueryDeviceListByDeviceGroupOutcome IotClient::queryDeviceListByDeviceGroup(const QueryDeviceListByDeviceGroupRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -60,6 +60,17 @@ void CancelOTATaskByJobRequest::setJobId(const std::string& jobId)
setParameter("JobId", jobId);
}
bool CancelOTATaskByJobRequest::getCancelUnconfirmedTask()const
{
return cancelUnconfirmedTask_;
}
void CancelOTATaskByJobRequest::setCancelUnconfirmedTask(bool cancelUnconfirmedTask)
{
cancelUnconfirmedTask_ = cancelUnconfirmedTask;
setParameter("CancelUnconfirmedTask", cancelUnconfirmedTask ? "true" : "false");
}
std::string CancelOTATaskByJobRequest::getIotInstanceId()const
{
return iotInstanceId_;

View File

@@ -0,0 +1,86 @@
/*
* 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/iot/model/ConfirmOTATaskRequest.h>
using AlibabaCloud::Iot::Model::ConfirmOTATaskRequest;
ConfirmOTATaskRequest::ConfirmOTATaskRequest() :
RpcServiceRequest("iot", "2018-01-20", "ConfirmOTATask")
{
setMethod(HttpRequest::Method::Post);
}
ConfirmOTATaskRequest::~ConfirmOTATaskRequest()
{}
std::string ConfirmOTATaskRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void ConfirmOTATaskRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string ConfirmOTATaskRequest::getIotInstanceId()const
{
return iotInstanceId_;
}
void ConfirmOTATaskRequest::setIotInstanceId(const std::string& iotInstanceId)
{
iotInstanceId_ = iotInstanceId;
setParameter("IotInstanceId", iotInstanceId);
}
std::vector<std::string> ConfirmOTATaskRequest::getTaskId()const
{
return taskId_;
}
void ConfirmOTATaskRequest::setTaskId(const std::vector<std::string>& taskId)
{
taskId_ = taskId;
for(int dep1 = 0; dep1!= taskId.size(); dep1++) {
setParameter("TaskId."+ std::to_string(dep1), taskId.at(dep1));
}
}
std::string ConfirmOTATaskRequest::getApiProduct()const
{
return apiProduct_;
}
void ConfirmOTATaskRequest::setApiProduct(const std::string& apiProduct)
{
apiProduct_ = apiProduct;
setBodyParameter("ApiProduct", apiProduct);
}
std::string ConfirmOTATaskRequest::getApiRevision()const
{
return apiRevision_;
}
void ConfirmOTATaskRequest::setApiRevision(const std::string& apiRevision)
{
apiRevision_ = apiRevision;
setBodyParameter("ApiRevision", apiRevision);
}

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.
*/
#include <alibabacloud/iot/model/ConfirmOTATaskResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
ConfirmOTATaskResult::ConfirmOTATaskResult() :
ServiceResult()
{}
ConfirmOTATaskResult::ConfirmOTATaskResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ConfirmOTATaskResult::~ConfirmOTATaskResult()
{}
void ConfirmOTATaskResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string ConfirmOTATaskResult::getErrorMessage()const
{
return errorMessage_;
}
std::string ConfirmOTATaskResult::getCode()const
{
return code_;
}
bool ConfirmOTATaskResult::getSuccess()const
{
return success_;
}

View File

@@ -60,6 +60,17 @@ void CreateOTADynamicUpgradeJobRequest::setTimeoutInMinutes(int timeoutInMinutes
setParameter("TimeoutInMinutes", std::to_string(timeoutInMinutes));
}
bool CreateOTADynamicUpgradeJobRequest::getNeedConfirm()const
{
return needConfirm_;
}
void CreateOTADynamicUpgradeJobRequest::setNeedConfirm(bool needConfirm)
{
needConfirm_ = needConfirm;
setParameter("NeedConfirm", needConfirm ? "true" : "false");
}
std::string CreateOTADynamicUpgradeJobRequest::getAccessKeyId()const
{
return accessKeyId_;
@@ -71,6 +82,17 @@ void CreateOTADynamicUpgradeJobRequest::setAccessKeyId(const std::string& access
setParameter("AccessKeyId", accessKeyId);
}
bool CreateOTADynamicUpgradeJobRequest::getNeedPush()const
{
return needPush_;
}
void CreateOTADynamicUpgradeJobRequest::setNeedPush(bool needPush)
{
needPush_ = needPush;
setParameter("NeedPush", needPush ? "true" : "false");
}
std::string CreateOTADynamicUpgradeJobRequest::getIotInstanceId()const
{
return iotInstanceId_;

View File

@@ -49,6 +49,17 @@ void CreateOTAStaticUpgradeJobRequest::setTimeoutInMinutes(int timeoutInMinutes)
setParameter("TimeoutInMinutes", std::to_string(timeoutInMinutes));
}
bool CreateOTAStaticUpgradeJobRequest::getNeedConfirm()const
{
return needConfirm_;
}
void CreateOTAStaticUpgradeJobRequest::setNeedConfirm(bool needConfirm)
{
needConfirm_ = needConfirm;
setParameter("NeedConfirm", needConfirm ? "true" : "false");
}
std::string CreateOTAStaticUpgradeJobRequest::getAccessKeyId()const
{
return accessKeyId_;
@@ -60,6 +71,17 @@ void CreateOTAStaticUpgradeJobRequest::setAccessKeyId(const std::string& accessK
setParameter("AccessKeyId", accessKeyId);
}
bool CreateOTAStaticUpgradeJobRequest::getNeedPush()const
{
return needPush_;
}
void CreateOTAStaticUpgradeJobRequest::setNeedPush(bool needPush)
{
needPush_ = needPush;
setParameter("NeedPush", needPush ? "true" : "false");
}
std::string CreateOTAStaticUpgradeJobRequest::getIotInstanceId()const
{
return iotInstanceId_;

View File

@@ -38,6 +38,17 @@ void CreateOTAVerifyJobRequest::setTimeoutInMinutes(int timeoutInMinutes)
setParameter("TimeoutInMinutes", std::to_string(timeoutInMinutes));
}
bool CreateOTAVerifyJobRequest::getNeedConfirm()const
{
return needConfirm_;
}
void CreateOTAVerifyJobRequest::setNeedConfirm(bool needConfirm)
{
needConfirm_ = needConfirm;
setParameter("NeedConfirm", needConfirm ? "true" : "false");
}
std::string CreateOTAVerifyJobRequest::getAccessKeyId()const
{
return accessKeyId_;
@@ -49,6 +60,17 @@ void CreateOTAVerifyJobRequest::setAccessKeyId(const std::string& accessKeyId)
setParameter("AccessKeyId", accessKeyId);
}
bool CreateOTAVerifyJobRequest::getNeedPush()const
{
return needPush_;
}
void CreateOTAVerifyJobRequest::setNeedPush(bool needPush)
{
needPush_ = needPush;
setParameter("NeedPush", needPush ? "true" : "false");
}
std::string CreateOTAVerifyJobRequest::getIotInstanceId()const
{
return iotInstanceId_;

View File

@@ -38,6 +38,17 @@ void ListDeviceDistributeJobRequest::setJobId(const std::string& jobId)
setBodyParameter("JobId", jobId);
}
std::string ListDeviceDistributeJobRequest::getNextToken()const
{
return nextToken_;
}
void ListDeviceDistributeJobRequest::setNextToken(const std::string& nextToken)
{
nextToken_ = nextToken;
setParameter("NextToken", nextToken);
}
int ListDeviceDistributeJobRequest::getPageSize()const
{
return pageSize_;

View File

@@ -42,6 +42,8 @@ void ListDeviceDistributeJobResult::parse(const std::string &payload)
auto dataNode = value["Data"];
if(!dataNode["Total"].isNull())
data_.total = std::stoi(dataNode["Total"].asString());
if(!dataNode["NextToken"].isNull())
data_.nextToken = dataNode["NextToken"].asString();
auto allJobInfoNode = dataNode["JobInfo"]["items"];
for (auto dataNodeJobInfoitems : allJobInfoNode)
{

View File

@@ -0,0 +1,128 @@
/*
* 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/iot/model/ListOTAUnfinishedTaskByDeviceRequest.h>
using AlibabaCloud::Iot::Model::ListOTAUnfinishedTaskByDeviceRequest;
ListOTAUnfinishedTaskByDeviceRequest::ListOTAUnfinishedTaskByDeviceRequest() :
RpcServiceRequest("iot", "2018-01-20", "ListOTAUnfinishedTaskByDevice")
{
setMethod(HttpRequest::Method::Post);
}
ListOTAUnfinishedTaskByDeviceRequest::~ListOTAUnfinishedTaskByDeviceRequest()
{}
std::string ListOTAUnfinishedTaskByDeviceRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void ListOTAUnfinishedTaskByDeviceRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string ListOTAUnfinishedTaskByDeviceRequest::getTaskStatus()const
{
return taskStatus_;
}
void ListOTAUnfinishedTaskByDeviceRequest::setTaskStatus(const std::string& taskStatus)
{
taskStatus_ = taskStatus;
setParameter("TaskStatus", taskStatus);
}
std::string ListOTAUnfinishedTaskByDeviceRequest::getIotId()const
{
return iotId_;
}
void ListOTAUnfinishedTaskByDeviceRequest::setIotId(const std::string& iotId)
{
iotId_ = iotId;
setParameter("IotId", iotId);
}
std::string ListOTAUnfinishedTaskByDeviceRequest::getIotInstanceId()const
{
return iotInstanceId_;
}
void ListOTAUnfinishedTaskByDeviceRequest::setIotInstanceId(const std::string& iotInstanceId)
{
iotInstanceId_ = iotInstanceId;
setParameter("IotInstanceId", iotInstanceId);
}
std::string ListOTAUnfinishedTaskByDeviceRequest::getModuleName()const
{
return moduleName_;
}
void ListOTAUnfinishedTaskByDeviceRequest::setModuleName(const std::string& moduleName)
{
moduleName_ = moduleName;
setParameter("ModuleName", moduleName);
}
std::string ListOTAUnfinishedTaskByDeviceRequest::getProductKey()const
{
return productKey_;
}
void ListOTAUnfinishedTaskByDeviceRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string ListOTAUnfinishedTaskByDeviceRequest::getApiProduct()const
{
return apiProduct_;
}
void ListOTAUnfinishedTaskByDeviceRequest::setApiProduct(const std::string& apiProduct)
{
apiProduct_ = apiProduct;
setBodyParameter("ApiProduct", apiProduct);
}
std::string ListOTAUnfinishedTaskByDeviceRequest::getApiRevision()const
{
return apiRevision_;
}
void ListOTAUnfinishedTaskByDeviceRequest::setApiRevision(const std::string& apiRevision)
{
apiRevision_ = apiRevision;
setBodyParameter("ApiRevision", apiRevision);
}
std::string ListOTAUnfinishedTaskByDeviceRequest::getDeviceName()const
{
return deviceName_;
}
void ListOTAUnfinishedTaskByDeviceRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}

View File

@@ -0,0 +1,102 @@
/*
* 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/iot/model/ListOTAUnfinishedTaskByDeviceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
ListOTAUnfinishedTaskByDeviceResult::ListOTAUnfinishedTaskByDeviceResult() :
ServiceResult()
{}
ListOTAUnfinishedTaskByDeviceResult::ListOTAUnfinishedTaskByDeviceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListOTAUnfinishedTaskByDeviceResult::~ListOTAUnfinishedTaskByDeviceResult()
{}
void ListOTAUnfinishedTaskByDeviceResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDataNode = value["Data"]["SimpleOTATaskInfo"];
for (auto valueDataSimpleOTATaskInfo : allDataNode)
{
SimpleOTATaskInfo dataObject;
if(!valueDataSimpleOTATaskInfo["TaskId"].isNull())
dataObject.taskId = valueDataSimpleOTATaskInfo["TaskId"].asString();
if(!valueDataSimpleOTATaskInfo["UtcModified"].isNull())
dataObject.utcModified = valueDataSimpleOTATaskInfo["UtcModified"].asString();
if(!valueDataSimpleOTATaskInfo["ProductKey"].isNull())
dataObject.productKey = valueDataSimpleOTATaskInfo["ProductKey"].asString();
if(!valueDataSimpleOTATaskInfo["TaskStatus"].isNull())
dataObject.taskStatus = valueDataSimpleOTATaskInfo["TaskStatus"].asString();
if(!valueDataSimpleOTATaskInfo["JobId"].isNull())
dataObject.jobId = valueDataSimpleOTATaskInfo["JobId"].asString();
if(!valueDataSimpleOTATaskInfo["ProductName"].isNull())
dataObject.productName = valueDataSimpleOTATaskInfo["ProductName"].asString();
if(!valueDataSimpleOTATaskInfo["DeviceName"].isNull())
dataObject.deviceName = valueDataSimpleOTATaskInfo["DeviceName"].asString();
if(!valueDataSimpleOTATaskInfo["SrcVersion"].isNull())
dataObject.srcVersion = valueDataSimpleOTATaskInfo["SrcVersion"].asString();
if(!valueDataSimpleOTATaskInfo["DestVersion"].isNull())
dataObject.destVersion = valueDataSimpleOTATaskInfo["DestVersion"].asString();
if(!valueDataSimpleOTATaskInfo["IotId"].isNull())
dataObject.iotId = valueDataSimpleOTATaskInfo["IotId"].asString();
if(!valueDataSimpleOTATaskInfo["UtcCreate"].isNull())
dataObject.utcCreate = valueDataSimpleOTATaskInfo["UtcCreate"].asString();
if(!valueDataSimpleOTATaskInfo["ModuleName"].isNull())
dataObject.moduleName = valueDataSimpleOTATaskInfo["ModuleName"].asString();
if(!valueDataSimpleOTATaskInfo["FirmwareId"].isNull())
dataObject.firmwareId = valueDataSimpleOTATaskInfo["FirmwareId"].asString();
data_.push_back(dataObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::vector<ListOTAUnfinishedTaskByDeviceResult::SimpleOTATaskInfo> ListOTAUnfinishedTaskByDeviceResult::getData()const
{
return data_;
}
std::string ListOTAUnfinishedTaskByDeviceResult::getErrorMessage()const
{
return errorMessage_;
}
std::string ListOTAUnfinishedTaskByDeviceResult::getCode()const
{
return code_;
}
bool ListOTAUnfinishedTaskByDeviceResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,128 @@
/*
* 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/iot/model/QueryDeviceInfoRequest.h>
using AlibabaCloud::Iot::Model::QueryDeviceInfoRequest;
QueryDeviceInfoRequest::QueryDeviceInfoRequest() :
RpcServiceRequest("iot", "2018-01-20", "QueryDeviceInfo")
{
setMethod(HttpRequest::Method::Post);
}
QueryDeviceInfoRequest::~QueryDeviceInfoRequest()
{}
std::string QueryDeviceInfoRequest::getRealTenantId()const
{
return realTenantId_;
}
void QueryDeviceInfoRequest::setRealTenantId(const std::string& realTenantId)
{
realTenantId_ = realTenantId;
setParameter("RealTenantId", realTenantId);
}
std::string QueryDeviceInfoRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void QueryDeviceInfoRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string QueryDeviceInfoRequest::getRealTripartiteKey()const
{
return realTripartiteKey_;
}
void QueryDeviceInfoRequest::setRealTripartiteKey(const std::string& realTripartiteKey)
{
realTripartiteKey_ = realTripartiteKey;
setParameter("RealTripartiteKey", realTripartiteKey);
}
std::string QueryDeviceInfoRequest::getIotId()const
{
return iotId_;
}
void QueryDeviceInfoRequest::setIotId(const std::string& iotId)
{
iotId_ = iotId;
setParameter("IotId", iotId);
}
std::string QueryDeviceInfoRequest::getIotInstanceId()const
{
return iotInstanceId_;
}
void QueryDeviceInfoRequest::setIotInstanceId(const std::string& iotInstanceId)
{
iotInstanceId_ = iotInstanceId;
setParameter("IotInstanceId", iotInstanceId);
}
std::string QueryDeviceInfoRequest::getProductKey()const
{
return productKey_;
}
void QueryDeviceInfoRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string QueryDeviceInfoRequest::getApiProduct()const
{
return apiProduct_;
}
void QueryDeviceInfoRequest::setApiProduct(const std::string& apiProduct)
{
apiProduct_ = apiProduct;
setBodyParameter("ApiProduct", apiProduct);
}
std::string QueryDeviceInfoRequest::getApiRevision()const
{
return apiRevision_;
}
void QueryDeviceInfoRequest::setApiRevision(const std::string& apiRevision)
{
apiRevision_ = apiRevision;
setBodyParameter("ApiRevision", apiRevision);
}
std::string QueryDeviceInfoRequest::getDeviceName()const
{
return deviceName_;
}
void QueryDeviceInfoRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}

View File

@@ -0,0 +1,81 @@
/*
* 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/iot/model/QueryDeviceInfoResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
QueryDeviceInfoResult::QueryDeviceInfoResult() :
ServiceResult()
{}
QueryDeviceInfoResult::QueryDeviceInfoResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryDeviceInfoResult::~QueryDeviceInfoResult()
{}
void QueryDeviceInfoResult::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["IotId"].isNull())
data_.iotId = dataNode["IotId"].asString();
if(!dataNode["ProductKey"].isNull())
data_.productKey = dataNode["ProductKey"].asString();
if(!dataNode["DeviceName"].isNull())
data_.deviceName = dataNode["DeviceName"].asString();
if(!dataNode["DeviceSecret"].isNull())
data_.deviceSecret = dataNode["DeviceSecret"].asString();
if(!dataNode["Nickname"].isNull())
data_.nickname = dataNode["Nickname"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
QueryDeviceInfoResult::Data QueryDeviceInfoResult::getData()const
{
return data_;
}
std::string QueryDeviceInfoResult::getErrorMessage()const
{
return errorMessage_;
}
std::string QueryDeviceInfoResult::getCode()const
{
return code_;
}
bool QueryDeviceInfoResult::getSuccess()const
{
return success_;
}

View File

@@ -60,6 +60,17 @@ void QueryDeviceRequest::setRealTripartiteKey(const std::string& realTripartiteK
setParameter("RealTripartiteKey", realTripartiteKey);
}
std::string QueryDeviceRequest::getNextToken()const
{
return nextToken_;
}
void QueryDeviceRequest::setNextToken(const std::string& nextToken)
{
nextToken_ = nextToken;
setParameter("NextToken", nextToken);
}
std::string QueryDeviceRequest::getIotInstanceId()const
{
return iotInstanceId_;

View File

@@ -83,6 +83,8 @@ void QueryDeviceResult::parse(const std::string &payload)
pageCount_ = std::stoi(value["PageCount"].asString());
if(!value["Page"].isNull())
page_ = std::stoi(value["Page"].asString());
if(!value["NextToken"].isNull())
nextToken_ = value["NextToken"].asString();
}
@@ -96,6 +98,11 @@ int QueryDeviceResult::getPageCount()const
return pageCount_;
}
std::string QueryDeviceResult::getNextToken()const
{
return nextToken_;
}
int QueryDeviceResult::getTotal()const
{
return total_;

View File

@@ -86,6 +86,10 @@ void QueryOTAJobResult::parse(const std::string &payload)
data_.overwriteMode = std::stoi(dataNode["OverwriteMode"].asString());
if(!dataNode["DynamicMode"].isNull())
data_.dynamicMode = std::stoi(dataNode["DynamicMode"].asString());
if(!dataNode["NeedPush"].isNull())
data_.needPush = dataNode["NeedPush"].asString() == "true";
if(!dataNode["NeedConfirm"].isNull())
data_.needConfirm = dataNode["NeedConfirm"].asString() == "true";
auto allTagsNode = dataNode["Tags"]["OtaTagDTO"];
for (auto dataNodeTagsOtaTagDTO : allTagsNode)
{