Remove redundant input for API ListTaskFlow.

This commit is contained in:
sdk-team
2022-04-12 03:20:58 +00:00
parent 8b405dedc5
commit 4014391257
11 changed files with 329 additions and 25 deletions

View File

@@ -1,3 +1,6 @@
2022-04-12 Version: 1.36.1103
- Remove redundant input for API ListTaskFlow.
2022-04-11 Version: 1.36.1102
- Set multiple apis to public.

View File

@@ -1 +1 @@
1.36.1102
1.36.1103

View File

@@ -169,6 +169,8 @@ set(dms-enterprise_public_header_model
include/alibabacloud/dms-enterprise/model/InspectProxyAccessSecretResult.h
include/alibabacloud/dms-enterprise/model/ListColumnsRequest.h
include/alibabacloud/dms-enterprise/model/ListColumnsResult.h
include/alibabacloud/dms-enterprise/model/ListDAGVersionsRequest.h
include/alibabacloud/dms-enterprise/model/ListDAGVersionsResult.h
include/alibabacloud/dms-enterprise/model/ListDBTaskSQLJobRequest.h
include/alibabacloud/dms-enterprise/model/ListDBTaskSQLJobResult.h
include/alibabacloud/dms-enterprise/model/ListDBTaskSQLJobDetailRequest.h
@@ -418,6 +420,8 @@ set(dms-enterprise_src
src/model/InspectProxyAccessSecretResult.cc
src/model/ListColumnsRequest.cc
src/model/ListColumnsResult.cc
src/model/ListDAGVersionsRequest.cc
src/model/ListDAGVersionsResult.cc
src/model/ListDBTaskSQLJobRequest.cc
src/model/ListDBTaskSQLJobResult.cc
src/model/ListDBTaskSQLJobDetailRequest.cc

View File

@@ -170,6 +170,8 @@
#include "model/InspectProxyAccessSecretResult.h"
#include "model/ListColumnsRequest.h"
#include "model/ListColumnsResult.h"
#include "model/ListDAGVersionsRequest.h"
#include "model/ListDAGVersionsResult.h"
#include "model/ListDBTaskSQLJobRequest.h"
#include "model/ListDBTaskSQLJobResult.h"
#include "model/ListDBTaskSQLJobDetailRequest.h"
@@ -499,6 +501,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::ListColumnsResult> ListColumnsOutcome;
typedef std::future<ListColumnsOutcome> ListColumnsOutcomeCallable;
typedef std::function<void(const Dms_enterpriseClient*, const Model::ListColumnsRequest&, const ListColumnsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListColumnsAsyncHandler;
typedef Outcome<Error, Model::ListDAGVersionsResult> ListDAGVersionsOutcome;
typedef std::future<ListDAGVersionsOutcome> ListDAGVersionsOutcomeCallable;
typedef std::function<void(const Dms_enterpriseClient*, const Model::ListDAGVersionsRequest&, const ListDAGVersionsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListDAGVersionsAsyncHandler;
typedef Outcome<Error, Model::ListDBTaskSQLJobResult> ListDBTaskSQLJobOutcome;
typedef std::future<ListDBTaskSQLJobOutcome> ListDBTaskSQLJobOutcomeCallable;
typedef std::function<void(const Dms_enterpriseClient*, const Model::ListDBTaskSQLJobRequest&, const ListDBTaskSQLJobOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListDBTaskSQLJobAsyncHandler;
@@ -873,6 +878,9 @@ namespace AlibabaCloud
ListColumnsOutcome listColumns(const Model::ListColumnsRequest &request)const;
void listColumnsAsync(const Model::ListColumnsRequest& request, const ListColumnsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListColumnsOutcomeCallable listColumnsCallable(const Model::ListColumnsRequest& request) const;
ListDAGVersionsOutcome listDAGVersions(const Model::ListDAGVersionsRequest &request)const;
void listDAGVersionsAsync(const Model::ListDAGVersionsRequest& request, const ListDAGVersionsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListDAGVersionsOutcomeCallable listDAGVersionsCallable(const Model::ListDAGVersionsRequest& request) const;
ListDBTaskSQLJobOutcome listDBTaskSQLJob(const Model::ListDBTaskSQLJobRequest &request)const;
void listDBTaskSQLJobAsync(const Model::ListDBTaskSQLJobRequest& request, const ListDBTaskSQLJobAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListDBTaskSQLJobOutcomeCallable listDBTaskSQLJobCallable(const Model::ListDBTaskSQLJobRequest& request) const;

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.
*/
#ifndef ALIBABACLOUD_DMS_ENTERPRISE_MODEL_LISTDAGVERSIONSREQUEST_H_
#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_LISTDAGVERSIONSREQUEST_H_
#include <alibabacloud/dms-enterprise/Dms_enterpriseExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace Dms_enterprise {
namespace Model {
class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT ListDAGVersionsRequest : public RpcServiceRequest {
public:
ListDAGVersionsRequest();
~ListDAGVersionsRequest();
long getDagId() const;
void setDagId(long dagId);
long getTid() const;
void setTid(long tid);
int getPageSize() const;
void setPageSize(int pageSize);
int getPageIndex() const;
void setPageIndex(int pageIndex);
private:
long dagId_;
long tid_;
int pageSize_;
int pageIndex_;
};
} // namespace Model
} // namespace Dms_enterprise
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_LISTDAGVERSIONSREQUEST_H_

View File

@@ -0,0 +1,68 @@
/*
* 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_DMS_ENTERPRISE_MODEL_LISTDAGVERSIONSRESULT_H_
#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_LISTDAGVERSIONSRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/dms-enterprise/Dms_enterpriseExport.h>
namespace AlibabaCloud
{
namespace Dms_enterprise
{
namespace Model
{
class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT ListDAGVersionsResult : public ServiceResult
{
public:
struct DagVersion
{
long versionId;
long lastVersionId;
std::string dagOwnerId;
std::string versionComments;
std::string dagName;
std::string dagOwnerNickName;
};
ListDAGVersionsResult();
explicit ListDAGVersionsResult(const std::string &payload);
~ListDAGVersionsResult();
int getTotalCount()const;
std::string getErrorCode()const;
std::string getErrorMessage()const;
std::vector<DagVersion> getDagVersionList()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
int totalCount_;
std::string errorCode_;
std::string errorMessage_;
std::vector<DagVersion> dagVersionList_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_LISTDAGVERSIONSRESULT_H_

View File

@@ -30,17 +30,11 @@ class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT ListTaskFlowRequest : public RpcService
public:
ListTaskFlowRequest();
~ListTaskFlowRequest();
long getDagId() const;
void setDagId(long dagId);
long getTid() const;
void setTid(long tid);
long getDagInstanceId() const;
void setDagInstanceId(long dagInstanceId);
private:
long dagId_;
long tid_;
long dagInstanceId_;
};
} // namespace Model
} // namespace Dms_enterprise

View File

@@ -2715,6 +2715,42 @@ Dms_enterpriseClient::ListColumnsOutcomeCallable Dms_enterpriseClient::listColum
return task->get_future();
}
Dms_enterpriseClient::ListDAGVersionsOutcome Dms_enterpriseClient::listDAGVersions(const ListDAGVersionsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListDAGVersionsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListDAGVersionsOutcome(ListDAGVersionsResult(outcome.result()));
else
return ListDAGVersionsOutcome(outcome.error());
}
void Dms_enterpriseClient::listDAGVersionsAsync(const ListDAGVersionsRequest& request, const ListDAGVersionsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listDAGVersions(request), context);
};
asyncExecute(new Runnable(fn));
}
Dms_enterpriseClient::ListDAGVersionsOutcomeCallable Dms_enterpriseClient::listDAGVersionsCallable(const ListDAGVersionsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListDAGVersionsOutcome()>>(
[this, request]()
{
return this->listDAGVersions(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Dms_enterpriseClient::ListDBTaskSQLJobOutcome Dms_enterpriseClient::listDBTaskSQLJob(const ListDBTaskSQLJobRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,63 @@
/*
* 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/ListDAGVersionsRequest.h>
using AlibabaCloud::Dms_enterprise::Model::ListDAGVersionsRequest;
ListDAGVersionsRequest::ListDAGVersionsRequest()
: RpcServiceRequest("dms-enterprise", "2018-11-01", "ListDAGVersions") {
setMethod(HttpRequest::Method::Post);
}
ListDAGVersionsRequest::~ListDAGVersionsRequest() {}
long ListDAGVersionsRequest::getDagId() const {
return dagId_;
}
void ListDAGVersionsRequest::setDagId(long dagId) {
dagId_ = dagId;
setParameter(std::string("DagId"), std::to_string(dagId));
}
long ListDAGVersionsRequest::getTid() const {
return tid_;
}
void ListDAGVersionsRequest::setTid(long tid) {
tid_ = tid;
setParameter(std::string("Tid"), std::to_string(tid));
}
int ListDAGVersionsRequest::getPageSize() const {
return pageSize_;
}
void ListDAGVersionsRequest::setPageSize(int pageSize) {
pageSize_ = pageSize;
setParameter(std::string("PageSize"), std::to_string(pageSize));
}
int ListDAGVersionsRequest::getPageIndex() const {
return pageIndex_;
}
void ListDAGVersionsRequest::setPageIndex(int pageIndex) {
pageIndex_ = pageIndex;
setParameter(std::string("PageIndex"), std::to_string(pageIndex));
}

View File

@@ -0,0 +1,95 @@
/*
* 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/ListDAGVersionsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dms_enterprise;
using namespace AlibabaCloud::Dms_enterprise::Model;
ListDAGVersionsResult::ListDAGVersionsResult() :
ServiceResult()
{}
ListDAGVersionsResult::ListDAGVersionsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListDAGVersionsResult::~ListDAGVersionsResult()
{}
void ListDAGVersionsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDagVersionListNode = value["DagVersionList"]["DagVersion"];
for (auto valueDagVersionListDagVersion : allDagVersionListNode)
{
DagVersion dagVersionListObject;
if(!valueDagVersionListDagVersion["DagName"].isNull())
dagVersionListObject.dagName = valueDagVersionListDagVersion["DagName"].asString();
if(!valueDagVersionListDagVersion["DagOwnerId"].isNull())
dagVersionListObject.dagOwnerId = valueDagVersionListDagVersion["DagOwnerId"].asString();
if(!valueDagVersionListDagVersion["DagOwnerNickName"].isNull())
dagVersionListObject.dagOwnerNickName = valueDagVersionListDagVersion["DagOwnerNickName"].asString();
if(!valueDagVersionListDagVersion["VersionComments"].isNull())
dagVersionListObject.versionComments = valueDagVersionListDagVersion["VersionComments"].asString();
if(!valueDagVersionListDagVersion["VersionId"].isNull())
dagVersionListObject.versionId = std::stol(valueDagVersionListDagVersion["VersionId"].asString());
if(!valueDagVersionListDagVersion["LastVersionId"].isNull())
dagVersionListObject.lastVersionId = std::stol(valueDagVersionListDagVersion["LastVersionId"].asString());
dagVersionList_.push_back(dagVersionListObject);
}
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["TotalCount"].isNull())
totalCount_ = std::stoi(value["TotalCount"].asString());
}
int ListDAGVersionsResult::getTotalCount()const
{
return totalCount_;
}
std::string ListDAGVersionsResult::getErrorCode()const
{
return errorCode_;
}
std::string ListDAGVersionsResult::getErrorMessage()const
{
return errorMessage_;
}
std::vector<ListDAGVersionsResult::DagVersion> ListDAGVersionsResult::getDagVersionList()const
{
return dagVersionList_;
}
bool ListDAGVersionsResult::getSuccess()const
{
return success_;
}

View File

@@ -25,15 +25,6 @@ ListTaskFlowRequest::ListTaskFlowRequest()
ListTaskFlowRequest::~ListTaskFlowRequest() {}
long ListTaskFlowRequest::getDagId() const {
return dagId_;
}
void ListTaskFlowRequest::setDagId(long dagId) {
dagId_ = dagId;
setParameter(std::string("DagId"), std::to_string(dagId));
}
long ListTaskFlowRequest::getTid() const {
return tid_;
}
@@ -43,12 +34,3 @@ void ListTaskFlowRequest::setTid(long tid) {
setParameter(std::string("Tid"), std::to_string(tid));
}
long ListTaskFlowRequest::getDagInstanceId() const {
return dagInstanceId_;
}
void ListTaskFlowRequest::setDagInstanceId(long dagInstanceId) {
dagInstanceId_ = dagInstanceId;
setParameter(std::string("DagInstanceId"), std::to_string(dagInstanceId));
}