Add Api ResetDeviceTimeline.

This commit is contained in:
sdk-team
2023-09-25 03:02:02 +00:00
parent 5021fa7e0a
commit 7eb4574903
16 changed files with 695 additions and 1 deletions

View File

@@ -11031,6 +11031,42 @@ IotClient::QuerySchedulePeriodListOutcomeCallable IotClient::querySchedulePeriod
return task->get_future();
}
IotClient::QueryShareProductNameByProductKeyOutcome IotClient::queryShareProductNameByProductKey(const QueryShareProductNameByProductKeyRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return QueryShareProductNameByProductKeyOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return QueryShareProductNameByProductKeyOutcome(QueryShareProductNameByProductKeyResult(outcome.result()));
else
return QueryShareProductNameByProductKeyOutcome(outcome.error());
}
void IotClient::queryShareProductNameByProductKeyAsync(const QueryShareProductNameByProductKeyRequest& request, const QueryShareProductNameByProductKeyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, queryShareProductNameByProductKey(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::QueryShareProductNameByProductKeyOutcomeCallable IotClient::queryShareProductNameByProductKeyCallable(const QueryShareProductNameByProductKeyRequest &request) const
{
auto task = std::make_shared<std::packaged_task<QueryShareProductNameByProductKeyOutcome()>>(
[this, request]()
{
return this->queryShareProductNameByProductKey(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::QuerySharePromotionActivityAuditResultOutcome IotClient::querySharePromotionActivityAuditResult(const QuerySharePromotionActivityAuditResultRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -12651,6 +12687,42 @@ IotClient::ResetConsumerGroupPositionOutcomeCallable IotClient::resetConsumerGro
return task->get_future();
}
IotClient::ResetDeviceTimelineOutcome IotClient::resetDeviceTimeline(const ResetDeviceTimelineRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ResetDeviceTimelineOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ResetDeviceTimelineOutcome(ResetDeviceTimelineResult(outcome.result()));
else
return ResetDeviceTimelineOutcome(outcome.error());
}
void IotClient::resetDeviceTimelineAsync(const ResetDeviceTimelineRequest& request, const ResetDeviceTimelineAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, resetDeviceTimeline(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::ResetDeviceTimelineOutcomeCallable IotClient::resetDeviceTimelineCallable(const ResetDeviceTimelineRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ResetDeviceTimelineOutcome()>>(
[this, request]()
{
return this->resetDeviceTimeline(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::ResetThingOutcome IotClient::resetThing(const ResetThingRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -38,6 +38,17 @@ void InvokeThingsServiceRequest::setAccessKeyId(const std::string& accessKeyId)
setParameter("AccessKeyId", accessKeyId);
}
int InvokeThingsServiceRequest::getQos()const
{
return qos_;
}
void InvokeThingsServiceRequest::setQos(int qos)
{
qos_ = qos;
setParameter("Qos", std::to_string(qos));
}
std::string InvokeThingsServiceRequest::getIotInstanceId()const
{
return iotInstanceId_;

View File

@@ -0,0 +1,73 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/iot/model/QueryShareProductNameByProductKeyRequest.h>
using AlibabaCloud::Iot::Model::QueryShareProductNameByProductKeyRequest;
QueryShareProductNameByProductKeyRequest::QueryShareProductNameByProductKeyRequest() :
RpcServiceRequest("iot", "2018-01-20", "QueryShareProductNameByProductKey")
{
setMethod(HttpRequest::Method::Post);
}
QueryShareProductNameByProductKeyRequest::~QueryShareProductNameByProductKeyRequest()
{}
std::string QueryShareProductNameByProductKeyRequest::getShareTaskCode()const
{
return shareTaskCode_;
}
void QueryShareProductNameByProductKeyRequest::setShareTaskCode(const std::string& shareTaskCode)
{
shareTaskCode_ = shareTaskCode;
setBodyParameter("ShareTaskCode", shareTaskCode);
}
std::string QueryShareProductNameByProductKeyRequest::getProductKey()const
{
return productKey_;
}
void QueryShareProductNameByProductKeyRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setBodyParameter("ProductKey", productKey);
}
std::string QueryShareProductNameByProductKeyRequest::getApiProduct()const
{
return apiProduct_;
}
void QueryShareProductNameByProductKeyRequest::setApiProduct(const std::string& apiProduct)
{
apiProduct_ = apiProduct;
setBodyParameter("ApiProduct", apiProduct);
}
std::string QueryShareProductNameByProductKeyRequest::getApiRevision()const
{
return apiRevision_;
}
void QueryShareProductNameByProductKeyRequest::setApiRevision(const std::string& apiRevision)
{
apiRevision_ = apiRevision;
setBodyParameter("ApiRevision", apiRevision);
}

View File

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

View File

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

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/ResetDeviceTimelineResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
ResetDeviceTimelineResult::ResetDeviceTimelineResult() :
ServiceResult()
{}
ResetDeviceTimelineResult::ResetDeviceTimelineResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ResetDeviceTimelineResult::~ResetDeviceTimelineResult()
{}
void ResetDeviceTimelineResult::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 ResetDeviceTimelineResult::getErrorMessage()const
{
return errorMessage_;
}
std::string ResetDeviceTimelineResult::getCode()const
{
return code_;
}
bool ResetDeviceTimelineResult::getSuccess()const
{
return success_;
}

View File

@@ -38,6 +38,17 @@ void SetDevicesPropertyRequest::setAccessKeyId(const std::string& accessKeyId)
setParameter("AccessKeyId", accessKeyId);
}
int SetDevicesPropertyRequest::getQos()const
{
return qos_;
}
void SetDevicesPropertyRequest::setQos(int qos)
{
qos_ = qos;
setParameter("Qos", std::to_string(qos));
}
std::string SetDevicesPropertyRequest::getIotInstanceId()const
{
return iotInstanceId_;