From a0f4b15ead824a486ae9bd23413d8aba18913df0 Mon Sep 17 00:00:00 2001 From: gitnexbot Date: Wed, 8 Oct 2025 00:09:28 +0000 Subject: [PATCH] Synchronizing API and documentation updates --- docs/ChangeFilesOptions.md | 7 +-- docs/CreateFileOptions.md | 7 +-- docs/DeleteFileOptions.md | 7 +-- docs/UpdateFileOptions.md | 7 +-- .../tea4j/v2/models/ChangeFilesOptions.java | 47 +++++++++++++++---- .../tea4j/v2/models/CreateFileOptions.java | 47 +++++++++++++++---- .../tea4j/v2/models/DeleteFileOptions.java | 47 +++++++++++++++---- .../tea4j/v2/models/UpdateFileOptions.java | 47 +++++++++++++++---- 8 files changed, 172 insertions(+), 44 deletions(-) diff --git a/docs/ChangeFilesOptions.md b/docs/ChangeFilesOptions.md index c2b49d8..f7ba0a0 100644 --- a/docs/ChangeFilesOptions.md +++ b/docs/ChangeFilesOptions.md @@ -4,10 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **author** | [**Identity**](Identity.md) | | [optional] -**branch** | **String** | branch (optional) to base this file from. if not given, the default branch is used | [optional] +**branch** | **String** | branch (optional) is the base branch for the changes. If not supplied, the default branch is used | [optional] **committer** | [**Identity**](Identity.md) | | [optional] **dates** | [**CommitDateOptions**](CommitDateOptions.md) | | [optional] **files** | [**List<ChangeFileOperation>**](ChangeFileOperation.md) | list of file operations | -**message** | **String** | message (optional) for the commit of this file. if not supplied, a default message will be used | [optional] -**newBranch** | **String** | new_branch (optional) will make a new branch from `branch` before creating the file | [optional] +**forcePush** | **Boolean** | force_push (optional) will do a force-push if the new branch already exists | [optional] +**message** | **String** | message (optional) is the commit message of the changes. If not supplied, a default message will be used | [optional] +**newBranch** | **String** | new_branch (optional) will make a new branch from base branch for the changes. If not supplied, the changes will be committed to the base branch | [optional] **signoff** | **Boolean** | Add a Signed-off-by trailer by the committer at the end of the commit log message. | [optional] diff --git a/docs/CreateFileOptions.md b/docs/CreateFileOptions.md index 192c18b..0c2e62c 100644 --- a/docs/CreateFileOptions.md +++ b/docs/CreateFileOptions.md @@ -4,10 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **author** | [**Identity**](Identity.md) | | [optional] -**branch** | **String** | branch (optional) to base this file from. if not given, the default branch is used | [optional] +**branch** | **String** | branch (optional) is the base branch for the changes. If not supplied, the default branch is used | [optional] **committer** | [**Identity**](Identity.md) | | [optional] **content** | **String** | content must be base64 encoded | **dates** | [**CommitDateOptions**](CommitDateOptions.md) | | [optional] -**message** | **String** | message (optional) for the commit of this file. if not supplied, a default message will be used | [optional] -**newBranch** | **String** | new_branch (optional) will make a new branch from `branch` before creating the file | [optional] +**forcePush** | **Boolean** | force_push (optional) will do a force-push if the new branch already exists | [optional] +**message** | **String** | message (optional) is the commit message of the changes. If not supplied, a default message will be used | [optional] +**newBranch** | **String** | new_branch (optional) will make a new branch from base branch for the changes. If not supplied, the changes will be committed to the base branch | [optional] **signoff** | **Boolean** | Add a Signed-off-by trailer by the committer at the end of the commit log message. | [optional] diff --git a/docs/DeleteFileOptions.md b/docs/DeleteFileOptions.md index 11108ac..d0614d7 100644 --- a/docs/DeleteFileOptions.md +++ b/docs/DeleteFileOptions.md @@ -4,10 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **author** | [**Identity**](Identity.md) | | [optional] -**branch** | **String** | branch (optional) to base this file from. if not given, the default branch is used | [optional] +**branch** | **String** | branch (optional) is the base branch for the changes. If not supplied, the default branch is used | [optional] **committer** | [**Identity**](Identity.md) | | [optional] **dates** | [**CommitDateOptions**](CommitDateOptions.md) | | [optional] -**message** | **String** | message (optional) for the commit of this file. if not supplied, a default message will be used | [optional] -**newBranch** | **String** | new_branch (optional) will make a new branch from `branch` before creating the file | [optional] +**forcePush** | **Boolean** | force_push (optional) will do a force-push if the new branch already exists | [optional] +**message** | **String** | message (optional) is the commit message of the changes. If not supplied, a default message will be used | [optional] +**newBranch** | **String** | new_branch (optional) will make a new branch from base branch for the changes. If not supplied, the changes will be committed to the base branch | [optional] **sha** | **String** | the blob ID (SHA) for the file that already exists, it is required for changing existing files | **signoff** | **Boolean** | Add a Signed-off-by trailer by the committer at the end of the commit log message. | [optional] diff --git a/docs/UpdateFileOptions.md b/docs/UpdateFileOptions.md index 226c864..a672447 100644 --- a/docs/UpdateFileOptions.md +++ b/docs/UpdateFileOptions.md @@ -4,12 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **author** | [**Identity**](Identity.md) | | [optional] -**branch** | **String** | branch (optional) to base this file from. if not given, the default branch is used | [optional] +**branch** | **String** | branch (optional) is the base branch for the changes. If not supplied, the default branch is used | [optional] **committer** | [**Identity**](Identity.md) | | [optional] **content** | **String** | content must be base64 encoded | **dates** | [**CommitDateOptions**](CommitDateOptions.md) | | [optional] +**forcePush** | **Boolean** | force_push (optional) will do a force-push if the new branch already exists | [optional] **fromPath** | **String** | from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL | [optional] -**message** | **String** | message (optional) for the commit of this file. if not supplied, a default message will be used | [optional] -**newBranch** | **String** | new_branch (optional) will make a new branch from `branch` before creating the file | [optional] +**message** | **String** | message (optional) is the commit message of the changes. If not supplied, a default message will be used | [optional] +**newBranch** | **String** | new_branch (optional) will make a new branch from base branch for the changes. If not supplied, the changes will be committed to the base branch | [optional] **sha** | **String** | the blob ID (SHA) for the file that already exists, it is required for changing existing files | **signoff** | **Boolean** | Add a Signed-off-by trailer by the committer at the end of the commit log message. | [optional] diff --git a/src/main/java/org/gitnex/tea4j/v2/models/ChangeFilesOptions.java b/src/main/java/org/gitnex/tea4j/v2/models/ChangeFilesOptions.java index b613267..9ee680d 100644 --- a/src/main/java/org/gitnex/tea4j/v2/models/ChangeFilesOptions.java +++ b/src/main/java/org/gitnex/tea4j/v2/models/ChangeFilesOptions.java @@ -47,6 +47,9 @@ public class ChangeFilesOptions implements Serializable { @SerializedName("files") private List files = new ArrayList<>(); + @SerializedName("force_push") + private Boolean forcePush = null; + @SerializedName("message") private String message = null; @@ -81,13 +84,15 @@ public class ChangeFilesOptions implements Serializable { } /** - * branch (optional) to base this file from. if not given, the default branch is used + * branch (optional) is the base branch for the changes. If not supplied, the default branch is + * used * * @return branch */ @Schema( description = - "branch (optional) to base this file from. if not given, the default branch is used") + "branch (optional) is the base branch for the changes. If not supplied, the default" + + " branch is used") public String getBranch() { return branch; } @@ -158,20 +163,41 @@ public class ChangeFilesOptions implements Serializable { this.files = files; } + public ChangeFilesOptions forcePush(Boolean forcePush) { + this.forcePush = forcePush; + return this; + } + + /** + * force_push (optional) will do a force-push if the new branch already exists + * + * @return forcePush + */ + @Schema( + description = "force_push (optional) will do a force-push if the new branch already exists") + public Boolean isForcePush() { + return forcePush; + } + + public void setForcePush(Boolean forcePush) { + this.forcePush = forcePush; + } + public ChangeFilesOptions message(String message) { this.message = message; return this; } /** - * message (optional) for the commit of this file. if not supplied, a default message will be used + * message (optional) is the commit message of the changes. If not supplied, a default message + * will be used * * @return message */ @Schema( description = - "message (optional) for the commit of this file. if not supplied, a default message will" - + " be used") + "message (optional) is the commit message of the changes. If not supplied, a default" + + " message will be used") public String getMessage() { return message; } @@ -186,13 +212,15 @@ public class ChangeFilesOptions implements Serializable { } /** - * new_branch (optional) will make a new branch from `branch` before creating the file + * new_branch (optional) will make a new branch from base branch for the changes. If not supplied, + * the changes will be committed to the base branch * * @return newBranch */ @Schema( description = - "new_branch (optional) will make a new branch from `branch` before creating the file") + "new_branch (optional) will make a new branch from base branch for the changes. If not" + + " supplied, the changes will be committed to the base branch") public String getNewBranch() { return newBranch; } @@ -236,6 +264,7 @@ public class ChangeFilesOptions implements Serializable { && Objects.equals(this.committer, changeFilesOptions.committer) && Objects.equals(this.dates, changeFilesOptions.dates) && Objects.equals(this.files, changeFilesOptions.files) + && Objects.equals(this.forcePush, changeFilesOptions.forcePush) && Objects.equals(this.message, changeFilesOptions.message) && Objects.equals(this.newBranch, changeFilesOptions.newBranch) && Objects.equals(this.signoff, changeFilesOptions.signoff); @@ -243,7 +272,8 @@ public class ChangeFilesOptions implements Serializable { @Override public int hashCode() { - return Objects.hash(author, branch, committer, dates, files, message, newBranch, signoff); + return Objects.hash( + author, branch, committer, dates, files, forcePush, message, newBranch, signoff); } @Override @@ -256,6 +286,7 @@ public class ChangeFilesOptions implements Serializable { sb.append(" committer: ").append(toIndentedString(committer)).append("\n"); sb.append(" dates: ").append(toIndentedString(dates)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); + sb.append(" forcePush: ").append(toIndentedString(forcePush)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); sb.append(" newBranch: ").append(toIndentedString(newBranch)).append("\n"); sb.append(" signoff: ").append(toIndentedString(signoff)).append("\n"); diff --git a/src/main/java/org/gitnex/tea4j/v2/models/CreateFileOptions.java b/src/main/java/org/gitnex/tea4j/v2/models/CreateFileOptions.java index 45789ab..505dc97 100644 --- a/src/main/java/org/gitnex/tea4j/v2/models/CreateFileOptions.java +++ b/src/main/java/org/gitnex/tea4j/v2/models/CreateFileOptions.java @@ -45,6 +45,9 @@ public class CreateFileOptions implements Serializable { @SerializedName("dates") private CommitDateOptions dates = null; + @SerializedName("force_push") + private Boolean forcePush = null; + @SerializedName("message") private String message = null; @@ -79,13 +82,15 @@ public class CreateFileOptions implements Serializable { } /** - * branch (optional) to base this file from. if not given, the default branch is used + * branch (optional) is the base branch for the changes. If not supplied, the default branch is + * used * * @return branch */ @Schema( description = - "branch (optional) to base this file from. if not given, the default branch is used") + "branch (optional) is the base branch for the changes. If not supplied, the default" + + " branch is used") public String getBranch() { return branch; } @@ -151,20 +156,41 @@ public class CreateFileOptions implements Serializable { this.dates = dates; } + public CreateFileOptions forcePush(Boolean forcePush) { + this.forcePush = forcePush; + return this; + } + + /** + * force_push (optional) will do a force-push if the new branch already exists + * + * @return forcePush + */ + @Schema( + description = "force_push (optional) will do a force-push if the new branch already exists") + public Boolean isForcePush() { + return forcePush; + } + + public void setForcePush(Boolean forcePush) { + this.forcePush = forcePush; + } + public CreateFileOptions message(String message) { this.message = message; return this; } /** - * message (optional) for the commit of this file. if not supplied, a default message will be used + * message (optional) is the commit message of the changes. If not supplied, a default message + * will be used * * @return message */ @Schema( description = - "message (optional) for the commit of this file. if not supplied, a default message will" - + " be used") + "message (optional) is the commit message of the changes. If not supplied, a default" + + " message will be used") public String getMessage() { return message; } @@ -179,13 +205,15 @@ public class CreateFileOptions implements Serializable { } /** - * new_branch (optional) will make a new branch from `branch` before creating the file + * new_branch (optional) will make a new branch from base branch for the changes. If not supplied, + * the changes will be committed to the base branch * * @return newBranch */ @Schema( description = - "new_branch (optional) will make a new branch from `branch` before creating the file") + "new_branch (optional) will make a new branch from base branch for the changes. If not" + + " supplied, the changes will be committed to the base branch") public String getNewBranch() { return newBranch; } @@ -229,6 +257,7 @@ public class CreateFileOptions implements Serializable { && Objects.equals(this.committer, createFileOptions.committer) && Objects.equals(this.content, createFileOptions.content) && Objects.equals(this.dates, createFileOptions.dates) + && Objects.equals(this.forcePush, createFileOptions.forcePush) && Objects.equals(this.message, createFileOptions.message) && Objects.equals(this.newBranch, createFileOptions.newBranch) && Objects.equals(this.signoff, createFileOptions.signoff); @@ -236,7 +265,8 @@ public class CreateFileOptions implements Serializable { @Override public int hashCode() { - return Objects.hash(author, branch, committer, content, dates, message, newBranch, signoff); + return Objects.hash( + author, branch, committer, content, dates, forcePush, message, newBranch, signoff); } @Override @@ -249,6 +279,7 @@ public class CreateFileOptions implements Serializable { sb.append(" committer: ").append(toIndentedString(committer)).append("\n"); sb.append(" content: ").append(toIndentedString(content)).append("\n"); sb.append(" dates: ").append(toIndentedString(dates)).append("\n"); + sb.append(" forcePush: ").append(toIndentedString(forcePush)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); sb.append(" newBranch: ").append(toIndentedString(newBranch)).append("\n"); sb.append(" signoff: ").append(toIndentedString(signoff)).append("\n"); diff --git a/src/main/java/org/gitnex/tea4j/v2/models/DeleteFileOptions.java b/src/main/java/org/gitnex/tea4j/v2/models/DeleteFileOptions.java index fd052e8..a85d911 100644 --- a/src/main/java/org/gitnex/tea4j/v2/models/DeleteFileOptions.java +++ b/src/main/java/org/gitnex/tea4j/v2/models/DeleteFileOptions.java @@ -42,6 +42,9 @@ public class DeleteFileOptions implements Serializable { @SerializedName("dates") private CommitDateOptions dates = null; + @SerializedName("force_push") + private Boolean forcePush = null; + @SerializedName("message") private String message = null; @@ -79,13 +82,15 @@ public class DeleteFileOptions implements Serializable { } /** - * branch (optional) to base this file from. if not given, the default branch is used + * branch (optional) is the base branch for the changes. If not supplied, the default branch is + * used * * @return branch */ @Schema( description = - "branch (optional) to base this file from. if not given, the default branch is used") + "branch (optional) is the base branch for the changes. If not supplied, the default" + + " branch is used") public String getBranch() { return branch; } @@ -132,20 +137,41 @@ public class DeleteFileOptions implements Serializable { this.dates = dates; } + public DeleteFileOptions forcePush(Boolean forcePush) { + this.forcePush = forcePush; + return this; + } + + /** + * force_push (optional) will do a force-push if the new branch already exists + * + * @return forcePush + */ + @Schema( + description = "force_push (optional) will do a force-push if the new branch already exists") + public Boolean isForcePush() { + return forcePush; + } + + public void setForcePush(Boolean forcePush) { + this.forcePush = forcePush; + } + public DeleteFileOptions message(String message) { this.message = message; return this; } /** - * message (optional) for the commit of this file. if not supplied, a default message will be used + * message (optional) is the commit message of the changes. If not supplied, a default message + * will be used * * @return message */ @Schema( description = - "message (optional) for the commit of this file. if not supplied, a default message will" - + " be used") + "message (optional) is the commit message of the changes. If not supplied, a default" + + " message will be used") public String getMessage() { return message; } @@ -160,13 +186,15 @@ public class DeleteFileOptions implements Serializable { } /** - * new_branch (optional) will make a new branch from `branch` before creating the file + * new_branch (optional) will make a new branch from base branch for the changes. If not supplied, + * the changes will be committed to the base branch * * @return newBranch */ @Schema( description = - "new_branch (optional) will make a new branch from `branch` before creating the file") + "new_branch (optional) will make a new branch from base branch for the changes. If not" + + " supplied, the changes will be committed to the base branch") public String getNewBranch() { return newBranch; } @@ -232,6 +260,7 @@ public class DeleteFileOptions implements Serializable { && Objects.equals(this.branch, deleteFileOptions.branch) && Objects.equals(this.committer, deleteFileOptions.committer) && Objects.equals(this.dates, deleteFileOptions.dates) + && Objects.equals(this.forcePush, deleteFileOptions.forcePush) && Objects.equals(this.message, deleteFileOptions.message) && Objects.equals(this.newBranch, deleteFileOptions.newBranch) && Objects.equals(this.sha, deleteFileOptions.sha) @@ -240,7 +269,8 @@ public class DeleteFileOptions implements Serializable { @Override public int hashCode() { - return Objects.hash(author, branch, committer, dates, message, newBranch, sha, signoff); + return Objects.hash( + author, branch, committer, dates, forcePush, message, newBranch, sha, signoff); } @Override @@ -252,6 +282,7 @@ public class DeleteFileOptions implements Serializable { sb.append(" branch: ").append(toIndentedString(branch)).append("\n"); sb.append(" committer: ").append(toIndentedString(committer)).append("\n"); sb.append(" dates: ").append(toIndentedString(dates)).append("\n"); + sb.append(" forcePush: ").append(toIndentedString(forcePush)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); sb.append(" newBranch: ").append(toIndentedString(newBranch)).append("\n"); sb.append(" sha: ").append(toIndentedString(sha)).append("\n"); diff --git a/src/main/java/org/gitnex/tea4j/v2/models/UpdateFileOptions.java b/src/main/java/org/gitnex/tea4j/v2/models/UpdateFileOptions.java index d6e10d6..15ce706 100644 --- a/src/main/java/org/gitnex/tea4j/v2/models/UpdateFileOptions.java +++ b/src/main/java/org/gitnex/tea4j/v2/models/UpdateFileOptions.java @@ -45,6 +45,9 @@ public class UpdateFileOptions implements Serializable { @SerializedName("dates") private CommitDateOptions dates = null; + @SerializedName("force_push") + private Boolean forcePush = null; + @SerializedName("from_path") private String fromPath = null; @@ -85,13 +88,15 @@ public class UpdateFileOptions implements Serializable { } /** - * branch (optional) to base this file from. if not given, the default branch is used + * branch (optional) is the base branch for the changes. If not supplied, the default branch is + * used * * @return branch */ @Schema( description = - "branch (optional) to base this file from. if not given, the default branch is used") + "branch (optional) is the base branch for the changes. If not supplied, the default" + + " branch is used") public String getBranch() { return branch; } @@ -157,6 +162,26 @@ public class UpdateFileOptions implements Serializable { this.dates = dates; } + public UpdateFileOptions forcePush(Boolean forcePush) { + this.forcePush = forcePush; + return this; + } + + /** + * force_push (optional) will do a force-push if the new branch already exists + * + * @return forcePush + */ + @Schema( + description = "force_push (optional) will do a force-push if the new branch already exists") + public Boolean isForcePush() { + return forcePush; + } + + public void setForcePush(Boolean forcePush) { + this.forcePush = forcePush; + } + public UpdateFileOptions fromPath(String fromPath) { this.fromPath = fromPath; return this; @@ -186,14 +211,15 @@ public class UpdateFileOptions implements Serializable { } /** - * message (optional) for the commit of this file. if not supplied, a default message will be used + * message (optional) is the commit message of the changes. If not supplied, a default message + * will be used * * @return message */ @Schema( description = - "message (optional) for the commit of this file. if not supplied, a default message will" - + " be used") + "message (optional) is the commit message of the changes. If not supplied, a default" + + " message will be used") public String getMessage() { return message; } @@ -208,13 +234,15 @@ public class UpdateFileOptions implements Serializable { } /** - * new_branch (optional) will make a new branch from `branch` before creating the file + * new_branch (optional) will make a new branch from base branch for the changes. If not supplied, + * the changes will be committed to the base branch * * @return newBranch */ @Schema( description = - "new_branch (optional) will make a new branch from `branch` before creating the file") + "new_branch (optional) will make a new branch from base branch for the changes. If not" + + " supplied, the changes will be committed to the base branch") public String getNewBranch() { return newBranch; } @@ -281,6 +309,7 @@ public class UpdateFileOptions implements Serializable { && Objects.equals(this.committer, updateFileOptions.committer) && Objects.equals(this.content, updateFileOptions.content) && Objects.equals(this.dates, updateFileOptions.dates) + && Objects.equals(this.forcePush, updateFileOptions.forcePush) && Objects.equals(this.fromPath, updateFileOptions.fromPath) && Objects.equals(this.message, updateFileOptions.message) && Objects.equals(this.newBranch, updateFileOptions.newBranch) @@ -291,7 +320,8 @@ public class UpdateFileOptions implements Serializable { @Override public int hashCode() { return Objects.hash( - author, branch, committer, content, dates, fromPath, message, newBranch, sha, signoff); + author, branch, committer, content, dates, forcePush, fromPath, message, newBranch, sha, + signoff); } @Override @@ -304,6 +334,7 @@ public class UpdateFileOptions implements Serializable { sb.append(" committer: ").append(toIndentedString(committer)).append("\n"); sb.append(" content: ").append(toIndentedString(content)).append("\n"); sb.append(" dates: ").append(toIndentedString(dates)).append("\n"); + sb.append(" forcePush: ").append(toIndentedString(forcePush)).append("\n"); sb.append(" fromPath: ").append(toIndentedString(fromPath)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); sb.append(" newBranch: ").append(toIndentedString(newBranch)).append("\n");