Support taskList.
This commit is contained in:
@@ -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<const AsyncCallerContext>& 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<std::packaged_task<ListDevopsProjectTaskListOutcome()>>(
|
||||
[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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
51
devops-rdc/src/model/ListDevopsProjectTaskListRequest.cc
Normal file
51
devops-rdc/src/model/ListDevopsProjectTaskListRequest.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/devops-rdc/model/ListDevopsProjectTaskListRequest.h>
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
79
devops-rdc/src/model/ListDevopsProjectTaskListResult.cc
Normal file
79
devops-rdc/src/model/ListDevopsProjectTaskListResult.cc
Normal file
@@ -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 <alibabacloud/devops-rdc/model/ListDevopsProjectTaskListResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
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_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user