mirror of
https://codeberg.org/gitnex/tea4j-autodeploy
synced 2026-06-08 10:42:18 +00:00
Synchronizing API and documentation updates
This commit is contained in:
@@ -87,6 +87,7 @@ import org.gitnex.tea4j.v2.models.TopicResponse;
|
||||
import org.gitnex.tea4j.v2.models.TrackedTime;
|
||||
import org.gitnex.tea4j.v2.models.TransferRepoOption;
|
||||
import org.gitnex.tea4j.v2.models.UpdateBranchProtectionPriories;
|
||||
import org.gitnex.tea4j.v2.models.UpdateBranchRepoOption;
|
||||
import org.gitnex.tea4j.v2.models.UpdateFileOptions;
|
||||
import org.gitnex.tea4j.v2.models.UpdateRepoAvatarOption;
|
||||
import org.gitnex.tea4j.v2.models.UpdateVariableOption;
|
||||
@@ -2476,6 +2477,23 @@ public interface RepositoryApi {
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Body UpdateRepoAvatarOption body);
|
||||
|
||||
/**
|
||||
* Update a branch
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param branch name of the branch (required)
|
||||
* @param body (optional)
|
||||
* @return Call<Void>
|
||||
*/
|
||||
@Headers({"Content-Type:application/json"})
|
||||
@PATCH("repos/{owner}/{repo}/branches/{branch}")
|
||||
Call<Void> repoUpdateBranch(
|
||||
@retrofit2.http.Path("owner") String owner,
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Path("branch") String branch,
|
||||
@retrofit2.http.Body UpdateBranchRepoOption body);
|
||||
|
||||
/**
|
||||
* Update the priorities of branch protections for a repository.
|
||||
*
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* Gitea API
|
||||
* This documentation describes the Gitea API.
|
||||
*
|
||||
* OpenAPI spec version: {{AppVer | JSEscape}}
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
package org.gitnex.tea4j.v2.models;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
/** UpdateBranchRepoOption options when updating a branch in a repository */
|
||||
@Schema(description = "UpdateBranchRepoOption options when updating a branch in a repository")
|
||||
public class UpdateBranchRepoOption implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@SerializedName("name")
|
||||
private String name = null;
|
||||
|
||||
public UpdateBranchRepoOption name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* New branch name
|
||||
*
|
||||
* @return name
|
||||
*/
|
||||
@Schema(required = true, description = "New branch name")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
UpdateBranchRepoOption updateBranchRepoOption = (UpdateBranchRepoOption) o;
|
||||
return Objects.equals(this.name, updateBranchRepoOption.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class UpdateBranchRepoOption {\n");
|
||||
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user