Generated 2020-05-18 for dataworks-public.

This commit is contained in:
sdk-team
2021-05-19 12:39:22 +00:00
parent bd94cb0b25
commit 920e72f912
21 changed files with 573 additions and 1 deletions

View File

@@ -6783,6 +6783,78 @@ Dataworks_publicClient::UpdateMetaTableIntroWikiOutcomeCallable Dataworks_public
return task->get_future();
}
Dataworks_publicClient::UpdateNodeOwnerOutcome Dataworks_publicClient::updateNodeOwner(const UpdateNodeOwnerRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UpdateNodeOwnerOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UpdateNodeOwnerOutcome(UpdateNodeOwnerResult(outcome.result()));
else
return UpdateNodeOwnerOutcome(outcome.error());
}
void Dataworks_publicClient::updateNodeOwnerAsync(const UpdateNodeOwnerRequest& request, const UpdateNodeOwnerAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, updateNodeOwner(request), context);
};
asyncExecute(new Runnable(fn));
}
Dataworks_publicClient::UpdateNodeOwnerOutcomeCallable Dataworks_publicClient::updateNodeOwnerCallable(const UpdateNodeOwnerRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UpdateNodeOwnerOutcome()>>(
[this, request]()
{
return this->updateNodeOwner(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Dataworks_publicClient::UpdateNodeRunModeOutcome Dataworks_publicClient::updateNodeRunMode(const UpdateNodeRunModeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UpdateNodeRunModeOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UpdateNodeRunModeOutcome(UpdateNodeRunModeResult(outcome.result()));
else
return UpdateNodeRunModeOutcome(outcome.error());
}
void Dataworks_publicClient::updateNodeRunModeAsync(const UpdateNodeRunModeRequest& request, const UpdateNodeRunModeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, updateNodeRunMode(request), context);
};
asyncExecute(new Runnable(fn));
}
Dataworks_publicClient::UpdateNodeRunModeOutcomeCallable Dataworks_publicClient::updateNodeRunModeCallable(const UpdateNodeRunModeRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UpdateNodeRunModeOutcome()>>(
[this, request]()
{
return this->updateNodeRunMode(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Dataworks_publicClient::UpdateQualityFollowerOutcome Dataworks_publicClient::updateQualityFollower(const UpdateQualityFollowerRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -280,3 +280,14 @@ void CreateFileRequest::setFileDescription(const std::string& fileDescription)
setBodyParameter("FileDescription", fileDescription);
}
bool CreateFileRequest::getAutoParsing()const
{
return autoParsing_;
}
void CreateFileRequest::setAutoParsing(bool autoParsing)
{
autoParsing_ = autoParsing;
setBodyParameter("AutoParsing", autoParsing ? "true" : "false");
}

View File

@@ -81,6 +81,8 @@ void GetFileResult::parse(const std::string &payload)
data_.file.deletedStatus = fileNode["DeletedStatus"].asString();
if(!fileNode["BusinessId"].isNull())
data_.file.businessId = std::stol(fileNode["BusinessId"].asString());
if(!fileNode["AutoParsing"].isNull())
data_.file.autoParsing = fileNode["AutoParsing"].asString() == "true";
auto nodeConfigurationNode = dataNode["NodeConfiguration"];
if(!nodeConfigurationNode["AutoRerunTimes"].isNull())
data_.nodeConfiguration.autoRerunTimes = std::stoi(nodeConfigurationNode["AutoRerunTimes"].asString());
@@ -112,6 +114,8 @@ void GetFileResult::parse(const std::string &payload)
Data::NodeConfiguration::NodeInputOutput nodeInputOutputObject;
if(!nodeConfigurationNodeInputListNodeInputOutput["Input"].isNull())
nodeInputOutputObject.input = nodeConfigurationNodeInputListNodeInputOutput["Input"].asString();
if(!nodeConfigurationNodeInputListNodeInputOutput["ParseType"].isNull())
nodeInputOutputObject.parseType = nodeConfigurationNodeInputListNodeInputOutput["ParseType"].asString();
data_.nodeConfiguration.inputList.push_back(nodeInputOutputObject);
}
auto allOutputListNode = nodeConfigurationNode["OutputList"]["NodeInputOutput"];

View File

@@ -90,6 +90,8 @@ void ListFilesResult::parse(const std::string &payload)
fileObject.fileId = std::stol(dataNodeFilesFile["FileId"].asString());
if(!dataNodeFilesFile["BusinessId"].isNull())
fileObject.businessId = std::stol(dataNodeFilesFile["BusinessId"].asString());
if(!dataNodeFilesFile["AutoParsing"].isNull())
fileObject.autoParsing = dataNodeFilesFile["AutoParsing"].asString() == "true";
data_.files.push_back(fileObject);
}
if(!value["Success"].isNull())

View File

@@ -280,3 +280,14 @@ void UpdateFileRequest::setFileDescription(const std::string& fileDescription)
setBodyParameter("FileDescription", fileDescription);
}
bool UpdateFileRequest::getAutoParsing()const
{
return autoParsing_;
}
void UpdateFileRequest::setAutoParsing(bool autoParsing)
{
autoParsing_ = autoParsing;
setBodyParameter("AutoParsing", autoParsing ? "true" : "false");
}

View File

@@ -0,0 +1,62 @@
/*
* 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/dataworks-public/model/UpdateNodeOwnerRequest.h>
using AlibabaCloud::Dataworks_public::Model::UpdateNodeOwnerRequest;
UpdateNodeOwnerRequest::UpdateNodeOwnerRequest() :
RpcServiceRequest("dataworks-public", "2020-05-18", "UpdateNodeOwner")
{
setMethod(HttpRequest::Method::Post);
}
UpdateNodeOwnerRequest::~UpdateNodeOwnerRequest()
{}
std::string UpdateNodeOwnerRequest::getProjectEnv()const
{
return projectEnv_;
}
void UpdateNodeOwnerRequest::setProjectEnv(const std::string& projectEnv)
{
projectEnv_ = projectEnv;
setBodyParameter("ProjectEnv", projectEnv);
}
long UpdateNodeOwnerRequest::getNodeId()const
{
return nodeId_;
}
void UpdateNodeOwnerRequest::setNodeId(long nodeId)
{
nodeId_ = nodeId;
setBodyParameter("NodeId", std::to_string(nodeId));
}
std::string UpdateNodeOwnerRequest::getUserId()const
{
return userId_;
}
void UpdateNodeOwnerRequest::setUserId(const std::string& userId)
{
userId_ = userId;
setBodyParameter("UserId", userId);
}

View File

@@ -0,0 +1,51 @@
/*
* 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/dataworks-public/model/UpdateNodeOwnerResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dataworks_public;
using namespace AlibabaCloud::Dataworks_public::Model;
UpdateNodeOwnerResult::UpdateNodeOwnerResult() :
ServiceResult()
{}
UpdateNodeOwnerResult::UpdateNodeOwnerResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UpdateNodeOwnerResult::~UpdateNodeOwnerResult()
{}
void UpdateNodeOwnerResult::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";
}
bool UpdateNodeOwnerResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,62 @@
/*
* 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/dataworks-public/model/UpdateNodeRunModeRequest.h>
using AlibabaCloud::Dataworks_public::Model::UpdateNodeRunModeRequest;
UpdateNodeRunModeRequest::UpdateNodeRunModeRequest() :
RpcServiceRequest("dataworks-public", "2020-05-18", "UpdateNodeRunMode")
{
setMethod(HttpRequest::Method::Post);
}
UpdateNodeRunModeRequest::~UpdateNodeRunModeRequest()
{}
std::string UpdateNodeRunModeRequest::getProjectEnv()const
{
return projectEnv_;
}
void UpdateNodeRunModeRequest::setProjectEnv(const std::string& projectEnv)
{
projectEnv_ = projectEnv;
setBodyParameter("ProjectEnv", projectEnv);
}
int UpdateNodeRunModeRequest::getSchedulerType()const
{
return schedulerType_;
}
void UpdateNodeRunModeRequest::setSchedulerType(int schedulerType)
{
schedulerType_ = schedulerType;
setBodyParameter("SchedulerType", std::to_string(schedulerType));
}
long UpdateNodeRunModeRequest::getNodeId()const
{
return nodeId_;
}
void UpdateNodeRunModeRequest::setNodeId(long nodeId)
{
nodeId_ = nodeId;
setBodyParameter("NodeId", std::to_string(nodeId));
}

View File

@@ -0,0 +1,51 @@
/*
* 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/dataworks-public/model/UpdateNodeRunModeResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dataworks_public;
using namespace AlibabaCloud::Dataworks_public::Model;
UpdateNodeRunModeResult::UpdateNodeRunModeResult() :
ServiceResult()
{}
UpdateNodeRunModeResult::UpdateNodeRunModeResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UpdateNodeRunModeResult::~UpdateNodeRunModeResult()
{}
void UpdateNodeRunModeResult::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";
}
bool UpdateNodeRunModeResult::getSuccess()const
{
return success_;
}