Synchronizing API and documentation updates

This commit is contained in:
gitnexbot
2026-03-31 00:01:59 +00:00
parent fdc8c11dc1
commit 345679de31
33 changed files with 998 additions and 181 deletions
@@ -2,6 +2,8 @@ package org.gitnex.tea4j.v2.apis;
import java.util.List;
import org.gitnex.tea4j.v2.CollectionFormats.*;
import org.gitnex.tea4j.v2.models.ActionRunner;
import org.gitnex.tea4j.v2.models.ActionRunnersResponse;
import org.gitnex.tea4j.v2.models.ActionWorkflowJobsResponse;
import org.gitnex.tea4j.v2.models.ActionWorkflowRunsResponse;
import org.gitnex.tea4j.v2.models.Badge;
@@ -358,19 +360,19 @@ public interface AdminApi {
* Get a global runner
*
* @param runnerId id of the runner (required)
* @return Call<Void>
* @return Call<ActionRunner>
*/
@GET("admin/actions/runners/{runner_id}")
Call<Void> getAdminRunner(@retrofit2.http.Path("runner_id") String runnerId);
Call<ActionRunner> getAdminRunner(@retrofit2.http.Path("runner_id") String runnerId);
/**
* Get all runners
*
* @param disabled filter by disabled status (true or false) (optional)
* @return Call&lt;Void&gt;
* @return Call&lt;ActionRunnersResponse&gt;
*/
@GET("admin/actions/runners")
Call<Void> getAdminRunners(@retrofit2.http.Query("disabled") Boolean disabled);
Call<ActionRunnersResponse> getAdminRunners(@retrofit2.http.Query("disabled") Boolean disabled);
/**
* Lists all jobs
@@ -415,11 +417,11 @@ public interface AdminApi {
*
* @param runnerId id of the runner (required)
* @param body (optional)
* @return Call&lt;Void&gt;
* @return Call&lt;ActionRunner&gt;
*/
@Headers({"Content-Type:application/json"})
@PATCH("admin/actions/runners/{runner_id}")
Call<Void> updateAdminRunner(
Call<ActionRunner> updateAdminRunner(
@retrofit2.http.Path("runner_id") String runnerId,
@retrofit2.http.Body EditActionRunnerOption body);
}
@@ -469,7 +469,8 @@ public interface IssueApi {
/**
* Edit an issue. If using deadline only the date will be taken into account, and time of day
* ignored.
* ignored. Pass &#x60;content_version&#x60; to enable optimistic locking on body edits. If the
* version doesn&#x27;t match the current value, the request fails with 409 Conflict.
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
@@ -3,6 +3,8 @@ package org.gitnex.tea4j.v2.apis;
import java.util.Date;
import java.util.List;
import org.gitnex.tea4j.v2.CollectionFormats.*;
import org.gitnex.tea4j.v2.models.ActionRunner;
import org.gitnex.tea4j.v2.models.ActionRunnersResponse;
import org.gitnex.tea4j.v2.models.ActionVariable;
import org.gitnex.tea4j.v2.models.ActionWorkflowJobsResponse;
import org.gitnex.tea4j.v2.models.ActionWorkflowRunsResponse;
@@ -113,10 +115,10 @@ public interface OrganizationApi {
*
* @param org name of the organization (required)
* @param runnerId id of the runner (required)
* @return Call&lt;Void&gt;
* @return Call&lt;ActionRunner&gt;
*/
@GET("orgs/{org}/actions/runners/{runner_id}")
Call<Void> getOrgRunner(
Call<ActionRunner> getOrgRunner(
@retrofit2.http.Path("org") String org, @retrofit2.http.Path("runner_id") String runnerId);
/**
@@ -124,10 +126,10 @@ public interface OrganizationApi {
*
* @param org name of the organization (required)
* @param disabled filter by disabled status (true or false) (optional)
* @return Call&lt;Void&gt;
* @return Call&lt;ActionRunnersResponse&gt;
*/
@GET("orgs/{org}/actions/runners")
Call<Void> getOrgRunners(
Call<ActionRunnersResponse> getOrgRunners(
@retrofit2.http.Path("org") String org, @retrofit2.http.Query("disabled") Boolean disabled);
/**
@@ -829,11 +831,11 @@ public interface OrganizationApi {
* @param org name of the organization (required)
* @param runnerId id of the runner (required)
* @param body (optional)
* @return Call&lt;Void&gt;
* @return Call&lt;ActionRunner&gt;
*/
@Headers({"Content-Type:application/json"})
@PATCH("orgs/{org}/actions/runners/{runner_id}")
Call<Void> updateOrgRunner(
Call<ActionRunner> updateOrgRunner(
@retrofit2.http.Path("org") String org,
@retrofit2.http.Path("runner_id") String runnerId,
@retrofit2.http.Body EditActionRunnerOption body);
@@ -8,6 +8,8 @@ import okhttp3.RequestBody;
import org.gitnex.tea4j.v2.CollectionFormats.*;
import org.gitnex.tea4j.v2.models.ActionArtifact;
import org.gitnex.tea4j.v2.models.ActionArtifactsResponse;
import org.gitnex.tea4j.v2.models.ActionRunner;
import org.gitnex.tea4j.v2.models.ActionRunnersResponse;
import org.gitnex.tea4j.v2.models.ActionTaskResponse;
import org.gitnex.tea4j.v2.models.ActionVariable;
import org.gitnex.tea4j.v2.models.ActionWorkflow;
@@ -435,10 +437,10 @@ public interface RepositoryApi {
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param runnerId id of the runner (required)
* @return Call&lt;Void&gt;
* @return Call&lt;ActionRunner&gt;
*/
@GET("repos/{owner}/{repo}/actions/runners/{runner_id}")
Call<Void> getRepoRunner(
Call<ActionRunner> getRepoRunner(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("runner_id") String runnerId);
@@ -449,10 +451,10 @@ 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;
* @return Call&lt;ActionRunnersResponse&gt;
*/
@GET("repos/{owner}/{repo}/actions/runners")
Call<Void> getRepoRunners(
Call<ActionRunnersResponse> getRepoRunners(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Query("disabled") Boolean disabled);
@@ -534,7 +536,7 @@ public interface RepositoryApi {
Call<ActionWorkflowRun> getWorkflowRun(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("run") String run);
@retrofit2.http.Path("run") Integer run);
/**
* Lists all runs for a repository run
@@ -3114,11 +3116,11 @@ public interface RepositoryApi {
* @param repo name of the repo (required)
* @param runnerId id of the runner (required)
* @param body (optional)
* @return Call&lt;Void&gt;
* @return Call&lt;ActionRunner&gt;
*/
@Headers({"Content-Type:application/json"})
@PATCH("repos/{owner}/{repo}/actions/runners/{runner_id}")
Call<Void> updateRepoRunner(
Call<ActionRunner> updateRepoRunner(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("runner_id") String runnerId,
@@ -4,6 +4,8 @@ import java.util.Date;
import java.util.List;
import org.gitnex.tea4j.v2.CollectionFormats.*;
import org.gitnex.tea4j.v2.models.AccessToken;
import org.gitnex.tea4j.v2.models.ActionRunner;
import org.gitnex.tea4j.v2.models.ActionRunnersResponse;
import org.gitnex.tea4j.v2.models.ActionVariable;
import org.gitnex.tea4j.v2.models.ActionWorkflowJobsResponse;
import org.gitnex.tea4j.v2.models.ActionWorkflowRunsResponse;
@@ -94,19 +96,19 @@ public interface UserApi {
* Get a user-level runner
*
* @param runnerId id of the runner (required)
* @return Call&lt;Void&gt;
* @return Call&lt;ActionRunner&gt;
*/
@GET("user/actions/runners/{runner_id}")
Call<Void> getUserRunner(@retrofit2.http.Path("runner_id") String runnerId);
Call<ActionRunner> getUserRunner(@retrofit2.http.Path("runner_id") String runnerId);
/**
* Get user-level runners
*
* @param disabled filter by disabled status (true or false) (optional)
* @return Call&lt;Void&gt;
* @return Call&lt;ActionRunnersResponse&gt;
*/
@GET("user/actions/runners")
Call<Void> getUserRunners(@retrofit2.http.Query("disabled") Boolean disabled);
Call<ActionRunnersResponse> getUserRunners(@retrofit2.http.Query("disabled") Boolean disabled);
/**
* Get user settings
@@ -187,11 +189,11 @@ public interface UserApi {
*
* @param runnerId id of the runner (required)
* @param body (optional)
* @return Call&lt;Void&gt;
* @return Call&lt;ActionRunner&gt;
*/
@Headers({"Content-Type:application/json"})
@PATCH("user/actions/runners/{runner_id}")
Call<Void> updateUserRunner(
Call<ActionRunner> updateUserRunner(
@retrofit2.http.Path("runner_id") String runnerId,
@retrofit2.http.Body EditActionRunnerOption body);
@@ -12,8 +12,13 @@
package org.gitnex.tea4j.v2.models;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
@@ -33,8 +38,56 @@ public class CreatePullReviewOptions implements Serializable {
@SerializedName("commit_id")
private String commitId = null;
/** Gets or Sets event */
@JsonAdapter(EventEnum.Adapter.class)
public enum EventEnum {
APPROVED("APPROVED"),
PENDING("PENDING"),
COMMENT("COMMENT"),
REQUEST_CHANGES("REQUEST_CHANGES"),
REQUEST_REVIEW("REQUEST_REVIEW");
private String value;
EventEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static EventEnum fromValue(String input) {
for (EventEnum b : EventEnum.values()) {
if (b.value.equals(input)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter<EventEnum> {
@Override
public void write(final JsonWriter jsonWriter, final EventEnum enumeration)
throws IOException {
jsonWriter.value(String.valueOf(enumeration.getValue()));
}
@Override
public EventEnum read(final JsonReader jsonReader) throws IOException {
Object value = jsonReader.nextString();
return EventEnum.fromValue((String) (value));
}
}
}
@SerializedName("event")
private String event = null;
private EventEnum event = null;
public CreatePullReviewOptions body(String body) {
this.body = body;
@@ -101,7 +154,7 @@ public class CreatePullReviewOptions implements Serializable {
this.commitId = commitId;
}
public CreatePullReviewOptions event(String event) {
public CreatePullReviewOptions event(EventEnum event) {
this.event = event;
return this;
}
@@ -112,11 +165,11 @@ public class CreatePullReviewOptions implements Serializable {
* @return event
*/
@Schema(description = "")
public String getEvent() {
public EventEnum getEvent() {
return event;
}
public void setEvent(String event) {
public void setEvent(EventEnum event) {
this.event = event;
}
@@ -34,6 +34,9 @@ public class EditIssueOption implements Serializable {
@SerializedName("body")
private String body = null;
@SerializedName("content_version")
private Long contentVersion = null;
@SerializedName("due_date")
private Date dueDate = null;
@@ -117,6 +120,26 @@ public class EditIssueOption implements Serializable {
this.body = body;
}
public EditIssueOption contentVersion(Long contentVersion) {
this.contentVersion = contentVersion;
return this;
}
/**
* The current version of the issue content to detect conflicts during editing
*
* @return contentVersion
*/
@Schema(
description = "The current version of the issue content to detect conflicts during editing")
public Long getContentVersion() {
return contentVersion;
}
public void setContentVersion(Long contentVersion) {
this.contentVersion = contentVersion;
}
public EditIssueOption dueDate(Date dueDate) {
this.dueDate = dueDate;
return this;
@@ -243,6 +266,7 @@ public class EditIssueOption implements Serializable {
return Objects.equals(this.assignee, editIssueOption.assignee)
&& Objects.equals(this.assignees, editIssueOption.assignees)
&& Objects.equals(this.body, editIssueOption.body)
&& Objects.equals(this.contentVersion, editIssueOption.contentVersion)
&& Objects.equals(this.dueDate, editIssueOption.dueDate)
&& Objects.equals(this.milestone, editIssueOption.milestone)
&& Objects.equals(this.ref, editIssueOption.ref)
@@ -254,7 +278,16 @@ public class EditIssueOption implements Serializable {
@Override
public int hashCode() {
return Objects.hash(
assignee, assignees, body, dueDate, milestone, ref, state, title, unsetDueDate);
assignee,
assignees,
body,
contentVersion,
dueDate,
milestone,
ref,
state,
title,
unsetDueDate);
}
@Override
@@ -265,6 +298,7 @@ public class EditIssueOption implements Serializable {
sb.append(" assignee: ").append(toIndentedString(assignee)).append("\n");
sb.append(" assignees: ").append(toIndentedString(assignees)).append("\n");
sb.append(" body: ").append(toIndentedString(body)).append("\n");
sb.append(" contentVersion: ").append(toIndentedString(contentVersion)).append("\n");
sb.append(" dueDate: ").append(toIndentedString(dueDate)).append("\n");
sb.append(" milestone: ").append(toIndentedString(milestone)).append("\n");
sb.append(" ref: ").append(toIndentedString(ref)).append("\n");
@@ -12,8 +12,13 @@
package org.gitnex.tea4j.v2.models;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;
@@ -29,8 +34,53 @@ public class EditMilestoneOption implements Serializable {
@SerializedName("due_on")
private Date dueOn = null;
/** State indicates the updated state of the milestone */
@JsonAdapter(StateEnum.Adapter.class)
public enum StateEnum {
OPEN("open"),
CLOSED("closed");
private String value;
StateEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static StateEnum fromValue(String input) {
for (StateEnum b : StateEnum.values()) {
if (b.value.equals(input)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter<StateEnum> {
@Override
public void write(final JsonWriter jsonWriter, final StateEnum enumeration)
throws IOException {
jsonWriter.value(String.valueOf(enumeration.getValue()));
}
@Override
public StateEnum read(final JsonReader jsonReader) throws IOException {
Object value = jsonReader.nextString();
return StateEnum.fromValue((String) (value));
}
}
}
@SerializedName("state")
private String state = null;
private StateEnum state = null;
@SerializedName("title")
private String title = null;
@@ -73,7 +123,7 @@ public class EditMilestoneOption implements Serializable {
this.dueOn = dueOn;
}
public EditMilestoneOption state(String state) {
public EditMilestoneOption state(StateEnum state) {
this.state = state;
return this;
}
@@ -84,11 +134,11 @@ public class EditMilestoneOption implements Serializable {
* @return state
*/
@Schema(description = "State indicates the updated state of the milestone")
public String getState() {
public StateEnum getState() {
return state;
}
public void setState(String state) {
public void setState(StateEnum state) {
this.state = state;
}
@@ -40,6 +40,9 @@ public class EditPullRequestOption implements Serializable {
@SerializedName("body")
private String body = null;
@SerializedName("content_version")
private Long contentVersion = null;
@SerializedName("due_date")
private Date dueDate = null;
@@ -161,6 +164,27 @@ public class EditPullRequestOption implements Serializable {
this.body = body;
}
public EditPullRequestOption contentVersion(Long contentVersion) {
this.contentVersion = contentVersion;
return this;
}
/**
* The current version of the pull request content to detect conflicts during editing
*
* @return contentVersion
*/
@Schema(
description =
"The current version of the pull request content to detect conflicts during editing")
public Long getContentVersion() {
return contentVersion;
}
public void setContentVersion(Long contentVersion) {
this.contentVersion = contentVersion;
}
public EditPullRequestOption dueDate(Date dueDate) {
this.dueDate = dueDate;
return this;
@@ -297,6 +321,7 @@ public class EditPullRequestOption implements Serializable {
&& Objects.equals(this.assignees, editPullRequestOption.assignees)
&& Objects.equals(this.base, editPullRequestOption.base)
&& Objects.equals(this.body, editPullRequestOption.body)
&& Objects.equals(this.contentVersion, editPullRequestOption.contentVersion)
&& Objects.equals(this.dueDate, editPullRequestOption.dueDate)
&& Objects.equals(this.labels, editPullRequestOption.labels)
&& Objects.equals(this.milestone, editPullRequestOption.milestone)
@@ -313,6 +338,7 @@ public class EditPullRequestOption implements Serializable {
assignees,
base,
body,
contentVersion,
dueDate,
labels,
milestone,
@@ -333,6 +359,7 @@ public class EditPullRequestOption implements Serializable {
sb.append(" assignees: ").append(toIndentedString(assignees)).append("\n");
sb.append(" base: ").append(toIndentedString(base)).append("\n");
sb.append(" body: ").append(toIndentedString(body)).append("\n");
sb.append(" contentVersion: ").append(toIndentedString(contentVersion)).append("\n");
sb.append(" dueDate: ").append(toIndentedString(dueDate)).append("\n");
sb.append(" labels: ").append(toIndentedString(labels)).append("\n");
sb.append(" milestone: ").append(toIndentedString(milestone)).append("\n");
@@ -12,8 +12,13 @@
package org.gitnex.tea4j.v2.models;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
@@ -43,6 +48,9 @@ public class Issue implements Serializable {
@SerializedName("comments")
private Long comments = null;
@SerializedName("content_version")
private Long contentVersion = null;
@SerializedName("created_at")
private Date createdAt = null;
@@ -85,8 +93,53 @@ public class Issue implements Serializable {
@SerializedName("repository")
private RepositoryMeta repository = null;
/** Gets or Sets state */
@JsonAdapter(StateEnum.Adapter.class)
public enum StateEnum {
OPEN("open"),
CLOSED("closed");
private String value;
StateEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static StateEnum fromValue(String input) {
for (StateEnum b : StateEnum.values()) {
if (b.value.equals(input)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter<StateEnum> {
@Override
public void write(final JsonWriter jsonWriter, final StateEnum enumeration)
throws IOException {
jsonWriter.value(String.valueOf(enumeration.getValue()));
}
@Override
public StateEnum read(final JsonReader jsonReader) throws IOException {
Object value = jsonReader.nextString();
return StateEnum.fromValue((String) (value));
}
}
}
@SerializedName("state")
private String state = null;
private StateEnum state = null;
@SerializedName("time_estimate")
private Long timeEstimate = null;
@@ -233,6 +286,25 @@ public class Issue implements Serializable {
this.comments = comments;
}
public Issue contentVersion(Long contentVersion) {
this.contentVersion = contentVersion;
return this;
}
/**
* The version of the issue content for optimistic locking
*
* @return contentVersion
*/
@Schema(description = "The version of the issue content for optimistic locking")
public Long getContentVersion() {
return contentVersion;
}
public void setContentVersion(Long contentVersion) {
this.contentVersion = contentVersion;
}
public Issue createdAt(Date createdAt) {
this.createdAt = createdAt;
return this;
@@ -507,7 +579,7 @@ public class Issue implements Serializable {
this.repository = repository;
}
public Issue state(String state) {
public Issue state(StateEnum state) {
this.state = state;
return this;
}
@@ -518,11 +590,11 @@ public class Issue implements Serializable {
* @return state
*/
@Schema(description = "")
public String getState() {
public StateEnum getState() {
return state;
}
public void setState(String state) {
public void setState(StateEnum state) {
this.state = state;
}
@@ -636,6 +708,7 @@ public class Issue implements Serializable {
&& Objects.equals(this.body, issue.body)
&& Objects.equals(this.closedAt, issue.closedAt)
&& Objects.equals(this.comments, issue.comments)
&& Objects.equals(this.contentVersion, issue.contentVersion)
&& Objects.equals(this.createdAt, issue.createdAt)
&& Objects.equals(this.dueDate, issue.dueDate)
&& Objects.equals(this.htmlUrl, issue.htmlUrl)
@@ -667,6 +740,7 @@ public class Issue implements Serializable {
body,
closedAt,
comments,
contentVersion,
createdAt,
dueDate,
htmlUrl,
@@ -700,6 +774,7 @@ public class Issue implements Serializable {
sb.append(" body: ").append(toIndentedString(body)).append("\n");
sb.append(" closedAt: ").append(toIndentedString(closedAt)).append("\n");
sb.append(" comments: ").append(toIndentedString(comments)).append("\n");
sb.append(" contentVersion: ").append(toIndentedString(contentVersion)).append("\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" dueDate: ").append(toIndentedString(dueDate)).append("\n");
sb.append(" htmlUrl: ").append(toIndentedString(htmlUrl)).append("\n");
@@ -12,8 +12,13 @@
package org.gitnex.tea4j.v2.models;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
@@ -32,14 +37,107 @@ public class IssueFormField implements Serializable {
@SerializedName("id")
private String id = null;
/** Gets or Sets type */
@JsonAdapter(TypeEnum.Adapter.class)
public enum TypeEnum {
MARKDOWN("markdown"),
TEXTAREA("textarea"),
INPUT("input"),
DROPDOWN("dropdown"),
CHECKBOXES("checkboxes");
private String value;
TypeEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static TypeEnum fromValue(String input) {
for (TypeEnum b : TypeEnum.values()) {
if (b.value.equals(input)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter<TypeEnum> {
@Override
public void write(final JsonWriter jsonWriter, final TypeEnum enumeration)
throws IOException {
jsonWriter.value(String.valueOf(enumeration.getValue()));
}
@Override
public TypeEnum read(final JsonReader jsonReader) throws IOException {
Object value = jsonReader.nextString();
return TypeEnum.fromValue((String) (value));
}
}
}
@SerializedName("type")
private String type = null;
private TypeEnum type = null;
@SerializedName("validations")
private Map<String, Object> validations = null;
/** Gets or Sets visible */
@JsonAdapter(VisibleEnum.Adapter.class)
public enum VisibleEnum {
FORM("form"),
CONTENT("content");
private String value;
VisibleEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static VisibleEnum fromValue(String input) {
for (VisibleEnum b : VisibleEnum.values()) {
if (b.value.equals(input)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter<VisibleEnum> {
@Override
public void write(final JsonWriter jsonWriter, final VisibleEnum enumeration)
throws IOException {
jsonWriter.value(String.valueOf(enumeration.getValue()));
}
@Override
public VisibleEnum read(final JsonReader jsonReader) throws IOException {
Object value = jsonReader.nextString();
return VisibleEnum.fromValue((String) (value));
}
}
}
@SerializedName("visible")
private List<String> visible = null;
private List<VisibleEnum> visible = null;
public IssueFormField attributes(Map<String, Object> attributes) {
this.attributes = attributes;
@@ -87,7 +185,7 @@ public class IssueFormField implements Serializable {
this.id = id;
}
public IssueFormField type(String type) {
public IssueFormField type(TypeEnum type) {
this.type = type;
return this;
}
@@ -98,11 +196,11 @@ public class IssueFormField implements Serializable {
* @return type
*/
@Schema(description = "")
public String getType() {
public TypeEnum getType() {
return type;
}
public void setType(String type) {
public void setType(TypeEnum type) {
this.type = type;
}
@@ -133,12 +231,12 @@ public class IssueFormField implements Serializable {
this.validations = validations;
}
public IssueFormField visible(List<String> visible) {
public IssueFormField visible(List<VisibleEnum> visible) {
this.visible = visible;
return this;
}
public IssueFormField addVisibleItem(String visibleItem) {
public IssueFormField addVisibleItem(VisibleEnum visibleItem) {
if (this.visible == null) {
this.visible = new ArrayList<>();
}
@@ -152,11 +250,11 @@ public class IssueFormField implements Serializable {
* @return visible
*/
@Schema(description = "")
public List<String> getVisible() {
public List<VisibleEnum> getVisible() {
return visible;
}
public void setVisible(List<String> visible) {
public void setVisible(List<VisibleEnum> visible) {
this.visible = visible;
}
@@ -12,8 +12,13 @@
package org.gitnex.tea4j.v2.models;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;
@@ -44,8 +49,56 @@ public class Milestone implements Serializable {
@SerializedName("open_issues")
private Long openIssues = null;
/**
* State indicates if the milestone is open or closed open StateOpen StateOpen pr is opened closed
* StateClosed StateClosed pr is closed
*/
@JsonAdapter(StateEnum.Adapter.class)
public enum StateEnum {
OPEN("open"),
CLOSED("closed");
private String value;
StateEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static StateEnum fromValue(String input) {
for (StateEnum b : StateEnum.values()) {
if (b.value.equals(input)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter<StateEnum> {
@Override
public void write(final JsonWriter jsonWriter, final StateEnum enumeration)
throws IOException {
jsonWriter.value(String.valueOf(enumeration.getValue()));
}
@Override
public StateEnum read(final JsonReader jsonReader) throws IOException {
Object value = jsonReader.nextString();
return StateEnum.fromValue((String) (value));
}
}
}
@SerializedName("state")
private String state = null;
private StateEnum state = null;
@SerializedName("title")
private String title = null;
@@ -186,22 +239,26 @@ public class Milestone implements Serializable {
this.openIssues = openIssues;
}
public Milestone state(String state) {
public Milestone state(StateEnum state) {
this.state = state;
return this;
}
/**
* Get state
* State indicates if the milestone is open or closed open StateOpen StateOpen pr is opened closed
* StateClosed StateClosed pr is closed
*
* @return state
*/
@Schema(description = "")
public String getState() {
@Schema(
description =
"State indicates if the milestone is open or closed open StateOpen StateOpen pr is"
+ " opened closed StateClosed StateClosed pr is closed")
public StateEnum getState() {
return state;
}
public void setState(String state) {
public void setState(StateEnum state) {
this.state = state;
}
@@ -12,8 +12,13 @@
package org.gitnex.tea4j.v2.models;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
import java.io.Serializable;
import java.util.Objects;
@@ -31,14 +36,118 @@ public class NotificationSubject implements Serializable {
@SerializedName("latest_comment_url")
private String latestCommentUrl = null;
/**
* State indicates the current state of the notification subject open NotifySubjectStateOpen
* NotifySubjectStateOpen is an open subject closed NotifySubjectStateClosed
* NotifySubjectStateClosed is a closed subject merged NotifySubjectStateMerged
* NotifySubjectStateMerged is a merged pull request
*/
@JsonAdapter(StateEnum.Adapter.class)
public enum StateEnum {
OPEN("open"),
CLOSED("closed"),
MERGED("merged");
private String value;
StateEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static StateEnum fromValue(String input) {
for (StateEnum b : StateEnum.values()) {
if (b.value.equals(input)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter<StateEnum> {
@Override
public void write(final JsonWriter jsonWriter, final StateEnum enumeration)
throws IOException {
jsonWriter.value(String.valueOf(enumeration.getValue()));
}
@Override
public StateEnum read(final JsonReader jsonReader) throws IOException {
Object value = jsonReader.nextString();
return StateEnum.fromValue((String) (value));
}
}
}
@SerializedName("state")
private String state = null;
private StateEnum state = null;
@SerializedName("title")
private String title = null;
/**
* Type indicates the type of the notification subject Issue NotifySubjectIssue NotifySubjectIssue
* an issue is subject of an notification Pull NotifySubjectPull NotifySubjectPull an pull is
* subject of an notification Commit NotifySubjectCommit NotifySubjectCommit an commit is subject
* of an notification Repository NotifySubjectRepository NotifySubjectRepository an repository is
* subject of an notification
*/
@JsonAdapter(TypeEnum.Adapter.class)
public enum TypeEnum {
ISSUE("Issue"),
PULL("Pull"),
COMMIT("Commit"),
REPOSITORY("Repository");
private String value;
TypeEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static TypeEnum fromValue(String input) {
for (TypeEnum b : TypeEnum.values()) {
if (b.value.equals(input)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter<TypeEnum> {
@Override
public void write(final JsonWriter jsonWriter, final TypeEnum enumeration)
throws IOException {
jsonWriter.value(String.valueOf(enumeration.getValue()));
}
@Override
public TypeEnum read(final JsonReader jsonReader) throws IOException {
Object value = jsonReader.nextString();
return TypeEnum.fromValue((String) (value));
}
}
}
@SerializedName("type")
private String type = null;
private TypeEnum type = null;
@SerializedName("url")
private String url = null;
@@ -100,22 +209,30 @@ public class NotificationSubject implements Serializable {
this.latestCommentUrl = latestCommentUrl;
}
public NotificationSubject state(String state) {
public NotificationSubject state(StateEnum state) {
this.state = state;
return this;
}
/**
* Get state
* State indicates the current state of the notification subject open NotifySubjectStateOpen
* NotifySubjectStateOpen is an open subject closed NotifySubjectStateClosed
* NotifySubjectStateClosed is a closed subject merged NotifySubjectStateMerged
* NotifySubjectStateMerged is a merged pull request
*
* @return state
*/
@Schema(description = "")
public String getState() {
@Schema(
description =
"State indicates the current state of the notification subject open"
+ " NotifySubjectStateOpen NotifySubjectStateOpen is an open subject closed"
+ " NotifySubjectStateClosed NotifySubjectStateClosed is a closed subject merged"
+ " NotifySubjectStateMerged NotifySubjectStateMerged is a merged pull request")
public StateEnum getState() {
return state;
}
public void setState(String state) {
public void setState(StateEnum state) {
this.state = state;
}
@@ -138,22 +255,33 @@ public class NotificationSubject implements Serializable {
this.title = title;
}
public NotificationSubject type(String type) {
public NotificationSubject type(TypeEnum type) {
this.type = type;
return this;
}
/**
* Get type
* Type indicates the type of the notification subject Issue NotifySubjectIssue NotifySubjectIssue
* an issue is subject of an notification Pull NotifySubjectPull NotifySubjectPull an pull is
* subject of an notification Commit NotifySubjectCommit NotifySubjectCommit an commit is subject
* of an notification Repository NotifySubjectRepository NotifySubjectRepository an repository is
* subject of an notification
*
* @return type
*/
@Schema(description = "")
public String getType() {
@Schema(
description =
"Type indicates the type of the notification subject Issue NotifySubjectIssue "
+ " NotifySubjectIssue an issue is subject of an notification Pull NotifySubjectPull "
+ " NotifySubjectPull an pull is subject of an notification Commit"
+ " NotifySubjectCommit NotifySubjectCommit an commit is subject of an notification"
+ " Repository NotifySubjectRepository NotifySubjectRepository an repository is"
+ " subject of an notification")
public TypeEnum getType() {
return type;
}
public void setType(String type) {
public void setType(TypeEnum type) {
this.type = type;
}
@@ -12,8 +12,13 @@
package org.gitnex.tea4j.v2.models;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
@@ -52,6 +57,9 @@ public class PullRequest implements Serializable {
@SerializedName("comments")
private Long comments = null;
@SerializedName("content_version")
private Long contentVersion = null;
@SerializedName("created_at")
private Date createdAt = null;
@@ -121,8 +129,56 @@ public class PullRequest implements Serializable {
@SerializedName("review_comments")
private Long reviewComments = null;
/**
* The current state of the pull request open StateOpen StateOpen pr is opened closed StateClosed
* StateClosed pr is closed
*/
@JsonAdapter(StateEnum.Adapter.class)
public enum StateEnum {
OPEN("open"),
CLOSED("closed");
private String value;
StateEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static StateEnum fromValue(String input) {
for (StateEnum b : StateEnum.values()) {
if (b.value.equals(input)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter<StateEnum> {
@Override
public void write(final JsonWriter jsonWriter, final StateEnum enumeration)
throws IOException {
jsonWriter.value(String.valueOf(enumeration.getValue()));
}
@Override
public StateEnum read(final JsonReader jsonReader) throws IOException {
Object value = jsonReader.nextString();
return StateEnum.fromValue((String) (value));
}
}
}
@SerializedName("state")
private String state = null;
private StateEnum state = null;
@SerializedName("title")
private String title = null;
@@ -315,6 +371,25 @@ public class PullRequest implements Serializable {
this.comments = comments;
}
public PullRequest contentVersion(Long contentVersion) {
this.contentVersion = contentVersion;
return this;
}
/**
* The version of the pull request content for optimistic locking
*
* @return contentVersion
*/
@Schema(description = "The version of the pull request content for optimistic locking")
public Long getContentVersion() {
return contentVersion;
}
public void setContentVersion(Long contentVersion) {
this.contentVersion = contentVersion;
}
public PullRequest createdAt(Date createdAt) {
this.createdAt = createdAt;
return this;
@@ -780,22 +855,26 @@ public class PullRequest implements Serializable {
this.reviewComments = reviewComments;
}
public PullRequest state(String state) {
public PullRequest state(StateEnum state) {
this.state = state;
return this;
}
/**
* Get state
* The current state of the pull request open StateOpen StateOpen pr is opened closed StateClosed
* StateClosed pr is closed
*
* @return state
*/
@Schema(description = "")
public String getState() {
@Schema(
description =
"The current state of the pull request open StateOpen StateOpen pr is opened closed"
+ " StateClosed StateClosed pr is closed")
public StateEnum getState() {
return state;
}
public void setState(String state) {
public void setState(StateEnum state) {
this.state = state;
}
@@ -893,6 +972,7 @@ public class PullRequest implements Serializable {
&& Objects.equals(this.changedFiles, pullRequest.changedFiles)
&& Objects.equals(this.closedAt, pullRequest.closedAt)
&& Objects.equals(this.comments, pullRequest.comments)
&& Objects.equals(this.contentVersion, pullRequest.contentVersion)
&& Objects.equals(this.createdAt, pullRequest.createdAt)
&& Objects.equals(this.deletions, pullRequest.deletions)
&& Objects.equals(this.diffUrl, pullRequest.diffUrl)
@@ -935,6 +1015,7 @@ public class PullRequest implements Serializable {
changedFiles,
closedAt,
comments,
contentVersion,
createdAt,
deletions,
diffUrl,
@@ -981,6 +1062,7 @@ public class PullRequest implements Serializable {
sb.append(" changedFiles: ").append(toIndentedString(changedFiles)).append("\n");
sb.append(" closedAt: ").append(toIndentedString(closedAt)).append("\n");
sb.append(" comments: ").append(toIndentedString(comments)).append("\n");
sb.append(" contentVersion: ").append(toIndentedString(contentVersion)).append("\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" deletions: ").append(toIndentedString(deletions)).append("\n");
sb.append(" diffUrl: ").append(toIndentedString(diffUrl)).append("\n");
@@ -12,8 +12,13 @@
package org.gitnex.tea4j.v2.models;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;
@@ -50,8 +55,56 @@ public class PullReview implements Serializable {
@SerializedName("stale")
private Boolean stale = null;
/** Gets or Sets state */
@JsonAdapter(StateEnum.Adapter.class)
public enum StateEnum {
APPROVED("APPROVED"),
PENDING("PENDING"),
COMMENT("COMMENT"),
REQUEST_CHANGES("REQUEST_CHANGES"),
REQUEST_REVIEW("REQUEST_REVIEW");
private String value;
StateEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static StateEnum fromValue(String input) {
for (StateEnum b : StateEnum.values()) {
if (b.value.equals(input)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter<StateEnum> {
@Override
public void write(final JsonWriter jsonWriter, final StateEnum enumeration)
throws IOException {
jsonWriter.value(String.valueOf(enumeration.getValue()));
}
@Override
public StateEnum read(final JsonReader jsonReader) throws IOException {
Object value = jsonReader.nextString();
return StateEnum.fromValue((String) (value));
}
}
}
@SerializedName("state")
private String state = null;
private StateEnum state = null;
@SerializedName("submitted_at")
private Date submittedAt = null;
@@ -236,7 +289,7 @@ public class PullReview implements Serializable {
this.stale = stale;
}
public PullReview state(String state) {
public PullReview state(StateEnum state) {
this.state = state;
return this;
}
@@ -247,11 +300,11 @@ public class PullReview implements Serializable {
* @return state
*/
@Schema(description = "")
public String getState() {
public StateEnum getState() {
return state;
}
public void setState(String state) {
public void setState(StateEnum state) {
this.state = state;
}
@@ -12,8 +12,13 @@
package org.gitnex.tea4j.v2.models;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
import java.io.Serializable;
import java.util.Objects;
@@ -25,8 +30,56 @@ public class SubmitPullReviewOptions implements Serializable {
@SerializedName("body")
private String body = null;
/** Gets or Sets event */
@JsonAdapter(EventEnum.Adapter.class)
public enum EventEnum {
APPROVED("APPROVED"),
PENDING("PENDING"),
COMMENT("COMMENT"),
REQUEST_CHANGES("REQUEST_CHANGES"),
REQUEST_REVIEW("REQUEST_REVIEW");
private String value;
EventEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static EventEnum fromValue(String input) {
for (EventEnum b : EventEnum.values()) {
if (b.value.equals(input)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter<EventEnum> {
@Override
public void write(final JsonWriter jsonWriter, final EventEnum enumeration)
throws IOException {
jsonWriter.value(String.valueOf(enumeration.getValue()));
}
@Override
public EventEnum read(final JsonReader jsonReader) throws IOException {
Object value = jsonReader.nextString();
return EventEnum.fromValue((String) (value));
}
}
}
@SerializedName("event")
private String event = null;
private EventEnum event = null;
public SubmitPullReviewOptions body(String body) {
this.body = body;
@@ -47,7 +100,7 @@ public class SubmitPullReviewOptions implements Serializable {
this.body = body;
}
public SubmitPullReviewOptions event(String event) {
public SubmitPullReviewOptions event(EventEnum event) {
this.event = event;
return this;
}
@@ -58,11 +111,11 @@ public class SubmitPullReviewOptions implements Serializable {
* @return event
*/
@Schema(description = "")
public String getEvent() {
public EventEnum getEvent() {
return event;
}
public void setEvent(String event) {
public void setEvent(EventEnum event) {
this.event = event;
}