Synchronizing API and documentation updates

This commit is contained in:
gitnexbot
2026-03-17 00:02:16 +00:00
parent 8ec5f1eace
commit 92e681e348
12 changed files with 587 additions and 27 deletions
@@ -11,6 +11,7 @@ import org.gitnex.tea4j.v2.models.CreateOrgOption;
import org.gitnex.tea4j.v2.models.CreateRepoOption;
import org.gitnex.tea4j.v2.models.CreateUserOption;
import org.gitnex.tea4j.v2.models.Cron;
import org.gitnex.tea4j.v2.models.EditActionRunnerOption;
import org.gitnex.tea4j.v2.models.EditHookOption;
import org.gitnex.tea4j.v2.models.EditUserOption;
import org.gitnex.tea4j.v2.models.Email;
@@ -365,10 +366,11 @@ public interface AdminApi {
/**
* Get all runners
*
* @param disabled filter by disabled status (true or false) (optional)
* @return Call<Void>
*/
@GET("admin/actions/runners")
Call<Void> getAdminRunners();
Call<Void> getAdminRunners(@retrofit2.http.Query("disabled") Boolean disabled);
/**
* Lists all jobs
@@ -407,4 +409,17 @@ public interface AdminApi {
@retrofit2.http.Query("head_sha") String headSha,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* Update a global runner
*
* @param runnerId id of the runner (required)
* @param body (optional)
* @return Call&lt;Void&gt;
*/
@Headers({"Content-Type:application/json"})
@PATCH("admin/actions/runners/{runner_id}")
Call<Void> updateAdminRunner(
@retrofit2.http.Path("runner_id") String runnerId,
@retrofit2.http.Body EditActionRunnerOption body);
}
@@ -14,6 +14,7 @@ import org.gitnex.tea4j.v2.models.CreateOrgOption;
import org.gitnex.tea4j.v2.models.CreateRepoOption;
import org.gitnex.tea4j.v2.models.CreateTeamOption;
import org.gitnex.tea4j.v2.models.CreateVariableOption;
import org.gitnex.tea4j.v2.models.EditActionRunnerOption;
import org.gitnex.tea4j.v2.models.EditHookOption;
import org.gitnex.tea4j.v2.models.EditLabelOption;
import org.gitnex.tea4j.v2.models.EditOrgOption;
@@ -122,10 +123,12 @@ public interface OrganizationApi {
* Get org-level runners
*
* @param org name of the organization (required)
* @param disabled filter by disabled status (true or false) (optional)
* @return Call&lt;Void&gt;
*/
@GET("orgs/{org}/actions/runners")
Call<Void> getOrgRunners(@retrofit2.http.Path("org") String org);
Call<Void> getOrgRunners(
@retrofit2.http.Path("org") String org, @retrofit2.http.Query("disabled") Boolean disabled);
/**
* Get an org-level variable
@@ -820,6 +823,21 @@ public interface OrganizationApi {
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* Update an org-level runner
*
* @param org name of the organization (required)
* @param runnerId id of the runner (required)
* @param body (optional)
* @return Call&lt;Void&gt;
*/
@Headers({"Content-Type:application/json"})
@PATCH("orgs/{org}/actions/runners/{runner_id}")
Call<Void> updateOrgRunner(
@retrofit2.http.Path("org") String org,
@retrofit2.http.Path("runner_id") String runnerId,
@retrofit2.http.Body EditActionRunnerOption body);
/**
* Create or Update a secret value in an organization
*
@@ -52,6 +52,7 @@ import org.gitnex.tea4j.v2.models.CreateWikiPageOptions;
import org.gitnex.tea4j.v2.models.DeleteFileOptions;
import org.gitnex.tea4j.v2.models.DeployKey;
import org.gitnex.tea4j.v2.models.DismissPullReviewOptions;
import org.gitnex.tea4j.v2.models.EditActionRunnerOption;
import org.gitnex.tea4j.v2.models.EditAttachmentOptions;
import org.gitnex.tea4j.v2.models.EditBranchProtectionOption;
import org.gitnex.tea4j.v2.models.EditGitHookOption;
@@ -271,7 +272,7 @@ public interface RepositoryApi {
@retrofit2.http.Path("artifact_id") String artifactId);
/**
* Delete an repo-level runner
* Delete a repo-level runner
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
@@ -429,7 +430,7 @@ public interface RepositoryApi {
@retrofit2.http.Path("sha") String sha);
/**
* Get an repo-level runner
* Get a repo-level runner
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
@@ -447,11 +448,14 @@ public interface RepositoryApi {
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param disabled filter by disabled status (true or false) (optional)
* @return Call&lt;Void&gt;
*/
@GET("repos/{owner}/{repo}/actions/runners")
Call<Void> getRepoRunners(
@retrofit2.http.Path("owner") String owner, @retrofit2.http.Path("repo") String repo);
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Query("disabled") Boolean disabled);
/**
* Get a repo-level variable
@@ -3089,6 +3093,23 @@ public interface RepositoryApi {
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* Update a repo-level runner
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param runnerId id of the runner (required)
* @param body (optional)
* @return Call&lt;Void&gt;
*/
@Headers({"Content-Type:application/json"})
@PATCH("repos/{owner}/{repo}/actions/runners/{runner_id}")
Call<Void> updateRepoRunner(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("runner_id") String runnerId,
@retrofit2.http.Body EditActionRunnerOption body);
/**
* Create or Update a secret value in a repository
*
@@ -18,6 +18,7 @@ import org.gitnex.tea4j.v2.models.CreateOrUpdateSecretOption;
import org.gitnex.tea4j.v2.models.CreateRepoOption;
import org.gitnex.tea4j.v2.models.CreateVariableOption;
import org.gitnex.tea4j.v2.models.DeleteEmailOption;
import org.gitnex.tea4j.v2.models.EditActionRunnerOption;
import org.gitnex.tea4j.v2.models.EditHookOption;
import org.gitnex.tea4j.v2.models.Email;
import org.gitnex.tea4j.v2.models.GPGKey;
@@ -63,7 +64,7 @@ public interface UserApi {
@retrofit2.http.Body CreateVariableOption body);
/**
* Delete an user-level runner
* Delete a user-level runner
*
* @param runnerId id of the runner (required)
* @return Call&lt;Void&gt;
@@ -90,7 +91,7 @@ public interface UserApi {
Call<Void> deleteUserVariable(@retrofit2.http.Path("variablename") String variablename);
/**
* Get an user-level runner
* Get a user-level runner
*
* @param runnerId id of the runner (required)
* @return Call&lt;Void&gt;
@@ -101,10 +102,11 @@ public interface UserApi {
/**
* Get user-level runners
*
* @param disabled filter by disabled status (true or false) (optional)
* @return Call&lt;Void&gt;
*/
@GET("user/actions/runners")
Call<Void> getUserRunners();
Call<Void> getUserRunners(@retrofit2.http.Query("disabled") Boolean disabled);
/**
* Get user settings
@@ -180,6 +182,19 @@ public interface UserApi {
@GET("user/gpg_key_token")
Call<String> getVerificationToken();
/**
* Update a user-level runner
*
* @param runnerId id of the runner (required)
* @param body (optional)
* @return Call&lt;Void&gt;
*/
@Headers({"Content-Type:application/json"})
@PATCH("user/actions/runners/{runner_id}")
Call<Void> updateUserRunner(
@retrofit2.http.Path("runner_id") String runnerId,
@retrofit2.http.Body EditActionRunnerOption body);
/**
* Create or Update a secret value in a user scope
*
@@ -27,6 +27,9 @@ public class ActionRunner implements Serializable {
@SerializedName("busy")
private Boolean busy = null;
@SerializedName("disabled")
private Boolean disabled = null;
@SerializedName("ephemeral")
private Boolean ephemeral = null;
@@ -61,6 +64,25 @@ public class ActionRunner implements Serializable {
this.busy = busy;
}
public ActionRunner disabled(Boolean disabled) {
this.disabled = disabled;
return this;
}
/**
* Get disabled
*
* @return disabled
*/
@Schema(description = "")
public Boolean isDisabled() {
return disabled;
}
public void setDisabled(Boolean disabled) {
this.disabled = disabled;
}
public ActionRunner ephemeral(Boolean ephemeral) {
this.ephemeral = ephemeral;
return this;
@@ -174,6 +196,7 @@ public class ActionRunner implements Serializable {
}
ActionRunner actionRunner = (ActionRunner) o;
return Objects.equals(this.busy, actionRunner.busy)
&& Objects.equals(this.disabled, actionRunner.disabled)
&& Objects.equals(this.ephemeral, actionRunner.ephemeral)
&& Objects.equals(this.id, actionRunner.id)
&& Objects.equals(this.labels, actionRunner.labels)
@@ -183,7 +206,7 @@ public class ActionRunner implements Serializable {
@Override
public int hashCode() {
return Objects.hash(busy, ephemeral, id, labels, name, status);
return Objects.hash(busy, disabled, ephemeral, id, labels, name, status);
}
@Override
@@ -192,6 +215,7 @@ public class ActionRunner implements Serializable {
sb.append("class ActionRunner {\n");
sb.append(" busy: ").append(toIndentedString(busy)).append("\n");
sb.append(" disabled: ").append(toIndentedString(disabled)).append("\n");
sb.append(" ephemeral: ").append(toIndentedString(ephemeral)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" labels: ").append(toIndentedString(labels)).append("\n");
@@ -0,0 +1,82 @@
/*
* Gitea API
* This documentation describes the Gitea API.
*
* OpenAPI spec version: {{.SwaggerAppVer}}
*
*
* 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;
/** EditActionRunnerOption */
public class EditActionRunnerOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("disabled")
private Boolean disabled = null;
public EditActionRunnerOption disabled(Boolean disabled) {
this.disabled = disabled;
return this;
}
/**
* Get disabled
*
* @return disabled
*/
@Schema(required = true, description = "")
public Boolean isDisabled() {
return disabled;
}
public void setDisabled(Boolean disabled) {
this.disabled = disabled;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EditActionRunnerOption editActionRunnerOption = (EditActionRunnerOption) o;
return Objects.equals(this.disabled, editActionRunnerOption.disabled);
}
@Override
public int hashCode() {
return Objects.hash(disabled);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EditActionRunnerOption {\n");
sb.append(" disabled: ").append(toIndentedString(disabled)).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 ");
}
}