From 8d4fd0d34b69d067aeb3b6da00d7cd1b4eb75657 Mon Sep 17 00:00:00 2001 From: gitnexbot Date: Mon, 27 May 2024 00:12:25 +0000 Subject: [PATCH] Synchronizing API and documentation updates --- docs/PullRequest.md | 5 + docs/PullRequestMeta.md | 1 + docs/User.md | 1 + .../gitnex/tea4j/v2/models/PullRequest.java | 131 +++++++++++++++++- .../tea4j/v2/models/PullRequestMeta.java | 26 +++- .../java/org/gitnex/tea4j/v2/models/User.java | 25 ++++ 6 files changed, 187 insertions(+), 2 deletions(-) diff --git a/docs/PullRequest.md b/docs/PullRequest.md index 54c4af0..b394591 100644 --- a/docs/PullRequest.md +++ b/docs/PullRequest.md @@ -3,15 +3,19 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**additions** | **Long** | | [optional] **allowMaintainerEdit** | **Boolean** | | [optional] **assignee** | [**User**](User.md) | | [optional] **assignees** | [**List<User>**](User.md) | | [optional] **base** | [**PRBranchInfo**](PRBranchInfo.md) | | [optional] **body** | **String** | | [optional] +**changedFiles** | **Long** | | [optional] **closedAt** | [**Date**](Date.md) | | [optional] **comments** | **Long** | | [optional] **createdAt** | [**Date**](Date.md) | | [optional] +**deletions** | **Long** | | [optional] **diffUrl** | **String** | | [optional] +**draft** | **Boolean** | | [optional] **dueDate** | [**Date**](Date.md) | | [optional] **head** | [**PRBranchInfo**](PRBranchInfo.md) | | [optional] **htmlUrl** | **String** | | [optional] @@ -29,6 +33,7 @@ Name | Type | Description | Notes **patchUrl** | **String** | | [optional] **pinOrder** | **Long** | | [optional] **requestedReviewers** | [**List<User>**](User.md) | | [optional] +**reviewComments** | **Long** | number of review comments made on the diff of a PR review (not including comments on commits or issues in a PR) | [optional] **state** | **String** | | [optional] **title** | **String** | | [optional] **updatedAt** | [**Date**](Date.md) | | [optional] diff --git a/docs/PullRequestMeta.md b/docs/PullRequestMeta.md index e354cb5..6e8a569 100644 --- a/docs/PullRequestMeta.md +++ b/docs/PullRequestMeta.md @@ -4,5 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **draft** | **Boolean** | | [optional] +**htmlUrl** | **String** | | [optional] **merged** | **Boolean** | | [optional] **mergedAt** | [**Date**](Date.md) | | [optional] diff --git a/docs/User.md b/docs/User.md index 6dfb932..00b96f7 100644 --- a/docs/User.md +++ b/docs/User.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **followersCount** | **Long** | user counts | [optional] **followingCount** | **Long** | | [optional] **fullName** | **String** | the user's full name | [optional] +**htmlUrl** | **String** | URL to the user's gitea page | [optional] **id** | **Long** | the user's id | [optional] **isAdmin** | **Boolean** | Is the user an administrator | [optional] **language** | **String** | User locale | [optional] diff --git a/src/main/java/org/gitnex/tea4j/v2/models/PullRequest.java b/src/main/java/org/gitnex/tea4j/v2/models/PullRequest.java index 298b133..c428a69 100644 --- a/src/main/java/org/gitnex/tea4j/v2/models/PullRequest.java +++ b/src/main/java/org/gitnex/tea4j/v2/models/PullRequest.java @@ -25,6 +25,9 @@ import java.util.Objects; public class PullRequest implements Serializable { private static final long serialVersionUID = 1L; + @SerializedName("additions") + private Long additions = null; + @SerializedName("allow_maintainer_edit") private Boolean allowMaintainerEdit = null; @@ -40,6 +43,9 @@ public class PullRequest implements Serializable { @SerializedName("body") private String body = null; + @SerializedName("changed_files") + private Long changedFiles = null; + @SerializedName("closed_at") private Date closedAt = null; @@ -49,9 +55,15 @@ public class PullRequest implements Serializable { @SerializedName("created_at") private Date createdAt = null; + @SerializedName("deletions") + private Long deletions = null; + @SerializedName("diff_url") private String diffUrl = null; + @SerializedName("draft") + private Boolean draft = null; + @SerializedName("due_date") private Date dueDate = null; @@ -103,6 +115,9 @@ public class PullRequest implements Serializable { @SerializedName("requested_reviewers") private List requestedReviewers = null; + @SerializedName("review_comments") + private Long reviewComments = null; + @SerializedName("state") private String state = null; @@ -118,6 +133,25 @@ public class PullRequest implements Serializable { @SerializedName("user") private User user = null; + public PullRequest additions(Long additions) { + this.additions = additions; + return this; + } + + /** + * Get additions + * + * @return additions + */ + @Schema(description = "") + public Long getAdditions() { + return additions; + } + + public void setAdditions(Long additions) { + this.additions = additions; + } + public PullRequest allowMaintainerEdit(Boolean allowMaintainerEdit) { this.allowMaintainerEdit = allowMaintainerEdit; return this; @@ -221,6 +255,25 @@ public class PullRequest implements Serializable { this.body = body; } + public PullRequest changedFiles(Long changedFiles) { + this.changedFiles = changedFiles; + return this; + } + + /** + * Get changedFiles + * + * @return changedFiles + */ + @Schema(description = "") + public Long getChangedFiles() { + return changedFiles; + } + + public void setChangedFiles(Long changedFiles) { + this.changedFiles = changedFiles; + } + public PullRequest closedAt(Date closedAt) { this.closedAt = closedAt; return this; @@ -278,6 +331,25 @@ public class PullRequest implements Serializable { this.createdAt = createdAt; } + public PullRequest deletions(Long deletions) { + this.deletions = deletions; + return this; + } + + /** + * Get deletions + * + * @return deletions + */ + @Schema(description = "") + public Long getDeletions() { + return deletions; + } + + public void setDeletions(Long deletions) { + this.deletions = deletions; + } + public PullRequest diffUrl(String diffUrl) { this.diffUrl = diffUrl; return this; @@ -297,6 +369,25 @@ public class PullRequest implements Serializable { this.diffUrl = diffUrl; } + public PullRequest draft(Boolean draft) { + this.draft = draft; + return this; + } + + /** + * Get draft + * + * @return draft + */ + @Schema(description = "") + public Boolean isDraft() { + return draft; + } + + public void setDraft(Boolean draft) { + this.draft = draft; + } + public PullRequest dueDate(Date dueDate) { this.dueDate = dueDate; return this; @@ -636,6 +727,29 @@ public class PullRequest implements Serializable { this.requestedReviewers = requestedReviewers; } + public PullRequest reviewComments(Long reviewComments) { + this.reviewComments = reviewComments; + return this; + } + + /** + * number of review comments made on the diff of a PR review (not including comments on commits or + * issues in a PR) + * + * @return reviewComments + */ + @Schema( + description = + "number of review comments made on the diff of a PR review (not including comments on" + + " commits or issues in a PR)") + public Long getReviewComments() { + return reviewComments; + } + + public void setReviewComments(Long reviewComments) { + this.reviewComments = reviewComments; + } + public PullRequest state(String state) { this.state = state; return this; @@ -740,15 +854,19 @@ public class PullRequest implements Serializable { return false; } PullRequest pullRequest = (PullRequest) o; - return Objects.equals(this.allowMaintainerEdit, pullRequest.allowMaintainerEdit) + return Objects.equals(this.additions, pullRequest.additions) + && Objects.equals(this.allowMaintainerEdit, pullRequest.allowMaintainerEdit) && Objects.equals(this.assignee, pullRequest.assignee) && Objects.equals(this.assignees, pullRequest.assignees) && Objects.equals(this.base, pullRequest.base) && Objects.equals(this.body, pullRequest.body) + && Objects.equals(this.changedFiles, pullRequest.changedFiles) && Objects.equals(this.closedAt, pullRequest.closedAt) && Objects.equals(this.comments, pullRequest.comments) && Objects.equals(this.createdAt, pullRequest.createdAt) + && Objects.equals(this.deletions, pullRequest.deletions) && Objects.equals(this.diffUrl, pullRequest.diffUrl) + && Objects.equals(this.draft, pullRequest.draft) && Objects.equals(this.dueDate, pullRequest.dueDate) && Objects.equals(this.head, pullRequest.head) && Objects.equals(this.htmlUrl, pullRequest.htmlUrl) @@ -766,6 +884,7 @@ public class PullRequest implements Serializable { && Objects.equals(this.patchUrl, pullRequest.patchUrl) && Objects.equals(this.pinOrder, pullRequest.pinOrder) && Objects.equals(this.requestedReviewers, pullRequest.requestedReviewers) + && Objects.equals(this.reviewComments, pullRequest.reviewComments) && Objects.equals(this.state, pullRequest.state) && Objects.equals(this.title, pullRequest.title) && Objects.equals(this.updatedAt, pullRequest.updatedAt) @@ -776,15 +895,19 @@ public class PullRequest implements Serializable { @Override public int hashCode() { return Objects.hash( + additions, allowMaintainerEdit, assignee, assignees, base, body, + changedFiles, closedAt, comments, createdAt, + deletions, diffUrl, + draft, dueDate, head, htmlUrl, @@ -802,6 +925,7 @@ public class PullRequest implements Serializable { patchUrl, pinOrder, requestedReviewers, + reviewComments, state, title, updatedAt, @@ -814,6 +938,7 @@ public class PullRequest implements Serializable { StringBuilder sb = new StringBuilder(); sb.append("class PullRequest {\n"); + sb.append(" additions: ").append(toIndentedString(additions)).append("\n"); sb.append(" allowMaintainerEdit: ") .append(toIndentedString(allowMaintainerEdit)) .append("\n"); @@ -821,10 +946,13 @@ public class PullRequest implements Serializable { sb.append(" assignees: ").append(toIndentedString(assignees)).append("\n"); sb.append(" base: ").append(toIndentedString(base)).append("\n"); sb.append(" body: ").append(toIndentedString(body)).append("\n"); + sb.append(" changedFiles: ").append(toIndentedString(changedFiles)).append("\n"); sb.append(" closedAt: ").append(toIndentedString(closedAt)).append("\n"); sb.append(" comments: ").append(toIndentedString(comments)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" deletions: ").append(toIndentedString(deletions)).append("\n"); sb.append(" diffUrl: ").append(toIndentedString(diffUrl)).append("\n"); + sb.append(" draft: ").append(toIndentedString(draft)).append("\n"); sb.append(" dueDate: ").append(toIndentedString(dueDate)).append("\n"); sb.append(" head: ").append(toIndentedString(head)).append("\n"); sb.append(" htmlUrl: ").append(toIndentedString(htmlUrl)).append("\n"); @@ -842,6 +970,7 @@ public class PullRequest implements Serializable { sb.append(" patchUrl: ").append(toIndentedString(patchUrl)).append("\n"); sb.append(" pinOrder: ").append(toIndentedString(pinOrder)).append("\n"); sb.append(" requestedReviewers: ").append(toIndentedString(requestedReviewers)).append("\n"); + sb.append(" reviewComments: ").append(toIndentedString(reviewComments)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); diff --git a/src/main/java/org/gitnex/tea4j/v2/models/PullRequestMeta.java b/src/main/java/org/gitnex/tea4j/v2/models/PullRequestMeta.java index 9c9a9d3..8e2ffcf 100644 --- a/src/main/java/org/gitnex/tea4j/v2/models/PullRequestMeta.java +++ b/src/main/java/org/gitnex/tea4j/v2/models/PullRequestMeta.java @@ -26,6 +26,9 @@ public class PullRequestMeta implements Serializable { @SerializedName("draft") private Boolean draft = null; + @SerializedName("html_url") + private String htmlUrl = null; + @SerializedName("merged") private Boolean merged = null; @@ -51,6 +54,25 @@ public class PullRequestMeta implements Serializable { this.draft = draft; } + public PullRequestMeta htmlUrl(String htmlUrl) { + this.htmlUrl = htmlUrl; + return this; + } + + /** + * Get htmlUrl + * + * @return htmlUrl + */ + @Schema(description = "") + public String getHtmlUrl() { + return htmlUrl; + } + + public void setHtmlUrl(String htmlUrl) { + this.htmlUrl = htmlUrl; + } + public PullRequestMeta merged(Boolean merged) { this.merged = merged; return this; @@ -99,13 +121,14 @@ public class PullRequestMeta implements Serializable { } PullRequestMeta pullRequestMeta = (PullRequestMeta) o; return Objects.equals(this.draft, pullRequestMeta.draft) + && Objects.equals(this.htmlUrl, pullRequestMeta.htmlUrl) && Objects.equals(this.merged, pullRequestMeta.merged) && Objects.equals(this.mergedAt, pullRequestMeta.mergedAt); } @Override public int hashCode() { - return Objects.hash(draft, merged, mergedAt); + return Objects.hash(draft, htmlUrl, merged, mergedAt); } @Override @@ -114,6 +137,7 @@ public class PullRequestMeta implements Serializable { sb.append("class PullRequestMeta {\n"); sb.append(" draft: ").append(toIndentedString(draft)).append("\n"); + sb.append(" htmlUrl: ").append(toIndentedString(htmlUrl)).append("\n"); sb.append(" merged: ").append(toIndentedString(merged)).append("\n"); sb.append(" mergedAt: ").append(toIndentedString(mergedAt)).append("\n"); sb.append("}"); diff --git a/src/main/java/org/gitnex/tea4j/v2/models/User.java b/src/main/java/org/gitnex/tea4j/v2/models/User.java index 2ff0513..13e2e7f 100644 --- a/src/main/java/org/gitnex/tea4j/v2/models/User.java +++ b/src/main/java/org/gitnex/tea4j/v2/models/User.java @@ -47,6 +47,9 @@ public class User implements Serializable { @SerializedName("full_name") private String fullName = null; + @SerializedName("html_url") + private String htmlUrl = null; + @SerializedName("id") private Long id = null; @@ -238,6 +241,25 @@ public class User implements Serializable { this.fullName = fullName; } + public User htmlUrl(String htmlUrl) { + this.htmlUrl = htmlUrl; + return this; + } + + /** + * URL to the user's gitea page + * + * @return htmlUrl + */ + @Schema(description = "URL to the user's gitea page") + public String getHtmlUrl() { + return htmlUrl; + } + + public void setHtmlUrl(String htmlUrl) { + this.htmlUrl = htmlUrl; + } + public User id(Long id) { this.id = id; return this; @@ -502,6 +524,7 @@ public class User implements Serializable { && Objects.equals(this.followersCount, user.followersCount) && Objects.equals(this.followingCount, user.followingCount) && Objects.equals(this.fullName, user.fullName) + && Objects.equals(this.htmlUrl, user.htmlUrl) && Objects.equals(this.id, user.id) && Objects.equals(this.isAdmin, user.isAdmin) && Objects.equals(this.language, user.language) @@ -528,6 +551,7 @@ public class User implements Serializable { followersCount, followingCount, fullName, + htmlUrl, id, isAdmin, language, @@ -556,6 +580,7 @@ public class User implements Serializable { sb.append(" followersCount: ").append(toIndentedString(followersCount)).append("\n"); sb.append(" followingCount: ").append(toIndentedString(followingCount)).append("\n"); sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); + sb.append(" htmlUrl: ").append(toIndentedString(htmlUrl)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" isAdmin: ").append(toIndentedString(isAdmin)).append("\n"); sb.append(" language: ").append(toIndentedString(language)).append("\n");