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

@@ -647,8 +647,6 @@ set(iot_public_header_model
include/alibabacloud/iot/model/UpdateSubscribeRelationResult.h
include/alibabacloud/iot/model/UpdateThingModelRequest.h
include/alibabacloud/iot/model/UpdateThingModelResult.h
include/alibabacloud/iot/model/UpdateThingModelValidationConfigRequest.h
include/alibabacloud/iot/model/UpdateThingModelValidationConfigResult.h
include/alibabacloud/iot/model/UpdateThingScriptRequest.h
include/alibabacloud/iot/model/UpdateThingScriptResult.h )
@@ -1280,8 +1278,6 @@ set(iot_src
src/model/UpdateSubscribeRelationResult.cc
src/model/UpdateThingModelRequest.cc
src/model/UpdateThingModelResult.cc
src/model/UpdateThingModelValidationConfigRequest.cc
src/model/UpdateThingModelValidationConfigResult.cc
src/model/UpdateThingScriptRequest.cc
src/model/UpdateThingScriptResult.cc )

View File

@@ -648,8 +648,6 @@
#include "model/UpdateSubscribeRelationResult.h"
#include "model/UpdateThingModelRequest.h"
#include "model/UpdateThingModelResult.h"
#include "model/UpdateThingModelValidationConfigRequest.h"
#include "model/UpdateThingModelValidationConfigResult.h"
#include "model/UpdateThingScriptRequest.h"
#include "model/UpdateThingScriptResult.h"
@@ -1600,9 +1598,6 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::UpdateThingModelResult> UpdateThingModelOutcome;
typedef std::future<UpdateThingModelOutcome> UpdateThingModelOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::UpdateThingModelRequest&, const UpdateThingModelOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateThingModelAsyncHandler;
typedef Outcome<Error, Model::UpdateThingModelValidationConfigResult> UpdateThingModelValidationConfigOutcome;
typedef std::future<UpdateThingModelValidationConfigOutcome> UpdateThingModelValidationConfigOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::UpdateThingModelValidationConfigRequest&, const UpdateThingModelValidationConfigOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateThingModelValidationConfigAsyncHandler;
typedef Outcome<Error, Model::UpdateThingScriptResult> UpdateThingScriptOutcome;
typedef std::future<UpdateThingScriptOutcome> UpdateThingScriptOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::UpdateThingScriptRequest&, const UpdateThingScriptOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateThingScriptAsyncHandler;
@@ -2550,9 +2545,6 @@ namespace AlibabaCloud
UpdateThingModelOutcome updateThingModel(const Model::UpdateThingModelRequest &request)const;
void updateThingModelAsync(const Model::UpdateThingModelRequest& request, const UpdateThingModelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
UpdateThingModelOutcomeCallable updateThingModelCallable(const Model::UpdateThingModelRequest& request) const;
UpdateThingModelValidationConfigOutcome updateThingModelValidationConfig(const Model::UpdateThingModelValidationConfigRequest &request)const;
void updateThingModelValidationConfigAsync(const Model::UpdateThingModelValidationConfigRequest& request, const UpdateThingModelValidationConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
UpdateThingModelValidationConfigOutcomeCallable updateThingModelValidationConfigCallable(const Model::UpdateThingModelValidationConfigRequest& request) const;
UpdateThingScriptOutcome updateThingScript(const Model::UpdateThingScriptRequest &request)const;
void updateThingScriptAsync(const Model::UpdateThingScriptRequest& request, const UpdateThingScriptAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
UpdateThingScriptOutcomeCallable updateThingScriptCallable(const Model::UpdateThingScriptRequest& request) const;

View File

@@ -1,60 +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_UPDATETHINGMODELVALIDATIONCONFIGREQUEST_H_
#define ALIBABACLOUD_IOT_MODEL_UPDATETHINGMODELVALIDATIONCONFIGREQUEST_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 UpdateThingModelValidationConfigRequest : public RpcServiceRequest
{
public:
UpdateThingModelValidationConfigRequest();
~UpdateThingModelValidationConfigRequest();
int getValidateType()const;
void setValidateType(int validateType);
std::string getIotInstanceId()const;
void setIotInstanceId(const std::string& iotInstanceId);
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);
private:
int validateType_;
std::string iotInstanceId_;
std::string productKey_;
std::string apiProduct_;
std::string apiRevision_;
};
}
}
}
#endif // !ALIBABACLOUD_IOT_MODEL_UPDATETHINGMODELVALIDATIONCONFIGREQUEST_H_

View File

@@ -1,55 +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_UPDATETHINGMODELVALIDATIONCONFIGRESULT_H_
#define ALIBABACLOUD_IOT_MODEL_UPDATETHINGMODELVALIDATIONCONFIGRESULT_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 UpdateThingModelValidationConfigResult : public ServiceResult
{
public:
UpdateThingModelValidationConfigResult();
explicit UpdateThingModelValidationConfigResult(const std::string &payload);
~UpdateThingModelValidationConfigResult();
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_UPDATETHINGMODELVALIDATIONCONFIGRESULT_H_

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_;
}