CreateMergeRequestResult.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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_CREATEMERGEREQUESTRESULT_H_
  17. #define ALIBABACLOUD_CODEUP_MODEL_CREATEMERGEREQUESTRESULT_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 CreateMergeRequestResult : public ServiceResult
  30. {
  31. public:
  32. struct Result
  33. {
  34. struct Author
  35. {
  36. std::string avatarUrl;
  37. std::string externUserId;
  38. long id;
  39. std::string name;
  40. };
  41. struct ApproveCheckResult
  42. {
  43. struct SatisfiedCheckResultsItem
  44. {
  45. struct ExtraUsersItem
  46. {
  47. std::string avatarUrl;
  48. std::string externUserId;
  49. long id;
  50. std::string name;
  51. };
  52. std::string checkName;
  53. std::vector<std::string> satisfiedItems;
  54. std::string checkType;
  55. std::string checkStatus;
  56. std::vector<std::string> unsatisfiedItems;
  57. std::vector<SatisfiedCheckResultsItem::ExtraUsersItem> extraUsers;
  58. };
  59. struct UnsatisfiedCheckResultsItem
  60. {
  61. struct ExtraUsersItem4
  62. {
  63. std::string avatarUrl;
  64. std::string externUserId;
  65. long id;
  66. std::string name;
  67. };
  68. std::vector<std::string> satisfiedItems1;
  69. std::string checkName;
  70. std::string checkType;
  71. std::string checkStatus;
  72. std::vector<UnsatisfiedCheckResultsItem::ExtraUsersItem4> extraUsers3;
  73. std::vector<std::string> unsatisfiedItems2;
  74. };
  75. std::vector<UnsatisfiedCheckResultsItem> unsatisfiedCheckResults;
  76. std::vector<SatisfiedCheckResultsItem> satisfiedCheckResults;
  77. std::string totalCheckResult;
  78. };
  79. struct AssigneeListItem
  80. {
  81. std::string avatarUrl;
  82. std::string externUserId;
  83. std::string id;
  84. std::string name;
  85. };
  86. ApproveCheckResult approveCheckResult;
  87. int behindCommitCount;
  88. std::string description;
  89. int aheadCommitCount;
  90. std::string createdAt;
  91. long projectId;
  92. std::string title;
  93. std::string webUrl;
  94. std::string mergeError;
  95. std::string nameWithNamespace;
  96. std::string updatedAt;
  97. std::string mergedRevision;
  98. std::string acceptedRevision;
  99. std::string state;
  100. std::vector<AssigneeListItem> assigneeList;
  101. std::string mergeStatus;
  102. std::string sourceBranch;
  103. Author author;
  104. long id;
  105. std::string mergeType;
  106. std::string targetBranch;
  107. };
  108. CreateMergeRequestResult();
  109. explicit CreateMergeRequestResult(const std::string &payload);
  110. ~CreateMergeRequestResult();
  111. std::string getErrorCode()const;
  112. std::string getErrorMessage()const;
  113. bool getSuccess()const;
  114. Result getResult()const;
  115. protected:
  116. void parse(const std::string &payload);
  117. private:
  118. std::string errorCode_;
  119. std::string errorMessage_;
  120. bool success_;
  121. Result result_;
  122. };
  123. }
  124. }
  125. }
  126. #endif // !ALIBABACLOUD_CODEUP_MODEL_CREATEMERGEREQUESTRESULT_H_