From 8fdebda3540286d397c4cfa9c4db24ed5b518d60 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Fri, 27 Nov 2020 02:44:08 +0000 Subject: [PATCH] Support taskList. --- CHANGELOG | 3 + devops-rdc/CMakeLists.txt | 4 + .../devops-rdc/Devops_rdcClient.h | 8 ++ .../model/ListDevopsProjectTaskListRequest.h | 51 ++++++++++++ .../model/ListDevopsProjectTaskListResult.h | 65 +++++++++++++++ devops-rdc/src/Devops-rdcClient.cc | 36 +++++++++ ...PipelineInstanceBuildNumberStatusResult.cc | 28 +++---- .../GetPipelineInstanceGroupStatusResult.cc | 28 +++---- devops-rdc/src/model/GetPipelineLogResult.cc | 16 ++-- .../GetPipleineLatestInstanceStatusResult.cc | 28 +++---- .../model/ListDevopsProjectTaskListRequest.cc | 51 ++++++++++++ .../model/ListDevopsProjectTaskListResult.cc | 79 +++++++++++++++++++ 12 files changed, 347 insertions(+), 50 deletions(-) create mode 100644 devops-rdc/include/alibabacloud/devops-rdc/model/ListDevopsProjectTaskListRequest.h create mode 100644 devops-rdc/include/alibabacloud/devops-rdc/model/ListDevopsProjectTaskListResult.h create mode 100644 devops-rdc/src/model/ListDevopsProjectTaskListRequest.cc create mode 100644 devops-rdc/src/model/ListDevopsProjectTaskListResult.cc diff --git a/CHANGELOG b/CHANGELOG index 79c6e2f1d..f271c7eb1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2020-11-27 Version: patch +- Support taskList. + 2020-11-26 Version: patch - ContrastFaceVerify Support Video. diff --git a/devops-rdc/CMakeLists.txt b/devops-rdc/CMakeLists.txt index 193f87285..e5f63b019 100644 --- a/devops-rdc/CMakeLists.txt +++ b/devops-rdc/CMakeLists.txt @@ -93,6 +93,8 @@ set(devops-rdc_public_header_model include/alibabacloud/devops-rdc/model/ListDevopsProjectTaskFlowResult.h include/alibabacloud/devops-rdc/model/ListDevopsProjectTaskFlowStatusRequest.h include/alibabacloud/devops-rdc/model/ListDevopsProjectTaskFlowStatusResult.h + include/alibabacloud/devops-rdc/model/ListDevopsProjectTaskListRequest.h + include/alibabacloud/devops-rdc/model/ListDevopsProjectTaskListResult.h include/alibabacloud/devops-rdc/model/ListDevopsProjectTasksRequest.h include/alibabacloud/devops-rdc/model/ListDevopsProjectTasksResult.h include/alibabacloud/devops-rdc/model/ListDevopsScenarioFieldConfigRequest.h @@ -188,6 +190,8 @@ set(devops-rdc_src src/model/ListDevopsProjectTaskFlowResult.cc src/model/ListDevopsProjectTaskFlowStatusRequest.cc src/model/ListDevopsProjectTaskFlowStatusResult.cc + src/model/ListDevopsProjectTaskListRequest.cc + src/model/ListDevopsProjectTaskListResult.cc src/model/ListDevopsProjectTasksRequest.cc src/model/ListDevopsProjectTasksResult.cc src/model/ListDevopsScenarioFieldConfigRequest.cc diff --git a/devops-rdc/include/alibabacloud/devops-rdc/Devops_rdcClient.h b/devops-rdc/include/alibabacloud/devops-rdc/Devops_rdcClient.h index 722eb5b29..d562ec8cf 100644 --- a/devops-rdc/include/alibabacloud/devops-rdc/Devops_rdcClient.h +++ b/devops-rdc/include/alibabacloud/devops-rdc/Devops_rdcClient.h @@ -94,6 +94,8 @@ #include "model/ListDevopsProjectTaskFlowResult.h" #include "model/ListDevopsProjectTaskFlowStatusRequest.h" #include "model/ListDevopsProjectTaskFlowStatusResult.h" +#include "model/ListDevopsProjectTaskListRequest.h" +#include "model/ListDevopsProjectTaskListResult.h" #include "model/ListDevopsProjectTasksRequest.h" #include "model/ListDevopsProjectTasksResult.h" #include "model/ListDevopsScenarioFieldConfigRequest.h" @@ -231,6 +233,9 @@ namespace AlibabaCloud typedef Outcome ListDevopsProjectTaskFlowStatusOutcome; typedef std::future ListDevopsProjectTaskFlowStatusOutcomeCallable; typedef std::function&)> ListDevopsProjectTaskFlowStatusAsyncHandler; + typedef Outcome ListDevopsProjectTaskListOutcome; + typedef std::future ListDevopsProjectTaskListOutcomeCallable; + typedef std::function&)> ListDevopsProjectTaskListAsyncHandler; typedef Outcome ListDevopsProjectTasksOutcome; typedef std::future ListDevopsProjectTasksOutcomeCallable; typedef std::function&)> ListDevopsProjectTasksAsyncHandler; @@ -374,6 +379,9 @@ namespace AlibabaCloud ListDevopsProjectTaskFlowStatusOutcome listDevopsProjectTaskFlowStatus(const Model::ListDevopsProjectTaskFlowStatusRequest &request)const; void listDevopsProjectTaskFlowStatusAsync(const Model::ListDevopsProjectTaskFlowStatusRequest& request, const ListDevopsProjectTaskFlowStatusAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListDevopsProjectTaskFlowStatusOutcomeCallable listDevopsProjectTaskFlowStatusCallable(const Model::ListDevopsProjectTaskFlowStatusRequest& request) const; + ListDevopsProjectTaskListOutcome listDevopsProjectTaskList(const Model::ListDevopsProjectTaskListRequest &request)const; + void listDevopsProjectTaskListAsync(const Model::ListDevopsProjectTaskListRequest& request, const ListDevopsProjectTaskListAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListDevopsProjectTaskListOutcomeCallable listDevopsProjectTaskListCallable(const Model::ListDevopsProjectTaskListRequest& request) const; ListDevopsProjectTasksOutcome listDevopsProjectTasks(const Model::ListDevopsProjectTasksRequest &request)const; void listDevopsProjectTasksAsync(const Model::ListDevopsProjectTasksRequest& request, const ListDevopsProjectTasksAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListDevopsProjectTasksOutcomeCallable listDevopsProjectTasksCallable(const Model::ListDevopsProjectTasksRequest& request) const; diff --git a/devops-rdc/include/alibabacloud/devops-rdc/model/ListDevopsProjectTaskListRequest.h b/devops-rdc/include/alibabacloud/devops-rdc/model/ListDevopsProjectTaskListRequest.h new file mode 100644 index 000000000..09667b4cb --- /dev/null +++ b/devops-rdc/include/alibabacloud/devops-rdc/model/ListDevopsProjectTaskListRequest.h @@ -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_DEVOPS_RDC_MODEL_LISTDEVOPSPROJECTTASKLISTREQUEST_H_ +#define ALIBABACLOUD_DEVOPS_RDC_MODEL_LISTDEVOPSPROJECTTASKLISTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Devops_rdc + { + namespace Model + { + class ALIBABACLOUD_DEVOPS_RDC_EXPORT ListDevopsProjectTaskListRequest : public RpcServiceRequest + { + + public: + ListDevopsProjectTaskListRequest(); + ~ListDevopsProjectTaskListRequest(); + + std::string getProjectId()const; + void setProjectId(const std::string& projectId); + std::string getOrgId()const; + void setOrgId(const std::string& orgId); + + private: + std::string projectId_; + std::string orgId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DEVOPS_RDC_MODEL_LISTDEVOPSPROJECTTASKLISTREQUEST_H_ \ No newline at end of file diff --git a/devops-rdc/include/alibabacloud/devops-rdc/model/ListDevopsProjectTaskListResult.h b/devops-rdc/include/alibabacloud/devops-rdc/model/ListDevopsProjectTaskListResult.h new file mode 100644 index 000000000..5ca738a8c --- /dev/null +++ b/devops-rdc/include/alibabacloud/devops-rdc/model/ListDevopsProjectTaskListResult.h @@ -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. + */ + +#ifndef ALIBABACLOUD_DEVOPS_RDC_MODEL_LISTDEVOPSPROJECTTASKLISTRESULT_H_ +#define ALIBABACLOUD_DEVOPS_RDC_MODEL_LISTDEVOPSPROJECTTASKLISTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Devops_rdc + { + namespace Model + { + class ALIBABACLOUD_DEVOPS_RDC_EXPORT ListDevopsProjectTaskListResult : public ServiceResult + { + public: + struct Object + { + struct ResultItem + { + std::string id; + }; + std::vector result; + }; + + + ListDevopsProjectTaskListResult(); + explicit ListDevopsProjectTaskListResult(const std::string &payload); + ~ListDevopsProjectTaskListResult(); + std::string getErrorMsg()const; + Object getObject()const; + std::string getErrorCode()const; + bool getSuccessful()const; + + protected: + void parse(const std::string &payload); + private: + std::string errorMsg_; + Object object_; + std::string errorCode_; + bool successful_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DEVOPS_RDC_MODEL_LISTDEVOPSPROJECTTASKLISTRESULT_H_ \ No newline at end of file diff --git a/devops-rdc/src/Devops-rdcClient.cc b/devops-rdc/src/Devops-rdcClient.cc index a3838f630..efa24ca3c 100644 --- a/devops-rdc/src/Devops-rdcClient.cc +++ b/devops-rdc/src/Devops-rdcClient.cc @@ -1347,6 +1347,42 @@ Devops_rdcClient::ListDevopsProjectTaskFlowStatusOutcomeCallable Devops_rdcClien return task->get_future(); } +Devops_rdcClient::ListDevopsProjectTaskListOutcome Devops_rdcClient::listDevopsProjectTaskList(const ListDevopsProjectTaskListRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListDevopsProjectTaskListOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListDevopsProjectTaskListOutcome(ListDevopsProjectTaskListResult(outcome.result())); + else + return ListDevopsProjectTaskListOutcome(outcome.error()); +} + +void Devops_rdcClient::listDevopsProjectTaskListAsync(const ListDevopsProjectTaskListRequest& request, const ListDevopsProjectTaskListAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listDevopsProjectTaskList(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Devops_rdcClient::ListDevopsProjectTaskListOutcomeCallable Devops_rdcClient::listDevopsProjectTaskListCallable(const ListDevopsProjectTaskListRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listDevopsProjectTaskList(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + Devops_rdcClient::ListDevopsProjectTasksOutcome Devops_rdcClient::listDevopsProjectTasks(const ListDevopsProjectTasksRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/devops-rdc/src/model/GetPipelineInstanceBuildNumberStatusResult.cc b/devops-rdc/src/model/GetPipelineInstanceBuildNumberStatusResult.cc index e195cec95..7206dd669 100644 --- a/devops-rdc/src/model/GetPipelineInstanceBuildNumberStatusResult.cc +++ b/devops-rdc/src/model/GetPipelineInstanceBuildNumberStatusResult.cc @@ -50,24 +50,24 @@ void GetPipelineInstanceBuildNumberStatusResult::parse(const std::string &payloa groupObject.name = objectNodeGroupsgroup["Name"].asString(); if(!objectNodeGroupsgroup["Status"].isNull()) groupObject.status = objectNodeGroupsgroup["Status"].asString(); - auto allStagesNode = allGroupsNode["Stages"]["stage"]; - for (auto allGroupsNodeStagesstage : allStagesNode) + auto allStagesNode = objectNodeGroupsgroup["Stages"]["stage"]; + for (auto objectNodeGroupsgroupStagesstage : allStagesNode) { Object::Group::Stage stagesObject; - if(!allGroupsNodeStagesstage["Status"].isNull()) - stagesObject.status = allGroupsNodeStagesstage["Status"].asString(); - if(!allGroupsNodeStagesstage["Sign"].isNull()) - stagesObject.sign = allGroupsNodeStagesstage["Sign"].asString(); - auto allComponentsNode = allStagesNode["Components"]["component"]; - for (auto allStagesNodeComponentscomponent : allComponentsNode) + if(!objectNodeGroupsgroupStagesstage["Status"].isNull()) + stagesObject.status = objectNodeGroupsgroupStagesstage["Status"].asString(); + if(!objectNodeGroupsgroupStagesstage["Sign"].isNull()) + stagesObject.sign = objectNodeGroupsgroupStagesstage["Sign"].asString(); + auto allComponentsNode = objectNodeGroupsgroupStagesstage["Components"]["component"]; + for (auto objectNodeGroupsgroupStagesstageComponentscomponent : allComponentsNode) { Object::Group::Stage::Component componentsObject; - if(!allStagesNodeComponentscomponent["Name"].isNull()) - componentsObject.name = allStagesNodeComponentscomponent["Name"].asString(); - if(!allStagesNodeComponentscomponent["Status"].isNull()) - componentsObject.status = allStagesNodeComponentscomponent["Status"].asString(); - if(!allStagesNodeComponentscomponent["JobId"].isNull()) - componentsObject.jobId = std::stol(allStagesNodeComponentscomponent["JobId"].asString()); + if(!objectNodeGroupsgroupStagesstageComponentscomponent["Name"].isNull()) + componentsObject.name = objectNodeGroupsgroupStagesstageComponentscomponent["Name"].asString(); + if(!objectNodeGroupsgroupStagesstageComponentscomponent["Status"].isNull()) + componentsObject.status = objectNodeGroupsgroupStagesstageComponentscomponent["Status"].asString(); + if(!objectNodeGroupsgroupStagesstageComponentscomponent["JobId"].isNull()) + componentsObject.jobId = std::stol(objectNodeGroupsgroupStagesstageComponentscomponent["JobId"].asString()); stagesObject.components.push_back(componentsObject); } groupObject.stages.push_back(stagesObject); diff --git a/devops-rdc/src/model/GetPipelineInstanceGroupStatusResult.cc b/devops-rdc/src/model/GetPipelineInstanceGroupStatusResult.cc index edad817aa..c9cc588e5 100644 --- a/devops-rdc/src/model/GetPipelineInstanceGroupStatusResult.cc +++ b/devops-rdc/src/model/GetPipelineInstanceGroupStatusResult.cc @@ -50,24 +50,24 @@ void GetPipelineInstanceGroupStatusResult::parse(const std::string &payload) groupObject.name = objectNodeGroupsgroup["Name"].asString(); if(!objectNodeGroupsgroup["Status"].isNull()) groupObject.status = objectNodeGroupsgroup["Status"].asString(); - auto allStagesNode = allGroupsNode["Stages"]["stage"]; - for (auto allGroupsNodeStagesstage : allStagesNode) + auto allStagesNode = objectNodeGroupsgroup["Stages"]["stage"]; + for (auto objectNodeGroupsgroupStagesstage : allStagesNode) { Object::Group::Stage stagesObject; - if(!allGroupsNodeStagesstage["Status"].isNull()) - stagesObject.status = allGroupsNodeStagesstage["Status"].asString(); - if(!allGroupsNodeStagesstage["Sign"].isNull()) - stagesObject.sign = allGroupsNodeStagesstage["Sign"].asString(); - auto allComponentsNode = allStagesNode["Components"]["component"]; - for (auto allStagesNodeComponentscomponent : allComponentsNode) + if(!objectNodeGroupsgroupStagesstage["Status"].isNull()) + stagesObject.status = objectNodeGroupsgroupStagesstage["Status"].asString(); + if(!objectNodeGroupsgroupStagesstage["Sign"].isNull()) + stagesObject.sign = objectNodeGroupsgroupStagesstage["Sign"].asString(); + auto allComponentsNode = objectNodeGroupsgroupStagesstage["Components"]["component"]; + for (auto objectNodeGroupsgroupStagesstageComponentscomponent : allComponentsNode) { Object::Group::Stage::Component componentsObject; - if(!allStagesNodeComponentscomponent["Name"].isNull()) - componentsObject.name = allStagesNodeComponentscomponent["Name"].asString(); - if(!allStagesNodeComponentscomponent["Status"].isNull()) - componentsObject.status = allStagesNodeComponentscomponent["Status"].asString(); - if(!allStagesNodeComponentscomponent["JobId"].isNull()) - componentsObject.jobId = allStagesNodeComponentscomponent["JobId"].asString(); + if(!objectNodeGroupsgroupStagesstageComponentscomponent["Name"].isNull()) + componentsObject.name = objectNodeGroupsgroupStagesstageComponentscomponent["Name"].asString(); + if(!objectNodeGroupsgroupStagesstageComponentscomponent["Status"].isNull()) + componentsObject.status = objectNodeGroupsgroupStagesstageComponentscomponent["Status"].asString(); + if(!objectNodeGroupsgroupStagesstageComponentscomponent["JobId"].isNull()) + componentsObject.jobId = objectNodeGroupsgroupStagesstageComponentscomponent["JobId"].asString(); stagesObject.components.push_back(componentsObject); } groupObject.stages.push_back(stagesObject); diff --git a/devops-rdc/src/model/GetPipelineLogResult.cc b/devops-rdc/src/model/GetPipelineLogResult.cc index 483a5aacf..1e0e6b85e 100644 --- a/devops-rdc/src/model/GetPipelineLogResult.cc +++ b/devops-rdc/src/model/GetPipelineLogResult.cc @@ -49,16 +49,16 @@ void GetPipelineLogResult::parse(const std::string &payload) objectObject.actionName = valueObjectjob["ActionName"].asString(); if(!valueObjectjob["StartTime"].isNull()) objectObject.startTime = valueObjectjob["StartTime"].asString(); - auto allBuildProcessNodesNode = allObjectNode["BuildProcessNodes"]["buildProcessNode"]; - for (auto allObjectNodeBuildProcessNodesbuildProcessNode : allBuildProcessNodesNode) + auto allBuildProcessNodesNode = valueObjectjob["BuildProcessNodes"]["buildProcessNode"]; + for (auto valueObjectjobBuildProcessNodesbuildProcessNode : allBuildProcessNodesNode) { Job::BuildProcessNode buildProcessNodesObject; - if(!allObjectNodeBuildProcessNodesbuildProcessNode["NodeName"].isNull()) - buildProcessNodesObject.nodeName = allObjectNodeBuildProcessNodesbuildProcessNode["NodeName"].asString(); - if(!allObjectNodeBuildProcessNodesbuildProcessNode["NodeIndex"].isNull()) - buildProcessNodesObject.nodeIndex = std::stoi(allObjectNodeBuildProcessNodesbuildProcessNode["NodeIndex"].asString()); - if(!allObjectNodeBuildProcessNodesbuildProcessNode["Status"].isNull()) - buildProcessNodesObject.status = allObjectNodeBuildProcessNodesbuildProcessNode["Status"].asString(); + if(!valueObjectjobBuildProcessNodesbuildProcessNode["NodeName"].isNull()) + buildProcessNodesObject.nodeName = valueObjectjobBuildProcessNodesbuildProcessNode["NodeName"].asString(); + if(!valueObjectjobBuildProcessNodesbuildProcessNode["NodeIndex"].isNull()) + buildProcessNodesObject.nodeIndex = std::stoi(valueObjectjobBuildProcessNodesbuildProcessNode["NodeIndex"].asString()); + if(!valueObjectjobBuildProcessNodesbuildProcessNode["Status"].isNull()) + buildProcessNodesObject.status = valueObjectjobBuildProcessNodesbuildProcessNode["Status"].asString(); objectObject.buildProcessNodes.push_back(buildProcessNodesObject); } object_.push_back(objectObject); diff --git a/devops-rdc/src/model/GetPipleineLatestInstanceStatusResult.cc b/devops-rdc/src/model/GetPipleineLatestInstanceStatusResult.cc index 2417527b4..310b36ea5 100644 --- a/devops-rdc/src/model/GetPipleineLatestInstanceStatusResult.cc +++ b/devops-rdc/src/model/GetPipleineLatestInstanceStatusResult.cc @@ -50,24 +50,24 @@ void GetPipleineLatestInstanceStatusResult::parse(const std::string &payload) groupObject.name = objectNodeGroupsgroup["Name"].asString(); if(!objectNodeGroupsgroup["Status"].isNull()) groupObject.status = objectNodeGroupsgroup["Status"].asString(); - auto allStagesNode = allGroupsNode["Stages"]["stage"]; - for (auto allGroupsNodeStagesstage : allStagesNode) + auto allStagesNode = objectNodeGroupsgroup["Stages"]["stage"]; + for (auto objectNodeGroupsgroupStagesstage : allStagesNode) { Object::Group::Stage stagesObject; - if(!allGroupsNodeStagesstage["Status"].isNull()) - stagesObject.status = allGroupsNodeStagesstage["Status"].asString(); - if(!allGroupsNodeStagesstage["Sign"].isNull()) - stagesObject.sign = allGroupsNodeStagesstage["Sign"].asString(); - auto allComponentsNode = allStagesNode["Components"]["component"]; - for (auto allStagesNodeComponentscomponent : allComponentsNode) + if(!objectNodeGroupsgroupStagesstage["Status"].isNull()) + stagesObject.status = objectNodeGroupsgroupStagesstage["Status"].asString(); + if(!objectNodeGroupsgroupStagesstage["Sign"].isNull()) + stagesObject.sign = objectNodeGroupsgroupStagesstage["Sign"].asString(); + auto allComponentsNode = objectNodeGroupsgroupStagesstage["Components"]["component"]; + for (auto objectNodeGroupsgroupStagesstageComponentscomponent : allComponentsNode) { Object::Group::Stage::Component componentsObject; - if(!allStagesNodeComponentscomponent["Name"].isNull()) - componentsObject.name = allStagesNodeComponentscomponent["Name"].asString(); - if(!allStagesNodeComponentscomponent["Status"].isNull()) - componentsObject.status = allStagesNodeComponentscomponent["Status"].asString(); - if(!allStagesNodeComponentscomponent["JobId"].isNull()) - componentsObject.jobId = std::stol(allStagesNodeComponentscomponent["JobId"].asString()); + if(!objectNodeGroupsgroupStagesstageComponentscomponent["Name"].isNull()) + componentsObject.name = objectNodeGroupsgroupStagesstageComponentscomponent["Name"].asString(); + if(!objectNodeGroupsgroupStagesstageComponentscomponent["Status"].isNull()) + componentsObject.status = objectNodeGroupsgroupStagesstageComponentscomponent["Status"].asString(); + if(!objectNodeGroupsgroupStagesstageComponentscomponent["JobId"].isNull()) + componentsObject.jobId = std::stol(objectNodeGroupsgroupStagesstageComponentscomponent["JobId"].asString()); stagesObject.components.push_back(componentsObject); } groupObject.stages.push_back(stagesObject); diff --git a/devops-rdc/src/model/ListDevopsProjectTaskListRequest.cc b/devops-rdc/src/model/ListDevopsProjectTaskListRequest.cc new file mode 100644 index 000000000..e8f8170e4 --- /dev/null +++ b/devops-rdc/src/model/ListDevopsProjectTaskListRequest.cc @@ -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 + +using AlibabaCloud::Devops_rdc::Model::ListDevopsProjectTaskListRequest; + +ListDevopsProjectTaskListRequest::ListDevopsProjectTaskListRequest() : + RpcServiceRequest("devops-rdc", "2020-03-03", "ListDevopsProjectTaskList") +{ + setMethod(HttpRequest::Method::Post); +} + +ListDevopsProjectTaskListRequest::~ListDevopsProjectTaskListRequest() +{} + +std::string ListDevopsProjectTaskListRequest::getProjectId()const +{ + return projectId_; +} + +void ListDevopsProjectTaskListRequest::setProjectId(const std::string& projectId) +{ + projectId_ = projectId; + setBodyParameter("ProjectId", projectId); +} + +std::string ListDevopsProjectTaskListRequest::getOrgId()const +{ + return orgId_; +} + +void ListDevopsProjectTaskListRequest::setOrgId(const std::string& orgId) +{ + orgId_ = orgId; + setBodyParameter("OrgId", orgId); +} + diff --git a/devops-rdc/src/model/ListDevopsProjectTaskListResult.cc b/devops-rdc/src/model/ListDevopsProjectTaskListResult.cc new file mode 100644 index 000000000..502e5446e --- /dev/null +++ b/devops-rdc/src/model/ListDevopsProjectTaskListResult.cc @@ -0,0 +1,79 @@ +/* + * 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 +#include + +using namespace AlibabaCloud::Devops_rdc; +using namespace AlibabaCloud::Devops_rdc::Model; + +ListDevopsProjectTaskListResult::ListDevopsProjectTaskListResult() : + ServiceResult() +{} + +ListDevopsProjectTaskListResult::ListDevopsProjectTaskListResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListDevopsProjectTaskListResult::~ListDevopsProjectTaskListResult() +{} + +void ListDevopsProjectTaskListResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto objectNode = value["Object"]; + auto allResultNode = objectNode["Result"]["ResultItem"]; + for (auto objectNodeResultResultItem : allResultNode) + { + Object::ResultItem resultItemObject; + if(!objectNodeResultResultItem["Id"].isNull()) + resultItemObject.id = objectNodeResultResultItem["Id"].asString(); + object_.result.push_back(resultItemObject); + } + if(!value["Successful"].isNull()) + successful_ = value["Successful"].asString() == "true"; + if(!value["ErrorCode"].isNull()) + errorCode_ = value["ErrorCode"].asString(); + if(!value["ErrorMsg"].isNull()) + errorMsg_ = value["ErrorMsg"].asString(); + +} + +std::string ListDevopsProjectTaskListResult::getErrorMsg()const +{ + return errorMsg_; +} + +ListDevopsProjectTaskListResult::Object ListDevopsProjectTaskListResult::getObject()const +{ + return object_; +} + +std::string ListDevopsProjectTaskListResult::getErrorCode()const +{ + return errorCode_; +} + +bool ListDevopsProjectTaskListResult::getSuccessful()const +{ + return successful_; +} +