mirror of
https://codeberg.org/gitnex/tea4j-autodeploy
synced 2026-06-15 06:00:44 +00:00
Synchronizing API and documentation updates
This commit is contained in:
@@ -86,6 +86,7 @@ import org.gitnex.tea4j.v2.models.TopicName;
|
||||
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.UpdateFileOptions;
|
||||
import org.gitnex.tea4j.v2.models.UpdateRepoAvatarOption;
|
||||
import org.gitnex.tea4j.v2.models.UpdateVariableOption;
|
||||
@@ -2475,6 +2476,21 @@ public interface RepositoryApi {
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Body UpdateRepoAvatarOption body);
|
||||
|
||||
/**
|
||||
* Update the priorities of branch protections for a repository.
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param body (optional)
|
||||
* @return Call<Void>
|
||||
*/
|
||||
@Headers({"Content-Type:application/json"})
|
||||
@POST("repos/{owner}/{repo}/branch_protections/priority")
|
||||
Call<Void> repoUpdateBranchProtectionPriories(
|
||||
@retrofit2.http.Path("owner") String owner,
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Body UpdateBranchProtectionPriories body);
|
||||
|
||||
/**
|
||||
* Update a file in a repository
|
||||
*
|
||||
|
||||
@@ -91,6 +91,9 @@ public class BranchProtection implements Serializable {
|
||||
@SerializedName("merge_whitelist_usernames")
|
||||
private List<String> mergeWhitelistUsernames = null;
|
||||
|
||||
@SerializedName("priority")
|
||||
private Long priority = null;
|
||||
|
||||
@SerializedName("protected_file_patterns")
|
||||
private String protectedFilePatterns = null;
|
||||
|
||||
@@ -588,6 +591,25 @@ public class BranchProtection implements Serializable {
|
||||
this.mergeWhitelistUsernames = mergeWhitelistUsernames;
|
||||
}
|
||||
|
||||
public BranchProtection priority(Long priority) {
|
||||
this.priority = priority;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get priority
|
||||
*
|
||||
* @return priority
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public Long getPriority() {
|
||||
return priority;
|
||||
}
|
||||
|
||||
public void setPriority(Long priority) {
|
||||
this.priority = priority;
|
||||
}
|
||||
|
||||
public BranchProtection protectedFilePatterns(String protectedFilePatterns) {
|
||||
this.protectedFilePatterns = protectedFilePatterns;
|
||||
return this;
|
||||
@@ -837,6 +859,7 @@ public class BranchProtection implements Serializable {
|
||||
&& Objects.equals(this.ignoreStaleApprovals, branchProtection.ignoreStaleApprovals)
|
||||
&& Objects.equals(this.mergeWhitelistTeams, branchProtection.mergeWhitelistTeams)
|
||||
&& Objects.equals(this.mergeWhitelistUsernames, branchProtection.mergeWhitelistUsernames)
|
||||
&& Objects.equals(this.priority, branchProtection.priority)
|
||||
&& Objects.equals(this.protectedFilePatterns, branchProtection.protectedFilePatterns)
|
||||
&& Objects.equals(this.pushWhitelistDeployKeys, branchProtection.pushWhitelistDeployKeys)
|
||||
&& Objects.equals(this.pushWhitelistTeams, branchProtection.pushWhitelistTeams)
|
||||
@@ -874,6 +897,7 @@ public class BranchProtection implements Serializable {
|
||||
ignoreStaleApprovals,
|
||||
mergeWhitelistTeams,
|
||||
mergeWhitelistUsernames,
|
||||
priority,
|
||||
protectedFilePatterns,
|
||||
pushWhitelistDeployKeys,
|
||||
pushWhitelistTeams,
|
||||
@@ -947,6 +971,7 @@ public class BranchProtection implements Serializable {
|
||||
sb.append(" mergeWhitelistUsernames: ")
|
||||
.append(toIndentedString(mergeWhitelistUsernames))
|
||||
.append("\n");
|
||||
sb.append(" priority: ").append(toIndentedString(priority)).append("\n");
|
||||
sb.append(" protectedFilePatterns: ")
|
||||
.append(toIndentedString(protectedFilePatterns))
|
||||
.append("\n");
|
||||
|
||||
@@ -87,6 +87,9 @@ public class CreateBranchProtectionOption implements Serializable {
|
||||
@SerializedName("merge_whitelist_usernames")
|
||||
private List<String> mergeWhitelistUsernames = null;
|
||||
|
||||
@SerializedName("priority")
|
||||
private Long priority = null;
|
||||
|
||||
@SerializedName("protected_file_patterns")
|
||||
private String protectedFilePatterns = null;
|
||||
|
||||
@@ -573,6 +576,25 @@ public class CreateBranchProtectionOption implements Serializable {
|
||||
this.mergeWhitelistUsernames = mergeWhitelistUsernames;
|
||||
}
|
||||
|
||||
public CreateBranchProtectionOption priority(Long priority) {
|
||||
this.priority = priority;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get priority
|
||||
*
|
||||
* @return priority
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public Long getPriority() {
|
||||
return priority;
|
||||
}
|
||||
|
||||
public void setPriority(Long priority) {
|
||||
this.priority = priority;
|
||||
}
|
||||
|
||||
public CreateBranchProtectionOption protectedFilePatterns(String protectedFilePatterns) {
|
||||
this.protectedFilePatterns = protectedFilePatterns;
|
||||
return this;
|
||||
@@ -820,6 +842,7 @@ public class CreateBranchProtectionOption implements Serializable {
|
||||
this.mergeWhitelistTeams, createBranchProtectionOption.mergeWhitelistTeams)
|
||||
&& Objects.equals(
|
||||
this.mergeWhitelistUsernames, createBranchProtectionOption.mergeWhitelistUsernames)
|
||||
&& Objects.equals(this.priority, createBranchProtectionOption.priority)
|
||||
&& Objects.equals(
|
||||
this.protectedFilePatterns, createBranchProtectionOption.protectedFilePatterns)
|
||||
&& Objects.equals(
|
||||
@@ -861,6 +884,7 @@ public class CreateBranchProtectionOption implements Serializable {
|
||||
ignoreStaleApprovals,
|
||||
mergeWhitelistTeams,
|
||||
mergeWhitelistUsernames,
|
||||
priority,
|
||||
protectedFilePatterns,
|
||||
pushWhitelistDeployKeys,
|
||||
pushWhitelistTeams,
|
||||
@@ -932,6 +956,7 @@ public class CreateBranchProtectionOption implements Serializable {
|
||||
sb.append(" mergeWhitelistUsernames: ")
|
||||
.append(toIndentedString(mergeWhitelistUsernames))
|
||||
.append("\n");
|
||||
sb.append(" priority: ").append(toIndentedString(priority)).append("\n");
|
||||
sb.append(" protectedFilePatterns: ")
|
||||
.append(toIndentedString(protectedFilePatterns))
|
||||
.append("\n");
|
||||
|
||||
@@ -84,6 +84,9 @@ public class EditBranchProtectionOption implements Serializable {
|
||||
@SerializedName("merge_whitelist_usernames")
|
||||
private List<String> mergeWhitelistUsernames = null;
|
||||
|
||||
@SerializedName("priority")
|
||||
private Long priority = null;
|
||||
|
||||
@SerializedName("protected_file_patterns")
|
||||
private String protectedFilePatterns = null;
|
||||
|
||||
@@ -545,6 +548,25 @@ public class EditBranchProtectionOption implements Serializable {
|
||||
this.mergeWhitelistUsernames = mergeWhitelistUsernames;
|
||||
}
|
||||
|
||||
public EditBranchProtectionOption priority(Long priority) {
|
||||
this.priority = priority;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get priority
|
||||
*
|
||||
* @return priority
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public Long getPriority() {
|
||||
return priority;
|
||||
}
|
||||
|
||||
public void setPriority(Long priority) {
|
||||
this.priority = priority;
|
||||
}
|
||||
|
||||
public EditBranchProtectionOption protectedFilePatterns(String protectedFilePatterns) {
|
||||
this.protectedFilePatterns = protectedFilePatterns;
|
||||
return this;
|
||||
@@ -769,6 +791,7 @@ public class EditBranchProtectionOption implements Serializable {
|
||||
&& Objects.equals(this.mergeWhitelistTeams, editBranchProtectionOption.mergeWhitelistTeams)
|
||||
&& Objects.equals(
|
||||
this.mergeWhitelistUsernames, editBranchProtectionOption.mergeWhitelistUsernames)
|
||||
&& Objects.equals(this.priority, editBranchProtectionOption.priority)
|
||||
&& Objects.equals(
|
||||
this.protectedFilePatterns, editBranchProtectionOption.protectedFilePatterns)
|
||||
&& Objects.equals(
|
||||
@@ -807,6 +830,7 @@ public class EditBranchProtectionOption implements Serializable {
|
||||
ignoreStaleApprovals,
|
||||
mergeWhitelistTeams,
|
||||
mergeWhitelistUsernames,
|
||||
priority,
|
||||
protectedFilePatterns,
|
||||
pushWhitelistDeployKeys,
|
||||
pushWhitelistTeams,
|
||||
@@ -876,6 +900,7 @@ public class EditBranchProtectionOption implements Serializable {
|
||||
sb.append(" mergeWhitelistUsernames: ")
|
||||
.append(toIndentedString(mergeWhitelistUsernames))
|
||||
.append("\n");
|
||||
sb.append(" priority: ").append(toIndentedString(priority)).append("\n");
|
||||
sb.append(" protectedFilePatterns: ")
|
||||
.append(toIndentedString(protectedFilePatterns))
|
||||
.append("\n");
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
* 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.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/** UpdateBranchProtectionPriories a list to update the branch protection rule priorities */
|
||||
@Schema(
|
||||
description =
|
||||
"UpdateBranchProtectionPriories a list to update the branch protection rule priorities")
|
||||
public class UpdateBranchProtectionPriories implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@SerializedName("ids")
|
||||
private List<Long> ids = null;
|
||||
|
||||
public UpdateBranchProtectionPriories ids(List<Long> ids) {
|
||||
this.ids = ids;
|
||||
return this;
|
||||
}
|
||||
|
||||
public UpdateBranchProtectionPriories addIdsItem(Long idsItem) {
|
||||
if (this.ids == null) {
|
||||
this.ids = new ArrayList<>();
|
||||
}
|
||||
this.ids.add(idsItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get ids
|
||||
*
|
||||
* @return ids
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public List<Long> getIds() {
|
||||
return ids;
|
||||
}
|
||||
|
||||
public void setIds(List<Long> ids) {
|
||||
this.ids = ids;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
UpdateBranchProtectionPriories updateBranchProtectionPriories =
|
||||
(UpdateBranchProtectionPriories) o;
|
||||
return Objects.equals(this.ids, updateBranchProtectionPriories.ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class UpdateBranchProtectionPriories {\n");
|
||||
|
||||
sb.append(" ids: ").append(toIndentedString(ids)).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