From 48995933778b3dfcf94695c066302f9113a0d9d3 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Sun, 7 Feb 2021 09:05:00 +0000 Subject: [PATCH] Support some MergeRequest API. --- CHANGELOG | 3 + codeup/CMakeLists.txt | 40 ++ .../alibabacloud/codeup/CodeupClient.h | 80 ++++ .../codeup/model/AcceptMergeRequestRequest.h | 57 +++ .../codeup/model/AcceptMergeRequestResult.h | 133 +++++++ .../model/CreateMergeRequestCommentRequest.h | 57 +++ .../model/CreateMergeRequestCommentResult.h | 82 ++++ .../GetMergeRequestApproveStatusRequest.h | 57 +++ .../GetMergeRequestApproveStatusResult.h | 62 +++ .../model/GetMergeRequestDetailRequest.h | 57 +++ .../model/GetMergeRequestDetailResult.h | 136 +++++++ .../model/GetMergeRequestSettingRequest.h | 54 +++ .../model/GetMergeRequestSettingResult.h | 62 +++ .../model/ListMergeRequestCommentsRequest.h | 63 +++ .../model/ListMergeRequestCommentsResult.h | 84 ++++ .../codeup/model/ListMergeRequestsResult.h | 3 + .../model/ListRepositoryCommitsRequest.h | 72 ++++ .../model/ListRepositoryCommitsResult.h | 80 ++++ .../codeup/model/ListRepositoryMemberResult.h | 2 + .../model/UpdateMergeRequestCommentRequest.h | 60 +++ .../model/UpdateMergeRequestCommentResult.h | 61 +++ .../codeup/model/UpdateMergeRequestRequest.h | 57 +++ .../codeup/model/UpdateMergeRequestResult.h | 133 +++++++ .../model/UpdateMergeRequestSettingRequest.h | 54 +++ .../model/UpdateMergeRequestSettingResult.h | 61 +++ codeup/src/CodeupClient.cc | 360 ++++++++++++++++++ codeup/src/model/AcceptMergeRequestRequest.cc | 74 ++++ codeup/src/model/AcceptMergeRequestResult.cc | 197 ++++++++++ .../model/CreateMergeRequestCommentRequest.cc | 74 ++++ .../model/CreateMergeRequestCommentResult.cc | 108 ++++++ .../GetMergeRequestApproveStatusRequest.cc | 74 ++++ .../GetMergeRequestApproveStatusResult.cc | 75 ++++ .../src/model/GetMergeRequestDetailRequest.cc | 74 ++++ .../src/model/GetMergeRequestDetailResult.cc | 203 ++++++++++ .../model/GetMergeRequestSettingRequest.cc | 63 +++ .../src/model/GetMergeRequestSettingResult.cc | 76 ++++ .../model/ListMergeRequestCommentsRequest.cc | 96 +++++ .../model/ListMergeRequestCommentsResult.cc | 120 ++++++ codeup/src/model/ListMergeRequestsResult.cc | 6 + .../src/model/ListRepositoryCommitsRequest.cc | 129 +++++++ .../src/model/ListRepositoryCommitsResult.cc | 113 ++++++ .../src/model/ListRepositoryMemberResult.cc | 4 + .../model/UpdateMergeRequestCommentRequest.cc | 85 +++++ .../model/UpdateMergeRequestCommentResult.cc | 73 ++++ codeup/src/model/UpdateMergeRequestRequest.cc | 74 ++++ codeup/src/model/UpdateMergeRequestResult.cc | 197 ++++++++++ .../model/UpdateMergeRequestSettingRequest.cc | 63 +++ .../model/UpdateMergeRequestSettingResult.cc | 73 ++++ 48 files changed, 4021 insertions(+) create mode 100644 codeup/include/alibabacloud/codeup/model/AcceptMergeRequestRequest.h create mode 100644 codeup/include/alibabacloud/codeup/model/AcceptMergeRequestResult.h create mode 100644 codeup/include/alibabacloud/codeup/model/CreateMergeRequestCommentRequest.h create mode 100644 codeup/include/alibabacloud/codeup/model/CreateMergeRequestCommentResult.h create mode 100644 codeup/include/alibabacloud/codeup/model/GetMergeRequestApproveStatusRequest.h create mode 100644 codeup/include/alibabacloud/codeup/model/GetMergeRequestApproveStatusResult.h create mode 100644 codeup/include/alibabacloud/codeup/model/GetMergeRequestDetailRequest.h create mode 100644 codeup/include/alibabacloud/codeup/model/GetMergeRequestDetailResult.h create mode 100644 codeup/include/alibabacloud/codeup/model/GetMergeRequestSettingRequest.h create mode 100644 codeup/include/alibabacloud/codeup/model/GetMergeRequestSettingResult.h create mode 100644 codeup/include/alibabacloud/codeup/model/ListMergeRequestCommentsRequest.h create mode 100644 codeup/include/alibabacloud/codeup/model/ListMergeRequestCommentsResult.h create mode 100644 codeup/include/alibabacloud/codeup/model/ListRepositoryCommitsRequest.h create mode 100644 codeup/include/alibabacloud/codeup/model/ListRepositoryCommitsResult.h create mode 100644 codeup/include/alibabacloud/codeup/model/UpdateMergeRequestCommentRequest.h create mode 100644 codeup/include/alibabacloud/codeup/model/UpdateMergeRequestCommentResult.h create mode 100644 codeup/include/alibabacloud/codeup/model/UpdateMergeRequestRequest.h create mode 100644 codeup/include/alibabacloud/codeup/model/UpdateMergeRequestResult.h create mode 100644 codeup/include/alibabacloud/codeup/model/UpdateMergeRequestSettingRequest.h create mode 100644 codeup/include/alibabacloud/codeup/model/UpdateMergeRequestSettingResult.h create mode 100644 codeup/src/model/AcceptMergeRequestRequest.cc create mode 100644 codeup/src/model/AcceptMergeRequestResult.cc create mode 100644 codeup/src/model/CreateMergeRequestCommentRequest.cc create mode 100644 codeup/src/model/CreateMergeRequestCommentResult.cc create mode 100644 codeup/src/model/GetMergeRequestApproveStatusRequest.cc create mode 100644 codeup/src/model/GetMergeRequestApproveStatusResult.cc create mode 100644 codeup/src/model/GetMergeRequestDetailRequest.cc create mode 100644 codeup/src/model/GetMergeRequestDetailResult.cc create mode 100644 codeup/src/model/GetMergeRequestSettingRequest.cc create mode 100644 codeup/src/model/GetMergeRequestSettingResult.cc create mode 100644 codeup/src/model/ListMergeRequestCommentsRequest.cc create mode 100644 codeup/src/model/ListMergeRequestCommentsResult.cc create mode 100644 codeup/src/model/ListRepositoryCommitsRequest.cc create mode 100644 codeup/src/model/ListRepositoryCommitsResult.cc create mode 100644 codeup/src/model/UpdateMergeRequestCommentRequest.cc create mode 100644 codeup/src/model/UpdateMergeRequestCommentResult.cc create mode 100644 codeup/src/model/UpdateMergeRequestRequest.cc create mode 100644 codeup/src/model/UpdateMergeRequestResult.cc create mode 100644 codeup/src/model/UpdateMergeRequestSettingRequest.cc create mode 100644 codeup/src/model/UpdateMergeRequestSettingResult.cc diff --git a/CHANGELOG b/CHANGELOG index f5c0e9f8e..448b15dc2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2021-02-07 Version: patch +- Support some MergeRequest API. + 2021-02-05 Version: patch - Generated 2020-05-18 for `dataworks-public`. diff --git a/codeup/CMakeLists.txt b/codeup/CMakeLists.txt index 0ed72d4bc..5a2058876 100644 --- a/codeup/CMakeLists.txt +++ b/codeup/CMakeLists.txt @@ -21,6 +21,8 @@ set(codeup_public_header include/alibabacloud/codeup/CodeupExport.h ) set(codeup_public_header_model + include/alibabacloud/codeup/model/AcceptMergeRequestRequest.h + include/alibabacloud/codeup/model/AcceptMergeRequestResult.h include/alibabacloud/codeup/model/AddGroupMemberRequest.h include/alibabacloud/codeup/model/AddGroupMemberResult.h include/alibabacloud/codeup/model/AddRepositoryMemberRequest.h @@ -33,6 +35,8 @@ set(codeup_public_header_model include/alibabacloud/codeup/model/CreateFileResult.h include/alibabacloud/codeup/model/CreateMergeRequestRequest.h include/alibabacloud/codeup/model/CreateMergeRequestResult.h + include/alibabacloud/codeup/model/CreateMergeRequestCommentRequest.h + include/alibabacloud/codeup/model/CreateMergeRequestCommentResult.h include/alibabacloud/codeup/model/CreateRepositoryRequest.h include/alibabacloud/codeup/model/CreateRepositoryResult.h include/alibabacloud/codeup/model/CreateRepositoryDeployKeyRequest.h @@ -71,6 +75,12 @@ set(codeup_public_header_model include/alibabacloud/codeup/model/GetFileBlobsResult.h include/alibabacloud/codeup/model/GetGroupDetailRequest.h include/alibabacloud/codeup/model/GetGroupDetailResult.h + include/alibabacloud/codeup/model/GetMergeRequestApproveStatusRequest.h + include/alibabacloud/codeup/model/GetMergeRequestApproveStatusResult.h + include/alibabacloud/codeup/model/GetMergeRequestDetailRequest.h + include/alibabacloud/codeup/model/GetMergeRequestDetailResult.h + include/alibabacloud/codeup/model/GetMergeRequestSettingRequest.h + include/alibabacloud/codeup/model/GetMergeRequestSettingResult.h include/alibabacloud/codeup/model/GetProjectMemberRequest.h include/alibabacloud/codeup/model/GetProjectMemberResult.h include/alibabacloud/codeup/model/GetRepositoryInfoRequest.h @@ -85,6 +95,8 @@ set(codeup_public_header_model include/alibabacloud/codeup/model/ListGroupRepositoriesResult.h include/alibabacloud/codeup/model/ListGroupsRequest.h include/alibabacloud/codeup/model/ListGroupsResult.h + include/alibabacloud/codeup/model/ListMergeRequestCommentsRequest.h + include/alibabacloud/codeup/model/ListMergeRequestCommentsResult.h include/alibabacloud/codeup/model/ListMergeRequestsRequest.h include/alibabacloud/codeup/model/ListMergeRequestsResult.h include/alibabacloud/codeup/model/ListOrganizationsRequest.h @@ -93,6 +105,8 @@ set(codeup_public_header_model include/alibabacloud/codeup/model/ListRepositoriesResult.h include/alibabacloud/codeup/model/ListRepositoryBranchesRequest.h include/alibabacloud/codeup/model/ListRepositoryBranchesResult.h + include/alibabacloud/codeup/model/ListRepositoryCommitsRequest.h + include/alibabacloud/codeup/model/ListRepositoryCommitsResult.h include/alibabacloud/codeup/model/ListRepositoryMemberRequest.h include/alibabacloud/codeup/model/ListRepositoryMemberResult.h include/alibabacloud/codeup/model/ListRepositoryTagsRequest.h @@ -107,6 +121,12 @@ set(codeup_public_header_model include/alibabacloud/codeup/model/UpdateFileResult.h include/alibabacloud/codeup/model/UpdateGroupMemberRequest.h include/alibabacloud/codeup/model/UpdateGroupMemberResult.h + include/alibabacloud/codeup/model/UpdateMergeRequestRequest.h + include/alibabacloud/codeup/model/UpdateMergeRequestResult.h + include/alibabacloud/codeup/model/UpdateMergeRequestCommentRequest.h + include/alibabacloud/codeup/model/UpdateMergeRequestCommentResult.h + include/alibabacloud/codeup/model/UpdateMergeRequestSettingRequest.h + include/alibabacloud/codeup/model/UpdateMergeRequestSettingResult.h include/alibabacloud/codeup/model/UpdateRepositoryRequest.h include/alibabacloud/codeup/model/UpdateRepositoryResult.h include/alibabacloud/codeup/model/UpdateRepositoryMemberRequest.h @@ -114,6 +134,8 @@ set(codeup_public_header_model set(codeup_src src/CodeupClient.cc + src/model/AcceptMergeRequestRequest.cc + src/model/AcceptMergeRequestResult.cc src/model/AddGroupMemberRequest.cc src/model/AddGroupMemberResult.cc src/model/AddRepositoryMemberRequest.cc @@ -126,6 +148,8 @@ set(codeup_src src/model/CreateFileResult.cc src/model/CreateMergeRequestRequest.cc src/model/CreateMergeRequestResult.cc + src/model/CreateMergeRequestCommentRequest.cc + src/model/CreateMergeRequestCommentResult.cc src/model/CreateRepositoryRequest.cc src/model/CreateRepositoryResult.cc src/model/CreateRepositoryDeployKeyRequest.cc @@ -164,6 +188,12 @@ set(codeup_src src/model/GetFileBlobsResult.cc src/model/GetGroupDetailRequest.cc src/model/GetGroupDetailResult.cc + src/model/GetMergeRequestApproveStatusRequest.cc + src/model/GetMergeRequestApproveStatusResult.cc + src/model/GetMergeRequestDetailRequest.cc + src/model/GetMergeRequestDetailResult.cc + src/model/GetMergeRequestSettingRequest.cc + src/model/GetMergeRequestSettingResult.cc src/model/GetProjectMemberRequest.cc src/model/GetProjectMemberResult.cc src/model/GetRepositoryInfoRequest.cc @@ -178,6 +208,8 @@ set(codeup_src src/model/ListGroupRepositoriesResult.cc src/model/ListGroupsRequest.cc src/model/ListGroupsResult.cc + src/model/ListMergeRequestCommentsRequest.cc + src/model/ListMergeRequestCommentsResult.cc src/model/ListMergeRequestsRequest.cc src/model/ListMergeRequestsResult.cc src/model/ListOrganizationsRequest.cc @@ -186,6 +218,8 @@ set(codeup_src src/model/ListRepositoriesResult.cc src/model/ListRepositoryBranchesRequest.cc src/model/ListRepositoryBranchesResult.cc + src/model/ListRepositoryCommitsRequest.cc + src/model/ListRepositoryCommitsResult.cc src/model/ListRepositoryMemberRequest.cc src/model/ListRepositoryMemberResult.cc src/model/ListRepositoryTagsRequest.cc @@ -200,6 +234,12 @@ set(codeup_src src/model/UpdateFileResult.cc src/model/UpdateGroupMemberRequest.cc src/model/UpdateGroupMemberResult.cc + src/model/UpdateMergeRequestRequest.cc + src/model/UpdateMergeRequestResult.cc + src/model/UpdateMergeRequestCommentRequest.cc + src/model/UpdateMergeRequestCommentResult.cc + src/model/UpdateMergeRequestSettingRequest.cc + src/model/UpdateMergeRequestSettingResult.cc src/model/UpdateRepositoryRequest.cc src/model/UpdateRepositoryResult.cc src/model/UpdateRepositoryMemberRequest.cc diff --git a/codeup/include/alibabacloud/codeup/CodeupClient.h b/codeup/include/alibabacloud/codeup/CodeupClient.h index 8e4172dc5..61bb8c692 100644 --- a/codeup/include/alibabacloud/codeup/CodeupClient.h +++ b/codeup/include/alibabacloud/codeup/CodeupClient.h @@ -22,6 +22,8 @@ #include #include #include "CodeupExport.h" +#include "model/AcceptMergeRequestRequest.h" +#include "model/AcceptMergeRequestResult.h" #include "model/AddGroupMemberRequest.h" #include "model/AddGroupMemberResult.h" #include "model/AddRepositoryMemberRequest.h" @@ -34,6 +36,8 @@ #include "model/CreateFileResult.h" #include "model/CreateMergeRequestRequest.h" #include "model/CreateMergeRequestResult.h" +#include "model/CreateMergeRequestCommentRequest.h" +#include "model/CreateMergeRequestCommentResult.h" #include "model/CreateRepositoryRequest.h" #include "model/CreateRepositoryResult.h" #include "model/CreateRepositoryDeployKeyRequest.h" @@ -72,6 +76,12 @@ #include "model/GetFileBlobsResult.h" #include "model/GetGroupDetailRequest.h" #include "model/GetGroupDetailResult.h" +#include "model/GetMergeRequestApproveStatusRequest.h" +#include "model/GetMergeRequestApproveStatusResult.h" +#include "model/GetMergeRequestDetailRequest.h" +#include "model/GetMergeRequestDetailResult.h" +#include "model/GetMergeRequestSettingRequest.h" +#include "model/GetMergeRequestSettingResult.h" #include "model/GetProjectMemberRequest.h" #include "model/GetProjectMemberResult.h" #include "model/GetRepositoryInfoRequest.h" @@ -86,6 +96,8 @@ #include "model/ListGroupRepositoriesResult.h" #include "model/ListGroupsRequest.h" #include "model/ListGroupsResult.h" +#include "model/ListMergeRequestCommentsRequest.h" +#include "model/ListMergeRequestCommentsResult.h" #include "model/ListMergeRequestsRequest.h" #include "model/ListMergeRequestsResult.h" #include "model/ListOrganizationsRequest.h" @@ -94,6 +106,8 @@ #include "model/ListRepositoriesResult.h" #include "model/ListRepositoryBranchesRequest.h" #include "model/ListRepositoryBranchesResult.h" +#include "model/ListRepositoryCommitsRequest.h" +#include "model/ListRepositoryCommitsResult.h" #include "model/ListRepositoryMemberRequest.h" #include "model/ListRepositoryMemberResult.h" #include "model/ListRepositoryTagsRequest.h" @@ -108,6 +122,12 @@ #include "model/UpdateFileResult.h" #include "model/UpdateGroupMemberRequest.h" #include "model/UpdateGroupMemberResult.h" +#include "model/UpdateMergeRequestRequest.h" +#include "model/UpdateMergeRequestResult.h" +#include "model/UpdateMergeRequestCommentRequest.h" +#include "model/UpdateMergeRequestCommentResult.h" +#include "model/UpdateMergeRequestSettingRequest.h" +#include "model/UpdateMergeRequestSettingResult.h" #include "model/UpdateRepositoryRequest.h" #include "model/UpdateRepositoryResult.h" #include "model/UpdateRepositoryMemberRequest.h" @@ -121,6 +141,9 @@ namespace AlibabaCloud class ALIBABACLOUD_CODEUP_EXPORT CodeupClient : public RoaServiceClient { public: + typedef Outcome AcceptMergeRequestOutcome; + typedef std::future AcceptMergeRequestOutcomeCallable; + typedef std::function&)> AcceptMergeRequestAsyncHandler; typedef Outcome AddGroupMemberOutcome; typedef std::future AddGroupMemberOutcomeCallable; typedef std::function&)> AddGroupMemberAsyncHandler; @@ -139,6 +162,9 @@ namespace AlibabaCloud typedef Outcome CreateMergeRequestOutcome; typedef std::future CreateMergeRequestOutcomeCallable; typedef std::function&)> CreateMergeRequestAsyncHandler; + typedef Outcome CreateMergeRequestCommentOutcome; + typedef std::future CreateMergeRequestCommentOutcomeCallable; + typedef std::function&)> CreateMergeRequestCommentAsyncHandler; typedef Outcome CreateRepositoryOutcome; typedef std::future CreateRepositoryOutcomeCallable; typedef std::function&)> CreateRepositoryAsyncHandler; @@ -196,6 +222,15 @@ namespace AlibabaCloud typedef Outcome GetGroupDetailOutcome; typedef std::future GetGroupDetailOutcomeCallable; typedef std::function&)> GetGroupDetailAsyncHandler; + typedef Outcome GetMergeRequestApproveStatusOutcome; + typedef std::future GetMergeRequestApproveStatusOutcomeCallable; + typedef std::function&)> GetMergeRequestApproveStatusAsyncHandler; + typedef Outcome GetMergeRequestDetailOutcome; + typedef std::future GetMergeRequestDetailOutcomeCallable; + typedef std::function&)> GetMergeRequestDetailAsyncHandler; + typedef Outcome GetMergeRequestSettingOutcome; + typedef std::future GetMergeRequestSettingOutcomeCallable; + typedef std::function&)> GetMergeRequestSettingAsyncHandler; typedef Outcome GetProjectMemberOutcome; typedef std::future GetProjectMemberOutcomeCallable; typedef std::function&)> GetProjectMemberAsyncHandler; @@ -217,6 +252,9 @@ namespace AlibabaCloud typedef Outcome ListGroupsOutcome; typedef std::future ListGroupsOutcomeCallable; typedef std::function&)> ListGroupsAsyncHandler; + typedef Outcome ListMergeRequestCommentsOutcome; + typedef std::future ListMergeRequestCommentsOutcomeCallable; + typedef std::function&)> ListMergeRequestCommentsAsyncHandler; typedef Outcome ListMergeRequestsOutcome; typedef std::future ListMergeRequestsOutcomeCallable; typedef std::function&)> ListMergeRequestsAsyncHandler; @@ -229,6 +267,9 @@ namespace AlibabaCloud typedef Outcome ListRepositoryBranchesOutcome; typedef std::future ListRepositoryBranchesOutcomeCallable; typedef std::function&)> ListRepositoryBranchesAsyncHandler; + typedef Outcome ListRepositoryCommitsOutcome; + typedef std::future ListRepositoryCommitsOutcomeCallable; + typedef std::function&)> ListRepositoryCommitsAsyncHandler; typedef Outcome ListRepositoryMemberOutcome; typedef std::future ListRepositoryMemberOutcomeCallable; typedef std::function&)> ListRepositoryMemberAsyncHandler; @@ -250,6 +291,15 @@ namespace AlibabaCloud typedef Outcome UpdateGroupMemberOutcome; typedef std::future UpdateGroupMemberOutcomeCallable; typedef std::function&)> UpdateGroupMemberAsyncHandler; + typedef Outcome UpdateMergeRequestOutcome; + typedef std::future UpdateMergeRequestOutcomeCallable; + typedef std::function&)> UpdateMergeRequestAsyncHandler; + typedef Outcome UpdateMergeRequestCommentOutcome; + typedef std::future UpdateMergeRequestCommentOutcomeCallable; + typedef std::function&)> UpdateMergeRequestCommentAsyncHandler; + typedef Outcome UpdateMergeRequestSettingOutcome; + typedef std::future UpdateMergeRequestSettingOutcomeCallable; + typedef std::function&)> UpdateMergeRequestSettingAsyncHandler; typedef Outcome UpdateRepositoryOutcome; typedef std::future UpdateRepositoryOutcomeCallable; typedef std::function&)> UpdateRepositoryAsyncHandler; @@ -261,6 +311,9 @@ namespace AlibabaCloud CodeupClient(const std::shared_ptr &credentialsProvider, const ClientConfiguration &configuration); CodeupClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration); ~CodeupClient(); + AcceptMergeRequestOutcome acceptMergeRequest(const Model::AcceptMergeRequestRequest &request)const; + void acceptMergeRequestAsync(const Model::AcceptMergeRequestRequest& request, const AcceptMergeRequestAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + AcceptMergeRequestOutcomeCallable acceptMergeRequestCallable(const Model::AcceptMergeRequestRequest& request) const; AddGroupMemberOutcome addGroupMember(const Model::AddGroupMemberRequest &request)const; void addGroupMemberAsync(const Model::AddGroupMemberRequest& request, const AddGroupMemberAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; AddGroupMemberOutcomeCallable addGroupMemberCallable(const Model::AddGroupMemberRequest& request) const; @@ -279,6 +332,9 @@ namespace AlibabaCloud CreateMergeRequestOutcome createMergeRequest(const Model::CreateMergeRequestRequest &request)const; void createMergeRequestAsync(const Model::CreateMergeRequestRequest& request, const CreateMergeRequestAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CreateMergeRequestOutcomeCallable createMergeRequestCallable(const Model::CreateMergeRequestRequest& request) const; + CreateMergeRequestCommentOutcome createMergeRequestComment(const Model::CreateMergeRequestCommentRequest &request)const; + void createMergeRequestCommentAsync(const Model::CreateMergeRequestCommentRequest& request, const CreateMergeRequestCommentAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CreateMergeRequestCommentOutcomeCallable createMergeRequestCommentCallable(const Model::CreateMergeRequestCommentRequest& request) const; CreateRepositoryOutcome createRepository(const Model::CreateRepositoryRequest &request)const; void createRepositoryAsync(const Model::CreateRepositoryRequest& request, const CreateRepositoryAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CreateRepositoryOutcomeCallable createRepositoryCallable(const Model::CreateRepositoryRequest& request) const; @@ -336,6 +392,15 @@ namespace AlibabaCloud GetGroupDetailOutcome getGroupDetail(const Model::GetGroupDetailRequest &request)const; void getGroupDetailAsync(const Model::GetGroupDetailRequest& request, const GetGroupDetailAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetGroupDetailOutcomeCallable getGroupDetailCallable(const Model::GetGroupDetailRequest& request) const; + GetMergeRequestApproveStatusOutcome getMergeRequestApproveStatus(const Model::GetMergeRequestApproveStatusRequest &request)const; + void getMergeRequestApproveStatusAsync(const Model::GetMergeRequestApproveStatusRequest& request, const GetMergeRequestApproveStatusAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetMergeRequestApproveStatusOutcomeCallable getMergeRequestApproveStatusCallable(const Model::GetMergeRequestApproveStatusRequest& request) const; + GetMergeRequestDetailOutcome getMergeRequestDetail(const Model::GetMergeRequestDetailRequest &request)const; + void getMergeRequestDetailAsync(const Model::GetMergeRequestDetailRequest& request, const GetMergeRequestDetailAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetMergeRequestDetailOutcomeCallable getMergeRequestDetailCallable(const Model::GetMergeRequestDetailRequest& request) const; + GetMergeRequestSettingOutcome getMergeRequestSetting(const Model::GetMergeRequestSettingRequest &request)const; + void getMergeRequestSettingAsync(const Model::GetMergeRequestSettingRequest& request, const GetMergeRequestSettingAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetMergeRequestSettingOutcomeCallable getMergeRequestSettingCallable(const Model::GetMergeRequestSettingRequest& request) const; GetProjectMemberOutcome getProjectMember(const Model::GetProjectMemberRequest &request)const; void getProjectMemberAsync(const Model::GetProjectMemberRequest& request, const GetProjectMemberAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetProjectMemberOutcomeCallable getProjectMemberCallable(const Model::GetProjectMemberRequest& request) const; @@ -357,6 +422,9 @@ namespace AlibabaCloud ListGroupsOutcome listGroups(const Model::ListGroupsRequest &request)const; void listGroupsAsync(const Model::ListGroupsRequest& request, const ListGroupsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListGroupsOutcomeCallable listGroupsCallable(const Model::ListGroupsRequest& request) const; + ListMergeRequestCommentsOutcome listMergeRequestComments(const Model::ListMergeRequestCommentsRequest &request)const; + void listMergeRequestCommentsAsync(const Model::ListMergeRequestCommentsRequest& request, const ListMergeRequestCommentsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListMergeRequestCommentsOutcomeCallable listMergeRequestCommentsCallable(const Model::ListMergeRequestCommentsRequest& request) const; ListMergeRequestsOutcome listMergeRequests(const Model::ListMergeRequestsRequest &request)const; void listMergeRequestsAsync(const Model::ListMergeRequestsRequest& request, const ListMergeRequestsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListMergeRequestsOutcomeCallable listMergeRequestsCallable(const Model::ListMergeRequestsRequest& request) const; @@ -369,6 +437,9 @@ namespace AlibabaCloud ListRepositoryBranchesOutcome listRepositoryBranches(const Model::ListRepositoryBranchesRequest &request)const; void listRepositoryBranchesAsync(const Model::ListRepositoryBranchesRequest& request, const ListRepositoryBranchesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListRepositoryBranchesOutcomeCallable listRepositoryBranchesCallable(const Model::ListRepositoryBranchesRequest& request) const; + ListRepositoryCommitsOutcome listRepositoryCommits(const Model::ListRepositoryCommitsRequest &request)const; + void listRepositoryCommitsAsync(const Model::ListRepositoryCommitsRequest& request, const ListRepositoryCommitsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListRepositoryCommitsOutcomeCallable listRepositoryCommitsCallable(const Model::ListRepositoryCommitsRequest& request) const; ListRepositoryMemberOutcome listRepositoryMember(const Model::ListRepositoryMemberRequest &request)const; void listRepositoryMemberAsync(const Model::ListRepositoryMemberRequest& request, const ListRepositoryMemberAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListRepositoryMemberOutcomeCallable listRepositoryMemberCallable(const Model::ListRepositoryMemberRequest& request) const; @@ -390,6 +461,15 @@ namespace AlibabaCloud UpdateGroupMemberOutcome updateGroupMember(const Model::UpdateGroupMemberRequest &request)const; void updateGroupMemberAsync(const Model::UpdateGroupMemberRequest& request, const UpdateGroupMemberAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; UpdateGroupMemberOutcomeCallable updateGroupMemberCallable(const Model::UpdateGroupMemberRequest& request) const; + UpdateMergeRequestOutcome updateMergeRequest(const Model::UpdateMergeRequestRequest &request)const; + void updateMergeRequestAsync(const Model::UpdateMergeRequestRequest& request, const UpdateMergeRequestAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + UpdateMergeRequestOutcomeCallable updateMergeRequestCallable(const Model::UpdateMergeRequestRequest& request) const; + UpdateMergeRequestCommentOutcome updateMergeRequestComment(const Model::UpdateMergeRequestCommentRequest &request)const; + void updateMergeRequestCommentAsync(const Model::UpdateMergeRequestCommentRequest& request, const UpdateMergeRequestCommentAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + UpdateMergeRequestCommentOutcomeCallable updateMergeRequestCommentCallable(const Model::UpdateMergeRequestCommentRequest& request) const; + UpdateMergeRequestSettingOutcome updateMergeRequestSetting(const Model::UpdateMergeRequestSettingRequest &request)const; + void updateMergeRequestSettingAsync(const Model::UpdateMergeRequestSettingRequest& request, const UpdateMergeRequestSettingAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + UpdateMergeRequestSettingOutcomeCallable updateMergeRequestSettingCallable(const Model::UpdateMergeRequestSettingRequest& request) const; UpdateRepositoryOutcome updateRepository(const Model::UpdateRepositoryRequest &request)const; void updateRepositoryAsync(const Model::UpdateRepositoryRequest& request, const UpdateRepositoryAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; UpdateRepositoryOutcomeCallable updateRepositoryCallable(const Model::UpdateRepositoryRequest& request) const; diff --git a/codeup/include/alibabacloud/codeup/model/AcceptMergeRequestRequest.h b/codeup/include/alibabacloud/codeup/model/AcceptMergeRequestRequest.h new file mode 100644 index 000000000..9013909bb --- /dev/null +++ b/codeup/include/alibabacloud/codeup/model/AcceptMergeRequestRequest.h @@ -0,0 +1,57 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_CODEUP_MODEL_ACCEPTMERGEREQUESTREQUEST_H_ +#define ALIBABACLOUD_CODEUP_MODEL_ACCEPTMERGEREQUESTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Codeup + { + namespace Model + { + class ALIBABACLOUD_CODEUP_EXPORT AcceptMergeRequestRequest : public RoaServiceRequest + { + + public: + AcceptMergeRequestRequest(); + ~AcceptMergeRequestRequest(); + + std::string getOrganizationId()const; + void setOrganizationId(const std::string& organizationId); + long getMergeRequestId()const; + void setMergeRequestId(long mergeRequestId); + std::string getAccessToken()const; + void setAccessToken(const std::string& accessToken); + long getProjectId()const; + void setProjectId(long projectId); + + private: + std::string organizationId_; + long mergeRequestId_; + std::string accessToken_; + long projectId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CODEUP_MODEL_ACCEPTMERGEREQUESTREQUEST_H_ \ No newline at end of file diff --git a/codeup/include/alibabacloud/codeup/model/AcceptMergeRequestResult.h b/codeup/include/alibabacloud/codeup/model/AcceptMergeRequestResult.h new file mode 100644 index 000000000..27c9a29c2 --- /dev/null +++ b/codeup/include/alibabacloud/codeup/model/AcceptMergeRequestResult.h @@ -0,0 +1,133 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_CODEUP_MODEL_ACCEPTMERGEREQUESTRESULT_H_ +#define ALIBABACLOUD_CODEUP_MODEL_ACCEPTMERGEREQUESTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Codeup + { + namespace Model + { + class ALIBABACLOUD_CODEUP_EXPORT AcceptMergeRequestResult : public ServiceResult + { + public: + struct Result + { + struct ApproveCheckResult + { + struct SatisfiedCheckResultsItem + { + struct ExtraUsersItem + { + std::string avatarUrl; + std::string externUserId; + long id; + std::string name; + }; + std::string checkName; + std::vector satisfiedItems; + std::string checkType; + std::string checkStatus; + std::vector unsatisfiedItems; + std::vector extraUsers; + }; + struct UnsatisfiedCheckResultsItem + { + struct ExtraUsersItem4 + { + std::string avatarUrl; + std::string externUserId; + long id; + std::string name; + }; + std::vector satisfiedItems1; + std::string checkName; + std::string checkType; + std::string checkStatus; + std::vector extraUsers3; + std::vector unsatisfiedItems2; + }; + std::vector unsatisfiedCheckResults; + std::vector satisfiedCheckResults; + std::string totalCheckResult; + }; + struct Author + { + std::string avatarUrl; + std::string externUserId; + long id; + std::string name; + }; + struct AssigneeListItem + { + std::string avatarUrl; + std::string externUserId; + std::string id; + std::string name; + }; + ApproveCheckResult approveCheckResult; + int behindCommitCount; + std::string description; + int aheadCommitCount; + std::string createdAt; + long projectId; + std::string mergeError; + std::string nameWithNamespace; + std::string title; + std::string webUrl; + std::string mergedRevision; + std::string updatedAt; + std::string acceptedRevision; + std::string state; + std::vector assigneeList; + std::string mergeStatus; + std::string sourceBranch; + Author author; + long id; + std::string mergeType; + std::string targetBranch; + }; + + + AcceptMergeRequestResult(); + explicit AcceptMergeRequestResult(const std::string &payload); + ~AcceptMergeRequestResult(); + std::string getErrorCode()const; + std::string getErrorMessage()const; + bool getSuccess()const; + Result getResult()const; + + protected: + void parse(const std::string &payload); + private: + std::string errorCode_; + std::string errorMessage_; + bool success_; + Result result_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CODEUP_MODEL_ACCEPTMERGEREQUESTRESULT_H_ \ No newline at end of file diff --git a/codeup/include/alibabacloud/codeup/model/CreateMergeRequestCommentRequest.h b/codeup/include/alibabacloud/codeup/model/CreateMergeRequestCommentRequest.h new file mode 100644 index 000000000..c9e4a10ee --- /dev/null +++ b/codeup/include/alibabacloud/codeup/model/CreateMergeRequestCommentRequest.h @@ -0,0 +1,57 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_CODEUP_MODEL_CREATEMERGEREQUESTCOMMENTREQUEST_H_ +#define ALIBABACLOUD_CODEUP_MODEL_CREATEMERGEREQUESTCOMMENTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Codeup + { + namespace Model + { + class ALIBABACLOUD_CODEUP_EXPORT CreateMergeRequestCommentRequest : public RoaServiceRequest + { + + public: + CreateMergeRequestCommentRequest(); + ~CreateMergeRequestCommentRequest(); + + std::string getOrganizationId()const; + void setOrganizationId(const std::string& organizationId); + long getMergeRequestId()const; + void setMergeRequestId(long mergeRequestId); + std::string getAccessToken()const; + void setAccessToken(const std::string& accessToken); + long getProjectId()const; + void setProjectId(long projectId); + + private: + std::string organizationId_; + long mergeRequestId_; + std::string accessToken_; + long projectId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CODEUP_MODEL_CREATEMERGEREQUESTCOMMENTREQUEST_H_ \ No newline at end of file diff --git a/codeup/include/alibabacloud/codeup/model/CreateMergeRequestCommentResult.h b/codeup/include/alibabacloud/codeup/model/CreateMergeRequestCommentResult.h new file mode 100644 index 000000000..982ad1f95 --- /dev/null +++ b/codeup/include/alibabacloud/codeup/model/CreateMergeRequestCommentResult.h @@ -0,0 +1,82 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_CODEUP_MODEL_CREATEMERGEREQUESTCOMMENTRESULT_H_ +#define ALIBABACLOUD_CODEUP_MODEL_CREATEMERGEREQUESTCOMMENTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Codeup + { + namespace Model + { + class ALIBABACLOUD_CODEUP_EXPORT CreateMergeRequestCommentResult : public ServiceResult + { + public: + struct Result + { + struct Author + { + std::string avatarUrl; + std::string email; + std::string externUserId; + long id; + std::string name; + }; + bool isDraft; + std::string path; + std::string createdAt; + long projectId; + std::string updatedAt; + long line; + std::string side; + int closed; + std::string note; + long parentNoteId; + Author author; + long id; + bool outDated; + std::string rangeContext; + }; + + + CreateMergeRequestCommentResult(); + explicit CreateMergeRequestCommentResult(const std::string &payload); + ~CreateMergeRequestCommentResult(); + std::string getErrorCode()const; + std::string getErrorMessage()const; + bool getSuccess()const; + Result getResult()const; + + protected: + void parse(const std::string &payload); + private: + std::string errorCode_; + std::string errorMessage_; + bool success_; + Result result_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CODEUP_MODEL_CREATEMERGEREQUESTCOMMENTRESULT_H_ \ No newline at end of file diff --git a/codeup/include/alibabacloud/codeup/model/GetMergeRequestApproveStatusRequest.h b/codeup/include/alibabacloud/codeup/model/GetMergeRequestApproveStatusRequest.h new file mode 100644 index 000000000..f6f3ee5cb --- /dev/null +++ b/codeup/include/alibabacloud/codeup/model/GetMergeRequestApproveStatusRequest.h @@ -0,0 +1,57 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_CODEUP_MODEL_GETMERGEREQUESTAPPROVESTATUSREQUEST_H_ +#define ALIBABACLOUD_CODEUP_MODEL_GETMERGEREQUESTAPPROVESTATUSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Codeup + { + namespace Model + { + class ALIBABACLOUD_CODEUP_EXPORT GetMergeRequestApproveStatusRequest : public RoaServiceRequest + { + + public: + GetMergeRequestApproveStatusRequest(); + ~GetMergeRequestApproveStatusRequest(); + + std::string getOrganizationId()const; + void setOrganizationId(const std::string& organizationId); + long getMergeRequestId()const; + void setMergeRequestId(long mergeRequestId); + std::string getAccessToken()const; + void setAccessToken(const std::string& accessToken); + long getProjectId()const; + void setProjectId(long projectId); + + private: + std::string organizationId_; + long mergeRequestId_; + std::string accessToken_; + long projectId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CODEUP_MODEL_GETMERGEREQUESTAPPROVESTATUSREQUEST_H_ \ No newline at end of file diff --git a/codeup/include/alibabacloud/codeup/model/GetMergeRequestApproveStatusResult.h b/codeup/include/alibabacloud/codeup/model/GetMergeRequestApproveStatusResult.h new file mode 100644 index 000000000..a38e37a84 --- /dev/null +++ b/codeup/include/alibabacloud/codeup/model/GetMergeRequestApproveStatusResult.h @@ -0,0 +1,62 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_CODEUP_MODEL_GETMERGEREQUESTAPPROVESTATUSRESULT_H_ +#define ALIBABACLOUD_CODEUP_MODEL_GETMERGEREQUESTAPPROVESTATUSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Codeup + { + namespace Model + { + class ALIBABACLOUD_CODEUP_EXPORT GetMergeRequestApproveStatusResult : public ServiceResult + { + public: + struct Result + { + std::string approveStatus; + std::string message; + }; + + + GetMergeRequestApproveStatusResult(); + explicit GetMergeRequestApproveStatusResult(const std::string &payload); + ~GetMergeRequestApproveStatusResult(); + std::string getErrorCode()const; + std::string getErrorMessage()const; + bool getSuccess()const; + Result getResult()const; + + protected: + void parse(const std::string &payload); + private: + std::string errorCode_; + std::string errorMessage_; + bool success_; + Result result_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CODEUP_MODEL_GETMERGEREQUESTAPPROVESTATUSRESULT_H_ \ No newline at end of file diff --git a/codeup/include/alibabacloud/codeup/model/GetMergeRequestDetailRequest.h b/codeup/include/alibabacloud/codeup/model/GetMergeRequestDetailRequest.h new file mode 100644 index 000000000..c1007c020 --- /dev/null +++ b/codeup/include/alibabacloud/codeup/model/GetMergeRequestDetailRequest.h @@ -0,0 +1,57 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_CODEUP_MODEL_GETMERGEREQUESTDETAILREQUEST_H_ +#define ALIBABACLOUD_CODEUP_MODEL_GETMERGEREQUESTDETAILREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Codeup + { + namespace Model + { + class ALIBABACLOUD_CODEUP_EXPORT GetMergeRequestDetailRequest : public RoaServiceRequest + { + + public: + GetMergeRequestDetailRequest(); + ~GetMergeRequestDetailRequest(); + + std::string getOrganizationId()const; + void setOrganizationId(const std::string& organizationId); + long getMergeRequestId()const; + void setMergeRequestId(long mergeRequestId); + std::string getAccessToken()const; + void setAccessToken(const std::string& accessToken); + long getProjectId()const; + void setProjectId(long projectId); + + private: + std::string organizationId_; + long mergeRequestId_; + std::string accessToken_; + long projectId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CODEUP_MODEL_GETMERGEREQUESTDETAILREQUEST_H_ \ No newline at end of file diff --git a/codeup/include/alibabacloud/codeup/model/GetMergeRequestDetailResult.h b/codeup/include/alibabacloud/codeup/model/GetMergeRequestDetailResult.h new file mode 100644 index 000000000..3561450ae --- /dev/null +++ b/codeup/include/alibabacloud/codeup/model/GetMergeRequestDetailResult.h @@ -0,0 +1,136 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_CODEUP_MODEL_GETMERGEREQUESTDETAILRESULT_H_ +#define ALIBABACLOUD_CODEUP_MODEL_GETMERGEREQUESTDETAILRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Codeup + { + namespace Model + { + class ALIBABACLOUD_CODEUP_EXPORT GetMergeRequestDetailResult : public ServiceResult + { + public: + struct Result + { + struct ApproveCheckResult + { + struct SatisfiedCheckResultsItem + { + struct ExtraUsersItem + { + std::string avatarUrl; + std::string externUserId; + long id; + std::string name; + }; + std::string checkName; + std::vector satisfiedItems; + std::string checkType; + std::string checkStatus; + std::vector unsatisfiedItems; + std::vector extraUsers; + }; + struct UnsatisfiedCheckResultsItem + { + struct ExtraUsersItem4 + { + std::string avatarUrl; + std::string externUserId; + long id; + std::string name; + }; + std::vector satisfiedItems1; + std::string checkName; + std::string checkType; + std::string checkStatus; + std::vector extraUsers3; + std::vector unsatisfiedItems2; + }; + std::vector unsatisfiedCheckResults; + std::vector satisfiedCheckResults; + std::string totalCheckResult; + }; + struct Author + { + std::string avatarUrl; + std::string externUserId; + long id; + std::string name; + }; + struct AssigneeListItem + { + std::string status; + std::string avatarUrl; + std::string email; + std::string externUserId; + std::string id; + std::string name; + }; + ApproveCheckResult approveCheckResult; + int behindCommitCount; + bool isSupportMerge; + std::string description; + int aheadCommitCount; + std::string createdAt; + long projectId; + std::string mergeError; + std::string nameWithNamespace; + std::string title; + std::string webUrl; + std::string mergedRevision; + std::string updatedAt; + std::string acceptedRevision; + std::string state; + std::vector assigneeList; + std::string mergeStatus; + std::string sourceBranch; + Author author; + long id; + std::string mergeType; + std::string targetBranch; + }; + + + GetMergeRequestDetailResult(); + explicit GetMergeRequestDetailResult(const std::string &payload); + ~GetMergeRequestDetailResult(); + std::string getErrorCode()const; + std::string getErrorMessage()const; + bool getSuccess()const; + Result getResult()const; + + protected: + void parse(const std::string &payload); + private: + std::string errorCode_; + std::string errorMessage_; + bool success_; + Result result_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CODEUP_MODEL_GETMERGEREQUESTDETAILRESULT_H_ \ No newline at end of file diff --git a/codeup/include/alibabacloud/codeup/model/GetMergeRequestSettingRequest.h b/codeup/include/alibabacloud/codeup/model/GetMergeRequestSettingRequest.h new file mode 100644 index 000000000..45391bfab --- /dev/null +++ b/codeup/include/alibabacloud/codeup/model/GetMergeRequestSettingRequest.h @@ -0,0 +1,54 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_CODEUP_MODEL_GETMERGEREQUESTSETTINGREQUEST_H_ +#define ALIBABACLOUD_CODEUP_MODEL_GETMERGEREQUESTSETTINGREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Codeup + { + namespace Model + { + class ALIBABACLOUD_CODEUP_EXPORT GetMergeRequestSettingRequest : public RoaServiceRequest + { + + public: + GetMergeRequestSettingRequest(); + ~GetMergeRequestSettingRequest(); + + std::string getOrganizationId()const; + void setOrganizationId(const std::string& organizationId); + std::string getAccessToken()const; + void setAccessToken(const std::string& accessToken); + long getProjectId()const; + void setProjectId(long projectId); + + private: + std::string organizationId_; + std::string accessToken_; + long projectId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CODEUP_MODEL_GETMERGEREQUESTSETTINGREQUEST_H_ \ No newline at end of file diff --git a/codeup/include/alibabacloud/codeup/model/GetMergeRequestSettingResult.h b/codeup/include/alibabacloud/codeup/model/GetMergeRequestSettingResult.h new file mode 100644 index 000000000..268d4b576 --- /dev/null +++ b/codeup/include/alibabacloud/codeup/model/GetMergeRequestSettingResult.h @@ -0,0 +1,62 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_CODEUP_MODEL_GETMERGEREQUESTSETTINGRESULT_H_ +#define ALIBABACLOUD_CODEUP_MODEL_GETMERGEREQUESTSETTINGRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Codeup + { + namespace Model + { + class ALIBABACLOUD_CODEUP_EXPORT GetMergeRequestSettingResult : public ServiceResult + { + public: + struct Result + { + bool isEnableSmartCodeReview; + std::vector mergeTypes; + }; + + + GetMergeRequestSettingResult(); + explicit GetMergeRequestSettingResult(const std::string &payload); + ~GetMergeRequestSettingResult(); + std::string getErrorCode()const; + std::string getErrorMessage()const; + bool getSuccess()const; + Result getResult()const; + + protected: + void parse(const std::string &payload); + private: + std::string errorCode_; + std::string errorMessage_; + bool success_; + Result result_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CODEUP_MODEL_GETMERGEREQUESTSETTINGRESULT_H_ \ No newline at end of file diff --git a/codeup/include/alibabacloud/codeup/model/ListMergeRequestCommentsRequest.h b/codeup/include/alibabacloud/codeup/model/ListMergeRequestCommentsRequest.h new file mode 100644 index 000000000..f654ccfb0 --- /dev/null +++ b/codeup/include/alibabacloud/codeup/model/ListMergeRequestCommentsRequest.h @@ -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. + */ + +#ifndef ALIBABACLOUD_CODEUP_MODEL_LISTMERGEREQUESTCOMMENTSREQUEST_H_ +#define ALIBABACLOUD_CODEUP_MODEL_LISTMERGEREQUESTCOMMENTSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Codeup + { + namespace Model + { + class ALIBABACLOUD_CODEUP_EXPORT ListMergeRequestCommentsRequest : public RoaServiceRequest + { + + public: + ListMergeRequestCommentsRequest(); + ~ListMergeRequestCommentsRequest(); + + std::string getOrganizationId()const; + void setOrganizationId(const std::string& organizationId); + long getMergeRequestId()const; + void setMergeRequestId(long mergeRequestId); + std::string getFromCommit()const; + void setFromCommit(const std::string& fromCommit); + std::string getAccessToken()const; + void setAccessToken(const std::string& accessToken); + std::string getToCommit()const; + void setToCommit(const std::string& toCommit); + long getProjectId()const; + void setProjectId(long projectId); + + private: + std::string organizationId_; + long mergeRequestId_; + std::string fromCommit_; + std::string accessToken_; + std::string toCommit_; + long projectId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CODEUP_MODEL_LISTMERGEREQUESTCOMMENTSREQUEST_H_ \ No newline at end of file diff --git a/codeup/include/alibabacloud/codeup/model/ListMergeRequestCommentsResult.h b/codeup/include/alibabacloud/codeup/model/ListMergeRequestCommentsResult.h new file mode 100644 index 000000000..76d4b903e --- /dev/null +++ b/codeup/include/alibabacloud/codeup/model/ListMergeRequestCommentsResult.h @@ -0,0 +1,84 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_CODEUP_MODEL_LISTMERGEREQUESTCOMMENTSRESULT_H_ +#define ALIBABACLOUD_CODEUP_MODEL_LISTMERGEREQUESTCOMMENTSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Codeup + { + namespace Model + { + class ALIBABACLOUD_CODEUP_EXPORT ListMergeRequestCommentsResult : public ServiceResult + { + public: + struct ResultItem + { + struct Author + { + std::string avatarUrl; + std::string email; + std::string externUserId; + long id; + std::string name; + }; + bool isDraft; + std::string path; + std::string createdAt; + long projectId; + std::string updatedAt; + long line; + std::string side; + int closed; + std::string note; + long parentNoteId; + Author author; + long id; + bool outDated; + std::string rangeContext; + }; + + + ListMergeRequestCommentsResult(); + explicit ListMergeRequestCommentsResult(const std::string &payload); + ~ListMergeRequestCommentsResult(); + long getTotal()const; + std::string getErrorCode()const; + std::string getErrorMessage()const; + bool getSuccess()const; + std::vector getResult()const; + + protected: + void parse(const std::string &payload); + private: + long total_; + std::string errorCode_; + std::string errorMessage_; + bool success_; + std::vector result_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CODEUP_MODEL_LISTMERGEREQUESTCOMMENTSRESULT_H_ \ No newline at end of file diff --git a/codeup/include/alibabacloud/codeup/model/ListMergeRequestsResult.h b/codeup/include/alibabacloud/codeup/model/ListMergeRequestsResult.h index c589568fa..92df1fa83 100644 --- a/codeup/include/alibabacloud/codeup/model/ListMergeRequestsResult.h +++ b/codeup/include/alibabacloud/codeup/model/ListMergeRequestsResult.h @@ -81,13 +81,16 @@ namespace AlibabaCloud }; struct AssigneeListItem { + std::string status; std::string avatarUrl; + std::string email; std::string externUserId; std::string id; std::string name; }; ApproveCheckResult approveCheckResult; int behindCommitCount; + bool isSupportMerge; std::string description; int aheadCommitCount; std::string createdAt; diff --git a/codeup/include/alibabacloud/codeup/model/ListRepositoryCommitsRequest.h b/codeup/include/alibabacloud/codeup/model/ListRepositoryCommitsRequest.h new file mode 100644 index 000000000..f37a84e0c --- /dev/null +++ b/codeup/include/alibabacloud/codeup/model/ListRepositoryCommitsRequest.h @@ -0,0 +1,72 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_CODEUP_MODEL_LISTREPOSITORYCOMMITSREQUEST_H_ +#define ALIBABACLOUD_CODEUP_MODEL_LISTREPOSITORYCOMMITSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Codeup + { + namespace Model + { + class ALIBABACLOUD_CODEUP_EXPORT ListRepositoryCommitsRequest : public RoaServiceRequest + { + + public: + ListRepositoryCommitsRequest(); + ~ListRepositoryCommitsRequest(); + + std::string getAccessToken()const; + void setAccessToken(const std::string& accessToken); + bool getShowSignature()const; + void setShowSignature(bool showSignature); + std::string getRefName()const; + void setRefName(const std::string& refName); + std::string getOrganizationId()const; + void setOrganizationId(const std::string& organizationId); + std::string getPath()const; + void setPath(const std::string& path); + std::string getSearch()const; + void setSearch(const std::string& search); + long getPageSize()const; + void setPageSize(long pageSize); + long getPage()const; + void setPage(long page); + long getProjectId()const; + void setProjectId(long projectId); + + private: + std::string accessToken_; + bool showSignature_; + std::string refName_; + std::string organizationId_; + std::string path_; + std::string search_; + long pageSize_; + long page_; + long projectId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CODEUP_MODEL_LISTREPOSITORYCOMMITSREQUEST_H_ \ No newline at end of file diff --git a/codeup/include/alibabacloud/codeup/model/ListRepositoryCommitsResult.h b/codeup/include/alibabacloud/codeup/model/ListRepositoryCommitsResult.h new file mode 100644 index 000000000..b2abfda8c --- /dev/null +++ b/codeup/include/alibabacloud/codeup/model/ListRepositoryCommitsResult.h @@ -0,0 +1,80 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_CODEUP_MODEL_LISTREPOSITORYCOMMITSRESULT_H_ +#define ALIBABACLOUD_CODEUP_MODEL_LISTREPOSITORYCOMMITSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Codeup + { + namespace Model + { + class ALIBABACLOUD_CODEUP_EXPORT ListRepositoryCommitsResult : public ServiceResult + { + public: + struct ResultItem + { + struct Signature + { + std::string verificationStatus; + std::string gpgKeyId; + }; + std::string authorName; + std::string message; + std::string createdAt; + std::string title; + std::string authorEmail; + std::string authorDate; + std::string committedDate; + std::string committerEmail; + std::vector parentIds; + Signature signature; + std::string shortId; + std::string id; + std::string committerName; + }; + + + ListRepositoryCommitsResult(); + explicit ListRepositoryCommitsResult(const std::string &payload); + ~ListRepositoryCommitsResult(); + long getTotal()const; + std::string getErrorCode()const; + std::string getErrorMessage()const; + bool getSuccess()const; + std::vector getResult()const; + + protected: + void parse(const std::string &payload); + private: + long total_; + std::string errorCode_; + std::string errorMessage_; + bool success_; + std::vector result_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CODEUP_MODEL_LISTREPOSITORYCOMMITSRESULT_H_ \ No newline at end of file diff --git a/codeup/include/alibabacloud/codeup/model/ListRepositoryMemberResult.h b/codeup/include/alibabacloud/codeup/model/ListRepositoryMemberResult.h index 3db361870..3a8867a57 100644 --- a/codeup/include/alibabacloud/codeup/model/ListRepositoryMemberResult.h +++ b/codeup/include/alibabacloud/codeup/model/ListRepositoryMemberResult.h @@ -36,10 +36,12 @@ namespace AlibabaCloud { std::string avatarUrl; std::string email; + std::string username; std::string state; std::string externUserId; long id; int accessLevel; + std::string name; }; diff --git a/codeup/include/alibabacloud/codeup/model/UpdateMergeRequestCommentRequest.h b/codeup/include/alibabacloud/codeup/model/UpdateMergeRequestCommentRequest.h new file mode 100644 index 000000000..083e57d17 --- /dev/null +++ b/codeup/include/alibabacloud/codeup/model/UpdateMergeRequestCommentRequest.h @@ -0,0 +1,60 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_CODEUP_MODEL_UPDATEMERGEREQUESTCOMMENTREQUEST_H_ +#define ALIBABACLOUD_CODEUP_MODEL_UPDATEMERGEREQUESTCOMMENTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Codeup + { + namespace Model + { + class ALIBABACLOUD_CODEUP_EXPORT UpdateMergeRequestCommentRequest : public RoaServiceRequest + { + + public: + UpdateMergeRequestCommentRequest(); + ~UpdateMergeRequestCommentRequest(); + + std::string getOrganizationId()const; + void setOrganizationId(const std::string& organizationId); + long getMergeRequestId()const; + void setMergeRequestId(long mergeRequestId); + std::string getAccessToken()const; + void setAccessToken(const std::string& accessToken); + long getNoteId()const; + void setNoteId(long noteId); + long getProjectId()const; + void setProjectId(long projectId); + + private: + std::string organizationId_; + long mergeRequestId_; + std::string accessToken_; + long noteId_; + long projectId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CODEUP_MODEL_UPDATEMERGEREQUESTCOMMENTREQUEST_H_ \ No newline at end of file diff --git a/codeup/include/alibabacloud/codeup/model/UpdateMergeRequestCommentResult.h b/codeup/include/alibabacloud/codeup/model/UpdateMergeRequestCommentResult.h new file mode 100644 index 000000000..148369de0 --- /dev/null +++ b/codeup/include/alibabacloud/codeup/model/UpdateMergeRequestCommentResult.h @@ -0,0 +1,61 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_CODEUP_MODEL_UPDATEMERGEREQUESTCOMMENTRESULT_H_ +#define ALIBABACLOUD_CODEUP_MODEL_UPDATEMERGEREQUESTCOMMENTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Codeup + { + namespace Model + { + class ALIBABACLOUD_CODEUP_EXPORT UpdateMergeRequestCommentResult : public ServiceResult + { + public: + struct Result + { + bool result; + }; + + + UpdateMergeRequestCommentResult(); + explicit UpdateMergeRequestCommentResult(const std::string &payload); + ~UpdateMergeRequestCommentResult(); + std::string getErrorCode()const; + std::string getErrorMessage()const; + bool getSuccess()const; + Result getResult()const; + + protected: + void parse(const std::string &payload); + private: + std::string errorCode_; + std::string errorMessage_; + bool success_; + Result result_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CODEUP_MODEL_UPDATEMERGEREQUESTCOMMENTRESULT_H_ \ No newline at end of file diff --git a/codeup/include/alibabacloud/codeup/model/UpdateMergeRequestRequest.h b/codeup/include/alibabacloud/codeup/model/UpdateMergeRequestRequest.h new file mode 100644 index 000000000..cf839decf --- /dev/null +++ b/codeup/include/alibabacloud/codeup/model/UpdateMergeRequestRequest.h @@ -0,0 +1,57 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_CODEUP_MODEL_UPDATEMERGEREQUESTREQUEST_H_ +#define ALIBABACLOUD_CODEUP_MODEL_UPDATEMERGEREQUESTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Codeup + { + namespace Model + { + class ALIBABACLOUD_CODEUP_EXPORT UpdateMergeRequestRequest : public RoaServiceRequest + { + + public: + UpdateMergeRequestRequest(); + ~UpdateMergeRequestRequest(); + + std::string getOrganizationId()const; + void setOrganizationId(const std::string& organizationId); + long getMergeRequestId()const; + void setMergeRequestId(long mergeRequestId); + std::string getAccessToken()const; + void setAccessToken(const std::string& accessToken); + long getProjectId()const; + void setProjectId(long projectId); + + private: + std::string organizationId_; + long mergeRequestId_; + std::string accessToken_; + long projectId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CODEUP_MODEL_UPDATEMERGEREQUESTREQUEST_H_ \ No newline at end of file diff --git a/codeup/include/alibabacloud/codeup/model/UpdateMergeRequestResult.h b/codeup/include/alibabacloud/codeup/model/UpdateMergeRequestResult.h new file mode 100644 index 000000000..2eec8a268 --- /dev/null +++ b/codeup/include/alibabacloud/codeup/model/UpdateMergeRequestResult.h @@ -0,0 +1,133 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_CODEUP_MODEL_UPDATEMERGEREQUESTRESULT_H_ +#define ALIBABACLOUD_CODEUP_MODEL_UPDATEMERGEREQUESTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Codeup + { + namespace Model + { + class ALIBABACLOUD_CODEUP_EXPORT UpdateMergeRequestResult : public ServiceResult + { + public: + struct Result + { + struct ApproveCheckResult + { + struct SatisfiedCheckResultsItem + { + struct ExtraUsersItem + { + std::string avatarUrl; + std::string externUserId; + long id; + std::string name; + }; + std::string checkName; + std::vector satisfiedItems; + std::string checkType; + std::string checkStatus; + std::vector unsatisfiedItems; + std::vector extraUsers; + }; + struct UnsatisfiedCheckResultsItem + { + struct ExtraUsersItem4 + { + std::string avatarUrl; + std::string externUserId; + long id; + std::string name; + }; + std::vector satisfiedItems1; + std::string checkName; + std::string checkType; + std::string checkStatus; + std::vector extraUsers3; + std::vector unsatisfiedItems2; + }; + std::vector unsatisfiedCheckResults; + std::vector satisfiedCheckResults; + std::string totalCheckResult; + }; + struct Author + { + std::string avatarUrl; + std::string externUserId; + long id; + std::string name; + }; + struct AssigneeListItem + { + std::string avatarUrl; + std::string externUserId; + std::string id; + std::string name; + }; + ApproveCheckResult approveCheckResult; + int behindCommitCount; + std::string description; + int aheadCommitCount; + std::string createdAt; + long projectId; + std::string mergeError; + std::string nameWithNamespace; + std::string title; + std::string webUrl; + std::string mergedRevision; + std::string updatedAt; + std::string acceptedRevision; + std::string state; + std::vector assigneeList; + std::string mergeStatus; + std::string sourceBranch; + Author author; + long id; + std::string mergeType; + std::string targetBranch; + }; + + + UpdateMergeRequestResult(); + explicit UpdateMergeRequestResult(const std::string &payload); + ~UpdateMergeRequestResult(); + std::string getErrorCode()const; + std::string getErrorMessage()const; + bool getSuccess()const; + Result getResult()const; + + protected: + void parse(const std::string &payload); + private: + std::string errorCode_; + std::string errorMessage_; + bool success_; + Result result_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CODEUP_MODEL_UPDATEMERGEREQUESTRESULT_H_ \ No newline at end of file diff --git a/codeup/include/alibabacloud/codeup/model/UpdateMergeRequestSettingRequest.h b/codeup/include/alibabacloud/codeup/model/UpdateMergeRequestSettingRequest.h new file mode 100644 index 000000000..86042799d --- /dev/null +++ b/codeup/include/alibabacloud/codeup/model/UpdateMergeRequestSettingRequest.h @@ -0,0 +1,54 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_CODEUP_MODEL_UPDATEMERGEREQUESTSETTINGREQUEST_H_ +#define ALIBABACLOUD_CODEUP_MODEL_UPDATEMERGEREQUESTSETTINGREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Codeup + { + namespace Model + { + class ALIBABACLOUD_CODEUP_EXPORT UpdateMergeRequestSettingRequest : public RoaServiceRequest + { + + public: + UpdateMergeRequestSettingRequest(); + ~UpdateMergeRequestSettingRequest(); + + std::string getOrganizationId()const; + void setOrganizationId(const std::string& organizationId); + std::string getAccessToken()const; + void setAccessToken(const std::string& accessToken); + long getProjectId()const; + void setProjectId(long projectId); + + private: + std::string organizationId_; + std::string accessToken_; + long projectId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CODEUP_MODEL_UPDATEMERGEREQUESTSETTINGREQUEST_H_ \ No newline at end of file diff --git a/codeup/include/alibabacloud/codeup/model/UpdateMergeRequestSettingResult.h b/codeup/include/alibabacloud/codeup/model/UpdateMergeRequestSettingResult.h new file mode 100644 index 000000000..616efbbf4 --- /dev/null +++ b/codeup/include/alibabacloud/codeup/model/UpdateMergeRequestSettingResult.h @@ -0,0 +1,61 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_CODEUP_MODEL_UPDATEMERGEREQUESTSETTINGRESULT_H_ +#define ALIBABACLOUD_CODEUP_MODEL_UPDATEMERGEREQUESTSETTINGRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Codeup + { + namespace Model + { + class ALIBABACLOUD_CODEUP_EXPORT UpdateMergeRequestSettingResult : public ServiceResult + { + public: + struct Result + { + bool result; + }; + + + UpdateMergeRequestSettingResult(); + explicit UpdateMergeRequestSettingResult(const std::string &payload); + ~UpdateMergeRequestSettingResult(); + std::string getErrorCode()const; + std::string getErrorMessage()const; + bool getSuccess()const; + Result getResult()const; + + protected: + void parse(const std::string &payload); + private: + std::string errorCode_; + std::string errorMessage_; + bool success_; + Result result_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CODEUP_MODEL_UPDATEMERGEREQUESTSETTINGRESULT_H_ \ No newline at end of file diff --git a/codeup/src/CodeupClient.cc b/codeup/src/CodeupClient.cc index 588184f99..8a341d58b 100644 --- a/codeup/src/CodeupClient.cc +++ b/codeup/src/CodeupClient.cc @@ -51,6 +51,42 @@ CodeupClient::CodeupClient(const std::string & accessKeyId, const std::string & CodeupClient::~CodeupClient() {} +CodeupClient::AcceptMergeRequestOutcome CodeupClient::acceptMergeRequest(const AcceptMergeRequestRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return AcceptMergeRequestOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return AcceptMergeRequestOutcome(AcceptMergeRequestResult(outcome.result())); + else + return AcceptMergeRequestOutcome(outcome.error()); +} + +void CodeupClient::acceptMergeRequestAsync(const AcceptMergeRequestRequest& request, const AcceptMergeRequestAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, acceptMergeRequest(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CodeupClient::AcceptMergeRequestOutcomeCallable CodeupClient::acceptMergeRequestCallable(const AcceptMergeRequestRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->acceptMergeRequest(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + CodeupClient::AddGroupMemberOutcome CodeupClient::addGroupMember(const AddGroupMemberRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -267,6 +303,42 @@ CodeupClient::CreateMergeRequestOutcomeCallable CodeupClient::createMergeRequest return task->get_future(); } +CodeupClient::CreateMergeRequestCommentOutcome CodeupClient::createMergeRequestComment(const CreateMergeRequestCommentRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CreateMergeRequestCommentOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CreateMergeRequestCommentOutcome(CreateMergeRequestCommentResult(outcome.result())); + else + return CreateMergeRequestCommentOutcome(outcome.error()); +} + +void CodeupClient::createMergeRequestCommentAsync(const CreateMergeRequestCommentRequest& request, const CreateMergeRequestCommentAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, createMergeRequestComment(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CodeupClient::CreateMergeRequestCommentOutcomeCallable CodeupClient::createMergeRequestCommentCallable(const CreateMergeRequestCommentRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->createMergeRequestComment(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + CodeupClient::CreateRepositoryOutcome CodeupClient::createRepository(const CreateRepositoryRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -951,6 +1023,114 @@ CodeupClient::GetGroupDetailOutcomeCallable CodeupClient::getGroupDetailCallable return task->get_future(); } +CodeupClient::GetMergeRequestApproveStatusOutcome CodeupClient::getMergeRequestApproveStatus(const GetMergeRequestApproveStatusRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetMergeRequestApproveStatusOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetMergeRequestApproveStatusOutcome(GetMergeRequestApproveStatusResult(outcome.result())); + else + return GetMergeRequestApproveStatusOutcome(outcome.error()); +} + +void CodeupClient::getMergeRequestApproveStatusAsync(const GetMergeRequestApproveStatusRequest& request, const GetMergeRequestApproveStatusAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getMergeRequestApproveStatus(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CodeupClient::GetMergeRequestApproveStatusOutcomeCallable CodeupClient::getMergeRequestApproveStatusCallable(const GetMergeRequestApproveStatusRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getMergeRequestApproveStatus(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +CodeupClient::GetMergeRequestDetailOutcome CodeupClient::getMergeRequestDetail(const GetMergeRequestDetailRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetMergeRequestDetailOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetMergeRequestDetailOutcome(GetMergeRequestDetailResult(outcome.result())); + else + return GetMergeRequestDetailOutcome(outcome.error()); +} + +void CodeupClient::getMergeRequestDetailAsync(const GetMergeRequestDetailRequest& request, const GetMergeRequestDetailAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getMergeRequestDetail(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CodeupClient::GetMergeRequestDetailOutcomeCallable CodeupClient::getMergeRequestDetailCallable(const GetMergeRequestDetailRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getMergeRequestDetail(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +CodeupClient::GetMergeRequestSettingOutcome CodeupClient::getMergeRequestSetting(const GetMergeRequestSettingRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetMergeRequestSettingOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetMergeRequestSettingOutcome(GetMergeRequestSettingResult(outcome.result())); + else + return GetMergeRequestSettingOutcome(outcome.error()); +} + +void CodeupClient::getMergeRequestSettingAsync(const GetMergeRequestSettingRequest& request, const GetMergeRequestSettingAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getMergeRequestSetting(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CodeupClient::GetMergeRequestSettingOutcomeCallable CodeupClient::getMergeRequestSettingCallable(const GetMergeRequestSettingRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getMergeRequestSetting(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + CodeupClient::GetProjectMemberOutcome CodeupClient::getProjectMember(const GetProjectMemberRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -1203,6 +1383,42 @@ CodeupClient::ListGroupsOutcomeCallable CodeupClient::listGroupsCallable(const L return task->get_future(); } +CodeupClient::ListMergeRequestCommentsOutcome CodeupClient::listMergeRequestComments(const ListMergeRequestCommentsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListMergeRequestCommentsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListMergeRequestCommentsOutcome(ListMergeRequestCommentsResult(outcome.result())); + else + return ListMergeRequestCommentsOutcome(outcome.error()); +} + +void CodeupClient::listMergeRequestCommentsAsync(const ListMergeRequestCommentsRequest& request, const ListMergeRequestCommentsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listMergeRequestComments(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CodeupClient::ListMergeRequestCommentsOutcomeCallable CodeupClient::listMergeRequestCommentsCallable(const ListMergeRequestCommentsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listMergeRequestComments(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + CodeupClient::ListMergeRequestsOutcome CodeupClient::listMergeRequests(const ListMergeRequestsRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -1347,6 +1563,42 @@ CodeupClient::ListRepositoryBranchesOutcomeCallable CodeupClient::listRepository return task->get_future(); } +CodeupClient::ListRepositoryCommitsOutcome CodeupClient::listRepositoryCommits(const ListRepositoryCommitsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListRepositoryCommitsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListRepositoryCommitsOutcome(ListRepositoryCommitsResult(outcome.result())); + else + return ListRepositoryCommitsOutcome(outcome.error()); +} + +void CodeupClient::listRepositoryCommitsAsync(const ListRepositoryCommitsRequest& request, const ListRepositoryCommitsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listRepositoryCommits(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CodeupClient::ListRepositoryCommitsOutcomeCallable CodeupClient::listRepositoryCommitsCallable(const ListRepositoryCommitsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listRepositoryCommits(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + CodeupClient::ListRepositoryMemberOutcome CodeupClient::listRepositoryMember(const ListRepositoryMemberRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -1599,6 +1851,114 @@ CodeupClient::UpdateGroupMemberOutcomeCallable CodeupClient::updateGroupMemberCa return task->get_future(); } +CodeupClient::UpdateMergeRequestOutcome CodeupClient::updateMergeRequest(const UpdateMergeRequestRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return UpdateMergeRequestOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return UpdateMergeRequestOutcome(UpdateMergeRequestResult(outcome.result())); + else + return UpdateMergeRequestOutcome(outcome.error()); +} + +void CodeupClient::updateMergeRequestAsync(const UpdateMergeRequestRequest& request, const UpdateMergeRequestAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, updateMergeRequest(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CodeupClient::UpdateMergeRequestOutcomeCallable CodeupClient::updateMergeRequestCallable(const UpdateMergeRequestRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->updateMergeRequest(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +CodeupClient::UpdateMergeRequestCommentOutcome CodeupClient::updateMergeRequestComment(const UpdateMergeRequestCommentRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return UpdateMergeRequestCommentOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return UpdateMergeRequestCommentOutcome(UpdateMergeRequestCommentResult(outcome.result())); + else + return UpdateMergeRequestCommentOutcome(outcome.error()); +} + +void CodeupClient::updateMergeRequestCommentAsync(const UpdateMergeRequestCommentRequest& request, const UpdateMergeRequestCommentAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, updateMergeRequestComment(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CodeupClient::UpdateMergeRequestCommentOutcomeCallable CodeupClient::updateMergeRequestCommentCallable(const UpdateMergeRequestCommentRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->updateMergeRequestComment(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +CodeupClient::UpdateMergeRequestSettingOutcome CodeupClient::updateMergeRequestSetting(const UpdateMergeRequestSettingRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return UpdateMergeRequestSettingOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return UpdateMergeRequestSettingOutcome(UpdateMergeRequestSettingResult(outcome.result())); + else + return UpdateMergeRequestSettingOutcome(outcome.error()); +} + +void CodeupClient::updateMergeRequestSettingAsync(const UpdateMergeRequestSettingRequest& request, const UpdateMergeRequestSettingAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, updateMergeRequestSetting(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CodeupClient::UpdateMergeRequestSettingOutcomeCallable CodeupClient::updateMergeRequestSettingCallable(const UpdateMergeRequestSettingRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->updateMergeRequestSetting(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + CodeupClient::UpdateRepositoryOutcome CodeupClient::updateRepository(const UpdateRepositoryRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/codeup/src/model/AcceptMergeRequestRequest.cc b/codeup/src/model/AcceptMergeRequestRequest.cc new file mode 100644 index 000000000..188f5183f --- /dev/null +++ b/codeup/src/model/AcceptMergeRequestRequest.cc @@ -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 + +using AlibabaCloud::Codeup::Model::AcceptMergeRequestRequest; + +AcceptMergeRequestRequest::AcceptMergeRequestRequest() : + RoaServiceRequest("codeup", "2020-04-14") +{ + setResourcePath("/api/v3/projects/[ProjectId]/merge_request/[MergeRequestId]/accept"); + setMethod(HttpRequest::Method::Put); +} + +AcceptMergeRequestRequest::~AcceptMergeRequestRequest() +{} + +std::string AcceptMergeRequestRequest::getOrganizationId()const +{ + return organizationId_; +} + +void AcceptMergeRequestRequest::setOrganizationId(const std::string& organizationId) +{ + organizationId_ = organizationId; + setParameter("OrganizationId", organizationId); +} + +long AcceptMergeRequestRequest::getMergeRequestId()const +{ + return mergeRequestId_; +} + +void AcceptMergeRequestRequest::setMergeRequestId(long mergeRequestId) +{ + mergeRequestId_ = mergeRequestId; + setParameter("MergeRequestId", std::to_string(mergeRequestId)); +} + +std::string AcceptMergeRequestRequest::getAccessToken()const +{ + return accessToken_; +} + +void AcceptMergeRequestRequest::setAccessToken(const std::string& accessToken) +{ + accessToken_ = accessToken; + setParameter("AccessToken", accessToken); +} + +long AcceptMergeRequestRequest::getProjectId()const +{ + return projectId_; +} + +void AcceptMergeRequestRequest::setProjectId(long projectId) +{ + projectId_ = projectId; + setParameter("ProjectId", std::to_string(projectId)); +} + diff --git a/codeup/src/model/AcceptMergeRequestResult.cc b/codeup/src/model/AcceptMergeRequestResult.cc new file mode 100644 index 000000000..c9bb3f1a9 --- /dev/null +++ b/codeup/src/model/AcceptMergeRequestResult.cc @@ -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 +#include + +using namespace AlibabaCloud::Codeup; +using namespace AlibabaCloud::Codeup::Model; + +AcceptMergeRequestResult::AcceptMergeRequestResult() : + ServiceResult() +{} + +AcceptMergeRequestResult::AcceptMergeRequestResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +AcceptMergeRequestResult::~AcceptMergeRequestResult() +{} + +void AcceptMergeRequestResult::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["AcceptedRevision"].isNull()) + result_.acceptedRevision = resultNode["AcceptedRevision"].asString(); + if(!resultNode["AheadCommitCount"].isNull()) + result_.aheadCommitCount = std::stoi(resultNode["AheadCommitCount"].asString()); + if(!resultNode["BehindCommitCount"].isNull()) + result_.behindCommitCount = std::stoi(resultNode["BehindCommitCount"].asString()); + if(!resultNode["CreatedAt"].isNull()) + result_.createdAt = resultNode["CreatedAt"].asString(); + if(!resultNode["Description"].isNull()) + result_.description = resultNode["Description"].asString(); + if(!resultNode["Id"].isNull()) + result_.id = std::stol(resultNode["Id"].asString()); + if(!resultNode["MergeError"].isNull()) + result_.mergeError = resultNode["MergeError"].asString(); + if(!resultNode["MergeStatus"].isNull()) + result_.mergeStatus = resultNode["MergeStatus"].asString(); + if(!resultNode["MergeType"].isNull()) + result_.mergeType = resultNode["MergeType"].asString(); + if(!resultNode["MergedRevision"].isNull()) + result_.mergedRevision = resultNode["MergedRevision"].asString(); + if(!resultNode["NameWithNamespace"].isNull()) + result_.nameWithNamespace = resultNode["NameWithNamespace"].asString(); + if(!resultNode["ProjectId"].isNull()) + result_.projectId = std::stol(resultNode["ProjectId"].asString()); + if(!resultNode["SourceBranch"].isNull()) + result_.sourceBranch = resultNode["SourceBranch"].asString(); + if(!resultNode["State"].isNull()) + result_.state = resultNode["State"].asString(); + if(!resultNode["TargetBranch"].isNull()) + result_.targetBranch = resultNode["TargetBranch"].asString(); + if(!resultNode["Title"].isNull()) + result_.title = resultNode["Title"].asString(); + if(!resultNode["UpdatedAt"].isNull()) + result_.updatedAt = resultNode["UpdatedAt"].asString(); + if(!resultNode["WebUrl"].isNull()) + result_.webUrl = resultNode["WebUrl"].asString(); + auto allAssigneeListNode = resultNode["AssigneeList"]["AssigneeListItem"]; + for (auto resultNodeAssigneeListAssigneeListItem : allAssigneeListNode) + { + Result::AssigneeListItem assigneeListItemObject; + if(!resultNodeAssigneeListAssigneeListItem["AvatarUrl"].isNull()) + assigneeListItemObject.avatarUrl = resultNodeAssigneeListAssigneeListItem["AvatarUrl"].asString(); + if(!resultNodeAssigneeListAssigneeListItem["ExternUserId"].isNull()) + assigneeListItemObject.externUserId = resultNodeAssigneeListAssigneeListItem["ExternUserId"].asString(); + if(!resultNodeAssigneeListAssigneeListItem["Id"].isNull()) + assigneeListItemObject.id = resultNodeAssigneeListAssigneeListItem["Id"].asString(); + if(!resultNodeAssigneeListAssigneeListItem["Name"].isNull()) + assigneeListItemObject.name = resultNodeAssigneeListAssigneeListItem["Name"].asString(); + result_.assigneeList.push_back(assigneeListItemObject); + } + 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["CheckName"].isNull()) + satisfiedCheckResultsItemObject.checkName = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckName"].asString(); + if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckStatus"].isNull()) + satisfiedCheckResultsItemObject.checkStatus = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckStatus"].asString(); + if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckType"].isNull()) + satisfiedCheckResultsItemObject.checkType = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckType"].asString(); + auto allExtraUsersNode = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["ExtraUsers"]["ExtraUsersItem"]; + for (auto approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem : allExtraUsersNode) + { + Result::ApproveCheckResult::SatisfiedCheckResultsItem::ExtraUsersItem extraUsersObject; + if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["AvatarUrl"].isNull()) + extraUsersObject.avatarUrl = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["AvatarUrl"].asString(); + if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["ExternUserId"].isNull()) + extraUsersObject.externUserId = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["ExternUserId"].asString(); + if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["Id"].isNull()) + extraUsersObject.id = std::stol(approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["Id"].asString()); + if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["Name"].isNull()) + extraUsersObject.name = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["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["CheckName"].isNull()) + unsatisfiedCheckResultsItemObject.checkName = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckName"].asString(); + if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckStatus"].isNull()) + unsatisfiedCheckResultsItemObject.checkStatus = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckStatus"].asString(); + if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckType"].isNull()) + unsatisfiedCheckResultsItemObject.checkType = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckType"].asString(); + auto allExtraUsers3Node = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["ExtraUsers"]["ExtraUsersItem"]; + for (auto approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem : allExtraUsers3Node) + { + Result::ApproveCheckResult::UnsatisfiedCheckResultsItem::ExtraUsersItem4 extraUsers3Object; + if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["AvatarUrl"].isNull()) + extraUsers3Object.avatarUrl = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["AvatarUrl"].asString(); + if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["ExternUserId"].isNull()) + extraUsers3Object.externUserId = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["ExternUserId"].asString(); + if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["Id"].isNull()) + extraUsers3Object.id = std::stol(approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["Id"].asString()); + if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["Name"].isNull()) + extraUsers3Object.name = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["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); + } + auto authorNode = resultNode["Author"]; + if(!authorNode["AvatarUrl"].isNull()) + result_.author.avatarUrl = authorNode["AvatarUrl"].asString(); + if(!authorNode["ExternUserId"].isNull()) + result_.author.externUserId = authorNode["ExternUserId"].asString(); + if(!authorNode["Id"].isNull()) + result_.author.id = std::stol(authorNode["Id"].asString()); + if(!authorNode["Name"].isNull()) + result_.author.name = authorNode["Name"].asString(); + if(!value["ErrorCode"].isNull()) + errorCode_ = value["ErrorCode"].asString(); + if(!value["ErrorMessage"].isNull()) + errorMessage_ = value["ErrorMessage"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +std::string AcceptMergeRequestResult::getErrorCode()const +{ + return errorCode_; +} + +std::string AcceptMergeRequestResult::getErrorMessage()const +{ + return errorMessage_; +} + +bool AcceptMergeRequestResult::getSuccess()const +{ + return success_; +} + +AcceptMergeRequestResult::Result AcceptMergeRequestResult::getResult()const +{ + return result_; +} + diff --git a/codeup/src/model/CreateMergeRequestCommentRequest.cc b/codeup/src/model/CreateMergeRequestCommentRequest.cc new file mode 100644 index 000000000..ae238b6b0 --- /dev/null +++ b/codeup/src/model/CreateMergeRequestCommentRequest.cc @@ -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 + +using AlibabaCloud::Codeup::Model::CreateMergeRequestCommentRequest; + +CreateMergeRequestCommentRequest::CreateMergeRequestCommentRequest() : + RoaServiceRequest("codeup", "2020-04-14") +{ + setResourcePath("/api/v4/projects/[ProjectId]/merge_request/[MergeRequestId]/comments"); + setMethod(HttpRequest::Method::Post); +} + +CreateMergeRequestCommentRequest::~CreateMergeRequestCommentRequest() +{} + +std::string CreateMergeRequestCommentRequest::getOrganizationId()const +{ + return organizationId_; +} + +void CreateMergeRequestCommentRequest::setOrganizationId(const std::string& organizationId) +{ + organizationId_ = organizationId; + setParameter("OrganizationId", organizationId); +} + +long CreateMergeRequestCommentRequest::getMergeRequestId()const +{ + return mergeRequestId_; +} + +void CreateMergeRequestCommentRequest::setMergeRequestId(long mergeRequestId) +{ + mergeRequestId_ = mergeRequestId; + setParameter("MergeRequestId", std::to_string(mergeRequestId)); +} + +std::string CreateMergeRequestCommentRequest::getAccessToken()const +{ + return accessToken_; +} + +void CreateMergeRequestCommentRequest::setAccessToken(const std::string& accessToken) +{ + accessToken_ = accessToken; + setParameter("AccessToken", accessToken); +} + +long CreateMergeRequestCommentRequest::getProjectId()const +{ + return projectId_; +} + +void CreateMergeRequestCommentRequest::setProjectId(long projectId) +{ + projectId_ = projectId; + setParameter("ProjectId", std::to_string(projectId)); +} + diff --git a/codeup/src/model/CreateMergeRequestCommentResult.cc b/codeup/src/model/CreateMergeRequestCommentResult.cc new file mode 100644 index 000000000..466e1b8c4 --- /dev/null +++ b/codeup/src/model/CreateMergeRequestCommentResult.cc @@ -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 +#include + +using namespace AlibabaCloud::Codeup; +using namespace AlibabaCloud::Codeup::Model; + +CreateMergeRequestCommentResult::CreateMergeRequestCommentResult() : + ServiceResult() +{} + +CreateMergeRequestCommentResult::CreateMergeRequestCommentResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CreateMergeRequestCommentResult::~CreateMergeRequestCommentResult() +{} + +void CreateMergeRequestCommentResult::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["Note"].isNull()) + result_.note = resultNode["Note"].asString(); + if(!resultNode["CreatedAt"].isNull()) + result_.createdAt = resultNode["CreatedAt"].asString(); + if(!resultNode["UpdatedAt"].isNull()) + result_.updatedAt = resultNode["UpdatedAt"].asString(); + if(!resultNode["ProjectId"].isNull()) + result_.projectId = std::stol(resultNode["ProjectId"].asString()); + if(!resultNode["IsDraft"].isNull()) + result_.isDraft = resultNode["IsDraft"].asString() == "true"; + if(!resultNode["ParentNoteId"].isNull()) + result_.parentNoteId = std::stol(resultNode["ParentNoteId"].asString()); + if(!resultNode["Line"].isNull()) + result_.line = std::stol(resultNode["Line"].asString()); + if(!resultNode["Side"].isNull()) + result_.side = resultNode["Side"].asString(); + if(!resultNode["Path"].isNull()) + result_.path = resultNode["Path"].asString(); + if(!resultNode["RangeContext"].isNull()) + result_.rangeContext = resultNode["RangeContext"].asString(); + if(!resultNode["OutDated"].isNull()) + result_.outDated = resultNode["OutDated"].asString() == "true"; + if(!resultNode["Closed"].isNull()) + result_.closed = std::stoi(resultNode["Closed"].asString()); + auto authorNode = resultNode["Author"]; + if(!authorNode["Id"].isNull()) + result_.author.id = std::stol(authorNode["Id"].asString()); + if(!authorNode["AvatarUrl"].isNull()) + result_.author.avatarUrl = authorNode["AvatarUrl"].asString(); + if(!authorNode["ExternUserId"].isNull()) + result_.author.externUserId = authorNode["ExternUserId"].asString(); + if(!authorNode["Name"].isNull()) + result_.author.name = authorNode["Name"].asString(); + if(!authorNode["Email"].isNull()) + result_.author.email = authorNode["Email"].asString(); + if(!value["ErrorCode"].isNull()) + errorCode_ = value["ErrorCode"].asString(); + if(!value["ErrorMessage"].isNull()) + errorMessage_ = value["ErrorMessage"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +std::string CreateMergeRequestCommentResult::getErrorCode()const +{ + return errorCode_; +} + +std::string CreateMergeRequestCommentResult::getErrorMessage()const +{ + return errorMessage_; +} + +bool CreateMergeRequestCommentResult::getSuccess()const +{ + return success_; +} + +CreateMergeRequestCommentResult::Result CreateMergeRequestCommentResult::getResult()const +{ + return result_; +} + diff --git a/codeup/src/model/GetMergeRequestApproveStatusRequest.cc b/codeup/src/model/GetMergeRequestApproveStatusRequest.cc new file mode 100644 index 000000000..313bcd91d --- /dev/null +++ b/codeup/src/model/GetMergeRequestApproveStatusRequest.cc @@ -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 + +using AlibabaCloud::Codeup::Model::GetMergeRequestApproveStatusRequest; + +GetMergeRequestApproveStatusRequest::GetMergeRequestApproveStatusRequest() : + RoaServiceRequest("codeup", "2020-04-14") +{ + setResourcePath("/api/v4/projects/[ProjectId]/merge_request/[MergeRequestId]/approve_status"); + setMethod(HttpRequest::Method::Get); +} + +GetMergeRequestApproveStatusRequest::~GetMergeRequestApproveStatusRequest() +{} + +std::string GetMergeRequestApproveStatusRequest::getOrganizationId()const +{ + return organizationId_; +} + +void GetMergeRequestApproveStatusRequest::setOrganizationId(const std::string& organizationId) +{ + organizationId_ = organizationId; + setParameter("OrganizationId", organizationId); +} + +long GetMergeRequestApproveStatusRequest::getMergeRequestId()const +{ + return mergeRequestId_; +} + +void GetMergeRequestApproveStatusRequest::setMergeRequestId(long mergeRequestId) +{ + mergeRequestId_ = mergeRequestId; + setParameter("MergeRequestId", std::to_string(mergeRequestId)); +} + +std::string GetMergeRequestApproveStatusRequest::getAccessToken()const +{ + return accessToken_; +} + +void GetMergeRequestApproveStatusRequest::setAccessToken(const std::string& accessToken) +{ + accessToken_ = accessToken; + setParameter("AccessToken", accessToken); +} + +long GetMergeRequestApproveStatusRequest::getProjectId()const +{ + return projectId_; +} + +void GetMergeRequestApproveStatusRequest::setProjectId(long projectId) +{ + projectId_ = projectId; + setParameter("ProjectId", std::to_string(projectId)); +} + diff --git a/codeup/src/model/GetMergeRequestApproveStatusResult.cc b/codeup/src/model/GetMergeRequestApproveStatusResult.cc new file mode 100644 index 000000000..83d9cb397 --- /dev/null +++ b/codeup/src/model/GetMergeRequestApproveStatusResult.cc @@ -0,0 +1,75 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Codeup; +using namespace AlibabaCloud::Codeup::Model; + +GetMergeRequestApproveStatusResult::GetMergeRequestApproveStatusResult() : + ServiceResult() +{} + +GetMergeRequestApproveStatusResult::GetMergeRequestApproveStatusResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetMergeRequestApproveStatusResult::~GetMergeRequestApproveStatusResult() +{} + +void GetMergeRequestApproveStatusResult::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["ApproveStatus"].isNull()) + result_.approveStatus = resultNode["ApproveStatus"].asString(); + if(!resultNode["Message"].isNull()) + result_.message = resultNode["Message"].asString(); + if(!value["ErrorCode"].isNull()) + errorCode_ = value["ErrorCode"].asString(); + if(!value["ErrorMessage"].isNull()) + errorMessage_ = value["ErrorMessage"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +std::string GetMergeRequestApproveStatusResult::getErrorCode()const +{ + return errorCode_; +} + +std::string GetMergeRequestApproveStatusResult::getErrorMessage()const +{ + return errorMessage_; +} + +bool GetMergeRequestApproveStatusResult::getSuccess()const +{ + return success_; +} + +GetMergeRequestApproveStatusResult::Result GetMergeRequestApproveStatusResult::getResult()const +{ + return result_; +} + diff --git a/codeup/src/model/GetMergeRequestDetailRequest.cc b/codeup/src/model/GetMergeRequestDetailRequest.cc new file mode 100644 index 000000000..9281840e2 --- /dev/null +++ b/codeup/src/model/GetMergeRequestDetailRequest.cc @@ -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 + +using AlibabaCloud::Codeup::Model::GetMergeRequestDetailRequest; + +GetMergeRequestDetailRequest::GetMergeRequestDetailRequest() : + RoaServiceRequest("codeup", "2020-04-14") +{ + setResourcePath("/api/v4/projects/[ProjectId]/merge_request/[MergeRequestId]"); + setMethod(HttpRequest::Method::Get); +} + +GetMergeRequestDetailRequest::~GetMergeRequestDetailRequest() +{} + +std::string GetMergeRequestDetailRequest::getOrganizationId()const +{ + return organizationId_; +} + +void GetMergeRequestDetailRequest::setOrganizationId(const std::string& organizationId) +{ + organizationId_ = organizationId; + setParameter("OrganizationId", organizationId); +} + +long GetMergeRequestDetailRequest::getMergeRequestId()const +{ + return mergeRequestId_; +} + +void GetMergeRequestDetailRequest::setMergeRequestId(long mergeRequestId) +{ + mergeRequestId_ = mergeRequestId; + setParameter("MergeRequestId", std::to_string(mergeRequestId)); +} + +std::string GetMergeRequestDetailRequest::getAccessToken()const +{ + return accessToken_; +} + +void GetMergeRequestDetailRequest::setAccessToken(const std::string& accessToken) +{ + accessToken_ = accessToken; + setParameter("AccessToken", accessToken); +} + +long GetMergeRequestDetailRequest::getProjectId()const +{ + return projectId_; +} + +void GetMergeRequestDetailRequest::setProjectId(long projectId) +{ + projectId_ = projectId; + setParameter("ProjectId", std::to_string(projectId)); +} + diff --git a/codeup/src/model/GetMergeRequestDetailResult.cc b/codeup/src/model/GetMergeRequestDetailResult.cc new file mode 100644 index 000000000..f04891e75 --- /dev/null +++ b/codeup/src/model/GetMergeRequestDetailResult.cc @@ -0,0 +1,203 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Codeup; +using namespace AlibabaCloud::Codeup::Model; + +GetMergeRequestDetailResult::GetMergeRequestDetailResult() : + ServiceResult() +{} + +GetMergeRequestDetailResult::GetMergeRequestDetailResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetMergeRequestDetailResult::~GetMergeRequestDetailResult() +{} + +void GetMergeRequestDetailResult::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["AcceptedRevision"].isNull()) + result_.acceptedRevision = resultNode["AcceptedRevision"].asString(); + if(!resultNode["AheadCommitCount"].isNull()) + result_.aheadCommitCount = std::stoi(resultNode["AheadCommitCount"].asString()); + if(!resultNode["BehindCommitCount"].isNull()) + result_.behindCommitCount = std::stoi(resultNode["BehindCommitCount"].asString()); + if(!resultNode["CreatedAt"].isNull()) + result_.createdAt = resultNode["CreatedAt"].asString(); + if(!resultNode["Description"].isNull()) + result_.description = resultNode["Description"].asString(); + if(!resultNode["Id"].isNull()) + result_.id = std::stol(resultNode["Id"].asString()); + if(!resultNode["MergeError"].isNull()) + result_.mergeError = resultNode["MergeError"].asString(); + if(!resultNode["MergeStatus"].isNull()) + result_.mergeStatus = resultNode["MergeStatus"].asString(); + if(!resultNode["MergeType"].isNull()) + result_.mergeType = resultNode["MergeType"].asString(); + if(!resultNode["MergedRevision"].isNull()) + result_.mergedRevision = resultNode["MergedRevision"].asString(); + if(!resultNode["NameWithNamespace"].isNull()) + result_.nameWithNamespace = resultNode["NameWithNamespace"].asString(); + if(!resultNode["ProjectId"].isNull()) + result_.projectId = std::stol(resultNode["ProjectId"].asString()); + if(!resultNode["SourceBranch"].isNull()) + result_.sourceBranch = resultNode["SourceBranch"].asString(); + if(!resultNode["State"].isNull()) + result_.state = resultNode["State"].asString(); + if(!resultNode["TargetBranch"].isNull()) + result_.targetBranch = resultNode["TargetBranch"].asString(); + if(!resultNode["Title"].isNull()) + result_.title = resultNode["Title"].asString(); + if(!resultNode["UpdatedAt"].isNull()) + result_.updatedAt = resultNode["UpdatedAt"].asString(); + if(!resultNode["WebUrl"].isNull()) + result_.webUrl = resultNode["WebUrl"].asString(); + if(!resultNode["IsSupportMerge"].isNull()) + result_.isSupportMerge = resultNode["IsSupportMerge"].asString() == "true"; + auto allAssigneeListNode = resultNode["AssigneeList"]["AssigneeListItem"]; + for (auto resultNodeAssigneeListAssigneeListItem : allAssigneeListNode) + { + Result::AssigneeListItem assigneeListItemObject; + if(!resultNodeAssigneeListAssigneeListItem["AvatarUrl"].isNull()) + assigneeListItemObject.avatarUrl = resultNodeAssigneeListAssigneeListItem["AvatarUrl"].asString(); + if(!resultNodeAssigneeListAssigneeListItem["ExternUserId"].isNull()) + assigneeListItemObject.externUserId = resultNodeAssigneeListAssigneeListItem["ExternUserId"].asString(); + if(!resultNodeAssigneeListAssigneeListItem["Id"].isNull()) + assigneeListItemObject.id = resultNodeAssigneeListAssigneeListItem["Id"].asString(); + if(!resultNodeAssigneeListAssigneeListItem["Name"].isNull()) + assigneeListItemObject.name = resultNodeAssigneeListAssigneeListItem["Name"].asString(); + if(!resultNodeAssigneeListAssigneeListItem["Status"].isNull()) + assigneeListItemObject.status = resultNodeAssigneeListAssigneeListItem["Status"].asString(); + if(!resultNodeAssigneeListAssigneeListItem["Email"].isNull()) + assigneeListItemObject.email = resultNodeAssigneeListAssigneeListItem["Email"].asString(); + result_.assigneeList.push_back(assigneeListItemObject); + } + 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["CheckName"].isNull()) + satisfiedCheckResultsItemObject.checkName = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckName"].asString(); + if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckStatus"].isNull()) + satisfiedCheckResultsItemObject.checkStatus = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckStatus"].asString(); + if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckType"].isNull()) + satisfiedCheckResultsItemObject.checkType = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckType"].asString(); + auto allExtraUsersNode = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["ExtraUsers"]["ExtraUsersItem"]; + for (auto approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem : allExtraUsersNode) + { + Result::ApproveCheckResult::SatisfiedCheckResultsItem::ExtraUsersItem extraUsersObject; + if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["AvatarUrl"].isNull()) + extraUsersObject.avatarUrl = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["AvatarUrl"].asString(); + if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["ExternUserId"].isNull()) + extraUsersObject.externUserId = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["ExternUserId"].asString(); + if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["Id"].isNull()) + extraUsersObject.id = std::stol(approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["Id"].asString()); + if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["Name"].isNull()) + extraUsersObject.name = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["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["CheckName"].isNull()) + unsatisfiedCheckResultsItemObject.checkName = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckName"].asString(); + if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckStatus"].isNull()) + unsatisfiedCheckResultsItemObject.checkStatus = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckStatus"].asString(); + if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckType"].isNull()) + unsatisfiedCheckResultsItemObject.checkType = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckType"].asString(); + auto allExtraUsers3Node = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["ExtraUsers"]["ExtraUsersItem"]; + for (auto approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem : allExtraUsers3Node) + { + Result::ApproveCheckResult::UnsatisfiedCheckResultsItem::ExtraUsersItem4 extraUsers3Object; + if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["AvatarUrl"].isNull()) + extraUsers3Object.avatarUrl = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["AvatarUrl"].asString(); + if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["ExternUserId"].isNull()) + extraUsers3Object.externUserId = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["ExternUserId"].asString(); + if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["Id"].isNull()) + extraUsers3Object.id = std::stol(approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["Id"].asString()); + if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["Name"].isNull()) + extraUsers3Object.name = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["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); + } + auto authorNode = resultNode["Author"]; + if(!authorNode["AvatarUrl"].isNull()) + result_.author.avatarUrl = authorNode["AvatarUrl"].asString(); + if(!authorNode["ExternUserId"].isNull()) + result_.author.externUserId = authorNode["ExternUserId"].asString(); + if(!authorNode["Id"].isNull()) + result_.author.id = std::stol(authorNode["Id"].asString()); + if(!authorNode["Name"].isNull()) + result_.author.name = authorNode["Name"].asString(); + if(!value["ErrorCode"].isNull()) + errorCode_ = value["ErrorCode"].asString(); + if(!value["ErrorMessage"].isNull()) + errorMessage_ = value["ErrorMessage"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +std::string GetMergeRequestDetailResult::getErrorCode()const +{ + return errorCode_; +} + +std::string GetMergeRequestDetailResult::getErrorMessage()const +{ + return errorMessage_; +} + +bool GetMergeRequestDetailResult::getSuccess()const +{ + return success_; +} + +GetMergeRequestDetailResult::Result GetMergeRequestDetailResult::getResult()const +{ + return result_; +} + diff --git a/codeup/src/model/GetMergeRequestSettingRequest.cc b/codeup/src/model/GetMergeRequestSettingRequest.cc new file mode 100644 index 000000000..ccd062694 --- /dev/null +++ b/codeup/src/model/GetMergeRequestSettingRequest.cc @@ -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 + +using AlibabaCloud::Codeup::Model::GetMergeRequestSettingRequest; + +GetMergeRequestSettingRequest::GetMergeRequestSettingRequest() : + RoaServiceRequest("codeup", "2020-04-14") +{ + setResourcePath("/api/v4/projects/[ProjectId]/settings/merge_requests"); + setMethod(HttpRequest::Method::Get); +} + +GetMergeRequestSettingRequest::~GetMergeRequestSettingRequest() +{} + +std::string GetMergeRequestSettingRequest::getOrganizationId()const +{ + return organizationId_; +} + +void GetMergeRequestSettingRequest::setOrganizationId(const std::string& organizationId) +{ + organizationId_ = organizationId; + setParameter("OrganizationId", organizationId); +} + +std::string GetMergeRequestSettingRequest::getAccessToken()const +{ + return accessToken_; +} + +void GetMergeRequestSettingRequest::setAccessToken(const std::string& accessToken) +{ + accessToken_ = accessToken; + setParameter("AccessToken", accessToken); +} + +long GetMergeRequestSettingRequest::getProjectId()const +{ + return projectId_; +} + +void GetMergeRequestSettingRequest::setProjectId(long projectId) +{ + projectId_ = projectId; + setParameter("ProjectId", std::to_string(projectId)); +} + diff --git a/codeup/src/model/GetMergeRequestSettingResult.cc b/codeup/src/model/GetMergeRequestSettingResult.cc new file mode 100644 index 000000000..acb52922f --- /dev/null +++ b/codeup/src/model/GetMergeRequestSettingResult.cc @@ -0,0 +1,76 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Codeup; +using namespace AlibabaCloud::Codeup::Model; + +GetMergeRequestSettingResult::GetMergeRequestSettingResult() : + ServiceResult() +{} + +GetMergeRequestSettingResult::GetMergeRequestSettingResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetMergeRequestSettingResult::~GetMergeRequestSettingResult() +{} + +void GetMergeRequestSettingResult::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["IsEnableSmartCodeReview"].isNull()) + result_.isEnableSmartCodeReview = resultNode["IsEnableSmartCodeReview"].asString() == "true"; + auto allMergeTypes = resultNode["MergeTypes"]["MergeTypes"]; + for (auto value : allMergeTypes) + result_.mergeTypes.push_back(value.asString()); + if(!value["ErrorCode"].isNull()) + errorCode_ = value["ErrorCode"].asString(); + if(!value["ErrorMessage"].isNull()) + errorMessage_ = value["ErrorMessage"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +std::string GetMergeRequestSettingResult::getErrorCode()const +{ + return errorCode_; +} + +std::string GetMergeRequestSettingResult::getErrorMessage()const +{ + return errorMessage_; +} + +bool GetMergeRequestSettingResult::getSuccess()const +{ + return success_; +} + +GetMergeRequestSettingResult::Result GetMergeRequestSettingResult::getResult()const +{ + return result_; +} + diff --git a/codeup/src/model/ListMergeRequestCommentsRequest.cc b/codeup/src/model/ListMergeRequestCommentsRequest.cc new file mode 100644 index 000000000..143c24bed --- /dev/null +++ b/codeup/src/model/ListMergeRequestCommentsRequest.cc @@ -0,0 +1,96 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Codeup::Model::ListMergeRequestCommentsRequest; + +ListMergeRequestCommentsRequest::ListMergeRequestCommentsRequest() : + RoaServiceRequest("codeup", "2020-04-14") +{ + setResourcePath("/api/v4/projects/[ProjectId]/merge_request/[MergeRequestId]/comments"); + setMethod(HttpRequest::Method::Get); +} + +ListMergeRequestCommentsRequest::~ListMergeRequestCommentsRequest() +{} + +std::string ListMergeRequestCommentsRequest::getOrganizationId()const +{ + return organizationId_; +} + +void ListMergeRequestCommentsRequest::setOrganizationId(const std::string& organizationId) +{ + organizationId_ = organizationId; + setParameter("OrganizationId", organizationId); +} + +long ListMergeRequestCommentsRequest::getMergeRequestId()const +{ + return mergeRequestId_; +} + +void ListMergeRequestCommentsRequest::setMergeRequestId(long mergeRequestId) +{ + mergeRequestId_ = mergeRequestId; + setParameter("MergeRequestId", std::to_string(mergeRequestId)); +} + +std::string ListMergeRequestCommentsRequest::getFromCommit()const +{ + return fromCommit_; +} + +void ListMergeRequestCommentsRequest::setFromCommit(const std::string& fromCommit) +{ + fromCommit_ = fromCommit; + setParameter("FromCommit", fromCommit); +} + +std::string ListMergeRequestCommentsRequest::getAccessToken()const +{ + return accessToken_; +} + +void ListMergeRequestCommentsRequest::setAccessToken(const std::string& accessToken) +{ + accessToken_ = accessToken; + setParameter("AccessToken", accessToken); +} + +std::string ListMergeRequestCommentsRequest::getToCommit()const +{ + return toCommit_; +} + +void ListMergeRequestCommentsRequest::setToCommit(const std::string& toCommit) +{ + toCommit_ = toCommit; + setParameter("ToCommit", toCommit); +} + +long ListMergeRequestCommentsRequest::getProjectId()const +{ + return projectId_; +} + +void ListMergeRequestCommentsRequest::setProjectId(long projectId) +{ + projectId_ = projectId; + setParameter("ProjectId", std::to_string(projectId)); +} + diff --git a/codeup/src/model/ListMergeRequestCommentsResult.cc b/codeup/src/model/ListMergeRequestCommentsResult.cc new file mode 100644 index 000000000..19b8de9af --- /dev/null +++ b/codeup/src/model/ListMergeRequestCommentsResult.cc @@ -0,0 +1,120 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Codeup; +using namespace AlibabaCloud::Codeup::Model; + +ListMergeRequestCommentsResult::ListMergeRequestCommentsResult() : + ServiceResult() +{} + +ListMergeRequestCommentsResult::ListMergeRequestCommentsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListMergeRequestCommentsResult::~ListMergeRequestCommentsResult() +{} + +void ListMergeRequestCommentsResult::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["Closed"].isNull()) + resultObject.closed = std::stoi(valueResultResultItem["Closed"].asString()); + if(!valueResultResultItem["CreatedAt"].isNull()) + resultObject.createdAt = valueResultResultItem["CreatedAt"].asString(); + if(!valueResultResultItem["Id"].isNull()) + resultObject.id = std::stol(valueResultResultItem["Id"].asString()); + if(!valueResultResultItem["IsDraft"].isNull()) + resultObject.isDraft = valueResultResultItem["IsDraft"].asString() == "true"; + if(!valueResultResultItem["Line"].isNull()) + resultObject.line = std::stol(valueResultResultItem["Line"].asString()); + if(!valueResultResultItem["Note"].isNull()) + resultObject.note = valueResultResultItem["Note"].asString(); + if(!valueResultResultItem["OutDated"].isNull()) + resultObject.outDated = valueResultResultItem["OutDated"].asString() == "true"; + if(!valueResultResultItem["ParentNoteId"].isNull()) + resultObject.parentNoteId = std::stol(valueResultResultItem["ParentNoteId"].asString()); + if(!valueResultResultItem["Path"].isNull()) + resultObject.path = valueResultResultItem["Path"].asString(); + if(!valueResultResultItem["ProjectId"].isNull()) + resultObject.projectId = std::stol(valueResultResultItem["ProjectId"].asString()); + if(!valueResultResultItem["RangeContext"].isNull()) + resultObject.rangeContext = valueResultResultItem["RangeContext"].asString(); + if(!valueResultResultItem["Side"].isNull()) + resultObject.side = valueResultResultItem["Side"].asString(); + if(!valueResultResultItem["UpdatedAt"].isNull()) + resultObject.updatedAt = valueResultResultItem["UpdatedAt"].asString(); + auto authorNode = value["Author"]; + if(!authorNode["AvatarUrl"].isNull()) + resultObject.author.avatarUrl = authorNode["AvatarUrl"].asString(); + if(!authorNode["Email"].isNull()) + resultObject.author.email = authorNode["Email"].asString(); + if(!authorNode["ExternUserId"].isNull()) + resultObject.author.externUserId = authorNode["ExternUserId"].asString(); + if(!authorNode["Id"].isNull()) + resultObject.author.id = std::stol(authorNode["Id"].asString()); + if(!authorNode["Name"].isNull()) + resultObject.author.name = authorNode["Name"].asString(); + result_.push_back(resultObject); + } + if(!value["ErrorCode"].isNull()) + errorCode_ = value["ErrorCode"].asString(); + if(!value["ErrorMessage"].isNull()) + errorMessage_ = value["ErrorMessage"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + if(!value["Total"].isNull()) + total_ = std::stol(value["Total"].asString()); + +} + +long ListMergeRequestCommentsResult::getTotal()const +{ + return total_; +} + +std::string ListMergeRequestCommentsResult::getErrorCode()const +{ + return errorCode_; +} + +std::string ListMergeRequestCommentsResult::getErrorMessage()const +{ + return errorMessage_; +} + +bool ListMergeRequestCommentsResult::getSuccess()const +{ + return success_; +} + +std::vector ListMergeRequestCommentsResult::getResult()const +{ + return result_; +} + diff --git a/codeup/src/model/ListMergeRequestsResult.cc b/codeup/src/model/ListMergeRequestsResult.cc index 09079a40f..4e483a429 100644 --- a/codeup/src/model/ListMergeRequestsResult.cc +++ b/codeup/src/model/ListMergeRequestsResult.cc @@ -79,6 +79,8 @@ void ListMergeRequestsResult::parse(const std::string &payload) resultObject.updatedAt = valueResultResultItem["UpdatedAt"].asString(); if(!valueResultResultItem["WebUrl"].isNull()) resultObject.webUrl = valueResultResultItem["WebUrl"].asString(); + if(!valueResultResultItem["IsSupportMerge"].isNull()) + resultObject.isSupportMerge = valueResultResultItem["IsSupportMerge"].asString() == "true"; auto allAssigneeListNode = valueResultResultItem["AssigneeList"]["AssigneeListItem"]; for (auto valueResultResultItemAssigneeListAssigneeListItem : allAssigneeListNode) { @@ -91,6 +93,10 @@ void ListMergeRequestsResult::parse(const std::string &payload) assigneeListObject.id = valueResultResultItemAssigneeListAssigneeListItem["Id"].asString(); if(!valueResultResultItemAssigneeListAssigneeListItem["Name"].isNull()) assigneeListObject.name = valueResultResultItemAssigneeListAssigneeListItem["Name"].asString(); + if(!valueResultResultItemAssigneeListAssigneeListItem["Status"].isNull()) + assigneeListObject.status = valueResultResultItemAssigneeListAssigneeListItem["Status"].asString(); + if(!valueResultResultItemAssigneeListAssigneeListItem["Email"].isNull()) + assigneeListObject.email = valueResultResultItemAssigneeListAssigneeListItem["Email"].asString(); resultObject.assigneeList.push_back(assigneeListObject); } auto approveCheckResultNode = value["ApproveCheckResult"]; diff --git a/codeup/src/model/ListRepositoryCommitsRequest.cc b/codeup/src/model/ListRepositoryCommitsRequest.cc new file mode 100644 index 000000000..5c5fe12ae --- /dev/null +++ b/codeup/src/model/ListRepositoryCommitsRequest.cc @@ -0,0 +1,129 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Codeup::Model::ListRepositoryCommitsRequest; + +ListRepositoryCommitsRequest::ListRepositoryCommitsRequest() : + RoaServiceRequest("codeup", "2020-04-14") +{ + setResourcePath("/api/v4/projects/[ProjectId]/repository/commits"); + setMethod(HttpRequest::Method::Get); +} + +ListRepositoryCommitsRequest::~ListRepositoryCommitsRequest() +{} + +std::string ListRepositoryCommitsRequest::getAccessToken()const +{ + return accessToken_; +} + +void ListRepositoryCommitsRequest::setAccessToken(const std::string& accessToken) +{ + accessToken_ = accessToken; + setParameter("AccessToken", accessToken); +} + +bool ListRepositoryCommitsRequest::getShowSignature()const +{ + return showSignature_; +} + +void ListRepositoryCommitsRequest::setShowSignature(bool showSignature) +{ + showSignature_ = showSignature; + setParameter("ShowSignature", showSignature ? "true" : "false"); +} + +std::string ListRepositoryCommitsRequest::getRefName()const +{ + return refName_; +} + +void ListRepositoryCommitsRequest::setRefName(const std::string& refName) +{ + refName_ = refName; + setParameter("RefName", refName); +} + +std::string ListRepositoryCommitsRequest::getOrganizationId()const +{ + return organizationId_; +} + +void ListRepositoryCommitsRequest::setOrganizationId(const std::string& organizationId) +{ + organizationId_ = organizationId; + setParameter("OrganizationId", organizationId); +} + +std::string ListRepositoryCommitsRequest::getPath()const +{ + return path_; +} + +void ListRepositoryCommitsRequest::setPath(const std::string& path) +{ + path_ = path; + setParameter("Path", path); +} + +std::string ListRepositoryCommitsRequest::getSearch()const +{ + return search_; +} + +void ListRepositoryCommitsRequest::setSearch(const std::string& search) +{ + search_ = search; + setParameter("Search", search); +} + +long ListRepositoryCommitsRequest::getPageSize()const +{ + return pageSize_; +} + +void ListRepositoryCommitsRequest::setPageSize(long pageSize) +{ + pageSize_ = pageSize; + setParameter("PageSize", std::to_string(pageSize)); +} + +long ListRepositoryCommitsRequest::getPage()const +{ + return page_; +} + +void ListRepositoryCommitsRequest::setPage(long page) +{ + page_ = page; + setParameter("Page", std::to_string(page)); +} + +long ListRepositoryCommitsRequest::getProjectId()const +{ + return projectId_; +} + +void ListRepositoryCommitsRequest::setProjectId(long projectId) +{ + projectId_ = projectId; + setParameter("ProjectId", std::to_string(projectId)); +} + diff --git a/codeup/src/model/ListRepositoryCommitsResult.cc b/codeup/src/model/ListRepositoryCommitsResult.cc new file mode 100644 index 000000000..f49eb89ac --- /dev/null +++ b/codeup/src/model/ListRepositoryCommitsResult.cc @@ -0,0 +1,113 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Codeup; +using namespace AlibabaCloud::Codeup::Model; + +ListRepositoryCommitsResult::ListRepositoryCommitsResult() : + ServiceResult() +{} + +ListRepositoryCommitsResult::ListRepositoryCommitsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListRepositoryCommitsResult::~ListRepositoryCommitsResult() +{} + +void ListRepositoryCommitsResult::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["AuthorDate"].isNull()) + resultObject.authorDate = valueResultResultItem["AuthorDate"].asString(); + if(!valueResultResultItem["AuthorEmail"].isNull()) + resultObject.authorEmail = valueResultResultItem["AuthorEmail"].asString(); + if(!valueResultResultItem["AuthorName"].isNull()) + resultObject.authorName = valueResultResultItem["AuthorName"].asString(); + if(!valueResultResultItem["CommittedDate"].isNull()) + resultObject.committedDate = valueResultResultItem["CommittedDate"].asString(); + if(!valueResultResultItem["CommitterEmail"].isNull()) + resultObject.committerEmail = valueResultResultItem["CommitterEmail"].asString(); + if(!valueResultResultItem["CommitterName"].isNull()) + resultObject.committerName = valueResultResultItem["CommitterName"].asString(); + if(!valueResultResultItem["CreatedAt"].isNull()) + resultObject.createdAt = valueResultResultItem["CreatedAt"].asString(); + if(!valueResultResultItem["Id"].isNull()) + resultObject.id = valueResultResultItem["Id"].asString(); + if(!valueResultResultItem["Message"].isNull()) + resultObject.message = valueResultResultItem["Message"].asString(); + if(!valueResultResultItem["ShortId"].isNull()) + resultObject.shortId = valueResultResultItem["ShortId"].asString(); + if(!valueResultResultItem["Title"].isNull()) + resultObject.title = valueResultResultItem["Title"].asString(); + auto signatureNode = value["Signature"]; + if(!signatureNode["GpgKeyId"].isNull()) + resultObject.signature.gpgKeyId = signatureNode["GpgKeyId"].asString(); + if(!signatureNode["VerificationStatus"].isNull()) + resultObject.signature.verificationStatus = signatureNode["VerificationStatus"].asString(); + auto allParentIds = value["ParentIds"]["ParentIds"]; + for (auto value : allParentIds) + resultObject.parentIds.push_back(value.asString()); + result_.push_back(resultObject); + } + if(!value["ErrorCode"].isNull()) + errorCode_ = value["ErrorCode"].asString(); + if(!value["ErrorMessage"].isNull()) + errorMessage_ = value["ErrorMessage"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + if(!value["Total"].isNull()) + total_ = std::stol(value["Total"].asString()); + +} + +long ListRepositoryCommitsResult::getTotal()const +{ + return total_; +} + +std::string ListRepositoryCommitsResult::getErrorCode()const +{ + return errorCode_; +} + +std::string ListRepositoryCommitsResult::getErrorMessage()const +{ + return errorMessage_; +} + +bool ListRepositoryCommitsResult::getSuccess()const +{ + return success_; +} + +std::vector ListRepositoryCommitsResult::getResult()const +{ + return result_; +} + diff --git a/codeup/src/model/ListRepositoryMemberResult.cc b/codeup/src/model/ListRepositoryMemberResult.cc index 1665b3e12..6499eb331 100644 --- a/codeup/src/model/ListRepositoryMemberResult.cc +++ b/codeup/src/model/ListRepositoryMemberResult.cc @@ -55,6 +55,10 @@ void ListRepositoryMemberResult::parse(const std::string &payload) resultObject.avatarUrl = valueResultResultItem["AvatarUrl"].asString(); if(!valueResultResultItem["Email"].isNull()) resultObject.email = valueResultResultItem["Email"].asString(); + if(!valueResultResultItem["Name"].isNull()) + resultObject.name = valueResultResultItem["Name"].asString(); + if(!valueResultResultItem["Username"].isNull()) + resultObject.username = valueResultResultItem["Username"].asString(); result_.push_back(resultObject); } if(!value["ErrorCode"].isNull()) diff --git a/codeup/src/model/UpdateMergeRequestCommentRequest.cc b/codeup/src/model/UpdateMergeRequestCommentRequest.cc new file mode 100644 index 000000000..f8ec5cc63 --- /dev/null +++ b/codeup/src/model/UpdateMergeRequestCommentRequest.cc @@ -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 + +using AlibabaCloud::Codeup::Model::UpdateMergeRequestCommentRequest; + +UpdateMergeRequestCommentRequest::UpdateMergeRequestCommentRequest() : + RoaServiceRequest("codeup", "2020-04-14") +{ + setResourcePath("/api/v3/projects/[ProjectId]/merge_requests/[MergeRequestId]/notes/[NoteId]"); + setMethod(HttpRequest::Method::Put); +} + +UpdateMergeRequestCommentRequest::~UpdateMergeRequestCommentRequest() +{} + +std::string UpdateMergeRequestCommentRequest::getOrganizationId()const +{ + return organizationId_; +} + +void UpdateMergeRequestCommentRequest::setOrganizationId(const std::string& organizationId) +{ + organizationId_ = organizationId; + setParameter("OrganizationId", organizationId); +} + +long UpdateMergeRequestCommentRequest::getMergeRequestId()const +{ + return mergeRequestId_; +} + +void UpdateMergeRequestCommentRequest::setMergeRequestId(long mergeRequestId) +{ + mergeRequestId_ = mergeRequestId; + setParameter("MergeRequestId", std::to_string(mergeRequestId)); +} + +std::string UpdateMergeRequestCommentRequest::getAccessToken()const +{ + return accessToken_; +} + +void UpdateMergeRequestCommentRequest::setAccessToken(const std::string& accessToken) +{ + accessToken_ = accessToken; + setParameter("AccessToken", accessToken); +} + +long UpdateMergeRequestCommentRequest::getNoteId()const +{ + return noteId_; +} + +void UpdateMergeRequestCommentRequest::setNoteId(long noteId) +{ + noteId_ = noteId; + setParameter("NoteId", std::to_string(noteId)); +} + +long UpdateMergeRequestCommentRequest::getProjectId()const +{ + return projectId_; +} + +void UpdateMergeRequestCommentRequest::setProjectId(long projectId) +{ + projectId_ = projectId; + setParameter("ProjectId", std::to_string(projectId)); +} + diff --git a/codeup/src/model/UpdateMergeRequestCommentResult.cc b/codeup/src/model/UpdateMergeRequestCommentResult.cc new file mode 100644 index 000000000..e47abf8d9 --- /dev/null +++ b/codeup/src/model/UpdateMergeRequestCommentResult.cc @@ -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 +#include + +using namespace AlibabaCloud::Codeup; +using namespace AlibabaCloud::Codeup::Model; + +UpdateMergeRequestCommentResult::UpdateMergeRequestCommentResult() : + ServiceResult() +{} + +UpdateMergeRequestCommentResult::UpdateMergeRequestCommentResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +UpdateMergeRequestCommentResult::~UpdateMergeRequestCommentResult() +{} + +void UpdateMergeRequestCommentResult::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["Result"].isNull()) + result_.result = resultNode["Result"].asString() == "true"; + if(!value["ErrorCode"].isNull()) + errorCode_ = value["ErrorCode"].asString(); + if(!value["ErrorMessage"].isNull()) + errorMessage_ = value["ErrorMessage"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +std::string UpdateMergeRequestCommentResult::getErrorCode()const +{ + return errorCode_; +} + +std::string UpdateMergeRequestCommentResult::getErrorMessage()const +{ + return errorMessage_; +} + +bool UpdateMergeRequestCommentResult::getSuccess()const +{ + return success_; +} + +UpdateMergeRequestCommentResult::Result UpdateMergeRequestCommentResult::getResult()const +{ + return result_; +} + diff --git a/codeup/src/model/UpdateMergeRequestRequest.cc b/codeup/src/model/UpdateMergeRequestRequest.cc new file mode 100644 index 000000000..e834d26d8 --- /dev/null +++ b/codeup/src/model/UpdateMergeRequestRequest.cc @@ -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 + +using AlibabaCloud::Codeup::Model::UpdateMergeRequestRequest; + +UpdateMergeRequestRequest::UpdateMergeRequestRequest() : + RoaServiceRequest("codeup", "2020-04-14") +{ + setResourcePath("/api/v3/projects/[ProjectId]/merge_request/[MergeRequestId]"); + setMethod(HttpRequest::Method::Put); +} + +UpdateMergeRequestRequest::~UpdateMergeRequestRequest() +{} + +std::string UpdateMergeRequestRequest::getOrganizationId()const +{ + return organizationId_; +} + +void UpdateMergeRequestRequest::setOrganizationId(const std::string& organizationId) +{ + organizationId_ = organizationId; + setParameter("OrganizationId", organizationId); +} + +long UpdateMergeRequestRequest::getMergeRequestId()const +{ + return mergeRequestId_; +} + +void UpdateMergeRequestRequest::setMergeRequestId(long mergeRequestId) +{ + mergeRequestId_ = mergeRequestId; + setParameter("MergeRequestId", std::to_string(mergeRequestId)); +} + +std::string UpdateMergeRequestRequest::getAccessToken()const +{ + return accessToken_; +} + +void UpdateMergeRequestRequest::setAccessToken(const std::string& accessToken) +{ + accessToken_ = accessToken; + setParameter("AccessToken", accessToken); +} + +long UpdateMergeRequestRequest::getProjectId()const +{ + return projectId_; +} + +void UpdateMergeRequestRequest::setProjectId(long projectId) +{ + projectId_ = projectId; + setParameter("ProjectId", std::to_string(projectId)); +} + diff --git a/codeup/src/model/UpdateMergeRequestResult.cc b/codeup/src/model/UpdateMergeRequestResult.cc new file mode 100644 index 000000000..7c4fabef8 --- /dev/null +++ b/codeup/src/model/UpdateMergeRequestResult.cc @@ -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 +#include + +using namespace AlibabaCloud::Codeup; +using namespace AlibabaCloud::Codeup::Model; + +UpdateMergeRequestResult::UpdateMergeRequestResult() : + ServiceResult() +{} + +UpdateMergeRequestResult::UpdateMergeRequestResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +UpdateMergeRequestResult::~UpdateMergeRequestResult() +{} + +void UpdateMergeRequestResult::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["AcceptedRevision"].isNull()) + result_.acceptedRevision = resultNode["AcceptedRevision"].asString(); + if(!resultNode["AheadCommitCount"].isNull()) + result_.aheadCommitCount = std::stoi(resultNode["AheadCommitCount"].asString()); + if(!resultNode["BehindCommitCount"].isNull()) + result_.behindCommitCount = std::stoi(resultNode["BehindCommitCount"].asString()); + if(!resultNode["CreatedAt"].isNull()) + result_.createdAt = resultNode["CreatedAt"].asString(); + if(!resultNode["Description"].isNull()) + result_.description = resultNode["Description"].asString(); + if(!resultNode["Id"].isNull()) + result_.id = std::stol(resultNode["Id"].asString()); + if(!resultNode["MergeError"].isNull()) + result_.mergeError = resultNode["MergeError"].asString(); + if(!resultNode["MergeStatus"].isNull()) + result_.mergeStatus = resultNode["MergeStatus"].asString(); + if(!resultNode["MergeType"].isNull()) + result_.mergeType = resultNode["MergeType"].asString(); + if(!resultNode["MergedRevision"].isNull()) + result_.mergedRevision = resultNode["MergedRevision"].asString(); + if(!resultNode["NameWithNamespace"].isNull()) + result_.nameWithNamespace = resultNode["NameWithNamespace"].asString(); + if(!resultNode["ProjectId"].isNull()) + result_.projectId = std::stol(resultNode["ProjectId"].asString()); + if(!resultNode["SourceBranch"].isNull()) + result_.sourceBranch = resultNode["SourceBranch"].asString(); + if(!resultNode["State"].isNull()) + result_.state = resultNode["State"].asString(); + if(!resultNode["TargetBranch"].isNull()) + result_.targetBranch = resultNode["TargetBranch"].asString(); + if(!resultNode["Title"].isNull()) + result_.title = resultNode["Title"].asString(); + if(!resultNode["UpdatedAt"].isNull()) + result_.updatedAt = resultNode["UpdatedAt"].asString(); + if(!resultNode["WebUrl"].isNull()) + result_.webUrl = resultNode["WebUrl"].asString(); + auto allAssigneeListNode = resultNode["AssigneeList"]["AssigneeListItem"]; + for (auto resultNodeAssigneeListAssigneeListItem : allAssigneeListNode) + { + Result::AssigneeListItem assigneeListItemObject; + if(!resultNodeAssigneeListAssigneeListItem["AvatarUrl"].isNull()) + assigneeListItemObject.avatarUrl = resultNodeAssigneeListAssigneeListItem["AvatarUrl"].asString(); + if(!resultNodeAssigneeListAssigneeListItem["ExternUserId"].isNull()) + assigneeListItemObject.externUserId = resultNodeAssigneeListAssigneeListItem["ExternUserId"].asString(); + if(!resultNodeAssigneeListAssigneeListItem["Id"].isNull()) + assigneeListItemObject.id = resultNodeAssigneeListAssigneeListItem["Id"].asString(); + if(!resultNodeAssigneeListAssigneeListItem["Name"].isNull()) + assigneeListItemObject.name = resultNodeAssigneeListAssigneeListItem["Name"].asString(); + result_.assigneeList.push_back(assigneeListItemObject); + } + 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["CheckName"].isNull()) + satisfiedCheckResultsItemObject.checkName = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckName"].asString(); + if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckStatus"].isNull()) + satisfiedCheckResultsItemObject.checkStatus = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckStatus"].asString(); + if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckType"].isNull()) + satisfiedCheckResultsItemObject.checkType = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckType"].asString(); + auto allExtraUsersNode = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["ExtraUsers"]["ExtraUsersItem"]; + for (auto approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem : allExtraUsersNode) + { + Result::ApproveCheckResult::SatisfiedCheckResultsItem::ExtraUsersItem extraUsersObject; + if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["AvatarUrl"].isNull()) + extraUsersObject.avatarUrl = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["AvatarUrl"].asString(); + if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["ExternUserId"].isNull()) + extraUsersObject.externUserId = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["ExternUserId"].asString(); + if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["Id"].isNull()) + extraUsersObject.id = std::stol(approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["Id"].asString()); + if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["Name"].isNull()) + extraUsersObject.name = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["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["CheckName"].isNull()) + unsatisfiedCheckResultsItemObject.checkName = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckName"].asString(); + if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckStatus"].isNull()) + unsatisfiedCheckResultsItemObject.checkStatus = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckStatus"].asString(); + if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckType"].isNull()) + unsatisfiedCheckResultsItemObject.checkType = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckType"].asString(); + auto allExtraUsers3Node = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["ExtraUsers"]["ExtraUsersItem"]; + for (auto approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem : allExtraUsers3Node) + { + Result::ApproveCheckResult::UnsatisfiedCheckResultsItem::ExtraUsersItem4 extraUsers3Object; + if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["AvatarUrl"].isNull()) + extraUsers3Object.avatarUrl = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["AvatarUrl"].asString(); + if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["ExternUserId"].isNull()) + extraUsers3Object.externUserId = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["ExternUserId"].asString(); + if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["Id"].isNull()) + extraUsers3Object.id = std::stol(approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["Id"].asString()); + if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["Name"].isNull()) + extraUsers3Object.name = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["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); + } + auto authorNode = resultNode["Author"]; + if(!authorNode["AvatarUrl"].isNull()) + result_.author.avatarUrl = authorNode["AvatarUrl"].asString(); + if(!authorNode["ExternUserId"].isNull()) + result_.author.externUserId = authorNode["ExternUserId"].asString(); + if(!authorNode["Id"].isNull()) + result_.author.id = std::stol(authorNode["Id"].asString()); + if(!authorNode["Name"].isNull()) + result_.author.name = authorNode["Name"].asString(); + if(!value["ErrorCode"].isNull()) + errorCode_ = value["ErrorCode"].asString(); + if(!value["ErrorMessage"].isNull()) + errorMessage_ = value["ErrorMessage"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +std::string UpdateMergeRequestResult::getErrorCode()const +{ + return errorCode_; +} + +std::string UpdateMergeRequestResult::getErrorMessage()const +{ + return errorMessage_; +} + +bool UpdateMergeRequestResult::getSuccess()const +{ + return success_; +} + +UpdateMergeRequestResult::Result UpdateMergeRequestResult::getResult()const +{ + return result_; +} + diff --git a/codeup/src/model/UpdateMergeRequestSettingRequest.cc b/codeup/src/model/UpdateMergeRequestSettingRequest.cc new file mode 100644 index 000000000..47b8f931a --- /dev/null +++ b/codeup/src/model/UpdateMergeRequestSettingRequest.cc @@ -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 + +using AlibabaCloud::Codeup::Model::UpdateMergeRequestSettingRequest; + +UpdateMergeRequestSettingRequest::UpdateMergeRequestSettingRequest() : + RoaServiceRequest("codeup", "2020-04-14") +{ + setResourcePath("/api/v4/projects/[ProjectId]/settings/merge_requests"); + setMethod(HttpRequest::Method::Put); +} + +UpdateMergeRequestSettingRequest::~UpdateMergeRequestSettingRequest() +{} + +std::string UpdateMergeRequestSettingRequest::getOrganizationId()const +{ + return organizationId_; +} + +void UpdateMergeRequestSettingRequest::setOrganizationId(const std::string& organizationId) +{ + organizationId_ = organizationId; + setParameter("OrganizationId", organizationId); +} + +std::string UpdateMergeRequestSettingRequest::getAccessToken()const +{ + return accessToken_; +} + +void UpdateMergeRequestSettingRequest::setAccessToken(const std::string& accessToken) +{ + accessToken_ = accessToken; + setParameter("AccessToken", accessToken); +} + +long UpdateMergeRequestSettingRequest::getProjectId()const +{ + return projectId_; +} + +void UpdateMergeRequestSettingRequest::setProjectId(long projectId) +{ + projectId_ = projectId; + setParameter("ProjectId", std::to_string(projectId)); +} + diff --git a/codeup/src/model/UpdateMergeRequestSettingResult.cc b/codeup/src/model/UpdateMergeRequestSettingResult.cc new file mode 100644 index 000000000..168e2a86b --- /dev/null +++ b/codeup/src/model/UpdateMergeRequestSettingResult.cc @@ -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 +#include + +using namespace AlibabaCloud::Codeup; +using namespace AlibabaCloud::Codeup::Model; + +UpdateMergeRequestSettingResult::UpdateMergeRequestSettingResult() : + ServiceResult() +{} + +UpdateMergeRequestSettingResult::UpdateMergeRequestSettingResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +UpdateMergeRequestSettingResult::~UpdateMergeRequestSettingResult() +{} + +void UpdateMergeRequestSettingResult::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["Result"].isNull()) + result_.result = resultNode["Result"].asString() == "true"; + if(!value["ErrorCode"].isNull()) + errorCode_ = value["ErrorCode"].asString(); + if(!value["ErrorMessage"].isNull()) + errorMessage_ = value["ErrorMessage"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +std::string UpdateMergeRequestSettingResult::getErrorCode()const +{ + return errorCode_; +} + +std::string UpdateMergeRequestSettingResult::getErrorMessage()const +{ + return errorMessage_; +} + +bool UpdateMergeRequestSettingResult::getSuccess()const +{ + return success_; +} + +UpdateMergeRequestSettingResult::Result UpdateMergeRequestSettingResult::getResult()const +{ + return result_; +} +