Support add webhook, get repository info via id or path.

This commit is contained in:
sdk-team
2020-10-12 10:08:08 +00:00
parent f5fe7fb428
commit 90802f9197
50 changed files with 4381 additions and 3 deletions

View File

@@ -123,6 +123,78 @@ CodeupClient::AddRepositoryMemberOutcomeCallable CodeupClient::addRepositoryMemb
return task->get_future();
}
CodeupClient::AddWebhookOutcome CodeupClient::addWebhook(const AddWebhookRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return AddWebhookOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return AddWebhookOutcome(AddWebhookResult(outcome.result()));
else
return AddWebhookOutcome(outcome.error());
}
void CodeupClient::addWebhookAsync(const AddWebhookRequest& request, const AddWebhookAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, addWebhook(request), context);
};
asyncExecute(new Runnable(fn));
}
CodeupClient::AddWebhookOutcomeCallable CodeupClient::addWebhookCallable(const AddWebhookRequest &request) const
{
auto task = std::make_shared<std::packaged_task<AddWebhookOutcome()>>(
[this, request]()
{
return this->addWebhook(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CodeupClient::CreateBranchOutcome CodeupClient::createBranch(const CreateBranchRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateBranchOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateBranchOutcome(CreateBranchResult(outcome.result()));
else
return CreateBranchOutcome(outcome.error());
}
void CodeupClient::createBranchAsync(const CreateBranchRequest& request, const CreateBranchAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createBranch(request), context);
};
asyncExecute(new Runnable(fn));
}
CodeupClient::CreateBranchOutcomeCallable CodeupClient::createBranchCallable(const CreateBranchRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateBranchOutcome()>>(
[this, request]()
{
return this->createBranch(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CodeupClient::CreateFileOutcome CodeupClient::createFile(const CreateFileRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -159,6 +231,42 @@ CodeupClient::CreateFileOutcomeCallable CodeupClient::createFileCallable(const C
return task->get_future();
}
CodeupClient::CreateMergeRequestOutcome CodeupClient::createMergeRequest(const CreateMergeRequestRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateMergeRequestOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateMergeRequestOutcome(CreateMergeRequestResult(outcome.result()));
else
return CreateMergeRequestOutcome(outcome.error());
}
void CodeupClient::createMergeRequestAsync(const CreateMergeRequestRequest& request, const CreateMergeRequestAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createMergeRequest(request), context);
};
asyncExecute(new Runnable(fn));
}
CodeupClient::CreateMergeRequestOutcomeCallable CodeupClient::createMergeRequestCallable(const CreateMergeRequestRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateMergeRequestOutcome()>>(
[this, request]()
{
return this->createMergeRequest(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CodeupClient::CreateRepositoryOutcome CodeupClient::createRepository(const CreateRepositoryRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -231,6 +339,78 @@ CodeupClient::CreateRepositoryGroupOutcomeCallable CodeupClient::createRepositor
return task->get_future();
}
CodeupClient::CreateTagOutcome CodeupClient::createTag(const CreateTagRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateTagOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateTagOutcome(CreateTagResult(outcome.result()));
else
return CreateTagOutcome(outcome.error());
}
void CodeupClient::createTagAsync(const CreateTagRequest& request, const CreateTagAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createTag(request), context);
};
asyncExecute(new Runnable(fn));
}
CodeupClient::CreateTagOutcomeCallable CodeupClient::createTagCallable(const CreateTagRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateTagOutcome()>>(
[this, request]()
{
return this->createTag(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CodeupClient::DeleteBranchOutcome CodeupClient::deleteBranch(const DeleteBranchRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DeleteBranchOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DeleteBranchOutcome(DeleteBranchResult(outcome.result()));
else
return DeleteBranchOutcome(outcome.error());
}
void CodeupClient::deleteBranchAsync(const DeleteBranchRequest& request, const DeleteBranchAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, deleteBranch(request), context);
};
asyncExecute(new Runnable(fn));
}
CodeupClient::DeleteBranchOutcomeCallable CodeupClient::deleteBranchCallable(const DeleteBranchRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DeleteBranchOutcome()>>(
[this, request]()
{
return this->deleteBranch(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CodeupClient::DeleteFileOutcome CodeupClient::deleteFile(const DeleteFileRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -411,6 +591,42 @@ CodeupClient::DeleteRepositoryMemberOutcomeCallable CodeupClient::deleteReposito
return task->get_future();
}
CodeupClient::GetBranchInfoOutcome CodeupClient::getBranchInfo(const GetBranchInfoRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetBranchInfoOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetBranchInfoOutcome(GetBranchInfoResult(outcome.result()));
else
return GetBranchInfoOutcome(outcome.error());
}
void CodeupClient::getBranchInfoAsync(const GetBranchInfoRequest& request, const GetBranchInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getBranchInfo(request), context);
};
asyncExecute(new Runnable(fn));
}
CodeupClient::GetBranchInfoOutcomeCallable CodeupClient::getBranchInfoCallable(const GetBranchInfoRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetBranchInfoOutcome()>>(
[this, request]()
{
return this->getBranchInfo(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CodeupClient::GetCodeupOrganizationOutcome CodeupClient::getCodeupOrganization(const GetCodeupOrganizationRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -483,6 +699,78 @@ CodeupClient::GetFileBlobsOutcomeCallable CodeupClient::getFileBlobsCallable(con
return task->get_future();
}
CodeupClient::GetProjectMemberOutcome CodeupClient::getProjectMember(const GetProjectMemberRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetProjectMemberOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetProjectMemberOutcome(GetProjectMemberResult(outcome.result()));
else
return GetProjectMemberOutcome(outcome.error());
}
void CodeupClient::getProjectMemberAsync(const GetProjectMemberRequest& request, const GetProjectMemberAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getProjectMember(request), context);
};
asyncExecute(new Runnable(fn));
}
CodeupClient::GetProjectMemberOutcomeCallable CodeupClient::getProjectMemberCallable(const GetProjectMemberRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetProjectMemberOutcome()>>(
[this, request]()
{
return this->getProjectMember(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CodeupClient::GetRepositoryInfoOutcome CodeupClient::getRepositoryInfo(const GetRepositoryInfoRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetRepositoryInfoOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetRepositoryInfoOutcome(GetRepositoryInfoResult(outcome.result()));
else
return GetRepositoryInfoOutcome(outcome.error());
}
void CodeupClient::getRepositoryInfoAsync(const GetRepositoryInfoRequest& request, const GetRepositoryInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getRepositoryInfo(request), context);
};
asyncExecute(new Runnable(fn));
}
CodeupClient::GetRepositoryInfoOutcomeCallable CodeupClient::getRepositoryInfoCallable(const GetRepositoryInfoRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetRepositoryInfoOutcome()>>(
[this, request]()
{
return this->getRepositoryInfo(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CodeupClient::ListGroupMemberOutcome CodeupClient::listGroupMember(const ListGroupMemberRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -519,6 +807,78 @@ CodeupClient::ListGroupMemberOutcomeCallable CodeupClient::listGroupMemberCallab
return task->get_future();
}
CodeupClient::ListGroupRepositoriesOutcome CodeupClient::listGroupRepositories(const ListGroupRepositoriesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListGroupRepositoriesOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListGroupRepositoriesOutcome(ListGroupRepositoriesResult(outcome.result()));
else
return ListGroupRepositoriesOutcome(outcome.error());
}
void CodeupClient::listGroupRepositoriesAsync(const ListGroupRepositoriesRequest& request, const ListGroupRepositoriesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listGroupRepositories(request), context);
};
asyncExecute(new Runnable(fn));
}
CodeupClient::ListGroupRepositoriesOutcomeCallable CodeupClient::listGroupRepositoriesCallable(const ListGroupRepositoriesRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListGroupRepositoriesOutcome()>>(
[this, request]()
{
return this->listGroupRepositories(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CodeupClient::ListGroupsOutcome CodeupClient::listGroups(const ListGroupsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListGroupsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListGroupsOutcome(ListGroupsResult(outcome.result()));
else
return ListGroupsOutcome(outcome.error());
}
void CodeupClient::listGroupsAsync(const ListGroupsRequest& request, const ListGroupsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listGroups(request), context);
};
asyncExecute(new Runnable(fn));
}
CodeupClient::ListGroupsOutcomeCallable CodeupClient::listGroupsCallable(const ListGroupsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListGroupsOutcome()>>(
[this, request]()
{
return this->listGroups(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CodeupClient::ListRepositoryMemberOutcome CodeupClient::listRepositoryMember(const ListRepositoryMemberRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -591,6 +951,42 @@ CodeupClient::ListRepositoryTreeOutcomeCallable CodeupClient::listRepositoryTree
return task->get_future();
}
CodeupClient::MergeMergeRequestOutcome CodeupClient::mergeMergeRequest(const MergeMergeRequestRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return MergeMergeRequestOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return MergeMergeRequestOutcome(MergeMergeRequestResult(outcome.result()));
else
return MergeMergeRequestOutcome(outcome.error());
}
void CodeupClient::mergeMergeRequestAsync(const MergeMergeRequestRequest& request, const MergeMergeRequestAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, mergeMergeRequest(request), context);
};
asyncExecute(new Runnable(fn));
}
CodeupClient::MergeMergeRequestOutcomeCallable CodeupClient::mergeMergeRequestCallable(const MergeMergeRequestRequest &request) const
{
auto task = std::make_shared<std::packaged_task<MergeMergeRequestOutcome()>>(
[this, request]()
{
return this->mergeMergeRequest(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CodeupClient::UpdateFileOutcome CodeupClient::updateFile(const UpdateFileRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,63 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/AddWebhookRequest.h>
using AlibabaCloud::Codeup::Model::AddWebhookRequest;
AddWebhookRequest::AddWebhookRequest() :
RoaServiceRequest("codeup", "2020-04-14")
{
setResourcePath("/api/v3/projects/[ProjectId]/hooks");
setMethod(HttpRequest::Method::Post);
}
AddWebhookRequest::~AddWebhookRequest()
{}
std::string AddWebhookRequest::getOrganizationId()const
{
return organizationId_;
}
void AddWebhookRequest::setOrganizationId(const std::string& organizationId)
{
organizationId_ = organizationId;
setParameter("OrganizationId", organizationId);
}
std::string AddWebhookRequest::getAccessToken()const
{
return accessToken_;
}
void AddWebhookRequest::setAccessToken(const std::string& accessToken)
{
accessToken_ = accessToken;
setParameter("AccessToken", accessToken);
}
long AddWebhookRequest::getProjectId()const
{
return projectId_;
}
void AddWebhookRequest::setProjectId(long projectId)
{
projectId_ = projectId;
setParameter("ProjectId", std::to_string(projectId));
}

View File

@@ -0,0 +1,97 @@
/*
* 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/codeup/model/AddWebhookResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Codeup;
using namespace AlibabaCloud::Codeup::Model;
AddWebhookResult::AddWebhookResult() :
ServiceResult()
{}
AddWebhookResult::AddWebhookResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
AddWebhookResult::~AddWebhookResult()
{}
void AddWebhookResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resultNode = value["Result"];
if(!resultNode["Id"].isNull())
result_.id = std::stol(resultNode["Id"].asString());
if(!resultNode["Url"].isNull())
result_.url = resultNode["Url"].asString();
if(!resultNode["CreatedAt"].isNull())
result_.createdAt = resultNode["CreatedAt"].asString();
if(!resultNode["ProjectId"].isNull())
result_.projectId = std::stol(resultNode["ProjectId"].asString());
if(!resultNode["PushEvents"].isNull())
result_.pushEvents = resultNode["PushEvents"].asString() == "true";
if(!resultNode["IssuesEvents"].isNull())
result_.issuesEvents = resultNode["IssuesEvents"].asString() == "true";
if(!resultNode["MergeRequestsEvents"].isNull())
result_.mergeRequestsEvents = resultNode["MergeRequestsEvents"].asString() == "true";
if(!resultNode["TagPushEvents"].isNull())
result_.tagPushEvents = resultNode["TagPushEvents"].asString() == "true";
if(!resultNode["BuildEvents"].isNull())
result_.buildEvents = resultNode["BuildEvents"].asString() == "true";
if(!resultNode["NoteEvents"].isNull())
result_.noteEvents = resultNode["NoteEvents"].asString() == "true";
if(!resultNode["EnableSslVerification"].isNull())
result_.enableSslVerification = resultNode["EnableSslVerification"].asString() == "true";
if(!resultNode["LastTestResult"].isNull())
result_.lastTestResult = resultNode["LastTestResult"].asString();
if(!resultNode["Description"].isNull())
result_.description = resultNode["Description"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string AddWebhookResult::getErrorCode()const
{
return errorCode_;
}
std::string AddWebhookResult::getErrorMessage()const
{
return errorMessage_;
}
bool AddWebhookResult::getSuccess()const
{
return success_;
}
AddWebhookResult::Result AddWebhookResult::getResult()const
{
return result_;
}

View File

@@ -0,0 +1,74 @@
/*
* 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/codeup/model/CreateBranchRequest.h>
using AlibabaCloud::Codeup::Model::CreateBranchRequest;
CreateBranchRequest::CreateBranchRequest() :
RoaServiceRequest("codeup", "2020-04-14")
{
setResourcePath("/api/v3/projects/[ProjectId]/repository/branches");
setMethod(HttpRequest::Method::Post);
}
CreateBranchRequest::~CreateBranchRequest()
{}
std::string CreateBranchRequest::getOrganizationId()const
{
return organizationId_;
}
void CreateBranchRequest::setOrganizationId(const std::string& organizationId)
{
organizationId_ = organizationId;
setParameter("OrganizationId", organizationId);
}
std::string CreateBranchRequest::getSubUserId()const
{
return subUserId_;
}
void CreateBranchRequest::setSubUserId(const std::string& subUserId)
{
subUserId_ = subUserId;
setParameter("SubUserId", subUserId);
}
std::string CreateBranchRequest::getAccessToken()const
{
return accessToken_;
}
void CreateBranchRequest::setAccessToken(const std::string& accessToken)
{
accessToken_ = accessToken;
setParameter("AccessToken", accessToken);
}
long CreateBranchRequest::getProjectId()const
{
return projectId_;
}
void CreateBranchRequest::setProjectId(long projectId)
{
projectId_ = projectId;
setParameter("ProjectId", std::to_string(projectId));
}

View File

@@ -0,0 +1,101 @@
/*
* 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/codeup/model/CreateBranchResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Codeup;
using namespace AlibabaCloud::Codeup::Model;
CreateBranchResult::CreateBranchResult() :
ServiceResult()
{}
CreateBranchResult::CreateBranchResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateBranchResult::~CreateBranchResult()
{}
void CreateBranchResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resultNode = value["Result"];
if(!resultNode["BranchName"].isNull())
result_.branchName = resultNode["BranchName"].asString();
if(!resultNode["ProtectedBranch"].isNull())
result_.protectedBranch = resultNode["ProtectedBranch"].asString() == "true";
auto commitInfoNode = resultNode["CommitInfo"];
if(!commitInfoNode["Id"].isNull())
result_.commitInfo.id = commitInfoNode["Id"].asString();
if(!commitInfoNode["ShortId"].isNull())
result_.commitInfo.shortId = commitInfoNode["ShortId"].asString();
if(!commitInfoNode["Title"].isNull())
result_.commitInfo.title = commitInfoNode["Title"].asString();
if(!commitInfoNode["AuthorName"].isNull())
result_.commitInfo.authorName = commitInfoNode["AuthorName"].asString();
if(!commitInfoNode["AuthorEmail"].isNull())
result_.commitInfo.authorEmail = commitInfoNode["AuthorEmail"].asString();
if(!commitInfoNode["CreatedAt"].isNull())
result_.commitInfo.createdAt = commitInfoNode["CreatedAt"].asString();
if(!commitInfoNode["Message"].isNull())
result_.commitInfo.message = commitInfoNode["Message"].asString();
if(!commitInfoNode["AuthorDate"].isNull())
result_.commitInfo.authorDate = commitInfoNode["AuthorDate"].asString();
if(!commitInfoNode["CommittedDate"].isNull())
result_.commitInfo.committedDate = commitInfoNode["CommittedDate"].asString();
if(!commitInfoNode["CommitterEmail"].isNull())
result_.commitInfo.committerEmail = commitInfoNode["CommitterEmail"].asString();
if(!commitInfoNode["CommitterName"].isNull())
result_.commitInfo.committerName = commitInfoNode["CommitterName"].asString();
auto allParentIds = commitInfoNode["ParentIds"]["ParentIds"];
for (auto value : allParentIds)
result_.commitInfo.parentIds.push_back(value.asString());
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string CreateBranchResult::getErrorCode()const
{
return errorCode_;
}
std::string CreateBranchResult::getErrorMessage()const
{
return errorMessage_;
}
bool CreateBranchResult::getSuccess()const
{
return success_;
}
CreateBranchResult::Result CreateBranchResult::getResult()const
{
return result_;
}

View File

@@ -0,0 +1,74 @@
/*
* 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/codeup/model/CreateMergeRequestRequest.h>
using AlibabaCloud::Codeup::Model::CreateMergeRequestRequest;
CreateMergeRequestRequest::CreateMergeRequestRequest() :
RoaServiceRequest("codeup", "2020-04-14")
{
setResourcePath("/api/v4/projects/[ProjectId]/merge_requests");
setMethod(HttpRequest::Method::Post);
}
CreateMergeRequestRequest::~CreateMergeRequestRequest()
{}
std::string CreateMergeRequestRequest::getOrganizationId()const
{
return organizationId_;
}
void CreateMergeRequestRequest::setOrganizationId(const std::string& organizationId)
{
organizationId_ = organizationId;
setParameter("OrganizationId", organizationId);
}
std::string CreateMergeRequestRequest::getSubUserId()const
{
return subUserId_;
}
void CreateMergeRequestRequest::setSubUserId(const std::string& subUserId)
{
subUserId_ = subUserId;
setParameter("SubUserId", subUserId);
}
std::string CreateMergeRequestRequest::getAccessToken()const
{
return accessToken_;
}
void CreateMergeRequestRequest::setAccessToken(const std::string& accessToken)
{
accessToken_ = accessToken;
setParameter("AccessToken", accessToken);
}
long CreateMergeRequestRequest::getProjectId()const
{
return projectId_;
}
void CreateMergeRequestRequest::setProjectId(long projectId)
{
projectId_ = projectId;
setParameter("ProjectId", std::to_string(projectId));
}

View File

@@ -0,0 +1,197 @@
/*
* 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/codeup/model/CreateMergeRequestResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Codeup;
using namespace AlibabaCloud::Codeup::Model;
CreateMergeRequestResult::CreateMergeRequestResult() :
ServiceResult()
{}
CreateMergeRequestResult::CreateMergeRequestResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateMergeRequestResult::~CreateMergeRequestResult()
{}
void CreateMergeRequestResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resultNode = value["Result"];
if(!resultNode["Id"].isNull())
result_.id = std::stol(resultNode["Id"].asString());
if(!resultNode["ProjectId"].isNull())
result_.projectId = std::stol(resultNode["ProjectId"].asString());
if(!resultNode["Title"].isNull())
result_.title = resultNode["Title"].asString();
if(!resultNode["Description"].isNull())
result_.description = resultNode["Description"].asString();
if(!resultNode["State"].isNull())
result_.state = resultNode["State"].asString();
if(!resultNode["MergeStatus"].isNull())
result_.mergeStatus = resultNode["MergeStatus"].asString();
if(!resultNode["CreatedAt"].isNull())
result_.createdAt = resultNode["CreatedAt"].asString();
if(!resultNode["UpdatedAt"].isNull())
result_.updatedAt = resultNode["UpdatedAt"].asString();
if(!resultNode["TargetBranch"].isNull())
result_.targetBranch = resultNode["TargetBranch"].asString();
if(!resultNode["SourceBranch"].isNull())
result_.sourceBranch = resultNode["SourceBranch"].asString();
if(!resultNode["WebUrl"].isNull())
result_.webUrl = resultNode["WebUrl"].asString();
if(!resultNode["AcceptedRevision"].isNull())
result_.acceptedRevision = resultNode["AcceptedRevision"].asString();
if(!resultNode["MergeError"].isNull())
result_.mergeError = resultNode["MergeError"].asString();
if(!resultNode["MergedRevision"].isNull())
result_.mergedRevision = resultNode["MergedRevision"].asString();
if(!resultNode["NameWithNamespace"].isNull())
result_.nameWithNamespace = resultNode["NameWithNamespace"].asString();
if(!resultNode["MergeType"].isNull())
result_.mergeType = resultNode["MergeType"].asString();
if(!resultNode["AheadCommitCount"].isNull())
result_.aheadCommitCount = std::stoi(resultNode["AheadCommitCount"].asString());
if(!resultNode["BehindCommitCount"].isNull())
result_.behindCommitCount = std::stoi(resultNode["BehindCommitCount"].asString());
auto allAssigneeListNode = resultNode["AssigneeList"]["AssigneeListItem"];
for (auto resultNodeAssigneeListAssigneeListItem : allAssigneeListNode)
{
Result::AssigneeListItem assigneeListItemObject;
if(!resultNodeAssigneeListAssigneeListItem["Id"].isNull())
assigneeListItemObject.id = resultNodeAssigneeListAssigneeListItem["Id"].asString();
if(!resultNodeAssigneeListAssigneeListItem["ExternUserId"].isNull())
assigneeListItemObject.externUserId = resultNodeAssigneeListAssigneeListItem["ExternUserId"].asString();
if(!resultNodeAssigneeListAssigneeListItem["AvatarUrl"].isNull())
assigneeListItemObject.avatarUrl = resultNodeAssigneeListAssigneeListItem["AvatarUrl"].asString();
if(!resultNodeAssigneeListAssigneeListItem["Name"].isNull())
assigneeListItemObject.name = resultNodeAssigneeListAssigneeListItem["Name"].asString();
result_.assigneeList.push_back(assigneeListItemObject);
}
auto authorNode = resultNode["Author"];
if(!authorNode["Id"].isNull())
result_.author.id = std::stol(authorNode["Id"].asString());
if(!authorNode["ExternUserId"].isNull())
result_.author.externUserId = authorNode["ExternUserId"].asString();
if(!authorNode["AvatarUrl"].isNull())
result_.author.avatarUrl = authorNode["AvatarUrl"].asString();
if(!authorNode["Name"].isNull())
result_.author.name = authorNode["Name"].asString();
auto approveCheckResultNode = resultNode["ApproveCheckResult"];
if(!approveCheckResultNode["TotalCheckResult"].isNull())
result_.approveCheckResult.totalCheckResult = approveCheckResultNode["TotalCheckResult"].asString();
auto allSatisfiedCheckResultsNode = approveCheckResultNode["SatisfiedCheckResults"]["SatisfiedCheckResultsItem"];
for (auto approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem : allSatisfiedCheckResultsNode)
{
Result::ApproveCheckResult::SatisfiedCheckResultsItem satisfiedCheckResultsItemObject;
if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckStatus"].isNull())
satisfiedCheckResultsItemObject.checkStatus = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckStatus"].asString();
if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckName"].isNull())
satisfiedCheckResultsItemObject.checkName = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckName"].asString();
if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckType"].isNull())
satisfiedCheckResultsItemObject.checkType = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckType"].asString();
auto allExtraUsersNode = allSatisfiedCheckResultsNode["ExtraUsers"]["ExtraUsersItem"];
for (auto allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem : allExtraUsersNode)
{
Result::ApproveCheckResult::SatisfiedCheckResultsItem::ExtraUsersItem extraUsersObject;
if(!allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Id"].isNull())
extraUsersObject.id = std::stol(allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Id"].asString());
if(!allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["ExternUserId"].isNull())
extraUsersObject.externUserId = allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["ExternUserId"].asString();
if(!allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["AvatarUrl"].isNull())
extraUsersObject.avatarUrl = allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["AvatarUrl"].asString();
if(!allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Name"].isNull())
extraUsersObject.name = allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Name"].asString();
satisfiedCheckResultsItemObject.extraUsers.push_back(extraUsersObject);
}
auto allSatisfiedItems = value["SatisfiedItems"]["SatisfiedItems"];
for (auto value : allSatisfiedItems)
satisfiedCheckResultsItemObject.satisfiedItems.push_back(value.asString());
auto allUnsatisfiedItems = value["UnsatisfiedItems"]["UnsatisfiedItems"];
for (auto value : allUnsatisfiedItems)
satisfiedCheckResultsItemObject.unsatisfiedItems.push_back(value.asString());
result_.approveCheckResult.satisfiedCheckResults.push_back(satisfiedCheckResultsItemObject);
}
auto allUnsatisfiedCheckResultsNode = approveCheckResultNode["UnsatisfiedCheckResults"]["UnsatisfiedCheckResultsItem"];
for (auto approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem : allUnsatisfiedCheckResultsNode)
{
Result::ApproveCheckResult::UnsatisfiedCheckResultsItem unsatisfiedCheckResultsItemObject;
if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckStatus"].isNull())
unsatisfiedCheckResultsItemObject.checkStatus = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckStatus"].asString();
if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckName"].isNull())
unsatisfiedCheckResultsItemObject.checkName = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckName"].asString();
if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckType"].isNull())
unsatisfiedCheckResultsItemObject.checkType = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckType"].asString();
auto allExtraUsers3Node = allUnsatisfiedCheckResultsNode["ExtraUsers"]["ExtraUsersItem"];
for (auto allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem : allExtraUsers3Node)
{
Result::ApproveCheckResult::UnsatisfiedCheckResultsItem::ExtraUsersItem4 extraUsers3Object;
if(!allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Id"].isNull())
extraUsers3Object.id = std::stol(allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Id"].asString());
if(!allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["ExternUserId"].isNull())
extraUsers3Object.externUserId = allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["ExternUserId"].asString();
if(!allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["AvatarUrl"].isNull())
extraUsers3Object.avatarUrl = allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["AvatarUrl"].asString();
if(!allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Name"].isNull())
extraUsers3Object.name = allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Name"].asString();
unsatisfiedCheckResultsItemObject.extraUsers3.push_back(extraUsers3Object);
}
auto allSatisfiedItems1 = value["SatisfiedItems"]["SatisfiedItems"];
for (auto value : allSatisfiedItems1)
unsatisfiedCheckResultsItemObject.satisfiedItems1.push_back(value.asString());
auto allUnsatisfiedItems2 = value["UnsatisfiedItems"]["UnsatisfiedItems"];
for (auto value : allUnsatisfiedItems2)
unsatisfiedCheckResultsItemObject.unsatisfiedItems2.push_back(value.asString());
result_.approveCheckResult.unsatisfiedCheckResults.push_back(unsatisfiedCheckResultsItemObject);
}
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string CreateMergeRequestResult::getErrorCode()const
{
return errorCode_;
}
std::string CreateMergeRequestResult::getErrorMessage()const
{
return errorMessage_;
}
bool CreateMergeRequestResult::getSuccess()const
{
return success_;
}
CreateMergeRequestResult::Result CreateMergeRequestResult::getResult()const
{
return result_;
}

View File

@@ -0,0 +1,74 @@
/*
* 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/codeup/model/CreateTagRequest.h>
using AlibabaCloud::Codeup::Model::CreateTagRequest;
CreateTagRequest::CreateTagRequest() :
RoaServiceRequest("codeup", "2020-04-14")
{
setResourcePath("/api/v3/projects/[ProjectId]/repository/tags");
setMethod(HttpRequest::Method::Post);
}
CreateTagRequest::~CreateTagRequest()
{}
std::string CreateTagRequest::getOrganizationId()const
{
return organizationId_;
}
void CreateTagRequest::setOrganizationId(const std::string& organizationId)
{
organizationId_ = organizationId;
setParameter("OrganizationId", organizationId);
}
std::string CreateTagRequest::getSubUserId()const
{
return subUserId_;
}
void CreateTagRequest::setSubUserId(const std::string& subUserId)
{
subUserId_ = subUserId;
setParameter("SubUserId", subUserId);
}
std::string CreateTagRequest::getAccessToken()const
{
return accessToken_;
}
void CreateTagRequest::setAccessToken(const std::string& accessToken)
{
accessToken_ = accessToken;
setParameter("AccessToken", accessToken);
}
long CreateTagRequest::getProjectId()const
{
return projectId_;
}
void CreateTagRequest::setProjectId(long projectId)
{
projectId_ = projectId;
setParameter("ProjectId", std::to_string(projectId));
}

View 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/codeup/model/CreateTagResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Codeup;
using namespace AlibabaCloud::Codeup::Model;
CreateTagResult::CreateTagResult() :
ServiceResult()
{}
CreateTagResult::CreateTagResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateTagResult::~CreateTagResult()
{}
void CreateTagResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resultNode = value["Result"];
if(!resultNode["Name"].isNull())
result_.name = resultNode["Name"].asString();
if(!resultNode["Message"].isNull())
result_.message = resultNode["Message"].asString();
auto commitInfoNode = resultNode["CommitInfo"];
if(!commitInfoNode["Id"].isNull())
result_.commitInfo.id = commitInfoNode["Id"].asString();
if(!commitInfoNode["ShortId"].isNull())
result_.commitInfo.shortId = commitInfoNode["ShortId"].asString();
if(!commitInfoNode["Title"].isNull())
result_.commitInfo.title = commitInfoNode["Title"].asString();
if(!commitInfoNode["AuthorName"].isNull())
result_.commitInfo.authorName = commitInfoNode["AuthorName"].asString();
if(!commitInfoNode["AuthorEmail"].isNull())
result_.commitInfo.authorEmail = commitInfoNode["AuthorEmail"].asString();
if(!commitInfoNode["AuthoredDate"].isNull())
result_.commitInfo.authoredDate = commitInfoNode["AuthoredDate"].asString();
if(!commitInfoNode["CommittedDate"].isNull())
result_.commitInfo.committedDate = commitInfoNode["CommittedDate"].asString();
if(!commitInfoNode["CommitterEmail"].isNull())
result_.commitInfo.committerEmail = commitInfoNode["CommitterEmail"].asString();
if(!commitInfoNode["CommitterName"].isNull())
result_.commitInfo.committerName = commitInfoNode["CommitterName"].asString();
if(!commitInfoNode["CreatedAt"].isNull())
result_.commitInfo.createdAt = commitInfoNode["CreatedAt"].asString();
if(!commitInfoNode["Message"].isNull())
result_.commitInfo.message = commitInfoNode["Message"].asString();
auto allParentIds = commitInfoNode["ParentIds"]["ParentIds"];
for (auto value : allParentIds)
result_.commitInfo.parentIds.push_back(value.asString());
auto releaseNode = resultNode["Release"];
if(!releaseNode["TagName"].isNull())
result_.release.tagName = releaseNode["TagName"].asString();
if(!releaseNode["Description"].isNull())
result_.release.description = releaseNode["Description"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string CreateTagResult::getErrorCode()const
{
return errorCode_;
}
std::string CreateTagResult::getErrorMessage()const
{
return errorMessage_;
}
bool CreateTagResult::getSuccess()const
{
return success_;
}
CreateTagResult::Result CreateTagResult::getResult()const
{
return result_;
}

View File

@@ -0,0 +1,85 @@
/*
* 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/codeup/model/DeleteBranchRequest.h>
using AlibabaCloud::Codeup::Model::DeleteBranchRequest;
DeleteBranchRequest::DeleteBranchRequest() :
RoaServiceRequest("codeup", "2020-04-14")
{
setResourcePath("/api/v3/projects/[ProjectId]/repository/branches/[BranchName]");
setMethod(HttpRequest::Method::Delete);
}
DeleteBranchRequest::~DeleteBranchRequest()
{}
std::string DeleteBranchRequest::getOrganizationId()const
{
return organizationId_;
}
void DeleteBranchRequest::setOrganizationId(const std::string& organizationId)
{
organizationId_ = organizationId;
setParameter("OrganizationId", organizationId);
}
std::string DeleteBranchRequest::getSubUserId()const
{
return subUserId_;
}
void DeleteBranchRequest::setSubUserId(const std::string& subUserId)
{
subUserId_ = subUserId;
setParameter("SubUserId", subUserId);
}
std::string DeleteBranchRequest::getAccessToken()const
{
return accessToken_;
}
void DeleteBranchRequest::setAccessToken(const std::string& accessToken)
{
accessToken_ = accessToken;
setParameter("AccessToken", accessToken);
}
long DeleteBranchRequest::getProjectId()const
{
return projectId_;
}
void DeleteBranchRequest::setProjectId(long projectId)
{
projectId_ = projectId;
setParameter("ProjectId", std::to_string(projectId));
}
std::string DeleteBranchRequest::getBranchName()const
{
return branchName_;
}
void DeleteBranchRequest::setBranchName(const std::string& branchName)
{
branchName_ = branchName;
setParameter("BranchName", branchName);
}

View File

@@ -0,0 +1,73 @@
/*
* 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/codeup/model/DeleteBranchResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Codeup;
using namespace AlibabaCloud::Codeup::Model;
DeleteBranchResult::DeleteBranchResult() :
ServiceResult()
{}
DeleteBranchResult::DeleteBranchResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteBranchResult::~DeleteBranchResult()
{}
void DeleteBranchResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resultNode = value["Result"];
if(!resultNode["BranchName"].isNull())
result_.branchName = resultNode["BranchName"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string DeleteBranchResult::getErrorCode()const
{
return errorCode_;
}
std::string DeleteBranchResult::getErrorMessage()const
{
return errorMessage_;
}
bool DeleteBranchResult::getSuccess()const
{
return success_;
}
DeleteBranchResult::Result DeleteBranchResult::getResult()const
{
return result_;
}

View File

@@ -21,8 +21,8 @@ using AlibabaCloud::Codeup::Model::DeleteRepositoryGroupRequest;
DeleteRepositoryGroupRequest::DeleteRepositoryGroupRequest() :
RoaServiceRequest("codeup", "2020-04-14")
{
setResourcePath("/api/v3/groups/[GroupId]");
setMethod(HttpRequest::Method::Delete);
setResourcePath("/api/v3/groups/[GroupId]/remove");
setMethod(HttpRequest::Method::Post);
}
DeleteRepositoryGroupRequest::~DeleteRepositoryGroupRequest()

View File

@@ -22,7 +22,7 @@ DeleteRepositoryRequest::DeleteRepositoryRequest() :
RoaServiceRequest("codeup", "2020-04-14")
{
setResourcePath("/api/v3/projects/[ProjectId]/remove");
setMethod(HttpRequest::Method::Delete);
setMethod(HttpRequest::Method::Post);
}
DeleteRepositoryRequest::~DeleteRepositoryRequest()

View File

@@ -0,0 +1,85 @@
/*
* 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/codeup/model/GetBranchInfoRequest.h>
using AlibabaCloud::Codeup::Model::GetBranchInfoRequest;
GetBranchInfoRequest::GetBranchInfoRequest() :
RoaServiceRequest("codeup", "2020-04-14")
{
setResourcePath("/api/v3/projects/[ProjectId]/repository/branches/[BranchName]");
setMethod(HttpRequest::Method::Get);
}
GetBranchInfoRequest::~GetBranchInfoRequest()
{}
std::string GetBranchInfoRequest::getOrganizationId()const
{
return organizationId_;
}
void GetBranchInfoRequest::setOrganizationId(const std::string& organizationId)
{
organizationId_ = organizationId;
setParameter("OrganizationId", organizationId);
}
std::string GetBranchInfoRequest::getSubUserId()const
{
return subUserId_;
}
void GetBranchInfoRequest::setSubUserId(const std::string& subUserId)
{
subUserId_ = subUserId;
setParameter("SubUserId", subUserId);
}
std::string GetBranchInfoRequest::getAccessToken()const
{
return accessToken_;
}
void GetBranchInfoRequest::setAccessToken(const std::string& accessToken)
{
accessToken_ = accessToken;
setParameter("AccessToken", accessToken);
}
long GetBranchInfoRequest::getProjectId()const
{
return projectId_;
}
void GetBranchInfoRequest::setProjectId(long projectId)
{
projectId_ = projectId;
setParameter("ProjectId", std::to_string(projectId));
}
std::string GetBranchInfoRequest::getBranchName()const
{
return branchName_;
}
void GetBranchInfoRequest::setBranchName(const std::string& branchName)
{
branchName_ = branchName;
setParameter("BranchName", branchName);
}

View File

@@ -0,0 +1,101 @@
/*
* 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/codeup/model/GetBranchInfoResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Codeup;
using namespace AlibabaCloud::Codeup::Model;
GetBranchInfoResult::GetBranchInfoResult() :
ServiceResult()
{}
GetBranchInfoResult::GetBranchInfoResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetBranchInfoResult::~GetBranchInfoResult()
{}
void GetBranchInfoResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resultNode = value["Result"];
if(!resultNode["BranchName"].isNull())
result_.branchName = resultNode["BranchName"].asString();
if(!resultNode["ProtectedBranch"].isNull())
result_.protectedBranch = resultNode["ProtectedBranch"].asString() == "true";
auto commitInfoNode = resultNode["CommitInfo"];
if(!commitInfoNode["Id"].isNull())
result_.commitInfo.id = commitInfoNode["Id"].asString();
if(!commitInfoNode["ShortId"].isNull())
result_.commitInfo.shortId = commitInfoNode["ShortId"].asString();
if(!commitInfoNode["Title"].isNull())
result_.commitInfo.title = commitInfoNode["Title"].asString();
if(!commitInfoNode["AuthorName"].isNull())
result_.commitInfo.authorName = commitInfoNode["AuthorName"].asString();
if(!commitInfoNode["AuthorEmail"].isNull())
result_.commitInfo.authorEmail = commitInfoNode["AuthorEmail"].asString();
if(!commitInfoNode["CreatedAt"].isNull())
result_.commitInfo.createdAt = commitInfoNode["CreatedAt"].asString();
if(!commitInfoNode["Message"].isNull())
result_.commitInfo.message = commitInfoNode["Message"].asString();
if(!commitInfoNode["AuthorDate"].isNull())
result_.commitInfo.authorDate = commitInfoNode["AuthorDate"].asString();
if(!commitInfoNode["CommittedDate"].isNull())
result_.commitInfo.committedDate = commitInfoNode["CommittedDate"].asString();
if(!commitInfoNode["CommitterEmail"].isNull())
result_.commitInfo.committerEmail = commitInfoNode["CommitterEmail"].asString();
if(!commitInfoNode["CommitterName"].isNull())
result_.commitInfo.committerName = commitInfoNode["CommitterName"].asString();
auto allParentIds = commitInfoNode["ParentIds"]["ParentIds"];
for (auto value : allParentIds)
result_.commitInfo.parentIds.push_back(value.asString());
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string GetBranchInfoResult::getErrorCode()const
{
return errorCode_;
}
std::string GetBranchInfoResult::getErrorMessage()const
{
return errorMessage_;
}
bool GetBranchInfoResult::getSuccess()const
{
return success_;
}
GetBranchInfoResult::Result GetBranchInfoResult::getResult()const
{
return result_;
}

View File

@@ -0,0 +1,85 @@
/*
* 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/codeup/model/GetProjectMemberRequest.h>
using AlibabaCloud::Codeup::Model::GetProjectMemberRequest;
GetProjectMemberRequest::GetProjectMemberRequest() :
RoaServiceRequest("codeup", "2020-04-14")
{
setResourcePath("/api/v3/projects/[ProjectId]/members/[UserId]");
setMethod(HttpRequest::Method::Get);
}
GetProjectMemberRequest::~GetProjectMemberRequest()
{}
std::string GetProjectMemberRequest::getOrganizationId()const
{
return organizationId_;
}
void GetProjectMemberRequest::setOrganizationId(const std::string& organizationId)
{
organizationId_ = organizationId;
setParameter("OrganizationId", organizationId);
}
std::string GetProjectMemberRequest::getSubUserId()const
{
return subUserId_;
}
void GetProjectMemberRequest::setSubUserId(const std::string& subUserId)
{
subUserId_ = subUserId;
setParameter("SubUserId", subUserId);
}
std::string GetProjectMemberRequest::getAccessToken()const
{
return accessToken_;
}
void GetProjectMemberRequest::setAccessToken(const std::string& accessToken)
{
accessToken_ = accessToken;
setParameter("AccessToken", accessToken);
}
long GetProjectMemberRequest::getProjectId()const
{
return projectId_;
}
void GetProjectMemberRequest::setProjectId(long projectId)
{
projectId_ = projectId;
setParameter("ProjectId", std::to_string(projectId));
}
long GetProjectMemberRequest::getUserId()const
{
return userId_;
}
void GetProjectMemberRequest::setUserId(long userId)
{
userId_ = userId;
setParameter("UserId", std::to_string(userId));
}

View File

@@ -0,0 +1,81 @@
/*
* 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/codeup/model/GetProjectMemberResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Codeup;
using namespace AlibabaCloud::Codeup::Model;
GetProjectMemberResult::GetProjectMemberResult() :
ServiceResult()
{}
GetProjectMemberResult::GetProjectMemberResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetProjectMemberResult::~GetProjectMemberResult()
{}
void GetProjectMemberResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resultNode = value["Result"];
if(!resultNode["Id"].isNull())
result_.id = std::stol(resultNode["Id"].asString());
if(!resultNode["ExternUserId"].isNull())
result_.externUserId = resultNode["ExternUserId"].asString();
if(!resultNode["AvatarUrl"].isNull())
result_.avatarUrl = resultNode["AvatarUrl"].asString();
if(!resultNode["Name"].isNull())
result_.name = resultNode["Name"].asString();
if(!resultNode["AccessLevel"].isNull())
result_.accessLevel = std::stoi(resultNode["AccessLevel"].asString());
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string GetProjectMemberResult::getErrorCode()const
{
return errorCode_;
}
std::string GetProjectMemberResult::getErrorMessage()const
{
return errorMessage_;
}
bool GetProjectMemberResult::getSuccess()const
{
return success_;
}
GetProjectMemberResult::Result GetProjectMemberResult::getResult()const
{
return result_;
}

View File

@@ -0,0 +1,63 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/GetRepositoryInfoRequest.h>
using AlibabaCloud::Codeup::Model::GetRepositoryInfoRequest;
GetRepositoryInfoRequest::GetRepositoryInfoRequest() :
RoaServiceRequest("codeup", "2020-04-14")
{
setResourcePath("/api/v3/projects/info");
setMethod(HttpRequest::Method::Get);
}
GetRepositoryInfoRequest::~GetRepositoryInfoRequest()
{}
std::string GetRepositoryInfoRequest::getOrganizationId()const
{
return organizationId_;
}
void GetRepositoryInfoRequest::setOrganizationId(const std::string& organizationId)
{
organizationId_ = organizationId;
setParameter("OrganizationId", organizationId);
}
std::string GetRepositoryInfoRequest::getIdentity()const
{
return identity_;
}
void GetRepositoryInfoRequest::setIdentity(const std::string& identity)
{
identity_ = identity;
setParameter("Identity", identity);
}
std::string GetRepositoryInfoRequest::getAccessToken()const
{
return accessToken_;
}
void GetRepositoryInfoRequest::setAccessToken(const std::string& accessToken)
{
accessToken_ = accessToken;
setParameter("AccessToken", accessToken);
}

View File

@@ -0,0 +1,148 @@
/*
* 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/codeup/model/GetRepositoryInfoResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Codeup;
using namespace AlibabaCloud::Codeup::Model;
GetRepositoryInfoResult::GetRepositoryInfoResult() :
ServiceResult()
{}
GetRepositoryInfoResult::GetRepositoryInfoResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetRepositoryInfoResult::~GetRepositoryInfoResult()
{}
void GetRepositoryInfoResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resultNode = value["Result"];
if(!resultNode["Id"].isNull())
result_.id = std::stol(resultNode["Id"].asString());
if(!resultNode["SshUrlToRepo"].isNull())
result_.sshUrlToRepo = resultNode["SshUrlToRepo"].asString();
if(!resultNode["Description"].isNull())
result_.description = resultNode["Description"].asString();
if(!resultNode["DefaultBranch"].isNull())
result_.defaultBranch = resultNode["DefaultBranch"].asString();
if(!resultNode["Public"].isNull())
result_._public = resultNode["Public"].asString() == "true";
if(!resultNode["VisibilityLevel"].isNull())
result_.visibilityLevel = resultNode["VisibilityLevel"].asString();
if(!resultNode["HttpUrlToRepo"].isNull())
result_.httpUrlToRepo = resultNode["HttpUrlToRepo"].asString();
if(!resultNode["WebUrl"].isNull())
result_.webUrl = resultNode["WebUrl"].asString();
if(!resultNode["Name"].isNull())
result_.name = resultNode["Name"].asString();
if(!resultNode["NameWithNamespace"].isNull())
result_.nameWithNamespace = resultNode["NameWithNamespace"].asString();
if(!resultNode["Path"].isNull())
result_.path = resultNode["Path"].asString();
if(!resultNode["PathWithNamespace"].isNull())
result_.pathWithNamespace = resultNode["PathWithNamespace"].asString();
if(!resultNode["CreatedAt"].isNull())
result_.createdAt = resultNode["CreatedAt"].asString();
if(!resultNode["LastActivityAt"].isNull())
result_.lastActivityAt = resultNode["LastActivityAt"].asString();
if(!resultNode["CreatorId"].isNull())
result_.creatorId = std::stol(resultNode["CreatorId"].asString());
if(!resultNode["Archive"].isNull())
result_.archive = resultNode["Archive"].asString() == "true";
if(!resultNode["AvatarUrl"].isNull())
result_.avatarUrl = resultNode["AvatarUrl"].asString();
if(!resultNode["DemoProjectStatus"].isNull())
result_.demoProjectStatus = resultNode["DemoProjectStatus"].asString() == "true";
if(!resultNode["AccessLevel"].isNull())
result_.accessLevel = std::stoi(resultNode["AccessLevel"].asString());
if(!resultNode["ImportStatus"].isNull())
result_.importStatus = resultNode["ImportStatus"].asString();
if(!resultNode["ImportUrl"].isNull())
result_.importUrl = resultNode["ImportUrl"].asString();
if(!resultNode["ImportFromSubversion"].isNull())
result_.importFromSubversion = resultNode["ImportFromSubversion"].asString() == "true";
auto _namespaceNode = resultNode["Namespace"];
if(!_namespaceNode["Id"].isNull())
result_._namespace.id = std::stol(_namespaceNode["Id"].asString());
if(!_namespaceNode["Name"].isNull())
result_._namespace.name = _namespaceNode["Name"].asString();
if(!_namespaceNode["Path"].isNull())
result_._namespace.path = _namespaceNode["Path"].asString();
if(!_namespaceNode["OwnerId"].isNull())
result_._namespace.ownerId = std::stol(_namespaceNode["OwnerId"].asString());
if(!_namespaceNode["CreatedAt"].isNull())
result_._namespace.createdAt = _namespaceNode["CreatedAt"].asString();
if(!_namespaceNode["UpdatedAt"].isNull())
result_._namespace.updatedAt = _namespaceNode["UpdatedAt"].asString();
if(!_namespaceNode["Description"].isNull())
result_._namespace.description = _namespaceNode["Description"].asString();
if(!_namespaceNode["State"].isNull())
result_._namespace.state = _namespaceNode["State"].asString();
if(!_namespaceNode["Avatar"].isNull())
result_._namespace.avatar = _namespaceNode["Avatar"].asString();
if(!_namespaceNode["Public"].isNull())
result_._namespace._public = _namespaceNode["Public"].asString() == "true";
if(!_namespaceNode["VisibilityLevel"].isNull())
result_._namespace.visibilityLevel = _namespaceNode["VisibilityLevel"].asString();
auto permissionsNode = resultNode["Permissions"];
auto projectAccessNode = permissionsNode["ProjectAccess"];
if(!projectAccessNode["AccessLevel"].isNull())
result_.permissions.projectAccess.accessLevel = std::stoi(projectAccessNode["AccessLevel"].asString());
auto groupAccessNode = permissionsNode["GroupAccess"];
if(!groupAccessNode["AccessLevel"].isNull())
result_.permissions.groupAccess.accessLevel = std::stoi(groupAccessNode["AccessLevel"].asString());
auto allTagList = resultNode["TagList"]["TagList"];
for (auto value : allTagList)
result_.tagList.push_back(value.asString());
if(!value["ErrorCode"].isNull())
errorCode_ = std::stoi(value["ErrorCode"].asString());
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
int GetRepositoryInfoResult::getErrorCode()const
{
return errorCode_;
}
std::string GetRepositoryInfoResult::getErrorMessage()const
{
return errorMessage_;
}
bool GetRepositoryInfoResult::getSuccess()const
{
return success_;
}
GetRepositoryInfoResult::Result GetRepositoryInfoResult::getResult()const
{
return result_;
}

View File

@@ -0,0 +1,118 @@
/*
* 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/codeup/model/ListGroupRepositoriesRequest.h>
using AlibabaCloud::Codeup::Model::ListGroupRepositoriesRequest;
ListGroupRepositoriesRequest::ListGroupRepositoriesRequest() :
RoaServiceRequest("codeup", "2020-04-14")
{
setResourcePath("/api/v3/groups/[Identity]/projects");
setMethod(HttpRequest::Method::Get);
}
ListGroupRepositoriesRequest::~ListGroupRepositoriesRequest()
{}
std::string ListGroupRepositoriesRequest::getAccessToken()const
{
return accessToken_;
}
void ListGroupRepositoriesRequest::setAccessToken(const std::string& accessToken)
{
accessToken_ = accessToken;
setParameter("AccessToken", accessToken);
}
bool ListGroupRepositoriesRequest::getIsMember()const
{
return isMember_;
}
void ListGroupRepositoriesRequest::setIsMember(bool isMember)
{
isMember_ = isMember;
setParameter("IsMember", isMember ? "true" : "false");
}
std::string ListGroupRepositoriesRequest::getOrganizationId()const
{
return organizationId_;
}
void ListGroupRepositoriesRequest::setOrganizationId(const std::string& organizationId)
{
organizationId_ = organizationId;
setParameter("OrganizationId", organizationId);
}
std::string ListGroupRepositoriesRequest::getSearch()const
{
return search_;
}
void ListGroupRepositoriesRequest::setSearch(const std::string& search)
{
search_ = search;
setParameter("Search", search);
}
std::string ListGroupRepositoriesRequest::getSubUserId()const
{
return subUserId_;
}
void ListGroupRepositoriesRequest::setSubUserId(const std::string& subUserId)
{
subUserId_ = subUserId;
setParameter("SubUserId", subUserId);
}
std::string ListGroupRepositoriesRequest::getIdentity()const
{
return identity_;
}
void ListGroupRepositoriesRequest::setIdentity(const std::string& identity)
{
identity_ = identity;
setParameter("Identity", identity);
}
long ListGroupRepositoriesRequest::getPageSize()const
{
return pageSize_;
}
void ListGroupRepositoriesRequest::setPageSize(long pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
long ListGroupRepositoriesRequest::getPage()const
{
return page_;
}
void ListGroupRepositoriesRequest::setPage(long page)
{
page_ = page;
setParameter("Page", std::to_string(page));
}

View File

@@ -0,0 +1,108 @@
/*
* 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/codeup/model/ListGroupRepositoriesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Codeup;
using namespace AlibabaCloud::Codeup::Model;
ListGroupRepositoriesResult::ListGroupRepositoriesResult() :
ServiceResult()
{}
ListGroupRepositoriesResult::ListGroupRepositoriesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListGroupRepositoriesResult::~ListGroupRepositoriesResult()
{}
void ListGroupRepositoriesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allResultNode = value["Result"]["ResultItem"];
for (auto valueResultResultItem : allResultNode)
{
ResultItem resultObject;
if(!valueResultResultItem["Archive"].isNull())
resultObject.archive = valueResultResultItem["Archive"].asString() == "true";
if(!valueResultResultItem["CreatedAt"].isNull())
resultObject.createdAt = valueResultResultItem["CreatedAt"].asString();
if(!valueResultResultItem["UpdatedAt"].isNull())
resultObject.updatedAt = valueResultResultItem["UpdatedAt"].asString();
if(!valueResultResultItem["LastActivityAt"].isNull())
resultObject.lastActivityAt = valueResultResultItem["LastActivityAt"].asString();
if(!valueResultResultItem["Id"].isNull())
resultObject.id = std::stol(valueResultResultItem["Id"].asString());
if(!valueResultResultItem["CreatorId"].isNull())
resultObject.creatorId = std::stol(valueResultResultItem["CreatorId"].asString());
if(!valueResultResultItem["Name"].isNull())
resultObject.name = valueResultResultItem["Name"].asString();
if(!valueResultResultItem["NameWithNamespace"].isNull())
resultObject.nameWithNamespace = valueResultResultItem["NameWithNamespace"].asString();
if(!valueResultResultItem["Path"].isNull())
resultObject.path = valueResultResultItem["Path"].asString();
if(!valueResultResultItem["PathWithNamespace"].isNull())
resultObject.pathWithNamespace = valueResultResultItem["PathWithNamespace"].asString();
if(!valueResultResultItem["NamespaceId"].isNull())
resultObject.namespaceId = std::stol(valueResultResultItem["NamespaceId"].asString());
if(!valueResultResultItem["HttpCloneUrl"].isNull())
resultObject.httpCloneUrl = valueResultResultItem["HttpCloneUrl"].asString();
if(!valueResultResultItem["SshCloneUrl"].isNull())
resultObject.sshCloneUrl = valueResultResultItem["SshCloneUrl"].asString();
if(!valueResultResultItem["VisibilityLevel"].isNull())
resultObject.visibilityLevel = std::stoi(valueResultResultItem["VisibilityLevel"].asString());
if(!valueResultResultItem["WebUrl"].isNull())
resultObject.webUrl = valueResultResultItem["WebUrl"].asString();
if(!valueResultResultItem["ImportStatus"].isNull())
resultObject.importStatus = valueResultResultItem["ImportStatus"].asString();
result_.push_back(resultObject);
}
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string ListGroupRepositoriesResult::getErrorCode()const
{
return errorCode_;
}
std::string ListGroupRepositoriesResult::getErrorMessage()const
{
return errorMessage_;
}
bool ListGroupRepositoriesResult::getSuccess()const
{
return success_;
}
std::vector<ListGroupRepositoriesResult::ResultItem> ListGroupRepositoriesResult::getResult()const
{
return result_;
}

View File

@@ -0,0 +1,107 @@
/*
* 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/codeup/model/ListGroupsRequest.h>
using AlibabaCloud::Codeup::Model::ListGroupsRequest;
ListGroupsRequest::ListGroupsRequest() :
RoaServiceRequest("codeup", "2020-04-14")
{
setResourcePath("/api/v3/groups/all");
setMethod(HttpRequest::Method::Get);
}
ListGroupsRequest::~ListGroupsRequest()
{}
std::string ListGroupsRequest::getOrganizationId()const
{
return organizationId_;
}
void ListGroupsRequest::setOrganizationId(const std::string& organizationId)
{
organizationId_ = organizationId;
setParameter("OrganizationId", organizationId);
}
bool ListGroupsRequest::getIncludePersonal()const
{
return includePersonal_;
}
void ListGroupsRequest::setIncludePersonal(bool includePersonal)
{
includePersonal_ = includePersonal;
setParameter("IncludePersonal", includePersonal ? "true" : "false");
}
std::string ListGroupsRequest::getSearch()const
{
return search_;
}
void ListGroupsRequest::setSearch(const std::string& search)
{
search_ = search;
setParameter("Search", search);
}
std::string ListGroupsRequest::getSubUserId()const
{
return subUserId_;
}
void ListGroupsRequest::setSubUserId(const std::string& subUserId)
{
subUserId_ = subUserId;
setParameter("SubUserId", subUserId);
}
long ListGroupsRequest::getPageSize()const
{
return pageSize_;
}
void ListGroupsRequest::setPageSize(long pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
std::string ListGroupsRequest::getAccessToken()const
{
return accessToken_;
}
void ListGroupsRequest::setAccessToken(const std::string& accessToken)
{
accessToken_ = accessToken;
setParameter("AccessToken", accessToken);
}
long ListGroupsRequest::getPage()const
{
return page_;
}
void ListGroupsRequest::setPage(long page)
{
page_ = page;
setParameter("Page", std::to_string(page));
}

View File

@@ -0,0 +1,104 @@
/*
* 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/codeup/model/ListGroupsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Codeup;
using namespace AlibabaCloud::Codeup::Model;
ListGroupsResult::ListGroupsResult() :
ServiceResult()
{}
ListGroupsResult::ListGroupsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListGroupsResult::~ListGroupsResult()
{}
void ListGroupsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allResultNode = value["Result"]["ResultItem"];
for (auto valueResultResultItem : allResultNode)
{
ResultItem resultObject;
if(!valueResultResultItem["Id"].isNull())
resultObject.id = std::stol(valueResultResultItem["Id"].asString());
if(!valueResultResultItem["CreatedAt"].isNull())
resultObject.createdAt = valueResultResultItem["CreatedAt"].asString();
if(!valueResultResultItem["UpdatedAt"].isNull())
resultObject.updatedAt = valueResultResultItem["UpdatedAt"].asString();
if(!valueResultResultItem["AccessLevel"].isNull())
resultObject.accessLevel = std::stoi(valueResultResultItem["AccessLevel"].asString());
if(!valueResultResultItem["Description"].isNull())
resultObject.description = valueResultResultItem["Description"].asString();
if(!valueResultResultItem["Name"].isNull())
resultObject.name = valueResultResultItem["Name"].asString();
if(!valueResultResultItem["NameWithNamespace"].isNull())
resultObject.nameWithNamespace = valueResultResultItem["NameWithNamespace"].asString();
if(!valueResultResultItem["OwnerId"].isNull())
resultObject.ownerId = std::stol(valueResultResultItem["OwnerId"].asString());
if(!valueResultResultItem["ParentId"].isNull())
resultObject.parentId = std::stol(valueResultResultItem["ParentId"].asString());
if(!valueResultResultItem["Path"].isNull())
resultObject.path = valueResultResultItem["Path"].asString();
if(!valueResultResultItem["PathWithNamespace"].isNull())
resultObject.pathWithNamespace = valueResultResultItem["PathWithNamespace"].asString();
if(!valueResultResultItem["Type"].isNull())
resultObject.type = valueResultResultItem["Type"].asString();
if(!valueResultResultItem["VisibilityLevel"].isNull())
resultObject.visibilityLevel = valueResultResultItem["VisibilityLevel"].asString();
if(!valueResultResultItem["WebUrl"].isNull())
resultObject.webUrl = valueResultResultItem["WebUrl"].asString();
result_.push_back(resultObject);
}
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string ListGroupsResult::getErrorCode()const
{
return errorCode_;
}
std::string ListGroupsResult::getErrorMessage()const
{
return errorMessage_;
}
bool ListGroupsResult::getSuccess()const
{
return success_;
}
std::vector<ListGroupsResult::ResultItem> ListGroupsResult::getResult()const
{
return result_;
}

View File

@@ -0,0 +1,85 @@
/*
* 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/codeup/model/MergeMergeRequestRequest.h>
using AlibabaCloud::Codeup::Model::MergeMergeRequestRequest;
MergeMergeRequestRequest::MergeMergeRequestRequest() :
RoaServiceRequest("codeup", "2020-04-14")
{
setResourcePath("/api/v3/projects/[ProjectId]/merge_request/[MergeRequestId]/merge");
setMethod(HttpRequest::Method::Put);
}
MergeMergeRequestRequest::~MergeMergeRequestRequest()
{}
std::string MergeMergeRequestRequest::getOrganizationId()const
{
return organizationId_;
}
void MergeMergeRequestRequest::setOrganizationId(const std::string& organizationId)
{
organizationId_ = organizationId;
setParameter("OrganizationId", organizationId);
}
std::string MergeMergeRequestRequest::getSubUserId()const
{
return subUserId_;
}
void MergeMergeRequestRequest::setSubUserId(const std::string& subUserId)
{
subUserId_ = subUserId;
setParameter("SubUserId", subUserId);
}
long MergeMergeRequestRequest::getMergeRequestId()const
{
return mergeRequestId_;
}
void MergeMergeRequestRequest::setMergeRequestId(long mergeRequestId)
{
mergeRequestId_ = mergeRequestId;
setParameter("MergeRequestId", std::to_string(mergeRequestId));
}
std::string MergeMergeRequestRequest::getAccessToken()const
{
return accessToken_;
}
void MergeMergeRequestRequest::setAccessToken(const std::string& accessToken)
{
accessToken_ = accessToken;
setParameter("AccessToken", accessToken);
}
long MergeMergeRequestRequest::getProjectId()const
{
return projectId_;
}
void MergeMergeRequestRequest::setProjectId(long projectId)
{
projectId_ = projectId;
setParameter("ProjectId", std::to_string(projectId));
}

View File

@@ -0,0 +1,197 @@
/*
* 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/codeup/model/MergeMergeRequestResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Codeup;
using namespace AlibabaCloud::Codeup::Model;
MergeMergeRequestResult::MergeMergeRequestResult() :
ServiceResult()
{}
MergeMergeRequestResult::MergeMergeRequestResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
MergeMergeRequestResult::~MergeMergeRequestResult()
{}
void MergeMergeRequestResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resultNode = value["Result"];
if(!resultNode["Id"].isNull())
result_.id = std::stol(resultNode["Id"].asString());
if(!resultNode["ProjectId"].isNull())
result_.projectId = std::stol(resultNode["ProjectId"].asString());
if(!resultNode["Title"].isNull())
result_.title = resultNode["Title"].asString();
if(!resultNode["Description"].isNull())
result_.description = resultNode["Description"].asString();
if(!resultNode["State"].isNull())
result_.state = resultNode["State"].asString();
if(!resultNode["MergeStatus"].isNull())
result_.mergeStatus = resultNode["MergeStatus"].asString();
if(!resultNode["CreatedAt"].isNull())
result_.createdAt = resultNode["CreatedAt"].asString();
if(!resultNode["UpdatedAt"].isNull())
result_.updatedAt = resultNode["UpdatedAt"].asString();
if(!resultNode["TargetBranch"].isNull())
result_.targetBranch = resultNode["TargetBranch"].asString();
if(!resultNode["SourceBranch"].isNull())
result_.sourceBranch = resultNode["SourceBranch"].asString();
if(!resultNode["WebUrl"].isNull())
result_.webUrl = resultNode["WebUrl"].asString();
if(!resultNode["AcceptedRevision"].isNull())
result_.acceptedRevision = resultNode["AcceptedRevision"].asString();
if(!resultNode["MergeError"].isNull())
result_.mergeError = resultNode["MergeError"].asString();
if(!resultNode["MergedRevision"].isNull())
result_.mergedRevision = resultNode["MergedRevision"].asString();
if(!resultNode["NameWithNamespace"].isNull())
result_.nameWithNamespace = resultNode["NameWithNamespace"].asString();
if(!resultNode["MergeType"].isNull())
result_.mergeType = resultNode["MergeType"].asString();
if(!resultNode["AheadCommitCount"].isNull())
result_.aheadCommitCount = std::stoi(resultNode["AheadCommitCount"].asString());
if(!resultNode["BehindCommitCount"].isNull())
result_.behindCommitCount = std::stoi(resultNode["BehindCommitCount"].asString());
auto allAssigneeListNode = resultNode["AssigneeList"]["AssigneeListItem"];
for (auto resultNodeAssigneeListAssigneeListItem : allAssigneeListNode)
{
Result::AssigneeListItem assigneeListItemObject;
if(!resultNodeAssigneeListAssigneeListItem["Id"].isNull())
assigneeListItemObject.id = resultNodeAssigneeListAssigneeListItem["Id"].asString();
if(!resultNodeAssigneeListAssigneeListItem["ExternUserId"].isNull())
assigneeListItemObject.externUserId = resultNodeAssigneeListAssigneeListItem["ExternUserId"].asString();
if(!resultNodeAssigneeListAssigneeListItem["AvatarUrl"].isNull())
assigneeListItemObject.avatarUrl = resultNodeAssigneeListAssigneeListItem["AvatarUrl"].asString();
if(!resultNodeAssigneeListAssigneeListItem["Name"].isNull())
assigneeListItemObject.name = resultNodeAssigneeListAssigneeListItem["Name"].asString();
result_.assigneeList.push_back(assigneeListItemObject);
}
auto authorNode = resultNode["Author"];
if(!authorNode["Id"].isNull())
result_.author.id = std::stol(authorNode["Id"].asString());
if(!authorNode["ExternUserId"].isNull())
result_.author.externUserId = authorNode["ExternUserId"].asString();
if(!authorNode["AvatarUrl"].isNull())
result_.author.avatarUrl = authorNode["AvatarUrl"].asString();
if(!authorNode["Name"].isNull())
result_.author.name = authorNode["Name"].asString();
auto approveCheckResultNode = resultNode["ApproveCheckResult"];
if(!approveCheckResultNode["TotalCheckResult"].isNull())
result_.approveCheckResult.totalCheckResult = approveCheckResultNode["TotalCheckResult"].asString();
auto allSatisfiedCheckResultsNode = approveCheckResultNode["SatisfiedCheckResults"]["SatisfiedCheckResultsItem"];
for (auto approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem : allSatisfiedCheckResultsNode)
{
Result::ApproveCheckResult::SatisfiedCheckResultsItem satisfiedCheckResultsItemObject;
if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckStatus"].isNull())
satisfiedCheckResultsItemObject.checkStatus = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckStatus"].asString();
if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckName"].isNull())
satisfiedCheckResultsItemObject.checkName = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckName"].asString();
if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckType"].isNull())
satisfiedCheckResultsItemObject.checkType = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckType"].asString();
auto allExtraUsersNode = allSatisfiedCheckResultsNode["ExtraUsers"]["ExtraUsersItem"];
for (auto allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem : allExtraUsersNode)
{
Result::ApproveCheckResult::SatisfiedCheckResultsItem::ExtraUsersItem extraUsersObject;
if(!allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Id"].isNull())
extraUsersObject.id = std::stol(allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Id"].asString());
if(!allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["ExternUserId"].isNull())
extraUsersObject.externUserId = allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["ExternUserId"].asString();
if(!allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["AvatarUrl"].isNull())
extraUsersObject.avatarUrl = allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["AvatarUrl"].asString();
if(!allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Name"].isNull())
extraUsersObject.name = allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Name"].asString();
satisfiedCheckResultsItemObject.extraUsers.push_back(extraUsersObject);
}
auto allSatisfiedItems = value["SatisfiedItems"]["SatisfiedItems"];
for (auto value : allSatisfiedItems)
satisfiedCheckResultsItemObject.satisfiedItems.push_back(value.asString());
auto allUnsatisfiedItems = value["UnsatisfiedItems"]["UnsatisfiedItems"];
for (auto value : allUnsatisfiedItems)
satisfiedCheckResultsItemObject.unsatisfiedItems.push_back(value.asString());
result_.approveCheckResult.satisfiedCheckResults.push_back(satisfiedCheckResultsItemObject);
}
auto allUnsatisfiedCheckResultsNode = approveCheckResultNode["UnsatisfiedCheckResults"]["UnsatisfiedCheckResultsItem"];
for (auto approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem : allUnsatisfiedCheckResultsNode)
{
Result::ApproveCheckResult::UnsatisfiedCheckResultsItem unsatisfiedCheckResultsItemObject;
if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckStatus"].isNull())
unsatisfiedCheckResultsItemObject.checkStatus = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckStatus"].asString();
if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckName"].isNull())
unsatisfiedCheckResultsItemObject.checkName = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckName"].asString();
if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckType"].isNull())
unsatisfiedCheckResultsItemObject.checkType = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckType"].asString();
auto allExtraUsers3Node = allUnsatisfiedCheckResultsNode["ExtraUsers"]["ExtraUsersItem"];
for (auto allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem : allExtraUsers3Node)
{
Result::ApproveCheckResult::UnsatisfiedCheckResultsItem::ExtraUsersItem4 extraUsers3Object;
if(!allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Id"].isNull())
extraUsers3Object.id = std::stol(allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Id"].asString());
if(!allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["ExternUserId"].isNull())
extraUsers3Object.externUserId = allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["ExternUserId"].asString();
if(!allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["AvatarUrl"].isNull())
extraUsers3Object.avatarUrl = allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["AvatarUrl"].asString();
if(!allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Name"].isNull())
extraUsers3Object.name = allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Name"].asString();
unsatisfiedCheckResultsItemObject.extraUsers3.push_back(extraUsers3Object);
}
auto allSatisfiedItems1 = value["SatisfiedItems"]["SatisfiedItems"];
for (auto value : allSatisfiedItems1)
unsatisfiedCheckResultsItemObject.satisfiedItems1.push_back(value.asString());
auto allUnsatisfiedItems2 = value["UnsatisfiedItems"]["UnsatisfiedItems"];
for (auto value : allUnsatisfiedItems2)
unsatisfiedCheckResultsItemObject.unsatisfiedItems2.push_back(value.asString());
result_.approveCheckResult.unsatisfiedCheckResults.push_back(unsatisfiedCheckResultsItemObject);
}
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string MergeMergeRequestResult::getErrorCode()const
{
return errorCode_;
}
std::string MergeMergeRequestResult::getErrorMessage()const
{
return errorMessage_;
}
bool MergeMergeRequestResult::getSuccess()const
{
return success_;
}
MergeMergeRequestResult::Result MergeMergeRequestResult::getResult()const
{
return result_;
}