mirror of
https://codeberg.org/gitnex/tea4j-autodeploy
synced 2026-06-17 23:20:39 +00:00
Synchronizing API and documentation updates
This commit is contained in:
@@ -28,7 +28,10 @@ import java.util.Objects;
|
||||
"AddCollaboratorOption options when adding a user as a collaborator of a repository")
|
||||
public class AddCollaboratorOption implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/** Gets or Sets permission */
|
||||
/**
|
||||
* Permission level to grant the collaborator read RepoWritePermissionRead write
|
||||
* RepoWritePermissionWrite admin RepoWritePermissionAdmin
|
||||
*/
|
||||
@JsonAdapter(PermissionEnum.Adapter.class)
|
||||
public enum PermissionEnum {
|
||||
READ("read"),
|
||||
@@ -83,11 +86,15 @@ public class AddCollaboratorOption implements Serializable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get permission
|
||||
* Permission level to grant the collaborator read RepoWritePermissionRead write
|
||||
* RepoWritePermissionWrite admin RepoWritePermissionAdmin
|
||||
*
|
||||
* @return permission
|
||||
*/
|
||||
@Schema(description = "")
|
||||
@Schema(
|
||||
description =
|
||||
"Permission level to grant the collaborator read RepoWritePermissionRead write"
|
||||
+ " RepoWritePermissionWrite admin RepoWritePermissionAdmin")
|
||||
public PermissionEnum getPermission() {
|
||||
return permission;
|
||||
}
|
||||
|
||||
@@ -46,6 +46,9 @@ public class CreateIssueOption implements Serializable {
|
||||
@SerializedName("milestone")
|
||||
private Long milestone = null;
|
||||
|
||||
@SerializedName("projects")
|
||||
private List<Long> projects = null;
|
||||
|
||||
@SerializedName("ref")
|
||||
private String ref = null;
|
||||
|
||||
@@ -201,6 +204,33 @@ public class CreateIssueOption implements Serializable {
|
||||
this.milestone = milestone;
|
||||
}
|
||||
|
||||
public CreateIssueOption projects(List<Long> projects) {
|
||||
this.projects = projects;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreateIssueOption addProjectsItem(Long projectsItem) {
|
||||
if (this.projects == null) {
|
||||
this.projects = new ArrayList<>();
|
||||
}
|
||||
this.projects.add(projectsItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* list of project ids
|
||||
*
|
||||
* @return projects
|
||||
*/
|
||||
@Schema(description = "list of project ids")
|
||||
public List<Long> getProjects() {
|
||||
return projects;
|
||||
}
|
||||
|
||||
public void setProjects(List<Long> projects) {
|
||||
this.projects = projects;
|
||||
}
|
||||
|
||||
public CreateIssueOption ref(String ref) {
|
||||
this.ref = ref;
|
||||
return this;
|
||||
@@ -255,13 +285,15 @@ public class CreateIssueOption implements Serializable {
|
||||
&& Objects.equals(this.dueDate, createIssueOption.dueDate)
|
||||
&& Objects.equals(this.labels, createIssueOption.labels)
|
||||
&& Objects.equals(this.milestone, createIssueOption.milestone)
|
||||
&& Objects.equals(this.projects, createIssueOption.projects)
|
||||
&& Objects.equals(this.ref, createIssueOption.ref)
|
||||
&& Objects.equals(this.title, createIssueOption.title);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(assignee, assignees, body, closed, dueDate, labels, milestone, ref, title);
|
||||
return Objects.hash(
|
||||
assignee, assignees, body, closed, dueDate, labels, milestone, projects, ref, title);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -276,6 +308,7 @@ public class CreateIssueOption implements Serializable {
|
||||
sb.append(" dueDate: ").append(toIndentedString(dueDate)).append("\n");
|
||||
sb.append(" labels: ").append(toIndentedString(labels)).append("\n");
|
||||
sb.append(" milestone: ").append(toIndentedString(milestone)).append("\n");
|
||||
sb.append(" projects: ").append(toIndentedString(projects)).append("\n");
|
||||
sb.append(" ref: ").append(toIndentedString(ref)).append("\n");
|
||||
sb.append(" title: ").append(toIndentedString(title)).append("\n");
|
||||
sb.append("}");
|
||||
|
||||
@@ -47,6 +47,7 @@ public class CreateOrgOption implements Serializable {
|
||||
|
||||
/**
|
||||
* possible values are `public` (default), `limited` or `private`
|
||||
* public UserVisibilityPublic limited UserVisibilityLimited private UserVisibilityPrivate
|
||||
*/
|
||||
@JsonAdapter(VisibilityEnum.Adapter.class)
|
||||
public enum VisibilityEnum {
|
||||
@@ -220,10 +221,14 @@ public class CreateOrgOption implements Serializable {
|
||||
|
||||
/**
|
||||
* possible values are `public` (default), `limited` or `private`
|
||||
* public UserVisibilityPublic limited UserVisibilityLimited private UserVisibilityPrivate
|
||||
*
|
||||
* @return visibility
|
||||
*/
|
||||
@Schema(description = "possible values are `public` (default), `limited` or `private`")
|
||||
@Schema(
|
||||
description =
|
||||
"possible values are `public` (default), `limited` or `private` public"
|
||||
+ " UserVisibilityPublic limited UserVisibilityLimited private UserVisibilityPrivate")
|
||||
public VisibilityEnum getVisibility() {
|
||||
return visibility;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,10 @@ public class CreateRepoOption implements Serializable {
|
||||
@SerializedName("name")
|
||||
private String name = null;
|
||||
|
||||
/** ObjectFormatName of the underlying git repository, empty string for default (sha1) */
|
||||
/**
|
||||
* ObjectFormatName of the underlying git repository, empty string for default (sha1) sha1
|
||||
* ObjectFormatSHA1 sha256 ObjectFormatSHA256
|
||||
*/
|
||||
@JsonAdapter(ObjectFormatNameEnum.Adapter.class)
|
||||
public enum ObjectFormatNameEnum {
|
||||
SHA1("sha1"),
|
||||
@@ -294,13 +297,15 @@ public class CreateRepoOption implements Serializable {
|
||||
}
|
||||
|
||||
/**
|
||||
* ObjectFormatName of the underlying git repository, empty string for default (sha1)
|
||||
* ObjectFormatName of the underlying git repository, empty string for default (sha1) sha1
|
||||
* ObjectFormatSHA1 sha256 ObjectFormatSHA256
|
||||
*
|
||||
* @return objectFormatName
|
||||
*/
|
||||
@Schema(
|
||||
description =
|
||||
"ObjectFormatName of the underlying git repository, empty string for default (sha1)")
|
||||
"ObjectFormatName of the underlying git repository, empty string for default (sha1) sha1"
|
||||
+ " ObjectFormatSHA1 sha256 ObjectFormatSHA256")
|
||||
public ObjectFormatNameEnum getObjectFormatName() {
|
||||
return objectFormatName;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
@@ -53,8 +58,57 @@ public class CreateUserOption implements Serializable {
|
||||
@SerializedName("username")
|
||||
private String username = null;
|
||||
|
||||
/**
|
||||
* User visibility level: public, limited, or private public UserVisibilityPublic limited
|
||||
* UserVisibilityLimited private UserVisibilityPrivate
|
||||
*/
|
||||
@JsonAdapter(VisibilityEnum.Adapter.class)
|
||||
public enum VisibilityEnum {
|
||||
PUBLIC("public"),
|
||||
LIMITED("limited"),
|
||||
PRIVATE("private");
|
||||
|
||||
private String value;
|
||||
|
||||
VisibilityEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
public static VisibilityEnum fromValue(String input) {
|
||||
for (VisibilityEnum b : VisibilityEnum.values()) {
|
||||
if (b.value.equals(input)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<VisibilityEnum> {
|
||||
@Override
|
||||
public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration)
|
||||
throws IOException {
|
||||
jsonWriter.value(String.valueOf(enumeration.getValue()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public VisibilityEnum read(final JsonReader jsonReader) throws IOException {
|
||||
Object value = jsonReader.nextString();
|
||||
return VisibilityEnum.fromValue((String) (value));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SerializedName("visibility")
|
||||
private String visibility = null;
|
||||
private VisibilityEnum visibility = null;
|
||||
|
||||
public CreateUserOption createdAt(Date createdAt) {
|
||||
this.createdAt = createdAt;
|
||||
@@ -253,22 +307,26 @@ public class CreateUserOption implements Serializable {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public CreateUserOption visibility(String visibility) {
|
||||
public CreateUserOption visibility(VisibilityEnum visibility) {
|
||||
this.visibility = visibility;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* User visibility level: public, limited, or private
|
||||
* User visibility level: public, limited, or private public UserVisibilityPublic limited
|
||||
* UserVisibilityLimited private UserVisibilityPrivate
|
||||
*
|
||||
* @return visibility
|
||||
*/
|
||||
@Schema(description = "User visibility level: public, limited, or private")
|
||||
public String getVisibility() {
|
||||
@Schema(
|
||||
description =
|
||||
"User visibility level: public, limited, or private public UserVisibilityPublic limited"
|
||||
+ " UserVisibilityLimited private UserVisibilityPrivate")
|
||||
public VisibilityEnum getVisibility() {
|
||||
return visibility;
|
||||
}
|
||||
|
||||
public void setVisibility(String visibility) {
|
||||
public void setVisibility(VisibilityEnum visibility) {
|
||||
this.visibility = visibility;
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,9 @@ public class EditIssueOption implements Serializable {
|
||||
@SerializedName("milestone")
|
||||
private Long milestone = null;
|
||||
|
||||
@SerializedName("projects")
|
||||
private List<Long> projects = null;
|
||||
|
||||
@SerializedName("ref")
|
||||
private String ref = null;
|
||||
|
||||
@@ -178,6 +181,33 @@ public class EditIssueOption implements Serializable {
|
||||
this.milestone = milestone;
|
||||
}
|
||||
|
||||
public EditIssueOption projects(List<Long> projects) {
|
||||
this.projects = projects;
|
||||
return this;
|
||||
}
|
||||
|
||||
public EditIssueOption addProjectsItem(Long projectsItem) {
|
||||
if (this.projects == null) {
|
||||
this.projects = new ArrayList<>();
|
||||
}
|
||||
this.projects.add(projectsItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* list of project ids to set (replaces existing projects)
|
||||
*
|
||||
* @return projects
|
||||
*/
|
||||
@Schema(description = "list of project ids to set (replaces existing projects)")
|
||||
public List<Long> getProjects() {
|
||||
return projects;
|
||||
}
|
||||
|
||||
public void setProjects(List<Long> projects) {
|
||||
this.projects = projects;
|
||||
}
|
||||
|
||||
public EditIssueOption ref(String ref) {
|
||||
this.ref = ref;
|
||||
return this;
|
||||
@@ -269,6 +299,7 @@ public class EditIssueOption implements Serializable {
|
||||
&& Objects.equals(this.contentVersion, editIssueOption.contentVersion)
|
||||
&& Objects.equals(this.dueDate, editIssueOption.dueDate)
|
||||
&& Objects.equals(this.milestone, editIssueOption.milestone)
|
||||
&& Objects.equals(this.projects, editIssueOption.projects)
|
||||
&& Objects.equals(this.ref, editIssueOption.ref)
|
||||
&& Objects.equals(this.state, editIssueOption.state)
|
||||
&& Objects.equals(this.title, editIssueOption.title)
|
||||
@@ -284,6 +315,7 @@ public class EditIssueOption implements Serializable {
|
||||
contentVersion,
|
||||
dueDate,
|
||||
milestone,
|
||||
projects,
|
||||
ref,
|
||||
state,
|
||||
title,
|
||||
@@ -301,6 +333,7 @@ public class EditIssueOption implements Serializable {
|
||||
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(" projects: ").append(toIndentedString(projects)).append("\n");
|
||||
sb.append(" ref: ").append(toIndentedString(ref)).append("\n");
|
||||
sb.append(" state: ").append(toIndentedString(state)).append("\n");
|
||||
sb.append(" title: ").append(toIndentedString(title)).append("\n");
|
||||
|
||||
@@ -42,7 +42,10 @@ public class EditOrgOption implements Serializable {
|
||||
@SerializedName("repo_admin_change_team_access")
|
||||
private Boolean repoAdminChangeTeamAccess = null;
|
||||
|
||||
/** possible values are `public`, `limited` or `private` */
|
||||
/**
|
||||
* possible values are `public`, `limited` or `private` public
|
||||
* UserVisibilityPublic limited UserVisibilityLimited private UserVisibilityPrivate
|
||||
*/
|
||||
@JsonAdapter(VisibilityEnum.Adapter.class)
|
||||
public enum VisibilityEnum {
|
||||
PUBLIC("public"),
|
||||
@@ -195,11 +198,15 @@ public class EditOrgOption implements Serializable {
|
||||
}
|
||||
|
||||
/**
|
||||
* possible values are `public`, `limited` or `private`
|
||||
* possible values are `public`, `limited` or `private` public
|
||||
* UserVisibilityPublic limited UserVisibilityLimited private UserVisibilityPrivate
|
||||
*
|
||||
* @return visibility
|
||||
*/
|
||||
@Schema(description = "possible values are `public`, `limited` or `private`")
|
||||
@Schema(
|
||||
description =
|
||||
"possible values are `public`, `limited` or `private` public UserVisibilityPublic limited"
|
||||
+ " UserVisibilityLimited private UserVisibilityPrivate")
|
||||
public VisibilityEnum getVisibility() {
|
||||
return visibility;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -70,8 +75,57 @@ public class EditUserOption implements Serializable {
|
||||
@SerializedName("source_id")
|
||||
private Long sourceId = null;
|
||||
|
||||
/**
|
||||
* User visibility level: public, limited, or private public UserVisibilityPublic limited
|
||||
* UserVisibilityLimited private UserVisibilityPrivate
|
||||
*/
|
||||
@JsonAdapter(VisibilityEnum.Adapter.class)
|
||||
public enum VisibilityEnum {
|
||||
PUBLIC("public"),
|
||||
LIMITED("limited"),
|
||||
PRIVATE("private");
|
||||
|
||||
private String value;
|
||||
|
||||
VisibilityEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
public static VisibilityEnum fromValue(String input) {
|
||||
for (VisibilityEnum b : VisibilityEnum.values()) {
|
||||
if (b.value.equals(input)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<VisibilityEnum> {
|
||||
@Override
|
||||
public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration)
|
||||
throws IOException {
|
||||
jsonWriter.value(String.valueOf(enumeration.getValue()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public VisibilityEnum read(final JsonReader jsonReader) throws IOException {
|
||||
Object value = jsonReader.nextString();
|
||||
return VisibilityEnum.fromValue((String) (value));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SerializedName("visibility")
|
||||
private String visibility = null;
|
||||
private VisibilityEnum visibility = null;
|
||||
|
||||
@SerializedName("website")
|
||||
private String website = null;
|
||||
@@ -383,22 +437,26 @@ public class EditUserOption implements Serializable {
|
||||
this.sourceId = sourceId;
|
||||
}
|
||||
|
||||
public EditUserOption visibility(String visibility) {
|
||||
public EditUserOption visibility(VisibilityEnum visibility) {
|
||||
this.visibility = visibility;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* User visibility level: public, limited, or private
|
||||
* User visibility level: public, limited, or private public UserVisibilityPublic limited
|
||||
* UserVisibilityLimited private UserVisibilityPrivate
|
||||
*
|
||||
* @return visibility
|
||||
*/
|
||||
@Schema(description = "User visibility level: public, limited, or private")
|
||||
public String getVisibility() {
|
||||
@Schema(
|
||||
description =
|
||||
"User visibility level: public, limited, or private public UserVisibilityPublic limited"
|
||||
+ " UserVisibilityLimited private UserVisibilityPrivate")
|
||||
public VisibilityEnum getVisibility() {
|
||||
return visibility;
|
||||
}
|
||||
|
||||
public void setVisibility(String visibility) {
|
||||
public void setVisibility(VisibilityEnum visibility) {
|
||||
this.visibility = visibility;
|
||||
}
|
||||
|
||||
|
||||
@@ -84,6 +84,9 @@ public class Issue implements Serializable {
|
||||
@SerializedName("pin_order")
|
||||
private Long pinOrder = null;
|
||||
|
||||
@SerializedName("projects")
|
||||
private List<Project> projects = null;
|
||||
|
||||
@SerializedName("pull_request")
|
||||
private PullRequestMeta pullRequest = null;
|
||||
|
||||
@@ -522,6 +525,33 @@ public class Issue implements Serializable {
|
||||
this.pinOrder = pinOrder;
|
||||
}
|
||||
|
||||
public Issue projects(List<Project> projects) {
|
||||
this.projects = projects;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Issue addProjectsItem(Project projectsItem) {
|
||||
if (this.projects == null) {
|
||||
this.projects = new ArrayList<>();
|
||||
}
|
||||
this.projects.add(projectsItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get projects
|
||||
*
|
||||
* @return projects
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public List<Project> getProjects() {
|
||||
return projects;
|
||||
}
|
||||
|
||||
public void setProjects(List<Project> projects) {
|
||||
this.projects = projects;
|
||||
}
|
||||
|
||||
public Issue pullRequest(PullRequestMeta pullRequest) {
|
||||
this.pullRequest = pullRequest;
|
||||
return this;
|
||||
@@ -720,6 +750,7 @@ public class Issue implements Serializable {
|
||||
&& Objects.equals(this.originalAuthor, issue.originalAuthor)
|
||||
&& Objects.equals(this.originalAuthorId, issue.originalAuthorId)
|
||||
&& Objects.equals(this.pinOrder, issue.pinOrder)
|
||||
&& Objects.equals(this.projects, issue.projects)
|
||||
&& Objects.equals(this.pullRequest, issue.pullRequest)
|
||||
&& Objects.equals(this.ref, issue.ref)
|
||||
&& Objects.equals(this.repository, issue.repository)
|
||||
@@ -752,6 +783,7 @@ public class Issue implements Serializable {
|
||||
originalAuthor,
|
||||
originalAuthorId,
|
||||
pinOrder,
|
||||
projects,
|
||||
pullRequest,
|
||||
ref,
|
||||
repository,
|
||||
@@ -786,6 +818,7 @@ public class Issue implements Serializable {
|
||||
sb.append(" originalAuthor: ").append(toIndentedString(originalAuthor)).append("\n");
|
||||
sb.append(" originalAuthorId: ").append(toIndentedString(originalAuthorId)).append("\n");
|
||||
sb.append(" pinOrder: ").append(toIndentedString(pinOrder)).append("\n");
|
||||
sb.append(" projects: ").append(toIndentedString(projects)).append("\n");
|
||||
sb.append(" pullRequest: ").append(toIndentedString(pullRequest)).append("\n");
|
||||
sb.append(" ref: ").append(toIndentedString(ref)).append("\n");
|
||||
sb.append(" repository: ").append(toIndentedString(repository)).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.Objects;
|
||||
|
||||
@@ -49,8 +54,57 @@ public class Organization implements Serializable {
|
||||
@SerializedName("username")
|
||||
private String username = null;
|
||||
|
||||
/**
|
||||
* The visibility level of the organization (public, limited, private) public UserVisibilityPublic
|
||||
* limited UserVisibilityLimited private UserVisibilityPrivate
|
||||
*/
|
||||
@JsonAdapter(VisibilityEnum.Adapter.class)
|
||||
public enum VisibilityEnum {
|
||||
PUBLIC("public"),
|
||||
LIMITED("limited"),
|
||||
PRIVATE("private");
|
||||
|
||||
private String value;
|
||||
|
||||
VisibilityEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
public static VisibilityEnum fromValue(String input) {
|
||||
for (VisibilityEnum b : VisibilityEnum.values()) {
|
||||
if (b.value.equals(input)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<VisibilityEnum> {
|
||||
@Override
|
||||
public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration)
|
||||
throws IOException {
|
||||
jsonWriter.value(String.valueOf(enumeration.getValue()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public VisibilityEnum read(final JsonReader jsonReader) throws IOException {
|
||||
Object value = jsonReader.nextString();
|
||||
return VisibilityEnum.fromValue((String) (value));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SerializedName("visibility")
|
||||
private String visibility = null;
|
||||
private VisibilityEnum visibility = null;
|
||||
|
||||
@SerializedName("website")
|
||||
private String website = null;
|
||||
@@ -226,22 +280,26 @@ public class Organization implements Serializable {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public Organization visibility(String visibility) {
|
||||
public Organization visibility(VisibilityEnum visibility) {
|
||||
this.visibility = visibility;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The visibility level of the organization (public, limited, private)
|
||||
* The visibility level of the organization (public, limited, private) public UserVisibilityPublic
|
||||
* limited UserVisibilityLimited private UserVisibilityPrivate
|
||||
*
|
||||
* @return visibility
|
||||
*/
|
||||
@Schema(description = "The visibility level of the organization (public, limited, private)")
|
||||
public String getVisibility() {
|
||||
@Schema(
|
||||
description =
|
||||
"The visibility level of the organization (public, limited, private) public"
|
||||
+ " UserVisibilityPublic limited UserVisibilityLimited private UserVisibilityPrivate")
|
||||
public VisibilityEnum getVisibility() {
|
||||
return visibility;
|
||||
}
|
||||
|
||||
public void setVisibility(String visibility) {
|
||||
public void setVisibility(VisibilityEnum visibility) {
|
||||
this.visibility = visibility;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,311 @@
|
||||
/*
|
||||
* 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.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
/** Project represents a project */
|
||||
@Schema(description = "Project represents a project")
|
||||
public class Project implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@SerializedName("closed_at")
|
||||
private Date closedAt = null;
|
||||
|
||||
@SerializedName("created_at")
|
||||
private Date createdAt = null;
|
||||
|
||||
@SerializedName("creator_id")
|
||||
private Long creatorId = null;
|
||||
|
||||
@SerializedName("description")
|
||||
private String description = null;
|
||||
|
||||
@SerializedName("id")
|
||||
private Long id = null;
|
||||
|
||||
@SerializedName("is_closed")
|
||||
private Boolean isClosed = null;
|
||||
|
||||
@SerializedName("owner_id")
|
||||
private Long ownerId = null;
|
||||
|
||||
@SerializedName("repo_id")
|
||||
private Long repoId = null;
|
||||
|
||||
@SerializedName("title")
|
||||
private String title = null;
|
||||
|
||||
@SerializedName("updated_at")
|
||||
private Date updatedAt = null;
|
||||
|
||||
public Project closedAt(Date closedAt) {
|
||||
this.closedAt = closedAt;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get closedAt
|
||||
*
|
||||
* @return closedAt
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public Date getClosedAt() {
|
||||
return closedAt;
|
||||
}
|
||||
|
||||
public void setClosedAt(Date closedAt) {
|
||||
this.closedAt = closedAt;
|
||||
}
|
||||
|
||||
public Project createdAt(Date createdAt) {
|
||||
this.createdAt = createdAt;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get createdAt
|
||||
*
|
||||
* @return createdAt
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public Date getCreatedAt() {
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
public void setCreatedAt(Date createdAt) {
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Project creatorId(Long creatorId) {
|
||||
this.creatorId = creatorId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* CreatorID is the user who created the project
|
||||
*
|
||||
* @return creatorId
|
||||
*/
|
||||
@Schema(description = "CreatorID is the user who created the project")
|
||||
public Long getCreatorId() {
|
||||
return creatorId;
|
||||
}
|
||||
|
||||
public void setCreatorId(Long creatorId) {
|
||||
this.creatorId = creatorId;
|
||||
}
|
||||
|
||||
public Project description(String description) {
|
||||
this.description = description;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Description provides details about the project
|
||||
*
|
||||
* @return description
|
||||
*/
|
||||
@Schema(description = "Description provides details about the project")
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public Project id(Long id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* ID is the unique identifier for the project
|
||||
*
|
||||
* @return id
|
||||
*/
|
||||
@Schema(description = "ID is the unique identifier for the project")
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Project isClosed(Boolean isClosed) {
|
||||
this.isClosed = isClosed;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* IsClosed indicates if the project is closed
|
||||
*
|
||||
* @return isClosed
|
||||
*/
|
||||
@Schema(description = "IsClosed indicates if the project is closed")
|
||||
public Boolean isIsClosed() {
|
||||
return isClosed;
|
||||
}
|
||||
|
||||
public void setIsClosed(Boolean isClosed) {
|
||||
this.isClosed = isClosed;
|
||||
}
|
||||
|
||||
public Project ownerId(Long ownerId) {
|
||||
this.ownerId = ownerId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* OwnerID is the owner of the project (for org-level projects)
|
||||
*
|
||||
* @return ownerId
|
||||
*/
|
||||
@Schema(description = "OwnerID is the owner of the project (for org-level projects)")
|
||||
public Long getOwnerId() {
|
||||
return ownerId;
|
||||
}
|
||||
|
||||
public void setOwnerId(Long ownerId) {
|
||||
this.ownerId = ownerId;
|
||||
}
|
||||
|
||||
public Project repoId(Long repoId) {
|
||||
this.repoId = repoId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* RepoID is the repository this project belongs to (for repo-level projects)
|
||||
*
|
||||
* @return repoId
|
||||
*/
|
||||
@Schema(
|
||||
description = "RepoID is the repository this project belongs to (for repo-level projects)")
|
||||
public Long getRepoId() {
|
||||
return repoId;
|
||||
}
|
||||
|
||||
public void setRepoId(Long repoId) {
|
||||
this.repoId = repoId;
|
||||
}
|
||||
|
||||
public Project title(String title) {
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Title is the title of the project
|
||||
*
|
||||
* @return title
|
||||
*/
|
||||
@Schema(description = "Title is the title of the project")
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public Project updatedAt(Date updatedAt) {
|
||||
this.updatedAt = updatedAt;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get updatedAt
|
||||
*
|
||||
* @return updatedAt
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public Date getUpdatedAt() {
|
||||
return updatedAt;
|
||||
}
|
||||
|
||||
public void setUpdatedAt(Date updatedAt) {
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
Project project = (Project) o;
|
||||
return Objects.equals(this.closedAt, project.closedAt)
|
||||
&& Objects.equals(this.createdAt, project.createdAt)
|
||||
&& Objects.equals(this.creatorId, project.creatorId)
|
||||
&& Objects.equals(this.description, project.description)
|
||||
&& Objects.equals(this.id, project.id)
|
||||
&& Objects.equals(this.isClosed, project.isClosed)
|
||||
&& Objects.equals(this.ownerId, project.ownerId)
|
||||
&& Objects.equals(this.repoId, project.repoId)
|
||||
&& Objects.equals(this.title, project.title)
|
||||
&& Objects.equals(this.updatedAt, project.updatedAt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
closedAt,
|
||||
createdAt,
|
||||
creatorId,
|
||||
description,
|
||||
id,
|
||||
isClosed,
|
||||
ownerId,
|
||||
repoId,
|
||||
title,
|
||||
updatedAt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Project {\n");
|
||||
|
||||
sb.append(" closedAt: ").append(toIndentedString(closedAt)).append("\n");
|
||||
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
|
||||
sb.append(" creatorId: ").append(toIndentedString(creatorId)).append("\n");
|
||||
sb.append(" description: ").append(toIndentedString(description)).append("\n");
|
||||
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||
sb.append(" isClosed: ").append(toIndentedString(isClosed)).append("\n");
|
||||
sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n");
|
||||
sb.append(" repoId: ").append(toIndentedString(repoId)).append("\n");
|
||||
sb.append(" title: ").append(toIndentedString(title)).append("\n");
|
||||
sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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 ");
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
@@ -21,9 +26,59 @@ import java.util.Objects;
|
||||
@Schema(description = "RepoCollaboratorPermission to get repository permission for a collaborator")
|
||||
public class RepoCollaboratorPermission implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* Permission level of the collaborator none AccessLevelNameNone read AccessLevelNameRead write
|
||||
* AccessLevelNameWrite admin AccessLevelNameAdmin owner AccessLevelNameOwner
|
||||
*/
|
||||
@JsonAdapter(PermissionEnum.Adapter.class)
|
||||
public enum PermissionEnum {
|
||||
NONE("none"),
|
||||
READ("read"),
|
||||
WRITE("write"),
|
||||
ADMIN("admin"),
|
||||
OWNER("owner");
|
||||
|
||||
private String value;
|
||||
|
||||
PermissionEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
public static PermissionEnum fromValue(String input) {
|
||||
for (PermissionEnum b : PermissionEnum.values()) {
|
||||
if (b.value.equals(input)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<PermissionEnum> {
|
||||
@Override
|
||||
public void write(final JsonWriter jsonWriter, final PermissionEnum enumeration)
|
||||
throws IOException {
|
||||
jsonWriter.value(String.valueOf(enumeration.getValue()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public PermissionEnum read(final JsonReader jsonReader) throws IOException {
|
||||
Object value = jsonReader.nextString();
|
||||
return PermissionEnum.fromValue((String) (value));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SerializedName("permission")
|
||||
private String permission = null;
|
||||
private PermissionEnum permission = null;
|
||||
|
||||
@SerializedName("role_name")
|
||||
private String roleName = null;
|
||||
@@ -31,22 +86,26 @@ public class RepoCollaboratorPermission implements Serializable {
|
||||
@SerializedName("user")
|
||||
private User user = null;
|
||||
|
||||
public RepoCollaboratorPermission permission(String permission) {
|
||||
public RepoCollaboratorPermission permission(PermissionEnum permission) {
|
||||
this.permission = permission;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Permission level of the collaborator
|
||||
* Permission level of the collaborator none AccessLevelNameNone read AccessLevelNameRead write
|
||||
* AccessLevelNameWrite admin AccessLevelNameAdmin owner AccessLevelNameOwner
|
||||
*
|
||||
* @return permission
|
||||
*/
|
||||
@Schema(description = "Permission level of the collaborator")
|
||||
public String getPermission() {
|
||||
@Schema(
|
||||
description =
|
||||
"Permission level of the collaborator none AccessLevelNameNone read AccessLevelNameRead"
|
||||
+ " write AccessLevelNameWrite admin AccessLevelNameAdmin owner AccessLevelNameOwner")
|
||||
public PermissionEnum getPermission() {
|
||||
return permission;
|
||||
}
|
||||
|
||||
public void setPermission(String permission) {
|
||||
public void setPermission(PermissionEnum permission) {
|
||||
this.permission = permission;
|
||||
}
|
||||
|
||||
|
||||
@@ -171,7 +171,10 @@ public class Repository implements Serializable {
|
||||
@SerializedName("name")
|
||||
private String name = null;
|
||||
|
||||
/** ObjectFormatName of the underlying git repository */
|
||||
/**
|
||||
* ObjectFormatName of the underlying git repository sha1 ObjectFormatSHA1 sha256
|
||||
* ObjectFormatSHA256
|
||||
*/
|
||||
@JsonAdapter(ObjectFormatNameEnum.Adapter.class)
|
||||
public enum ObjectFormatNameEnum {
|
||||
SHA1("sha1"),
|
||||
@@ -1183,11 +1186,15 @@ public class Repository implements Serializable {
|
||||
}
|
||||
|
||||
/**
|
||||
* ObjectFormatName of the underlying git repository
|
||||
* ObjectFormatName of the underlying git repository sha1 ObjectFormatSHA1 sha256
|
||||
* ObjectFormatSHA256
|
||||
*
|
||||
* @return objectFormatName
|
||||
*/
|
||||
@Schema(description = "ObjectFormatName of the underlying git repository")
|
||||
@Schema(
|
||||
description =
|
||||
"ObjectFormatName of the underlying git repository sha1 ObjectFormatSHA1 sha256"
|
||||
+ " ObjectFormatSHA256")
|
||||
public ObjectFormatNameEnum getObjectFormatName() {
|
||||
return objectFormatName;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
@@ -83,8 +88,57 @@ public class User implements Serializable {
|
||||
@SerializedName("starred_repos_count")
|
||||
private Long starredReposCount = null;
|
||||
|
||||
/**
|
||||
* User visibility level option: public, limited, private public UserVisibilityPublic limited
|
||||
* UserVisibilityLimited private UserVisibilityPrivate
|
||||
*/
|
||||
@JsonAdapter(VisibilityEnum.Adapter.class)
|
||||
public enum VisibilityEnum {
|
||||
PUBLIC("public"),
|
||||
LIMITED("limited"),
|
||||
PRIVATE("private");
|
||||
|
||||
private String value;
|
||||
|
||||
VisibilityEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
public static VisibilityEnum fromValue(String input) {
|
||||
for (VisibilityEnum b : VisibilityEnum.values()) {
|
||||
if (b.value.equals(input)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<VisibilityEnum> {
|
||||
@Override
|
||||
public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration)
|
||||
throws IOException {
|
||||
jsonWriter.value(String.valueOf(enumeration.getValue()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public VisibilityEnum read(final JsonReader jsonReader) throws IOException {
|
||||
Object value = jsonReader.nextString();
|
||||
return VisibilityEnum.fromValue((String) (value));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SerializedName("visibility")
|
||||
private String visibility = null;
|
||||
private VisibilityEnum visibility = null;
|
||||
|
||||
@SerializedName("website")
|
||||
private String website = null;
|
||||
@@ -471,22 +525,26 @@ public class User implements Serializable {
|
||||
this.starredReposCount = starredReposCount;
|
||||
}
|
||||
|
||||
public User visibility(String visibility) {
|
||||
public User visibility(VisibilityEnum visibility) {
|
||||
this.visibility = visibility;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* User visibility level option: public, limited, private
|
||||
* User visibility level option: public, limited, private public UserVisibilityPublic limited
|
||||
* UserVisibilityLimited private UserVisibilityPrivate
|
||||
*
|
||||
* @return visibility
|
||||
*/
|
||||
@Schema(description = "User visibility level option: public, limited, private")
|
||||
public String getVisibility() {
|
||||
@Schema(
|
||||
description =
|
||||
"User visibility level option: public, limited, private public UserVisibilityPublic"
|
||||
+ " limited UserVisibilityLimited private UserVisibilityPrivate")
|
||||
public VisibilityEnum getVisibility() {
|
||||
return visibility;
|
||||
}
|
||||
|
||||
public void setVisibility(String visibility) {
|
||||
public void setVisibility(VisibilityEnum visibility) {
|
||||
this.visibility = visibility;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user