ListMergeRequestsResult.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. /*
  2. * Copyright 2009-2017 Alibaba Cloud All rights reserved.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef ALIBABACLOUD_CODEUP_MODEL_LISTMERGEREQUESTSRESULT_H_
  17. #define ALIBABACLOUD_CODEUP_MODEL_LISTMERGEREQUESTSRESULT_H_
  18. #include <string>
  19. #include <vector>
  20. #include <utility>
  21. #include <alibabacloud/core/ServiceResult.h>
  22. #include <alibabacloud/codeup/CodeupExport.h>
  23. namespace AlibabaCloud
  24. {
  25. namespace Codeup
  26. {
  27. namespace Model
  28. {
  29. class ALIBABACLOUD_CODEUP_EXPORT ListMergeRequestsResult : public ServiceResult
  30. {
  31. public:
  32. struct ResultItem
  33. {
  34. struct ApproveCheckResult
  35. {
  36. struct SatisfiedCheckResultsItem
  37. {
  38. struct ExtraUsersItem
  39. {
  40. std::string avatarUrl;
  41. std::string externUserId;
  42. long id;
  43. std::string name;
  44. };
  45. std::string checkName;
  46. std::vector<std::string> satisfiedItems;
  47. std::string checkType;
  48. std::string checkStatus;
  49. std::vector<std::string> unsatisfiedItems;
  50. std::vector<SatisfiedCheckResultsItem::ExtraUsersItem> extraUsers;
  51. };
  52. struct UnsatisfiedCheckResultsItem
  53. {
  54. struct ExtraUsersItem4
  55. {
  56. std::string avatarUrl;
  57. std::string externUserId;
  58. long id;
  59. std::string name;
  60. };
  61. std::vector<std::string> satisfiedItems1;
  62. std::string checkName;
  63. std::string checkType;
  64. std::string checkStatus;
  65. std::vector<UnsatisfiedCheckResultsItem::ExtraUsersItem4> extraUsers3;
  66. std::vector<std::string> unsatisfiedItems2;
  67. };
  68. std::vector<UnsatisfiedCheckResultsItem> unsatisfiedCheckResults;
  69. std::vector<SatisfiedCheckResultsItem> satisfiedCheckResults;
  70. std::string totalCheckResult;
  71. };
  72. struct Author
  73. {
  74. std::string avatarUrl;
  75. std::string externUserId;
  76. long id;
  77. std::string name;
  78. };
  79. struct AssigneeListItem
  80. {
  81. std::string status;
  82. std::string avatarUrl;
  83. std::string email;
  84. std::string externUserId;
  85. std::string id;
  86. std::string name;
  87. };
  88. ApproveCheckResult approveCheckResult;
  89. int behindCommitCount;
  90. bool isSupportMerge;
  91. std::string description;
  92. int aheadCommitCount;
  93. std::string createdAt;
  94. long projectId;
  95. std::string mergeError;
  96. std::string nameWithNamespace;
  97. std::string title;
  98. std::string webUrl;
  99. std::string mergedRevision;
  100. std::string updatedAt;
  101. std::string acceptedRevision;
  102. std::string state;
  103. std::vector<ResultItem::AssigneeListItem> assigneeList;
  104. std::string mergeStatus;
  105. std::string sourceBranch;
  106. Author author;
  107. long id;
  108. std::string mergeType;
  109. std::string targetBranch;
  110. };
  111. ListMergeRequestsResult();
  112. explicit ListMergeRequestsResult(const std::string &payload);
  113. ~ListMergeRequestsResult();
  114. long getTotal()const;
  115. std::string getErrorCode()const;
  116. std::string getErrorMessage()const;
  117. bool getSuccess()const;
  118. std::vector<ResultItem> getResult()const;
  119. protected:
  120. void parse(const std::string &payload);
  121. private:
  122. long total_;
  123. std::string errorCode_;
  124. std::string errorMessage_;
  125. bool success_;
  126. std::vector<ResultItem> result_;
  127. };
  128. }
  129. }
  130. }
  131. #endif // !ALIBABACLOUD_CODEUP_MODEL_LISTMERGEREQUESTSRESULT_H_