Support CreateProcCorrectAPI.
This commit is contained in:
@@ -203,6 +203,8 @@ set(dms-enterprise_public_header_model
|
||||
include/alibabacloud/dms-enterprise/model/GetOrderBaseInfoResult.h
|
||||
include/alibabacloud/dms-enterprise/model/GetOwnerApplyOrderDetailRequest.h
|
||||
include/alibabacloud/dms-enterprise/model/GetOwnerApplyOrderDetailResult.h
|
||||
include/alibabacloud/dms-enterprise/model/GetPagedInstanceRequest.h
|
||||
include/alibabacloud/dms-enterprise/model/GetPagedInstanceResult.h
|
||||
include/alibabacloud/dms-enterprise/model/GetPermApplyOrderDetailRequest.h
|
||||
include/alibabacloud/dms-enterprise/model/GetPermApplyOrderDetailResult.h
|
||||
include/alibabacloud/dms-enterprise/model/GetPhysicalDatabaseRequest.h
|
||||
@@ -361,6 +363,8 @@ set(dms-enterprise_public_header_model
|
||||
include/alibabacloud/dms-enterprise/model/OfflineTaskFlowResult.h
|
||||
include/alibabacloud/dms-enterprise/model/PauseDataCorrectSQLJobRequest.h
|
||||
include/alibabacloud/dms-enterprise/model/PauseDataCorrectSQLJobResult.h
|
||||
include/alibabacloud/dms-enterprise/model/PreviewWorkflowRequest.h
|
||||
include/alibabacloud/dms-enterprise/model/PreviewWorkflowResult.h
|
||||
include/alibabacloud/dms-enterprise/model/PublishAndDeployTaskFlowRequest.h
|
||||
include/alibabacloud/dms-enterprise/model/PublishAndDeployTaskFlowResult.h
|
||||
include/alibabacloud/dms-enterprise/model/QueryDataTrackResultDownloadStatusRequest.h
|
||||
@@ -630,6 +634,8 @@ set(dms-enterprise_src
|
||||
src/model/GetOrderBaseInfoResult.cc
|
||||
src/model/GetOwnerApplyOrderDetailRequest.cc
|
||||
src/model/GetOwnerApplyOrderDetailResult.cc
|
||||
src/model/GetPagedInstanceRequest.cc
|
||||
src/model/GetPagedInstanceResult.cc
|
||||
src/model/GetPermApplyOrderDetailRequest.cc
|
||||
src/model/GetPermApplyOrderDetailResult.cc
|
||||
src/model/GetPhysicalDatabaseRequest.cc
|
||||
@@ -788,6 +794,8 @@ set(dms-enterprise_src
|
||||
src/model/OfflineTaskFlowResult.cc
|
||||
src/model/PauseDataCorrectSQLJobRequest.cc
|
||||
src/model/PauseDataCorrectSQLJobResult.cc
|
||||
src/model/PreviewWorkflowRequest.cc
|
||||
src/model/PreviewWorkflowResult.cc
|
||||
src/model/PublishAndDeployTaskFlowRequest.cc
|
||||
src/model/PublishAndDeployTaskFlowResult.cc
|
||||
src/model/QueryDataTrackResultDownloadStatusRequest.cc
|
||||
|
||||
@@ -204,6 +204,8 @@
|
||||
#include "model/GetOrderBaseInfoResult.h"
|
||||
#include "model/GetOwnerApplyOrderDetailRequest.h"
|
||||
#include "model/GetOwnerApplyOrderDetailResult.h"
|
||||
#include "model/GetPagedInstanceRequest.h"
|
||||
#include "model/GetPagedInstanceResult.h"
|
||||
#include "model/GetPermApplyOrderDetailRequest.h"
|
||||
#include "model/GetPermApplyOrderDetailResult.h"
|
||||
#include "model/GetPhysicalDatabaseRequest.h"
|
||||
@@ -362,6 +364,8 @@
|
||||
#include "model/OfflineTaskFlowResult.h"
|
||||
#include "model/PauseDataCorrectSQLJobRequest.h"
|
||||
#include "model/PauseDataCorrectSQLJobResult.h"
|
||||
#include "model/PreviewWorkflowRequest.h"
|
||||
#include "model/PreviewWorkflowResult.h"
|
||||
#include "model/PublishAndDeployTaskFlowRequest.h"
|
||||
#include "model/PublishAndDeployTaskFlowResult.h"
|
||||
#include "model/QueryDataTrackResultDownloadStatusRequest.h"
|
||||
@@ -728,6 +732,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::GetOwnerApplyOrderDetailResult> GetOwnerApplyOrderDetailOutcome;
|
||||
typedef std::future<GetOwnerApplyOrderDetailOutcome> GetOwnerApplyOrderDetailOutcomeCallable;
|
||||
typedef std::function<void(const Dms_enterpriseClient*, const Model::GetOwnerApplyOrderDetailRequest&, const GetOwnerApplyOrderDetailOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetOwnerApplyOrderDetailAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetPagedInstanceResult> GetPagedInstanceOutcome;
|
||||
typedef std::future<GetPagedInstanceOutcome> GetPagedInstanceOutcomeCallable;
|
||||
typedef std::function<void(const Dms_enterpriseClient*, const Model::GetPagedInstanceRequest&, const GetPagedInstanceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetPagedInstanceAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetPermApplyOrderDetailResult> GetPermApplyOrderDetailOutcome;
|
||||
typedef std::future<GetPermApplyOrderDetailOutcome> GetPermApplyOrderDetailOutcomeCallable;
|
||||
typedef std::function<void(const Dms_enterpriseClient*, const Model::GetPermApplyOrderDetailRequest&, const GetPermApplyOrderDetailOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetPermApplyOrderDetailAsyncHandler;
|
||||
@@ -965,6 +972,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::PauseDataCorrectSQLJobResult> PauseDataCorrectSQLJobOutcome;
|
||||
typedef std::future<PauseDataCorrectSQLJobOutcome> PauseDataCorrectSQLJobOutcomeCallable;
|
||||
typedef std::function<void(const Dms_enterpriseClient*, const Model::PauseDataCorrectSQLJobRequest&, const PauseDataCorrectSQLJobOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> PauseDataCorrectSQLJobAsyncHandler;
|
||||
typedef Outcome<Error, Model::PreviewWorkflowResult> PreviewWorkflowOutcome;
|
||||
typedef std::future<PreviewWorkflowOutcome> PreviewWorkflowOutcomeCallable;
|
||||
typedef std::function<void(const Dms_enterpriseClient*, const Model::PreviewWorkflowRequest&, const PreviewWorkflowOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> PreviewWorkflowAsyncHandler;
|
||||
typedef Outcome<Error, Model::PublishAndDeployTaskFlowResult> PublishAndDeployTaskFlowOutcome;
|
||||
typedef std::future<PublishAndDeployTaskFlowOutcome> PublishAndDeployTaskFlowOutcomeCallable;
|
||||
typedef std::function<void(const Dms_enterpriseClient*, const Model::PublishAndDeployTaskFlowRequest&, const PublishAndDeployTaskFlowOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> PublishAndDeployTaskFlowAsyncHandler;
|
||||
@@ -1369,6 +1379,9 @@ namespace AlibabaCloud
|
||||
GetOwnerApplyOrderDetailOutcome getOwnerApplyOrderDetail(const Model::GetOwnerApplyOrderDetailRequest &request)const;
|
||||
void getOwnerApplyOrderDetailAsync(const Model::GetOwnerApplyOrderDetailRequest& request, const GetOwnerApplyOrderDetailAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetOwnerApplyOrderDetailOutcomeCallable getOwnerApplyOrderDetailCallable(const Model::GetOwnerApplyOrderDetailRequest& request) const;
|
||||
GetPagedInstanceOutcome getPagedInstance(const Model::GetPagedInstanceRequest &request)const;
|
||||
void getPagedInstanceAsync(const Model::GetPagedInstanceRequest& request, const GetPagedInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetPagedInstanceOutcomeCallable getPagedInstanceCallable(const Model::GetPagedInstanceRequest& request) const;
|
||||
GetPermApplyOrderDetailOutcome getPermApplyOrderDetail(const Model::GetPermApplyOrderDetailRequest &request)const;
|
||||
void getPermApplyOrderDetailAsync(const Model::GetPermApplyOrderDetailRequest& request, const GetPermApplyOrderDetailAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetPermApplyOrderDetailOutcomeCallable getPermApplyOrderDetailCallable(const Model::GetPermApplyOrderDetailRequest& request) const;
|
||||
@@ -1606,6 +1619,9 @@ namespace AlibabaCloud
|
||||
PauseDataCorrectSQLJobOutcome pauseDataCorrectSQLJob(const Model::PauseDataCorrectSQLJobRequest &request)const;
|
||||
void pauseDataCorrectSQLJobAsync(const Model::PauseDataCorrectSQLJobRequest& request, const PauseDataCorrectSQLJobAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
PauseDataCorrectSQLJobOutcomeCallable pauseDataCorrectSQLJobCallable(const Model::PauseDataCorrectSQLJobRequest& request) const;
|
||||
PreviewWorkflowOutcome previewWorkflow(const Model::PreviewWorkflowRequest &request)const;
|
||||
void previewWorkflowAsync(const Model::PreviewWorkflowRequest& request, const PreviewWorkflowAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
PreviewWorkflowOutcomeCallable previewWorkflowCallable(const Model::PreviewWorkflowRequest& request) const;
|
||||
PublishAndDeployTaskFlowOutcome publishAndDeployTaskFlow(const Model::PublishAndDeployTaskFlowRequest &request)const;
|
||||
void publishAndDeployTaskFlowAsync(const Model::PublishAndDeployTaskFlowRequest& request, const PublishAndDeployTaskFlowAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
PublishAndDeployTaskFlowOutcomeCallable publishAndDeployTaskFlowCallable(const Model::PublishAndDeployTaskFlowRequest& request) const;
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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_GETPAGEDINSTANCEREQUEST_H_
|
||||
#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETPAGEDINSTANCEREQUEST_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 GetPagedInstanceRequest : public RpcServiceRequest {
|
||||
public:
|
||||
GetPagedInstanceRequest();
|
||||
~GetPagedInstanceRequest();
|
||||
long getTid() const;
|
||||
void setTid(long tid);
|
||||
long getOrderId() const;
|
||||
void setOrderId(long orderId);
|
||||
|
||||
private:
|
||||
long tid_;
|
||||
long orderId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Dms_enterprise
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETPAGEDINSTANCEREQUEST_H_
|
||||
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* 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_GETPAGEDINSTANCERESULT_H_
|
||||
#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETPAGEDINSTANCERESULT_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 GetPagedInstanceResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct InstanceItem
|
||||
{
|
||||
std::string msg;
|
||||
long status;
|
||||
long triggerType;
|
||||
long historyDagId;
|
||||
std::string endTime;
|
||||
long checkStatus;
|
||||
std::string gmtModified;
|
||||
long dagId;
|
||||
std::string _delete;
|
||||
std::string gmtCreate;
|
||||
std::string tenantId;
|
||||
std::string lastRunningContext;
|
||||
std::string version;
|
||||
long taskType;
|
||||
long id;
|
||||
std::string businessTime;
|
||||
};
|
||||
std::vector<InstanceItem> instance;
|
||||
};
|
||||
|
||||
|
||||
GetPagedInstanceResult();
|
||||
explicit GetPagedInstanceResult(const std::string &payload);
|
||||
~GetPagedInstanceResult();
|
||||
long getPageSize()const;
|
||||
long getTotal()const;
|
||||
std::string getTraceId()const;
|
||||
Data getData()const;
|
||||
std::string getErrorCode()const;
|
||||
long getPageIndex()const;
|
||||
std::string getErrorMessage()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
long pageSize_;
|
||||
long total_;
|
||||
std::string traceId_;
|
||||
Data data_;
|
||||
std::string errorCode_;
|
||||
long pageIndex_;
|
||||
std::string errorMessage_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETPAGEDINSTANCERESULT_H_
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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_PREVIEWWORKFLOWREQUEST_H_
|
||||
#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_PREVIEWWORKFLOWREQUEST_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 PreviewWorkflowRequest : public RpcServiceRequest {
|
||||
public:
|
||||
PreviewWorkflowRequest();
|
||||
~PreviewWorkflowRequest();
|
||||
long getTid() const;
|
||||
void setTid(long tid);
|
||||
long getOrderId() const;
|
||||
void setOrderId(long orderId);
|
||||
|
||||
private:
|
||||
long tid_;
|
||||
long orderId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Dms_enterprise
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_PREVIEWWORKFLOWREQUEST_H_
|
||||
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* 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_PREVIEWWORKFLOWRESULT_H_
|
||||
#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_PREVIEWWORKFLOWRESULT_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 PreviewWorkflowResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct WorkflowDetail
|
||||
{
|
||||
struct WorkflowNode
|
||||
{
|
||||
struct AuditUser
|
||||
{
|
||||
long userId;
|
||||
std::string realName;
|
||||
std::string nickName;
|
||||
};
|
||||
std::string comment;
|
||||
std::vector<WorkflowNode::AuditUser> auditUserList;
|
||||
std::string nodeName;
|
||||
std::string nodeType;
|
||||
};
|
||||
std::vector<WorkflowNode> workflowNodeList;
|
||||
std::string comment;
|
||||
std::string wfCateName;
|
||||
};
|
||||
|
||||
|
||||
PreviewWorkflowResult();
|
||||
explicit PreviewWorkflowResult(const std::string &payload);
|
||||
~PreviewWorkflowResult();
|
||||
WorkflowDetail getWorkflowDetail()const;
|
||||
std::string getErrorCode()const;
|
||||
std::string getErrorMessage()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
WorkflowDetail workflowDetail_;
|
||||
std::string errorCode_;
|
||||
std::string errorMessage_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_PREVIEWWORKFLOWRESULT_H_
|
||||
@@ -3327,6 +3327,42 @@ Dms_enterpriseClient::GetOwnerApplyOrderDetailOutcomeCallable Dms_enterpriseClie
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Dms_enterpriseClient::GetPagedInstanceOutcome Dms_enterpriseClient::getPagedInstance(const GetPagedInstanceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetPagedInstanceOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetPagedInstanceOutcome(GetPagedInstanceResult(outcome.result()));
|
||||
else
|
||||
return GetPagedInstanceOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Dms_enterpriseClient::getPagedInstanceAsync(const GetPagedInstanceRequest& request, const GetPagedInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getPagedInstance(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Dms_enterpriseClient::GetPagedInstanceOutcomeCallable Dms_enterpriseClient::getPagedInstanceCallable(const GetPagedInstanceRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetPagedInstanceOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getPagedInstance(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Dms_enterpriseClient::GetPermApplyOrderDetailOutcome Dms_enterpriseClient::getPermApplyOrderDetail(const GetPermApplyOrderDetailRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -6171,6 +6207,42 @@ Dms_enterpriseClient::PauseDataCorrectSQLJobOutcomeCallable Dms_enterpriseClient
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Dms_enterpriseClient::PreviewWorkflowOutcome Dms_enterpriseClient::previewWorkflow(const PreviewWorkflowRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return PreviewWorkflowOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return PreviewWorkflowOutcome(PreviewWorkflowResult(outcome.result()));
|
||||
else
|
||||
return PreviewWorkflowOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Dms_enterpriseClient::previewWorkflowAsync(const PreviewWorkflowRequest& request, const PreviewWorkflowAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, previewWorkflow(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Dms_enterpriseClient::PreviewWorkflowOutcomeCallable Dms_enterpriseClient::previewWorkflowCallable(const PreviewWorkflowRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<PreviewWorkflowOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->previewWorkflow(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Dms_enterpriseClient::PublishAndDeployTaskFlowOutcome Dms_enterpriseClient::publishAndDeployTaskFlow(const PublishAndDeployTaskFlowRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
45
dms-enterprise/src/model/GetPagedInstanceRequest.cc
Normal file
45
dms-enterprise/src/model/GetPagedInstanceRequest.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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/GetPagedInstanceRequest.h>
|
||||
|
||||
using AlibabaCloud::Dms_enterprise::Model::GetPagedInstanceRequest;
|
||||
|
||||
GetPagedInstanceRequest::GetPagedInstanceRequest()
|
||||
: RpcServiceRequest("dms-enterprise", "2018-11-01", "GetPagedInstance") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
GetPagedInstanceRequest::~GetPagedInstanceRequest() {}
|
||||
|
||||
long GetPagedInstanceRequest::getTid() const {
|
||||
return tid_;
|
||||
}
|
||||
|
||||
void GetPagedInstanceRequest::setTid(long tid) {
|
||||
tid_ = tid;
|
||||
setParameter(std::string("Tid"), std::to_string(tid));
|
||||
}
|
||||
|
||||
long GetPagedInstanceRequest::getOrderId() const {
|
||||
return orderId_;
|
||||
}
|
||||
|
||||
void GetPagedInstanceRequest::setOrderId(long orderId) {
|
||||
orderId_ = orderId;
|
||||
setParameter(std::string("OrderId"), std::to_string(orderId));
|
||||
}
|
||||
|
||||
137
dms-enterprise/src/model/GetPagedInstanceResult.cc
Normal file
137
dms-enterprise/src/model/GetPagedInstanceResult.cc
Normal file
@@ -0,0 +1,137 @@
|
||||
/*
|
||||
* 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/GetPagedInstanceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Dms_enterprise;
|
||||
using namespace AlibabaCloud::Dms_enterprise::Model;
|
||||
|
||||
GetPagedInstanceResult::GetPagedInstanceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetPagedInstanceResult::GetPagedInstanceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetPagedInstanceResult::~GetPagedInstanceResult()
|
||||
{}
|
||||
|
||||
void GetPagedInstanceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
auto allInstanceNode = dataNode["Instance"]["instanceItem"];
|
||||
for (auto dataNodeInstanceinstanceItem : allInstanceNode)
|
||||
{
|
||||
Data::InstanceItem instanceItemObject;
|
||||
if(!dataNodeInstanceinstanceItem["BusinessTime"].isNull())
|
||||
instanceItemObject.businessTime = dataNodeInstanceinstanceItem["BusinessTime"].asString();
|
||||
if(!dataNodeInstanceinstanceItem["CheckStatus"].isNull())
|
||||
instanceItemObject.checkStatus = std::stol(dataNodeInstanceinstanceItem["CheckStatus"].asString());
|
||||
if(!dataNodeInstanceinstanceItem["DagId"].isNull())
|
||||
instanceItemObject.dagId = std::stol(dataNodeInstanceinstanceItem["DagId"].asString());
|
||||
if(!dataNodeInstanceinstanceItem["Delete"].isNull())
|
||||
instanceItemObject._delete = dataNodeInstanceinstanceItem["Delete"].asString();
|
||||
if(!dataNodeInstanceinstanceItem["EndTime"].isNull())
|
||||
instanceItemObject.endTime = dataNodeInstanceinstanceItem["EndTime"].asString();
|
||||
if(!dataNodeInstanceinstanceItem["GmtCreate"].isNull())
|
||||
instanceItemObject.gmtCreate = dataNodeInstanceinstanceItem["GmtCreate"].asString();
|
||||
if(!dataNodeInstanceinstanceItem["GmtModified"].isNull())
|
||||
instanceItemObject.gmtModified = dataNodeInstanceinstanceItem["GmtModified"].asString();
|
||||
if(!dataNodeInstanceinstanceItem["HistoryDagId"].isNull())
|
||||
instanceItemObject.historyDagId = std::stol(dataNodeInstanceinstanceItem["HistoryDagId"].asString());
|
||||
if(!dataNodeInstanceinstanceItem["Id"].isNull())
|
||||
instanceItemObject.id = std::stol(dataNodeInstanceinstanceItem["Id"].asString());
|
||||
if(!dataNodeInstanceinstanceItem["LastRunningContext"].isNull())
|
||||
instanceItemObject.lastRunningContext = dataNodeInstanceinstanceItem["LastRunningContext"].asString();
|
||||
if(!dataNodeInstanceinstanceItem["Msg"].isNull())
|
||||
instanceItemObject.msg = dataNodeInstanceinstanceItem["Msg"].asString();
|
||||
if(!dataNodeInstanceinstanceItem["Status"].isNull())
|
||||
instanceItemObject.status = std::stol(dataNodeInstanceinstanceItem["Status"].asString());
|
||||
if(!dataNodeInstanceinstanceItem["TaskType"].isNull())
|
||||
instanceItemObject.taskType = std::stol(dataNodeInstanceinstanceItem["TaskType"].asString());
|
||||
if(!dataNodeInstanceinstanceItem["TenantId"].isNull())
|
||||
instanceItemObject.tenantId = dataNodeInstanceinstanceItem["TenantId"].asString();
|
||||
if(!dataNodeInstanceinstanceItem["TriggerType"].isNull())
|
||||
instanceItemObject.triggerType = std::stol(dataNodeInstanceinstanceItem["TriggerType"].asString());
|
||||
if(!dataNodeInstanceinstanceItem["Version"].isNull())
|
||||
instanceItemObject.version = dataNodeInstanceinstanceItem["Version"].asString();
|
||||
data_.instance.push_back(instanceItemObject);
|
||||
}
|
||||
if(!value["TraceId"].isNull())
|
||||
traceId_ = value["TraceId"].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["PageIndex"].isNull())
|
||||
pageIndex_ = std::stol(value["PageIndex"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stol(value["PageSize"].asString());
|
||||
if(!value["Total"].isNull())
|
||||
total_ = std::stol(value["Total"].asString());
|
||||
|
||||
}
|
||||
|
||||
long GetPagedInstanceResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
long GetPagedInstanceResult::getTotal()const
|
||||
{
|
||||
return total_;
|
||||
}
|
||||
|
||||
std::string GetPagedInstanceResult::getTraceId()const
|
||||
{
|
||||
return traceId_;
|
||||
}
|
||||
|
||||
GetPagedInstanceResult::Data GetPagedInstanceResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string GetPagedInstanceResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
long GetPagedInstanceResult::getPageIndex()const
|
||||
{
|
||||
return pageIndex_;
|
||||
}
|
||||
|
||||
std::string GetPagedInstanceResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
bool GetPagedInstanceResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
45
dms-enterprise/src/model/PreviewWorkflowRequest.cc
Normal file
45
dms-enterprise/src/model/PreviewWorkflowRequest.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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/PreviewWorkflowRequest.h>
|
||||
|
||||
using AlibabaCloud::Dms_enterprise::Model::PreviewWorkflowRequest;
|
||||
|
||||
PreviewWorkflowRequest::PreviewWorkflowRequest()
|
||||
: RpcServiceRequest("dms-enterprise", "2018-11-01", "PreviewWorkflow") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
PreviewWorkflowRequest::~PreviewWorkflowRequest() {}
|
||||
|
||||
long PreviewWorkflowRequest::getTid() const {
|
||||
return tid_;
|
||||
}
|
||||
|
||||
void PreviewWorkflowRequest::setTid(long tid) {
|
||||
tid_ = tid;
|
||||
setParameter(std::string("Tid"), std::to_string(tid));
|
||||
}
|
||||
|
||||
long PreviewWorkflowRequest::getOrderId() const {
|
||||
return orderId_;
|
||||
}
|
||||
|
||||
void PreviewWorkflowRequest::setOrderId(long orderId) {
|
||||
orderId_ = orderId;
|
||||
setParameter(std::string("OrderId"), std::to_string(orderId));
|
||||
}
|
||||
|
||||
99
dms-enterprise/src/model/PreviewWorkflowResult.cc
Normal file
99
dms-enterprise/src/model/PreviewWorkflowResult.cc
Normal file
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* 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/PreviewWorkflowResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Dms_enterprise;
|
||||
using namespace AlibabaCloud::Dms_enterprise::Model;
|
||||
|
||||
PreviewWorkflowResult::PreviewWorkflowResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
PreviewWorkflowResult::PreviewWorkflowResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
PreviewWorkflowResult::~PreviewWorkflowResult()
|
||||
{}
|
||||
|
||||
void PreviewWorkflowResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto workflowDetailNode = value["WorkflowDetail"];
|
||||
if(!workflowDetailNode["WfCateName"].isNull())
|
||||
workflowDetail_.wfCateName = workflowDetailNode["WfCateName"].asString();
|
||||
if(!workflowDetailNode["Comment"].isNull())
|
||||
workflowDetail_.comment = workflowDetailNode["Comment"].asString();
|
||||
auto allWorkflowNodeListNode = workflowDetailNode["WorkflowNodeList"]["WorkflowNode"];
|
||||
for (auto workflowDetailNodeWorkflowNodeListWorkflowNode : allWorkflowNodeListNode)
|
||||
{
|
||||
WorkflowDetail::WorkflowNode workflowNodeObject;
|
||||
if(!workflowDetailNodeWorkflowNodeListWorkflowNode["NodeName"].isNull())
|
||||
workflowNodeObject.nodeName = workflowDetailNodeWorkflowNodeListWorkflowNode["NodeName"].asString();
|
||||
if(!workflowDetailNodeWorkflowNodeListWorkflowNode["NodeType"].isNull())
|
||||
workflowNodeObject.nodeType = workflowDetailNodeWorkflowNodeListWorkflowNode["NodeType"].asString();
|
||||
if(!workflowDetailNodeWorkflowNodeListWorkflowNode["Comment"].isNull())
|
||||
workflowNodeObject.comment = workflowDetailNodeWorkflowNodeListWorkflowNode["Comment"].asString();
|
||||
auto allAuditUserListNode = workflowDetailNodeWorkflowNodeListWorkflowNode["AuditUserList"]["AuditUser"];
|
||||
for (auto workflowDetailNodeWorkflowNodeListWorkflowNodeAuditUserListAuditUser : allAuditUserListNode)
|
||||
{
|
||||
WorkflowDetail::WorkflowNode::AuditUser auditUserListObject;
|
||||
if(!workflowDetailNodeWorkflowNodeListWorkflowNodeAuditUserListAuditUser["UserId"].isNull())
|
||||
auditUserListObject.userId = std::stol(workflowDetailNodeWorkflowNodeListWorkflowNodeAuditUserListAuditUser["UserId"].asString());
|
||||
if(!workflowDetailNodeWorkflowNodeListWorkflowNodeAuditUserListAuditUser["NickName"].isNull())
|
||||
auditUserListObject.nickName = workflowDetailNodeWorkflowNodeListWorkflowNodeAuditUserListAuditUser["NickName"].asString();
|
||||
if(!workflowDetailNodeWorkflowNodeListWorkflowNodeAuditUserListAuditUser["RealName"].isNull())
|
||||
auditUserListObject.realName = workflowDetailNodeWorkflowNodeListWorkflowNodeAuditUserListAuditUser["RealName"].asString();
|
||||
workflowNodeObject.auditUserList.push_back(auditUserListObject);
|
||||
}
|
||||
workflowDetail_.workflowNodeList.push_back(workflowNodeObject);
|
||||
}
|
||||
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";
|
||||
|
||||
}
|
||||
|
||||
PreviewWorkflowResult::WorkflowDetail PreviewWorkflowResult::getWorkflowDetail()const
|
||||
{
|
||||
return workflowDetail_;
|
||||
}
|
||||
|
||||
std::string PreviewWorkflowResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
std::string PreviewWorkflowResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
bool PreviewWorkflowResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user