Supported CreateLakeHouseSpace,AddLhMembers,DeleteLhMembers,ListLhTaskFlowAndScenario,ChangeLhDagOwner,ReDeployLhDagVersion API.

This commit is contained in:
sdk-team
2022-03-24 08:22:02 +00:00
parent c5de90e7b9
commit fe5dcd30f9
17 changed files with 546 additions and 310 deletions

View File

@@ -195,6 +195,42 @@ Dms_enterpriseClient::ChangeColumnSecLevelOutcomeCallable Dms_enterpriseClient::
return task->get_future();
}
Dms_enterpriseClient::ChangeLhDagOwnerOutcome Dms_enterpriseClient::changeLhDagOwner(const ChangeLhDagOwnerRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ChangeLhDagOwnerOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ChangeLhDagOwnerOutcome(ChangeLhDagOwnerResult(outcome.result()));
else
return ChangeLhDagOwnerOutcome(outcome.error());
}
void Dms_enterpriseClient::changeLhDagOwnerAsync(const ChangeLhDagOwnerRequest& request, const ChangeLhDagOwnerAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, changeLhDagOwner(request), context);
};
asyncExecute(new Runnable(fn));
}
Dms_enterpriseClient::ChangeLhDagOwnerOutcomeCallable Dms_enterpriseClient::changeLhDagOwnerCallable(const ChangeLhDagOwnerRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ChangeLhDagOwnerOutcome()>>(
[this, request]()
{
return this->changeLhDagOwner(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Dms_enterpriseClient::CloseOrderOutcome Dms_enterpriseClient::closeOrder(const CloseOrderRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -303,42 +339,6 @@ Dms_enterpriseClient::CreateDataCronClearOrderOutcomeCallable Dms_enterpriseClie
return task->get_future();
}
Dms_enterpriseClient::CreateDataExportOrderOutcome Dms_enterpriseClient::createDataExportOrder(const CreateDataExportOrderRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateDataExportOrderOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateDataExportOrderOutcome(CreateDataExportOrderResult(outcome.result()));
else
return CreateDataExportOrderOutcome(outcome.error());
}
void Dms_enterpriseClient::createDataExportOrderAsync(const CreateDataExportOrderRequest& request, const CreateDataExportOrderAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createDataExportOrder(request), context);
};
asyncExecute(new Runnable(fn));
}
Dms_enterpriseClient::CreateDataExportOrderOutcomeCallable Dms_enterpriseClient::createDataExportOrderCallable(const CreateDataExportOrderRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateDataExportOrderOutcome()>>(
[this, request]()
{
return this->createDataExportOrder(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Dms_enterpriseClient::CreateDataImportOrderOutcome Dms_enterpriseClient::createDataImportOrder(const CreateDataImportOrderRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -3723,6 +3723,42 @@ Dms_enterpriseClient::PauseDataCorrectSQLJobOutcomeCallable Dms_enterpriseClient
return task->get_future();
}
Dms_enterpriseClient::ReDeployLhDagVersionOutcome Dms_enterpriseClient::reDeployLhDagVersion(const ReDeployLhDagVersionRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ReDeployLhDagVersionOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ReDeployLhDagVersionOutcome(ReDeployLhDagVersionResult(outcome.result()));
else
return ReDeployLhDagVersionOutcome(outcome.error());
}
void Dms_enterpriseClient::reDeployLhDagVersionAsync(const ReDeployLhDagVersionRequest& request, const ReDeployLhDagVersionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, reDeployLhDagVersion(request), context);
};
asyncExecute(new Runnable(fn));
}
Dms_enterpriseClient::ReDeployLhDagVersionOutcomeCallable Dms_enterpriseClient::reDeployLhDagVersionCallable(const ReDeployLhDagVersionRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ReDeployLhDagVersionOutcome()>>(
[this, request]()
{
return this->reDeployLhDagVersion(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Dms_enterpriseClient::RegisterInstanceOutcome Dms_enterpriseClient::registerInstance(const RegisterInstanceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,54 @@
/*
* 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/dms-enterprise/model/ChangeLhDagOwnerRequest.h>
using AlibabaCloud::Dms_enterprise::Model::ChangeLhDagOwnerRequest;
ChangeLhDagOwnerRequest::ChangeLhDagOwnerRequest()
: RpcServiceRequest("dms-enterprise", "2018-11-01", "ChangeLhDagOwner") {
setMethod(HttpRequest::Method::Post);
}
ChangeLhDagOwnerRequest::~ChangeLhDagOwnerRequest() {}
long ChangeLhDagOwnerRequest::getOwnerUserId() const {
return ownerUserId_;
}
void ChangeLhDagOwnerRequest::setOwnerUserId(long ownerUserId) {
ownerUserId_ = ownerUserId;
setParameter(std::string("OwnerUserId"), std::to_string(ownerUserId));
}
long ChangeLhDagOwnerRequest::getDagId() const {
return dagId_;
}
void ChangeLhDagOwnerRequest::setDagId(long dagId) {
dagId_ = dagId;
setParameter(std::string("DagId"), std::to_string(dagId));
}
long ChangeLhDagOwnerRequest::getTid() const {
return tid_;
}
void ChangeLhDagOwnerRequest::setTid(long tid) {
tid_ = tid;
setParameter(std::string("Tid"), std::to_string(tid));
}

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/dms-enterprise/model/ChangeLhDagOwnerResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dms_enterprise;
using namespace AlibabaCloud::Dms_enterprise::Model;
ChangeLhDagOwnerResult::ChangeLhDagOwnerResult() :
ServiceResult()
{}
ChangeLhDagOwnerResult::ChangeLhDagOwnerResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ChangeLhDagOwnerResult::~ChangeLhDagOwnerResult()
{}
void ChangeLhDagOwnerResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string ChangeLhDagOwnerResult::getErrorCode()const
{
return errorCode_;
}
std::string ChangeLhDagOwnerResult::getErrorMessage()const
{
return errorMessage_;
}
bool ChangeLhDagOwnerResult::getSuccess()const
{
return success_;
}

View File

@@ -1,79 +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/dms-enterprise/model/CreateDataExportOrderRequest.h>
using AlibabaCloud::Dms_enterprise::Model::CreateDataExportOrderRequest;
CreateDataExportOrderRequest::CreateDataExportOrderRequest()
: RpcServiceRequest("dms-enterprise", "2018-11-01", "CreateDataExportOrder") {
setMethod(HttpRequest::Method::Post);
}
CreateDataExportOrderRequest::~CreateDataExportOrderRequest() {}
long CreateDataExportOrderRequest::getTid() const {
return tid_;
}
void CreateDataExportOrderRequest::setTid(long tid) {
tid_ = tid;
setParameter(std::string("Tid"), std::to_string(tid));
}
std::string CreateDataExportOrderRequest::getAttachmentKey() const {
return attachmentKey_;
}
void CreateDataExportOrderRequest::setAttachmentKey(const std::string &attachmentKey) {
attachmentKey_ = attachmentKey;
setParameter(std::string("AttachmentKey"), attachmentKey);
}
CreateDataExportOrderRequest::Param CreateDataExportOrderRequest::getParam() const {
return param_;
}
void CreateDataExportOrderRequest::setParam(const CreateDataExportOrderRequest::Param &param) {
param_ = param;
setParameter(std::string("Param") + ".Classify", param.classify);
for(int dep1 = 0; dep1 != param.dbItemList.size(); dep1++) {
setParameter(std::string("Param") + ".DbItemList." + std::to_string(dep1 + 1) + ".DbId", std::to_string(param.dbItemList[dep1].dbId));
setParameter(std::string("Param") + ".DbItemList." + std::to_string(dep1 + 1) + ".Logic", param.dbItemList[dep1].logic ? "true" : "false");
}
setParameter(std::string("Param") + ".ExecSQL", param.execSQL);
}
std::string CreateDataExportOrderRequest::getComment() const {
return comment_;
}
void CreateDataExportOrderRequest::setComment(const std::string &comment) {
comment_ = comment;
setParameter(std::string("Comment"), comment);
}
std::vector<CreateDataExportOrderRequest::long> CreateDataExportOrderRequest::getRelatedUserList() const {
return relatedUserList_;
}
void CreateDataExportOrderRequest::setRelatedUserList(const std::vector<CreateDataExportOrderRequest::long> &relatedUserList) {
relatedUserList_ = relatedUserList;
for(int dep1 = 0; dep1 != relatedUserList.size(); dep1++) {
setParameter(std::string("RelatedUserList") + "." + std::to_string(dep1 + 1), std::to_string(relatedUserList[dep1]));
}
}

View File

@@ -39,82 +39,87 @@ void ListLhTaskFlowAndScenarioResult::parse(const std::string &payload)
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allRawDAGListNode = value["RawDAGList"]["dag"];
for (auto valueRawDAGListdag : allRawDAGListNode)
auto allRawDAGListNode = value["RawDAGList"]["Dag"];
for (auto valueRawDAGListDag : allRawDAGListNode)
{
Dag rawDAGListObject;
if(!valueRawDAGListdag["Id"].isNull())
rawDAGListObject.id = std::stol(valueRawDAGListdag["Id"].asString());
if(!valueRawDAGListdag["CreatorId"].isNull())
rawDAGListObject.creatorId = valueRawDAGListdag["CreatorId"].asString();
if(!valueRawDAGListdag["IsDeleted"].isNull())
rawDAGListObject.isDeleted = valueRawDAGListdag["IsDeleted"].asString() == "true";
if(!valueRawDAGListdag["DemoId"].isNull())
rawDAGListObject.demoId = valueRawDAGListdag["DemoId"].asString();
if(!valueRawDAGListdag["DeployId"].isNull())
rawDAGListObject.deployId = std::stol(valueRawDAGListdag["DeployId"].asString());
if(!valueRawDAGListdag["DataFlowId"].isNull())
rawDAGListObject.dataFlowId = std::stol(valueRawDAGListdag["DataFlowId"].asString());
if(!valueRawDAGListdag["ScenarioId"].isNull())
rawDAGListObject.scenarioId = std::stol(valueRawDAGListdag["ScenarioId"].asString());
if(!valueRawDAGListdag["SpaceId"].isNull())
rawDAGListObject.spaceId = std::stol(valueRawDAGListdag["SpaceId"].asString());
if(!valueRawDAGListdag["CreatorNickName"].isNull())
rawDAGListObject.creatorNickName = valueRawDAGListdag["CreatorNickName"].asString();
if(!valueRawDAGListdag["DagOwnerNickName"].isNull())
rawDAGListObject.dagOwnerNickName = valueRawDAGListdag["DagOwnerNickName"].asString();
if(!valueRawDAGListdag["CanEdit"].isNull())
rawDAGListObject.canEdit = valueRawDAGListdag["CanEdit"].asString() == "true";
if(!valueRawDAGListdag["Status"].isNull())
rawDAGListObject.status = std::stoi(valueRawDAGListdag["Status"].asString());
if(!valueRawDAGListdag["LatestInstanceStatus"].isNull())
rawDAGListObject.latestInstanceStatus = std::stoi(valueRawDAGListdag["LatestInstanceStatus"].asString());
if(!valueRawDAGListdag["LatestInstanceTime"].isNull())
rawDAGListObject.latestInstanceTime = std::stoi(valueRawDAGListdag["LatestInstanceTime"].asString());
if(!valueRawDAGListDag["Id"].isNull())
rawDAGListObject.id = std::stol(valueRawDAGListDag["Id"].asString());
if(!valueRawDAGListDag["CreatorId"].isNull())
rawDAGListObject.creatorId = valueRawDAGListDag["CreatorId"].asString();
if(!valueRawDAGListDag["IsDeleted"].isNull())
rawDAGListObject.isDeleted = valueRawDAGListDag["IsDeleted"].asString() == "true";
if(!valueRawDAGListDag["DemoId"].isNull())
rawDAGListObject.demoId = valueRawDAGListDag["DemoId"].asString();
if(!valueRawDAGListDag["DeployId"].isNull())
rawDAGListObject.deployId = std::stol(valueRawDAGListDag["DeployId"].asString());
if(!valueRawDAGListDag["DataFlowId"].isNull())
rawDAGListObject.dataFlowId = std::stol(valueRawDAGListDag["DataFlowId"].asString());
if(!valueRawDAGListDag["ScenarioId"].isNull())
rawDAGListObject.scenarioId = std::stol(valueRawDAGListDag["ScenarioId"].asString());
if(!valueRawDAGListDag["SpaceId"].isNull())
rawDAGListObject.spaceId = std::stol(valueRawDAGListDag["SpaceId"].asString());
if(!valueRawDAGListDag["CreatorNickName"].isNull())
rawDAGListObject.creatorNickName = valueRawDAGListDag["CreatorNickName"].asString();
if(!valueRawDAGListDag["DagOwnerNickName"].isNull())
rawDAGListObject.dagOwnerNickName = valueRawDAGListDag["DagOwnerNickName"].asString();
if(!valueRawDAGListDag["CanEdit"].isNull())
rawDAGListObject.canEdit = valueRawDAGListDag["CanEdit"].asString() == "true";
if(!valueRawDAGListDag["Status"].isNull())
rawDAGListObject.status = std::stoi(valueRawDAGListDag["Status"].asString());
if(!valueRawDAGListDag["LatestInstanceStatus"].isNull())
rawDAGListObject.latestInstanceStatus = std::stoi(valueRawDAGListDag["LatestInstanceStatus"].asString());
if(!valueRawDAGListDag["LatestInstanceTime"].isNull())
rawDAGListObject.latestInstanceTime = std::stoi(valueRawDAGListDag["LatestInstanceTime"].asString());
rawDAGList_.push_back(rawDAGListObject);
}
auto scenarioDAGListNode = value["ScenarioDAGList"];
auto allDagListNode = scenarioDAGListNode["DagList"]["dag"];
for (auto scenarioDAGListNodeDagListdag : allDagListNode)
auto allScenarioDAGListNode = value["ScenarioDAGList"]["ScenarioDAG"];
for (auto valueScenarioDAGListScenarioDAG : allScenarioDAGListNode)
{
ScenarioDAGList::Dag1 dag1Object;
if(!scenarioDAGListNodeDagListdag["Id"].isNull())
dag1Object.id = std::stol(scenarioDAGListNodeDagListdag["Id"].asString());
if(!scenarioDAGListNodeDagListdag["CreatorId"].isNull())
dag1Object.creatorId = scenarioDAGListNodeDagListdag["CreatorId"].asString();
if(!scenarioDAGListNodeDagListdag["IsDeleted"].isNull())
dag1Object.isDeleted = scenarioDAGListNodeDagListdag["IsDeleted"].asString() == "true";
if(!scenarioDAGListNodeDagListdag["DemoId"].isNull())
dag1Object.demoId = scenarioDAGListNodeDagListdag["DemoId"].asString();
if(!scenarioDAGListNodeDagListdag["DeployId"].isNull())
dag1Object.deployId = std::stol(scenarioDAGListNodeDagListdag["DeployId"].asString());
if(!scenarioDAGListNodeDagListdag["DataFlowId"].isNull())
dag1Object.dataFlowId = std::stol(scenarioDAGListNodeDagListdag["DataFlowId"].asString());
if(!scenarioDAGListNodeDagListdag["ScenarioId"].isNull())
dag1Object.scenarioId = std::stol(scenarioDAGListNodeDagListdag["ScenarioId"].asString());
if(!scenarioDAGListNodeDagListdag["SpaceId"].isNull())
dag1Object.spaceId = std::stol(scenarioDAGListNodeDagListdag["SpaceId"].asString());
if(!scenarioDAGListNodeDagListdag["CreatorNickName"].isNull())
dag1Object.creatorNickName = scenarioDAGListNodeDagListdag["CreatorNickName"].asString();
if(!scenarioDAGListNodeDagListdag["DagOwnerNickName"].isNull())
dag1Object.dagOwnerNickName = scenarioDAGListNodeDagListdag["DagOwnerNickName"].asString();
if(!scenarioDAGListNodeDagListdag["CanEdit"].isNull())
dag1Object.canEdit = scenarioDAGListNodeDagListdag["CanEdit"].asString() == "true";
if(!scenarioDAGListNodeDagListdag["Status"].isNull())
dag1Object.status = std::stoi(scenarioDAGListNodeDagListdag["Status"].asString());
if(!scenarioDAGListNodeDagListdag["LatestInstanceStatus"].isNull())
dag1Object.latestInstanceStatus = std::stoi(scenarioDAGListNodeDagListdag["LatestInstanceStatus"].asString());
if(!scenarioDAGListNodeDagListdag["LatestInstanceTime"].isNull())
dag1Object.latestInstanceTime = std::stoi(scenarioDAGListNodeDagListdag["LatestInstanceTime"].asString());
scenarioDAGList_.dagList.push_back(dag1Object);
ScenarioDAG scenarioDAGListObject;
auto allDagListNode = valueScenarioDAGListScenarioDAG["DagList"]["Dag"];
for (auto valueScenarioDAGListScenarioDAGDagListDag : allDagListNode)
{
ScenarioDAG::Dag1 dagListObject;
if(!valueScenarioDAGListScenarioDAGDagListDag["Id"].isNull())
dagListObject.id = std::stol(valueScenarioDAGListScenarioDAGDagListDag["Id"].asString());
if(!valueScenarioDAGListScenarioDAGDagListDag["CreatorId"].isNull())
dagListObject.creatorId = valueScenarioDAGListScenarioDAGDagListDag["CreatorId"].asString();
if(!valueScenarioDAGListScenarioDAGDagListDag["IsDeleted"].isNull())
dagListObject.isDeleted = valueScenarioDAGListScenarioDAGDagListDag["IsDeleted"].asString() == "true";
if(!valueScenarioDAGListScenarioDAGDagListDag["DemoId"].isNull())
dagListObject.demoId = valueScenarioDAGListScenarioDAGDagListDag["DemoId"].asString();
if(!valueScenarioDAGListScenarioDAGDagListDag["DeployId"].isNull())
dagListObject.deployId = std::stol(valueScenarioDAGListScenarioDAGDagListDag["DeployId"].asString());
if(!valueScenarioDAGListScenarioDAGDagListDag["DataFlowId"].isNull())
dagListObject.dataFlowId = std::stol(valueScenarioDAGListScenarioDAGDagListDag["DataFlowId"].asString());
if(!valueScenarioDAGListScenarioDAGDagListDag["ScenarioId"].isNull())
dagListObject.scenarioId = std::stol(valueScenarioDAGListScenarioDAGDagListDag["ScenarioId"].asString());
if(!valueScenarioDAGListScenarioDAGDagListDag["SpaceId"].isNull())
dagListObject.spaceId = std::stol(valueScenarioDAGListScenarioDAGDagListDag["SpaceId"].asString());
if(!valueScenarioDAGListScenarioDAGDagListDag["CreatorNickName"].isNull())
dagListObject.creatorNickName = valueScenarioDAGListScenarioDAGDagListDag["CreatorNickName"].asString();
if(!valueScenarioDAGListScenarioDAGDagListDag["DagOwnerNickName"].isNull())
dagListObject.dagOwnerNickName = valueScenarioDAGListScenarioDAGDagListDag["DagOwnerNickName"].asString();
if(!valueScenarioDAGListScenarioDAGDagListDag["CanEdit"].isNull())
dagListObject.canEdit = valueScenarioDAGListScenarioDAGDagListDag["CanEdit"].asString() == "true";
if(!valueScenarioDAGListScenarioDAGDagListDag["Status"].isNull())
dagListObject.status = std::stoi(valueScenarioDAGListScenarioDAGDagListDag["Status"].asString());
if(!valueScenarioDAGListScenarioDAGDagListDag["LatestInstanceStatus"].isNull())
dagListObject.latestInstanceStatus = std::stoi(valueScenarioDAGListScenarioDAGDagListDag["LatestInstanceStatus"].asString());
if(!valueScenarioDAGListScenarioDAGDagListDag["LatestInstanceTime"].isNull())
dagListObject.latestInstanceTime = std::stoi(valueScenarioDAGListScenarioDAGDagListDag["LatestInstanceTime"].asString());
scenarioDAGListObject.dagList.push_back(dagListObject);
}
auto scenarioNode = value["Scenario"];
if(!scenarioNode["ScenarioName"].isNull())
scenarioDAGListObject.scenario.scenarioName = scenarioNode["ScenarioName"].asString();
if(!scenarioNode["CreatorId"].isNull())
scenarioDAGListObject.scenario.creatorId = scenarioNode["CreatorId"].asString();
if(!scenarioNode["Description"].isNull())
scenarioDAGListObject.scenario.description = scenarioNode["Description"].asString();
scenarioDAGList_.push_back(scenarioDAGListObject);
}
auto scenarioNode = scenarioDAGListNode["Scenario"];
if(!scenarioNode["ScenarioName"].isNull())
scenarioDAGList_.scenario.scenarioName = scenarioNode["ScenarioName"].asString();
if(!scenarioNode["CreatorId"].isNull())
scenarioDAGList_.scenario.creatorId = scenarioNode["CreatorId"].asString();
if(!scenarioNode["Description"].isNull())
scenarioDAGList_.scenario.description = scenarioNode["Description"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["ErrorMessage"].isNull())
@@ -124,7 +129,7 @@ void ListLhTaskFlowAndScenarioResult::parse(const std::string &payload)
}
ListLhTaskFlowAndScenarioResult::ScenarioDAGList ListLhTaskFlowAndScenarioResult::getScenarioDAGList()const
std::vector<ListLhTaskFlowAndScenarioResult::ScenarioDAG> ListLhTaskFlowAndScenarioResult::getScenarioDAGList()const
{
return scenarioDAGList_;
}

View File

@@ -0,0 +1,54 @@
/*
* 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/dms-enterprise/model/ReDeployLhDagVersionRequest.h>
using AlibabaCloud::Dms_enterprise::Model::ReDeployLhDagVersionRequest;
ReDeployLhDagVersionRequest::ReDeployLhDagVersionRequest()
: RpcServiceRequest("dms-enterprise", "2018-11-01", "ReDeployLhDagVersion") {
setMethod(HttpRequest::Method::Post);
}
ReDeployLhDagVersionRequest::~ReDeployLhDagVersionRequest() {}
long ReDeployLhDagVersionRequest::getDagVersion() const {
return dagVersion_;
}
void ReDeployLhDagVersionRequest::setDagVersion(long dagVersion) {
dagVersion_ = dagVersion;
setParameter(std::string("DagVersion"), std::to_string(dagVersion));
}
long ReDeployLhDagVersionRequest::getDagId() const {
return dagId_;
}
void ReDeployLhDagVersionRequest::setDagId(long dagId) {
dagId_ = dagId;
setParameter(std::string("DagId"), std::to_string(dagId));
}
long ReDeployLhDagVersionRequest::getTid() const {
return tid_;
}
void ReDeployLhDagVersionRequest::setTid(long tid) {
tid_ = tid;
setParameter(std::string("Tid"), std::to_string(tid));
}

View File

@@ -14,59 +14,58 @@
* limitations under the License.
*/
#include <alibabacloud/dms-enterprise/model/CreateDataExportOrderResult.h>
#include <alibabacloud/dms-enterprise/model/ReDeployLhDagVersionResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dms_enterprise;
using namespace AlibabaCloud::Dms_enterprise::Model;
CreateDataExportOrderResult::CreateDataExportOrderResult() :
ReDeployLhDagVersionResult::ReDeployLhDagVersionResult() :
ServiceResult()
{}
CreateDataExportOrderResult::CreateDataExportOrderResult(const std::string &payload) :
ReDeployLhDagVersionResult::ReDeployLhDagVersionResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateDataExportOrderResult::~CreateDataExportOrderResult()
ReDeployLhDagVersionResult::~ReDeployLhDagVersionResult()
{}
void CreateDataExportOrderResult::parse(const std::string &payload)
void ReDeployLhDagVersionResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allCreateOrderResult = value["CreateOrderResult"]["OrderIds"];
for (const auto &item : allCreateOrderResult)
createOrderResult_.push_back(item.asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["DeployId"].isNull())
deployId_ = std::stol(value["DeployId"].asString());
}
std::vector<std::string> CreateDataExportOrderResult::getCreateOrderResult()const
long ReDeployLhDagVersionResult::getDeployId()const
{
return createOrderResult_;
return deployId_;
}
std::string CreateDataExportOrderResult::getErrorCode()const
std::string ReDeployLhDagVersionResult::getErrorCode()const
{
return errorCode_;
}
std::string CreateDataExportOrderResult::getErrorMessage()const
std::string ReDeployLhDagVersionResult::getErrorMessage()const
{
return errorMessage_;
}
bool CreateDataExportOrderResult::getSuccess()const
bool ReDeployLhDagVersionResult::getSuccess()const
{
return success_;
}