mirror of
https://codeberg.org/gitnex/tea4j-autodeploy
synced 2026-06-05 01:02:18 +00:00
Synchronizing API and documentation updates
This commit is contained in:
@@ -22,6 +22,7 @@ import org.gitnex.tea4j.v2.models.CreateHookOption;
|
||||
import org.gitnex.tea4j.v2.models.CreateKeyOption;
|
||||
import org.gitnex.tea4j.v2.models.CreatePullRequestOption;
|
||||
import org.gitnex.tea4j.v2.models.CreatePullReviewOptions;
|
||||
import org.gitnex.tea4j.v2.models.CreatePushMirrorOption;
|
||||
import org.gitnex.tea4j.v2.models.CreateReleaseOption;
|
||||
import org.gitnex.tea4j.v2.models.CreateRepoOption;
|
||||
import org.gitnex.tea4j.v2.models.CreateStatusOption;
|
||||
@@ -52,6 +53,7 @@ import org.gitnex.tea4j.v2.models.PullRequest;
|
||||
import org.gitnex.tea4j.v2.models.PullReview;
|
||||
import org.gitnex.tea4j.v2.models.PullReviewComment;
|
||||
import org.gitnex.tea4j.v2.models.PullReviewRequestOptions;
|
||||
import org.gitnex.tea4j.v2.models.PushMirror;
|
||||
import org.gitnex.tea4j.v2.models.Reference;
|
||||
import org.gitnex.tea4j.v2.models.Release;
|
||||
import org.gitnex.tea4j.v2.models.RepoCollaboratorPermission;
|
||||
@@ -220,6 +222,21 @@ public interface RepositoryApi {
|
||||
@retrofit2.http.Path("collaborator") String collaborator,
|
||||
@retrofit2.http.Body AddCollaboratorOption body);
|
||||
|
||||
/**
|
||||
* add a push mirror to the repository
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param body (optional)
|
||||
* @return Call<PushMirror>
|
||||
*/
|
||||
@Headers({"Content-Type:application/json"})
|
||||
@POST("repos/{owner}/{repo}/push_mirrors")
|
||||
Call<PushMirror> repoAddPushMirror(
|
||||
@retrofit2.http.Path("owner") String owner,
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Body CreatePushMirrorOption body);
|
||||
|
||||
/**
|
||||
* Add a team to a repository
|
||||
*
|
||||
@@ -657,6 +674,20 @@ public interface RepositoryApi {
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Path("index") Long index);
|
||||
|
||||
/**
|
||||
* deletes a push mirror from a repository by remoteName
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param name remote name of the pushMirror (required)
|
||||
* @return Call<Void>
|
||||
*/
|
||||
@DELETE("repos/{owner}/{repo}/push_mirrors/{name}")
|
||||
Call<Void> repoDeletePushMirror(
|
||||
@retrofit2.http.Path("owner") String owner,
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Path("name") String name);
|
||||
|
||||
/**
|
||||
* Delete a release
|
||||
*
|
||||
@@ -1252,6 +1283,20 @@ public interface RepositoryApi {
|
||||
@retrofit2.http.Path("index") Long index,
|
||||
@retrofit2.http.Path("id") Long id);
|
||||
|
||||
/**
|
||||
* Get push mirror of the repository by remoteName
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param name remote name of push mirror (required)
|
||||
* @return Call<PushMirror>
|
||||
*/
|
||||
@GET("repos/{owner}/{repo}/push_mirrors/{name}")
|
||||
Call<PushMirror> repoGetPushMirrorByRemoteName(
|
||||
@retrofit2.http.Path("owner") String owner,
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Path("name") String name);
|
||||
|
||||
/**
|
||||
* Get a file from a repository
|
||||
*
|
||||
@@ -1586,6 +1631,22 @@ public interface RepositoryApi {
|
||||
@retrofit2.http.Query("page") Integer page,
|
||||
@retrofit2.http.Query("limit") Integer limit);
|
||||
|
||||
/**
|
||||
* Get all push mirrors of the repository
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param page page number of results to return (1-based) (optional)
|
||||
* @param limit page size of results (optional)
|
||||
* @return Call<List<PushMirror>>
|
||||
*/
|
||||
@GET("repos/{owner}/{repo}/push_mirrors")
|
||||
Call<List<PushMirror>> repoListPushMirrors(
|
||||
@retrofit2.http.Path("owner") String owner,
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Query("page") Integer page,
|
||||
@retrofit2.http.Query("limit") Integer limit);
|
||||
|
||||
/**
|
||||
* List release's attachments
|
||||
*
|
||||
@@ -1794,6 +1855,17 @@ public interface RepositoryApi {
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Path("index") Long index);
|
||||
|
||||
/**
|
||||
* Sync all push mirrored repository
|
||||
*
|
||||
* @param owner owner of the repo to sync (required)
|
||||
* @param repo name of the repo to sync (required)
|
||||
* @return Call<Void>
|
||||
*/
|
||||
@POST("repos/{owner}/{repo}/push_mirrors-sync")
|
||||
Call<Void> repoPushMirrorSync(
|
||||
@retrofit2.http.Path("owner") String owner, @retrofit2.http.Path("repo") String repo);
|
||||
|
||||
/**
|
||||
* Search for repositories
|
||||
*
|
||||
|
||||
@@ -46,6 +46,9 @@ public class ContentsResponse implements Serializable {
|
||||
@SerializedName("html_url")
|
||||
private String htmlUrl = null;
|
||||
|
||||
@SerializedName("last_commit_sha")
|
||||
private String lastCommitSha = null;
|
||||
|
||||
@SerializedName("name")
|
||||
private String name = null;
|
||||
|
||||
@@ -184,6 +187,25 @@ public class ContentsResponse implements Serializable {
|
||||
this.htmlUrl = htmlUrl;
|
||||
}
|
||||
|
||||
public ContentsResponse lastCommitSha(String lastCommitSha) {
|
||||
this.lastCommitSha = lastCommitSha;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get lastCommitSha
|
||||
*
|
||||
* @return lastCommitSha
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public String getLastCommitSha() {
|
||||
return lastCommitSha;
|
||||
}
|
||||
|
||||
public void setLastCommitSha(String lastCommitSha) {
|
||||
this.lastCommitSha = lastCommitSha;
|
||||
}
|
||||
|
||||
public ContentsResponse name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
@@ -354,6 +376,7 @@ public class ContentsResponse implements Serializable {
|
||||
&& Objects.equals(this.encoding, contentsResponse.encoding)
|
||||
&& Objects.equals(this.gitUrl, contentsResponse.gitUrl)
|
||||
&& Objects.equals(this.htmlUrl, contentsResponse.htmlUrl)
|
||||
&& Objects.equals(this.lastCommitSha, contentsResponse.lastCommitSha)
|
||||
&& Objects.equals(this.name, contentsResponse.name)
|
||||
&& Objects.equals(this.path, contentsResponse.path)
|
||||
&& Objects.equals(this.sha, contentsResponse.sha)
|
||||
@@ -373,6 +396,7 @@ public class ContentsResponse implements Serializable {
|
||||
encoding,
|
||||
gitUrl,
|
||||
htmlUrl,
|
||||
lastCommitSha,
|
||||
name,
|
||||
path,
|
||||
sha,
|
||||
@@ -394,6 +418,7 @@ public class ContentsResponse implements Serializable {
|
||||
sb.append(" encoding: ").append(toIndentedString(encoding)).append("\n");
|
||||
sb.append(" gitUrl: ").append(toIndentedString(gitUrl)).append("\n");
|
||||
sb.append(" htmlUrl: ").append(toIndentedString(htmlUrl)).append("\n");
|
||||
sb.append(" lastCommitSha: ").append(toIndentedString(lastCommitSha)).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" path: ").append(toIndentedString(path)).append("\n");
|
||||
sb.append(" sha: ").append(toIndentedString(sha)).append("\n");
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
/*
|
||||
* Gitea API.
|
||||
* This documentation describes the Gitea API.
|
||||
*
|
||||
* OpenAPI spec version: {{AppVer | JSEscape | Safe}}
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
|
||||
/** CreatePushMirrorOption */
|
||||
public class CreatePushMirrorOption implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@SerializedName("interval")
|
||||
private String interval = null;
|
||||
|
||||
@SerializedName("remote_address")
|
||||
private String remoteAddress = null;
|
||||
|
||||
@SerializedName("remote_password")
|
||||
private String remotePassword = null;
|
||||
|
||||
@SerializedName("remote_username")
|
||||
private String remoteUsername = null;
|
||||
|
||||
public CreatePushMirrorOption interval(String interval) {
|
||||
this.interval = interval;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get interval
|
||||
*
|
||||
* @return interval
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public String getInterval() {
|
||||
return interval;
|
||||
}
|
||||
|
||||
public void setInterval(String interval) {
|
||||
this.interval = interval;
|
||||
}
|
||||
|
||||
public CreatePushMirrorOption remoteAddress(String remoteAddress) {
|
||||
this.remoteAddress = remoteAddress;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get remoteAddress
|
||||
*
|
||||
* @return remoteAddress
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public String getRemoteAddress() {
|
||||
return remoteAddress;
|
||||
}
|
||||
|
||||
public void setRemoteAddress(String remoteAddress) {
|
||||
this.remoteAddress = remoteAddress;
|
||||
}
|
||||
|
||||
public CreatePushMirrorOption remotePassword(String remotePassword) {
|
||||
this.remotePassword = remotePassword;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get remotePassword
|
||||
*
|
||||
* @return remotePassword
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public String getRemotePassword() {
|
||||
return remotePassword;
|
||||
}
|
||||
|
||||
public void setRemotePassword(String remotePassword) {
|
||||
this.remotePassword = remotePassword;
|
||||
}
|
||||
|
||||
public CreatePushMirrorOption remoteUsername(String remoteUsername) {
|
||||
this.remoteUsername = remoteUsername;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get remoteUsername
|
||||
*
|
||||
* @return remoteUsername
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public String getRemoteUsername() {
|
||||
return remoteUsername;
|
||||
}
|
||||
|
||||
public void setRemoteUsername(String remoteUsername) {
|
||||
this.remoteUsername = remoteUsername;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CreatePushMirrorOption createPushMirrorOption = (CreatePushMirrorOption) o;
|
||||
return Objects.equals(this.interval, createPushMirrorOption.interval)
|
||||
&& Objects.equals(this.remoteAddress, createPushMirrorOption.remoteAddress)
|
||||
&& Objects.equals(this.remotePassword, createPushMirrorOption.remotePassword)
|
||||
&& Objects.equals(this.remoteUsername, createPushMirrorOption.remoteUsername);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(interval, remoteAddress, remotePassword, remoteUsername);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class CreatePushMirrorOption {\n");
|
||||
|
||||
sb.append(" interval: ").append(toIndentedString(interval)).append("\n");
|
||||
sb.append(" remoteAddress: ").append(toIndentedString(remoteAddress)).append("\n");
|
||||
sb.append(" remotePassword: ").append(toIndentedString(remotePassword)).append("\n");
|
||||
sb.append(" remoteUsername: ").append(toIndentedString(remoteUsername)).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 ");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,228 @@
|
||||
/*
|
||||
* Gitea API.
|
||||
* This documentation describes the Gitea API.
|
||||
*
|
||||
* OpenAPI spec version: {{AppVer | JSEscape | Safe}}
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
|
||||
/** PushMirror represents information of a push mirror */
|
||||
@Schema(description = "PushMirror represents information of a push mirror")
|
||||
public class PushMirror implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@SerializedName("created")
|
||||
private String created = null;
|
||||
|
||||
@SerializedName("interval")
|
||||
private String interval = null;
|
||||
|
||||
@SerializedName("last_error")
|
||||
private String lastError = null;
|
||||
|
||||
@SerializedName("last_update")
|
||||
private String lastUpdate = null;
|
||||
|
||||
@SerializedName("remote_address")
|
||||
private String remoteAddress = null;
|
||||
|
||||
@SerializedName("remote_name")
|
||||
private String remoteName = null;
|
||||
|
||||
@SerializedName("repo_name")
|
||||
private String repoName = null;
|
||||
|
||||
public PushMirror created(String created) {
|
||||
this.created = created;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get created
|
||||
*
|
||||
* @return created
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public String getCreated() {
|
||||
return created;
|
||||
}
|
||||
|
||||
public void setCreated(String created) {
|
||||
this.created = created;
|
||||
}
|
||||
|
||||
public PushMirror interval(String interval) {
|
||||
this.interval = interval;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get interval
|
||||
*
|
||||
* @return interval
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public String getInterval() {
|
||||
return interval;
|
||||
}
|
||||
|
||||
public void setInterval(String interval) {
|
||||
this.interval = interval;
|
||||
}
|
||||
|
||||
public PushMirror lastError(String lastError) {
|
||||
this.lastError = lastError;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get lastError
|
||||
*
|
||||
* @return lastError
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public String getLastError() {
|
||||
return lastError;
|
||||
}
|
||||
|
||||
public void setLastError(String lastError) {
|
||||
this.lastError = lastError;
|
||||
}
|
||||
|
||||
public PushMirror lastUpdate(String lastUpdate) {
|
||||
this.lastUpdate = lastUpdate;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get lastUpdate
|
||||
*
|
||||
* @return lastUpdate
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public String getLastUpdate() {
|
||||
return lastUpdate;
|
||||
}
|
||||
|
||||
public void setLastUpdate(String lastUpdate) {
|
||||
this.lastUpdate = lastUpdate;
|
||||
}
|
||||
|
||||
public PushMirror remoteAddress(String remoteAddress) {
|
||||
this.remoteAddress = remoteAddress;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get remoteAddress
|
||||
*
|
||||
* @return remoteAddress
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public String getRemoteAddress() {
|
||||
return remoteAddress;
|
||||
}
|
||||
|
||||
public void setRemoteAddress(String remoteAddress) {
|
||||
this.remoteAddress = remoteAddress;
|
||||
}
|
||||
|
||||
public PushMirror remoteName(String remoteName) {
|
||||
this.remoteName = remoteName;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get remoteName
|
||||
*
|
||||
* @return remoteName
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public String getRemoteName() {
|
||||
return remoteName;
|
||||
}
|
||||
|
||||
public void setRemoteName(String remoteName) {
|
||||
this.remoteName = remoteName;
|
||||
}
|
||||
|
||||
public PushMirror repoName(String repoName) {
|
||||
this.repoName = repoName;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get repoName
|
||||
*
|
||||
* @return repoName
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public String getRepoName() {
|
||||
return repoName;
|
||||
}
|
||||
|
||||
public void setRepoName(String repoName) {
|
||||
this.repoName = repoName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
PushMirror pushMirror = (PushMirror) o;
|
||||
return Objects.equals(this.created, pushMirror.created)
|
||||
&& Objects.equals(this.interval, pushMirror.interval)
|
||||
&& Objects.equals(this.lastError, pushMirror.lastError)
|
||||
&& Objects.equals(this.lastUpdate, pushMirror.lastUpdate)
|
||||
&& Objects.equals(this.remoteAddress, pushMirror.remoteAddress)
|
||||
&& Objects.equals(this.remoteName, pushMirror.remoteName)
|
||||
&& Objects.equals(this.repoName, pushMirror.repoName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
created, interval, lastError, lastUpdate, remoteAddress, remoteName, repoName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class PushMirror {\n");
|
||||
|
||||
sb.append(" created: ").append(toIndentedString(created)).append("\n");
|
||||
sb.append(" interval: ").append(toIndentedString(interval)).append("\n");
|
||||
sb.append(" lastError: ").append(toIndentedString(lastError)).append("\n");
|
||||
sb.append(" lastUpdate: ").append(toIndentedString(lastUpdate)).append("\n");
|
||||
sb.append(" remoteAddress: ").append(toIndentedString(remoteAddress)).append("\n");
|
||||
sb.append(" remoteName: ").append(toIndentedString(remoteName)).append("\n");
|
||||
sb.append(" repoName: ").append(toIndentedString(repoName)).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