Iot_20180120 old version sdk.

This commit is contained in:
sdk-team
2022-03-14 03:29:56 +00:00
parent a36e9edeee
commit 3086c83998
9 changed files with 4 additions and 313 deletions

View File

@@ -11319,42 +11319,6 @@ IotClient::UpdateThingModelOutcomeCallable IotClient::updateThingModelCallable(c
return task->get_future();
}
IotClient::UpdateThingModelValidationConfigOutcome IotClient::updateThingModelValidationConfig(const UpdateThingModelValidationConfigRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UpdateThingModelValidationConfigOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UpdateThingModelValidationConfigOutcome(UpdateThingModelValidationConfigResult(outcome.result()));
else
return UpdateThingModelValidationConfigOutcome(outcome.error());
}
void IotClient::updateThingModelValidationConfigAsync(const UpdateThingModelValidationConfigRequest& request, const UpdateThingModelValidationConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, updateThingModelValidationConfig(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::UpdateThingModelValidationConfigOutcomeCallable IotClient::updateThingModelValidationConfigCallable(const UpdateThingModelValidationConfigRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UpdateThingModelValidationConfigOutcome()>>(
[this, request]()
{
return this->updateThingModelValidationConfig(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::UpdateThingScriptOutcome IotClient::updateThingScript(const UpdateThingScriptRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -1,84 +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/UpdateThingModelValidationConfigRequest.h>
using AlibabaCloud::Iot::Model::UpdateThingModelValidationConfigRequest;
UpdateThingModelValidationConfigRequest::UpdateThingModelValidationConfigRequest() :
RpcServiceRequest("iot", "2018-01-20", "UpdateThingModelValidationConfig")
{
setMethod(HttpRequest::Method::Post);
}
UpdateThingModelValidationConfigRequest::~UpdateThingModelValidationConfigRequest()
{}
int UpdateThingModelValidationConfigRequest::getValidateType()const
{
return validateType_;
}
void UpdateThingModelValidationConfigRequest::setValidateType(int validateType)
{
validateType_ = validateType;
setParameter("ValidateType", std::to_string(validateType));
}
std::string UpdateThingModelValidationConfigRequest::getIotInstanceId()const
{
return iotInstanceId_;
}
void UpdateThingModelValidationConfigRequest::setIotInstanceId(const std::string& iotInstanceId)
{
iotInstanceId_ = iotInstanceId;
setParameter("IotInstanceId", iotInstanceId);
}
std::string UpdateThingModelValidationConfigRequest::getProductKey()const
{
return productKey_;
}
void UpdateThingModelValidationConfigRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string UpdateThingModelValidationConfigRequest::getApiProduct()const
{
return apiProduct_;
}
void UpdateThingModelValidationConfigRequest::setApiProduct(const std::string& apiProduct)
{
apiProduct_ = apiProduct;
setBodyParameter("ApiProduct", apiProduct);
}
std::string UpdateThingModelValidationConfigRequest::getApiRevision()const
{
return apiRevision_;
}
void UpdateThingModelValidationConfigRequest::setApiRevision(const std::string& apiRevision)
{
apiRevision_ = apiRevision;
setBodyParameter("ApiRevision", apiRevision);
}

View File

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