From 76821f71df811080b860716fbfc11391a5878889 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Mon, 18 Jan 2021 03:54:49 +0000 Subject: [PATCH] Add ListMergeRequests api. --- CHANGELOG | 8 + codeup/CMakeLists.txt | 24 ++ .../alibabacloud/codeup/CodeupClient.h | 48 ++++ .../model/CreateRepositoryDeployKeyRequest.h | 57 +++++ .../model/CreateRepositoryDeployKeyResult.h | 65 ++++++ .../CreateRepositoryProtectedBranchRequest.h | 54 +++++ .../CreateRepositoryProtectedBranchResult.h | 103 +++++++++ .../DeleteRepositoryProtectedBranchRequest.h | 57 +++++ .../DeleteRepositoryProtectedBranchResult.h | 61 +++++ .../model/EnableRepositoryDeployKeyRequest.h | 60 +++++ .../model/EnableRepositoryDeployKeyResult.h | 61 +++++ .../codeup/model/GetUserInfoRequest.h | 3 + .../codeup/model/ListMergeRequestsRequest.h | 93 ++++++++ .../codeup/model/ListMergeRequestsResult.h | 135 +++++++++++ .../codeup/model/UpdateRepositoryRequest.h | 54 +++++ .../codeup/model/UpdateRepositoryResult.h | 90 ++++++++ codeup/src/CodeupClient.cc | 216 ++++++++++++++++++ .../model/CreateRepositoryDeployKeyRequest.cc | 74 ++++++ .../model/CreateRepositoryDeployKeyResult.cc | 81 +++++++ .../CreateRepositoryProtectedBranchRequest.cc | 63 +++++ .../CreateRepositoryProtectedBranchResult.cc | 124 ++++++++++ .../DeleteRepositoryProtectedBranchRequest.cc | 74 ++++++ .../DeleteRepositoryProtectedBranchResult.cc | 73 ++++++ .../model/EnableRepositoryDeployKeyRequest.cc | 85 +++++++ .../model/EnableRepositoryDeployKeyResult.cc | 73 ++++++ codeup/src/model/GetUserInfoRequest.cc | 11 + codeup/src/model/ListMergeRequestsRequest.cc | 206 +++++++++++++++++ codeup/src/model/ListMergeRequestsResult.cc | 209 +++++++++++++++++ codeup/src/model/UpdateRepositoryRequest.cc | 63 +++++ codeup/src/model/UpdateRepositoryResult.cc | 124 ++++++++++ 30 files changed, 2449 insertions(+) create mode 100644 codeup/include/alibabacloud/codeup/model/CreateRepositoryDeployKeyRequest.h create mode 100644 codeup/include/alibabacloud/codeup/model/CreateRepositoryDeployKeyResult.h create mode 100644 codeup/include/alibabacloud/codeup/model/CreateRepositoryProtectedBranchRequest.h create mode 100644 codeup/include/alibabacloud/codeup/model/CreateRepositoryProtectedBranchResult.h create mode 100644 codeup/include/alibabacloud/codeup/model/DeleteRepositoryProtectedBranchRequest.h create mode 100644 codeup/include/alibabacloud/codeup/model/DeleteRepositoryProtectedBranchResult.h create mode 100644 codeup/include/alibabacloud/codeup/model/EnableRepositoryDeployKeyRequest.h create mode 100644 codeup/include/alibabacloud/codeup/model/EnableRepositoryDeployKeyResult.h create mode 100644 codeup/include/alibabacloud/codeup/model/ListMergeRequestsRequest.h create mode 100644 codeup/include/alibabacloud/codeup/model/ListMergeRequestsResult.h create mode 100644 codeup/include/alibabacloud/codeup/model/UpdateRepositoryRequest.h create mode 100644 codeup/include/alibabacloud/codeup/model/UpdateRepositoryResult.h create mode 100644 codeup/src/model/CreateRepositoryDeployKeyRequest.cc create mode 100644 codeup/src/model/CreateRepositoryDeployKeyResult.cc create mode 100644 codeup/src/model/CreateRepositoryProtectedBranchRequest.cc create mode 100644 codeup/src/model/CreateRepositoryProtectedBranchResult.cc create mode 100644 codeup/src/model/DeleteRepositoryProtectedBranchRequest.cc create mode 100644 codeup/src/model/DeleteRepositoryProtectedBranchResult.cc create mode 100644 codeup/src/model/EnableRepositoryDeployKeyRequest.cc create mode 100644 codeup/src/model/EnableRepositoryDeployKeyResult.cc create mode 100644 codeup/src/model/ListMergeRequestsRequest.cc create mode 100644 codeup/src/model/ListMergeRequestsResult.cc create mode 100644 codeup/src/model/UpdateRepositoryRequest.cc create mode 100644 codeup/src/model/UpdateRepositoryResult.cc diff --git a/CHANGELOG b/CHANGELOG index a160b200a..b5e376628 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,11 @@ +2021-01-18 Version: patch +- Add ListMergeRequests api. +- Add protected branch api, CreateRepositoryProtectedBranch and DeleteRepositoryProtectedBranch. +- Add repository deploy key api, EnableRepositoryDeployKey and CreateRepositoryDeployKey. +- Add UpdateRepository api. +- Update GetUserInfo, support use OrganizationId param to get user organization name. + + 2021-01-15 Version: patch - Add result value spanId for GetTrace api. diff --git a/codeup/CMakeLists.txt b/codeup/CMakeLists.txt index 2fbaecf4c..0ed72d4bc 100644 --- a/codeup/CMakeLists.txt +++ b/codeup/CMakeLists.txt @@ -35,8 +35,12 @@ set(codeup_public_header_model include/alibabacloud/codeup/model/CreateMergeRequestResult.h include/alibabacloud/codeup/model/CreateRepositoryRequest.h include/alibabacloud/codeup/model/CreateRepositoryResult.h + include/alibabacloud/codeup/model/CreateRepositoryDeployKeyRequest.h + include/alibabacloud/codeup/model/CreateRepositoryDeployKeyResult.h include/alibabacloud/codeup/model/CreateRepositoryGroupRequest.h include/alibabacloud/codeup/model/CreateRepositoryGroupResult.h + include/alibabacloud/codeup/model/CreateRepositoryProtectedBranchRequest.h + include/alibabacloud/codeup/model/CreateRepositoryProtectedBranchResult.h include/alibabacloud/codeup/model/CreateTagRequest.h include/alibabacloud/codeup/model/CreateTagResult.h include/alibabacloud/codeup/model/DeleteBranchRequest.h @@ -51,10 +55,14 @@ set(codeup_public_header_model include/alibabacloud/codeup/model/DeleteRepositoryGroupResult.h include/alibabacloud/codeup/model/DeleteRepositoryMemberRequest.h include/alibabacloud/codeup/model/DeleteRepositoryMemberResult.h + include/alibabacloud/codeup/model/DeleteRepositoryProtectedBranchRequest.h + include/alibabacloud/codeup/model/DeleteRepositoryProtectedBranchResult.h include/alibabacloud/codeup/model/DeleteRepositoryTagRequest.h include/alibabacloud/codeup/model/DeleteRepositoryTagResult.h include/alibabacloud/codeup/model/DeleteRepositoryWebhookRequest.h include/alibabacloud/codeup/model/DeleteRepositoryWebhookResult.h + include/alibabacloud/codeup/model/EnableRepositoryDeployKeyRequest.h + include/alibabacloud/codeup/model/EnableRepositoryDeployKeyResult.h include/alibabacloud/codeup/model/GetBranchInfoRequest.h include/alibabacloud/codeup/model/GetBranchInfoResult.h include/alibabacloud/codeup/model/GetCodeupOrganizationRequest.h @@ -77,6 +85,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/ListMergeRequestsRequest.h + include/alibabacloud/codeup/model/ListMergeRequestsResult.h include/alibabacloud/codeup/model/ListOrganizationsRequest.h include/alibabacloud/codeup/model/ListOrganizationsResult.h include/alibabacloud/codeup/model/ListRepositoriesRequest.h @@ -97,6 +107,8 @@ 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/UpdateRepositoryRequest.h + include/alibabacloud/codeup/model/UpdateRepositoryResult.h include/alibabacloud/codeup/model/UpdateRepositoryMemberRequest.h include/alibabacloud/codeup/model/UpdateRepositoryMemberResult.h ) @@ -116,8 +128,12 @@ set(codeup_src src/model/CreateMergeRequestResult.cc src/model/CreateRepositoryRequest.cc src/model/CreateRepositoryResult.cc + src/model/CreateRepositoryDeployKeyRequest.cc + src/model/CreateRepositoryDeployKeyResult.cc src/model/CreateRepositoryGroupRequest.cc src/model/CreateRepositoryGroupResult.cc + src/model/CreateRepositoryProtectedBranchRequest.cc + src/model/CreateRepositoryProtectedBranchResult.cc src/model/CreateTagRequest.cc src/model/CreateTagResult.cc src/model/DeleteBranchRequest.cc @@ -132,10 +148,14 @@ set(codeup_src src/model/DeleteRepositoryGroupResult.cc src/model/DeleteRepositoryMemberRequest.cc src/model/DeleteRepositoryMemberResult.cc + src/model/DeleteRepositoryProtectedBranchRequest.cc + src/model/DeleteRepositoryProtectedBranchResult.cc src/model/DeleteRepositoryTagRequest.cc src/model/DeleteRepositoryTagResult.cc src/model/DeleteRepositoryWebhookRequest.cc src/model/DeleteRepositoryWebhookResult.cc + src/model/EnableRepositoryDeployKeyRequest.cc + src/model/EnableRepositoryDeployKeyResult.cc src/model/GetBranchInfoRequest.cc src/model/GetBranchInfoResult.cc src/model/GetCodeupOrganizationRequest.cc @@ -158,6 +178,8 @@ set(codeup_src src/model/ListGroupRepositoriesResult.cc src/model/ListGroupsRequest.cc src/model/ListGroupsResult.cc + src/model/ListMergeRequestsRequest.cc + src/model/ListMergeRequestsResult.cc src/model/ListOrganizationsRequest.cc src/model/ListOrganizationsResult.cc src/model/ListRepositoriesRequest.cc @@ -178,6 +200,8 @@ set(codeup_src src/model/UpdateFileResult.cc src/model/UpdateGroupMemberRequest.cc src/model/UpdateGroupMemberResult.cc + src/model/UpdateRepositoryRequest.cc + src/model/UpdateRepositoryResult.cc src/model/UpdateRepositoryMemberRequest.cc src/model/UpdateRepositoryMemberResult.cc ) diff --git a/codeup/include/alibabacloud/codeup/CodeupClient.h b/codeup/include/alibabacloud/codeup/CodeupClient.h index 4adee8680..8e4172dc5 100644 --- a/codeup/include/alibabacloud/codeup/CodeupClient.h +++ b/codeup/include/alibabacloud/codeup/CodeupClient.h @@ -36,8 +36,12 @@ #include "model/CreateMergeRequestResult.h" #include "model/CreateRepositoryRequest.h" #include "model/CreateRepositoryResult.h" +#include "model/CreateRepositoryDeployKeyRequest.h" +#include "model/CreateRepositoryDeployKeyResult.h" #include "model/CreateRepositoryGroupRequest.h" #include "model/CreateRepositoryGroupResult.h" +#include "model/CreateRepositoryProtectedBranchRequest.h" +#include "model/CreateRepositoryProtectedBranchResult.h" #include "model/CreateTagRequest.h" #include "model/CreateTagResult.h" #include "model/DeleteBranchRequest.h" @@ -52,10 +56,14 @@ #include "model/DeleteRepositoryGroupResult.h" #include "model/DeleteRepositoryMemberRequest.h" #include "model/DeleteRepositoryMemberResult.h" +#include "model/DeleteRepositoryProtectedBranchRequest.h" +#include "model/DeleteRepositoryProtectedBranchResult.h" #include "model/DeleteRepositoryTagRequest.h" #include "model/DeleteRepositoryTagResult.h" #include "model/DeleteRepositoryWebhookRequest.h" #include "model/DeleteRepositoryWebhookResult.h" +#include "model/EnableRepositoryDeployKeyRequest.h" +#include "model/EnableRepositoryDeployKeyResult.h" #include "model/GetBranchInfoRequest.h" #include "model/GetBranchInfoResult.h" #include "model/GetCodeupOrganizationRequest.h" @@ -78,6 +86,8 @@ #include "model/ListGroupRepositoriesResult.h" #include "model/ListGroupsRequest.h" #include "model/ListGroupsResult.h" +#include "model/ListMergeRequestsRequest.h" +#include "model/ListMergeRequestsResult.h" #include "model/ListOrganizationsRequest.h" #include "model/ListOrganizationsResult.h" #include "model/ListRepositoriesRequest.h" @@ -98,6 +108,8 @@ #include "model/UpdateFileResult.h" #include "model/UpdateGroupMemberRequest.h" #include "model/UpdateGroupMemberResult.h" +#include "model/UpdateRepositoryRequest.h" +#include "model/UpdateRepositoryResult.h" #include "model/UpdateRepositoryMemberRequest.h" #include "model/UpdateRepositoryMemberResult.h" @@ -130,9 +142,15 @@ namespace AlibabaCloud typedef Outcome CreateRepositoryOutcome; typedef std::future CreateRepositoryOutcomeCallable; typedef std::function&)> CreateRepositoryAsyncHandler; + typedef Outcome CreateRepositoryDeployKeyOutcome; + typedef std::future CreateRepositoryDeployKeyOutcomeCallable; + typedef std::function&)> CreateRepositoryDeployKeyAsyncHandler; typedef Outcome CreateRepositoryGroupOutcome; typedef std::future CreateRepositoryGroupOutcomeCallable; typedef std::function&)> CreateRepositoryGroupAsyncHandler; + typedef Outcome CreateRepositoryProtectedBranchOutcome; + typedef std::future CreateRepositoryProtectedBranchOutcomeCallable; + typedef std::function&)> CreateRepositoryProtectedBranchAsyncHandler; typedef Outcome CreateTagOutcome; typedef std::future CreateTagOutcomeCallable; typedef std::function&)> CreateTagAsyncHandler; @@ -154,12 +172,18 @@ namespace AlibabaCloud typedef Outcome DeleteRepositoryMemberOutcome; typedef std::future DeleteRepositoryMemberOutcomeCallable; typedef std::function&)> DeleteRepositoryMemberAsyncHandler; + typedef Outcome DeleteRepositoryProtectedBranchOutcome; + typedef std::future DeleteRepositoryProtectedBranchOutcomeCallable; + typedef std::function&)> DeleteRepositoryProtectedBranchAsyncHandler; typedef Outcome DeleteRepositoryTagOutcome; typedef std::future DeleteRepositoryTagOutcomeCallable; typedef std::function&)> DeleteRepositoryTagAsyncHandler; typedef Outcome DeleteRepositoryWebhookOutcome; typedef std::future DeleteRepositoryWebhookOutcomeCallable; typedef std::function&)> DeleteRepositoryWebhookAsyncHandler; + typedef Outcome EnableRepositoryDeployKeyOutcome; + typedef std::future EnableRepositoryDeployKeyOutcomeCallable; + typedef std::function&)> EnableRepositoryDeployKeyAsyncHandler; typedef Outcome GetBranchInfoOutcome; typedef std::future GetBranchInfoOutcomeCallable; typedef std::function&)> GetBranchInfoAsyncHandler; @@ -193,6 +217,9 @@ namespace AlibabaCloud typedef Outcome ListGroupsOutcome; typedef std::future ListGroupsOutcomeCallable; typedef std::function&)> ListGroupsAsyncHandler; + typedef Outcome ListMergeRequestsOutcome; + typedef std::future ListMergeRequestsOutcomeCallable; + typedef std::function&)> ListMergeRequestsAsyncHandler; typedef Outcome ListOrganizationsOutcome; typedef std::future ListOrganizationsOutcomeCallable; typedef std::function&)> ListOrganizationsAsyncHandler; @@ -223,6 +250,9 @@ namespace AlibabaCloud typedef Outcome UpdateGroupMemberOutcome; typedef std::future UpdateGroupMemberOutcomeCallable; typedef std::function&)> UpdateGroupMemberAsyncHandler; + typedef Outcome UpdateRepositoryOutcome; + typedef std::future UpdateRepositoryOutcomeCallable; + typedef std::function&)> UpdateRepositoryAsyncHandler; typedef Outcome UpdateRepositoryMemberOutcome; typedef std::future UpdateRepositoryMemberOutcomeCallable; typedef std::function&)> UpdateRepositoryMemberAsyncHandler; @@ -252,9 +282,15 @@ namespace AlibabaCloud 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; + CreateRepositoryDeployKeyOutcome createRepositoryDeployKey(const Model::CreateRepositoryDeployKeyRequest &request)const; + void createRepositoryDeployKeyAsync(const Model::CreateRepositoryDeployKeyRequest& request, const CreateRepositoryDeployKeyAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CreateRepositoryDeployKeyOutcomeCallable createRepositoryDeployKeyCallable(const Model::CreateRepositoryDeployKeyRequest& request) const; CreateRepositoryGroupOutcome createRepositoryGroup(const Model::CreateRepositoryGroupRequest &request)const; void createRepositoryGroupAsync(const Model::CreateRepositoryGroupRequest& request, const CreateRepositoryGroupAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CreateRepositoryGroupOutcomeCallable createRepositoryGroupCallable(const Model::CreateRepositoryGroupRequest& request) const; + CreateRepositoryProtectedBranchOutcome createRepositoryProtectedBranch(const Model::CreateRepositoryProtectedBranchRequest &request)const; + void createRepositoryProtectedBranchAsync(const Model::CreateRepositoryProtectedBranchRequest& request, const CreateRepositoryProtectedBranchAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CreateRepositoryProtectedBranchOutcomeCallable createRepositoryProtectedBranchCallable(const Model::CreateRepositoryProtectedBranchRequest& request) const; CreateTagOutcome createTag(const Model::CreateTagRequest &request)const; void createTagAsync(const Model::CreateTagRequest& request, const CreateTagAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CreateTagOutcomeCallable createTagCallable(const Model::CreateTagRequest& request) const; @@ -276,12 +312,18 @@ namespace AlibabaCloud DeleteRepositoryMemberOutcome deleteRepositoryMember(const Model::DeleteRepositoryMemberRequest &request)const; void deleteRepositoryMemberAsync(const Model::DeleteRepositoryMemberRequest& request, const DeleteRepositoryMemberAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DeleteRepositoryMemberOutcomeCallable deleteRepositoryMemberCallable(const Model::DeleteRepositoryMemberRequest& request) const; + DeleteRepositoryProtectedBranchOutcome deleteRepositoryProtectedBranch(const Model::DeleteRepositoryProtectedBranchRequest &request)const; + void deleteRepositoryProtectedBranchAsync(const Model::DeleteRepositoryProtectedBranchRequest& request, const DeleteRepositoryProtectedBranchAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DeleteRepositoryProtectedBranchOutcomeCallable deleteRepositoryProtectedBranchCallable(const Model::DeleteRepositoryProtectedBranchRequest& request) const; DeleteRepositoryTagOutcome deleteRepositoryTag(const Model::DeleteRepositoryTagRequest &request)const; void deleteRepositoryTagAsync(const Model::DeleteRepositoryTagRequest& request, const DeleteRepositoryTagAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DeleteRepositoryTagOutcomeCallable deleteRepositoryTagCallable(const Model::DeleteRepositoryTagRequest& request) const; DeleteRepositoryWebhookOutcome deleteRepositoryWebhook(const Model::DeleteRepositoryWebhookRequest &request)const; void deleteRepositoryWebhookAsync(const Model::DeleteRepositoryWebhookRequest& request, const DeleteRepositoryWebhookAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DeleteRepositoryWebhookOutcomeCallable deleteRepositoryWebhookCallable(const Model::DeleteRepositoryWebhookRequest& request) const; + EnableRepositoryDeployKeyOutcome enableRepositoryDeployKey(const Model::EnableRepositoryDeployKeyRequest &request)const; + void enableRepositoryDeployKeyAsync(const Model::EnableRepositoryDeployKeyRequest& request, const EnableRepositoryDeployKeyAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + EnableRepositoryDeployKeyOutcomeCallable enableRepositoryDeployKeyCallable(const Model::EnableRepositoryDeployKeyRequest& request) const; GetBranchInfoOutcome getBranchInfo(const Model::GetBranchInfoRequest &request)const; void getBranchInfoAsync(const Model::GetBranchInfoRequest& request, const GetBranchInfoAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetBranchInfoOutcomeCallable getBranchInfoCallable(const Model::GetBranchInfoRequest& request) const; @@ -315,6 +357,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; + 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; ListOrganizationsOutcome listOrganizations(const Model::ListOrganizationsRequest &request)const; void listOrganizationsAsync(const Model::ListOrganizationsRequest& request, const ListOrganizationsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListOrganizationsOutcomeCallable listOrganizationsCallable(const Model::ListOrganizationsRequest& request) const; @@ -345,6 +390,9 @@ 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; + 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; UpdateRepositoryMemberOutcome updateRepositoryMember(const Model::UpdateRepositoryMemberRequest &request)const; void updateRepositoryMemberAsync(const Model::UpdateRepositoryMemberRequest& request, const UpdateRepositoryMemberAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; UpdateRepositoryMemberOutcomeCallable updateRepositoryMemberCallable(const Model::UpdateRepositoryMemberRequest& request) const; diff --git a/codeup/include/alibabacloud/codeup/model/CreateRepositoryDeployKeyRequest.h b/codeup/include/alibabacloud/codeup/model/CreateRepositoryDeployKeyRequest.h new file mode 100644 index 000000000..6822a5b62 --- /dev/null +++ b/codeup/include/alibabacloud/codeup/model/CreateRepositoryDeployKeyRequest.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_CREATEREPOSITORYDEPLOYKEYREQUEST_H_ +#define ALIBABACLOUD_CODEUP_MODEL_CREATEREPOSITORYDEPLOYKEYREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Codeup + { + namespace Model + { + class ALIBABACLOUD_CODEUP_EXPORT CreateRepositoryDeployKeyRequest : public RoaServiceRequest + { + + public: + CreateRepositoryDeployKeyRequest(); + ~CreateRepositoryDeployKeyRequest(); + + std::string getOrganizationId()const; + void setOrganizationId(const std::string& organizationId); + std::string getSubUserId()const; + void setSubUserId(const std::string& subUserId); + std::string getAccessToken()const; + void setAccessToken(const std::string& accessToken); + long getProjectId()const; + void setProjectId(long projectId); + + private: + std::string organizationId_; + std::string subUserId_; + std::string accessToken_; + long projectId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CODEUP_MODEL_CREATEREPOSITORYDEPLOYKEYREQUEST_H_ \ No newline at end of file diff --git a/codeup/include/alibabacloud/codeup/model/CreateRepositoryDeployKeyResult.h b/codeup/include/alibabacloud/codeup/model/CreateRepositoryDeployKeyResult.h new file mode 100644 index 000000000..706b892a3 --- /dev/null +++ b/codeup/include/alibabacloud/codeup/model/CreateRepositoryDeployKeyResult.h @@ -0,0 +1,65 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_CODEUP_MODEL_CREATEREPOSITORYDEPLOYKEYRESULT_H_ +#define ALIBABACLOUD_CODEUP_MODEL_CREATEREPOSITORYDEPLOYKEYRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Codeup + { + namespace Model + { + class ALIBABACLOUD_CODEUP_EXPORT CreateRepositoryDeployKeyResult : public ServiceResult + { + public: + struct Result + { + std::string fingerPrint; + std::string createdAt; + std::string title; + long id; + std::string key; + }; + + + CreateRepositoryDeployKeyResult(); + explicit CreateRepositoryDeployKeyResult(const std::string &payload); + ~CreateRepositoryDeployKeyResult(); + 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_CREATEREPOSITORYDEPLOYKEYRESULT_H_ \ No newline at end of file diff --git a/codeup/include/alibabacloud/codeup/model/CreateRepositoryProtectedBranchRequest.h b/codeup/include/alibabacloud/codeup/model/CreateRepositoryProtectedBranchRequest.h new file mode 100644 index 000000000..9c6f2dd42 --- /dev/null +++ b/codeup/include/alibabacloud/codeup/model/CreateRepositoryProtectedBranchRequest.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_CREATEREPOSITORYPROTECTEDBRANCHREQUEST_H_ +#define ALIBABACLOUD_CODEUP_MODEL_CREATEREPOSITORYPROTECTEDBRANCHREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Codeup + { + namespace Model + { + class ALIBABACLOUD_CODEUP_EXPORT CreateRepositoryProtectedBranchRequest : public RoaServiceRequest + { + + public: + CreateRepositoryProtectedBranchRequest(); + ~CreateRepositoryProtectedBranchRequest(); + + 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_CREATEREPOSITORYPROTECTEDBRANCHREQUEST_H_ \ No newline at end of file diff --git a/codeup/include/alibabacloud/codeup/model/CreateRepositoryProtectedBranchResult.h b/codeup/include/alibabacloud/codeup/model/CreateRepositoryProtectedBranchResult.h new file mode 100644 index 000000000..bb5b94662 --- /dev/null +++ b/codeup/include/alibabacloud/codeup/model/CreateRepositoryProtectedBranchResult.h @@ -0,0 +1,103 @@ +/* + * 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_CREATEREPOSITORYPROTECTEDBRANCHRESULT_H_ +#define ALIBABACLOUD_CODEUP_MODEL_CREATEREPOSITORYPROTECTEDBRANCHRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Codeup + { + namespace Model + { + class ALIBABACLOUD_CODEUP_EXPORT CreateRepositoryProtectedBranchResult : public ServiceResult + { + public: + struct Result + { + struct MergeRequestSetting + { + bool required; + std::vector defaultAssignees; + std::vector allowMergeRequestRoles; + bool isResetApprovalWhenNewPush; + bool allowSelfApproval; + int minimualApproval; + bool isRequireDiscussionProcessed; + std::string mergeRequestMode; + }; + struct TestSetting + { + struct CodingGuidelinesDetection + { + std::string message; + bool enabled; + }; + struct SensitiveInfoDetection + { + std::string message; + bool enabled; + }; + struct CheckConfig + { + struct CheckItemsItem + { + bool required; + std::string name; + }; + std::vector checkItems; + }; + SensitiveInfoDetection sensitiveInfoDetection; + CodingGuidelinesDetection codingGuidelinesDetection; + bool required; + CheckConfig checkConfig; + }; + std::vector allowPushRoles; + std::string branch; + long id; + TestSetting testSetting; + std::vector allowMergeRoles; + MergeRequestSetting mergeRequestSetting; + }; + + + CreateRepositoryProtectedBranchResult(); + explicit CreateRepositoryProtectedBranchResult(const std::string &payload); + ~CreateRepositoryProtectedBranchResult(); + 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_CREATEREPOSITORYPROTECTEDBRANCHRESULT_H_ \ No newline at end of file diff --git a/codeup/include/alibabacloud/codeup/model/DeleteRepositoryProtectedBranchRequest.h b/codeup/include/alibabacloud/codeup/model/DeleteRepositoryProtectedBranchRequest.h new file mode 100644 index 000000000..294f6924c --- /dev/null +++ b/codeup/include/alibabacloud/codeup/model/DeleteRepositoryProtectedBranchRequest.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_DELETEREPOSITORYPROTECTEDBRANCHREQUEST_H_ +#define ALIBABACLOUD_CODEUP_MODEL_DELETEREPOSITORYPROTECTEDBRANCHREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Codeup + { + namespace Model + { + class ALIBABACLOUD_CODEUP_EXPORT DeleteRepositoryProtectedBranchRequest : public RoaServiceRequest + { + + public: + DeleteRepositoryProtectedBranchRequest(); + ~DeleteRepositoryProtectedBranchRequest(); + + std::string getOrganizationId()const; + void setOrganizationId(const std::string& organizationId); + long getProtectedBranchId()const; + void setProtectedBranchId(long protectedBranchId); + std::string getAccessToken()const; + void setAccessToken(const std::string& accessToken); + long getProjectId()const; + void setProjectId(long projectId); + + private: + std::string organizationId_; + long protectedBranchId_; + std::string accessToken_; + long projectId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CODEUP_MODEL_DELETEREPOSITORYPROTECTEDBRANCHREQUEST_H_ \ No newline at end of file diff --git a/codeup/include/alibabacloud/codeup/model/DeleteRepositoryProtectedBranchResult.h b/codeup/include/alibabacloud/codeup/model/DeleteRepositoryProtectedBranchResult.h new file mode 100644 index 000000000..ea4314154 --- /dev/null +++ b/codeup/include/alibabacloud/codeup/model/DeleteRepositoryProtectedBranchResult.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_DELETEREPOSITORYPROTECTEDBRANCHRESULT_H_ +#define ALIBABACLOUD_CODEUP_MODEL_DELETEREPOSITORYPROTECTEDBRANCHRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Codeup + { + namespace Model + { + class ALIBABACLOUD_CODEUP_EXPORT DeleteRepositoryProtectedBranchResult : public ServiceResult + { + public: + struct Result + { + bool result; + }; + + + DeleteRepositoryProtectedBranchResult(); + explicit DeleteRepositoryProtectedBranchResult(const std::string &payload); + ~DeleteRepositoryProtectedBranchResult(); + 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_DELETEREPOSITORYPROTECTEDBRANCHRESULT_H_ \ No newline at end of file diff --git a/codeup/include/alibabacloud/codeup/model/EnableRepositoryDeployKeyRequest.h b/codeup/include/alibabacloud/codeup/model/EnableRepositoryDeployKeyRequest.h new file mode 100644 index 000000000..c463e146c --- /dev/null +++ b/codeup/include/alibabacloud/codeup/model/EnableRepositoryDeployKeyRequest.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_ENABLEREPOSITORYDEPLOYKEYREQUEST_H_ +#define ALIBABACLOUD_CODEUP_MODEL_ENABLEREPOSITORYDEPLOYKEYREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Codeup + { + namespace Model + { + class ALIBABACLOUD_CODEUP_EXPORT EnableRepositoryDeployKeyRequest : public RoaServiceRequest + { + + public: + EnableRepositoryDeployKeyRequest(); + ~EnableRepositoryDeployKeyRequest(); + + std::string getOrganizationId()const; + void setOrganizationId(const std::string& organizationId); + std::string getSubUserId()const; + void setSubUserId(const std::string& subUserId); + std::string getAccessToken()const; + void setAccessToken(const std::string& accessToken); + long getKeyId()const; + void setKeyId(long keyId); + long getProjectId()const; + void setProjectId(long projectId); + + private: + std::string organizationId_; + std::string subUserId_; + std::string accessToken_; + long keyId_; + long projectId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CODEUP_MODEL_ENABLEREPOSITORYDEPLOYKEYREQUEST_H_ \ No newline at end of file diff --git a/codeup/include/alibabacloud/codeup/model/EnableRepositoryDeployKeyResult.h b/codeup/include/alibabacloud/codeup/model/EnableRepositoryDeployKeyResult.h new file mode 100644 index 000000000..d07e6b08f --- /dev/null +++ b/codeup/include/alibabacloud/codeup/model/EnableRepositoryDeployKeyResult.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_ENABLEREPOSITORYDEPLOYKEYRESULT_H_ +#define ALIBABACLOUD_CODEUP_MODEL_ENABLEREPOSITORYDEPLOYKEYRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Codeup + { + namespace Model + { + class ALIBABACLOUD_CODEUP_EXPORT EnableRepositoryDeployKeyResult : public ServiceResult + { + public: + struct Result + { + bool result; + }; + + + EnableRepositoryDeployKeyResult(); + explicit EnableRepositoryDeployKeyResult(const std::string &payload); + ~EnableRepositoryDeployKeyResult(); + 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_ENABLEREPOSITORYDEPLOYKEYRESULT_H_ \ No newline at end of file diff --git a/codeup/include/alibabacloud/codeup/model/GetUserInfoRequest.h b/codeup/include/alibabacloud/codeup/model/GetUserInfoRequest.h index 5db3f5a46..048f15d61 100644 --- a/codeup/include/alibabacloud/codeup/model/GetUserInfoRequest.h +++ b/codeup/include/alibabacloud/codeup/model/GetUserInfoRequest.h @@ -35,10 +35,13 @@ namespace AlibabaCloud GetUserInfoRequest(); ~GetUserInfoRequest(); + std::string getOrganizationId()const; + void setOrganizationId(const std::string& organizationId); std::string getAccessToken()const; void setAccessToken(const std::string& accessToken); private: + std::string organizationId_; std::string accessToken_; }; diff --git a/codeup/include/alibabacloud/codeup/model/ListMergeRequestsRequest.h b/codeup/include/alibabacloud/codeup/model/ListMergeRequestsRequest.h new file mode 100644 index 000000000..bbbe81346 --- /dev/null +++ b/codeup/include/alibabacloud/codeup/model/ListMergeRequestsRequest.h @@ -0,0 +1,93 @@ +/* + * 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_LISTMERGEREQUESTSREQUEST_H_ +#define ALIBABACLOUD_CODEUP_MODEL_LISTMERGEREQUESTSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Codeup + { + namespace Model + { + class ALIBABACLOUD_CODEUP_EXPORT ListMergeRequestsRequest : public RoaServiceRequest + { + + public: + ListMergeRequestsRequest(); + ~ListMergeRequestsRequest(); + + std::string getBeforeDate()const; + void setBeforeDate(const std::string& beforeDate); + std::string getAssigneeIdList()const; + void setAssigneeIdList(const std::string& assigneeIdList); + std::string getAccessToken()const; + void setAccessToken(const std::string& accessToken); + std::string getSubscriberCodeupIdList()const; + void setSubscriberCodeupIdList(const std::string& subscriberCodeupIdList); + std::string getAfterDate()const; + void setAfterDate(const std::string& afterDate); + std::string getOrganizationId()const; + void setOrganizationId(const std::string& organizationId); + std::string getGroupIdList()const; + void setGroupIdList(const std::string& groupIdList); + std::string getSearch()const; + void setSearch(const std::string& search); + std::string getAuthorCodeupIdList()const; + void setAuthorCodeupIdList(const std::string& authorCodeupIdList); + std::string getAuthorIdList()const; + void setAuthorIdList(const std::string& authorIdList); + long getPageSize()const; + void setPageSize(long pageSize); + std::string getProjectIdList()const; + void setProjectIdList(const std::string& projectIdList); + long getPage()const; + void setPage(long page); + std::string getAssigneeCodeupIdList()const; + void setAssigneeCodeupIdList(const std::string& assigneeCodeupIdList); + std::string getState()const; + void setState(const std::string& state); + std::string getOrder()const; + void setOrder(const std::string& order); + + private: + std::string beforeDate_; + std::string assigneeIdList_; + std::string accessToken_; + std::string subscriberCodeupIdList_; + std::string afterDate_; + std::string organizationId_; + std::string groupIdList_; + std::string search_; + std::string authorCodeupIdList_; + std::string authorIdList_; + long pageSize_; + std::string projectIdList_; + long page_; + std::string assigneeCodeupIdList_; + std::string state_; + std::string order_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CODEUP_MODEL_LISTMERGEREQUESTSREQUEST_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 new file mode 100644 index 000000000..c589568fa --- /dev/null +++ b/codeup/include/alibabacloud/codeup/model/ListMergeRequestsResult.h @@ -0,0 +1,135 @@ +/* + * 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_LISTMERGEREQUESTSRESULT_H_ +#define ALIBABACLOUD_CODEUP_MODEL_LISTMERGEREQUESTSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Codeup + { + namespace Model + { + class ALIBABACLOUD_CODEUP_EXPORT ListMergeRequestsResult : public ServiceResult + { + public: + struct ResultItem + { + 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; + }; + + + ListMergeRequestsResult(); + explicit ListMergeRequestsResult(const std::string &payload); + ~ListMergeRequestsResult(); + 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_LISTMERGEREQUESTSRESULT_H_ \ No newline at end of file diff --git a/codeup/include/alibabacloud/codeup/model/UpdateRepositoryRequest.h b/codeup/include/alibabacloud/codeup/model/UpdateRepositoryRequest.h new file mode 100644 index 000000000..efd527257 --- /dev/null +++ b/codeup/include/alibabacloud/codeup/model/UpdateRepositoryRequest.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_UPDATEREPOSITORYREQUEST_H_ +#define ALIBABACLOUD_CODEUP_MODEL_UPDATEREPOSITORYREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Codeup + { + namespace Model + { + class ALIBABACLOUD_CODEUP_EXPORT UpdateRepositoryRequest : public RoaServiceRequest + { + + public: + UpdateRepositoryRequest(); + ~UpdateRepositoryRequest(); + + 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_UPDATEREPOSITORYREQUEST_H_ \ No newline at end of file diff --git a/codeup/include/alibabacloud/codeup/model/UpdateRepositoryResult.h b/codeup/include/alibabacloud/codeup/model/UpdateRepositoryResult.h new file mode 100644 index 000000000..0e2d0e627 --- /dev/null +++ b/codeup/include/alibabacloud/codeup/model/UpdateRepositoryResult.h @@ -0,0 +1,90 @@ +/* + * 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_UPDATEREPOSITORYRESULT_H_ +#define ALIBABACLOUD_CODEUP_MODEL_UPDATEREPOSITORYRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Codeup + { + namespace Model + { + class ALIBABACLOUD_CODEUP_EXPORT UpdateRepositoryResult : public ServiceResult + { + public: + struct Result + { + struct _Namespace + { + std::string path; + std::string description; + long ownerId; + std::string createdAt; + bool _public; + std::string visibilityLevel; + long id; + std::string updatedAt; + std::string avatar; + std::string name; + }; + std::string defaultBranch; + std::string lastActivityAt; + std::string path; + std::string pathWithNamespace; + std::string httpUrlToRepo; + bool archive; + std::string description; + long creatorId; + std::string createdAt; + std::string nameWithNamespace; + std::string webUrl; + _Namespace _namespace; + std::string visibilityLevel; + std::string name; + std::string sshUrlToRepo; + std::string avatarUrl; + long id; + }; + + + UpdateRepositoryResult(); + explicit UpdateRepositoryResult(const std::string &payload); + ~UpdateRepositoryResult(); + 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_UPDATEREPOSITORYRESULT_H_ \ No newline at end of file diff --git a/codeup/src/CodeupClient.cc b/codeup/src/CodeupClient.cc index 18719007f..588184f99 100644 --- a/codeup/src/CodeupClient.cc +++ b/codeup/src/CodeupClient.cc @@ -303,6 +303,42 @@ CodeupClient::CreateRepositoryOutcomeCallable CodeupClient::createRepositoryCall return task->get_future(); } +CodeupClient::CreateRepositoryDeployKeyOutcome CodeupClient::createRepositoryDeployKey(const CreateRepositoryDeployKeyRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CreateRepositoryDeployKeyOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CreateRepositoryDeployKeyOutcome(CreateRepositoryDeployKeyResult(outcome.result())); + else + return CreateRepositoryDeployKeyOutcome(outcome.error()); +} + +void CodeupClient::createRepositoryDeployKeyAsync(const CreateRepositoryDeployKeyRequest& request, const CreateRepositoryDeployKeyAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, createRepositoryDeployKey(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CodeupClient::CreateRepositoryDeployKeyOutcomeCallable CodeupClient::createRepositoryDeployKeyCallable(const CreateRepositoryDeployKeyRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->createRepositoryDeployKey(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + CodeupClient::CreateRepositoryGroupOutcome CodeupClient::createRepositoryGroup(const CreateRepositoryGroupRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -339,6 +375,42 @@ CodeupClient::CreateRepositoryGroupOutcomeCallable CodeupClient::createRepositor return task->get_future(); } +CodeupClient::CreateRepositoryProtectedBranchOutcome CodeupClient::createRepositoryProtectedBranch(const CreateRepositoryProtectedBranchRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CreateRepositoryProtectedBranchOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CreateRepositoryProtectedBranchOutcome(CreateRepositoryProtectedBranchResult(outcome.result())); + else + return CreateRepositoryProtectedBranchOutcome(outcome.error()); +} + +void CodeupClient::createRepositoryProtectedBranchAsync(const CreateRepositoryProtectedBranchRequest& request, const CreateRepositoryProtectedBranchAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, createRepositoryProtectedBranch(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CodeupClient::CreateRepositoryProtectedBranchOutcomeCallable CodeupClient::createRepositoryProtectedBranchCallable(const CreateRepositoryProtectedBranchRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->createRepositoryProtectedBranch(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + CodeupClient::CreateTagOutcome CodeupClient::createTag(const CreateTagRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -591,6 +663,42 @@ CodeupClient::DeleteRepositoryMemberOutcomeCallable CodeupClient::deleteReposito return task->get_future(); } +CodeupClient::DeleteRepositoryProtectedBranchOutcome CodeupClient::deleteRepositoryProtectedBranch(const DeleteRepositoryProtectedBranchRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DeleteRepositoryProtectedBranchOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DeleteRepositoryProtectedBranchOutcome(DeleteRepositoryProtectedBranchResult(outcome.result())); + else + return DeleteRepositoryProtectedBranchOutcome(outcome.error()); +} + +void CodeupClient::deleteRepositoryProtectedBranchAsync(const DeleteRepositoryProtectedBranchRequest& request, const DeleteRepositoryProtectedBranchAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, deleteRepositoryProtectedBranch(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CodeupClient::DeleteRepositoryProtectedBranchOutcomeCallable CodeupClient::deleteRepositoryProtectedBranchCallable(const DeleteRepositoryProtectedBranchRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->deleteRepositoryProtectedBranch(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + CodeupClient::DeleteRepositoryTagOutcome CodeupClient::deleteRepositoryTag(const DeleteRepositoryTagRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -663,6 +771,42 @@ CodeupClient::DeleteRepositoryWebhookOutcomeCallable CodeupClient::deleteReposit return task->get_future(); } +CodeupClient::EnableRepositoryDeployKeyOutcome CodeupClient::enableRepositoryDeployKey(const EnableRepositoryDeployKeyRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return EnableRepositoryDeployKeyOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return EnableRepositoryDeployKeyOutcome(EnableRepositoryDeployKeyResult(outcome.result())); + else + return EnableRepositoryDeployKeyOutcome(outcome.error()); +} + +void CodeupClient::enableRepositoryDeployKeyAsync(const EnableRepositoryDeployKeyRequest& request, const EnableRepositoryDeployKeyAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, enableRepositoryDeployKey(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CodeupClient::EnableRepositoryDeployKeyOutcomeCallable CodeupClient::enableRepositoryDeployKeyCallable(const EnableRepositoryDeployKeyRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->enableRepositoryDeployKey(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + CodeupClient::GetBranchInfoOutcome CodeupClient::getBranchInfo(const GetBranchInfoRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -1059,6 +1203,42 @@ CodeupClient::ListGroupsOutcomeCallable CodeupClient::listGroupsCallable(const L return task->get_future(); } +CodeupClient::ListMergeRequestsOutcome CodeupClient::listMergeRequests(const ListMergeRequestsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListMergeRequestsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListMergeRequestsOutcome(ListMergeRequestsResult(outcome.result())); + else + return ListMergeRequestsOutcome(outcome.error()); +} + +void CodeupClient::listMergeRequestsAsync(const ListMergeRequestsRequest& request, const ListMergeRequestsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listMergeRequests(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CodeupClient::ListMergeRequestsOutcomeCallable CodeupClient::listMergeRequestsCallable(const ListMergeRequestsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listMergeRequests(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + CodeupClient::ListOrganizationsOutcome CodeupClient::listOrganizations(const ListOrganizationsRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -1419,6 +1599,42 @@ CodeupClient::UpdateGroupMemberOutcomeCallable CodeupClient::updateGroupMemberCa return task->get_future(); } +CodeupClient::UpdateRepositoryOutcome CodeupClient::updateRepository(const UpdateRepositoryRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return UpdateRepositoryOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return UpdateRepositoryOutcome(UpdateRepositoryResult(outcome.result())); + else + return UpdateRepositoryOutcome(outcome.error()); +} + +void CodeupClient::updateRepositoryAsync(const UpdateRepositoryRequest& request, const UpdateRepositoryAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, updateRepository(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CodeupClient::UpdateRepositoryOutcomeCallable CodeupClient::updateRepositoryCallable(const UpdateRepositoryRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->updateRepository(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + CodeupClient::UpdateRepositoryMemberOutcome CodeupClient::updateRepositoryMember(const UpdateRepositoryMemberRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/codeup/src/model/CreateRepositoryDeployKeyRequest.cc b/codeup/src/model/CreateRepositoryDeployKeyRequest.cc new file mode 100644 index 000000000..1f3dac113 --- /dev/null +++ b/codeup/src/model/CreateRepositoryDeployKeyRequest.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::CreateRepositoryDeployKeyRequest; + +CreateRepositoryDeployKeyRequest::CreateRepositoryDeployKeyRequest() : + RoaServiceRequest("codeup", "2020-04-14") +{ + setResourcePath("/api/v3/projects/[ProjectId]/keys"); + setMethod(HttpRequest::Method::Post); +} + +CreateRepositoryDeployKeyRequest::~CreateRepositoryDeployKeyRequest() +{} + +std::string CreateRepositoryDeployKeyRequest::getOrganizationId()const +{ + return organizationId_; +} + +void CreateRepositoryDeployKeyRequest::setOrganizationId(const std::string& organizationId) +{ + organizationId_ = organizationId; + setParameter("OrganizationId", organizationId); +} + +std::string CreateRepositoryDeployKeyRequest::getSubUserId()const +{ + return subUserId_; +} + +void CreateRepositoryDeployKeyRequest::setSubUserId(const std::string& subUserId) +{ + subUserId_ = subUserId; + setParameter("SubUserId", subUserId); +} + +std::string CreateRepositoryDeployKeyRequest::getAccessToken()const +{ + return accessToken_; +} + +void CreateRepositoryDeployKeyRequest::setAccessToken(const std::string& accessToken) +{ + accessToken_ = accessToken; + setParameter("AccessToken", accessToken); +} + +long CreateRepositoryDeployKeyRequest::getProjectId()const +{ + return projectId_; +} + +void CreateRepositoryDeployKeyRequest::setProjectId(long projectId) +{ + projectId_ = projectId; + setParameter("ProjectId", std::to_string(projectId)); +} + diff --git a/codeup/src/model/CreateRepositoryDeployKeyResult.cc b/codeup/src/model/CreateRepositoryDeployKeyResult.cc new file mode 100644 index 000000000..8f88d4227 --- /dev/null +++ b/codeup/src/model/CreateRepositoryDeployKeyResult.cc @@ -0,0 +1,81 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Codeup; +using namespace AlibabaCloud::Codeup::Model; + +CreateRepositoryDeployKeyResult::CreateRepositoryDeployKeyResult() : + ServiceResult() +{} + +CreateRepositoryDeployKeyResult::CreateRepositoryDeployKeyResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CreateRepositoryDeployKeyResult::~CreateRepositoryDeployKeyResult() +{} + +void CreateRepositoryDeployKeyResult::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["Title"].isNull()) + result_.title = resultNode["Title"].asString(); + if(!resultNode["Key"].isNull()) + result_.key = resultNode["Key"].asString(); + if(!resultNode["FingerPrint"].isNull()) + result_.fingerPrint = resultNode["FingerPrint"].asString(); + if(!resultNode["CreatedAt"].isNull()) + result_.createdAt = resultNode["CreatedAt"].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 CreateRepositoryDeployKeyResult::getErrorCode()const +{ + return errorCode_; +} + +std::string CreateRepositoryDeployKeyResult::getErrorMessage()const +{ + return errorMessage_; +} + +bool CreateRepositoryDeployKeyResult::getSuccess()const +{ + return success_; +} + +CreateRepositoryDeployKeyResult::Result CreateRepositoryDeployKeyResult::getResult()const +{ + return result_; +} + diff --git a/codeup/src/model/CreateRepositoryProtectedBranchRequest.cc b/codeup/src/model/CreateRepositoryProtectedBranchRequest.cc new file mode 100644 index 000000000..5b824c480 --- /dev/null +++ b/codeup/src/model/CreateRepositoryProtectedBranchRequest.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::CreateRepositoryProtectedBranchRequest; + +CreateRepositoryProtectedBranchRequest::CreateRepositoryProtectedBranchRequest() : + RoaServiceRequest("codeup", "2020-04-14") +{ + setResourcePath("/api/v4/projects/[ProjectId]/repository/protect_branches"); + setMethod(HttpRequest::Method::Post); +} + +CreateRepositoryProtectedBranchRequest::~CreateRepositoryProtectedBranchRequest() +{} + +std::string CreateRepositoryProtectedBranchRequest::getOrganizationId()const +{ + return organizationId_; +} + +void CreateRepositoryProtectedBranchRequest::setOrganizationId(const std::string& organizationId) +{ + organizationId_ = organizationId; + setParameter("OrganizationId", organizationId); +} + +std::string CreateRepositoryProtectedBranchRequest::getAccessToken()const +{ + return accessToken_; +} + +void CreateRepositoryProtectedBranchRequest::setAccessToken(const std::string& accessToken) +{ + accessToken_ = accessToken; + setParameter("AccessToken", accessToken); +} + +long CreateRepositoryProtectedBranchRequest::getProjectId()const +{ + return projectId_; +} + +void CreateRepositoryProtectedBranchRequest::setProjectId(long projectId) +{ + projectId_ = projectId; + setParameter("ProjectId", std::to_string(projectId)); +} + diff --git a/codeup/src/model/CreateRepositoryProtectedBranchResult.cc b/codeup/src/model/CreateRepositoryProtectedBranchResult.cc new file mode 100644 index 000000000..c7d75ed9e --- /dev/null +++ b/codeup/src/model/CreateRepositoryProtectedBranchResult.cc @@ -0,0 +1,124 @@ +/* + * 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; + +CreateRepositoryProtectedBranchResult::CreateRepositoryProtectedBranchResult() : + ServiceResult() +{} + +CreateRepositoryProtectedBranchResult::CreateRepositoryProtectedBranchResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CreateRepositoryProtectedBranchResult::~CreateRepositoryProtectedBranchResult() +{} + +void CreateRepositoryProtectedBranchResult::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["Branch"].isNull()) + result_.branch = resultNode["Branch"].asString(); + auto mergeRequestSettingNode = resultNode["MergeRequestSetting"]; + if(!mergeRequestSettingNode["Required"].isNull()) + result_.mergeRequestSetting.required = mergeRequestSettingNode["Required"].asString() == "true"; + if(!mergeRequestSettingNode["MergeRequestMode"].isNull()) + result_.mergeRequestSetting.mergeRequestMode = mergeRequestSettingNode["MergeRequestMode"].asString(); + if(!mergeRequestSettingNode["AllowSelfApproval"].isNull()) + result_.mergeRequestSetting.allowSelfApproval = mergeRequestSettingNode["AllowSelfApproval"].asString() == "true"; + if(!mergeRequestSettingNode["IsRequireDiscussionProcessed"].isNull()) + result_.mergeRequestSetting.isRequireDiscussionProcessed = mergeRequestSettingNode["IsRequireDiscussionProcessed"].asString() == "true"; + if(!mergeRequestSettingNode["IsResetApprovalWhenNewPush"].isNull()) + result_.mergeRequestSetting.isResetApprovalWhenNewPush = mergeRequestSettingNode["IsResetApprovalWhenNewPush"].asString() == "true"; + if(!mergeRequestSettingNode["MinimualApproval"].isNull()) + result_.mergeRequestSetting.minimualApproval = std::stoi(mergeRequestSettingNode["MinimualApproval"].asString()); + auto allAllowMergeRequestRoles = mergeRequestSettingNode["AllowMergeRequestRoles"]["AllowMergeRequestRoles"]; + for (auto value : allAllowMergeRequestRoles) + result_.mergeRequestSetting.allowMergeRequestRoles.push_back(value.asString()); + auto allDefaultAssignees = mergeRequestSettingNode["DefaultAssignees"]["DefaultAssignees"]; + for (auto value : allDefaultAssignees) + result_.mergeRequestSetting.defaultAssignees.push_back(value.asString()); + auto testSettingNode = resultNode["TestSetting"]; + if(!testSettingNode["Required"].isNull()) + result_.testSetting.required = testSettingNode["Required"].asString() == "true"; + auto codingGuidelinesDetectionNode = testSettingNode["CodingGuidelinesDetection"]; + if(!codingGuidelinesDetectionNode["Enabled"].isNull()) + result_.testSetting.codingGuidelinesDetection.enabled = codingGuidelinesDetectionNode["Enabled"].asString() == "true"; + if(!codingGuidelinesDetectionNode["Message"].isNull()) + result_.testSetting.codingGuidelinesDetection.message = codingGuidelinesDetectionNode["Message"].asString(); + auto sensitiveInfoDetectionNode = testSettingNode["SensitiveInfoDetection"]; + if(!sensitiveInfoDetectionNode["Enabled"].isNull()) + result_.testSetting.sensitiveInfoDetection.enabled = sensitiveInfoDetectionNode["Enabled"].asString() == "true"; + if(!sensitiveInfoDetectionNode["Message"].isNull()) + result_.testSetting.sensitiveInfoDetection.message = sensitiveInfoDetectionNode["Message"].asString(); + auto checkConfigNode = testSettingNode["CheckConfig"]; + auto allCheckItemsNode = checkConfigNode["CheckItems"]["CheckItemsItem"]; + for (auto checkConfigNodeCheckItemsCheckItemsItem : allCheckItemsNode) + { + Result::TestSetting::CheckConfig::CheckItemsItem checkItemsItemObject; + if(!checkConfigNodeCheckItemsCheckItemsItem["Name"].isNull()) + checkItemsItemObject.name = checkConfigNodeCheckItemsCheckItemsItem["Name"].asString(); + if(!checkConfigNodeCheckItemsCheckItemsItem["Required"].isNull()) + checkItemsItemObject.required = checkConfigNodeCheckItemsCheckItemsItem["Required"].asString() == "true"; + result_.testSetting.checkConfig.checkItems.push_back(checkItemsItemObject); + } + auto allAllowPushRoles = resultNode["AllowPushRoles"]["AllowPushRoles"]; + for (auto value : allAllowPushRoles) + result_.allowPushRoles.push_back(value.asString()); + auto allAllowMergeRoles = resultNode["AllowMergeRoles"]["AllowMergeRoles"]; + for (auto value : allAllowMergeRoles) + result_.allowMergeRoles.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 CreateRepositoryProtectedBranchResult::getErrorCode()const +{ + return errorCode_; +} + +std::string CreateRepositoryProtectedBranchResult::getErrorMessage()const +{ + return errorMessage_; +} + +bool CreateRepositoryProtectedBranchResult::getSuccess()const +{ + return success_; +} + +CreateRepositoryProtectedBranchResult::Result CreateRepositoryProtectedBranchResult::getResult()const +{ + return result_; +} + diff --git a/codeup/src/model/DeleteRepositoryProtectedBranchRequest.cc b/codeup/src/model/DeleteRepositoryProtectedBranchRequest.cc new file mode 100644 index 000000000..11567c5fa --- /dev/null +++ b/codeup/src/model/DeleteRepositoryProtectedBranchRequest.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::DeleteRepositoryProtectedBranchRequest; + +DeleteRepositoryProtectedBranchRequest::DeleteRepositoryProtectedBranchRequest() : + RoaServiceRequest("codeup", "2020-04-14") +{ + setResourcePath("/api/v4/projects/[ProjectId]/repository/protect_branches/[ProtectedBranchId]"); + setMethod(HttpRequest::Method::Delete); +} + +DeleteRepositoryProtectedBranchRequest::~DeleteRepositoryProtectedBranchRequest() +{} + +std::string DeleteRepositoryProtectedBranchRequest::getOrganizationId()const +{ + return organizationId_; +} + +void DeleteRepositoryProtectedBranchRequest::setOrganizationId(const std::string& organizationId) +{ + organizationId_ = organizationId; + setParameter("OrganizationId", organizationId); +} + +long DeleteRepositoryProtectedBranchRequest::getProtectedBranchId()const +{ + return protectedBranchId_; +} + +void DeleteRepositoryProtectedBranchRequest::setProtectedBranchId(long protectedBranchId) +{ + protectedBranchId_ = protectedBranchId; + setParameter("ProtectedBranchId", std::to_string(protectedBranchId)); +} + +std::string DeleteRepositoryProtectedBranchRequest::getAccessToken()const +{ + return accessToken_; +} + +void DeleteRepositoryProtectedBranchRequest::setAccessToken(const std::string& accessToken) +{ + accessToken_ = accessToken; + setParameter("AccessToken", accessToken); +} + +long DeleteRepositoryProtectedBranchRequest::getProjectId()const +{ + return projectId_; +} + +void DeleteRepositoryProtectedBranchRequest::setProjectId(long projectId) +{ + projectId_ = projectId; + setParameter("ProjectId", std::to_string(projectId)); +} + diff --git a/codeup/src/model/DeleteRepositoryProtectedBranchResult.cc b/codeup/src/model/DeleteRepositoryProtectedBranchResult.cc new file mode 100644 index 000000000..818f99083 --- /dev/null +++ b/codeup/src/model/DeleteRepositoryProtectedBranchResult.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; + +DeleteRepositoryProtectedBranchResult::DeleteRepositoryProtectedBranchResult() : + ServiceResult() +{} + +DeleteRepositoryProtectedBranchResult::DeleteRepositoryProtectedBranchResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DeleteRepositoryProtectedBranchResult::~DeleteRepositoryProtectedBranchResult() +{} + +void DeleteRepositoryProtectedBranchResult::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 DeleteRepositoryProtectedBranchResult::getErrorCode()const +{ + return errorCode_; +} + +std::string DeleteRepositoryProtectedBranchResult::getErrorMessage()const +{ + return errorMessage_; +} + +bool DeleteRepositoryProtectedBranchResult::getSuccess()const +{ + return success_; +} + +DeleteRepositoryProtectedBranchResult::Result DeleteRepositoryProtectedBranchResult::getResult()const +{ + return result_; +} + diff --git a/codeup/src/model/EnableRepositoryDeployKeyRequest.cc b/codeup/src/model/EnableRepositoryDeployKeyRequest.cc new file mode 100644 index 000000000..b4131c3dd --- /dev/null +++ b/codeup/src/model/EnableRepositoryDeployKeyRequest.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::EnableRepositoryDeployKeyRequest; + +EnableRepositoryDeployKeyRequest::EnableRepositoryDeployKeyRequest() : + RoaServiceRequest("codeup", "2020-04-14") +{ + setResourcePath("/api/v3/projects/[ProjectId]/keys/[KeyId]/enable"); + setMethod(HttpRequest::Method::Post); +} + +EnableRepositoryDeployKeyRequest::~EnableRepositoryDeployKeyRequest() +{} + +std::string EnableRepositoryDeployKeyRequest::getOrganizationId()const +{ + return organizationId_; +} + +void EnableRepositoryDeployKeyRequest::setOrganizationId(const std::string& organizationId) +{ + organizationId_ = organizationId; + setParameter("OrganizationId", organizationId); +} + +std::string EnableRepositoryDeployKeyRequest::getSubUserId()const +{ + return subUserId_; +} + +void EnableRepositoryDeployKeyRequest::setSubUserId(const std::string& subUserId) +{ + subUserId_ = subUserId; + setParameter("SubUserId", subUserId); +} + +std::string EnableRepositoryDeployKeyRequest::getAccessToken()const +{ + return accessToken_; +} + +void EnableRepositoryDeployKeyRequest::setAccessToken(const std::string& accessToken) +{ + accessToken_ = accessToken; + setParameter("AccessToken", accessToken); +} + +long EnableRepositoryDeployKeyRequest::getKeyId()const +{ + return keyId_; +} + +void EnableRepositoryDeployKeyRequest::setKeyId(long keyId) +{ + keyId_ = keyId; + setParameter("KeyId", std::to_string(keyId)); +} + +long EnableRepositoryDeployKeyRequest::getProjectId()const +{ + return projectId_; +} + +void EnableRepositoryDeployKeyRequest::setProjectId(long projectId) +{ + projectId_ = projectId; + setParameter("ProjectId", std::to_string(projectId)); +} + diff --git a/codeup/src/model/EnableRepositoryDeployKeyResult.cc b/codeup/src/model/EnableRepositoryDeployKeyResult.cc new file mode 100644 index 000000000..93c757b9c --- /dev/null +++ b/codeup/src/model/EnableRepositoryDeployKeyResult.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; + +EnableRepositoryDeployKeyResult::EnableRepositoryDeployKeyResult() : + ServiceResult() +{} + +EnableRepositoryDeployKeyResult::EnableRepositoryDeployKeyResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +EnableRepositoryDeployKeyResult::~EnableRepositoryDeployKeyResult() +{} + +void EnableRepositoryDeployKeyResult::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 EnableRepositoryDeployKeyResult::getErrorCode()const +{ + return errorCode_; +} + +std::string EnableRepositoryDeployKeyResult::getErrorMessage()const +{ + return errorMessage_; +} + +bool EnableRepositoryDeployKeyResult::getSuccess()const +{ + return success_; +} + +EnableRepositoryDeployKeyResult::Result EnableRepositoryDeployKeyResult::getResult()const +{ + return result_; +} + diff --git a/codeup/src/model/GetUserInfoRequest.cc b/codeup/src/model/GetUserInfoRequest.cc index 7cfe13f38..efc71bb85 100644 --- a/codeup/src/model/GetUserInfoRequest.cc +++ b/codeup/src/model/GetUserInfoRequest.cc @@ -28,6 +28,17 @@ GetUserInfoRequest::GetUserInfoRequest() : GetUserInfoRequest::~GetUserInfoRequest() {} +std::string GetUserInfoRequest::getOrganizationId()const +{ + return organizationId_; +} + +void GetUserInfoRequest::setOrganizationId(const std::string& organizationId) +{ + organizationId_ = organizationId; + setParameter("OrganizationId", organizationId); +} + std::string GetUserInfoRequest::getAccessToken()const { return accessToken_; diff --git a/codeup/src/model/ListMergeRequestsRequest.cc b/codeup/src/model/ListMergeRequestsRequest.cc new file mode 100644 index 000000000..06436fe52 --- /dev/null +++ b/codeup/src/model/ListMergeRequestsRequest.cc @@ -0,0 +1,206 @@ +/* + * 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::ListMergeRequestsRequest; + +ListMergeRequestsRequest::ListMergeRequestsRequest() : + RoaServiceRequest("codeup", "2020-04-14") +{ + setResourcePath("/api/v4/merge_requests/advanced_search"); + setMethod(HttpRequest::Method::Get); +} + +ListMergeRequestsRequest::~ListMergeRequestsRequest() +{} + +std::string ListMergeRequestsRequest::getBeforeDate()const +{ + return beforeDate_; +} + +void ListMergeRequestsRequest::setBeforeDate(const std::string& beforeDate) +{ + beforeDate_ = beforeDate; + setParameter("BeforeDate", beforeDate); +} + +std::string ListMergeRequestsRequest::getAssigneeIdList()const +{ + return assigneeIdList_; +} + +void ListMergeRequestsRequest::setAssigneeIdList(const std::string& assigneeIdList) +{ + assigneeIdList_ = assigneeIdList; + setParameter("AssigneeIdList", assigneeIdList); +} + +std::string ListMergeRequestsRequest::getAccessToken()const +{ + return accessToken_; +} + +void ListMergeRequestsRequest::setAccessToken(const std::string& accessToken) +{ + accessToken_ = accessToken; + setParameter("AccessToken", accessToken); +} + +std::string ListMergeRequestsRequest::getSubscriberCodeupIdList()const +{ + return subscriberCodeupIdList_; +} + +void ListMergeRequestsRequest::setSubscriberCodeupIdList(const std::string& subscriberCodeupIdList) +{ + subscriberCodeupIdList_ = subscriberCodeupIdList; + setParameter("SubscriberCodeupIdList", subscriberCodeupIdList); +} + +std::string ListMergeRequestsRequest::getAfterDate()const +{ + return afterDate_; +} + +void ListMergeRequestsRequest::setAfterDate(const std::string& afterDate) +{ + afterDate_ = afterDate; + setParameter("AfterDate", afterDate); +} + +std::string ListMergeRequestsRequest::getOrganizationId()const +{ + return organizationId_; +} + +void ListMergeRequestsRequest::setOrganizationId(const std::string& organizationId) +{ + organizationId_ = organizationId; + setParameter("OrganizationId", organizationId); +} + +std::string ListMergeRequestsRequest::getGroupIdList()const +{ + return groupIdList_; +} + +void ListMergeRequestsRequest::setGroupIdList(const std::string& groupIdList) +{ + groupIdList_ = groupIdList; + setParameter("GroupIdList", groupIdList); +} + +std::string ListMergeRequestsRequest::getSearch()const +{ + return search_; +} + +void ListMergeRequestsRequest::setSearch(const std::string& search) +{ + search_ = search; + setParameter("Search", search); +} + +std::string ListMergeRequestsRequest::getAuthorCodeupIdList()const +{ + return authorCodeupIdList_; +} + +void ListMergeRequestsRequest::setAuthorCodeupIdList(const std::string& authorCodeupIdList) +{ + authorCodeupIdList_ = authorCodeupIdList; + setParameter("AuthorCodeupIdList", authorCodeupIdList); +} + +std::string ListMergeRequestsRequest::getAuthorIdList()const +{ + return authorIdList_; +} + +void ListMergeRequestsRequest::setAuthorIdList(const std::string& authorIdList) +{ + authorIdList_ = authorIdList; + setParameter("AuthorIdList", authorIdList); +} + +long ListMergeRequestsRequest::getPageSize()const +{ + return pageSize_; +} + +void ListMergeRequestsRequest::setPageSize(long pageSize) +{ + pageSize_ = pageSize; + setParameter("PageSize", std::to_string(pageSize)); +} + +std::string ListMergeRequestsRequest::getProjectIdList()const +{ + return projectIdList_; +} + +void ListMergeRequestsRequest::setProjectIdList(const std::string& projectIdList) +{ + projectIdList_ = projectIdList; + setParameter("ProjectIdList", projectIdList); +} + +long ListMergeRequestsRequest::getPage()const +{ + return page_; +} + +void ListMergeRequestsRequest::setPage(long page) +{ + page_ = page; + setParameter("Page", std::to_string(page)); +} + +std::string ListMergeRequestsRequest::getAssigneeCodeupIdList()const +{ + return assigneeCodeupIdList_; +} + +void ListMergeRequestsRequest::setAssigneeCodeupIdList(const std::string& assigneeCodeupIdList) +{ + assigneeCodeupIdList_ = assigneeCodeupIdList; + setParameter("AssigneeCodeupIdList", assigneeCodeupIdList); +} + +std::string ListMergeRequestsRequest::getState()const +{ + return state_; +} + +void ListMergeRequestsRequest::setState(const std::string& state) +{ + state_ = state; + setParameter("State", state); +} + +std::string ListMergeRequestsRequest::getOrder()const +{ + return order_; +} + +void ListMergeRequestsRequest::setOrder(const std::string& order) +{ + order_ = order; + setParameter("Order", order); +} + diff --git a/codeup/src/model/ListMergeRequestsResult.cc b/codeup/src/model/ListMergeRequestsResult.cc new file mode 100644 index 000000000..09079a40f --- /dev/null +++ b/codeup/src/model/ListMergeRequestsResult.cc @@ -0,0 +1,209 @@ +/* + * 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; + +ListMergeRequestsResult::ListMergeRequestsResult() : + ServiceResult() +{} + +ListMergeRequestsResult::ListMergeRequestsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListMergeRequestsResult::~ListMergeRequestsResult() +{} + +void ListMergeRequestsResult::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["AcceptedRevision"].isNull()) + resultObject.acceptedRevision = valueResultResultItem["AcceptedRevision"].asString(); + if(!valueResultResultItem["AheadCommitCount"].isNull()) + resultObject.aheadCommitCount = std::stoi(valueResultResultItem["AheadCommitCount"].asString()); + if(!valueResultResultItem["BehindCommitCount"].isNull()) + resultObject.behindCommitCount = std::stoi(valueResultResultItem["BehindCommitCount"].asString()); + if(!valueResultResultItem["CreatedAt"].isNull()) + resultObject.createdAt = valueResultResultItem["CreatedAt"].asString(); + if(!valueResultResultItem["Description"].isNull()) + resultObject.description = valueResultResultItem["Description"].asString(); + if(!valueResultResultItem["Id"].isNull()) + resultObject.id = std::stol(valueResultResultItem["Id"].asString()); + if(!valueResultResultItem["MergeError"].isNull()) + resultObject.mergeError = valueResultResultItem["MergeError"].asString(); + if(!valueResultResultItem["MergeStatus"].isNull()) + resultObject.mergeStatus = valueResultResultItem["MergeStatus"].asString(); + if(!valueResultResultItem["MergeType"].isNull()) + resultObject.mergeType = valueResultResultItem["MergeType"].asString(); + if(!valueResultResultItem["MergedRevision"].isNull()) + resultObject.mergedRevision = valueResultResultItem["MergedRevision"].asString(); + if(!valueResultResultItem["NameWithNamespace"].isNull()) + resultObject.nameWithNamespace = valueResultResultItem["NameWithNamespace"].asString(); + if(!valueResultResultItem["ProjectId"].isNull()) + resultObject.projectId = std::stol(valueResultResultItem["ProjectId"].asString()); + if(!valueResultResultItem["SourceBranch"].isNull()) + resultObject.sourceBranch = valueResultResultItem["SourceBranch"].asString(); + if(!valueResultResultItem["State"].isNull()) + resultObject.state = valueResultResultItem["State"].asString(); + if(!valueResultResultItem["TargetBranch"].isNull()) + resultObject.targetBranch = valueResultResultItem["TargetBranch"].asString(); + if(!valueResultResultItem["Title"].isNull()) + resultObject.title = valueResultResultItem["Title"].asString(); + if(!valueResultResultItem["UpdatedAt"].isNull()) + resultObject.updatedAt = valueResultResultItem["UpdatedAt"].asString(); + if(!valueResultResultItem["WebUrl"].isNull()) + resultObject.webUrl = valueResultResultItem["WebUrl"].asString(); + auto allAssigneeListNode = valueResultResultItem["AssigneeList"]["AssigneeListItem"]; + for (auto valueResultResultItemAssigneeListAssigneeListItem : allAssigneeListNode) + { + ResultItem::AssigneeListItem assigneeListObject; + if(!valueResultResultItemAssigneeListAssigneeListItem["AvatarUrl"].isNull()) + assigneeListObject.avatarUrl = valueResultResultItemAssigneeListAssigneeListItem["AvatarUrl"].asString(); + if(!valueResultResultItemAssigneeListAssigneeListItem["ExternUserId"].isNull()) + assigneeListObject.externUserId = valueResultResultItemAssigneeListAssigneeListItem["ExternUserId"].asString(); + if(!valueResultResultItemAssigneeListAssigneeListItem["Id"].isNull()) + assigneeListObject.id = valueResultResultItemAssigneeListAssigneeListItem["Id"].asString(); + if(!valueResultResultItemAssigneeListAssigneeListItem["Name"].isNull()) + assigneeListObject.name = valueResultResultItemAssigneeListAssigneeListItem["Name"].asString(); + resultObject.assigneeList.push_back(assigneeListObject); + } + auto approveCheckResultNode = value["ApproveCheckResult"]; + if(!approveCheckResultNode["TotalCheckResult"].isNull()) + resultObject.approveCheckResult.totalCheckResult = approveCheckResultNode["TotalCheckResult"].asString(); + auto allSatisfiedCheckResultsNode = approveCheckResultNode["SatisfiedCheckResults"]["SatisfiedCheckResultsItem"]; + for (auto approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem : allSatisfiedCheckResultsNode) + { + ResultItem::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) + { + ResultItem::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()); + resultObject.approveCheckResult.satisfiedCheckResults.push_back(satisfiedCheckResultsItemObject); + } + auto allUnsatisfiedCheckResultsNode = approveCheckResultNode["UnsatisfiedCheckResults"]["UnsatisfiedCheckResultsItem"]; + for (auto approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem : allUnsatisfiedCheckResultsNode) + { + ResultItem::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) + { + ResultItem::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()); + resultObject.approveCheckResult.unsatisfiedCheckResults.push_back(unsatisfiedCheckResultsItemObject); + } + auto authorNode = value["Author"]; + if(!authorNode["AvatarUrl"].isNull()) + resultObject.author.avatarUrl = authorNode["AvatarUrl"].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 ListMergeRequestsResult::getTotal()const +{ + return total_; +} + +std::string ListMergeRequestsResult::getErrorCode()const +{ + return errorCode_; +} + +std::string ListMergeRequestsResult::getErrorMessage()const +{ + return errorMessage_; +} + +bool ListMergeRequestsResult::getSuccess()const +{ + return success_; +} + +std::vector ListMergeRequestsResult::getResult()const +{ + return result_; +} + diff --git a/codeup/src/model/UpdateRepositoryRequest.cc b/codeup/src/model/UpdateRepositoryRequest.cc new file mode 100644 index 000000000..ac02a79cc --- /dev/null +++ b/codeup/src/model/UpdateRepositoryRequest.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::UpdateRepositoryRequest; + +UpdateRepositoryRequest::UpdateRepositoryRequest() : + RoaServiceRequest("codeup", "2020-04-14") +{ + setResourcePath("/api/v3/projects/[ProjectId]"); + setMethod(HttpRequest::Method::Put); +} + +UpdateRepositoryRequest::~UpdateRepositoryRequest() +{} + +std::string UpdateRepositoryRequest::getOrganizationId()const +{ + return organizationId_; +} + +void UpdateRepositoryRequest::setOrganizationId(const std::string& organizationId) +{ + organizationId_ = organizationId; + setParameter("OrganizationId", organizationId); +} + +std::string UpdateRepositoryRequest::getAccessToken()const +{ + return accessToken_; +} + +void UpdateRepositoryRequest::setAccessToken(const std::string& accessToken) +{ + accessToken_ = accessToken; + setParameter("AccessToken", accessToken); +} + +long UpdateRepositoryRequest::getProjectId()const +{ + return projectId_; +} + +void UpdateRepositoryRequest::setProjectId(long projectId) +{ + projectId_ = projectId; + setParameter("ProjectId", std::to_string(projectId)); +} + diff --git a/codeup/src/model/UpdateRepositoryResult.cc b/codeup/src/model/UpdateRepositoryResult.cc new file mode 100644 index 000000000..994f3da4b --- /dev/null +++ b/codeup/src/model/UpdateRepositoryResult.cc @@ -0,0 +1,124 @@ +/* + * 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; + +UpdateRepositoryResult::UpdateRepositoryResult() : + ServiceResult() +{} + +UpdateRepositoryResult::UpdateRepositoryResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +UpdateRepositoryResult::~UpdateRepositoryResult() +{} + +void UpdateRepositoryResult::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["Archive"].isNull()) + result_.archive = resultNode["Archive"].asString() == "true"; + if(!resultNode["AvatarUrl"].isNull()) + result_.avatarUrl = resultNode["AvatarUrl"].asString(); + if(!resultNode["CreatedAt"].isNull()) + result_.createdAt = resultNode["CreatedAt"].asString(); + if(!resultNode["CreatorId"].isNull()) + result_.creatorId = std::stol(resultNode["CreatorId"].asString()); + if(!resultNode["DefaultBranch"].isNull()) + result_.defaultBranch = resultNode["DefaultBranch"].asString(); + if(!resultNode["Description"].isNull()) + result_.description = resultNode["Description"].asString(); + if(!resultNode["HttpUrlToRepo"].isNull()) + result_.httpUrlToRepo = resultNode["HttpUrlToRepo"].asString(); + if(!resultNode["Id"].isNull()) + result_.id = std::stol(resultNode["Id"].asString()); + if(!resultNode["LastActivityAt"].isNull()) + result_.lastActivityAt = resultNode["LastActivityAt"].asString(); + if(!resultNode["Name"].isNull()) + result_.name = resultNode["Name"].asString(); + if(!resultNode["NameWithNamespace"].isNull()) + result_.nameWithNamespace = resultNode["NameWithNamespace"].asString(); + if(!resultNode["Path"].isNull()) + result_.path = resultNode["Path"].asString(); + if(!resultNode["PathWithNamespace"].isNull()) + result_.pathWithNamespace = resultNode["PathWithNamespace"].asString(); + if(!resultNode["SshUrlToRepo"].isNull()) + result_.sshUrlToRepo = resultNode["SshUrlToRepo"].asString(); + if(!resultNode["VisibilityLevel"].isNull()) + result_.visibilityLevel = resultNode["VisibilityLevel"].asString(); + if(!resultNode["WebUrl"].isNull()) + result_.webUrl = resultNode["WebUrl"].asString(); + auto _namespaceNode = resultNode["Namespace"]; + if(!_namespaceNode["Avatar"].isNull()) + result_._namespace.avatar = _namespaceNode["Avatar"].asString(); + if(!_namespaceNode["CreatedAt"].isNull()) + result_._namespace.createdAt = _namespaceNode["CreatedAt"].asString(); + if(!_namespaceNode["Description"].isNull()) + result_._namespace.description = _namespaceNode["Description"].asString(); + if(!_namespaceNode["Id"].isNull()) + result_._namespace.id = std::stol(_namespaceNode["Id"].asString()); + if(!_namespaceNode["Name"].isNull()) + result_._namespace.name = _namespaceNode["Name"].asString(); + if(!_namespaceNode["OwnerId"].isNull()) + result_._namespace.ownerId = std::stol(_namespaceNode["OwnerId"].asString()); + if(!_namespaceNode["Path"].isNull()) + result_._namespace.path = _namespaceNode["Path"].asString(); + if(!_namespaceNode["Public"].isNull()) + result_._namespace._public = _namespaceNode["Public"].asString() == "true"; + if(!_namespaceNode["UpdatedAt"].isNull()) + result_._namespace.updatedAt = _namespaceNode["UpdatedAt"].asString(); + if(!_namespaceNode["VisibilityLevel"].isNull()) + result_._namespace.visibilityLevel = _namespaceNode["VisibilityLevel"].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 UpdateRepositoryResult::getErrorCode()const +{ + return errorCode_; +} + +std::string UpdateRepositoryResult::getErrorMessage()const +{ + return errorMessage_; +} + +bool UpdateRepositoryResult::getSuccess()const +{ + return success_; +} + +UpdateRepositoryResult::Result UpdateRepositoryResult::getResult()const +{ + return result_; +} +