Storage open Api.
This commit is contained in:
@@ -545,6 +545,10 @@ set(iot_public_header_model
|
||||
include/alibabacloud/iot/model/QueryDeviceSubTopicResult.h
|
||||
include/alibabacloud/iot/model/QueryDeviceTunnelRequest.h
|
||||
include/alibabacloud/iot/model/QueryDeviceTunnelResult.h
|
||||
include/alibabacloud/iot/model/QueryDevicesHotStorageDataRequest.h
|
||||
include/alibabacloud/iot/model/QueryDevicesHotStorageDataResult.h
|
||||
include/alibabacloud/iot/model/QueryDevicesHotStorageDataStatusRequest.h
|
||||
include/alibabacloud/iot/model/QueryDevicesHotStorageDataStatusResult.h
|
||||
include/alibabacloud/iot/model/QueryDynamicGroupDevicesRequest.h
|
||||
include/alibabacloud/iot/model/QueryDynamicGroupDevicesResult.h
|
||||
include/alibabacloud/iot/model/QueryEdgeDriverRequest.h
|
||||
@@ -796,7 +800,9 @@ set(iot_public_header_model
|
||||
include/alibabacloud/iot/model/UpdateThingModelRequest.h
|
||||
include/alibabacloud/iot/model/UpdateThingModelResult.h
|
||||
include/alibabacloud/iot/model/UpdateThingScriptRequest.h
|
||||
include/alibabacloud/iot/model/UpdateThingScriptResult.h )
|
||||
include/alibabacloud/iot/model/UpdateThingScriptResult.h
|
||||
include/alibabacloud/iot/model/WriteDevicesHotStorageDataRequest.h
|
||||
include/alibabacloud/iot/model/WriteDevicesHotStorageDataResult.h )
|
||||
|
||||
set(iot_src
|
||||
src/IotClient.cc
|
||||
@@ -1324,6 +1330,10 @@ set(iot_src
|
||||
src/model/QueryDeviceSubTopicResult.cc
|
||||
src/model/QueryDeviceTunnelRequest.cc
|
||||
src/model/QueryDeviceTunnelResult.cc
|
||||
src/model/QueryDevicesHotStorageDataRequest.cc
|
||||
src/model/QueryDevicesHotStorageDataResult.cc
|
||||
src/model/QueryDevicesHotStorageDataStatusRequest.cc
|
||||
src/model/QueryDevicesHotStorageDataStatusResult.cc
|
||||
src/model/QueryDynamicGroupDevicesRequest.cc
|
||||
src/model/QueryDynamicGroupDevicesResult.cc
|
||||
src/model/QueryEdgeDriverRequest.cc
|
||||
@@ -1575,7 +1585,9 @@ set(iot_src
|
||||
src/model/UpdateThingModelRequest.cc
|
||||
src/model/UpdateThingModelResult.cc
|
||||
src/model/UpdateThingScriptRequest.cc
|
||||
src/model/UpdateThingScriptResult.cc )
|
||||
src/model/UpdateThingScriptResult.cc
|
||||
src/model/WriteDevicesHotStorageDataRequest.cc
|
||||
src/model/WriteDevicesHotStorageDataResult.cc )
|
||||
|
||||
add_library(iot ${LIB_TYPE}
|
||||
${iot_public_header}
|
||||
|
||||
@@ -546,6 +546,10 @@
|
||||
#include "model/QueryDeviceSubTopicResult.h"
|
||||
#include "model/QueryDeviceTunnelRequest.h"
|
||||
#include "model/QueryDeviceTunnelResult.h"
|
||||
#include "model/QueryDevicesHotStorageDataRequest.h"
|
||||
#include "model/QueryDevicesHotStorageDataResult.h"
|
||||
#include "model/QueryDevicesHotStorageDataStatusRequest.h"
|
||||
#include "model/QueryDevicesHotStorageDataStatusResult.h"
|
||||
#include "model/QueryDynamicGroupDevicesRequest.h"
|
||||
#include "model/QueryDynamicGroupDevicesResult.h"
|
||||
#include "model/QueryEdgeDriverRequest.h"
|
||||
@@ -798,6 +802,8 @@
|
||||
#include "model/UpdateThingModelResult.h"
|
||||
#include "model/UpdateThingScriptRequest.h"
|
||||
#include "model/UpdateThingScriptResult.h"
|
||||
#include "model/WriteDevicesHotStorageDataRequest.h"
|
||||
#include "model/WriteDevicesHotStorageDataResult.h"
|
||||
|
||||
|
||||
namespace AlibabaCloud
|
||||
@@ -1593,6 +1599,12 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::QueryDeviceTunnelResult> QueryDeviceTunnelOutcome;
|
||||
typedef std::future<QueryDeviceTunnelOutcome> QueryDeviceTunnelOutcomeCallable;
|
||||
typedef std::function<void(const IotClient*, const Model::QueryDeviceTunnelRequest&, const QueryDeviceTunnelOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryDeviceTunnelAsyncHandler;
|
||||
typedef Outcome<Error, Model::QueryDevicesHotStorageDataResult> QueryDevicesHotStorageDataOutcome;
|
||||
typedef std::future<QueryDevicesHotStorageDataOutcome> QueryDevicesHotStorageDataOutcomeCallable;
|
||||
typedef std::function<void(const IotClient*, const Model::QueryDevicesHotStorageDataRequest&, const QueryDevicesHotStorageDataOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryDevicesHotStorageDataAsyncHandler;
|
||||
typedef Outcome<Error, Model::QueryDevicesHotStorageDataStatusResult> QueryDevicesHotStorageDataStatusOutcome;
|
||||
typedef std::future<QueryDevicesHotStorageDataStatusOutcome> QueryDevicesHotStorageDataStatusOutcomeCallable;
|
||||
typedef std::function<void(const IotClient*, const Model::QueryDevicesHotStorageDataStatusRequest&, const QueryDevicesHotStorageDataStatusOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryDevicesHotStorageDataStatusAsyncHandler;
|
||||
typedef Outcome<Error, Model::QueryDynamicGroupDevicesResult> QueryDynamicGroupDevicesOutcome;
|
||||
typedef std::future<QueryDynamicGroupDevicesOutcome> QueryDynamicGroupDevicesOutcomeCallable;
|
||||
typedef std::function<void(const IotClient*, const Model::QueryDynamicGroupDevicesRequest&, const QueryDynamicGroupDevicesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryDynamicGroupDevicesAsyncHandler;
|
||||
@@ -1971,6 +1983,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::UpdateThingScriptResult> UpdateThingScriptOutcome;
|
||||
typedef std::future<UpdateThingScriptOutcome> UpdateThingScriptOutcomeCallable;
|
||||
typedef std::function<void(const IotClient*, const Model::UpdateThingScriptRequest&, const UpdateThingScriptOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateThingScriptAsyncHandler;
|
||||
typedef Outcome<Error, Model::WriteDevicesHotStorageDataResult> WriteDevicesHotStorageDataOutcome;
|
||||
typedef std::future<WriteDevicesHotStorageDataOutcome> WriteDevicesHotStorageDataOutcomeCallable;
|
||||
typedef std::function<void(const IotClient*, const Model::WriteDevicesHotStorageDataRequest&, const WriteDevicesHotStorageDataOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> WriteDevicesHotStorageDataAsyncHandler;
|
||||
|
||||
IotClient(const Credentials &credentials, const ClientConfiguration &configuration);
|
||||
IotClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
|
||||
@@ -2762,6 +2777,12 @@ namespace AlibabaCloud
|
||||
QueryDeviceTunnelOutcome queryDeviceTunnel(const Model::QueryDeviceTunnelRequest &request)const;
|
||||
void queryDeviceTunnelAsync(const Model::QueryDeviceTunnelRequest& request, const QueryDeviceTunnelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
QueryDeviceTunnelOutcomeCallable queryDeviceTunnelCallable(const Model::QueryDeviceTunnelRequest& request) const;
|
||||
QueryDevicesHotStorageDataOutcome queryDevicesHotStorageData(const Model::QueryDevicesHotStorageDataRequest &request)const;
|
||||
void queryDevicesHotStorageDataAsync(const Model::QueryDevicesHotStorageDataRequest& request, const QueryDevicesHotStorageDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
QueryDevicesHotStorageDataOutcomeCallable queryDevicesHotStorageDataCallable(const Model::QueryDevicesHotStorageDataRequest& request) const;
|
||||
QueryDevicesHotStorageDataStatusOutcome queryDevicesHotStorageDataStatus(const Model::QueryDevicesHotStorageDataStatusRequest &request)const;
|
||||
void queryDevicesHotStorageDataStatusAsync(const Model::QueryDevicesHotStorageDataStatusRequest& request, const QueryDevicesHotStorageDataStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
QueryDevicesHotStorageDataStatusOutcomeCallable queryDevicesHotStorageDataStatusCallable(const Model::QueryDevicesHotStorageDataStatusRequest& request) const;
|
||||
QueryDynamicGroupDevicesOutcome queryDynamicGroupDevices(const Model::QueryDynamicGroupDevicesRequest &request)const;
|
||||
void queryDynamicGroupDevicesAsync(const Model::QueryDynamicGroupDevicesRequest& request, const QueryDynamicGroupDevicesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
QueryDynamicGroupDevicesOutcomeCallable queryDynamicGroupDevicesCallable(const Model::QueryDynamicGroupDevicesRequest& request) const;
|
||||
@@ -3140,6 +3161,9 @@ namespace AlibabaCloud
|
||||
UpdateThingScriptOutcome updateThingScript(const Model::UpdateThingScriptRequest &request)const;
|
||||
void updateThingScriptAsync(const Model::UpdateThingScriptRequest& request, const UpdateThingScriptAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
UpdateThingScriptOutcomeCallable updateThingScriptCallable(const Model::UpdateThingScriptRequest& request) const;
|
||||
WriteDevicesHotStorageDataOutcome writeDevicesHotStorageData(const Model::WriteDevicesHotStorageDataRequest &request)const;
|
||||
void writeDevicesHotStorageDataAsync(const Model::WriteDevicesHotStorageDataRequest& request, const WriteDevicesHotStorageDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
WriteDevicesHotStorageDataOutcomeCallable writeDevicesHotStorageDataCallable(const Model::WriteDevicesHotStorageDataRequest& request) const;
|
||||
|
||||
private:
|
||||
std::shared_ptr<EndpointProvider> endpointProvider_;
|
||||
|
||||
@@ -35,6 +35,7 @@ namespace AlibabaCloud
|
||||
struct DeviceStatus
|
||||
{
|
||||
std::string iotId;
|
||||
std::string instanceId;
|
||||
int bindStatus;
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* 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_QUERYDEVICESHOTSTORAGEDATAREQUEST_H_
|
||||
#define ALIBABACLOUD_IOT_MODEL_QUERYDEVICESHOTSTORAGEDATAREQUEST_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 QueryDevicesHotStorageDataRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
QueryDevicesHotStorageDataRequest();
|
||||
~QueryDevicesHotStorageDataRequest();
|
||||
|
||||
std::string getNextPageToken()const;
|
||||
void setNextPageToken(const std::string& nextPageToken);
|
||||
std::string getRealTenantId()const;
|
||||
void setRealTenantId(const std::string& realTenantId);
|
||||
long getStartTime()const;
|
||||
void setStartTime(long startTime);
|
||||
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);
|
||||
int getPageSize()const;
|
||||
void setPageSize(int pageSize);
|
||||
std::string getIdentifier()const;
|
||||
void setIdentifier(const std::string& identifier);
|
||||
std::string getUserTopic()const;
|
||||
void setUserTopic(const std::string& userTopic);
|
||||
long getEndTime()const;
|
||||
void setEndTime(long endTime);
|
||||
std::string getProductKey()const;
|
||||
void setProductKey(const std::string& productKey);
|
||||
int getAsc()const;
|
||||
void setAsc(int asc);
|
||||
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 nextPageToken_;
|
||||
std::string realTenantId_;
|
||||
long startTime_;
|
||||
std::string realTripartiteKey_;
|
||||
std::string iotId_;
|
||||
std::string iotInstanceId_;
|
||||
int pageSize_;
|
||||
std::string identifier_;
|
||||
std::string userTopic_;
|
||||
long endTime_;
|
||||
std::string productKey_;
|
||||
int asc_;
|
||||
std::string apiProduct_;
|
||||
std::string apiRevision_;
|
||||
std::string deviceName_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IOT_MODEL_QUERYDEVICESHOTSTORAGEDATAREQUEST_H_
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_IOT_MODEL_QUERYDEVICESHOTSTORAGEDATARESULT_H_
|
||||
#define ALIBABACLOUD_IOT_MODEL_QUERYDEVICESHOTSTORAGEDATARESULT_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 QueryDevicesHotStorageDataResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct PropertyInfo
|
||||
{
|
||||
std::string value;
|
||||
std::string time;
|
||||
};
|
||||
bool nextValid;
|
||||
std::string nextPageToken;
|
||||
std::vector<PropertyInfo> list;
|
||||
};
|
||||
|
||||
|
||||
QueryDevicesHotStorageDataResult();
|
||||
explicit QueryDevicesHotStorageDataResult(const std::string &payload);
|
||||
~QueryDevicesHotStorageDataResult();
|
||||
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_QUERYDEVICESHOTSTORAGEDATARESULT_H_
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_IOT_MODEL_QUERYDEVICESHOTSTORAGEDATASTATUSREQUEST_H_
|
||||
#define ALIBABACLOUD_IOT_MODEL_QUERYDEVICESHOTSTORAGEDATASTATUSREQUEST_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 QueryDevicesHotStorageDataStatusRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
QueryDevicesHotStorageDataStatusRequest();
|
||||
~QueryDevicesHotStorageDataStatusRequest();
|
||||
|
||||
std::string getNextPageToken()const;
|
||||
void setNextPageToken(const std::string& nextPageToken);
|
||||
std::string getRealTenantId()const;
|
||||
void setRealTenantId(const std::string& realTenantId);
|
||||
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);
|
||||
int getPageSize()const;
|
||||
void setPageSize(int pageSize);
|
||||
std::string getUserTopic()const;
|
||||
void setUserTopic(const std::string& userTopic);
|
||||
std::string getProductKey()const;
|
||||
void setProductKey(const std::string& productKey);
|
||||
int getAsc()const;
|
||||
void setAsc(int asc);
|
||||
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 nextPageToken_;
|
||||
std::string realTenantId_;
|
||||
std::string realTripartiteKey_;
|
||||
std::string iotId_;
|
||||
std::string iotInstanceId_;
|
||||
int pageSize_;
|
||||
std::string userTopic_;
|
||||
std::string productKey_;
|
||||
int asc_;
|
||||
std::string apiProduct_;
|
||||
std::string apiRevision_;
|
||||
std::string deviceName_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IOT_MODEL_QUERYDEVICESHOTSTORAGEDATASTATUSREQUEST_H_
|
||||
@@ -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_IOT_MODEL_QUERYDEVICESHOTSTORAGEDATASTATUSRESULT_H_
|
||||
#define ALIBABACLOUD_IOT_MODEL_QUERYDEVICESHOTSTORAGEDATASTATUSRESULT_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 QueryDevicesHotStorageDataStatusResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct PropertyStatusDataInfo
|
||||
{
|
||||
std::string identifier;
|
||||
std::string value;
|
||||
long time;
|
||||
};
|
||||
bool nextValid;
|
||||
std::string nextPageToken;
|
||||
std::vector<PropertyStatusDataInfo> list;
|
||||
};
|
||||
|
||||
|
||||
QueryDevicesHotStorageDataStatusResult();
|
||||
explicit QueryDevicesHotStorageDataStatusResult(const std::string &payload);
|
||||
~QueryDevicesHotStorageDataStatusResult();
|
||||
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_QUERYDEVICESHOTSTORAGEDATASTATUSRESULT_H_
|
||||
@@ -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_WRITEDEVICESHOTSTORAGEDATAREQUEST_H_
|
||||
#define ALIBABACLOUD_IOT_MODEL_WRITEDEVICESHOTSTORAGEDATAREQUEST_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 WriteDevicesHotStorageDataRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
WriteDevicesHotStorageDataRequest();
|
||||
~WriteDevicesHotStorageDataRequest();
|
||||
|
||||
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 getUserTopic()const;
|
||||
void setUserTopic(const std::string& userTopic);
|
||||
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);
|
||||
std::string getItems()const;
|
||||
void setItems(const std::string& items);
|
||||
|
||||
private:
|
||||
std::string realTenantId_;
|
||||
std::string accessKeyId_;
|
||||
std::string realTripartiteKey_;
|
||||
std::string iotId_;
|
||||
std::string iotInstanceId_;
|
||||
std::string userTopic_;
|
||||
std::string productKey_;
|
||||
std::string apiProduct_;
|
||||
std::string apiRevision_;
|
||||
std::string deviceName_;
|
||||
std::string items_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IOT_MODEL_WRITEDEVICESHOTSTORAGEDATAREQUEST_H_
|
||||
@@ -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_WRITEDEVICESHOTSTORAGEDATARESULT_H_
|
||||
#define ALIBABACLOUD_IOT_MODEL_WRITEDEVICESHOTSTORAGEDATARESULT_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 WriteDevicesHotStorageDataResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
WriteDevicesHotStorageDataResult();
|
||||
explicit WriteDevicesHotStorageDataResult(const std::string &payload);
|
||||
~WriteDevicesHotStorageDataResult();
|
||||
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_WRITEDEVICESHOTSTORAGEDATARESULT_H_
|
||||
@@ -9483,6 +9483,78 @@ IotClient::QueryDeviceTunnelOutcomeCallable IotClient::queryDeviceTunnelCallable
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
IotClient::QueryDevicesHotStorageDataOutcome IotClient::queryDevicesHotStorageData(const QueryDevicesHotStorageDataRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return QueryDevicesHotStorageDataOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return QueryDevicesHotStorageDataOutcome(QueryDevicesHotStorageDataResult(outcome.result()));
|
||||
else
|
||||
return QueryDevicesHotStorageDataOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void IotClient::queryDevicesHotStorageDataAsync(const QueryDevicesHotStorageDataRequest& request, const QueryDevicesHotStorageDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, queryDevicesHotStorageData(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
IotClient::QueryDevicesHotStorageDataOutcomeCallable IotClient::queryDevicesHotStorageDataCallable(const QueryDevicesHotStorageDataRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<QueryDevicesHotStorageDataOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->queryDevicesHotStorageData(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
IotClient::QueryDevicesHotStorageDataStatusOutcome IotClient::queryDevicesHotStorageDataStatus(const QueryDevicesHotStorageDataStatusRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return QueryDevicesHotStorageDataStatusOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return QueryDevicesHotStorageDataStatusOutcome(QueryDevicesHotStorageDataStatusResult(outcome.result()));
|
||||
else
|
||||
return QueryDevicesHotStorageDataStatusOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void IotClient::queryDevicesHotStorageDataStatusAsync(const QueryDevicesHotStorageDataStatusRequest& request, const QueryDevicesHotStorageDataStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, queryDevicesHotStorageDataStatus(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
IotClient::QueryDevicesHotStorageDataStatusOutcomeCallable IotClient::queryDevicesHotStorageDataStatusCallable(const QueryDevicesHotStorageDataStatusRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<QueryDevicesHotStorageDataStatusOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->queryDevicesHotStorageDataStatus(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
IotClient::QueryDynamicGroupDevicesOutcome IotClient::queryDynamicGroupDevices(const QueryDynamicGroupDevicesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -14019,3 +14091,39 @@ IotClient::UpdateThingScriptOutcomeCallable IotClient::updateThingScriptCallable
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
IotClient::WriteDevicesHotStorageDataOutcome IotClient::writeDevicesHotStorageData(const WriteDevicesHotStorageDataRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return WriteDevicesHotStorageDataOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return WriteDevicesHotStorageDataOutcome(WriteDevicesHotStorageDataResult(outcome.result()));
|
||||
else
|
||||
return WriteDevicesHotStorageDataOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void IotClient::writeDevicesHotStorageDataAsync(const WriteDevicesHotStorageDataRequest& request, const WriteDevicesHotStorageDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, writeDevicesHotStorageData(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
IotClient::WriteDevicesHotStorageDataOutcomeCallable IotClient::writeDevicesHotStorageDataCallable(const WriteDevicesHotStorageDataRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<WriteDevicesHotStorageDataOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->writeDevicesHotStorageData(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +47,8 @@ void BatchGetDeviceBindStatusResult::parse(const std::string &payload)
|
||||
dataObject.iotId = valueDataDeviceStatus["IotId"].asString();
|
||||
if(!valueDataDeviceStatus["BindStatus"].isNull())
|
||||
dataObject.bindStatus = std::stoi(valueDataDeviceStatus["BindStatus"].asString());
|
||||
if(!valueDataDeviceStatus["InstanceId"].isNull())
|
||||
dataObject.instanceId = valueDataDeviceStatus["InstanceId"].asString();
|
||||
data_.push_back(dataObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
|
||||
194
iot/src/model/QueryDevicesHotStorageDataRequest.cc
Normal file
194
iot/src/model/QueryDevicesHotStorageDataRequest.cc
Normal file
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
* 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/QueryDevicesHotStorageDataRequest.h>
|
||||
|
||||
using AlibabaCloud::Iot::Model::QueryDevicesHotStorageDataRequest;
|
||||
|
||||
QueryDevicesHotStorageDataRequest::QueryDevicesHotStorageDataRequest() :
|
||||
RpcServiceRequest("iot", "2018-01-20", "QueryDevicesHotStorageData")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
QueryDevicesHotStorageDataRequest::~QueryDevicesHotStorageDataRequest()
|
||||
{}
|
||||
|
||||
std::string QueryDevicesHotStorageDataRequest::getNextPageToken()const
|
||||
{
|
||||
return nextPageToken_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataRequest::setNextPageToken(const std::string& nextPageToken)
|
||||
{
|
||||
nextPageToken_ = nextPageToken;
|
||||
setParameter("NextPageToken", nextPageToken);
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataRequest::getRealTenantId()const
|
||||
{
|
||||
return realTenantId_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataRequest::setRealTenantId(const std::string& realTenantId)
|
||||
{
|
||||
realTenantId_ = realTenantId;
|
||||
setParameter("RealTenantId", realTenantId);
|
||||
}
|
||||
|
||||
long QueryDevicesHotStorageDataRequest::getStartTime()const
|
||||
{
|
||||
return startTime_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataRequest::setStartTime(long startTime)
|
||||
{
|
||||
startTime_ = startTime;
|
||||
setParameter("StartTime", std::to_string(startTime));
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataRequest::getRealTripartiteKey()const
|
||||
{
|
||||
return realTripartiteKey_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataRequest::setRealTripartiteKey(const std::string& realTripartiteKey)
|
||||
{
|
||||
realTripartiteKey_ = realTripartiteKey;
|
||||
setParameter("RealTripartiteKey", realTripartiteKey);
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataRequest::getIotId()const
|
||||
{
|
||||
return iotId_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataRequest::setIotId(const std::string& iotId)
|
||||
{
|
||||
iotId_ = iotId;
|
||||
setParameter("IotId", iotId);
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
int QueryDevicesHotStorageDataRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataRequest::getIdentifier()const
|
||||
{
|
||||
return identifier_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataRequest::setIdentifier(const std::string& identifier)
|
||||
{
|
||||
identifier_ = identifier;
|
||||
setParameter("Identifier", identifier);
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataRequest::getUserTopic()const
|
||||
{
|
||||
return userTopic_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataRequest::setUserTopic(const std::string& userTopic)
|
||||
{
|
||||
userTopic_ = userTopic;
|
||||
setParameter("UserTopic", userTopic);
|
||||
}
|
||||
|
||||
long QueryDevicesHotStorageDataRequest::getEndTime()const
|
||||
{
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataRequest::setEndTime(long endTime)
|
||||
{
|
||||
endTime_ = endTime;
|
||||
setParameter("EndTime", std::to_string(endTime));
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataRequest::getProductKey()const
|
||||
{
|
||||
return productKey_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
int QueryDevicesHotStorageDataRequest::getAsc()const
|
||||
{
|
||||
return asc_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataRequest::setAsc(int asc)
|
||||
{
|
||||
asc_ = asc;
|
||||
setParameter("Asc", std::to_string(asc));
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataRequest::getApiProduct()const
|
||||
{
|
||||
return apiProduct_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataRequest::setApiProduct(const std::string& apiProduct)
|
||||
{
|
||||
apiProduct_ = apiProduct;
|
||||
setBodyParameter("ApiProduct", apiProduct);
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataRequest::getApiRevision()const
|
||||
{
|
||||
return apiRevision_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataRequest::setApiRevision(const std::string& apiRevision)
|
||||
{
|
||||
apiRevision_ = apiRevision;
|
||||
setBodyParameter("ApiRevision", apiRevision);
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataRequest::getDeviceName()const
|
||||
{
|
||||
return deviceName_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataRequest::setDeviceName(const std::string& deviceName)
|
||||
{
|
||||
deviceName_ = deviceName;
|
||||
setParameter("DeviceName", deviceName);
|
||||
}
|
||||
|
||||
85
iot/src/model/QueryDevicesHotStorageDataResult.cc
Normal file
85
iot/src/model/QueryDevicesHotStorageDataResult.cc
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* 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/QueryDevicesHotStorageDataResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Iot;
|
||||
using namespace AlibabaCloud::Iot::Model;
|
||||
|
||||
QueryDevicesHotStorageDataResult::QueryDevicesHotStorageDataResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
QueryDevicesHotStorageDataResult::QueryDevicesHotStorageDataResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
QueryDevicesHotStorageDataResult::~QueryDevicesHotStorageDataResult()
|
||||
{}
|
||||
|
||||
void QueryDevicesHotStorageDataResult::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["NextValid"].isNull())
|
||||
data_.nextValid = dataNode["NextValid"].asString() == "true";
|
||||
if(!dataNode["nextPageToken"].isNull())
|
||||
data_.nextPageToken = dataNode["nextPageToken"].asString();
|
||||
auto allListNode = dataNode["List"]["PropertyInfo"];
|
||||
for (auto dataNodeListPropertyInfo : allListNode)
|
||||
{
|
||||
Data::PropertyInfo propertyInfoObject;
|
||||
if(!dataNodeListPropertyInfo["Time"].isNull())
|
||||
propertyInfoObject.time = dataNodeListPropertyInfo["Time"].asString();
|
||||
if(!dataNodeListPropertyInfo["Value"].isNull())
|
||||
propertyInfoObject.value = dataNodeListPropertyInfo["Value"].asString();
|
||||
data_.list.push_back(propertyInfoObject);
|
||||
}
|
||||
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();
|
||||
|
||||
}
|
||||
|
||||
QueryDevicesHotStorageDataResult::Data QueryDevicesHotStorageDataResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool QueryDevicesHotStorageDataResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
161
iot/src/model/QueryDevicesHotStorageDataStatusRequest.cc
Normal file
161
iot/src/model/QueryDevicesHotStorageDataStatusRequest.cc
Normal file
@@ -0,0 +1,161 @@
|
||||
/*
|
||||
* 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/QueryDevicesHotStorageDataStatusRequest.h>
|
||||
|
||||
using AlibabaCloud::Iot::Model::QueryDevicesHotStorageDataStatusRequest;
|
||||
|
||||
QueryDevicesHotStorageDataStatusRequest::QueryDevicesHotStorageDataStatusRequest() :
|
||||
RpcServiceRequest("iot", "2018-01-20", "QueryDevicesHotStorageDataStatus")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
QueryDevicesHotStorageDataStatusRequest::~QueryDevicesHotStorageDataStatusRequest()
|
||||
{}
|
||||
|
||||
std::string QueryDevicesHotStorageDataStatusRequest::getNextPageToken()const
|
||||
{
|
||||
return nextPageToken_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataStatusRequest::setNextPageToken(const std::string& nextPageToken)
|
||||
{
|
||||
nextPageToken_ = nextPageToken;
|
||||
setParameter("NextPageToken", nextPageToken);
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataStatusRequest::getRealTenantId()const
|
||||
{
|
||||
return realTenantId_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataStatusRequest::setRealTenantId(const std::string& realTenantId)
|
||||
{
|
||||
realTenantId_ = realTenantId;
|
||||
setParameter("RealTenantId", realTenantId);
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataStatusRequest::getRealTripartiteKey()const
|
||||
{
|
||||
return realTripartiteKey_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataStatusRequest::setRealTripartiteKey(const std::string& realTripartiteKey)
|
||||
{
|
||||
realTripartiteKey_ = realTripartiteKey;
|
||||
setParameter("RealTripartiteKey", realTripartiteKey);
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataStatusRequest::getIotId()const
|
||||
{
|
||||
return iotId_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataStatusRequest::setIotId(const std::string& iotId)
|
||||
{
|
||||
iotId_ = iotId;
|
||||
setParameter("IotId", iotId);
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataStatusRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataStatusRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
int QueryDevicesHotStorageDataStatusRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataStatusRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataStatusRequest::getUserTopic()const
|
||||
{
|
||||
return userTopic_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataStatusRequest::setUserTopic(const std::string& userTopic)
|
||||
{
|
||||
userTopic_ = userTopic;
|
||||
setParameter("UserTopic", userTopic);
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataStatusRequest::getProductKey()const
|
||||
{
|
||||
return productKey_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataStatusRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
int QueryDevicesHotStorageDataStatusRequest::getAsc()const
|
||||
{
|
||||
return asc_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataStatusRequest::setAsc(int asc)
|
||||
{
|
||||
asc_ = asc;
|
||||
setParameter("Asc", std::to_string(asc));
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataStatusRequest::getApiProduct()const
|
||||
{
|
||||
return apiProduct_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataStatusRequest::setApiProduct(const std::string& apiProduct)
|
||||
{
|
||||
apiProduct_ = apiProduct;
|
||||
setBodyParameter("ApiProduct", apiProduct);
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataStatusRequest::getApiRevision()const
|
||||
{
|
||||
return apiRevision_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataStatusRequest::setApiRevision(const std::string& apiRevision)
|
||||
{
|
||||
apiRevision_ = apiRevision;
|
||||
setBodyParameter("ApiRevision", apiRevision);
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataStatusRequest::getDeviceName()const
|
||||
{
|
||||
return deviceName_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataStatusRequest::setDeviceName(const std::string& deviceName)
|
||||
{
|
||||
deviceName_ = deviceName;
|
||||
setParameter("DeviceName", deviceName);
|
||||
}
|
||||
|
||||
87
iot/src/model/QueryDevicesHotStorageDataStatusResult.cc
Normal file
87
iot/src/model/QueryDevicesHotStorageDataStatusResult.cc
Normal file
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* 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/QueryDevicesHotStorageDataStatusResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Iot;
|
||||
using namespace AlibabaCloud::Iot::Model;
|
||||
|
||||
QueryDevicesHotStorageDataStatusResult::QueryDevicesHotStorageDataStatusResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
QueryDevicesHotStorageDataStatusResult::QueryDevicesHotStorageDataStatusResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
QueryDevicesHotStorageDataStatusResult::~QueryDevicesHotStorageDataStatusResult()
|
||||
{}
|
||||
|
||||
void QueryDevicesHotStorageDataStatusResult::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["NextValid"].isNull())
|
||||
data_.nextValid = dataNode["NextValid"].asString() == "true";
|
||||
if(!dataNode["NextPageToken"].isNull())
|
||||
data_.nextPageToken = dataNode["NextPageToken"].asString();
|
||||
auto allListNode = dataNode["List"]["PropertyStatusDataInfo"];
|
||||
for (auto dataNodeListPropertyStatusDataInfo : allListNode)
|
||||
{
|
||||
Data::PropertyStatusDataInfo propertyStatusDataInfoObject;
|
||||
if(!dataNodeListPropertyStatusDataInfo["Identifier"].isNull())
|
||||
propertyStatusDataInfoObject.identifier = dataNodeListPropertyStatusDataInfo["Identifier"].asString();
|
||||
if(!dataNodeListPropertyStatusDataInfo["Value"].isNull())
|
||||
propertyStatusDataInfoObject.value = dataNodeListPropertyStatusDataInfo["Value"].asString();
|
||||
if(!dataNodeListPropertyStatusDataInfo["Time"].isNull())
|
||||
propertyStatusDataInfoObject.time = std::stol(dataNodeListPropertyStatusDataInfo["Time"].asString());
|
||||
data_.list.push_back(propertyStatusDataInfoObject);
|
||||
}
|
||||
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();
|
||||
|
||||
}
|
||||
|
||||
QueryDevicesHotStorageDataStatusResult::Data QueryDevicesHotStorageDataStatusResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataStatusResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataStatusResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool QueryDevicesHotStorageDataStatusResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
150
iot/src/model/WriteDevicesHotStorageDataRequest.cc
Normal file
150
iot/src/model/WriteDevicesHotStorageDataRequest.cc
Normal file
@@ -0,0 +1,150 @@
|
||||
/*
|
||||
* 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/WriteDevicesHotStorageDataRequest.h>
|
||||
|
||||
using AlibabaCloud::Iot::Model::WriteDevicesHotStorageDataRequest;
|
||||
|
||||
WriteDevicesHotStorageDataRequest::WriteDevicesHotStorageDataRequest() :
|
||||
RpcServiceRequest("iot", "2018-01-20", "WriteDevicesHotStorageData")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
WriteDevicesHotStorageDataRequest::~WriteDevicesHotStorageDataRequest()
|
||||
{}
|
||||
|
||||
std::string WriteDevicesHotStorageDataRequest::getRealTenantId()const
|
||||
{
|
||||
return realTenantId_;
|
||||
}
|
||||
|
||||
void WriteDevicesHotStorageDataRequest::setRealTenantId(const std::string& realTenantId)
|
||||
{
|
||||
realTenantId_ = realTenantId;
|
||||
setParameter("RealTenantId", realTenantId);
|
||||
}
|
||||
|
||||
std::string WriteDevicesHotStorageDataRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void WriteDevicesHotStorageDataRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string WriteDevicesHotStorageDataRequest::getRealTripartiteKey()const
|
||||
{
|
||||
return realTripartiteKey_;
|
||||
}
|
||||
|
||||
void WriteDevicesHotStorageDataRequest::setRealTripartiteKey(const std::string& realTripartiteKey)
|
||||
{
|
||||
realTripartiteKey_ = realTripartiteKey;
|
||||
setParameter("RealTripartiteKey", realTripartiteKey);
|
||||
}
|
||||
|
||||
std::string WriteDevicesHotStorageDataRequest::getIotId()const
|
||||
{
|
||||
return iotId_;
|
||||
}
|
||||
|
||||
void WriteDevicesHotStorageDataRequest::setIotId(const std::string& iotId)
|
||||
{
|
||||
iotId_ = iotId;
|
||||
setParameter("IotId", iotId);
|
||||
}
|
||||
|
||||
std::string WriteDevicesHotStorageDataRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void WriteDevicesHotStorageDataRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string WriteDevicesHotStorageDataRequest::getUserTopic()const
|
||||
{
|
||||
return userTopic_;
|
||||
}
|
||||
|
||||
void WriteDevicesHotStorageDataRequest::setUserTopic(const std::string& userTopic)
|
||||
{
|
||||
userTopic_ = userTopic;
|
||||
setParameter("UserTopic", userTopic);
|
||||
}
|
||||
|
||||
std::string WriteDevicesHotStorageDataRequest::getProductKey()const
|
||||
{
|
||||
return productKey_;
|
||||
}
|
||||
|
||||
void WriteDevicesHotStorageDataRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
std::string WriteDevicesHotStorageDataRequest::getApiProduct()const
|
||||
{
|
||||
return apiProduct_;
|
||||
}
|
||||
|
||||
void WriteDevicesHotStorageDataRequest::setApiProduct(const std::string& apiProduct)
|
||||
{
|
||||
apiProduct_ = apiProduct;
|
||||
setBodyParameter("ApiProduct", apiProduct);
|
||||
}
|
||||
|
||||
std::string WriteDevicesHotStorageDataRequest::getApiRevision()const
|
||||
{
|
||||
return apiRevision_;
|
||||
}
|
||||
|
||||
void WriteDevicesHotStorageDataRequest::setApiRevision(const std::string& apiRevision)
|
||||
{
|
||||
apiRevision_ = apiRevision;
|
||||
setBodyParameter("ApiRevision", apiRevision);
|
||||
}
|
||||
|
||||
std::string WriteDevicesHotStorageDataRequest::getDeviceName()const
|
||||
{
|
||||
return deviceName_;
|
||||
}
|
||||
|
||||
void WriteDevicesHotStorageDataRequest::setDeviceName(const std::string& deviceName)
|
||||
{
|
||||
deviceName_ = deviceName;
|
||||
setParameter("DeviceName", deviceName);
|
||||
}
|
||||
|
||||
std::string WriteDevicesHotStorageDataRequest::getItems()const
|
||||
{
|
||||
return items_;
|
||||
}
|
||||
|
||||
void WriteDevicesHotStorageDataRequest::setItems(const std::string& items)
|
||||
{
|
||||
items_ = items;
|
||||
setParameter("Items", items);
|
||||
}
|
||||
|
||||
65
iot/src/model/WriteDevicesHotStorageDataResult.cc
Normal file
65
iot/src/model/WriteDevicesHotStorageDataResult.cc
Normal 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/WriteDevicesHotStorageDataResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Iot;
|
||||
using namespace AlibabaCloud::Iot::Model;
|
||||
|
||||
WriteDevicesHotStorageDataResult::WriteDevicesHotStorageDataResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
WriteDevicesHotStorageDataResult::WriteDevicesHotStorageDataResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
WriteDevicesHotStorageDataResult::~WriteDevicesHotStorageDataResult()
|
||||
{}
|
||||
|
||||
void WriteDevicesHotStorageDataResult::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["ErrorMessage"].isNull())
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string WriteDevicesHotStorageDataResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
std::string WriteDevicesHotStorageDataResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool WriteDevicesHotStorageDataResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user