diff --git a/VERSION b/VERSION index f569a6f18..ac667f6f2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1359 \ No newline at end of file +1.36.1360 \ No newline at end of file diff --git a/iot/CMakeLists.txt b/iot/CMakeLists.txt index 6947b0294..bfe1ce114 100644 --- a/iot/CMakeLists.txt +++ b/iot/CMakeLists.txt @@ -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} diff --git a/iot/include/alibabacloud/iot/IotClient.h b/iot/include/alibabacloud/iot/IotClient.h index b11c638dd..6cfb6c907 100644 --- a/iot/include/alibabacloud/iot/IotClient.h +++ b/iot/include/alibabacloud/iot/IotClient.h @@ -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 QueryDeviceTunnelOutcome; typedef std::future QueryDeviceTunnelOutcomeCallable; typedef std::function&)> QueryDeviceTunnelAsyncHandler; + typedef Outcome QueryDevicesHotStorageDataOutcome; + typedef std::future QueryDevicesHotStorageDataOutcomeCallable; + typedef std::function&)> QueryDevicesHotStorageDataAsyncHandler; + typedef Outcome QueryDevicesHotStorageDataStatusOutcome; + typedef std::future QueryDevicesHotStorageDataStatusOutcomeCallable; + typedef std::function&)> QueryDevicesHotStorageDataStatusAsyncHandler; typedef Outcome QueryDynamicGroupDevicesOutcome; typedef std::future QueryDynamicGroupDevicesOutcomeCallable; typedef std::function&)> QueryDynamicGroupDevicesAsyncHandler; @@ -1971,6 +1983,9 @@ namespace AlibabaCloud typedef Outcome UpdateThingScriptOutcome; typedef std::future UpdateThingScriptOutcomeCallable; typedef std::function&)> UpdateThingScriptAsyncHandler; + typedef Outcome WriteDevicesHotStorageDataOutcome; + typedef std::future WriteDevicesHotStorageDataOutcomeCallable; + typedef std::function&)> WriteDevicesHotStorageDataAsyncHandler; IotClient(const Credentials &credentials, const ClientConfiguration &configuration); IotClient(const std::shared_ptr &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& 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& 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& 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& 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& 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& context = nullptr) const; + WriteDevicesHotStorageDataOutcomeCallable writeDevicesHotStorageDataCallable(const Model::WriteDevicesHotStorageDataRequest& request) const; private: std::shared_ptr endpointProvider_; diff --git a/iot/include/alibabacloud/iot/model/BatchGetDeviceBindStatusResult.h b/iot/include/alibabacloud/iot/model/BatchGetDeviceBindStatusResult.h index edb719956..4c883fd49 100644 --- a/iot/include/alibabacloud/iot/model/BatchGetDeviceBindStatusResult.h +++ b/iot/include/alibabacloud/iot/model/BatchGetDeviceBindStatusResult.h @@ -35,6 +35,7 @@ namespace AlibabaCloud struct DeviceStatus { std::string iotId; + std::string instanceId; int bindStatus; }; diff --git a/iot/include/alibabacloud/iot/model/QueryDevicesHotStorageDataRequest.h b/iot/include/alibabacloud/iot/model/QueryDevicesHotStorageDataRequest.h new file mode 100644 index 000000000..a1333952f --- /dev/null +++ b/iot/include/alibabacloud/iot/model/QueryDevicesHotStorageDataRequest.h @@ -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 +#include +#include +#include + +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_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/QueryDevicesHotStorageDataResult.h b/iot/include/alibabacloud/iot/model/QueryDevicesHotStorageDataResult.h new file mode 100644 index 000000000..0e161a2d4 --- /dev/null +++ b/iot/include/alibabacloud/iot/model/QueryDevicesHotStorageDataResult.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 +#include +#include +#include +#include + +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 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_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/QueryDevicesHotStorageDataStatusRequest.h b/iot/include/alibabacloud/iot/model/QueryDevicesHotStorageDataStatusRequest.h new file mode 100644 index 000000000..dd13c271b --- /dev/null +++ b/iot/include/alibabacloud/iot/model/QueryDevicesHotStorageDataStatusRequest.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 +#include +#include +#include + +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_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/QueryDevicesHotStorageDataStatusResult.h b/iot/include/alibabacloud/iot/model/QueryDevicesHotStorageDataStatusResult.h new file mode 100644 index 000000000..5f94b3c70 --- /dev/null +++ b/iot/include/alibabacloud/iot/model/QueryDevicesHotStorageDataStatusResult.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 +#include +#include +#include +#include + +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 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_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/WriteDevicesHotStorageDataRequest.h b/iot/include/alibabacloud/iot/model/WriteDevicesHotStorageDataRequest.h new file mode 100644 index 000000000..872b42f98 --- /dev/null +++ b/iot/include/alibabacloud/iot/model/WriteDevicesHotStorageDataRequest.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 +#include +#include +#include + +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_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/WriteDevicesHotStorageDataResult.h b/iot/include/alibabacloud/iot/model/WriteDevicesHotStorageDataResult.h new file mode 100644 index 000000000..e7078f87e --- /dev/null +++ b/iot/include/alibabacloud/iot/model/WriteDevicesHotStorageDataResult.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 +#include +#include +#include +#include + +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_ \ No newline at end of file diff --git a/iot/src/IotClient.cc b/iot/src/IotClient.cc index a1f48d918..62ec6f299 100644 --- a/iot/src/IotClient.cc +++ b/iot/src/IotClient.cc @@ -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& 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>( + [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& 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>( + [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& 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>( + [this, request]() + { + return this->writeDevicesHotStorageData(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + diff --git a/iot/src/model/BatchGetDeviceBindStatusResult.cc b/iot/src/model/BatchGetDeviceBindStatusResult.cc index 4d0dac93d..dcbc8663e 100644 --- a/iot/src/model/BatchGetDeviceBindStatusResult.cc +++ b/iot/src/model/BatchGetDeviceBindStatusResult.cc @@ -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()) diff --git a/iot/src/model/QueryDevicesHotStorageDataRequest.cc b/iot/src/model/QueryDevicesHotStorageDataRequest.cc new file mode 100644 index 000000000..1e4b2a8f9 --- /dev/null +++ b/iot/src/model/QueryDevicesHotStorageDataRequest.cc @@ -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 + +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); +} + diff --git a/iot/src/model/QueryDevicesHotStorageDataResult.cc b/iot/src/model/QueryDevicesHotStorageDataResult.cc new file mode 100644 index 000000000..d5c67e966 --- /dev/null +++ b/iot/src/model/QueryDevicesHotStorageDataResult.cc @@ -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 +#include + +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_; +} + diff --git a/iot/src/model/QueryDevicesHotStorageDataStatusRequest.cc b/iot/src/model/QueryDevicesHotStorageDataStatusRequest.cc new file mode 100644 index 000000000..bfae42940 --- /dev/null +++ b/iot/src/model/QueryDevicesHotStorageDataStatusRequest.cc @@ -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 + +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); +} + diff --git a/iot/src/model/QueryDevicesHotStorageDataStatusResult.cc b/iot/src/model/QueryDevicesHotStorageDataStatusResult.cc new file mode 100644 index 000000000..e35821fed --- /dev/null +++ b/iot/src/model/QueryDevicesHotStorageDataStatusResult.cc @@ -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 +#include + +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_; +} + diff --git a/iot/src/model/WriteDevicesHotStorageDataRequest.cc b/iot/src/model/WriteDevicesHotStorageDataRequest.cc new file mode 100644 index 000000000..bf83a5dfe --- /dev/null +++ b/iot/src/model/WriteDevicesHotStorageDataRequest.cc @@ -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 + +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); +} + diff --git a/iot/src/model/WriteDevicesHotStorageDataResult.cc b/iot/src/model/WriteDevicesHotStorageDataResult.cc new file mode 100644 index 000000000..bb9f096a1 --- /dev/null +++ b/iot/src/model/WriteDevicesHotStorageDataResult.cc @@ -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 +#include + +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_; +} +