Support show pipeline history.
This commit is contained in:
@@ -915,6 +915,42 @@ Devops_rdcClient::GetDevopsProjectTaskInfoOutcomeCallable Devops_rdcClient::getD
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Devops_rdcClient::GetPipelineInstHistoryOutcome Devops_rdcClient::getPipelineInstHistory(const GetPipelineInstHistoryRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetPipelineInstHistoryOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetPipelineInstHistoryOutcome(GetPipelineInstHistoryResult(outcome.result()));
|
||||
else
|
||||
return GetPipelineInstHistoryOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Devops_rdcClient::getPipelineInstHistoryAsync(const GetPipelineInstHistoryRequest& request, const GetPipelineInstHistoryAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getPipelineInstHistory(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Devops_rdcClient::GetPipelineInstHistoryOutcomeCallable Devops_rdcClient::getPipelineInstHistoryCallable(const GetPipelineInstHistoryRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetPipelineInstHistoryOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getPipelineInstHistory(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Devops_rdcClient::GetPipelineInstanceBuildNumberStatusOutcome Devops_rdcClient::getPipelineInstanceBuildNumberStatus(const GetPipelineInstanceBuildNumberStatusRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1095,6 +1131,42 @@ Devops_rdcClient::GetPipelineLogOutcomeCallable Devops_rdcClient::getPipelineLog
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Devops_rdcClient::GetPipelineStepLogOutcome Devops_rdcClient::getPipelineStepLog(const GetPipelineStepLogRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetPipelineStepLogOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetPipelineStepLogOutcome(GetPipelineStepLogResult(outcome.result()));
|
||||
else
|
||||
return GetPipelineStepLogOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Devops_rdcClient::getPipelineStepLogAsync(const GetPipelineStepLogRequest& request, const GetPipelineStepLogAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getPipelineStepLog(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Devops_rdcClient::GetPipelineStepLogOutcomeCallable Devops_rdcClient::getPipelineStepLogCallable(const GetPipelineStepLogRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetPipelineStepLogOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getPipelineStepLog(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Devops_rdcClient::GetPipleineLatestInstanceStatusOutcome Devops_rdcClient::getPipleineLatestInstanceStatus(const GetPipleineLatestInstanceStatusRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
106
devops-rdc/src/model/GetPipelineInstHistoryRequest.cc
Normal file
106
devops-rdc/src/model/GetPipelineInstHistoryRequest.cc
Normal file
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* 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/GetPipelineInstHistoryRequest.h>
|
||||
|
||||
using AlibabaCloud::Devops_rdc::Model::GetPipelineInstHistoryRequest;
|
||||
|
||||
GetPipelineInstHistoryRequest::GetPipelineInstHistoryRequest() :
|
||||
RpcServiceRequest("devops-rdc", "2020-03-03", "GetPipelineInstHistory")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetPipelineInstHistoryRequest::~GetPipelineInstHistoryRequest()
|
||||
{}
|
||||
|
||||
std::string GetPipelineInstHistoryRequest::getEndTime()const
|
||||
{
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
void GetPipelineInstHistoryRequest::setEndTime(const std::string& endTime)
|
||||
{
|
||||
endTime_ = endTime;
|
||||
setBodyParameter("EndTime", endTime);
|
||||
}
|
||||
|
||||
std::string GetPipelineInstHistoryRequest::getStartTime()const
|
||||
{
|
||||
return startTime_;
|
||||
}
|
||||
|
||||
void GetPipelineInstHistoryRequest::setStartTime(const std::string& startTime)
|
||||
{
|
||||
startTime_ = startTime;
|
||||
setBodyParameter("StartTime", startTime);
|
||||
}
|
||||
|
||||
std::string GetPipelineInstHistoryRequest::getUserPk()const
|
||||
{
|
||||
return userPk_;
|
||||
}
|
||||
|
||||
void GetPipelineInstHistoryRequest::setUserPk(const std::string& userPk)
|
||||
{
|
||||
userPk_ = userPk;
|
||||
setBodyParameter("UserPk", userPk);
|
||||
}
|
||||
|
||||
std::string GetPipelineInstHistoryRequest::getOrgId()const
|
||||
{
|
||||
return orgId_;
|
||||
}
|
||||
|
||||
void GetPipelineInstHistoryRequest::setOrgId(const std::string& orgId)
|
||||
{
|
||||
orgId_ = orgId;
|
||||
setBodyParameter("OrgId", orgId);
|
||||
}
|
||||
|
||||
long GetPipelineInstHistoryRequest::getPipelineId()const
|
||||
{
|
||||
return pipelineId_;
|
||||
}
|
||||
|
||||
void GetPipelineInstHistoryRequest::setPipelineId(long pipelineId)
|
||||
{
|
||||
pipelineId_ = pipelineId;
|
||||
setBodyParameter("PipelineId", std::to_string(pipelineId));
|
||||
}
|
||||
|
||||
long GetPipelineInstHistoryRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void GetPipelineInstHistoryRequest::setPageSize(long pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setBodyParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
long GetPipelineInstHistoryRequest::getPageStart()const
|
||||
{
|
||||
return pageStart_;
|
||||
}
|
||||
|
||||
void GetPipelineInstHistoryRequest::setPageStart(long pageStart)
|
||||
{
|
||||
pageStart_ = pageStart;
|
||||
setBodyParameter("PageStart", std::to_string(pageStart));
|
||||
}
|
||||
|
||||
189
devops-rdc/src/model/GetPipelineInstHistoryResult.cc
Normal file
189
devops-rdc/src/model/GetPipelineInstHistoryResult.cc
Normal file
@@ -0,0 +1,189 @@
|
||||
/*
|
||||
* 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/GetPipelineInstHistoryResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Devops_rdc;
|
||||
using namespace AlibabaCloud::Devops_rdc::Model;
|
||||
|
||||
GetPipelineInstHistoryResult::GetPipelineInstHistoryResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetPipelineInstHistoryResult::GetPipelineInstHistoryResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetPipelineInstHistoryResult::~GetPipelineInstHistoryResult()
|
||||
{}
|
||||
|
||||
void GetPipelineInstHistoryResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["Total"].isNull())
|
||||
data_.total = std::stoi(dataNode["Total"].asString());
|
||||
auto allDataListNode = dataNode["DataList"]["PipelineInst"];
|
||||
for (auto dataNodeDataListPipelineInst : allDataListNode)
|
||||
{
|
||||
Data::PipelineInst pipelineInstObject;
|
||||
if(!dataNodeDataListPipelineInst["Creator"].isNull())
|
||||
pipelineInstObject.creator = dataNodeDataListPipelineInst["Creator"].asString();
|
||||
if(!dataNodeDataListPipelineInst["ModifyTime"].isNull())
|
||||
pipelineInstObject.modifyTime = std::stol(dataNodeDataListPipelineInst["ModifyTime"].asString());
|
||||
if(!dataNodeDataListPipelineInst["PipelineConfigId"].isNull())
|
||||
pipelineInstObject.pipelineConfigId = std::stoi(dataNodeDataListPipelineInst["PipelineConfigId"].asString());
|
||||
if(!dataNodeDataListPipelineInst["Modifier"].isNull())
|
||||
pipelineInstObject.modifier = dataNodeDataListPipelineInst["Modifier"].asString();
|
||||
if(!dataNodeDataListPipelineInst["CreateTime"].isNull())
|
||||
pipelineInstObject.createTime = std::stol(dataNodeDataListPipelineInst["CreateTime"].asString());
|
||||
if(!dataNodeDataListPipelineInst["Packages"].isNull())
|
||||
pipelineInstObject.packages = dataNodeDataListPipelineInst["Packages"].asString();
|
||||
if(!dataNodeDataListPipelineInst["PipelineId"].isNull())
|
||||
pipelineInstObject.pipelineId = std::stoi(dataNodeDataListPipelineInst["PipelineId"].asString());
|
||||
if(!dataNodeDataListPipelineInst["FlowInstId"].isNull())
|
||||
pipelineInstObject.flowInstId = std::stoi(dataNodeDataListPipelineInst["FlowInstId"].asString());
|
||||
if(!dataNodeDataListPipelineInst["InstNumber"].isNull())
|
||||
pipelineInstObject.instNumber = std::stoi(dataNodeDataListPipelineInst["InstNumber"].asString());
|
||||
if(!dataNodeDataListPipelineInst["Deletion"].isNull())
|
||||
pipelineInstObject.deletion = dataNodeDataListPipelineInst["Deletion"].asString();
|
||||
if(!dataNodeDataListPipelineInst["StatusName"].isNull())
|
||||
pipelineInstObject.statusName = dataNodeDataListPipelineInst["StatusName"].asString();
|
||||
if(!dataNodeDataListPipelineInst["Id"].isNull())
|
||||
pipelineInstObject.id = std::stoi(dataNodeDataListPipelineInst["Id"].asString());
|
||||
if(!dataNodeDataListPipelineInst["TriggerMode"].isNull())
|
||||
pipelineInstObject.triggerMode = std::stoi(dataNodeDataListPipelineInst["TriggerMode"].asString());
|
||||
if(!dataNodeDataListPipelineInst["Status"].isNull())
|
||||
pipelineInstObject.status = dataNodeDataListPipelineInst["Status"].asString();
|
||||
auto flowInstanceNode = value["FlowInstance"];
|
||||
if(!flowInstanceNode["Creator"].isNull())
|
||||
pipelineInstObject.flowInstance.creator = flowInstanceNode["Creator"].asString();
|
||||
if(!flowInstanceNode["ModifyTime"].isNull())
|
||||
pipelineInstObject.flowInstance.modifyTime = std::stol(flowInstanceNode["ModifyTime"].asString());
|
||||
if(!flowInstanceNode["SystemId"].isNull())
|
||||
pipelineInstObject.flowInstance.systemId = flowInstanceNode["SystemId"].asString();
|
||||
if(!flowInstanceNode["StageTopo"].isNull())
|
||||
pipelineInstObject.flowInstance.stageTopo = flowInstanceNode["StageTopo"].asString();
|
||||
if(!flowInstanceNode["Modifier"].isNull())
|
||||
pipelineInstObject.flowInstance.modifier = flowInstanceNode["Modifier"].asString();
|
||||
if(!flowInstanceNode["AutoDrivenStatus"].isNull())
|
||||
pipelineInstObject.flowInstance.autoDrivenStatus = flowInstanceNode["AutoDrivenStatus"].asString() == "true";
|
||||
if(!flowInstanceNode["CreateTime"].isNull())
|
||||
pipelineInstObject.flowInstance.createTime = std::stol(flowInstanceNode["CreateTime"].asString());
|
||||
if(!flowInstanceNode["ResultStatus"].isNull())
|
||||
pipelineInstObject.flowInstance.resultStatus = flowInstanceNode["ResultStatus"].asString();
|
||||
if(!flowInstanceNode["RunningStatus"].isNull())
|
||||
pipelineInstObject.flowInstance.runningStatus = flowInstanceNode["RunningStatus"].asString();
|
||||
if(!flowInstanceNode["SystemCode"].isNull())
|
||||
pipelineInstObject.flowInstance.systemCode = flowInstanceNode["SystemCode"].asString();
|
||||
if(!flowInstanceNode["Stages"].isNull())
|
||||
pipelineInstObject.flowInstance.stages = flowInstanceNode["Stages"].asString();
|
||||
if(!flowInstanceNode["StatusName"].isNull())
|
||||
pipelineInstObject.flowInstance.statusName = flowInstanceNode["StatusName"].asString();
|
||||
if(!flowInstanceNode["Id"].isNull())
|
||||
pipelineInstObject.flowInstance.id = std::stoi(flowInstanceNode["Id"].asString());
|
||||
if(!flowInstanceNode["Status"].isNull())
|
||||
pipelineInstObject.flowInstance.status = flowInstanceNode["Status"].asString();
|
||||
auto allGroupsNode = flowInstanceNode["Groups"]["Group"];
|
||||
for (auto flowInstanceNodeGroupsGroup : allGroupsNode)
|
||||
{
|
||||
Data::PipelineInst::FlowInstance::Group groupObject;
|
||||
if(!flowInstanceNodeGroupsGroup["Creator"].isNull())
|
||||
groupObject.creator = flowInstanceNodeGroupsGroup["Creator"].asString();
|
||||
if(!flowInstanceNodeGroupsGroup["ModifyTime"].isNull())
|
||||
groupObject.modifyTime = std::stol(flowInstanceNodeGroupsGroup["ModifyTime"].asString());
|
||||
if(!flowInstanceNodeGroupsGroup["Modifier"].isNull())
|
||||
groupObject.modifier = flowInstanceNodeGroupsGroup["Modifier"].asString();
|
||||
if(!flowInstanceNodeGroupsGroup["CreateTime"].isNull())
|
||||
groupObject.createTime = std::stol(flowInstanceNodeGroupsGroup["CreateTime"].asString());
|
||||
if(!flowInstanceNodeGroupsGroup["FlowInstId"].isNull())
|
||||
groupObject.flowInstId = std::stoi(flowInstanceNodeGroupsGroup["FlowInstId"].asString());
|
||||
if(!flowInstanceNodeGroupsGroup["ResultStatus"].isNull())
|
||||
groupObject.resultStatus = flowInstanceNodeGroupsGroup["ResultStatus"].asString();
|
||||
if(!flowInstanceNodeGroupsGroup["DeleteStatus"].isNull())
|
||||
groupObject.deleteStatus = flowInstanceNodeGroupsGroup["DeleteStatus"].asString();
|
||||
if(!flowInstanceNodeGroupsGroup["Name"].isNull())
|
||||
groupObject.name = flowInstanceNodeGroupsGroup["Name"].asString();
|
||||
if(!flowInstanceNodeGroupsGroup["StartTime"].isNull())
|
||||
groupObject.startTime = std::stol(flowInstanceNodeGroupsGroup["StartTime"].asString());
|
||||
if(!flowInstanceNodeGroupsGroup["EndTime"].isNull())
|
||||
groupObject.endTime = std::stol(flowInstanceNodeGroupsGroup["EndTime"].asString());
|
||||
if(!flowInstanceNodeGroupsGroup["Id"].isNull())
|
||||
groupObject.id = std::stoi(flowInstanceNodeGroupsGroup["Id"].asString());
|
||||
if(!flowInstanceNodeGroupsGroup["IdExtent"].isNull())
|
||||
groupObject.idExtent = std::stoi(flowInstanceNodeGroupsGroup["IdExtent"].asString());
|
||||
if(!flowInstanceNodeGroupsGroup["Status"].isNull())
|
||||
groupObject.status = flowInstanceNodeGroupsGroup["Status"].asString();
|
||||
pipelineInstObject.flowInstance.groups.push_back(groupObject);
|
||||
}
|
||||
auto resultNode = flowInstanceNode["Result"];
|
||||
if(!resultNode["Sources"].isNull())
|
||||
pipelineInstObject.flowInstance.result.sources = resultNode["Sources"].asString();
|
||||
if(!resultNode["Caches"].isNull())
|
||||
pipelineInstObject.flowInstance.result.caches = resultNode["Caches"].asString();
|
||||
if(!resultNode["EnginePipelineId"].isNull())
|
||||
pipelineInstObject.flowInstance.result.enginePipelineId = std::stoi(resultNode["EnginePipelineId"].asString());
|
||||
if(!resultNode["MixFlowInstId"].isNull())
|
||||
pipelineInstObject.flowInstance.result.mixFlowInstId = resultNode["MixFlowInstId"].asString();
|
||||
if(!resultNode["EnginePipelineName"].isNull())
|
||||
pipelineInstObject.flowInstance.result.enginePipelineName = resultNode["EnginePipelineName"].asString();
|
||||
if(!resultNode["EnginePipelineNumber"].isNull())
|
||||
pipelineInstObject.flowInstance.result.enginePipelineNumber = std::stoi(resultNode["EnginePipelineNumber"].asString());
|
||||
if(!resultNode["DateTime"].isNull())
|
||||
pipelineInstObject.flowInstance.result.dateTime = resultNode["DateTime"].asString();
|
||||
if(!resultNode["TimeStamp"].isNull())
|
||||
pipelineInstObject.flowInstance.result.timeStamp = resultNode["TimeStamp"].asString();
|
||||
if(!resultNode["TriggerMode"].isNull())
|
||||
pipelineInstObject.flowInstance.result.triggerMode = resultNode["TriggerMode"].asString();
|
||||
if(!resultNode["EnginePipelineInstId"].isNull())
|
||||
pipelineInstObject.flowInstance.result.enginePipelineInstId = std::stoi(resultNode["EnginePipelineInstId"].asString());
|
||||
data_.dataList.push_back(pipelineInstObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["ErrorCode"].isNull())
|
||||
errorCode_ = value["ErrorCode"].asString();
|
||||
if(!value["ErrorMessage"].isNull())
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
|
||||
}
|
||||
|
||||
GetPipelineInstHistoryResult::Data GetPipelineInstHistoryResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string GetPipelineInstHistoryResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
std::string GetPipelineInstHistoryResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
bool GetPipelineInstHistoryResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
106
devops-rdc/src/model/GetPipelineStepLogRequest.cc
Normal file
106
devops-rdc/src/model/GetPipelineStepLogRequest.cc
Normal file
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* 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/GetPipelineStepLogRequest.h>
|
||||
|
||||
using AlibabaCloud::Devops_rdc::Model::GetPipelineStepLogRequest;
|
||||
|
||||
GetPipelineStepLogRequest::GetPipelineStepLogRequest() :
|
||||
RpcServiceRequest("devops-rdc", "2020-03-03", "GetPipelineStepLog")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetPipelineStepLogRequest::~GetPipelineStepLogRequest()
|
||||
{}
|
||||
|
||||
long GetPipelineStepLogRequest::getOffset()const
|
||||
{
|
||||
return offset_;
|
||||
}
|
||||
|
||||
void GetPipelineStepLogRequest::setOffset(long offset)
|
||||
{
|
||||
offset_ = offset;
|
||||
setBodyParameter("Offset", std::to_string(offset));
|
||||
}
|
||||
|
||||
std::string GetPipelineStepLogRequest::getUserPk()const
|
||||
{
|
||||
return userPk_;
|
||||
}
|
||||
|
||||
void GetPipelineStepLogRequest::setUserPk(const std::string& userPk)
|
||||
{
|
||||
userPk_ = userPk;
|
||||
setBodyParameter("UserPk", userPk);
|
||||
}
|
||||
|
||||
std::string GetPipelineStepLogRequest::getOrgId()const
|
||||
{
|
||||
return orgId_;
|
||||
}
|
||||
|
||||
void GetPipelineStepLogRequest::setOrgId(const std::string& orgId)
|
||||
{
|
||||
orgId_ = orgId;
|
||||
setBodyParameter("OrgId", orgId);
|
||||
}
|
||||
|
||||
long GetPipelineStepLogRequest::getPipelineId()const
|
||||
{
|
||||
return pipelineId_;
|
||||
}
|
||||
|
||||
void GetPipelineStepLogRequest::setPipelineId(long pipelineId)
|
||||
{
|
||||
pipelineId_ = pipelineId;
|
||||
setBodyParameter("PipelineId", std::to_string(pipelineId));
|
||||
}
|
||||
|
||||
long GetPipelineStepLogRequest::getJobId()const
|
||||
{
|
||||
return jobId_;
|
||||
}
|
||||
|
||||
void GetPipelineStepLogRequest::setJobId(long jobId)
|
||||
{
|
||||
jobId_ = jobId;
|
||||
setBodyParameter("JobId", std::to_string(jobId));
|
||||
}
|
||||
|
||||
std::string GetPipelineStepLogRequest::getStepIndex()const
|
||||
{
|
||||
return stepIndex_;
|
||||
}
|
||||
|
||||
void GetPipelineStepLogRequest::setStepIndex(const std::string& stepIndex)
|
||||
{
|
||||
stepIndex_ = stepIndex;
|
||||
setBodyParameter("StepIndex", stepIndex);
|
||||
}
|
||||
|
||||
long GetPipelineStepLogRequest::getLimit()const
|
||||
{
|
||||
return limit_;
|
||||
}
|
||||
|
||||
void GetPipelineStepLogRequest::setLimit(long limit)
|
||||
{
|
||||
limit_ = limit;
|
||||
setBodyParameter("Limit", std::to_string(limit));
|
||||
}
|
||||
|
||||
77
devops-rdc/src/model/GetPipelineStepLogResult.cc
Normal file
77
devops-rdc/src/model/GetPipelineStepLogResult.cc
Normal file
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* 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/GetPipelineStepLogResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Devops_rdc;
|
||||
using namespace AlibabaCloud::Devops_rdc::Model;
|
||||
|
||||
GetPipelineStepLogResult::GetPipelineStepLogResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetPipelineStepLogResult::GetPipelineStepLogResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetPipelineStepLogResult::~GetPipelineStepLogResult()
|
||||
{}
|
||||
|
||||
void GetPipelineStepLogResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto objectNode = value["Object"];
|
||||
if(!objectNode["Last"].isNull())
|
||||
object_.last = std::stoi(objectNode["Last"].asString());
|
||||
if(!objectNode["More"].isNull())
|
||||
object_.more = objectNode["More"].asString() == "true";
|
||||
if(!objectNode["Logs"].isNull())
|
||||
object_.logs = objectNode["Logs"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["ErrorCode"].isNull())
|
||||
errorCode_ = value["ErrorCode"].asString();
|
||||
if(!value["ErrorMessage"].isNull())
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
|
||||
}
|
||||
|
||||
GetPipelineStepLogResult::Object GetPipelineStepLogResult::getObject()const
|
||||
{
|
||||
return object_;
|
||||
}
|
||||
|
||||
std::string GetPipelineStepLogResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
std::string GetPipelineStepLogResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
bool GetPipelineStepLogResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user