mirror of
https://codeberg.org/gitnex/tea4j-autodeploy
synced 2026-06-06 18:02:16 +00:00
Synchronizing API and documentation updates
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package org.gitnex.tea4j.v2.apis;
|
||||
|
||||
import org.gitnex.tea4j.v2.CollectionFormats.*;
|
||||
import org.gitnex.tea4j.v2.models.Compare;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.*;
|
||||
|
||||
public interface CommitApi {
|
||||
/**
|
||||
* Get commit comparison information
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param basehead compare two branches or commits (required)
|
||||
* @return Call<Compare>
|
||||
*/
|
||||
@GET("repos/{owner}/{repo}/compare/{basehead}")
|
||||
Call<Compare> information(
|
||||
@retrofit2.http.Path("owner") String owner,
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Path("basehead") String basehead);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package org.gitnex.tea4j.v2.apis;
|
||||
|
||||
import org.gitnex.tea4j.v2.CollectionFormats.*;
|
||||
import org.gitnex.tea4j.v2.models.Compare;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.*;
|
||||
|
||||
public interface ComparisonApi {
|
||||
/**
|
||||
* Get commit comparison information
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param basehead compare two branches or commits (required)
|
||||
* @return Call<Compare>
|
||||
*/
|
||||
@GET("repos/{owner}/{repo}/compare/{basehead}")
|
||||
Call<Compare> information(
|
||||
@retrofit2.http.Path("owner") String owner,
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Path("basehead") String basehead);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package org.gitnex.tea4j.v2.apis;
|
||||
|
||||
import org.gitnex.tea4j.v2.CollectionFormats.*;
|
||||
import org.gitnex.tea4j.v2.models.Compare;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.*;
|
||||
|
||||
public interface GetApi {
|
||||
/**
|
||||
* Get commit comparison information
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param basehead compare two branches or commits (required)
|
||||
* @return Call<Compare>
|
||||
*/
|
||||
@GET("repos/{owner}/{repo}/compare/{basehead}")
|
||||
Call<Compare> information(
|
||||
@retrofit2.http.Path("owner") String owner,
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Path("basehead") String basehead);
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
/*
|
||||
* 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;
|
||||
|
||||
/** Compare */
|
||||
public class Compare implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@SerializedName("commits")
|
||||
private List<Commit> commits = null;
|
||||
|
||||
@SerializedName("total_commits")
|
||||
private Long totalCommits = null;
|
||||
|
||||
public Compare commits(List<Commit> commits) {
|
||||
this.commits = commits;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Compare addCommitsItem(Commit commitsItem) {
|
||||
if (this.commits == null) {
|
||||
this.commits = new ArrayList<>();
|
||||
}
|
||||
this.commits.add(commitsItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get commits
|
||||
*
|
||||
* @return commits
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public List<Commit> getCommits() {
|
||||
return commits;
|
||||
}
|
||||
|
||||
public void setCommits(List<Commit> commits) {
|
||||
this.commits = commits;
|
||||
}
|
||||
|
||||
public Compare totalCommits(Long totalCommits) {
|
||||
this.totalCommits = totalCommits;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get totalCommits
|
||||
*
|
||||
* @return totalCommits
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public Long getTotalCommits() {
|
||||
return totalCommits;
|
||||
}
|
||||
|
||||
public void setTotalCommits(Long totalCommits) {
|
||||
this.totalCommits = totalCommits;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
Compare compare = (Compare) o;
|
||||
return Objects.equals(this.commits, compare.commits)
|
||||
&& Objects.equals(this.totalCommits, compare.totalCommits);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(commits, totalCommits);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Compare {\n");
|
||||
|
||||
sb.append(" commits: ").append(toIndentedString(commits)).append("\n");
|
||||
sb.append(" totalCommits: ").append(toIndentedString(totalCommits)).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 ");
|
||||
}
|
||||
}
|
||||
@@ -74,6 +74,9 @@ public class User implements Serializable {
|
||||
@SerializedName("restricted")
|
||||
private Boolean restricted = null;
|
||||
|
||||
@SerializedName("source_id")
|
||||
private Long sourceId = null;
|
||||
|
||||
@SerializedName("starred_repos_count")
|
||||
private Long starredReposCount = null;
|
||||
|
||||
@@ -406,6 +409,25 @@ public class User implements Serializable {
|
||||
this.restricted = restricted;
|
||||
}
|
||||
|
||||
public User sourceId(Long sourceId) {
|
||||
this.sourceId = sourceId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The ID of the user's Authentication Source
|
||||
*
|
||||
* @return sourceId
|
||||
*/
|
||||
@Schema(description = "The ID of the user's Authentication Source")
|
||||
public Long getSourceId() {
|
||||
return sourceId;
|
||||
}
|
||||
|
||||
public void setSourceId(Long sourceId) {
|
||||
this.sourceId = sourceId;
|
||||
}
|
||||
|
||||
public User starredReposCount(Long starredReposCount) {
|
||||
this.starredReposCount = starredReposCount;
|
||||
return this;
|
||||
@@ -489,6 +511,7 @@ public class User implements Serializable {
|
||||
&& Objects.equals(this.loginName, user.loginName)
|
||||
&& Objects.equals(this.prohibitLogin, user.prohibitLogin)
|
||||
&& Objects.equals(this.restricted, user.restricted)
|
||||
&& Objects.equals(this.sourceId, user.sourceId)
|
||||
&& Objects.equals(this.starredReposCount, user.starredReposCount)
|
||||
&& Objects.equals(this.visibility, user.visibility)
|
||||
&& Objects.equals(this.website, user.website);
|
||||
@@ -514,6 +537,7 @@ public class User implements Serializable {
|
||||
loginName,
|
||||
prohibitLogin,
|
||||
restricted,
|
||||
sourceId,
|
||||
starredReposCount,
|
||||
visibility,
|
||||
website);
|
||||
@@ -541,6 +565,7 @@ public class User implements Serializable {
|
||||
sb.append(" loginName: ").append(toIndentedString(loginName)).append("\n");
|
||||
sb.append(" prohibitLogin: ").append(toIndentedString(prohibitLogin)).append("\n");
|
||||
sb.append(" restricted: ").append(toIndentedString(restricted)).append("\n");
|
||||
sb.append(" sourceId: ").append(toIndentedString(sourceId)).append("\n");
|
||||
sb.append(" starredReposCount: ").append(toIndentedString(starredReposCount)).append("\n");
|
||||
sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n");
|
||||
sb.append(" website: ").append(toIndentedString(website)).append("\n");
|
||||
|
||||
Reference in New Issue
Block a user