Update OTA API, including CreateOTADynamicUpgradeJob,CreateOTAStaticUpgradeJob,QueryOTAJob.

This commit is contained in:
sdk-team
2021-12-16 08:52:58 +00:00
parent 706b0f8216
commit 541be1be3e
32 changed files with 509 additions and 885 deletions

View File

@@ -1,3 +1,6 @@
2021-12-16 Version: 1.36.981
- Update OTA API, including CreateOTADynamicUpgradeJob,CreateOTAStaticUpgradeJob,QueryOTAJob.
2021-12-14 Version: 1.36.980
- Support query resourceType.

View File

@@ -1 +1 @@
1.36.980
1.36.981

View File

@@ -345,8 +345,6 @@ set(iot_public_header_model
include/alibabacloud/iot/model/ListRuleResult.h
include/alibabacloud/iot/model/ListRuleActionsRequest.h
include/alibabacloud/iot/model/ListRuleActionsResult.h
include/alibabacloud/iot/model/ListSourceReplicaRequest.h
include/alibabacloud/iot/model/ListSourceReplicaResult.h
include/alibabacloud/iot/model/ListTaskRequest.h
include/alibabacloud/iot/model/ListTaskResult.h
include/alibabacloud/iot/model/ListTaskByPageRequest.h
@@ -371,8 +369,6 @@ set(iot_public_header_model
include/alibabacloud/iot/model/PublishThingModelResult.h
include/alibabacloud/iot/model/PushSpeechRequest.h
include/alibabacloud/iot/model/PushSpeechResult.h
include/alibabacloud/iot/model/QueryAppDeviceListRequest.h
include/alibabacloud/iot/model/QueryAppDeviceListResult.h
include/alibabacloud/iot/model/QueryBatchRegisterDeviceStatusRequest.h
include/alibabacloud/iot/model/QueryBatchRegisterDeviceStatusResult.h
include/alibabacloud/iot/model/QueryCertUrlByApplyIdRequest.h
@@ -581,6 +577,8 @@ set(iot_public_header_model
include/alibabacloud/iot/model/SetupStudioAppAuthModeOpenResult.h
include/alibabacloud/iot/model/SpeechByCombinationRequest.h
include/alibabacloud/iot/model/SpeechByCombinationResult.h
include/alibabacloud/iot/model/SpeechBySynthesisRequest.h
include/alibabacloud/iot/model/SpeechBySynthesisResult.h
include/alibabacloud/iot/model/StartRuleRequest.h
include/alibabacloud/iot/model/StartRuleResult.h
include/alibabacloud/iot/model/StopRuleRequest.h
@@ -972,8 +970,6 @@ set(iot_src
src/model/ListRuleResult.cc
src/model/ListRuleActionsRequest.cc
src/model/ListRuleActionsResult.cc
src/model/ListSourceReplicaRequest.cc
src/model/ListSourceReplicaResult.cc
src/model/ListTaskRequest.cc
src/model/ListTaskResult.cc
src/model/ListTaskByPageRequest.cc
@@ -998,8 +994,6 @@ set(iot_src
src/model/PublishThingModelResult.cc
src/model/PushSpeechRequest.cc
src/model/PushSpeechResult.cc
src/model/QueryAppDeviceListRequest.cc
src/model/QueryAppDeviceListResult.cc
src/model/QueryBatchRegisterDeviceStatusRequest.cc
src/model/QueryBatchRegisterDeviceStatusResult.cc
src/model/QueryCertUrlByApplyIdRequest.cc
@@ -1208,6 +1202,8 @@ set(iot_src
src/model/SetupStudioAppAuthModeOpenResult.cc
src/model/SpeechByCombinationRequest.cc
src/model/SpeechByCombinationResult.cc
src/model/SpeechBySynthesisRequest.cc
src/model/SpeechBySynthesisResult.cc
src/model/StartRuleRequest.cc
src/model/StartRuleResult.cc
src/model/StopRuleRequest.cc

View File

@@ -346,8 +346,6 @@
#include "model/ListRuleResult.h"
#include "model/ListRuleActionsRequest.h"
#include "model/ListRuleActionsResult.h"
#include "model/ListSourceReplicaRequest.h"
#include "model/ListSourceReplicaResult.h"
#include "model/ListTaskRequest.h"
#include "model/ListTaskResult.h"
#include "model/ListTaskByPageRequest.h"
@@ -372,8 +370,6 @@
#include "model/PublishThingModelResult.h"
#include "model/PushSpeechRequest.h"
#include "model/PushSpeechResult.h"
#include "model/QueryAppDeviceListRequest.h"
#include "model/QueryAppDeviceListResult.h"
#include "model/QueryBatchRegisterDeviceStatusRequest.h"
#include "model/QueryBatchRegisterDeviceStatusResult.h"
#include "model/QueryCertUrlByApplyIdRequest.h"
@@ -582,6 +578,8 @@
#include "model/SetupStudioAppAuthModeOpenResult.h"
#include "model/SpeechByCombinationRequest.h"
#include "model/SpeechByCombinationResult.h"
#include "model/SpeechBySynthesisRequest.h"
#include "model/SpeechBySynthesisResult.h"
#include "model/StartRuleRequest.h"
#include "model/StartRuleResult.h"
#include "model/StopRuleRequest.h"
@@ -1141,9 +1139,6 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::ListRuleActionsResult> ListRuleActionsOutcome;
typedef std::future<ListRuleActionsOutcome> ListRuleActionsOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::ListRuleActionsRequest&, const ListRuleActionsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListRuleActionsAsyncHandler;
typedef Outcome<Error, Model::ListSourceReplicaResult> ListSourceReplicaOutcome;
typedef std::future<ListSourceReplicaOutcome> ListSourceReplicaOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::ListSourceReplicaRequest&, const ListSourceReplicaOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListSourceReplicaAsyncHandler;
typedef Outcome<Error, Model::ListTaskResult> ListTaskOutcome;
typedef std::future<ListTaskOutcome> ListTaskOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::ListTaskRequest&, const ListTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListTaskAsyncHandler;
@@ -1180,9 +1175,6 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::PushSpeechResult> PushSpeechOutcome;
typedef std::future<PushSpeechOutcome> PushSpeechOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::PushSpeechRequest&, const PushSpeechOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> PushSpeechAsyncHandler;
typedef Outcome<Error, Model::QueryAppDeviceListResult> QueryAppDeviceListOutcome;
typedef std::future<QueryAppDeviceListOutcome> QueryAppDeviceListOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::QueryAppDeviceListRequest&, const QueryAppDeviceListOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryAppDeviceListAsyncHandler;
typedef Outcome<Error, Model::QueryBatchRegisterDeviceStatusResult> QueryBatchRegisterDeviceStatusOutcome;
typedef std::future<QueryBatchRegisterDeviceStatusOutcome> QueryBatchRegisterDeviceStatusOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::QueryBatchRegisterDeviceStatusRequest&, const QueryBatchRegisterDeviceStatusOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryBatchRegisterDeviceStatusAsyncHandler;
@@ -1495,6 +1487,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::SpeechByCombinationResult> SpeechByCombinationOutcome;
typedef std::future<SpeechByCombinationOutcome> SpeechByCombinationOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::SpeechByCombinationRequest&, const SpeechByCombinationOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SpeechByCombinationAsyncHandler;
typedef Outcome<Error, Model::SpeechBySynthesisResult> SpeechBySynthesisOutcome;
typedef std::future<SpeechBySynthesisOutcome> SpeechBySynthesisOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::SpeechBySynthesisRequest&, const SpeechBySynthesisOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SpeechBySynthesisAsyncHandler;
typedef Outcome<Error, Model::StartRuleResult> StartRuleOutcome;
typedef std::future<StartRuleOutcome> StartRuleOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::StartRuleRequest&, const StartRuleOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> StartRuleAsyncHandler;
@@ -2082,9 +2077,6 @@ namespace AlibabaCloud
ListRuleActionsOutcome listRuleActions(const Model::ListRuleActionsRequest &request)const;
void listRuleActionsAsync(const Model::ListRuleActionsRequest& request, const ListRuleActionsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListRuleActionsOutcomeCallable listRuleActionsCallable(const Model::ListRuleActionsRequest& request) const;
ListSourceReplicaOutcome listSourceReplica(const Model::ListSourceReplicaRequest &request)const;
void listSourceReplicaAsync(const Model::ListSourceReplicaRequest& request, const ListSourceReplicaAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListSourceReplicaOutcomeCallable listSourceReplicaCallable(const Model::ListSourceReplicaRequest& request) const;
ListTaskOutcome listTask(const Model::ListTaskRequest &request)const;
void listTaskAsync(const Model::ListTaskRequest& request, const ListTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListTaskOutcomeCallable listTaskCallable(const Model::ListTaskRequest& request) const;
@@ -2121,9 +2113,6 @@ namespace AlibabaCloud
PushSpeechOutcome pushSpeech(const Model::PushSpeechRequest &request)const;
void pushSpeechAsync(const Model::PushSpeechRequest& request, const PushSpeechAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
PushSpeechOutcomeCallable pushSpeechCallable(const Model::PushSpeechRequest& request) const;
QueryAppDeviceListOutcome queryAppDeviceList(const Model::QueryAppDeviceListRequest &request)const;
void queryAppDeviceListAsync(const Model::QueryAppDeviceListRequest& request, const QueryAppDeviceListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
QueryAppDeviceListOutcomeCallable queryAppDeviceListCallable(const Model::QueryAppDeviceListRequest& request) const;
QueryBatchRegisterDeviceStatusOutcome queryBatchRegisterDeviceStatus(const Model::QueryBatchRegisterDeviceStatusRequest &request)const;
void queryBatchRegisterDeviceStatusAsync(const Model::QueryBatchRegisterDeviceStatusRequest& request, const QueryBatchRegisterDeviceStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
QueryBatchRegisterDeviceStatusOutcomeCallable queryBatchRegisterDeviceStatusCallable(const Model::QueryBatchRegisterDeviceStatusRequest& request) const;
@@ -2436,6 +2425,9 @@ namespace AlibabaCloud
SpeechByCombinationOutcome speechByCombination(const Model::SpeechByCombinationRequest &request)const;
void speechByCombinationAsync(const Model::SpeechByCombinationRequest& request, const SpeechByCombinationAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
SpeechByCombinationOutcomeCallable speechByCombinationCallable(const Model::SpeechByCombinationRequest& request) const;
SpeechBySynthesisOutcome speechBySynthesis(const Model::SpeechBySynthesisRequest &request)const;
void speechBySynthesisAsync(const Model::SpeechBySynthesisRequest& request, const SpeechBySynthesisAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
SpeechBySynthesisOutcomeCallable speechBySynthesisCallable(const Model::SpeechBySynthesisRequest& request) const;
StartRuleOutcome startRule(const Model::StartRuleRequest &request)const;
void startRuleAsync(const Model::StartRuleRequest& request, const StartRuleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
StartRuleOutcomeCallable startRuleCallable(const Model::StartRuleRequest& request) const;

View File

@@ -43,6 +43,8 @@ namespace AlibabaCloud
int getDynamicMode()const;
void setDynamicMode(int dynamicMode);
bool getMultiModuleMode()const;
void setMultiModuleMode(bool multiModuleMode);
int getRetryCount()const;
void setRetryCount(int retryCount);
int getTimeoutInMinutes()const;
@@ -82,6 +84,7 @@ namespace AlibabaCloud
private:
int dynamicMode_;
bool multiModuleMode_;
int retryCount_;
int timeoutInMinutes_;
bool needConfirm_;

View File

@@ -41,6 +41,8 @@ namespace AlibabaCloud
CreateOTAStaticUpgradeJobRequest();
~CreateOTAStaticUpgradeJobRequest();
bool getMultiModuleMode()const;
void setMultiModuleMode(bool multiModuleMode);
int getRetryCount()const;
void setRetryCount(int retryCount);
int getTimeoutInMinutes()const;
@@ -91,6 +93,7 @@ namespace AlibabaCloud
void setTargetDeviceName(const std::vector<std::string>& targetDeviceName);
private:
bool multiModuleMode_;
int retryCount_;
int timeoutInMinutes_;
bool needConfirm_;

View File

@@ -45,8 +45,12 @@ namespace AlibabaCloud
void setIotInstanceId(const std::string& iotInstanceId);
std::string getText()const;
void setText(const std::string& text);
std::string getSoundCodeConfig()const;
void setSoundCodeConfig(const std::string& soundCodeConfig);
std::string getSpeechType()const;
void setSpeechType(const std::string& speechType);
bool getEnableSoundCode()const;
void setEnableSoundCode(bool enableSoundCode);
int getVolume()const;
void setVolume(int volume);
std::string getBizCode()const;
@@ -64,7 +68,9 @@ namespace AlibabaCloud
std::string audioFormat_;
std::string iotInstanceId_;
std::string text_;
std::string soundCodeConfig_;
std::string speechType_;
bool enableSoundCode_;
int volume_;
std::string bizCode_;
std::string apiProduct_;

View File

@@ -1,69 +0,0 @@
/*
* 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_LISTSOURCEREPLICAREQUEST_H_
#define ALIBABACLOUD_IOT_MODEL_LISTSOURCEREPLICAREQUEST_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 ListSourceReplicaRequest : public RpcServiceRequest
{
public:
ListSourceReplicaRequest();
~ListSourceReplicaRequest();
std::string getIotInstanceId()const;
void setIotInstanceId(const std::string& iotInstanceId);
std::string getContext()const;
void setContext(const std::string& context);
int getPageSize()const;
void setPageSize(int pageSize);
std::string getSourceType()const;
void setSourceType(const std::string& sourceType);
int getPageNo()const;
void setPageNo(int pageNo);
std::string getLpInstanceId()const;
void setLpInstanceId(const std::string& lpInstanceId);
std::string getApiProduct()const;
void setApiProduct(const std::string& apiProduct);
std::string getApiRevision()const;
void setApiRevision(const std::string& apiRevision);
private:
std::string iotInstanceId_;
std::string context_;
int pageSize_;
std::string sourceType_;
int pageNo_;
std::string lpInstanceId_;
std::string apiProduct_;
std::string apiRevision_;
};
}
}
}
#endif // !ALIBABACLOUD_IOT_MODEL_LISTSOURCEREPLICAREQUEST_H_

View File

@@ -1,88 +0,0 @@
/*
* 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_LISTSOURCEREPLICARESULT_H_
#define ALIBABACLOUD_IOT_MODEL_LISTSOURCEREPLICARESULT_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 ListSourceReplicaResult : public ServiceResult
{
public:
struct Data
{
struct DataListItem
{
int timeCycle;
int status;
std::string longJobUid;
std::string sourceUid;
std::string extraProperty;
std::string sourceType;
long storageSize;
long productCreateTime;
std::string code;
long beginLatest;
std::string replicaUid;
std::string name;
std::string desc;
long gmtCreate;
int nodeType;
std::string tableUid;
std::string timeUnit;
int region;
long endLatest;
bool needTips;
};
std::vector<DataListItem> dataList;
long totalPage;
int pageSize;
long total;
int pageNo;
};
ListSourceReplicaResult();
explicit ListSourceReplicaResult(const std::string &payload);
~ListSourceReplicaResult();
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_LISTSOURCEREPLICARESULT_H_

View File

@@ -35,14 +35,14 @@ namespace AlibabaCloud
PrintByTemplateRequest();
~PrintByTemplateRequest();
std::string getProjectCode()const;
void setProjectCode(const std::string& projectCode);
std::string getTemplateBizCode()const;
void setTemplateBizCode(const std::string& templateBizCode);
std::string getIotId()const;
void setIotId(const std::string& iotId);
std::string getIotInstanceId()const;
void setIotInstanceId(const std::string& iotInstanceId);
bool getHistoryPrintTopic()const;
void setHistoryPrintTopic(bool historyPrintTopic);
std::string getProductKey()const;
void setProductKey(const std::string& productKey);
std::string getParamsJsonString()const;
@@ -55,10 +55,10 @@ namespace AlibabaCloud
void setDeviceName(const std::string& deviceName);
private:
std::string projectCode_;
std::string templateBizCode_;
std::string iotId_;
std::string iotInstanceId_;
bool historyPrintTopic_;
std::string productKey_;
std::string paramsJsonString_;
std::string apiProduct_;

View File

@@ -1,78 +0,0 @@
/*
* 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_QUERYAPPDEVICELISTREQUEST_H_
#define ALIBABACLOUD_IOT_MODEL_QUERYAPPDEVICELISTREQUEST_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 QueryAppDeviceListRequest : public RpcServiceRequest
{
public:
struct TagList
{
std::string tagName;
std::string tagValue;
};
public:
QueryAppDeviceListRequest();
~QueryAppDeviceListRequest();
std::vector<TagList> getTagList()const;
void setTagList(const std::vector<TagList>& tagList);
std::vector<std::string> getProductKeyList()const;
void setProductKeyList(const std::vector<std::string>& productKeyList);
std::string getIotInstanceId()const;
void setIotInstanceId(const std::string& iotInstanceId);
int getPageSize()const;
void setPageSize(int pageSize);
int getCurrentPage()const;
void setCurrentPage(int currentPage);
std::vector<std::string> getCategoryKeyList()const;
void setCategoryKeyList(const std::vector<std::string>& categoryKeyList);
std::string getApiProduct()const;
void setApiProduct(const std::string& apiProduct);
std::string getApiRevision()const;
void setApiRevision(const std::string& apiRevision);
std::string getAppKey()const;
void setAppKey(const std::string& appKey);
private:
std::vector<TagList> tagList_;
std::vector<std::string> productKeyList_;
std::string iotInstanceId_;
int pageSize_;
int currentPage_;
std::vector<std::string> categoryKeyList_;
std::string apiProduct_;
std::string apiRevision_;
std::string appKey_;
};
}
}
}
#endif // !ALIBABACLOUD_IOT_MODEL_QUERYAPPDEVICELISTREQUEST_H_

View File

@@ -44,6 +44,7 @@ namespace AlibabaCloud
bool needPush;
int overwriteMode;
std::string firmwareId;
bool multiModuleMode;
std::string name;
std::string jobStatus;
int retryCount;

View File

@@ -34,8 +34,15 @@ namespace AlibabaCloud
public:
struct Data
{
struct SoundCodeConfig
{
int additionalDuration;
std::string soundCodeContent;
};
SoundCodeConfig soundCodeConfig;
std::string speechType;
int volume;
bool enableSoundCode;
std::string speechCode;
std::string text;
std::string audioFormat;

View File

@@ -0,0 +1,81 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_IOT_MODEL_SPEECHBYSYNTHESISREQUEST_H_
#define ALIBABACLOUD_IOT_MODEL_SPEECHBYSYNTHESISREQUEST_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 SpeechBySynthesisRequest : public RpcServiceRequest
{
public:
SpeechBySynthesisRequest();
~SpeechBySynthesisRequest();
std::string getVoice()const;
void setVoice(const std::string& voice);
std::string getSpeechId()const;
void setSpeechId(const std::string& speechId);
std::string getAudioFormat()const;
void setAudioFormat(const std::string& audioFormat);
std::string getIotId()const;
void setIotId(const std::string& iotId);
std::string getIotInstanceId()const;
void setIotInstanceId(const std::string& iotInstanceId);
std::string getText()const;
void setText(const std::string& text);
std::string getProductKey()const;
void setProductKey(const std::string& productKey);
int getVolume()const;
void setVolume(int volume);
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);
int getSpeechRate()const;
void setSpeechRate(int speechRate);
private:
std::string voice_;
std::string speechId_;
std::string audioFormat_;
std::string iotId_;
std::string iotInstanceId_;
std::string text_;
std::string productKey_;
int volume_;
std::string apiProduct_;
std::string apiRevision_;
std::string deviceName_;
int speechRate_;
};
}
}
}
#endif // !ALIBABACLOUD_IOT_MODEL_SPEECHBYSYNTHESISREQUEST_H_

View File

@@ -14,8 +14,8 @@
* limitations under the License.
*/
#ifndef ALIBABACLOUD_IOT_MODEL_QUERYAPPDEVICELISTRESULT_H_
#define ALIBABACLOUD_IOT_MODEL_QUERYAPPDEVICELISTRESULT_H_
#ifndef ALIBABACLOUD_IOT_MODEL_SPEECHBYSYNTHESISRESULT_H_
#define ALIBABACLOUD_IOT_MODEL_SPEECHBYSYNTHESISRESULT_H_
#include <string>
#include <vector>
@@ -29,34 +29,14 @@ namespace AlibabaCloud
{
namespace Model
{
class ALIBABACLOUD_IOT_EXPORT QueryAppDeviceListResult : public ServiceResult
class ALIBABACLOUD_IOT_EXPORT SpeechBySynthesisResult : public ServiceResult
{
public:
struct DataItem
{
std::string status;
std::string lastOnlineTime;
std::string utcActiveTime;
std::string utcCreateTime;
std::string productName;
long childDeviceCount;
std::string activeTime;
std::string utcLastOnlineTime;
int nodeType;
std::string createTime;
std::string productKey;
std::string deviceName;
};
QueryAppDeviceListResult();
explicit QueryAppDeviceListResult(const std::string &payload);
~QueryAppDeviceListResult();
int getPageSize()const;
int getPageCount()const;
int getTotal()const;
std::vector<DataItem> getData()const;
int getPage()const;
SpeechBySynthesisResult();
explicit SpeechBySynthesisResult(const std::string &payload);
~SpeechBySynthesisResult();
std::string getErrorMessage()const;
std::string getCode()const;
bool getSuccess()const;
@@ -64,11 +44,6 @@ namespace AlibabaCloud
protected:
void parse(const std::string &payload);
private:
int pageSize_;
int pageCount_;
int total_;
std::vector<DataItem> data_;
int page_;
std::string errorMessage_;
std::string code_;
bool success_;
@@ -77,4 +52,4 @@ namespace AlibabaCloud
}
}
}
#endif // !ALIBABACLOUD_IOT_MODEL_QUERYAPPDEVICELISTRESULT_H_
#endif // !ALIBABACLOUD_IOT_MODEL_SPEECHBYSYNTHESISRESULT_H_

View File

@@ -45,8 +45,12 @@ namespace AlibabaCloud
void setIotInstanceId(const std::string& iotInstanceId);
std::string getText()const;
void setText(const std::string& text);
std::string getSoundCodeConfig()const;
void setSoundCodeConfig(const std::string& soundCodeConfig);
std::string getSpeechType()const;
void setSpeechType(const std::string& speechType);
bool getEnableSoundCode()const;
void setEnableSoundCode(bool enableSoundCode);
int getVolume()const;
void setVolume(int volume);
std::string getApiProduct()const;
@@ -62,7 +66,9 @@ namespace AlibabaCloud
std::string audioFormat_;
std::string iotInstanceId_;
std::string text_;
std::string soundCodeConfig_;
std::string speechType_;
bool enableSoundCode_;
int volume_;
std::string apiProduct_;
std::string apiRevision_;

View File

@@ -41,6 +41,10 @@ namespace AlibabaCloud
void setProjectCode(const std::string& projectCode);
std::string getIotInstanceId()const;
void setIotInstanceId(const std::string& iotInstanceId);
std::string getSoundCodeConfig()const;
void setSoundCodeConfig(const std::string& soundCodeConfig);
bool getEnableSoundCode()const;
void setEnableSoundCode(bool enableSoundCode);
int getVolume()const;
void setVolume(int volume);
std::string getApiProduct()const;
@@ -56,6 +60,8 @@ namespace AlibabaCloud
std::string voice_;
std::string projectCode_;
std::string iotInstanceId_;
std::string soundCodeConfig_;
bool enableSoundCode_;
int volume_;
std::string apiProduct_;
std::string apiRevision_;

View File

@@ -5883,42 +5883,6 @@ IotClient::ListRuleActionsOutcomeCallable IotClient::listRuleActionsCallable(con
return task->get_future();
}
IotClient::ListSourceReplicaOutcome IotClient::listSourceReplica(const ListSourceReplicaRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListSourceReplicaOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListSourceReplicaOutcome(ListSourceReplicaResult(outcome.result()));
else
return ListSourceReplicaOutcome(outcome.error());
}
void IotClient::listSourceReplicaAsync(const ListSourceReplicaRequest& request, const ListSourceReplicaAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listSourceReplica(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::ListSourceReplicaOutcomeCallable IotClient::listSourceReplicaCallable(const ListSourceReplicaRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListSourceReplicaOutcome()>>(
[this, request]()
{
return this->listSourceReplica(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::ListTaskOutcome IotClient::listTask(const ListTaskRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -6351,42 +6315,6 @@ IotClient::PushSpeechOutcomeCallable IotClient::pushSpeechCallable(const PushSpe
return task->get_future();
}
IotClient::QueryAppDeviceListOutcome IotClient::queryAppDeviceList(const QueryAppDeviceListRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return QueryAppDeviceListOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return QueryAppDeviceListOutcome(QueryAppDeviceListResult(outcome.result()));
else
return QueryAppDeviceListOutcome(outcome.error());
}
void IotClient::queryAppDeviceListAsync(const QueryAppDeviceListRequest& request, const QueryAppDeviceListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, queryAppDeviceList(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::QueryAppDeviceListOutcomeCallable IotClient::queryAppDeviceListCallable(const QueryAppDeviceListRequest &request) const
{
auto task = std::make_shared<std::packaged_task<QueryAppDeviceListOutcome()>>(
[this, request]()
{
return this->queryAppDeviceList(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::QueryBatchRegisterDeviceStatusOutcome IotClient::queryBatchRegisterDeviceStatus(const QueryBatchRegisterDeviceStatusRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -10131,6 +10059,42 @@ IotClient::SpeechByCombinationOutcomeCallable IotClient::speechByCombinationCall
return task->get_future();
}
IotClient::SpeechBySynthesisOutcome IotClient::speechBySynthesis(const SpeechBySynthesisRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return SpeechBySynthesisOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return SpeechBySynthesisOutcome(SpeechBySynthesisResult(outcome.result()));
else
return SpeechBySynthesisOutcome(outcome.error());
}
void IotClient::speechBySynthesisAsync(const SpeechBySynthesisRequest& request, const SpeechBySynthesisAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, speechBySynthesis(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::SpeechBySynthesisOutcomeCallable IotClient::speechBySynthesisCallable(const SpeechBySynthesisRequest &request) const
{
auto task = std::make_shared<std::packaged_task<SpeechBySynthesisOutcome()>>(
[this, request]()
{
return this->speechBySynthesis(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::StartRuleOutcome IotClient::startRule(const StartRuleRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -38,6 +38,17 @@ void CreateOTADynamicUpgradeJobRequest::setDynamicMode(int dynamicMode)
setParameter("DynamicMode", std::to_string(dynamicMode));
}
bool CreateOTADynamicUpgradeJobRequest::getMultiModuleMode()const
{
return multiModuleMode_;
}
void CreateOTADynamicUpgradeJobRequest::setMultiModuleMode(bool multiModuleMode)
{
multiModuleMode_ = multiModuleMode;
setParameter("MultiModuleMode", multiModuleMode ? "true" : "false");
}
int CreateOTADynamicUpgradeJobRequest::getRetryCount()const
{
return retryCount_;

View File

@@ -27,6 +27,17 @@ CreateOTAStaticUpgradeJobRequest::CreateOTAStaticUpgradeJobRequest() :
CreateOTAStaticUpgradeJobRequest::~CreateOTAStaticUpgradeJobRequest()
{}
bool CreateOTAStaticUpgradeJobRequest::getMultiModuleMode()const
{
return multiModuleMode_;
}
void CreateOTAStaticUpgradeJobRequest::setMultiModuleMode(bool multiModuleMode)
{
multiModuleMode_ = multiModuleMode;
setParameter("MultiModuleMode", multiModuleMode ? "true" : "false");
}
int CreateOTAStaticUpgradeJobRequest::getRetryCount()const
{
return retryCount_;

View File

@@ -82,6 +82,17 @@ void CreateSpeechRequest::setText(const std::string& text)
setBodyParameter("Text", text);
}
std::string CreateSpeechRequest::getSoundCodeConfig()const
{
return soundCodeConfig_;
}
void CreateSpeechRequest::setSoundCodeConfig(const std::string& soundCodeConfig)
{
soundCodeConfig_ = soundCodeConfig;
setBodyParameter("SoundCodeConfig", soundCodeConfig);
}
std::string CreateSpeechRequest::getSpeechType()const
{
return speechType_;
@@ -93,6 +104,17 @@ void CreateSpeechRequest::setSpeechType(const std::string& speechType)
setBodyParameter("SpeechType", speechType);
}
bool CreateSpeechRequest::getEnableSoundCode()const
{
return enableSoundCode_;
}
void CreateSpeechRequest::setEnableSoundCode(bool enableSoundCode)
{
enableSoundCode_ = enableSoundCode;
setBodyParameter("EnableSoundCode", enableSoundCode ? "true" : "false");
}
int CreateSpeechRequest::getVolume()const
{
return volume_;

View File

@@ -1,117 +0,0 @@
/*
* 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/ListSourceReplicaRequest.h>
using AlibabaCloud::Iot::Model::ListSourceReplicaRequest;
ListSourceReplicaRequest::ListSourceReplicaRequest() :
RpcServiceRequest("iot", "2018-01-20", "ListSourceReplica")
{
setMethod(HttpRequest::Method::Post);
}
ListSourceReplicaRequest::~ListSourceReplicaRequest()
{}
std::string ListSourceReplicaRequest::getIotInstanceId()const
{
return iotInstanceId_;
}
void ListSourceReplicaRequest::setIotInstanceId(const std::string& iotInstanceId)
{
iotInstanceId_ = iotInstanceId;
setBodyParameter("IotInstanceId", iotInstanceId);
}
std::string ListSourceReplicaRequest::getContext()const
{
return context_;
}
void ListSourceReplicaRequest::setContext(const std::string& context)
{
context_ = context;
setBodyParameter("Context", context);
}
int ListSourceReplicaRequest::getPageSize()const
{
return pageSize_;
}
void ListSourceReplicaRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
std::string ListSourceReplicaRequest::getSourceType()const
{
return sourceType_;
}
void ListSourceReplicaRequest::setSourceType(const std::string& sourceType)
{
sourceType_ = sourceType;
setParameter("SourceType", sourceType);
}
int ListSourceReplicaRequest::getPageNo()const
{
return pageNo_;
}
void ListSourceReplicaRequest::setPageNo(int pageNo)
{
pageNo_ = pageNo;
setParameter("PageNo", std::to_string(pageNo));
}
std::string ListSourceReplicaRequest::getLpInstanceId()const
{
return lpInstanceId_;
}
void ListSourceReplicaRequest::setLpInstanceId(const std::string& lpInstanceId)
{
lpInstanceId_ = lpInstanceId;
setParameter("LpInstanceId", lpInstanceId);
}
std::string ListSourceReplicaRequest::getApiProduct()const
{
return apiProduct_;
}
void ListSourceReplicaRequest::setApiProduct(const std::string& apiProduct)
{
apiProduct_ = apiProduct;
setBodyParameter("ApiProduct", apiProduct);
}
std::string ListSourceReplicaRequest::getApiRevision()const
{
return apiRevision_;
}
void ListSourceReplicaRequest::setApiRevision(const std::string& apiRevision)
{
apiRevision_ = apiRevision;
setBodyParameter("ApiRevision", apiRevision);
}

View File

@@ -1,125 +0,0 @@
/*
* 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/ListSourceReplicaResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
ListSourceReplicaResult::ListSourceReplicaResult() :
ServiceResult()
{}
ListSourceReplicaResult::ListSourceReplicaResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListSourceReplicaResult::~ListSourceReplicaResult()
{}
void ListSourceReplicaResult::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["Total"].isNull())
data_.total = std::stol(dataNode["Total"].asString());
if(!dataNode["TotalPage"].isNull())
data_.totalPage = std::stol(dataNode["TotalPage"].asString());
if(!dataNode["PageSize"].isNull())
data_.pageSize = std::stoi(dataNode["PageSize"].asString());
if(!dataNode["PageNo"].isNull())
data_.pageNo = std::stoi(dataNode["PageNo"].asString());
auto allDataListNode = dataNode["DataList"]["DataListItem"];
for (auto dataNodeDataListDataListItem : allDataListNode)
{
Data::DataListItem dataListItemObject;
if(!dataNodeDataListDataListItem["ReplicaUid"].isNull())
dataListItemObject.replicaUid = dataNodeDataListDataListItem["ReplicaUid"].asString();
if(!dataNodeDataListDataListItem["Name"].isNull())
dataListItemObject.name = dataNodeDataListDataListItem["Name"].asString();
if(!dataNodeDataListDataListItem["Code"].isNull())
dataListItemObject.code = dataNodeDataListDataListItem["Code"].asString();
if(!dataNodeDataListDataListItem["SourceUid"].isNull())
dataListItemObject.sourceUid = dataNodeDataListDataListItem["SourceUid"].asString();
if(!dataNodeDataListDataListItem["TableUid"].isNull())
dataListItemObject.tableUid = dataNodeDataListDataListItem["TableUid"].asString();
if(!dataNodeDataListDataListItem["SourceType"].isNull())
dataListItemObject.sourceType = dataNodeDataListDataListItem["SourceType"].asString();
if(!dataNodeDataListDataListItem["TimeCycle"].isNull())
dataListItemObject.timeCycle = std::stoi(dataNodeDataListDataListItem["TimeCycle"].asString());
if(!dataNodeDataListDataListItem["TimeUnit"].isNull())
dataListItemObject.timeUnit = dataNodeDataListDataListItem["TimeUnit"].asString();
if(!dataNodeDataListDataListItem["Region"].isNull())
dataListItemObject.region = std::stoi(dataNodeDataListDataListItem["Region"].asString());
if(!dataNodeDataListDataListItem["BeginLatest"].isNull())
dataListItemObject.beginLatest = std::stol(dataNodeDataListDataListItem["BeginLatest"].asString());
if(!dataNodeDataListDataListItem["EndLatest"].isNull())
dataListItemObject.endLatest = std::stol(dataNodeDataListDataListItem["EndLatest"].asString());
if(!dataNodeDataListDataListItem["ExtraProperty"].isNull())
dataListItemObject.extraProperty = dataNodeDataListDataListItem["ExtraProperty"].asString();
if(!dataNodeDataListDataListItem["Status"].isNull())
dataListItemObject.status = std::stoi(dataNodeDataListDataListItem["Status"].asString());
if(!dataNodeDataListDataListItem["StorageSize"].isNull())
dataListItemObject.storageSize = std::stol(dataNodeDataListDataListItem["StorageSize"].asString());
if(!dataNodeDataListDataListItem["ProductCreateTime"].isNull())
dataListItemObject.productCreateTime = std::stol(dataNodeDataListDataListItem["ProductCreateTime"].asString());
if(!dataNodeDataListDataListItem["NodeType"].isNull())
dataListItemObject.nodeType = std::stoi(dataNodeDataListDataListItem["NodeType"].asString());
if(!dataNodeDataListDataListItem["NeedTips"].isNull())
dataListItemObject.needTips = dataNodeDataListDataListItem["NeedTips"].asString() == "true";
if(!dataNodeDataListDataListItem["LongJobUid"].isNull())
dataListItemObject.longJobUid = dataNodeDataListDataListItem["LongJobUid"].asString();
if(!dataNodeDataListDataListItem["Desc"].isNull())
dataListItemObject.desc = dataNodeDataListDataListItem["Desc"].asString();
if(!dataNodeDataListDataListItem["GmtCreate"].isNull())
dataListItemObject.gmtCreate = std::stol(dataNodeDataListDataListItem["GmtCreate"].asString());
data_.dataList.push_back(dataListItemObject);
}
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();
}
ListSourceReplicaResult::Data ListSourceReplicaResult::getData()const
{
return data_;
}
std::string ListSourceReplicaResult::getErrorMessage()const
{
return errorMessage_;
}
std::string ListSourceReplicaResult::getCode()const
{
return code_;
}
bool ListSourceReplicaResult::getSuccess()const
{
return success_;
}

View File

@@ -27,17 +27,6 @@ PrintByTemplateRequest::PrintByTemplateRequest() :
PrintByTemplateRequest::~PrintByTemplateRequest()
{}
std::string PrintByTemplateRequest::getProjectCode()const
{
return projectCode_;
}
void PrintByTemplateRequest::setProjectCode(const std::string& projectCode)
{
projectCode_ = projectCode;
setBodyParameter("ProjectCode", projectCode);
}
std::string PrintByTemplateRequest::getTemplateBizCode()const
{
return templateBizCode_;
@@ -71,6 +60,17 @@ void PrintByTemplateRequest::setIotInstanceId(const std::string& iotInstanceId)
setBodyParameter("IotInstanceId", iotInstanceId);
}
bool PrintByTemplateRequest::getHistoryPrintTopic()const
{
return historyPrintTopic_;
}
void PrintByTemplateRequest::setHistoryPrintTopic(bool historyPrintTopic)
{
historyPrintTopic_ = historyPrintTopic;
setBodyParameter("HistoryPrintTopic", historyPrintTopic ? "true" : "false");
}
std::string PrintByTemplateRequest::getProductKey()const
{
return productKey_;

View File

@@ -1,137 +0,0 @@
/*
* 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/QueryAppDeviceListRequest.h>
using AlibabaCloud::Iot::Model::QueryAppDeviceListRequest;
QueryAppDeviceListRequest::QueryAppDeviceListRequest() :
RpcServiceRequest("iot", "2018-01-20", "QueryAppDeviceList")
{
setMethod(HttpRequest::Method::Post);
}
QueryAppDeviceListRequest::~QueryAppDeviceListRequest()
{}
std::vector<QueryAppDeviceListRequest::TagList> QueryAppDeviceListRequest::getTagList()const
{
return tagList_;
}
void QueryAppDeviceListRequest::setTagList(const std::vector<TagList>& tagList)
{
tagList_ = tagList;
for(int dep1 = 0; dep1!= tagList.size(); dep1++) {
auto tagListObj = tagList.at(dep1);
std::string tagListObjStr = "TagList." + std::to_string(dep1 + 1);
setParameter(tagListObjStr + ".TagName", tagListObj.tagName);
setParameter(tagListObjStr + ".TagValue", tagListObj.tagValue);
}
}
std::vector<std::string> QueryAppDeviceListRequest::getProductKeyList()const
{
return productKeyList_;
}
void QueryAppDeviceListRequest::setProductKeyList(const std::vector<std::string>& productKeyList)
{
productKeyList_ = productKeyList;
for(int dep1 = 0; dep1!= productKeyList.size(); dep1++) {
setParameter("ProductKeyList."+ std::to_string(dep1), productKeyList.at(dep1));
}
}
std::string QueryAppDeviceListRequest::getIotInstanceId()const
{
return iotInstanceId_;
}
void QueryAppDeviceListRequest::setIotInstanceId(const std::string& iotInstanceId)
{
iotInstanceId_ = iotInstanceId;
setParameter("IotInstanceId", iotInstanceId);
}
int QueryAppDeviceListRequest::getPageSize()const
{
return pageSize_;
}
void QueryAppDeviceListRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
int QueryAppDeviceListRequest::getCurrentPage()const
{
return currentPage_;
}
void QueryAppDeviceListRequest::setCurrentPage(int currentPage)
{
currentPage_ = currentPage;
setParameter("CurrentPage", std::to_string(currentPage));
}
std::vector<std::string> QueryAppDeviceListRequest::getCategoryKeyList()const
{
return categoryKeyList_;
}
void QueryAppDeviceListRequest::setCategoryKeyList(const std::vector<std::string>& categoryKeyList)
{
categoryKeyList_ = categoryKeyList;
for(int dep1 = 0; dep1!= categoryKeyList.size(); dep1++) {
setParameter("CategoryKeyList."+ std::to_string(dep1), categoryKeyList.at(dep1));
}
}
std::string QueryAppDeviceListRequest::getApiProduct()const
{
return apiProduct_;
}
void QueryAppDeviceListRequest::setApiProduct(const std::string& apiProduct)
{
apiProduct_ = apiProduct;
setBodyParameter("ApiProduct", apiProduct);
}
std::string QueryAppDeviceListRequest::getApiRevision()const
{
return apiRevision_;
}
void QueryAppDeviceListRequest::setApiRevision(const std::string& apiRevision)
{
apiRevision_ = apiRevision;
setBodyParameter("ApiRevision", apiRevision);
}
std::string QueryAppDeviceListRequest::getAppKey()const
{
return appKey_;
}
void QueryAppDeviceListRequest::setAppKey(const std::string& appKey)
{
appKey_ = appKey;
setParameter("AppKey", appKey);
}

View File

@@ -1,128 +0,0 @@
/*
* 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/QueryAppDeviceListResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
QueryAppDeviceListResult::QueryAppDeviceListResult() :
ServiceResult()
{}
QueryAppDeviceListResult::QueryAppDeviceListResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryAppDeviceListResult::~QueryAppDeviceListResult()
{}
void QueryAppDeviceListResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDataNode = value["Data"]["DataItem"];
for (auto valueDataDataItem : allDataNode)
{
DataItem dataObject;
if(!valueDataDataItem["ProductName"].isNull())
dataObject.productName = valueDataDataItem["ProductName"].asString();
if(!valueDataDataItem["ProductKey"].isNull())
dataObject.productKey = valueDataDataItem["ProductKey"].asString();
if(!valueDataDataItem["DeviceName"].isNull())
dataObject.deviceName = valueDataDataItem["DeviceName"].asString();
if(!valueDataDataItem["NodeType"].isNull())
dataObject.nodeType = std::stoi(valueDataDataItem["NodeType"].asString());
if(!valueDataDataItem["Status"].isNull())
dataObject.status = valueDataDataItem["Status"].asString();
if(!valueDataDataItem["ActiveTime"].isNull())
dataObject.activeTime = valueDataDataItem["ActiveTime"].asString();
if(!valueDataDataItem["LastOnlineTime"].isNull())
dataObject.lastOnlineTime = valueDataDataItem["LastOnlineTime"].asString();
if(!valueDataDataItem["CreateTime"].isNull())
dataObject.createTime = valueDataDataItem["CreateTime"].asString();
if(!valueDataDataItem["ChildDeviceCount"].isNull())
dataObject.childDeviceCount = std::stol(valueDataDataItem["ChildDeviceCount"].asString());
if(!valueDataDataItem["UtcActiveTime"].isNull())
dataObject.utcActiveTime = valueDataDataItem["UtcActiveTime"].asString();
if(!valueDataDataItem["UtcLastOnlineTime"].isNull())
dataObject.utcLastOnlineTime = valueDataDataItem["UtcLastOnlineTime"].asString();
if(!valueDataDataItem["UtcCreateTime"].isNull())
dataObject.utcCreateTime = valueDataDataItem["UtcCreateTime"].asString();
data_.push_back(dataObject);
}
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();
if(!value["Page"].isNull())
page_ = std::stoi(value["Page"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
if(!value["PageCount"].isNull())
pageCount_ = std::stoi(value["PageCount"].asString());
if(!value["Total"].isNull())
total_ = std::stoi(value["Total"].asString());
}
int QueryAppDeviceListResult::getPageSize()const
{
return pageSize_;
}
int QueryAppDeviceListResult::getPageCount()const
{
return pageCount_;
}
int QueryAppDeviceListResult::getTotal()const
{
return total_;
}
std::vector<QueryAppDeviceListResult::DataItem> QueryAppDeviceListResult::getData()const
{
return data_;
}
int QueryAppDeviceListResult::getPage()const
{
return page_;
}
std::string QueryAppDeviceListResult::getErrorMessage()const
{
return errorMessage_;
}
std::string QueryAppDeviceListResult::getCode()const
{
return code_;
}
bool QueryAppDeviceListResult::getSuccess()const
{
return success_;
}

View File

@@ -96,6 +96,8 @@ void QueryOTAJobResult::parse(const std::string &payload)
data_.groupName = dataNode["GroupName"].asString();
if(!dataNode["DownloadProtocol"].isNull())
data_.downloadProtocol = dataNode["DownloadProtocol"].asString();
if(!dataNode["MultiModuleMode"].isNull())
data_.multiModuleMode = dataNode["MultiModuleMode"].asString() == "true";
auto allTagsNode = dataNode["Tags"]["OtaTagDTO"];
for (auto dataNodeTagsOtaTagDTO : allTagsNode)
{

View File

@@ -56,6 +56,13 @@ void QuerySpeechResult::parse(const std::string &payload)
data_.audioFormat = dataNode["AudioFormat"].asString();
if(!dataNode["SpeechType"].isNull())
data_.speechType = dataNode["SpeechType"].asString();
if(!dataNode["EnableSoundCode"].isNull())
data_.enableSoundCode = dataNode["EnableSoundCode"].asString() == "true";
auto soundCodeConfigNode = dataNode["SoundCodeConfig"];
if(!soundCodeConfigNode["AdditionalDuration"].isNull())
data_.soundCodeConfig.additionalDuration = std::stoi(soundCodeConfigNode["AdditionalDuration"].asString());
if(!soundCodeConfigNode["SoundCodeContent"].isNull())
data_.soundCodeConfig.soundCodeContent = soundCodeConfigNode["SoundCodeContent"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())

View 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/SpeechBySynthesisRequest.h>
using AlibabaCloud::Iot::Model::SpeechBySynthesisRequest;
SpeechBySynthesisRequest::SpeechBySynthesisRequest() :
RpcServiceRequest("iot", "2018-01-20", "SpeechBySynthesis")
{
setMethod(HttpRequest::Method::Post);
}
SpeechBySynthesisRequest::~SpeechBySynthesisRequest()
{}
std::string SpeechBySynthesisRequest::getVoice()const
{
return voice_;
}
void SpeechBySynthesisRequest::setVoice(const std::string& voice)
{
voice_ = voice;
setBodyParameter("Voice", voice);
}
std::string SpeechBySynthesisRequest::getSpeechId()const
{
return speechId_;
}
void SpeechBySynthesisRequest::setSpeechId(const std::string& speechId)
{
speechId_ = speechId;
setBodyParameter("SpeechId", speechId);
}
std::string SpeechBySynthesisRequest::getAudioFormat()const
{
return audioFormat_;
}
void SpeechBySynthesisRequest::setAudioFormat(const std::string& audioFormat)
{
audioFormat_ = audioFormat;
setBodyParameter("AudioFormat", audioFormat);
}
std::string SpeechBySynthesisRequest::getIotId()const
{
return iotId_;
}
void SpeechBySynthesisRequest::setIotId(const std::string& iotId)
{
iotId_ = iotId;
setBodyParameter("IotId", iotId);
}
std::string SpeechBySynthesisRequest::getIotInstanceId()const
{
return iotInstanceId_;
}
void SpeechBySynthesisRequest::setIotInstanceId(const std::string& iotInstanceId)
{
iotInstanceId_ = iotInstanceId;
setBodyParameter("IotInstanceId", iotInstanceId);
}
std::string SpeechBySynthesisRequest::getText()const
{
return text_;
}
void SpeechBySynthesisRequest::setText(const std::string& text)
{
text_ = text;
setBodyParameter("Text", text);
}
std::string SpeechBySynthesisRequest::getProductKey()const
{
return productKey_;
}
void SpeechBySynthesisRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setBodyParameter("ProductKey", productKey);
}
int SpeechBySynthesisRequest::getVolume()const
{
return volume_;
}
void SpeechBySynthesisRequest::setVolume(int volume)
{
volume_ = volume;
setBodyParameter("Volume", std::to_string(volume));
}
std::string SpeechBySynthesisRequest::getApiProduct()const
{
return apiProduct_;
}
void SpeechBySynthesisRequest::setApiProduct(const std::string& apiProduct)
{
apiProduct_ = apiProduct;
setBodyParameter("ApiProduct", apiProduct);
}
std::string SpeechBySynthesisRequest::getApiRevision()const
{
return apiRevision_;
}
void SpeechBySynthesisRequest::setApiRevision(const std::string& apiRevision)
{
apiRevision_ = apiRevision;
setBodyParameter("ApiRevision", apiRevision);
}
std::string SpeechBySynthesisRequest::getDeviceName()const
{
return deviceName_;
}
void SpeechBySynthesisRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setBodyParameter("DeviceName", deviceName);
}
int SpeechBySynthesisRequest::getSpeechRate()const
{
return speechRate_;
}
void SpeechBySynthesisRequest::setSpeechRate(int speechRate)
{
speechRate_ = speechRate;
setBodyParameter("SpeechRate", std::to_string(speechRate));
}

View File

@@ -0,0 +1,65 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/iot/model/SpeechBySynthesisResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
SpeechBySynthesisResult::SpeechBySynthesisResult() :
ServiceResult()
{}
SpeechBySynthesisResult::SpeechBySynthesisResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
SpeechBySynthesisResult::~SpeechBySynthesisResult()
{}
void SpeechBySynthesisResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string SpeechBySynthesisResult::getErrorMessage()const
{
return errorMessage_;
}
std::string SpeechBySynthesisResult::getCode()const
{
return code_;
}
bool SpeechBySynthesisResult::getSuccess()const
{
return success_;
}

View File

@@ -82,6 +82,17 @@ void TestSpeechRequest::setText(const std::string& text)
setBodyParameter("Text", text);
}
std::string TestSpeechRequest::getSoundCodeConfig()const
{
return soundCodeConfig_;
}
void TestSpeechRequest::setSoundCodeConfig(const std::string& soundCodeConfig)
{
soundCodeConfig_ = soundCodeConfig;
setBodyParameter("SoundCodeConfig", soundCodeConfig);
}
std::string TestSpeechRequest::getSpeechType()const
{
return speechType_;
@@ -93,6 +104,17 @@ void TestSpeechRequest::setSpeechType(const std::string& speechType)
setBodyParameter("SpeechType", speechType);
}
bool TestSpeechRequest::getEnableSoundCode()const
{
return enableSoundCode_;
}
void TestSpeechRequest::setEnableSoundCode(bool enableSoundCode)
{
enableSoundCode_ = enableSoundCode;
setBodyParameter("EnableSoundCode", enableSoundCode ? "true" : "false");
}
int TestSpeechRequest::getVolume()const
{
return volume_;

View File

@@ -60,6 +60,28 @@ void UpdateSpeechRequest::setIotInstanceId(const std::string& iotInstanceId)
setBodyParameter("IotInstanceId", iotInstanceId);
}
std::string UpdateSpeechRequest::getSoundCodeConfig()const
{
return soundCodeConfig_;
}
void UpdateSpeechRequest::setSoundCodeConfig(const std::string& soundCodeConfig)
{
soundCodeConfig_ = soundCodeConfig;
setBodyParameter("SoundCodeConfig", soundCodeConfig);
}
bool UpdateSpeechRequest::getEnableSoundCode()const
{
return enableSoundCode_;
}
void UpdateSpeechRequest::setEnableSoundCode(bool enableSoundCode)
{
enableSoundCode_ = enableSoundCode;
setBodyParameter("EnableSoundCode", enableSoundCode ? "true" : "false");
}
int UpdateSpeechRequest::getVolume()const
{
return volume_;