Synchronizing API and documentation updates

This commit is contained in:
gitnexbot
2022-03-26 20:48:12 +00:00
parent 564c3d75cf
commit e9167871fb
334 changed files with 69062 additions and 0 deletions
@@ -0,0 +1,386 @@
package org.gitnex.tea4j.v2;
import com.google.gson.Gson;
import com.google.gson.JsonParseException;
import java.io.IOException;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.text.DateFormat;
import java.util.LinkedHashMap;
import java.util.Map;
import okhttp3.Interceptor;
import okhttp3.OkHttpClient;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder;
import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder;
import org.gitnex.tea4j.v2.auth.ApiKeyAuth;
import org.gitnex.tea4j.v2.auth.HttpBasicAuth;
import org.gitnex.tea4j.v2.auth.OAuth;
import org.gitnex.tea4j.v2.auth.OAuth.AccessTokenListener;
import retrofit2.Converter;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
import retrofit2.converter.scalars.ScalarsConverterFactory;
public class ApiClient {
private Map<String, Interceptor> apiAuthorizations;
private OkHttpClient.Builder okBuilder;
private Retrofit.Builder adapterBuilder;
private JSON json;
public ApiClient() {
apiAuthorizations = new LinkedHashMap<String, Interceptor>();
createDefaultAdapter();
}
public ApiClient(String[] authNames) {
this();
for (String authName : authNames) {
Interceptor auth = null;
if ("AccessToken".equals(authName)) {
auth = new ApiKeyAuth("query", "access_token");
} else if ("AuthorizationHeaderToken".equals(authName)) {
auth = new ApiKeyAuth("header", "Authorization");
} else if ("BasicAuth".equals(authName)) {
auth = new HttpBasicAuth();
} else if ("SudoHeader".equals(authName)) {
auth = new ApiKeyAuth("header", "Sudo");
} else if ("SudoParam".equals(authName)) {
auth = new ApiKeyAuth("query", "sudo");
} else if ("TOTPHeader".equals(authName)) {
auth = new ApiKeyAuth("header", "X-GITEA-OTP");
} else if ("Token".equals(authName)) {
auth = new ApiKeyAuth("query", "token");
} else {
throw new RuntimeException(
"auth name \"" + authName + "\" not found in available auth names");
}
addAuthorization(authName, auth);
}
}
/**
* Basic constructor for single auth name
*
* @param authName Authentication name
*/
public ApiClient(String authName) {
this(new String[] {authName});
}
/**
* Helper constructor for single api key
*
* @param authName Authentication name
* @param apiKey API key
*/
public ApiClient(String authName, String apiKey) {
this(authName);
this.setApiKey(apiKey);
}
/**
* Helper constructor for single basic auth or password oauth2
*
* @param authName Authentication name
* @param username Username
* @param password Password
*/
public ApiClient(String authName, String username, String password) {
this(authName);
this.setCredentials(username, password);
}
/**
* Helper constructor for single password oauth2
*
* @param authName Authentication name
* @param clientId Client ID
* @param secret Client Secret
* @param username Username
* @param password Password
*/
public ApiClient(
String authName, String clientId, String secret, String username, String password) {
this(authName);
this.getTokenEndPoint()
.setClientId(clientId)
.setClientSecret(secret)
.setUsername(username)
.setPassword(password);
}
public void createDefaultAdapter() {
json = new JSON();
okBuilder = new OkHttpClient.Builder();
String baseUrl = "http://{{AppSubUrl | JSEscape | Safe}}/api/v1";
if (!baseUrl.endsWith("/")) baseUrl = baseUrl + "/";
adapterBuilder =
new Retrofit.Builder()
.baseUrl(baseUrl)
.addConverterFactory(ScalarsConverterFactory.create())
.addConverterFactory(GsonCustomConverterFactory.create(json.getGson()));
}
public <S> S createService(Class<S> serviceClass) {
return adapterBuilder.client(okBuilder.build()).build().create(serviceClass);
}
public ApiClient setDateFormat(DateFormat dateFormat) {
this.json.setDateFormat(dateFormat);
return this;
}
public ApiClient setSqlDateFormat(DateFormat dateFormat) {
this.json.setSqlDateFormat(dateFormat);
return this;
}
/**
* Helper method to configure the first api key found
*
* @param apiKey API key
* @return ApiClient
*/
public ApiClient setApiKey(String apiKey) {
for (Interceptor apiAuthorization : apiAuthorizations.values()) {
if (apiAuthorization instanceof ApiKeyAuth) {
ApiKeyAuth keyAuth = (ApiKeyAuth) apiAuthorization;
keyAuth.setApiKey(apiKey);
return this;
}
}
return this;
}
/**
* Helper method to configure the username/password for basic auth or password oauth
*
* @param username Username
* @param password Password
* @return ApiClient
*/
public ApiClient setCredentials(String username, String password) {
for (Interceptor apiAuthorization : apiAuthorizations.values()) {
if (apiAuthorization instanceof HttpBasicAuth) {
HttpBasicAuth basicAuth = (HttpBasicAuth) apiAuthorization;
basicAuth.setCredentials(username, password);
return this;
}
if (apiAuthorization instanceof OAuth) {
OAuth oauth = (OAuth) apiAuthorization;
oauth.getTokenRequestBuilder().setUsername(username).setPassword(password);
return this;
}
}
return this;
}
/**
* Helper method to configure the token endpoint of the first oauth found in the apiAuthorizations
* (there should be only one)
*
* @return Token request builder
*/
public TokenRequestBuilder getTokenEndPoint() {
for (Interceptor apiAuthorization : apiAuthorizations.values()) {
if (apiAuthorization instanceof OAuth) {
OAuth oauth = (OAuth) apiAuthorization;
return oauth.getTokenRequestBuilder();
}
}
return null;
}
/**
* Helper method to configure authorization endpoint of the first oauth found in the
* apiAuthorizations (there should be only one)
*
* @return Authentication request builder
*/
public AuthenticationRequestBuilder getAuthorizationEndPoint() {
for (Interceptor apiAuthorization : apiAuthorizations.values()) {
if (apiAuthorization instanceof OAuth) {
OAuth oauth = (OAuth) apiAuthorization;
return oauth.getAuthenticationRequestBuilder();
}
}
return null;
}
/**
* Helper method to pre-set the oauth access token of the first oauth found in the
* apiAuthorizations (there should be only one)
*
* @param accessToken Access token
* @return ApiClient
*/
public ApiClient setAccessToken(String accessToken) {
for (Interceptor apiAuthorization : apiAuthorizations.values()) {
if (apiAuthorization instanceof OAuth) {
OAuth oauth = (OAuth) apiAuthorization;
oauth.setAccessToken(accessToken);
return this;
}
}
return this;
}
/**
* Helper method to configure the oauth accessCode/implicit flow parameters
*
* @param clientId Client ID
* @param clientSecret Client secret
* @param redirectURI Redirect URI
* @return ApiClient
*/
public ApiClient configureAuthorizationFlow(
String clientId, String clientSecret, String redirectURI) {
for (Interceptor apiAuthorization : apiAuthorizations.values()) {
if (apiAuthorization instanceof OAuth) {
OAuth oauth = (OAuth) apiAuthorization;
oauth
.getTokenRequestBuilder()
.setClientId(clientId)
.setClientSecret(clientSecret)
.setRedirectURI(redirectURI);
oauth.getAuthenticationRequestBuilder().setClientId(clientId).setRedirectURI(redirectURI);
return this;
}
}
return this;
}
/**
* Configures a listener which is notified when a new access token is received.
*
* @param accessTokenListener Access token listener
* @return ApiClient
*/
public ApiClient registerAccessTokenListener(AccessTokenListener accessTokenListener) {
for (Interceptor apiAuthorization : apiAuthorizations.values()) {
if (apiAuthorization instanceof OAuth) {
OAuth oauth = (OAuth) apiAuthorization;
oauth.registerAccessTokenListener(accessTokenListener);
return this;
}
}
return this;
}
/**
* Adds an authorization to be used by the client
*
* @param authName Authentication name
* @param authorization Authorization interceptor
* @return ApiClient
*/
public ApiClient addAuthorization(String authName, Interceptor authorization) {
if (apiAuthorizations.containsKey(authName)) {
throw new RuntimeException("auth name \"" + authName + "\" already in api authorizations");
}
apiAuthorizations.put(authName, authorization);
okBuilder.addInterceptor(authorization);
return this;
}
public Map<String, Interceptor> getApiAuthorizations() {
return apiAuthorizations;
}
public ApiClient setApiAuthorizations(Map<String, Interceptor> apiAuthorizations) {
this.apiAuthorizations = apiAuthorizations;
return this;
}
public Retrofit.Builder getAdapterBuilder() {
return adapterBuilder;
}
public ApiClient setAdapterBuilder(Retrofit.Builder adapterBuilder) {
this.adapterBuilder = adapterBuilder;
return this;
}
public OkHttpClient.Builder getOkBuilder() {
return okBuilder;
}
public void addAuthsToOkBuilder(OkHttpClient.Builder okBuilder) {
for (Interceptor apiAuthorization : apiAuthorizations.values()) {
okBuilder.addInterceptor(apiAuthorization);
}
}
/**
* Clones the okBuilder given in parameter, adds the auth interceptors and uses it to configure
* the Retrofit
*
* @param okClient An instance of OK HTTP client
*/
public void configureFromOkclient(OkHttpClient okClient) {
this.okBuilder = okClient.newBuilder();
addAuthsToOkBuilder(this.okBuilder);
}
}
/**
* This wrapper is to take care of this case: when the deserialization fails due to
* JsonParseException and the expected type is String, then just return the body string.
*/
class GsonResponseBodyConverterToString<T> implements Converter<ResponseBody, T> {
private final Gson gson;
private final Type type;
GsonResponseBodyConverterToString(Gson gson, Type type) {
this.gson = gson;
this.type = type;
}
@Override
public T convert(ResponseBody value) throws IOException {
String returned = value.string();
try {
return gson.fromJson(returned, type);
} catch (JsonParseException e) {
return (T) returned;
}
}
}
class GsonCustomConverterFactory extends Converter.Factory {
private final Gson gson;
private final GsonConverterFactory gsonConverterFactory;
public static GsonCustomConverterFactory create(Gson gson) {
return new GsonCustomConverterFactory(gson);
}
private GsonCustomConverterFactory(Gson gson) {
if (gson == null) throw new NullPointerException("gson == null");
this.gson = gson;
this.gsonConverterFactory = GsonConverterFactory.create(gson);
}
@Override
public Converter<ResponseBody, ?> responseBodyConverter(
Type type, Annotation[] annotations, Retrofit retrofit) {
if (type.equals(String.class)) return new GsonResponseBodyConverterToString<Object>(gson, type);
else return gsonConverterFactory.responseBodyConverter(type, annotations, retrofit);
}
@Override
public Converter<?, RequestBody> requestBodyConverter(
Type type,
Annotation[] parameterAnnotations,
Annotation[] methodAnnotations,
Retrofit retrofit) {
return gsonConverterFactory.requestBodyConverter(
type, parameterAnnotations, methodAnnotations, retrofit);
}
}
@@ -0,0 +1,89 @@
package org.gitnex.tea4j.v2;
import java.util.Arrays;
import java.util.List;
public class CollectionFormats {
public static class CSVParams {
protected List<String> params;
public CSVParams() {}
public CSVParams(List<String> params) {
this.params = params;
}
public CSVParams(String... params) {
this.params = Arrays.asList(params);
}
public List<String> getParams() {
return params;
}
public void setParams(List<String> params) {
this.params = params;
}
@Override
public String toString() {
return StringUtil.join(params.toArray(new String[0]), ",");
}
}
public static class SSVParams extends CSVParams {
public SSVParams() {}
public SSVParams(List<String> params) {
super(params);
}
public SSVParams(String... params) {
super(params);
}
@Override
public String toString() {
return StringUtil.join(params.toArray(new String[0]), " ");
}
}
public static class TSVParams extends CSVParams {
public TSVParams() {}
public TSVParams(List<String> params) {
super(params);
}
public TSVParams(String... params) {
super(params);
}
@Override
public String toString() {
return StringUtil.join(params.toArray(new String[0]), "\t");
}
}
public static class PIPESParams extends CSVParams {
public PIPESParams() {}
public PIPESParams(List<String> params) {
super(params);
}
public PIPESParams(String... params) {
super(params);
}
@Override
public String toString() {
return StringUtil.join(params.toArray(new String[0]), "|");
}
}
}
+207
View File
@@ -0,0 +1,207 @@
/*
* 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;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonElement;
import com.google.gson.JsonParseException;
import com.google.gson.TypeAdapter;
import com.google.gson.internal.bind.util.ISO8601Utils;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.gsonfire.GsonFireBuilder;
import java.io.IOException;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.ParsePosition;
import java.util.Date;
import java.util.Map;
import org.gitnex.tea4j.v2.models.*;
public class JSON {
private Gson gson;
private DateTypeAdapter dateTypeAdapter = new DateTypeAdapter();
private SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter();
public static GsonBuilder createGson() {
GsonFireBuilder fireBuilder = new GsonFireBuilder();
return fireBuilder.createGsonBuilder();
}
private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) {
JsonElement element = readElement.getAsJsonObject().get(discriminatorField);
if (null == element) {
throw new IllegalArgumentException(
"missing discriminator field: <" + discriminatorField + ">");
}
return element.getAsString();
}
private static Class getClassByDiscriminator(
Map classByDiscriminatorValue, String discriminatorValue) {
Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue.toUpperCase());
if (null == clazz) {
throw new IllegalArgumentException(
"cannot determine model class of name: <" + discriminatorValue + ">");
}
return clazz;
}
public JSON() {
gson =
createGson()
.registerTypeAdapter(Date.class, dateTypeAdapter)
.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter)
.create();
}
/**
* Get Gson.
*
* @return Gson
*/
public Gson getGson() {
return gson;
}
/**
* Set Gson.
*
* @param gson Gson
* @return JSON
*/
public JSON setGson(Gson gson) {
this.gson = gson;
return this;
}
/**
* Gson TypeAdapter for java.sql.Date type If the dateFormat is null, a simple "yyyy-MM-dd" format
* will be used (more efficient than SimpleDateFormat).
*/
public static class SqlDateTypeAdapter extends TypeAdapter<java.sql.Date> {
private DateFormat dateFormat;
public SqlDateTypeAdapter() {}
public SqlDateTypeAdapter(DateFormat dateFormat) {
this.dateFormat = dateFormat;
}
public void setFormat(DateFormat dateFormat) {
this.dateFormat = dateFormat;
}
@Override
public void write(JsonWriter out, java.sql.Date date) throws IOException {
if (date == null) {
out.nullValue();
} else {
String value;
if (dateFormat != null) {
value = dateFormat.format(date);
} else {
value = date.toString();
}
out.value(value);
}
}
@Override
public java.sql.Date read(JsonReader in) throws IOException {
switch (in.peek()) {
case NULL:
in.nextNull();
return null;
default:
String date = in.nextString();
try {
if (dateFormat != null) {
return new java.sql.Date(dateFormat.parse(date).getTime());
}
return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime());
} catch (ParseException e) {
throw new JsonParseException(e);
}
}
}
}
/**
* Gson TypeAdapter for java.util.Date type If the dateFormat is null, ISO8601Utils will be used.
*/
public static class DateTypeAdapter extends TypeAdapter<Date> {
private DateFormat dateFormat;
public DateTypeAdapter() {}
public DateTypeAdapter(DateFormat dateFormat) {
this.dateFormat = dateFormat;
}
public void setFormat(DateFormat dateFormat) {
this.dateFormat = dateFormat;
}
@Override
public void write(JsonWriter out, Date date) throws IOException {
if (date == null) {
out.nullValue();
} else {
String value;
if (dateFormat != null) {
value = dateFormat.format(date);
} else {
value = ISO8601Utils.format(date, true);
}
out.value(value);
}
}
@Override
public Date read(JsonReader in) throws IOException {
try {
switch (in.peek()) {
case NULL:
in.nextNull();
return null;
default:
String date = in.nextString();
try {
if (dateFormat != null) {
return dateFormat.parse(date);
}
return ISO8601Utils.parse(date, new ParsePosition(0));
} catch (ParseException e) {
throw new JsonParseException(e);
}
}
} catch (IllegalArgumentException e) {
throw new JsonParseException(e);
}
}
}
public JSON setDateFormat(DateFormat dateFormat) {
dateTypeAdapter.setFormat(dateFormat);
return this;
}
public JSON setSqlDateFormat(DateFormat dateFormat) {
sqlDateTypeAdapter.setFormat(dateFormat);
return this;
}
}
@@ -0,0 +1,52 @@
/*
* 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;
public class StringUtil {
/**
* Check if the given array contains the given value (with case-insensitive comparison).
*
* @param array The array
* @param value The value to search
* @return true if the array contains the value
*/
public static boolean containsIgnoreCase(String[] array, String value) {
for (String str : array) {
if (value == null && str == null) return true;
if (value != null && value.equalsIgnoreCase(str)) return true;
}
return false;
}
/**
* Join an array of strings with the given separator.
*
* <p>Note: This might be replaced by utility method from commons-lang or guava someday if one of
* those libraries is added as dependency.
*
* @param array The array of strings
* @param separator The separator
* @return the resulting string
*/
public static String join(String[] array, String separator) {
int len = array.length;
if (len == 0) return "";
StringBuilder out = new StringBuilder();
out.append(array[0]);
for (int i = 1; i < len; i++) {
out.append(separator).append(array[i]);
}
return out.toString();
}
}
@@ -0,0 +1,174 @@
package org.gitnex.tea4j.v2.apis;
import java.util.List;
import org.gitnex.tea4j.v2.CollectionFormats.*;
import org.gitnex.tea4j.v2.models.CreateKeyOption;
import org.gitnex.tea4j.v2.models.CreateOrgOption;
import org.gitnex.tea4j.v2.models.CreateRepoOption;
import org.gitnex.tea4j.v2.models.CreateUserOption;
import org.gitnex.tea4j.v2.models.Cron;
import org.gitnex.tea4j.v2.models.EditUserOption;
import org.gitnex.tea4j.v2.models.Organization;
import org.gitnex.tea4j.v2.models.PublicKey;
import org.gitnex.tea4j.v2.models.Repository;
import org.gitnex.tea4j.v2.models.User;
import retrofit2.Call;
import retrofit2.http.*;
public interface AdminApi {
/**
* Adopt unadopted files as a repository
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @return Call&lt;Void&gt;
*/
@POST("admin/unadopted/{owner}/{repo}")
Call<Void> adminAdoptRepository(
@retrofit2.http.Path("owner") String owner, @retrofit2.http.Path("repo") String repo);
/**
* Create an organization
*
* @param body (required)
* @param username username of the user that will own the created organization (required)
* @return Call&lt;Organization&gt;
*/
@Headers({"Content-Type:application/json"})
@POST("admin/users/{username}/orgs")
Call<Organization> adminCreateOrg(
@retrofit2.http.Body CreateOrgOption body, @retrofit2.http.Path("username") String username);
/**
* Add a public key on behalf of a user
*
* @param username username of the user (required)
* @param body (optional)
* @return Call&lt;PublicKey&gt;
*/
@Headers({"Content-Type:application/json"})
@POST("admin/users/{username}/keys")
Call<PublicKey> adminCreatePublicKey(
@retrofit2.http.Path("username") String username, @retrofit2.http.Body CreateKeyOption body);
/**
* Create a repository on behalf of a user
*
* @param body (required)
* @param username username of the user. This user will own the created repository (required)
* @return Call&lt;Repository&gt;
*/
@Headers({"Content-Type:application/json"})
@POST("admin/users/{username}/repos")
Call<Repository> adminCreateRepo(
@retrofit2.http.Body CreateRepoOption body, @retrofit2.http.Path("username") String username);
/**
* Create a user
*
* @param body (optional)
* @return Call&lt;User&gt;
*/
@Headers({"Content-Type:application/json"})
@POST("admin/users")
Call<User> adminCreateUser(@retrofit2.http.Body CreateUserOption body);
/**
* List cron tasks
*
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;Cron&gt;&gt;
*/
@GET("admin/cron")
Call<List<Cron>> adminCronList(
@retrofit2.http.Query("page") Integer page, @retrofit2.http.Query("limit") Integer limit);
/**
* Run cron task
*
* @param task task to run (required)
* @return Call&lt;Void&gt;
*/
@POST("admin/cron/{task}")
Call<Void> adminCronRun(@retrofit2.http.Path("task") String task);
/**
* Delete unadopted files
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @return Call&lt;Void&gt;
*/
@DELETE("admin/unadopted/{owner}/{repo}")
Call<Void> adminDeleteUnadoptedRepository(
@retrofit2.http.Path("owner") String owner, @retrofit2.http.Path("repo") String repo);
/**
* Delete a user
*
* @param username username of user to delete (required)
* @return Call&lt;Void&gt;
*/
@DELETE("admin/users/{username}")
Call<Void> adminDeleteUser(@retrofit2.http.Path("username") String username);
/**
* Delete a user&#x27;s public key
*
* @param username username of user (required)
* @param id id of the key to delete (required)
* @return Call&lt;Void&gt;
*/
@DELETE("admin/users/{username}/keys/{id}")
Call<Void> adminDeleteUserPublicKey(
@retrofit2.http.Path("username") String username, @retrofit2.http.Path("id") Long id);
/**
* Edit an existing user
*
* @param username username of user to edit (required)
* @param body (optional)
* @return Call&lt;User&gt;
*/
@Headers({"Content-Type:application/json"})
@PATCH("admin/users/{username}")
Call<User> adminEditUser(
@retrofit2.http.Path("username") String username, @retrofit2.http.Body EditUserOption body);
/**
* List all organizations
*
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;Organization&gt;&gt;
*/
@GET("admin/orgs")
Call<List<Organization>> adminGetAllOrgs(
@retrofit2.http.Query("page") Integer page, @retrofit2.http.Query("limit") Integer limit);
/**
* List all users
*
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;User&gt;&gt;
*/
@GET("admin/users")
Call<List<User>> adminGetAllUsers(
@retrofit2.http.Query("page") Integer page, @retrofit2.http.Query("limit") Integer limit);
/**
* List unadopted repositories
*
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @param pattern pattern of repositories to search for (optional)
* @return Call&lt;List&lt;String&gt;&gt;
*/
@GET("admin/unadopted")
Call<List<String>> adminUnadoptedList(
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit,
@retrofit2.http.Query("pattern") String pattern);
}
@@ -0,0 +1,873 @@
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.AddTimeOption;
import org.gitnex.tea4j.v2.models.Comment;
import org.gitnex.tea4j.v2.models.CreateIssueCommentOption;
import org.gitnex.tea4j.v2.models.CreateIssueOption;
import org.gitnex.tea4j.v2.models.CreateLabelOption;
import org.gitnex.tea4j.v2.models.CreateMilestoneOption;
import org.gitnex.tea4j.v2.models.EditDeadlineOption;
import org.gitnex.tea4j.v2.models.EditIssueCommentOption;
import org.gitnex.tea4j.v2.models.EditIssueOption;
import org.gitnex.tea4j.v2.models.EditLabelOption;
import org.gitnex.tea4j.v2.models.EditMilestoneOption;
import org.gitnex.tea4j.v2.models.EditReactionOption;
import org.gitnex.tea4j.v2.models.Issue;
import org.gitnex.tea4j.v2.models.IssueDeadline;
import org.gitnex.tea4j.v2.models.IssueLabelsOption;
import org.gitnex.tea4j.v2.models.Label;
import org.gitnex.tea4j.v2.models.Milestone;
import org.gitnex.tea4j.v2.models.Reaction;
import org.gitnex.tea4j.v2.models.TimelineComment;
import org.gitnex.tea4j.v2.models.TrackedTime;
import org.gitnex.tea4j.v2.models.User;
import org.gitnex.tea4j.v2.models.WatchInfo;
import retrofit2.Call;
import retrofit2.http.*;
public interface IssueApi {
/**
* Add a label to an issue
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the issue (required)
* @param body (optional)
* @return Call&lt;List&lt;Label&gt;&gt;
*/
@Headers({"Content-Type:application/json"})
@POST("repos/{owner}/{repo}/issues/{index}/labels")
Call<List<Label>> issueAddLabel(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") Long index,
@retrofit2.http.Body IssueLabelsOption body);
/**
* Subscribe user to issue
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the issue (required)
* @param user user to subscribe (required)
* @return Call&lt;Void&gt;
*/
@PUT("repos/{owner}/{repo}/issues/{index}/subscriptions/{user}")
Call<Void> issueAddSubscription(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") Long index,
@retrofit2.http.Path("user") String user);
/**
* Add tracked time to a issue
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the issue (required)
* @param body (optional)
* @return Call&lt;TrackedTime&gt;
*/
@Headers({"Content-Type:application/json"})
@POST("repos/{owner}/{repo}/issues/{index}/times")
Call<TrackedTime> issueAddTime(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") Long index,
@retrofit2.http.Body AddTimeOption body);
/**
* Check if user is subscribed to an issue
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the issue (required)
* @return Call&lt;WatchInfo&gt;
*/
@GET("repos/{owner}/{repo}/issues/{index}/subscriptions/check")
Call<WatchInfo> issueCheckSubscription(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") Long index);
/**
* Remove all labels from an issue
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the issue (required)
* @return Call&lt;Void&gt;
*/
@DELETE("repos/{owner}/{repo}/issues/{index}/labels")
Call<Void> issueClearLabels(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") Long index);
/**
* Add a comment to an issue
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the issue (required)
* @param body (optional)
* @return Call&lt;Comment&gt;
*/
@Headers({"Content-Type:application/json"})
@POST("repos/{owner}/{repo}/issues/{index}/comments")
Call<Comment> issueCreateComment(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") Long index,
@retrofit2.http.Body CreateIssueCommentOption body);
/**
* Create an issue. If using deadline only the date will be taken into account, and time of day
* ignored.
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param body (optional)
* @return Call&lt;Issue&gt;
*/
@Headers({"Content-Type:application/json"})
@POST("repos/{owner}/{repo}/issues")
Call<Issue> issueCreateIssue(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Body CreateIssueOption body);
/**
* Create a label
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param body (optional)
* @return Call&lt;Label&gt;
*/
@Headers({"Content-Type:application/json"})
@POST("repos/{owner}/{repo}/labels")
Call<Label> issueCreateLabel(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Body CreateLabelOption body);
/**
* Create a milestone
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param body (optional)
* @return Call&lt;Milestone&gt;
*/
@Headers({"Content-Type:application/json"})
@POST("repos/{owner}/{repo}/milestones")
Call<Milestone> issueCreateMilestone(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Body CreateMilestoneOption body);
/**
* Delete an issue
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of issue to delete (required)
* @return Call&lt;Void&gt;
*/
@DELETE("repos/{owner}/{repo}/issues/{index}")
Call<Void> issueDelete(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") Long index);
/**
* Delete a comment
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param id id of comment to delete (required)
* @return Call&lt;Void&gt;
*/
@DELETE("repos/{owner}/{repo}/issues/comments/{id}")
Call<Void> issueDeleteComment(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("id") Long id);
/**
* Delete a comment
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index this parameter is ignored (required)
* @param id id of comment to delete (required)
* @return Call&lt;Void&gt;
*/
@DELETE("repos/{owner}/{repo}/issues/{index}/comments/{id}")
Call<Void> issueDeleteCommentDeprecated(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") Integer index,
@retrofit2.http.Path("id") Long id);
/**
* Remove a reaction from a comment of an issue
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param id id of the comment to edit (required)
* @param body (optional)
* @return Call&lt;Void&gt;
*/
@Headers({"Content-Type:application/json"})
@DELETE("repos/{owner}/{repo}/issues/comments/{id}/reactions")
Call<Void> issueDeleteCommentReaction(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("id") Long id,
@retrofit2.http.Body EditReactionOption body);
/**
* Remove a reaction from an issue
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the issue (required)
* @param body (optional)
* @return Call&lt;Void&gt;
*/
@Headers({"Content-Type:application/json"})
@DELETE("repos/{owner}/{repo}/issues/{index}/reactions")
Call<Void> issueDeleteIssueReaction(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") Long index,
@retrofit2.http.Body EditReactionOption body);
/**
* Delete a label
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param id id of the label to delete (required)
* @return Call&lt;Void&gt;
*/
@DELETE("repos/{owner}/{repo}/labels/{id}")
Call<Void> issueDeleteLabel(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("id") Long id);
/**
* Delete a milestone
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param id the milestone to delete, identified by ID and if not available by name (required)
* @return Call&lt;Void&gt;
*/
@DELETE("repos/{owner}/{repo}/milestones/{id}")
Call<Void> issueDeleteMilestone(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("id") String id);
/**
* Delete an issue&#x27;s existing stopwatch.
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the issue to stop the stopwatch on (required)
* @return Call&lt;Void&gt;
*/
@DELETE("repos/{owner}/{repo}/issues/{index}/stopwatch/delete")
Call<Void> issueDeleteStopWatch(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") Long index);
/**
* Unsubscribe user from issue
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the issue (required)
* @param user user witch unsubscribe (required)
* @return Call&lt;Void&gt;
*/
@DELETE("repos/{owner}/{repo}/issues/{index}/subscriptions/{user}")
Call<Void> issueDeleteSubscription(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") Long index,
@retrofit2.http.Path("user") String user);
/**
* Delete specific tracked time
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the issue (required)
* @param id id of time to delete (required)
* @return Call&lt;Void&gt;
*/
@DELETE("repos/{owner}/{repo}/issues/{index}/times/{id}")
Call<Void> issueDeleteTime(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") Long index,
@retrofit2.http.Path("id") Long id);
/**
* Edit a comment
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param id id of the comment to edit (required)
* @param body (optional)
* @return Call&lt;Comment&gt;
*/
@Headers({"Content-Type:application/json"})
@PATCH("repos/{owner}/{repo}/issues/comments/{id}")
Call<Comment> issueEditComment(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("id") Long id,
@retrofit2.http.Body EditIssueCommentOption body);
/**
* Edit a comment
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index this parameter is ignored (required)
* @param id id of the comment to edit (required)
* @param body (optional)
* @return Call&lt;Comment&gt;
*/
@Headers({"Content-Type:application/json"})
@PATCH("repos/{owner}/{repo}/issues/{index}/comments/{id}")
Call<Comment> issueEditCommentDeprecated(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") Integer index,
@retrofit2.http.Path("id") Long id,
@retrofit2.http.Body EditIssueCommentOption body);
/**
* Edit an issue. If using deadline only the date will be taken into account, and time of day
* ignored.
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the issue to edit (required)
* @param body (optional)
* @return Call&lt;Issue&gt;
*/
@Headers({"Content-Type:application/json"})
@PATCH("repos/{owner}/{repo}/issues/{index}")
Call<Issue> issueEditIssue(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") Long index,
@retrofit2.http.Body EditIssueOption body);
/**
* Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date
* will be taken into account, and time of day ignored.
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the issue to create or update a deadline on (required)
* @param body (optional)
* @return Call&lt;IssueDeadline&gt;
*/
@Headers({"Content-Type:application/json"})
@POST("repos/{owner}/{repo}/issues/{index}/deadline")
Call<IssueDeadline> issueEditIssueDeadline(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") Long index,
@retrofit2.http.Body EditDeadlineOption body);
/**
* Update a label
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param id id of the label to edit (required)
* @param body (optional)
* @return Call&lt;Label&gt;
*/
@Headers({"Content-Type:application/json"})
@PATCH("repos/{owner}/{repo}/labels/{id}")
Call<Label> issueEditLabel(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("id") Long id,
@retrofit2.http.Body EditLabelOption body);
/**
* Update a milestone
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param id the milestone to edit, identified by ID and if not available by name (required)
* @param body (optional)
* @return Call&lt;Milestone&gt;
*/
@Headers({"Content-Type:application/json"})
@PATCH("repos/{owner}/{repo}/milestones/{id}")
Call<Milestone> issueEditMilestone(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("id") String id,
@retrofit2.http.Body EditMilestoneOption body);
/**
* Get a comment
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param id id of the comment (required)
* @return Call&lt;Comment&gt;
*/
@GET("repos/{owner}/{repo}/issues/comments/{id}")
Call<Comment> issueGetComment(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("id") Long id);
/**
* Get a list of reactions from a comment of an issue
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param id id of the comment to edit (required)
* @return Call&lt;List&lt;Reaction&gt;&gt;
*/
@GET("repos/{owner}/{repo}/issues/comments/{id}/reactions")
Call<List<Reaction>> issueGetCommentReactions(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("id") Long id);
/**
* List all comments on an issue
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the issue (required)
* @param since if provided, only comments updated since the specified time are returned.
* (optional)
* @param before if provided, only comments updated before the provided time are returned.
* (optional)
* @return Call&lt;List&lt;Comment&gt;&gt;
*/
@GET("repos/{owner}/{repo}/issues/{index}/comments")
Call<List<Comment>> issueGetComments(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") Long index,
@retrofit2.http.Query("since") Date since,
@retrofit2.http.Query("before") Date before);
/**
* List all comments and events on an issue
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the issue (required)
* @param since if provided, only comments updated since the specified time are returned.
* (optional)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @param before if provided, only comments updated before the provided time are returned.
* (optional)
* @return Call&lt;List&lt;TimelineComment&gt;&gt;
*/
@GET("repos/{owner}/{repo}/issues/{index}/timeline")
Call<List<TimelineComment>> issueGetCommentsAndTimeline(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") Long index,
@retrofit2.http.Query("since") Date since,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit,
@retrofit2.http.Query("before") Date before);
/**
* Get an issue
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the issue to get (required)
* @return Call&lt;Issue&gt;
*/
@GET("repos/{owner}/{repo}/issues/{index}")
Call<Issue> issueGetIssue(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") Long index);
/**
* Get a list reactions of an issue
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the issue (required)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;Reaction&gt;&gt;
*/
@GET("repos/{owner}/{repo}/issues/{index}/reactions")
Call<List<Reaction>> issueGetIssueReactions(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") Long index,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* Get a single label
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param id id of the label to get (required)
* @return Call&lt;Label&gt;
*/
@GET("repos/{owner}/{repo}/labels/{id}")
Call<Label> issueGetLabel(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("id") Long id);
/**
* Get an issue&#x27;s labels
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the issue (required)
* @return Call&lt;List&lt;Label&gt;&gt;
*/
@GET("repos/{owner}/{repo}/issues/{index}/labels")
Call<List<Label>> issueGetLabels(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") Long index);
/**
* Get a milestone
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param id the milestone to get, identified by ID and if not available by name (required)
* @return Call&lt;Milestone&gt;
*/
@GET("repos/{owner}/{repo}/milestones/{id}")
Call<Milestone> issueGetMilestone(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("id") String id);
/**
* Get all of a repository&#x27;s opened milestones
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param state Milestone state, Recognised values are open, closed and all. Defaults to
* \&quot;open\&quot; (optional)
* @param name filter by milestone name (optional)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;Milestone&gt;&gt;
*/
@GET("repos/{owner}/{repo}/milestones")
Call<List<Milestone>> issueGetMilestonesList(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Query("state") String state,
@retrofit2.http.Query("name") String name,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List all comments in a repository
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param since if provided, only comments updated since the provided time are returned.
* (optional)
* @param before if provided, only comments updated before the provided time are returned.
* (optional)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;Comment&gt;&gt;
*/
@GET("repos/{owner}/{repo}/issues/comments")
Call<List<Comment>> issueGetRepoComments(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Query("since") Date since,
@retrofit2.http.Query("before") Date before,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List a repository&#x27;s issues
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param state whether issue is open or closed (optional)
* @param labels comma separated list of labels. Fetch only issues that have any of this labels.
* Non existent labels are discarded (optional)
* @param q search string (optional)
* @param type filter by type (issues / pulls) if set (optional)
* @param milestones comma separated list of milestone names or ids. It uses names and fall back
* to ids. Fetch only issues that have any of this milestones. Non existent milestones are
* discarded (optional)
* @param since Only show items updated after the given time. This is a timestamp in RFC 3339
* format (optional)
* @param before Only show items updated before the given time. This is a timestamp in RFC 3339
* format (optional)
* @param createdBy Only show items which were created by the the given user (optional)
* @param assignedBy Only show items for which the given user is assigned (optional)
* @param mentionedBy Only show items in which the given user was mentioned (optional)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;Issue&gt;&gt;
*/
@GET("repos/{owner}/{repo}/issues")
Call<List<Issue>> issueListIssues(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Query("state") String state,
@retrofit2.http.Query("labels") String labels,
@retrofit2.http.Query("q") String q,
@retrofit2.http.Query("type") String type,
@retrofit2.http.Query("milestones") String milestones,
@retrofit2.http.Query("since") Date since,
@retrofit2.http.Query("before") Date before,
@retrofit2.http.Query("created_by") String createdBy,
@retrofit2.http.Query("assigned_by") String assignedBy,
@retrofit2.http.Query("mentioned_by") String mentionedBy,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* Get all of a repository&#x27;s labels
*
* @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&lt;List&lt;Label&gt;&gt;
*/
@GET("repos/{owner}/{repo}/labels")
Call<List<Label>> issueListLabels(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* Add a reaction to a comment of an issue
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param id id of the comment to edit (required)
* @param body (optional)
* @return Call&lt;Reaction&gt;
*/
@Headers({"Content-Type:application/json"})
@POST("repos/{owner}/{repo}/issues/comments/{id}/reactions")
Call<Reaction> issuePostCommentReaction(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("id") Long id,
@retrofit2.http.Body EditReactionOption body);
/**
* Add a reaction to an issue
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the issue (required)
* @param body (optional)
* @return Call&lt;Reaction&gt;
*/
@Headers({"Content-Type:application/json"})
@POST("repos/{owner}/{repo}/issues/{index}/reactions")
Call<Reaction> issuePostIssueReaction(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") Long index,
@retrofit2.http.Body EditReactionOption body);
/**
* Remove a label from an issue
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the issue (required)
* @param id id of the label to remove (required)
* @return Call&lt;Void&gt;
*/
@DELETE("repos/{owner}/{repo}/issues/{index}/labels/{id}")
Call<Void> issueRemoveLabel(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") Long index,
@retrofit2.http.Path("id") Long id);
/**
* Replace an issue&#x27;s labels
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the issue (required)
* @param body (optional)
* @return Call&lt;List&lt;Label&gt;&gt;
*/
@Headers({"Content-Type:application/json"})
@PUT("repos/{owner}/{repo}/issues/{index}/labels")
Call<List<Label>> issueReplaceLabels(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") Long index,
@retrofit2.http.Body IssueLabelsOption body);
/**
* Reset a tracked time of an issue
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the issue to add tracked time to (required)
* @return Call&lt;Void&gt;
*/
@DELETE("repos/{owner}/{repo}/issues/{index}/times")
Call<Void> issueResetTime(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") Long index);
/**
* Search for issues across the repositories that the user has access to
*
* @param state whether issue is open or closed (optional)
* @param labels comma separated list of labels. Fetch only issues that have any of this labels.
* Non existent labels are discarded (optional)
* @param milestones comma separated list of milestone names. Fetch only issues that have any of
* this milestones. Non existent are discarded (optional)
* @param q search string (optional)
* @param priorityRepoId repository to prioritize in the results (optional)
* @param type filter by type (issues / pulls) if set (optional)
* @param since Only show notifications updated after the given time. This is a timestamp in RFC
* 3339 format (optional)
* @param before Only show notifications updated before the given time. This is a timestamp in RFC
* 3339 format (optional)
* @param assigned filter (issues / pulls) assigned to you, default is false (optional)
* @param created filter (issues / pulls) created by you, default is false (optional)
* @param mentioned filter (issues / pulls) mentioning you, default is false (optional)
* @param reviewRequested filter pulls requesting your review, default is false (optional)
* @param owner filter by owner (optional)
* @param team filter by team (requires organization owner parameter to be provided) (optional)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;Issue&gt;&gt;
*/
@GET("repos/issues/search")
Call<List<Issue>> issueSearchIssues(
@retrofit2.http.Query("state") String state,
@retrofit2.http.Query("labels") String labels,
@retrofit2.http.Query("milestones") String milestones,
@retrofit2.http.Query("q") String q,
@retrofit2.http.Query("priority_repo_id") Long priorityRepoId,
@retrofit2.http.Query("type") String type,
@retrofit2.http.Query("since") Date since,
@retrofit2.http.Query("before") Date before,
@retrofit2.http.Query("assigned") Boolean assigned,
@retrofit2.http.Query("created") Boolean created,
@retrofit2.http.Query("mentioned") Boolean mentioned,
@retrofit2.http.Query("review_requested") Boolean reviewRequested,
@retrofit2.http.Query("owner") String owner,
@retrofit2.http.Query("team") String team,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* Start stopwatch on an issue.
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the issue to create the stopwatch on (required)
* @return Call&lt;Void&gt;
*/
@POST("repos/{owner}/{repo}/issues/{index}/stopwatch/start")
Call<Void> issueStartStopWatch(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") Long index);
/**
* Stop an issue&#x27;s existing stopwatch.
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the issue to stop the stopwatch on (required)
* @return Call&lt;Void&gt;
*/
@POST("repos/{owner}/{repo}/issues/{index}/stopwatch/stop")
Call<Void> issueStopStopWatch(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") Long index);
/**
* Get users who subscribed on an issue.
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the issue (required)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;User&gt;&gt;
*/
@GET("repos/{owner}/{repo}/issues/{index}/subscriptions")
Call<List<User>> issueSubscriptions(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") Long index,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List an issue&#x27;s tracked times
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the issue (required)
* @param user optional filter by user (available for issue managers) (optional)
* @param since Only show times updated after the given time. This is a timestamp in RFC 3339
* format (optional)
* @param before Only show times updated before the given time. This is a timestamp in RFC 3339
* format (optional)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;TrackedTime&gt;&gt;
*/
@GET("repos/{owner}/{repo}/issues/{index}/times")
Call<List<TrackedTime>> issueTrackedTimes(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") Long index,
@retrofit2.http.Query("user") String user,
@retrofit2.http.Query("since") Date since,
@retrofit2.http.Query("before") Date before,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
}
@@ -0,0 +1,54 @@
package org.gitnex.tea4j.v2.apis;
import org.gitnex.tea4j.v2.CollectionFormats.*;
import org.gitnex.tea4j.v2.models.MarkdownOption;
import org.gitnex.tea4j.v2.models.NodeInfo;
import org.gitnex.tea4j.v2.models.ServerVersion;
import retrofit2.Call;
import retrofit2.http.*;
public interface MiscellaneousApi {
/**
* Returns the nodeinfo of the Gitea application
*
* @return Call&lt;NodeInfo&gt;
*/
@GET("nodeinfo")
Call<NodeInfo> getNodeInfo();
/**
* Get default signing-key.gpg
*
* @return Call&lt;String&gt;
*/
@GET("signing-key.gpg")
Call<String> getSigningKey();
/**
* Returns the version of the Gitea application
*
* @return Call&lt;ServerVersion&gt;
*/
@GET("version")
Call<ServerVersion> getVersion();
/**
* Render a markdown document as HTML
*
* @param body (optional)
* @return Call&lt;String&gt;
*/
@Headers({"Content-Type:application/json"})
@POST("markdown")
Call<String> renderMarkdown(@retrofit2.http.Body MarkdownOption body);
/**
* Render raw markdown as HTML
*
* @param body Request body to render (required)
* @return Call&lt;String&gt;
*/
@Headers({"Content-Type:text/plain"})
@POST("markdown/raw")
Call<String> renderMarkdownRaw(@retrofit2.http.Body String body);
}
@@ -0,0 +1,133 @@
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.NotificationCount;
import org.gitnex.tea4j.v2.models.NotificationThread;
import retrofit2.Call;
import retrofit2.http.*;
public interface NotificationApi {
/**
* List users&#x27;s notification threads
*
* @param all If true, show notifications marked as read. Default value is false (optional)
* @param statusTypes Show notifications with the provided status types. Options are: unread, read
* and/or pinned. Defaults to unread &amp; pinned. (optional)
* @param subjectType filter notifications by subject type (optional)
* @param since Only show notifications updated after the given time. This is a timestamp in RFC
* 3339 format (optional)
* @param before Only show notifications updated before the given time. This is a timestamp in RFC
* 3339 format (optional)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;NotificationThread&gt;&gt;
*/
@GET("notifications")
Call<List<NotificationThread>> notifyGetList(
@retrofit2.http.Query("all") Boolean all,
@retrofit2.http.Query("status-types") List<String> statusTypes,
@retrofit2.http.Query("subject-type") List<String> subjectType,
@retrofit2.http.Query("since") Date since,
@retrofit2.http.Query("before") Date before,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List users&#x27;s notification threads on a specific repo
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param all If true, show notifications marked as read. Default value is false (optional)
* @param statusTypes Show notifications with the provided status types. Options are: unread, read
* and/or pinned. Defaults to unread &amp; pinned (optional)
* @param subjectType filter notifications by subject type (optional)
* @param since Only show notifications updated after the given time. This is a timestamp in RFC
* 3339 format (optional)
* @param before Only show notifications updated before the given time. This is a timestamp in RFC
* 3339 format (optional)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;NotificationThread&gt;&gt;
*/
@GET("repos/{owner}/{repo}/notifications")
Call<List<NotificationThread>> notifyGetRepoList(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Query("all") Boolean all,
@retrofit2.http.Query("status-types") List<String> statusTypes,
@retrofit2.http.Query("subject-type") List<String> subjectType,
@retrofit2.http.Query("since") Date since,
@retrofit2.http.Query("before") Date before,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* Get notification thread by ID
*
* @param id id of notification thread (required)
* @return Call&lt;NotificationThread&gt;
*/
@GET("notifications/threads/{id}")
Call<NotificationThread> notifyGetThread(@retrofit2.http.Path("id") String id);
/**
* Check if unread notifications exist
*
* @return Call&lt;NotificationCount&gt;
*/
@GET("notifications/new")
Call<NotificationCount> notifyNewAvailable();
/**
* Mark notification threads as read, pinned or unread
*
* @param lastReadAt Describes the last point that notifications were checked. Anything updated
* since this time will not be updated. (optional)
* @param all If true, mark all notifications on this repo. Default value is false (optional)
* @param statusTypes Mark notifications with the provided status types. Options are: unread, read
* and/or pinned. Defaults to unread. (optional)
* @param toStatus Status to mark notifications as, Defaults to read. (optional)
* @return Call&lt;List&lt;NotificationThread&gt;&gt;
*/
@PUT("notifications")
Call<List<NotificationThread>> notifyReadList(
@retrofit2.http.Query("last_read_at") Date lastReadAt,
@retrofit2.http.Query("all") String all,
@retrofit2.http.Query("status-types") List<String> statusTypes,
@retrofit2.http.Query("to-status") String toStatus);
/**
* Mark notification threads as read, pinned or unread on a specific repo
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param all If true, mark all notifications on this repo. Default value is false (optional)
* @param statusTypes Mark notifications with the provided status types. Options are: unread, read
* and/or pinned. Defaults to unread. (optional)
* @param toStatus Status to mark notifications as. Defaults to read. (optional)
* @param lastReadAt Describes the last point that notifications were checked. Anything updated
* since this time will not be updated. (optional)
* @return Call&lt;List&lt;NotificationThread&gt;&gt;
*/
@PUT("repos/{owner}/{repo}/notifications")
Call<List<NotificationThread>> notifyReadRepoList(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Query("all") String all,
@retrofit2.http.Query("status-types") List<String> statusTypes,
@retrofit2.http.Query("to-status") String toStatus,
@retrofit2.http.Query("last_read_at") Date lastReadAt);
/**
* Mark notification thread as read by ID
*
* @param id id of notification thread (required)
* @param toStatus Status to mark notifications as (optional, default to read)
* @return Call&lt;NotificationThread&gt;
*/
@PATCH("notifications/threads/{id}")
Call<NotificationThread> notifyReadThread(
@retrofit2.http.Path("id") String id, @retrofit2.http.Query("to-status") String toStatus);
}
@@ -0,0 +1,522 @@
package org.gitnex.tea4j.v2.apis;
import java.util.List;
import org.gitnex.tea4j.v2.CollectionFormats.*;
import org.gitnex.tea4j.v2.models.CreateHookOption;
import org.gitnex.tea4j.v2.models.CreateLabelOption;
import org.gitnex.tea4j.v2.models.CreateOrgOption;
import org.gitnex.tea4j.v2.models.CreateRepoOption;
import org.gitnex.tea4j.v2.models.CreateTeamOption;
import org.gitnex.tea4j.v2.models.EditHookOption;
import org.gitnex.tea4j.v2.models.EditLabelOption;
import org.gitnex.tea4j.v2.models.EditOrgOption;
import org.gitnex.tea4j.v2.models.EditTeamOption;
import org.gitnex.tea4j.v2.models.Hook;
import org.gitnex.tea4j.v2.models.InlineResponse200;
import org.gitnex.tea4j.v2.models.Label;
import org.gitnex.tea4j.v2.models.Organization;
import org.gitnex.tea4j.v2.models.OrganizationPermissions;
import org.gitnex.tea4j.v2.models.Repository;
import org.gitnex.tea4j.v2.models.Team;
import org.gitnex.tea4j.v2.models.User;
import retrofit2.Call;
import retrofit2.http.*;
public interface OrganizationApi {
/**
* Create a repository in an organization
*
* @param org name of organization (required)
* @param body (optional)
* @return Call&lt;Repository&gt;
*/
@Headers({"Content-Type:application/json"})
@POST("orgs/{org}/repos")
Call<Repository> createOrgRepo(
@retrofit2.http.Path("org") String org, @retrofit2.http.Body CreateRepoOption body);
/**
* Create a repository in an organization
*
* @param org name of organization (required)
* @param body (optional)
* @return Call&lt;Repository&gt;
*/
@Headers({"Content-Type:application/json"})
@POST("org/{org}/repos")
Call<Repository> createOrgRepoDeprecated(
@retrofit2.http.Path("org") String org, @retrofit2.http.Body CreateRepoOption body);
/**
* Add a team member
*
* @param id id of the team (required)
* @param username username of the user to add (required)
* @return Call&lt;Void&gt;
*/
@PUT("teams/{id}/members/{username}")
Call<Void> orgAddTeamMember(
@retrofit2.http.Path("id") Long id, @retrofit2.http.Path("username") String username);
/**
* Add a repository to a team
*
* @param id id of the team (required)
* @param org organization that owns the repo to add (required)
* @param repo name of the repo to add (required)
* @return Call&lt;Void&gt;
*/
@PUT("teams/{id}/repos/{org}/{repo}")
Call<Void> orgAddTeamRepository(
@retrofit2.http.Path("id") Long id,
@retrofit2.http.Path("org") String org,
@retrofit2.http.Path("repo") String repo);
/**
* Conceal a user&#x27;s membership
*
* @param org name of the organization (required)
* @param username username of the user (required)
* @return Call&lt;Void&gt;
*/
@DELETE("orgs/{org}/public_members/{username}")
Call<Void> orgConcealMember(
@retrofit2.http.Path("org") String org, @retrofit2.http.Path("username") String username);
/**
* Create an organization
*
* @param body (required)
* @return Call&lt;Organization&gt;
*/
@Headers({"Content-Type:application/json"})
@POST("orgs")
Call<Organization> orgCreate(@retrofit2.http.Body CreateOrgOption body);
/**
* Create a hook
*
* @param body (required)
* @param org name of the organization (required)
* @return Call&lt;Hook&gt;
*/
@Headers({"Content-Type:application/json"})
@POST("orgs/{org}/hooks/")
Call<Hook> orgCreateHook(
@retrofit2.http.Body CreateHookOption body, @retrofit2.http.Path("org") String org);
/**
* Create a label for an organization
*
* @param org name of the organization (required)
* @param body (optional)
* @return Call&lt;Label&gt;
*/
@Headers({"Content-Type:application/json"})
@POST("orgs/{org}/labels")
Call<Label> orgCreateLabel(
@retrofit2.http.Path("org") String org, @retrofit2.http.Body CreateLabelOption body);
/**
* Create a team
*
* @param org name of the organization (required)
* @param body (optional)
* @return Call&lt;Team&gt;
*/
@Headers({"Content-Type:application/json"})
@POST("orgs/{org}/teams")
Call<Team> orgCreateTeam(
@retrofit2.http.Path("org") String org, @retrofit2.http.Body CreateTeamOption body);
/**
* Delete an organization
*
* @param org organization that is to be deleted (required)
* @return Call&lt;Void&gt;
*/
@DELETE("orgs/{org}")
Call<Void> orgDelete(@retrofit2.http.Path("org") String org);
/**
* Delete a hook
*
* @param org name of the organization (required)
* @param id id of the hook to delete (required)
* @return Call&lt;Void&gt;
*/
@DELETE("orgs/{org}/hooks/{id}")
Call<Void> orgDeleteHook(
@retrofit2.http.Path("org") String org, @retrofit2.http.Path("id") Long id);
/**
* Delete a label
*
* @param org name of the organization (required)
* @param id id of the label to delete (required)
* @return Call&lt;Void&gt;
*/
@DELETE("orgs/{org}/labels/{id}")
Call<Void> orgDeleteLabel(
@retrofit2.http.Path("org") String org, @retrofit2.http.Path("id") Long id);
/**
* Remove a member from an organization
*
* @param org name of the organization (required)
* @param username username of the user (required)
* @return Call&lt;Void&gt;
*/
@DELETE("orgs/{org}/members/{username}")
Call<Void> orgDeleteMember(
@retrofit2.http.Path("org") String org, @retrofit2.http.Path("username") String username);
/**
* Delete a team
*
* @param id id of the team to delete (required)
* @return Call&lt;Void&gt;
*/
@DELETE("teams/{id}")
Call<Void> orgDeleteTeam(@retrofit2.http.Path("id") Long id);
/**
* Edit an organization
*
* @param body (required)
* @param org name of the organization to edit (required)
* @return Call&lt;Organization&gt;
*/
@Headers({"Content-Type:application/json"})
@PATCH("orgs/{org}")
Call<Organization> orgEdit(
@retrofit2.http.Body EditOrgOption body, @retrofit2.http.Path("org") String org);
/**
* Update a hook
*
* @param org name of the organization (required)
* @param id id of the hook to update (required)
* @param body (optional)
* @return Call&lt;Hook&gt;
*/
@Headers({"Content-Type:application/json"})
@PATCH("orgs/{org}/hooks/{id}")
Call<Hook> orgEditHook(
@retrofit2.http.Path("org") String org,
@retrofit2.http.Path("id") Long id,
@retrofit2.http.Body EditHookOption body);
/**
* Update a label
*
* @param org name of the organization (required)
* @param id id of the label to edit (required)
* @param body (optional)
* @return Call&lt;Label&gt;
*/
@Headers({"Content-Type:application/json"})
@PATCH("orgs/{org}/labels/{id}")
Call<Label> orgEditLabel(
@retrofit2.http.Path("org") String org,
@retrofit2.http.Path("id") Long id,
@retrofit2.http.Body EditLabelOption body);
/**
* Edit a team
*
* @param id id of the team to edit (required)
* @param body (optional)
* @return Call&lt;Team&gt;
*/
@Headers({"Content-Type:application/json"})
@PATCH("teams/{id}")
Call<Team> orgEditTeam(
@retrofit2.http.Path("id") Integer id, @retrofit2.http.Body EditTeamOption body);
/**
* Get an organization
*
* @param org name of the organization to get (required)
* @return Call&lt;Organization&gt;
*/
@GET("orgs/{org}")
Call<Organization> orgGet(@retrofit2.http.Path("org") String org);
/**
* Get list of organizations
*
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;Organization&gt;&gt;
*/
@GET("orgs")
Call<List<Organization>> orgGetAll(
@retrofit2.http.Query("page") Integer page, @retrofit2.http.Query("limit") Integer limit);
/**
* Get a hook
*
* @param org name of the organization (required)
* @param id id of the hook to get (required)
* @return Call&lt;Hook&gt;
*/
@GET("orgs/{org}/hooks/{id}")
Call<Hook> orgGetHook(@retrofit2.http.Path("org") String org, @retrofit2.http.Path("id") Long id);
/**
* Get a single label
*
* @param org name of the organization (required)
* @param id id of the label to get (required)
* @return Call&lt;Label&gt;
*/
@GET("orgs/{org}/labels/{id}")
Call<Label> orgGetLabel(
@retrofit2.http.Path("org") String org, @retrofit2.http.Path("id") Long id);
/**
* Get a team
*
* @param id id of the team to get (required)
* @return Call&lt;Team&gt;
*/
@GET("teams/{id}")
Call<Team> orgGetTeam(@retrofit2.http.Path("id") Long id);
/**
* Get user permissions in organization
*
* @param username username of user (required)
* @param org name of the organization (required)
* @return Call&lt;OrganizationPermissions&gt;
*/
@GET("users/{username}/orgs/{org}/permissions")
Call<OrganizationPermissions> orgGetUserPermissions(
@retrofit2.http.Path("username") String username, @retrofit2.http.Path("org") String org);
/**
* Check if a user is a member of an organization
*
* @param org name of the organization (required)
* @param username username of the user (required)
* @return Call&lt;Void&gt;
*/
@GET("orgs/{org}/members/{username}")
Call<Void> orgIsMember(
@retrofit2.http.Path("org") String org, @retrofit2.http.Path("username") String username);
/**
* Check if a user is a public member of an organization
*
* @param org name of the organization (required)
* @param username username of the user (required)
* @return Call&lt;Void&gt;
*/
@GET("orgs/{org}/public_members/{username}")
Call<Void> orgIsPublicMember(
@retrofit2.http.Path("org") String org, @retrofit2.http.Path("username") String username);
/**
* List the current user&#x27;s organizations
*
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;Organization&gt;&gt;
*/
@GET("user/orgs")
Call<List<Organization>> orgListCurrentUserOrgs(
@retrofit2.http.Query("page") Integer page, @retrofit2.http.Query("limit") Integer limit);
/**
* List an organization&#x27;s webhooks
*
* @param org name of the organization (required)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;Hook&gt;&gt;
*/
@GET("orgs/{org}/hooks")
Call<List<Hook>> orgListHooks(
@retrofit2.http.Path("org") String org,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List an organization&#x27;s labels
*
* @param org name of the organization (required)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;Label&gt;&gt;
*/
@GET("orgs/{org}/labels")
Call<List<Label>> orgListLabels(
@retrofit2.http.Path("org") String org,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List an organization&#x27;s members
*
* @param org name of the organization (required)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;User&gt;&gt;
*/
@GET("orgs/{org}/members")
Call<List<User>> orgListMembers(
@retrofit2.http.Path("org") String org,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List an organization&#x27;s public members
*
* @param org name of the organization (required)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;User&gt;&gt;
*/
@GET("orgs/{org}/public_members")
Call<List<User>> orgListPublicMembers(
@retrofit2.http.Path("org") String org,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List an organization&#x27;s repos
*
* @param org name of the organization (required)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;Repository&gt;&gt;
*/
@GET("orgs/{org}/repos")
Call<List<Repository>> orgListRepos(
@retrofit2.http.Path("org") String org,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List a particular member of team
*
* @param id id of the team (required)
* @param username username of the member to list (required)
* @return Call&lt;User&gt;
*/
@GET("teams/{id}/members/{username}")
Call<User> orgListTeamMember(
@retrofit2.http.Path("id") Long id, @retrofit2.http.Path("username") String username);
/**
* List a team&#x27;s members
*
* @param id id of the team (required)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;User&gt;&gt;
*/
@GET("teams/{id}/members")
Call<List<User>> orgListTeamMembers(
@retrofit2.http.Path("id") Long id,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List a team&#x27;s repos
*
* @param id id of the team (required)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;Repository&gt;&gt;
*/
@GET("teams/{id}/repos")
Call<List<Repository>> orgListTeamRepos(
@retrofit2.http.Path("id") Long id,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List an organization&#x27;s teams
*
* @param org name of the organization (required)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;Team&gt;&gt;
*/
@GET("orgs/{org}/teams")
Call<List<Team>> orgListTeams(
@retrofit2.http.Path("org") String org,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List a user&#x27;s organizations
*
* @param username username of user (required)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;Organization&gt;&gt;
*/
@GET("users/{username}/orgs")
Call<List<Organization>> orgListUserOrgs(
@retrofit2.http.Path("username") String username,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* Publicize a user&#x27;s membership
*
* @param org name of the organization (required)
* @param username username of the user (required)
* @return Call&lt;Void&gt;
*/
@PUT("orgs/{org}/public_members/{username}")
Call<Void> orgPublicizeMember(
@retrofit2.http.Path("org") String org, @retrofit2.http.Path("username") String username);
/**
* Remove a team member
*
* @param id id of the team (required)
* @param username username of the user to remove (required)
* @return Call&lt;Void&gt;
*/
@DELETE("teams/{id}/members/{username}")
Call<Void> orgRemoveTeamMember(
@retrofit2.http.Path("id") Long id, @retrofit2.http.Path("username") String username);
/**
* Remove a repository from a team This does not delete the repository, it only removes the
* repository from the team.
*
* @param id id of the team (required)
* @param org organization that owns the repo to remove (required)
* @param repo name of the repo to remove (required)
* @return Call&lt;Void&gt;
*/
@DELETE("teams/{id}/repos/{org}/{repo}")
Call<Void> orgRemoveTeamRepository(
@retrofit2.http.Path("id") Long id,
@retrofit2.http.Path("org") String org,
@retrofit2.http.Path("repo") String repo);
/**
* Search for teams within an organization
*
* @param org name of the organization (required)
* @param q keywords to search (optional)
* @param includeDesc include search within team description (defaults to true) (optional)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;InlineResponse200&gt;
*/
@GET("orgs/{org}/teams/search")
Call<InlineResponse200> teamSearch(
@retrofit2.http.Path("org") String org,
@retrofit2.http.Query("q") String q,
@retrofit2.http.Query("include_desc") Boolean includeDesc,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,43 @@
package org.gitnex.tea4j.v2.apis;
import org.gitnex.tea4j.v2.CollectionFormats.*;
import org.gitnex.tea4j.v2.models.GeneralAPISettings;
import org.gitnex.tea4j.v2.models.GeneralAttachmentSettings;
import org.gitnex.tea4j.v2.models.GeneralRepoSettings;
import org.gitnex.tea4j.v2.models.GeneralUISettings;
import retrofit2.Call;
import retrofit2.http.*;
public interface SettingsApi {
/**
* Get instance&#x27;s global settings for api
*
* @return Call&lt;GeneralAPISettings&gt;
*/
@GET("settings/api")
Call<GeneralAPISettings> getGeneralAPISettings();
/**
* Get instance&#x27;s global settings for Attachment
*
* @return Call&lt;GeneralAttachmentSettings&gt;
*/
@GET("settings/attachment")
Call<GeneralAttachmentSettings> getGeneralAttachmentSettings();
/**
* Get instance&#x27;s global settings for repositories
*
* @return Call&lt;GeneralRepoSettings&gt;
*/
@GET("settings/repository")
Call<GeneralRepoSettings> getGeneralRepositorySettings();
/**
* Get instance&#x27;s global settings for ui
*
* @return Call&lt;GeneralUISettings&gt;
*/
@GET("settings/ui")
Call<GeneralUISettings> getGeneralUISettings();
}
@@ -0,0 +1,577 @@
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.AccessToken;
import org.gitnex.tea4j.v2.models.CreateAccessTokenOption;
import org.gitnex.tea4j.v2.models.CreateEmailOption;
import org.gitnex.tea4j.v2.models.CreateGPGKeyOption;
import org.gitnex.tea4j.v2.models.CreateKeyOption;
import org.gitnex.tea4j.v2.models.CreateOAuth2ApplicationOptions;
import org.gitnex.tea4j.v2.models.CreateRepoOption;
import org.gitnex.tea4j.v2.models.DeleteEmailOption;
import org.gitnex.tea4j.v2.models.Email;
import org.gitnex.tea4j.v2.models.GPGKey;
import org.gitnex.tea4j.v2.models.InlineResponse2001;
import org.gitnex.tea4j.v2.models.OAuth2Application;
import org.gitnex.tea4j.v2.models.PublicKey;
import org.gitnex.tea4j.v2.models.Repository;
import org.gitnex.tea4j.v2.models.StopWatch;
import org.gitnex.tea4j.v2.models.Team;
import org.gitnex.tea4j.v2.models.TrackedTime;
import org.gitnex.tea4j.v2.models.User;
import org.gitnex.tea4j.v2.models.UserHeatmapData;
import org.gitnex.tea4j.v2.models.UserSettings;
import org.gitnex.tea4j.v2.models.UserSettingsOptions;
import retrofit2.Call;
import retrofit2.http.*;
public interface UserApi {
/**
* Create a repository
*
* @param body (optional)
* @return Call&lt;Repository&gt;
*/
@Headers({"Content-Type:application/json"})
@POST("user/repos")
Call<Repository> createCurrentUserRepo(@retrofit2.http.Body CreateRepoOption body);
/**
* Get user settings
*
* @return Call&lt;List&lt;UserSettings&gt;&gt;
*/
@GET("user/settings")
Call<List<UserSettings>> getUserSettings();
/**
* Get a Token to verify
*
* @return Call&lt;String&gt;
*/
@GET("user/gpg_key_token")
Call<String> getVerificationToken();
/**
* Update user settings
*
* @param body (optional)
* @return Call&lt;List&lt;UserSettings&gt;&gt;
*/
@Headers({"Content-Type:application/json"})
@PATCH("user/settings")
Call<List<UserSettings>> updateUserSettings(@retrofit2.http.Body UserSettingsOptions body);
/**
* Add email addresses
*
* @param body (optional)
* @return Call&lt;List&lt;Email&gt;&gt;
*/
@Headers({"Content-Type:application/json"})
@POST("user/emails")
Call<List<Email>> userAddEmail(@retrofit2.http.Body CreateEmailOption body);
/**
* Check if one user is following another user
*
* @param username username of following user (required)
* @param target username of followed user (required)
* @return Call&lt;Void&gt;
*/
@GET("users/{username}/following/{target}")
Call<Void> userCheckFollowing(
@retrofit2.http.Path("username") String username,
@retrofit2.http.Path("target") String target);
/**
* creates a new OAuth2 application
*
* @param body (required)
* @return Call&lt;OAuth2Application&gt;
*/
@Headers({"Content-Type:application/json"})
@POST("user/applications/oauth2")
Call<OAuth2Application> userCreateOAuth2Application(
@retrofit2.http.Body CreateOAuth2ApplicationOptions body);
/**
* Create an access token
*
* @param username username of user (required)
* @param body (optional)
* @return Call&lt;AccessToken&gt;
*/
@Headers({"Content-Type:application/json"})
@POST("users/{username}/tokens")
Call<AccessToken> userCreateToken(
@retrofit2.http.Path("username") String username,
@retrofit2.http.Body CreateAccessTokenOption body);
/**
* Check whether a user is followed by the authenticated user
*
* @param username username of followed user (required)
* @return Call&lt;Void&gt;
*/
@GET("user/following/{username}")
Call<Void> userCurrentCheckFollowing(@retrofit2.http.Path("username") String username);
/**
* Whether the authenticated is starring the repo
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @return Call&lt;Void&gt;
*/
@GET("user/starred/{owner}/{repo}")
Call<Void> userCurrentCheckStarring(
@retrofit2.http.Path("owner") String owner, @retrofit2.http.Path("repo") String repo);
/**
* Unfollow a user
*
* @param username username of user to unfollow (required)
* @return Call&lt;Void&gt;
*/
@DELETE("user/following/{username}")
Call<Void> userCurrentDeleteFollow(@retrofit2.http.Path("username") String username);
/**
* Remove a GPG key
*
* @param id id of key to delete (required)
* @return Call&lt;Void&gt;
*/
@DELETE("user/gpg_keys/{id}")
Call<Void> userCurrentDeleteGPGKey(@retrofit2.http.Path("id") Long id);
/**
* Delete a public key
*
* @param id id of key to delete (required)
* @return Call&lt;Void&gt;
*/
@DELETE("user/keys/{id}")
Call<Void> userCurrentDeleteKey(@retrofit2.http.Path("id") Long id);
/**
* Unstar the given repo
*
* @param owner owner of the repo to unstar (required)
* @param repo name of the repo to unstar (required)
* @return Call&lt;Void&gt;
*/
@DELETE("user/starred/{owner}/{repo}")
Call<Void> userCurrentDeleteStar(
@retrofit2.http.Path("owner") String owner, @retrofit2.http.Path("repo") String repo);
/**
* Get a GPG key
*
* @param id id of key to get (required)
* @return Call&lt;GPGKey&gt;
*/
@GET("user/gpg_keys/{id}")
Call<GPGKey> userCurrentGetGPGKey(@retrofit2.http.Path("id") Long id);
/**
* Get a public key
*
* @param id id of key to get (required)
* @return Call&lt;PublicKey&gt;
*/
@GET("user/keys/{id}")
Call<PublicKey> userCurrentGetKey(@retrofit2.http.Path("id") Long id);
/**
* List the authenticated user&#x27;s followers
*
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;User&gt;&gt;
*/
@GET("user/followers")
Call<List<User>> userCurrentListFollowers(
@retrofit2.http.Query("page") Integer page, @retrofit2.http.Query("limit") Integer limit);
/**
* List the users that the authenticated user is following
*
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;User&gt;&gt;
*/
@GET("user/following")
Call<List<User>> userCurrentListFollowing(
@retrofit2.http.Query("page") Integer page, @retrofit2.http.Query("limit") Integer limit);
/**
* List the authenticated user&#x27;s GPG keys
*
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;GPGKey&gt;&gt;
*/
@GET("user/gpg_keys")
Call<List<GPGKey>> userCurrentListGPGKeys(
@retrofit2.http.Query("page") Integer page, @retrofit2.http.Query("limit") Integer limit);
/**
* List the authenticated user&#x27;s public keys
*
* @param fingerprint fingerprint of the key (optional)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;PublicKey&gt;&gt;
*/
@GET("user/keys")
Call<List<PublicKey>> userCurrentListKeys(
@retrofit2.http.Query("fingerprint") String fingerprint,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List the repos that the authenticated user owns
*
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;Repository&gt;&gt;
*/
@GET("user/repos")
Call<List<Repository>> userCurrentListRepos(
@retrofit2.http.Query("page") Integer page, @retrofit2.http.Query("limit") Integer limit);
/**
* The repos that the authenticated user has starred
*
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;Repository&gt;&gt;
*/
@GET("user/starred")
Call<List<Repository>> userCurrentListStarred(
@retrofit2.http.Query("page") Integer page, @retrofit2.http.Query("limit") Integer limit);
/**
* List repositories watched by the authenticated user
*
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;Repository&gt;&gt;
*/
@GET("user/subscriptions")
Call<List<Repository>> userCurrentListSubscriptions(
@retrofit2.http.Query("page") Integer page, @retrofit2.http.Query("limit") Integer limit);
/**
* Create a GPG key
*
* @param body (optional)
* @return Call&lt;GPGKey&gt;
*/
@Headers({"Content-Type:application/json"})
@POST("user/gpg_keys")
Call<GPGKey> userCurrentPostGPGKey(@retrofit2.http.Body CreateGPGKeyOption body);
/**
* Create a public key
*
* @param body (optional)
* @return Call&lt;PublicKey&gt;
*/
@Headers({"Content-Type:application/json"})
@POST("user/keys")
Call<PublicKey> userCurrentPostKey(@retrofit2.http.Body CreateKeyOption body);
/**
* Follow a user
*
* @param username username of user to follow (required)
* @return Call&lt;Void&gt;
*/
@PUT("user/following/{username}")
Call<Void> userCurrentPutFollow(@retrofit2.http.Path("username") String username);
/**
* Star the given repo
*
* @param owner owner of the repo to star (required)
* @param repo name of the repo to star (required)
* @return Call&lt;Void&gt;
*/
@PUT("user/starred/{owner}/{repo}")
Call<Void> userCurrentPutStar(
@retrofit2.http.Path("owner") String owner, @retrofit2.http.Path("repo") String repo);
/**
* List the current user&#x27;s tracked times
*
* @param since Only show times updated after the given time. This is a timestamp in RFC 3339
* format (optional)
* @param before Only show times updated before the given time. This is a timestamp in RFC 3339
* format (optional)
* @return Call&lt;List&lt;TrackedTime&gt;&gt;
*/
@GET("user/times")
Call<List<TrackedTime>> userCurrentTrackedTimes(
@retrofit2.http.Query("since") Date since, @retrofit2.http.Query("before") Date before);
/**
* delete an access token
*
* @param username username of user (required)
* @param token token to be deleted, identified by ID and if not available by name (required)
* @return Call&lt;Void&gt;
*/
@DELETE("users/{username}/tokens/{token}")
Call<Void> userDeleteAccessToken(
@retrofit2.http.Path("username") String username, @retrofit2.http.Path("token") String token);
/**
* Delete email addresses
*
* @param body (optional)
* @return Call&lt;Void&gt;
*/
@Headers({"Content-Type:application/json"})
@DELETE("user/emails")
Call<Void> userDeleteEmail(@retrofit2.http.Body DeleteEmailOption body);
/**
* delete an OAuth2 Application
*
* @param id token to be deleted (required)
* @return Call&lt;Void&gt;
*/
@DELETE("user/applications/oauth2/{id}")
Call<Void> userDeleteOAuth2Application(@retrofit2.http.Path("id") Long id);
/**
* Get a user
*
* @param username username of user to get (required)
* @return Call&lt;User&gt;
*/
@GET("users/{username}")
Call<User> userGet(@retrofit2.http.Path("username") String username);
/**
* Get the authenticated user
*
* @return Call&lt;User&gt;
*/
@GET("user")
Call<User> userGetCurrent();
/**
* Get a user&#x27;s heatmap
*
* @param username username of user to get (required)
* @return Call&lt;List&lt;UserHeatmapData&gt;&gt;
*/
@GET("users/{username}/heatmap")
Call<List<UserHeatmapData>> userGetHeatmapData(@retrofit2.http.Path("username") String username);
/**
* get an OAuth2 Application
*
* @param id Application ID to be found (required)
* @return Call&lt;OAuth2Application&gt;
*/
@GET("user/applications/oauth2/{id}")
Call<OAuth2Application> userGetOAuth2Application(@retrofit2.http.Path("id") Long id);
/**
* List the authenticated user&#x27;s oauth2 applications
*
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;OAuth2Application&gt;&gt;
*/
@GET("user/applications/oauth2")
Call<List<OAuth2Application>> userGetOauth2Application(
@retrofit2.http.Query("page") Integer page, @retrofit2.http.Query("limit") Integer limit);
/**
* Get list of all existing stopwatches
*
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;StopWatch&gt;&gt;
*/
@GET("user/stopwatches")
Call<List<StopWatch>> userGetStopWatches(
@retrofit2.http.Query("page") Integer page, @retrofit2.http.Query("limit") Integer limit);
/**
* List the authenticated user&#x27;s access tokens
*
* @param username username of user (required)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;AccessToken&gt;&gt;
*/
@GET("users/{username}/tokens")
Call<List<AccessToken>> userGetTokens(
@retrofit2.http.Path("username") String username,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List the authenticated user&#x27;s email addresses
*
* @return Call&lt;List&lt;Email&gt;&gt;
*/
@GET("user/emails")
Call<List<Email>> userListEmails();
/**
* List the given user&#x27;s followers
*
* @param username username of user (required)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;User&gt;&gt;
*/
@GET("users/{username}/followers")
Call<List<User>> userListFollowers(
@retrofit2.http.Path("username") String username,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List the users that the given user is following
*
* @param username username of user (required)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;User&gt;&gt;
*/
@GET("users/{username}/following")
Call<List<User>> userListFollowing(
@retrofit2.http.Path("username") String username,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List the given user&#x27;s GPG keys
*
* @param username username of user (required)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;GPGKey&gt;&gt;
*/
@GET("users/{username}/gpg_keys")
Call<List<GPGKey>> userListGPGKeys(
@retrofit2.http.Path("username") String username,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List the given user&#x27;s public keys
*
* @param username username of user (required)
* @param fingerprint fingerprint of the key (optional)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;PublicKey&gt;&gt;
*/
@GET("users/{username}/keys")
Call<List<PublicKey>> userListKeys(
@retrofit2.http.Path("username") String username,
@retrofit2.http.Query("fingerprint") String fingerprint,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List the repos owned by the given user
*
* @param username username of user (required)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;Repository&gt;&gt;
*/
@GET("users/{username}/repos")
Call<List<Repository>> userListRepos(
@retrofit2.http.Path("username") String username,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* The repos that the given user has starred
*
* @param username username of user (required)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;Repository&gt;&gt;
*/
@GET("users/{username}/starred")
Call<List<Repository>> userListStarred(
@retrofit2.http.Path("username") String username,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List the repositories watched by a user
*
* @param username username of the user (required)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;Repository&gt;&gt;
*/
@GET("users/{username}/subscriptions")
Call<List<Repository>> userListSubscriptions(
@retrofit2.http.Path("username") String username,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List all the teams a user belongs to
*
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;Team&gt;&gt;
*/
@GET("user/teams")
Call<List<Team>> userListTeams(
@retrofit2.http.Query("page") Integer page, @retrofit2.http.Query("limit") Integer limit);
/**
* Search for users
*
* @param q keyword (optional)
* @param uid ID of the user to search for (optional)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;InlineResponse2001&gt;
*/
@GET("users/search")
Call<InlineResponse2001> userSearch(
@retrofit2.http.Query("q") String q,
@retrofit2.http.Query("uid") Long uid,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* update an OAuth2 Application, this includes regenerating the client secret
*
* @param body (required)
* @param id application to be updated (required)
* @return Call&lt;OAuth2Application&gt;
*/
@Headers({"Content-Type:application/json"})
@PATCH("user/applications/oauth2/{id}")
Call<OAuth2Application> userUpdateOAuth2Application(
@retrofit2.http.Body CreateOAuth2ApplicationOptions body, @retrofit2.http.Path("id") Long id);
/**
* Verify a GPG key
*
* @return Call&lt;GPGKey&gt;
*/
@POST("user/gpg_key_verify")
Call<GPGKey> userVerifyGPGKey();
}
@@ -0,0 +1,100 @@
package org.gitnex.tea4j.v2.apis.custom;
import java.util.List;
import org.gitnex.tea4j.v2.models.*;
import retrofit2.Call;
import retrofit2.http.*;
public interface CustomApi {
@GET("repos/{owner}/{repo}/contents/{filepath}")
Call<List<ContentsResponse>> repoGetContentsList(
@Path("owner") String owner,
@Path("repo") String repo,
@Path("filepath") String filepath,
@Query("ref") String ref);
/**
* Remove a reaction from a comment of an issue
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param id id of the comment to edit (required)
* @param body (optional)
* @return Call&lt;Void&gt;
*/
@Headers({"Content-Type:application/json"})
@HTTP(
method = "DELETE",
path = "repos/{owner}/{repo}/issues/comments/{id}/reactions",
hasBody = true)
Call<Void> issueDeleteCommentReactionWithBody(
@Path("owner") String owner,
@Path("repo") String repo,
@Path("id") Long id,
@Body EditReactionOption body);
/**
* Remove a reaction from an issue
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the issue (required)
* @param body (optional)
* @return Call&lt;Void&gt;
*/
@Headers({"Content-Type:application/json"})
@HTTP(method = "DELETE", path = "repos/{owner}/{repo}/issues/{index}/reactions", hasBody = true)
Call<Void> issueDeleteIssueReactionWithBody(
@Path("owner") String owner,
@Path("repo") String repo,
@Path("index") Long index,
@Body EditReactionOption body);
/**
* Delete a file in a repository
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param filepath path of the file to delete (required)
* @param body (required)
* @return Call&lt;FileDeleteResponse&gt;
*/
@Headers({"Content-Type:application/json"})
@HTTP(method = "DELETE", path = "repos/{owner}/{repo}/contents/{filepath}", hasBody = true)
Call<FileDeleteResponse> repoDeleteFileWithBody(
@Path("owner") String owner,
@Path("repo") String repo,
@Path("filepath") String filepath,
@Body DeleteFileOptions body);
/**
* Cancel review requests for a pull request
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the pull request (required)
* @param body (required)
* @return Call&lt;Void&gt;
*/
@Headers({"Content-Type:application/json"})
@HTTP(
method = "DELETE",
path = "repos/{owner}/{repo}/pulls/{index}/requested_reviewers",
hasBody = true)
Call<Void> repoDeletePullReviewRequestsWithBody(
@Path("owner") String owner,
@Path("repo") String repo,
@Path("index") Long index,
@Body PullReviewRequestOptions body);
/**
* Delete email addresses
*
* @param body (optional)
* @return Call&lt;Void&gt;
*/
@Headers({"Content-Type:application/json"})
@HTTP(method = "DELETE", path = "user/emails", hasBody = true)
Call<Void> userDeleteEmailWithBody(@Body DeleteEmailOption body);
}
@@ -0,0 +1,42 @@
package org.gitnex.tea4j.v2.apis.custom;
import java.util.List;
import org.gitnex.tea4j.v2.models.AccessToken;
import org.gitnex.tea4j.v2.models.ContentsResponse;
import org.gitnex.tea4j.v2.models.CreateAccessTokenOption;
import org.gitnex.tea4j.v2.models.ServerVersion;
import retrofit2.Call;
import retrofit2.http.*;
public interface OTPApi {
@GET("version")
Call<ServerVersion> getVersion(@Header("X-Gitea-OTP") int otp);
@GET("users/{username}/tokens")
Call<List<AccessToken>> userGetTokens(
@Header("X-Gitea-OTP") int otp,
@Path("username") String username,
@Query("page") Integer page,
@Query("limit") Integer limit);
@DELETE("users/{username}/tokens/{token}")
Call<Void> userDeleteAccessToken(
@Header("X-Gitea-OTP") int otp,
@Path("username") String username,
@Path("token") String token);
@Headers({"Content-Type:application/json"})
@POST("users/{username}/tokens")
Call<AccessToken> userCreateToken(
@Header("X-Gitea-OTP") int otp,
@Path("username") String username,
@Body CreateAccessTokenOption body);
@GET("repos/{owner}/{repo}/contents/{filepath}")
Call<List<ContentsResponse>> repoGetContentsList(
@Path("owner") String owner,
@Path("repo") String repo,
@Path("filepath") String filepath,
@Query("ref") String ref);
}
@@ -0,0 +1,15 @@
package org.gitnex.tea4j.v2.apis.custom;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.http.Streaming;
public interface StreamingApi {
@Streaming
@GET("repos/{owner}/{repo}/pulls/{index}.diff")
Call<ResponseBody> getPullDiffContent(
@Path("owner") String owner, @Path("repo") String repo, @Path("index") String index);
}
@@ -0,0 +1,30 @@
package org.gitnex.tea4j.v2.apis.custom;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.http.Streaming;
public interface WebApi {
@Streaming
@GET("{owner}/{repo}/pulls/{index}.diff")
Call<ResponseBody> getPullDiffContent(
@Path("owner") String owner, @Path("repo") String repo, @Path("index") String index);
@Streaming
@GET("{owner}/{repo}/raw/branch/{branch}/{filepath}")
Call<ResponseBody> getFileContents(
@Path("owner") String owner,
@Path("repo") String repo,
@Path("branch") String branch,
@Path(value = "filepath", encoded = true) String filepath);
@GET("{owner}/{repo}/git/commit/{sha}.{diffType}")
Call<String> repoDownloadCommitDiffOrPatch(
@Path("owner") String owner,
@Path("repo") String repo,
@Path("sha") String sha,
@Path("diffType") String diffType);
}
@@ -0,0 +1,70 @@
package org.gitnex.tea4j.v2.auth;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;
public class ApiKeyAuth implements Interceptor {
private final String location;
private final String paramName;
private String apiKey;
public ApiKeyAuth(String location, String paramName) {
this.location = location;
this.paramName = paramName;
}
public String getLocation() {
return location;
}
public String getParamName() {
return paramName;
}
public String getApiKey() {
return apiKey;
}
public void setApiKey(String apiKey) {
this.apiKey = apiKey;
}
@Override
public Response intercept(Chain chain) throws IOException {
String paramValue;
Request request = chain.request();
if ("query".equals(location)) {
String newQuery = request.url().uri().getQuery();
paramValue = paramName + "=" + apiKey;
if (newQuery == null) {
newQuery = paramValue;
} else {
newQuery += "&" + paramValue;
}
URI newUri;
try {
newUri =
new URI(
request.url().uri().getScheme(),
request.url().uri().getAuthority(),
request.url().uri().getPath(),
newQuery,
request.url().uri().getFragment());
} catch (URISyntaxException e) {
throw new IOException(e);
}
request = request.newBuilder().url(newUri.toURL()).build();
} else if ("header".equals(location)) {
request = request.newBuilder().addHeader(paramName, apiKey).build();
}
return chain.proceed(request);
}
}
@@ -0,0 +1,46 @@
package org.gitnex.tea4j.v2.auth;
import java.io.IOException;
import okhttp3.Credentials;
import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;
public class HttpBasicAuth implements Interceptor {
private String username;
private String password;
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public void setCredentials(String username, String password) {
this.username = username;
this.password = password;
}
@Override
public Response intercept(Chain chain) throws IOException {
Request request = chain.request();
// If the request already have an authorization (eg. Basic auth), do nothing
if (request.header("Authorization") == null) {
String credentials = Credentials.basic(username, password);
request = request.newBuilder().addHeader("Authorization", credentials).build();
}
return chain.proceed(request);
}
}
@@ -0,0 +1,182 @@
package org.gitnex.tea4j.v2.auth;
import static java.net.HttpURLConnection.HTTP_FORBIDDEN;
import static java.net.HttpURLConnection.HTTP_UNAUTHORIZED;
import java.io.IOException;
import java.util.Map;
import okhttp3.Interceptor;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Request.Builder;
import okhttp3.Response;
import org.apache.oltu.oauth2.client.OAuthClient;
import org.apache.oltu.oauth2.client.request.OAuthBearerClientRequest;
import org.apache.oltu.oauth2.client.request.OAuthClientRequest;
import org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder;
import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder;
import org.apache.oltu.oauth2.client.response.OAuthJSONAccessTokenResponse;
import org.apache.oltu.oauth2.common.exception.OAuthProblemException;
import org.apache.oltu.oauth2.common.exception.OAuthSystemException;
import org.apache.oltu.oauth2.common.message.types.GrantType;
import org.apache.oltu.oauth2.common.token.BasicOAuthToken;
public class OAuth implements Interceptor {
public interface AccessTokenListener {
public void notify(BasicOAuthToken token);
}
private volatile String accessToken;
private OAuthClient oauthClient;
private TokenRequestBuilder tokenRequestBuilder;
private AuthenticationRequestBuilder authenticationRequestBuilder;
private AccessTokenListener accessTokenListener;
public OAuth(OkHttpClient client, TokenRequestBuilder requestBuilder) {
this.oauthClient = new OAuthClient(new OAuthOkHttpClient(client));
this.tokenRequestBuilder = requestBuilder;
}
public OAuth(TokenRequestBuilder requestBuilder) {
this(new OkHttpClient(), requestBuilder);
}
public OAuth(OAuthFlow flow, String authorizationUrl, String tokenUrl, String scopes) {
this(OAuthClientRequest.tokenLocation(tokenUrl).setScope(scopes));
setFlow(flow);
authenticationRequestBuilder = OAuthClientRequest.authorizationLocation(authorizationUrl);
}
public void setFlow(OAuthFlow flow) {
switch (flow) {
case accessCode:
case implicit:
tokenRequestBuilder.setGrantType(GrantType.AUTHORIZATION_CODE);
break;
case password:
tokenRequestBuilder.setGrantType(GrantType.PASSWORD);
break;
case application:
tokenRequestBuilder.setGrantType(GrantType.CLIENT_CREDENTIALS);
break;
default:
break;
}
}
@Override
public Response intercept(Chain chain) throws IOException {
return retryingIntercept(chain, true);
}
private Response retryingIntercept(Chain chain, boolean updateTokenAndRetryOnAuthorizationFailure)
throws IOException {
Request request = chain.request();
// If the request already have an authorization (eg. Basic auth), do nothing
if (request.header("Authorization") != null) {
return chain.proceed(request);
}
// If first time, get the token
OAuthClientRequest oAuthRequest;
if (getAccessToken() == null) {
updateAccessToken(null);
}
if (getAccessToken() != null) {
// Build the request
Builder rb = request.newBuilder();
String requestAccessToken = new String(getAccessToken());
try {
oAuthRequest =
new OAuthBearerClientRequest(request.url().toString())
.setAccessToken(requestAccessToken)
.buildHeaderMessage();
} catch (OAuthSystemException e) {
throw new IOException(e);
}
for (Map.Entry<String, String> header : oAuthRequest.getHeaders().entrySet()) {
rb.addHeader(header.getKey(), header.getValue());
}
rb.url(oAuthRequest.getLocationUri());
// Execute the request
Response response = chain.proceed(rb.build());
// 401/403 most likely indicates that access token has expired. Unless it happens two times in
// a row.
if (response != null
&& (response.code() == HTTP_UNAUTHORIZED || response.code() == HTTP_FORBIDDEN)
&& updateTokenAndRetryOnAuthorizationFailure) {
if (updateAccessToken(requestAccessToken)) {
return retryingIntercept(chain, false);
}
}
return response;
} else {
return chain.proceed(chain.request());
}
}
/*
* Returns true if the access token has been updated
*/
public synchronized boolean updateAccessToken(String requestAccessToken) throws IOException {
if (getAccessToken() == null || getAccessToken().equals(requestAccessToken)) {
try {
OAuthJSONAccessTokenResponse accessTokenResponse =
oauthClient.accessToken(this.tokenRequestBuilder.buildBodyMessage());
if (accessTokenResponse != null && accessTokenResponse.getAccessToken() != null) {
setAccessToken(accessTokenResponse.getAccessToken());
if (accessTokenListener != null) {
accessTokenListener.notify((BasicOAuthToken) accessTokenResponse.getOAuthToken());
}
return !getAccessToken().equals(requestAccessToken);
} else {
return false;
}
} catch (OAuthSystemException e) {
throw new IOException(e);
} catch (OAuthProblemException e) {
throw new IOException(e);
}
}
return true;
}
public void registerAccessTokenListener(AccessTokenListener accessTokenListener) {
this.accessTokenListener = accessTokenListener;
}
public synchronized String getAccessToken() {
return accessToken;
}
public synchronized void setAccessToken(String accessToken) {
this.accessToken = accessToken;
}
public TokenRequestBuilder getTokenRequestBuilder() {
return tokenRequestBuilder;
}
public void setTokenRequestBuilder(TokenRequestBuilder tokenRequestBuilder) {
this.tokenRequestBuilder = tokenRequestBuilder;
}
public AuthenticationRequestBuilder getAuthenticationRequestBuilder() {
return authenticationRequestBuilder;
}
public void setAuthenticationRequestBuilder(
AuthenticationRequestBuilder authenticationRequestBuilder) {
this.authenticationRequestBuilder = authenticationRequestBuilder;
}
}
@@ -0,0 +1,20 @@
/*
* 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.auth;
public enum OAuthFlow {
accessCode,
implicit,
password,
application
}
@@ -0,0 +1,70 @@
package org.gitnex.tea4j.v2.auth;
import java.io.IOException;
import java.util.Map;
import java.util.Map.Entry;
import okhttp3.MediaType;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;
import org.apache.oltu.oauth2.client.HttpClient;
import org.apache.oltu.oauth2.client.request.OAuthClientRequest;
import org.apache.oltu.oauth2.client.response.OAuthClientResponse;
import org.apache.oltu.oauth2.client.response.OAuthClientResponseFactory;
import org.apache.oltu.oauth2.common.exception.OAuthProblemException;
import org.apache.oltu.oauth2.common.exception.OAuthSystemException;
public class OAuthOkHttpClient implements HttpClient {
private OkHttpClient client;
public OAuthOkHttpClient() {
this.client = new OkHttpClient();
}
public OAuthOkHttpClient(OkHttpClient client) {
this.client = client;
}
public <T extends OAuthClientResponse> T execute(
OAuthClientRequest request,
Map<String, String> headers,
String requestMethod,
Class<T> responseClass)
throws OAuthSystemException, OAuthProblemException {
MediaType mediaType = MediaType.parse("application/json");
Request.Builder requestBuilder = new Request.Builder().url(request.getLocationUri());
if (headers != null) {
for (Entry<String, String> entry : headers.entrySet()) {
if (entry.getKey().equalsIgnoreCase("Content-Type")) {
mediaType = MediaType.parse(entry.getValue());
} else {
requestBuilder.addHeader(entry.getKey(), entry.getValue());
}
}
}
RequestBody body =
request.getBody() != null ? RequestBody.create(mediaType, request.getBody()) : null;
requestBuilder.method(requestMethod, body);
try {
Response response = client.newCall(requestBuilder.build()).execute();
return OAuthClientResponseFactory.createCustomResponse(
response.body().string(),
response.body().contentType().toString(),
response.code(),
response.headers().toMultimap(),
responseClass);
} catch (IOException e) {
throw new OAuthSystemException(e);
}
}
public void shutdown() {
// Nothing to do here
}
}
@@ -0,0 +1,106 @@
/*
* 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;
/** APIError is an api error with a message */
@Schema(description = "APIError is an api error with a message")
public class APIError implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("message")
private String message = null;
@SerializedName("url")
private String url = null;
public APIError message(String message) {
this.message = message;
return this;
}
/**
* Get message
*
* @return message
*/
@Schema(description = "")
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public APIError url(String url) {
this.url = url;
return this;
}
/**
* Get url
*
* @return url
*/
@Schema(description = "")
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
APIError apIError = (APIError) o;
return Objects.equals(this.message, apIError.message) && Objects.equals(this.url, apIError.url);
}
@Override
public int hashCode() {
return Objects.hash(message, url);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class APIError {\n");
sb.append(" message: ").append(toIndentedString(message)).append("\n");
sb.append(" url: ").append(toIndentedString(url)).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,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;
/** AccessToken */
public class AccessToken implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("id")
private Long id = null;
@SerializedName("name")
private String name = null;
@SerializedName("sha1")
private String sha1 = null;
@SerializedName("token_last_eight")
private String tokenLastEight = null;
public AccessToken id(Long id) {
this.id = id;
return this;
}
/**
* Get id
*
* @return id
*/
@Schema(description = "")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public AccessToken name(String name) {
this.name = name;
return this;
}
/**
* Get name
*
* @return name
*/
@Schema(description = "")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public AccessToken sha1(String sha1) {
this.sha1 = sha1;
return this;
}
/**
* Get sha1
*
* @return sha1
*/
@Schema(description = "")
public String getSha1() {
return sha1;
}
public void setSha1(String sha1) {
this.sha1 = sha1;
}
public AccessToken tokenLastEight(String tokenLastEight) {
this.tokenLastEight = tokenLastEight;
return this;
}
/**
* Get tokenLastEight
*
* @return tokenLastEight
*/
@Schema(description = "")
public String getTokenLastEight() {
return tokenLastEight;
}
public void setTokenLastEight(String tokenLastEight) {
this.tokenLastEight = tokenLastEight;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AccessToken accessToken = (AccessToken) o;
return Objects.equals(this.id, accessToken.id)
&& Objects.equals(this.name, accessToken.name)
&& Objects.equals(this.sha1, accessToken.sha1)
&& Objects.equals(this.tokenLastEight, accessToken.tokenLastEight);
}
@Override
public int hashCode() {
return Objects.hash(id, name, sha1, tokenLastEight);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AccessToken {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" sha1: ").append(toIndentedString(sha1)).append("\n");
sb.append(" tokenLastEight: ").append(toIndentedString(tokenLastEight)).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,85 @@
/*
* 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;
/** AddCollaboratorOption options when adding a user as a collaborator of a repository */
@Schema(
description =
"AddCollaboratorOption options when adding a user as a collaborator of a repository")
public class AddCollaboratorOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("permission")
private String permission = null;
public AddCollaboratorOption permission(String permission) {
this.permission = permission;
return this;
}
/**
* Get permission
*
* @return permission
*/
@Schema(description = "")
public String getPermission() {
return permission;
}
public void setPermission(String permission) {
this.permission = permission;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AddCollaboratorOption addCollaboratorOption = (AddCollaboratorOption) o;
return Objects.equals(this.permission, addCollaboratorOption.permission);
}
@Override
public int hashCode() {
return Objects.hash(permission);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AddCollaboratorOption {\n");
sb.append(" permission: ").append(toIndentedString(permission)).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,132 @@
/*
* 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.Date;
import java.util.Objects;
/** AddTimeOption options for adding time to an issue */
@Schema(description = "AddTimeOption options for adding time to an issue")
public class AddTimeOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("created")
private Date created = null;
@SerializedName("time")
private Long time = null;
@SerializedName("user_name")
private String userName = null;
public AddTimeOption created(Date created) {
this.created = created;
return this;
}
/**
* Get created
*
* @return created
*/
@Schema(description = "")
public Date getCreated() {
return created;
}
public void setCreated(Date created) {
this.created = created;
}
public AddTimeOption time(Long time) {
this.time = time;
return this;
}
/**
* time in seconds
*
* @return time
*/
@Schema(required = true, description = "time in seconds")
public Long getTime() {
return time;
}
public void setTime(Long time) {
this.time = time;
}
public AddTimeOption userName(String userName) {
this.userName = userName;
return this;
}
/**
* User who spent the time (optional)
*
* @return userName
*/
@Schema(description = "User who spent the time (optional)")
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AddTimeOption addTimeOption = (AddTimeOption) o;
return Objects.equals(this.created, addTimeOption.created)
&& Objects.equals(this.time, addTimeOption.time)
&& Objects.equals(this.userName, addTimeOption.userName);
}
@Override
public int hashCode() {
return Objects.hash(created, time, userName);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AddTimeOption {\n");
sb.append(" created: ").append(toIndentedString(created)).append("\n");
sb.append(" time: ").append(toIndentedString(time)).append("\n");
sb.append(" userName: ").append(toIndentedString(userName)).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,227 @@
/*
* 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;
/** AnnotatedTag represents an annotated tag */
@Schema(description = "AnnotatedTag represents an annotated tag")
public class AnnotatedTag implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("message")
private String message = null;
@SerializedName("object")
private AnnotatedTagObject object = null;
@SerializedName("sha")
private String sha = null;
@SerializedName("tag")
private String tag = null;
@SerializedName("tagger")
private CommitUser tagger = null;
@SerializedName("url")
private String url = null;
@SerializedName("verification")
private PayloadCommitVerification verification = null;
public AnnotatedTag message(String message) {
this.message = message;
return this;
}
/**
* Get message
*
* @return message
*/
@Schema(description = "")
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public AnnotatedTag object(AnnotatedTagObject object) {
this.object = object;
return this;
}
/**
* Get object
*
* @return object
*/
@Schema(description = "")
public AnnotatedTagObject getObject() {
return object;
}
public void setObject(AnnotatedTagObject object) {
this.object = object;
}
public AnnotatedTag sha(String sha) {
this.sha = sha;
return this;
}
/**
* Get sha
*
* @return sha
*/
@Schema(description = "")
public String getSha() {
return sha;
}
public void setSha(String sha) {
this.sha = sha;
}
public AnnotatedTag tag(String tag) {
this.tag = tag;
return this;
}
/**
* Get tag
*
* @return tag
*/
@Schema(description = "")
public String getTag() {
return tag;
}
public void setTag(String tag) {
this.tag = tag;
}
public AnnotatedTag tagger(CommitUser tagger) {
this.tagger = tagger;
return this;
}
/**
* Get tagger
*
* @return tagger
*/
@Schema(description = "")
public CommitUser getTagger() {
return tagger;
}
public void setTagger(CommitUser tagger) {
this.tagger = tagger;
}
public AnnotatedTag url(String url) {
this.url = url;
return this;
}
/**
* Get url
*
* @return url
*/
@Schema(description = "")
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public AnnotatedTag verification(PayloadCommitVerification verification) {
this.verification = verification;
return this;
}
/**
* Get verification
*
* @return verification
*/
@Schema(description = "")
public PayloadCommitVerification getVerification() {
return verification;
}
public void setVerification(PayloadCommitVerification verification) {
this.verification = verification;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AnnotatedTag annotatedTag = (AnnotatedTag) o;
return Objects.equals(this.message, annotatedTag.message)
&& Objects.equals(this.object, annotatedTag.object)
&& Objects.equals(this.sha, annotatedTag.sha)
&& Objects.equals(this.tag, annotatedTag.tag)
&& Objects.equals(this.tagger, annotatedTag.tagger)
&& Objects.equals(this.url, annotatedTag.url)
&& Objects.equals(this.verification, annotatedTag.verification);
}
@Override
public int hashCode() {
return Objects.hash(message, object, sha, tag, tagger, url, verification);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AnnotatedTag {\n");
sb.append(" message: ").append(toIndentedString(message)).append("\n");
sb.append(" object: ").append(toIndentedString(object)).append("\n");
sb.append(" sha: ").append(toIndentedString(sha)).append("\n");
sb.append(" tag: ").append(toIndentedString(tag)).append("\n");
sb.append(" tagger: ").append(toIndentedString(tagger)).append("\n");
sb.append(" url: ").append(toIndentedString(url)).append("\n");
sb.append(" verification: ").append(toIndentedString(verification)).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,131 @@
/*
* 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;
/** AnnotatedTagObject contains meta information of the tag object */
@Schema(description = "AnnotatedTagObject contains meta information of the tag object")
public class AnnotatedTagObject implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("sha")
private String sha = null;
@SerializedName("type")
private String type = null;
@SerializedName("url")
private String url = null;
public AnnotatedTagObject sha(String sha) {
this.sha = sha;
return this;
}
/**
* Get sha
*
* @return sha
*/
@Schema(description = "")
public String getSha() {
return sha;
}
public void setSha(String sha) {
this.sha = sha;
}
public AnnotatedTagObject type(String type) {
this.type = type;
return this;
}
/**
* Get type
*
* @return type
*/
@Schema(description = "")
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public AnnotatedTagObject url(String url) {
this.url = url;
return this;
}
/**
* Get url
*
* @return url
*/
@Schema(description = "")
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AnnotatedTagObject annotatedTagObject = (AnnotatedTagObject) o;
return Objects.equals(this.sha, annotatedTagObject.sha)
&& Objects.equals(this.type, annotatedTagObject.type)
&& Objects.equals(this.url, annotatedTagObject.url);
}
@Override
public int hashCode() {
return Objects.hash(sha, type, url);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AnnotatedTagObject {\n");
sb.append(" sha: ").append(toIndentedString(sha)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" url: ").append(toIndentedString(url)).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.Date;
import java.util.Objects;
/** Attachment a generic attachment */
@Schema(description = "Attachment a generic attachment")
public class Attachment implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("browser_download_url")
private String browserDownloadUrl = null;
@SerializedName("created_at")
private Date createdAt = null;
@SerializedName("download_count")
private Long downloadCount = null;
@SerializedName("id")
private Long id = null;
@SerializedName("name")
private String name = null;
@SerializedName("size")
private Long size = null;
@SerializedName("uuid")
private String uuid = null;
public Attachment browserDownloadUrl(String browserDownloadUrl) {
this.browserDownloadUrl = browserDownloadUrl;
return this;
}
/**
* Get browserDownloadUrl
*
* @return browserDownloadUrl
*/
@Schema(description = "")
public String getBrowserDownloadUrl() {
return browserDownloadUrl;
}
public void setBrowserDownloadUrl(String browserDownloadUrl) {
this.browserDownloadUrl = browserDownloadUrl;
}
public Attachment 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 Attachment downloadCount(Long downloadCount) {
this.downloadCount = downloadCount;
return this;
}
/**
* Get downloadCount
*
* @return downloadCount
*/
@Schema(description = "")
public Long getDownloadCount() {
return downloadCount;
}
public void setDownloadCount(Long downloadCount) {
this.downloadCount = downloadCount;
}
public Attachment id(Long id) {
this.id = id;
return this;
}
/**
* Get id
*
* @return id
*/
@Schema(description = "")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Attachment name(String name) {
this.name = name;
return this;
}
/**
* Get name
*
* @return name
*/
@Schema(description = "")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Attachment size(Long size) {
this.size = size;
return this;
}
/**
* Get size
*
* @return size
*/
@Schema(description = "")
public Long getSize() {
return size;
}
public void setSize(Long size) {
this.size = size;
}
public Attachment uuid(String uuid) {
this.uuid = uuid;
return this;
}
/**
* Get uuid
*
* @return uuid
*/
@Schema(description = "")
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
this.uuid = uuid;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Attachment attachment = (Attachment) o;
return Objects.equals(this.browserDownloadUrl, attachment.browserDownloadUrl)
&& Objects.equals(this.createdAt, attachment.createdAt)
&& Objects.equals(this.downloadCount, attachment.downloadCount)
&& Objects.equals(this.id, attachment.id)
&& Objects.equals(this.name, attachment.name)
&& Objects.equals(this.size, attachment.size)
&& Objects.equals(this.uuid, attachment.uuid);
}
@Override
public int hashCode() {
return Objects.hash(browserDownloadUrl, createdAt, downloadCount, id, name, size, uuid);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Attachment {\n");
sb.append(" browserDownloadUrl: ").append(toIndentedString(browserDownloadUrl)).append("\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" downloadCount: ").append(toIndentedString(downloadCount)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" size: ").append(toIndentedString(size)).append("\n");
sb.append(" uuid: ").append(toIndentedString(uuid)).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,298 @@
/*
* 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.ArrayList;
import java.util.List;
import java.util.Objects;
/** Branch represents a repository branch */
@Schema(description = "Branch represents a repository branch")
public class Branch implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("commit")
private PayloadCommit commit = null;
@SerializedName("effective_branch_protection_name")
private String effectiveBranchProtectionName = null;
@SerializedName("enable_status_check")
private Boolean enableStatusCheck = null;
@SerializedName("name")
private String name = null;
@SerializedName("protected")
private Boolean _protected = null;
@SerializedName("required_approvals")
private Long requiredApprovals = null;
@SerializedName("status_check_contexts")
private List<String> statusCheckContexts = null;
@SerializedName("user_can_merge")
private Boolean userCanMerge = null;
@SerializedName("user_can_push")
private Boolean userCanPush = null;
public Branch commit(PayloadCommit commit) {
this.commit = commit;
return this;
}
/**
* Get commit
*
* @return commit
*/
@Schema(description = "")
public PayloadCommit getCommit() {
return commit;
}
public void setCommit(PayloadCommit commit) {
this.commit = commit;
}
public Branch effectiveBranchProtectionName(String effectiveBranchProtectionName) {
this.effectiveBranchProtectionName = effectiveBranchProtectionName;
return this;
}
/**
* Get effectiveBranchProtectionName
*
* @return effectiveBranchProtectionName
*/
@Schema(description = "")
public String getEffectiveBranchProtectionName() {
return effectiveBranchProtectionName;
}
public void setEffectiveBranchProtectionName(String effectiveBranchProtectionName) {
this.effectiveBranchProtectionName = effectiveBranchProtectionName;
}
public Branch enableStatusCheck(Boolean enableStatusCheck) {
this.enableStatusCheck = enableStatusCheck;
return this;
}
/**
* Get enableStatusCheck
*
* @return enableStatusCheck
*/
@Schema(description = "")
public Boolean isEnableStatusCheck() {
return enableStatusCheck;
}
public void setEnableStatusCheck(Boolean enableStatusCheck) {
this.enableStatusCheck = enableStatusCheck;
}
public Branch name(String name) {
this.name = name;
return this;
}
/**
* Get name
*
* @return name
*/
@Schema(description = "")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Branch _protected(Boolean _protected) {
this._protected = _protected;
return this;
}
/**
* Get _protected
*
* @return _protected
*/
@Schema(description = "")
public Boolean isProtected() {
return _protected;
}
public void setProtected(Boolean _protected) {
this._protected = _protected;
}
public Branch requiredApprovals(Long requiredApprovals) {
this.requiredApprovals = requiredApprovals;
return this;
}
/**
* Get requiredApprovals
*
* @return requiredApprovals
*/
@Schema(description = "")
public Long getRequiredApprovals() {
return requiredApprovals;
}
public void setRequiredApprovals(Long requiredApprovals) {
this.requiredApprovals = requiredApprovals;
}
public Branch statusCheckContexts(List<String> statusCheckContexts) {
this.statusCheckContexts = statusCheckContexts;
return this;
}
public Branch addStatusCheckContextsItem(String statusCheckContextsItem) {
if (this.statusCheckContexts == null) {
this.statusCheckContexts = new ArrayList<>();
}
this.statusCheckContexts.add(statusCheckContextsItem);
return this;
}
/**
* Get statusCheckContexts
*
* @return statusCheckContexts
*/
@Schema(description = "")
public List<String> getStatusCheckContexts() {
return statusCheckContexts;
}
public void setStatusCheckContexts(List<String> statusCheckContexts) {
this.statusCheckContexts = statusCheckContexts;
}
public Branch userCanMerge(Boolean userCanMerge) {
this.userCanMerge = userCanMerge;
return this;
}
/**
* Get userCanMerge
*
* @return userCanMerge
*/
@Schema(description = "")
public Boolean isUserCanMerge() {
return userCanMerge;
}
public void setUserCanMerge(Boolean userCanMerge) {
this.userCanMerge = userCanMerge;
}
public Branch userCanPush(Boolean userCanPush) {
this.userCanPush = userCanPush;
return this;
}
/**
* Get userCanPush
*
* @return userCanPush
*/
@Schema(description = "")
public Boolean isUserCanPush() {
return userCanPush;
}
public void setUserCanPush(Boolean userCanPush) {
this.userCanPush = userCanPush;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Branch branch = (Branch) o;
return Objects.equals(this.commit, branch.commit)
&& Objects.equals(this.effectiveBranchProtectionName, branch.effectiveBranchProtectionName)
&& Objects.equals(this.enableStatusCheck, branch.enableStatusCheck)
&& Objects.equals(this.name, branch.name)
&& Objects.equals(this._protected, branch._protected)
&& Objects.equals(this.requiredApprovals, branch.requiredApprovals)
&& Objects.equals(this.statusCheckContexts, branch.statusCheckContexts)
&& Objects.equals(this.userCanMerge, branch.userCanMerge)
&& Objects.equals(this.userCanPush, branch.userCanPush);
}
@Override
public int hashCode() {
return Objects.hash(
commit,
effectiveBranchProtectionName,
enableStatusCheck,
name,
_protected,
requiredApprovals,
statusCheckContexts,
userCanMerge,
userCanPush);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Branch {\n");
sb.append(" commit: ").append(toIndentedString(commit)).append("\n");
sb.append(" effectiveBranchProtectionName: ")
.append(toIndentedString(effectiveBranchProtectionName))
.append("\n");
sb.append(" enableStatusCheck: ").append(toIndentedString(enableStatusCheck)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" _protected: ").append(toIndentedString(_protected)).append("\n");
sb.append(" requiredApprovals: ").append(toIndentedString(requiredApprovals)).append("\n");
sb.append(" statusCheckContexts: ")
.append(toIndentedString(statusCheckContexts))
.append("\n");
sb.append(" userCanMerge: ").append(toIndentedString(userCanMerge)).append("\n");
sb.append(" userCanPush: ").append(toIndentedString(userCanPush)).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,754 @@
/*
* 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.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
/** BranchProtection represents a branch protection for a repository */
@Schema(description = "BranchProtection represents a branch protection for a repository")
public class BranchProtection implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("approvals_whitelist_teams")
private List<String> approvalsWhitelistTeams = null;
@SerializedName("approvals_whitelist_username")
private List<String> approvalsWhitelistUsername = null;
@SerializedName("block_on_official_review_requests")
private Boolean blockOnOfficialReviewRequests = null;
@SerializedName("block_on_outdated_branch")
private Boolean blockOnOutdatedBranch = null;
@SerializedName("block_on_rejected_reviews")
private Boolean blockOnRejectedReviews = null;
@SerializedName("branch_name")
private String branchName = null;
@SerializedName("created_at")
private Date createdAt = null;
@SerializedName("dismiss_stale_approvals")
private Boolean dismissStaleApprovals = null;
@SerializedName("enable_approvals_whitelist")
private Boolean enableApprovalsWhitelist = null;
@SerializedName("enable_merge_whitelist")
private Boolean enableMergeWhitelist = null;
@SerializedName("enable_push")
private Boolean enablePush = null;
@SerializedName("enable_push_whitelist")
private Boolean enablePushWhitelist = null;
@SerializedName("enable_status_check")
private Boolean enableStatusCheck = null;
@SerializedName("merge_whitelist_teams")
private List<String> mergeWhitelistTeams = null;
@SerializedName("merge_whitelist_usernames")
private List<String> mergeWhitelistUsernames = null;
@SerializedName("protected_file_patterns")
private String protectedFilePatterns = null;
@SerializedName("push_whitelist_deploy_keys")
private Boolean pushWhitelistDeployKeys = null;
@SerializedName("push_whitelist_teams")
private List<String> pushWhitelistTeams = null;
@SerializedName("push_whitelist_usernames")
private List<String> pushWhitelistUsernames = null;
@SerializedName("require_signed_commits")
private Boolean requireSignedCommits = null;
@SerializedName("required_approvals")
private Long requiredApprovals = null;
@SerializedName("status_check_contexts")
private List<String> statusCheckContexts = null;
@SerializedName("unprotected_file_patterns")
private String unprotectedFilePatterns = null;
@SerializedName("updated_at")
private Date updatedAt = null;
public BranchProtection approvalsWhitelistTeams(List<String> approvalsWhitelistTeams) {
this.approvalsWhitelistTeams = approvalsWhitelistTeams;
return this;
}
public BranchProtection addApprovalsWhitelistTeamsItem(String approvalsWhitelistTeamsItem) {
if (this.approvalsWhitelistTeams == null) {
this.approvalsWhitelistTeams = new ArrayList<>();
}
this.approvalsWhitelistTeams.add(approvalsWhitelistTeamsItem);
return this;
}
/**
* Get approvalsWhitelistTeams
*
* @return approvalsWhitelistTeams
*/
@Schema(description = "")
public List<String> getApprovalsWhitelistTeams() {
return approvalsWhitelistTeams;
}
public void setApprovalsWhitelistTeams(List<String> approvalsWhitelistTeams) {
this.approvalsWhitelistTeams = approvalsWhitelistTeams;
}
public BranchProtection approvalsWhitelistUsername(List<String> approvalsWhitelistUsername) {
this.approvalsWhitelistUsername = approvalsWhitelistUsername;
return this;
}
public BranchProtection addApprovalsWhitelistUsernameItem(String approvalsWhitelistUsernameItem) {
if (this.approvalsWhitelistUsername == null) {
this.approvalsWhitelistUsername = new ArrayList<>();
}
this.approvalsWhitelistUsername.add(approvalsWhitelistUsernameItem);
return this;
}
/**
* Get approvalsWhitelistUsername
*
* @return approvalsWhitelistUsername
*/
@Schema(description = "")
public List<String> getApprovalsWhitelistUsername() {
return approvalsWhitelistUsername;
}
public void setApprovalsWhitelistUsername(List<String> approvalsWhitelistUsername) {
this.approvalsWhitelistUsername = approvalsWhitelistUsername;
}
public BranchProtection blockOnOfficialReviewRequests(Boolean blockOnOfficialReviewRequests) {
this.blockOnOfficialReviewRequests = blockOnOfficialReviewRequests;
return this;
}
/**
* Get blockOnOfficialReviewRequests
*
* @return blockOnOfficialReviewRequests
*/
@Schema(description = "")
public Boolean isBlockOnOfficialReviewRequests() {
return blockOnOfficialReviewRequests;
}
public void setBlockOnOfficialReviewRequests(Boolean blockOnOfficialReviewRequests) {
this.blockOnOfficialReviewRequests = blockOnOfficialReviewRequests;
}
public BranchProtection blockOnOutdatedBranch(Boolean blockOnOutdatedBranch) {
this.blockOnOutdatedBranch = blockOnOutdatedBranch;
return this;
}
/**
* Get blockOnOutdatedBranch
*
* @return blockOnOutdatedBranch
*/
@Schema(description = "")
public Boolean isBlockOnOutdatedBranch() {
return blockOnOutdatedBranch;
}
public void setBlockOnOutdatedBranch(Boolean blockOnOutdatedBranch) {
this.blockOnOutdatedBranch = blockOnOutdatedBranch;
}
public BranchProtection blockOnRejectedReviews(Boolean blockOnRejectedReviews) {
this.blockOnRejectedReviews = blockOnRejectedReviews;
return this;
}
/**
* Get blockOnRejectedReviews
*
* @return blockOnRejectedReviews
*/
@Schema(description = "")
public Boolean isBlockOnRejectedReviews() {
return blockOnRejectedReviews;
}
public void setBlockOnRejectedReviews(Boolean blockOnRejectedReviews) {
this.blockOnRejectedReviews = blockOnRejectedReviews;
}
public BranchProtection branchName(String branchName) {
this.branchName = branchName;
return this;
}
/**
* Get branchName
*
* @return branchName
*/
@Schema(description = "")
public String getBranchName() {
return branchName;
}
public void setBranchName(String branchName) {
this.branchName = branchName;
}
public BranchProtection 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 BranchProtection dismissStaleApprovals(Boolean dismissStaleApprovals) {
this.dismissStaleApprovals = dismissStaleApprovals;
return this;
}
/**
* Get dismissStaleApprovals
*
* @return dismissStaleApprovals
*/
@Schema(description = "")
public Boolean isDismissStaleApprovals() {
return dismissStaleApprovals;
}
public void setDismissStaleApprovals(Boolean dismissStaleApprovals) {
this.dismissStaleApprovals = dismissStaleApprovals;
}
public BranchProtection enableApprovalsWhitelist(Boolean enableApprovalsWhitelist) {
this.enableApprovalsWhitelist = enableApprovalsWhitelist;
return this;
}
/**
* Get enableApprovalsWhitelist
*
* @return enableApprovalsWhitelist
*/
@Schema(description = "")
public Boolean isEnableApprovalsWhitelist() {
return enableApprovalsWhitelist;
}
public void setEnableApprovalsWhitelist(Boolean enableApprovalsWhitelist) {
this.enableApprovalsWhitelist = enableApprovalsWhitelist;
}
public BranchProtection enableMergeWhitelist(Boolean enableMergeWhitelist) {
this.enableMergeWhitelist = enableMergeWhitelist;
return this;
}
/**
* Get enableMergeWhitelist
*
* @return enableMergeWhitelist
*/
@Schema(description = "")
public Boolean isEnableMergeWhitelist() {
return enableMergeWhitelist;
}
public void setEnableMergeWhitelist(Boolean enableMergeWhitelist) {
this.enableMergeWhitelist = enableMergeWhitelist;
}
public BranchProtection enablePush(Boolean enablePush) {
this.enablePush = enablePush;
return this;
}
/**
* Get enablePush
*
* @return enablePush
*/
@Schema(description = "")
public Boolean isEnablePush() {
return enablePush;
}
public void setEnablePush(Boolean enablePush) {
this.enablePush = enablePush;
}
public BranchProtection enablePushWhitelist(Boolean enablePushWhitelist) {
this.enablePushWhitelist = enablePushWhitelist;
return this;
}
/**
* Get enablePushWhitelist
*
* @return enablePushWhitelist
*/
@Schema(description = "")
public Boolean isEnablePushWhitelist() {
return enablePushWhitelist;
}
public void setEnablePushWhitelist(Boolean enablePushWhitelist) {
this.enablePushWhitelist = enablePushWhitelist;
}
public BranchProtection enableStatusCheck(Boolean enableStatusCheck) {
this.enableStatusCheck = enableStatusCheck;
return this;
}
/**
* Get enableStatusCheck
*
* @return enableStatusCheck
*/
@Schema(description = "")
public Boolean isEnableStatusCheck() {
return enableStatusCheck;
}
public void setEnableStatusCheck(Boolean enableStatusCheck) {
this.enableStatusCheck = enableStatusCheck;
}
public BranchProtection mergeWhitelistTeams(List<String> mergeWhitelistTeams) {
this.mergeWhitelistTeams = mergeWhitelistTeams;
return this;
}
public BranchProtection addMergeWhitelistTeamsItem(String mergeWhitelistTeamsItem) {
if (this.mergeWhitelistTeams == null) {
this.mergeWhitelistTeams = new ArrayList<>();
}
this.mergeWhitelistTeams.add(mergeWhitelistTeamsItem);
return this;
}
/**
* Get mergeWhitelistTeams
*
* @return mergeWhitelistTeams
*/
@Schema(description = "")
public List<String> getMergeWhitelistTeams() {
return mergeWhitelistTeams;
}
public void setMergeWhitelistTeams(List<String> mergeWhitelistTeams) {
this.mergeWhitelistTeams = mergeWhitelistTeams;
}
public BranchProtection mergeWhitelistUsernames(List<String> mergeWhitelistUsernames) {
this.mergeWhitelistUsernames = mergeWhitelistUsernames;
return this;
}
public BranchProtection addMergeWhitelistUsernamesItem(String mergeWhitelistUsernamesItem) {
if (this.mergeWhitelistUsernames == null) {
this.mergeWhitelistUsernames = new ArrayList<>();
}
this.mergeWhitelistUsernames.add(mergeWhitelistUsernamesItem);
return this;
}
/**
* Get mergeWhitelistUsernames
*
* @return mergeWhitelistUsernames
*/
@Schema(description = "")
public List<String> getMergeWhitelistUsernames() {
return mergeWhitelistUsernames;
}
public void setMergeWhitelistUsernames(List<String> mergeWhitelistUsernames) {
this.mergeWhitelistUsernames = mergeWhitelistUsernames;
}
public BranchProtection protectedFilePatterns(String protectedFilePatterns) {
this.protectedFilePatterns = protectedFilePatterns;
return this;
}
/**
* Get protectedFilePatterns
*
* @return protectedFilePatterns
*/
@Schema(description = "")
public String getProtectedFilePatterns() {
return protectedFilePatterns;
}
public void setProtectedFilePatterns(String protectedFilePatterns) {
this.protectedFilePatterns = protectedFilePatterns;
}
public BranchProtection pushWhitelistDeployKeys(Boolean pushWhitelistDeployKeys) {
this.pushWhitelistDeployKeys = pushWhitelistDeployKeys;
return this;
}
/**
* Get pushWhitelistDeployKeys
*
* @return pushWhitelistDeployKeys
*/
@Schema(description = "")
public Boolean isPushWhitelistDeployKeys() {
return pushWhitelistDeployKeys;
}
public void setPushWhitelistDeployKeys(Boolean pushWhitelistDeployKeys) {
this.pushWhitelistDeployKeys = pushWhitelistDeployKeys;
}
public BranchProtection pushWhitelistTeams(List<String> pushWhitelistTeams) {
this.pushWhitelistTeams = pushWhitelistTeams;
return this;
}
public BranchProtection addPushWhitelistTeamsItem(String pushWhitelistTeamsItem) {
if (this.pushWhitelistTeams == null) {
this.pushWhitelistTeams = new ArrayList<>();
}
this.pushWhitelistTeams.add(pushWhitelistTeamsItem);
return this;
}
/**
* Get pushWhitelistTeams
*
* @return pushWhitelistTeams
*/
@Schema(description = "")
public List<String> getPushWhitelistTeams() {
return pushWhitelistTeams;
}
public void setPushWhitelistTeams(List<String> pushWhitelistTeams) {
this.pushWhitelistTeams = pushWhitelistTeams;
}
public BranchProtection pushWhitelistUsernames(List<String> pushWhitelistUsernames) {
this.pushWhitelistUsernames = pushWhitelistUsernames;
return this;
}
public BranchProtection addPushWhitelistUsernamesItem(String pushWhitelistUsernamesItem) {
if (this.pushWhitelistUsernames == null) {
this.pushWhitelistUsernames = new ArrayList<>();
}
this.pushWhitelistUsernames.add(pushWhitelistUsernamesItem);
return this;
}
/**
* Get pushWhitelistUsernames
*
* @return pushWhitelistUsernames
*/
@Schema(description = "")
public List<String> getPushWhitelistUsernames() {
return pushWhitelistUsernames;
}
public void setPushWhitelistUsernames(List<String> pushWhitelistUsernames) {
this.pushWhitelistUsernames = pushWhitelistUsernames;
}
public BranchProtection requireSignedCommits(Boolean requireSignedCommits) {
this.requireSignedCommits = requireSignedCommits;
return this;
}
/**
* Get requireSignedCommits
*
* @return requireSignedCommits
*/
@Schema(description = "")
public Boolean isRequireSignedCommits() {
return requireSignedCommits;
}
public void setRequireSignedCommits(Boolean requireSignedCommits) {
this.requireSignedCommits = requireSignedCommits;
}
public BranchProtection requiredApprovals(Long requiredApprovals) {
this.requiredApprovals = requiredApprovals;
return this;
}
/**
* Get requiredApprovals
*
* @return requiredApprovals
*/
@Schema(description = "")
public Long getRequiredApprovals() {
return requiredApprovals;
}
public void setRequiredApprovals(Long requiredApprovals) {
this.requiredApprovals = requiredApprovals;
}
public BranchProtection statusCheckContexts(List<String> statusCheckContexts) {
this.statusCheckContexts = statusCheckContexts;
return this;
}
public BranchProtection addStatusCheckContextsItem(String statusCheckContextsItem) {
if (this.statusCheckContexts == null) {
this.statusCheckContexts = new ArrayList<>();
}
this.statusCheckContexts.add(statusCheckContextsItem);
return this;
}
/**
* Get statusCheckContexts
*
* @return statusCheckContexts
*/
@Schema(description = "")
public List<String> getStatusCheckContexts() {
return statusCheckContexts;
}
public void setStatusCheckContexts(List<String> statusCheckContexts) {
this.statusCheckContexts = statusCheckContexts;
}
public BranchProtection unprotectedFilePatterns(String unprotectedFilePatterns) {
this.unprotectedFilePatterns = unprotectedFilePatterns;
return this;
}
/**
* Get unprotectedFilePatterns
*
* @return unprotectedFilePatterns
*/
@Schema(description = "")
public String getUnprotectedFilePatterns() {
return unprotectedFilePatterns;
}
public void setUnprotectedFilePatterns(String unprotectedFilePatterns) {
this.unprotectedFilePatterns = unprotectedFilePatterns;
}
public BranchProtection 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;
}
BranchProtection branchProtection = (BranchProtection) o;
return Objects.equals(this.approvalsWhitelistTeams, branchProtection.approvalsWhitelistTeams)
&& Objects.equals(
this.approvalsWhitelistUsername, branchProtection.approvalsWhitelistUsername)
&& Objects.equals(
this.blockOnOfficialReviewRequests, branchProtection.blockOnOfficialReviewRequests)
&& Objects.equals(this.blockOnOutdatedBranch, branchProtection.blockOnOutdatedBranch)
&& Objects.equals(this.blockOnRejectedReviews, branchProtection.blockOnRejectedReviews)
&& Objects.equals(this.branchName, branchProtection.branchName)
&& Objects.equals(this.createdAt, branchProtection.createdAt)
&& Objects.equals(this.dismissStaleApprovals, branchProtection.dismissStaleApprovals)
&& Objects.equals(this.enableApprovalsWhitelist, branchProtection.enableApprovalsWhitelist)
&& Objects.equals(this.enableMergeWhitelist, branchProtection.enableMergeWhitelist)
&& Objects.equals(this.enablePush, branchProtection.enablePush)
&& Objects.equals(this.enablePushWhitelist, branchProtection.enablePushWhitelist)
&& Objects.equals(this.enableStatusCheck, branchProtection.enableStatusCheck)
&& Objects.equals(this.mergeWhitelistTeams, branchProtection.mergeWhitelistTeams)
&& Objects.equals(this.mergeWhitelistUsernames, branchProtection.mergeWhitelistUsernames)
&& Objects.equals(this.protectedFilePatterns, branchProtection.protectedFilePatterns)
&& Objects.equals(this.pushWhitelistDeployKeys, branchProtection.pushWhitelistDeployKeys)
&& Objects.equals(this.pushWhitelistTeams, branchProtection.pushWhitelistTeams)
&& Objects.equals(this.pushWhitelistUsernames, branchProtection.pushWhitelistUsernames)
&& Objects.equals(this.requireSignedCommits, branchProtection.requireSignedCommits)
&& Objects.equals(this.requiredApprovals, branchProtection.requiredApprovals)
&& Objects.equals(this.statusCheckContexts, branchProtection.statusCheckContexts)
&& Objects.equals(this.unprotectedFilePatterns, branchProtection.unprotectedFilePatterns)
&& Objects.equals(this.updatedAt, branchProtection.updatedAt);
}
@Override
public int hashCode() {
return Objects.hash(
approvalsWhitelistTeams,
approvalsWhitelistUsername,
blockOnOfficialReviewRequests,
blockOnOutdatedBranch,
blockOnRejectedReviews,
branchName,
createdAt,
dismissStaleApprovals,
enableApprovalsWhitelist,
enableMergeWhitelist,
enablePush,
enablePushWhitelist,
enableStatusCheck,
mergeWhitelistTeams,
mergeWhitelistUsernames,
protectedFilePatterns,
pushWhitelistDeployKeys,
pushWhitelistTeams,
pushWhitelistUsernames,
requireSignedCommits,
requiredApprovals,
statusCheckContexts,
unprotectedFilePatterns,
updatedAt);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class BranchProtection {\n");
sb.append(" approvalsWhitelistTeams: ")
.append(toIndentedString(approvalsWhitelistTeams))
.append("\n");
sb.append(" approvalsWhitelistUsername: ")
.append(toIndentedString(approvalsWhitelistUsername))
.append("\n");
sb.append(" blockOnOfficialReviewRequests: ")
.append(toIndentedString(blockOnOfficialReviewRequests))
.append("\n");
sb.append(" blockOnOutdatedBranch: ")
.append(toIndentedString(blockOnOutdatedBranch))
.append("\n");
sb.append(" blockOnRejectedReviews: ")
.append(toIndentedString(blockOnRejectedReviews))
.append("\n");
sb.append(" branchName: ").append(toIndentedString(branchName)).append("\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" dismissStaleApprovals: ")
.append(toIndentedString(dismissStaleApprovals))
.append("\n");
sb.append(" enableApprovalsWhitelist: ")
.append(toIndentedString(enableApprovalsWhitelist))
.append("\n");
sb.append(" enableMergeWhitelist: ")
.append(toIndentedString(enableMergeWhitelist))
.append("\n");
sb.append(" enablePush: ").append(toIndentedString(enablePush)).append("\n");
sb.append(" enablePushWhitelist: ")
.append(toIndentedString(enablePushWhitelist))
.append("\n");
sb.append(" enableStatusCheck: ").append(toIndentedString(enableStatusCheck)).append("\n");
sb.append(" mergeWhitelistTeams: ")
.append(toIndentedString(mergeWhitelistTeams))
.append("\n");
sb.append(" mergeWhitelistUsernames: ")
.append(toIndentedString(mergeWhitelistUsernames))
.append("\n");
sb.append(" protectedFilePatterns: ")
.append(toIndentedString(protectedFilePatterns))
.append("\n");
sb.append(" pushWhitelistDeployKeys: ")
.append(toIndentedString(pushWhitelistDeployKeys))
.append("\n");
sb.append(" pushWhitelistTeams: ").append(toIndentedString(pushWhitelistTeams)).append("\n");
sb.append(" pushWhitelistUsernames: ")
.append(toIndentedString(pushWhitelistUsernames))
.append("\n");
sb.append(" requireSignedCommits: ")
.append(toIndentedString(requireSignedCommits))
.append("\n");
sb.append(" requiredApprovals: ").append(toIndentedString(requiredApprovals)).append("\n");
sb.append(" statusCheckContexts: ")
.append(toIndentedString(statusCheckContexts))
.append("\n");
sb.append(" unprotectedFilePatterns: ")
.append(toIndentedString(unprotectedFilePatterns))
.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 ");
}
}
@@ -0,0 +1,238 @@
/*
* 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.ArrayList;
import java.util.List;
import java.util.Objects;
/** CombinedStatus holds the combined state of several statuses for a single commit */
@Schema(
description = "CombinedStatus holds the combined state of several statuses for a single commit")
public class CombinedStatus implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("commit_url")
private String commitUrl = null;
@SerializedName("repository")
private Repository repository = null;
@SerializedName("sha")
private String sha = null;
@SerializedName("state")
private String state = null;
@SerializedName("statuses")
private List<CommitStatus> statuses = null;
@SerializedName("total_count")
private Long totalCount = null;
@SerializedName("url")
private String url = null;
public CombinedStatus commitUrl(String commitUrl) {
this.commitUrl = commitUrl;
return this;
}
/**
* Get commitUrl
*
* @return commitUrl
*/
@Schema(description = "")
public String getCommitUrl() {
return commitUrl;
}
public void setCommitUrl(String commitUrl) {
this.commitUrl = commitUrl;
}
public CombinedStatus repository(Repository repository) {
this.repository = repository;
return this;
}
/**
* Get repository
*
* @return repository
*/
@Schema(description = "")
public Repository getRepository() {
return repository;
}
public void setRepository(Repository repository) {
this.repository = repository;
}
public CombinedStatus sha(String sha) {
this.sha = sha;
return this;
}
/**
* Get sha
*
* @return sha
*/
@Schema(description = "")
public String getSha() {
return sha;
}
public void setSha(String sha) {
this.sha = sha;
}
public CombinedStatus state(String state) {
this.state = state;
return this;
}
/**
* Get state
*
* @return state
*/
@Schema(description = "")
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public CombinedStatus statuses(List<CommitStatus> statuses) {
this.statuses = statuses;
return this;
}
public CombinedStatus addStatusesItem(CommitStatus statusesItem) {
if (this.statuses == null) {
this.statuses = new ArrayList<>();
}
this.statuses.add(statusesItem);
return this;
}
/**
* Get statuses
*
* @return statuses
*/
@Schema(description = "")
public List<CommitStatus> getStatuses() {
return statuses;
}
public void setStatuses(List<CommitStatus> statuses) {
this.statuses = statuses;
}
public CombinedStatus totalCount(Long totalCount) {
this.totalCount = totalCount;
return this;
}
/**
* Get totalCount
*
* @return totalCount
*/
@Schema(description = "")
public Long getTotalCount() {
return totalCount;
}
public void setTotalCount(Long totalCount) {
this.totalCount = totalCount;
}
public CombinedStatus url(String url) {
this.url = url;
return this;
}
/**
* Get url
*
* @return url
*/
@Schema(description = "")
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CombinedStatus combinedStatus = (CombinedStatus) o;
return Objects.equals(this.commitUrl, combinedStatus.commitUrl)
&& Objects.equals(this.repository, combinedStatus.repository)
&& Objects.equals(this.sha, combinedStatus.sha)
&& Objects.equals(this.state, combinedStatus.state)
&& Objects.equals(this.statuses, combinedStatus.statuses)
&& Objects.equals(this.totalCount, combinedStatus.totalCount)
&& Objects.equals(this.url, combinedStatus.url);
}
@Override
public int hashCode() {
return Objects.hash(commitUrl, repository, sha, state, statuses, totalCount, url);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CombinedStatus {\n");
sb.append(" commitUrl: ").append(toIndentedString(commitUrl)).append("\n");
sb.append(" repository: ").append(toIndentedString(repository)).append("\n");
sb.append(" sha: ").append(toIndentedString(sha)).append("\n");
sb.append(" state: ").append(toIndentedString(state)).append("\n");
sb.append(" statuses: ").append(toIndentedString(statuses)).append("\n");
sb.append(" totalCount: ").append(toIndentedString(totalCount)).append("\n");
sb.append(" url: ").append(toIndentedString(url)).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,310 @@
/*
* 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.Date;
import java.util.Objects;
/** Comment represents a comment on a commit or issue */
@Schema(description = "Comment represents a comment on a commit or issue")
public class Comment implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("body")
private String body = null;
@SerializedName("created_at")
private Date createdAt = null;
@SerializedName("html_url")
private String htmlUrl = null;
@SerializedName("id")
private Long id = null;
@SerializedName("issue_url")
private String issueUrl = null;
@SerializedName("original_author")
private String originalAuthor = null;
@SerializedName("original_author_id")
private Long originalAuthorId = null;
@SerializedName("pull_request_url")
private String pullRequestUrl = null;
@SerializedName("updated_at")
private Date updatedAt = null;
@SerializedName("user")
private User user = null;
public Comment body(String body) {
this.body = body;
return this;
}
/**
* Get body
*
* @return body
*/
@Schema(description = "")
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
public Comment 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 Comment htmlUrl(String htmlUrl) {
this.htmlUrl = htmlUrl;
return this;
}
/**
* Get htmlUrl
*
* @return htmlUrl
*/
@Schema(description = "")
public String getHtmlUrl() {
return htmlUrl;
}
public void setHtmlUrl(String htmlUrl) {
this.htmlUrl = htmlUrl;
}
public Comment id(Long id) {
this.id = id;
return this;
}
/**
* Get id
*
* @return id
*/
@Schema(description = "")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Comment issueUrl(String issueUrl) {
this.issueUrl = issueUrl;
return this;
}
/**
* Get issueUrl
*
* @return issueUrl
*/
@Schema(description = "")
public String getIssueUrl() {
return issueUrl;
}
public void setIssueUrl(String issueUrl) {
this.issueUrl = issueUrl;
}
public Comment originalAuthor(String originalAuthor) {
this.originalAuthor = originalAuthor;
return this;
}
/**
* Get originalAuthor
*
* @return originalAuthor
*/
@Schema(description = "")
public String getOriginalAuthor() {
return originalAuthor;
}
public void setOriginalAuthor(String originalAuthor) {
this.originalAuthor = originalAuthor;
}
public Comment originalAuthorId(Long originalAuthorId) {
this.originalAuthorId = originalAuthorId;
return this;
}
/**
* Get originalAuthorId
*
* @return originalAuthorId
*/
@Schema(description = "")
public Long getOriginalAuthorId() {
return originalAuthorId;
}
public void setOriginalAuthorId(Long originalAuthorId) {
this.originalAuthorId = originalAuthorId;
}
public Comment pullRequestUrl(String pullRequestUrl) {
this.pullRequestUrl = pullRequestUrl;
return this;
}
/**
* Get pullRequestUrl
*
* @return pullRequestUrl
*/
@Schema(description = "")
public String getPullRequestUrl() {
return pullRequestUrl;
}
public void setPullRequestUrl(String pullRequestUrl) {
this.pullRequestUrl = pullRequestUrl;
}
public Comment 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;
}
public Comment user(User user) {
this.user = user;
return this;
}
/**
* Get user
*
* @return user
*/
@Schema(description = "")
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Comment comment = (Comment) o;
return Objects.equals(this.body, comment.body)
&& Objects.equals(this.createdAt, comment.createdAt)
&& Objects.equals(this.htmlUrl, comment.htmlUrl)
&& Objects.equals(this.id, comment.id)
&& Objects.equals(this.issueUrl, comment.issueUrl)
&& Objects.equals(this.originalAuthor, comment.originalAuthor)
&& Objects.equals(this.originalAuthorId, comment.originalAuthorId)
&& Objects.equals(this.pullRequestUrl, comment.pullRequestUrl)
&& Objects.equals(this.updatedAt, comment.updatedAt)
&& Objects.equals(this.user, comment.user);
}
@Override
public int hashCode() {
return Objects.hash(
body,
createdAt,
htmlUrl,
id,
issueUrl,
originalAuthor,
originalAuthorId,
pullRequestUrl,
updatedAt,
user);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Comment {\n");
sb.append(" body: ").append(toIndentedString(body)).append("\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" htmlUrl: ").append(toIndentedString(htmlUrl)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" issueUrl: ").append(toIndentedString(issueUrl)).append("\n");
sb.append(" originalAuthor: ").append(toIndentedString(originalAuthor)).append("\n");
sb.append(" originalAuthorId: ").append(toIndentedString(originalAuthorId)).append("\n");
sb.append(" pullRequestUrl: ").append(toIndentedString(pullRequestUrl)).append("\n");
sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
sb.append(" user: ").append(toIndentedString(user)).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,293 @@
/*
* 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.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
/** Commit */
public class Commit implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("author")
private User author = null;
@SerializedName("commit")
private RepoCommit commit = null;
@SerializedName("committer")
private User committer = null;
@SerializedName("created")
private Date created = null;
@SerializedName("files")
private List<CommitAffectedFiles> files = null;
@SerializedName("html_url")
private String htmlUrl = null;
@SerializedName("parents")
private List<CommitMeta> parents = null;
@SerializedName("sha")
private String sha = null;
@SerializedName("url")
private String url = null;
public Commit author(User author) {
this.author = author;
return this;
}
/**
* Get author
*
* @return author
*/
@Schema(description = "")
public User getAuthor() {
return author;
}
public void setAuthor(User author) {
this.author = author;
}
public Commit commit(RepoCommit commit) {
this.commit = commit;
return this;
}
/**
* Get commit
*
* @return commit
*/
@Schema(description = "")
public RepoCommit getCommit() {
return commit;
}
public void setCommit(RepoCommit commit) {
this.commit = commit;
}
public Commit committer(User committer) {
this.committer = committer;
return this;
}
/**
* Get committer
*
* @return committer
*/
@Schema(description = "")
public User getCommitter() {
return committer;
}
public void setCommitter(User committer) {
this.committer = committer;
}
public Commit created(Date created) {
this.created = created;
return this;
}
/**
* Get created
*
* @return created
*/
@Schema(description = "")
public Date getCreated() {
return created;
}
public void setCreated(Date created) {
this.created = created;
}
public Commit files(List<CommitAffectedFiles> files) {
this.files = files;
return this;
}
public Commit addFilesItem(CommitAffectedFiles filesItem) {
if (this.files == null) {
this.files = new ArrayList<>();
}
this.files.add(filesItem);
return this;
}
/**
* Get files
*
* @return files
*/
@Schema(description = "")
public List<CommitAffectedFiles> getFiles() {
return files;
}
public void setFiles(List<CommitAffectedFiles> files) {
this.files = files;
}
public Commit htmlUrl(String htmlUrl) {
this.htmlUrl = htmlUrl;
return this;
}
/**
* Get htmlUrl
*
* @return htmlUrl
*/
@Schema(description = "")
public String getHtmlUrl() {
return htmlUrl;
}
public void setHtmlUrl(String htmlUrl) {
this.htmlUrl = htmlUrl;
}
public Commit parents(List<CommitMeta> parents) {
this.parents = parents;
return this;
}
public Commit addParentsItem(CommitMeta parentsItem) {
if (this.parents == null) {
this.parents = new ArrayList<>();
}
this.parents.add(parentsItem);
return this;
}
/**
* Get parents
*
* @return parents
*/
@Schema(description = "")
public List<CommitMeta> getParents() {
return parents;
}
public void setParents(List<CommitMeta> parents) {
this.parents = parents;
}
public Commit sha(String sha) {
this.sha = sha;
return this;
}
/**
* Get sha
*
* @return sha
*/
@Schema(description = "")
public String getSha() {
return sha;
}
public void setSha(String sha) {
this.sha = sha;
}
public Commit url(String url) {
this.url = url;
return this;
}
/**
* Get url
*
* @return url
*/
@Schema(description = "")
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Commit commit = (Commit) o;
return Objects.equals(this.author, commit.author)
&& Objects.equals(this.commit, commit.commit)
&& Objects.equals(this.committer, commit.committer)
&& Objects.equals(this.created, commit.created)
&& Objects.equals(this.files, commit.files)
&& Objects.equals(this.htmlUrl, commit.htmlUrl)
&& Objects.equals(this.parents, commit.parents)
&& Objects.equals(this.sha, commit.sha)
&& Objects.equals(this.url, commit.url);
}
@Override
public int hashCode() {
return Objects.hash(author, commit, committer, created, files, htmlUrl, parents, sha, url);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Commit {\n");
sb.append(" author: ").append(toIndentedString(author)).append("\n");
sb.append(" commit: ").append(toIndentedString(commit)).append("\n");
sb.append(" committer: ").append(toIndentedString(committer)).append("\n");
sb.append(" created: ").append(toIndentedString(created)).append("\n");
sb.append(" files: ").append(toIndentedString(files)).append("\n");
sb.append(" htmlUrl: ").append(toIndentedString(htmlUrl)).append("\n");
sb.append(" parents: ").append(toIndentedString(parents)).append("\n");
sb.append(" sha: ").append(toIndentedString(sha)).append("\n");
sb.append(" url: ").append(toIndentedString(url)).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,83 @@
/*
* 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;
/** CommitAffectedFiles store information about files affected by the commit */
@Schema(description = "CommitAffectedFiles store information about files affected by the commit")
public class CommitAffectedFiles implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("filename")
private String filename = null;
public CommitAffectedFiles filename(String filename) {
this.filename = filename;
return this;
}
/**
* Get filename
*
* @return filename
*/
@Schema(description = "")
public String getFilename() {
return filename;
}
public void setFilename(String filename) {
this.filename = filename;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CommitAffectedFiles commitAffectedFiles = (CommitAffectedFiles) o;
return Objects.equals(this.filename, commitAffectedFiles.filename);
}
@Override
public int hashCode() {
return Objects.hash(filename);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CommitAffectedFiles {\n");
sb.append(" filename: ").append(toIndentedString(filename)).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,108 @@
/*
* 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.Date;
import java.util.Objects;
/** CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE */
@Schema(description = "CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE")
public class CommitDateOptions implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("author")
private Date author = null;
@SerializedName("committer")
private Date committer = null;
public CommitDateOptions author(Date author) {
this.author = author;
return this;
}
/**
* Get author
*
* @return author
*/
@Schema(description = "")
public Date getAuthor() {
return author;
}
public void setAuthor(Date author) {
this.author = author;
}
public CommitDateOptions committer(Date committer) {
this.committer = committer;
return this;
}
/**
* Get committer
*
* @return committer
*/
@Schema(description = "")
public Date getCommitter() {
return committer;
}
public void setCommitter(Date committer) {
this.committer = committer;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CommitDateOptions commitDateOptions = (CommitDateOptions) o;
return Objects.equals(this.author, commitDateOptions.author)
&& Objects.equals(this.committer, commitDateOptions.committer);
}
@Override
public int hashCode() {
return Objects.hash(author, committer);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CommitDateOptions {\n");
sb.append(" author: ").append(toIndentedString(author)).append("\n");
sb.append(" committer: ").append(toIndentedString(committer)).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,131 @@
/*
* 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.Date;
import java.util.Objects;
/** CommitMeta */
public class CommitMeta implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("created")
private Date created = null;
@SerializedName("sha")
private String sha = null;
@SerializedName("url")
private String url = null;
public CommitMeta created(Date created) {
this.created = created;
return this;
}
/**
* Get created
*
* @return created
*/
@Schema(description = "")
public Date getCreated() {
return created;
}
public void setCreated(Date created) {
this.created = created;
}
public CommitMeta sha(String sha) {
this.sha = sha;
return this;
}
/**
* Get sha
*
* @return sha
*/
@Schema(description = "")
public String getSha() {
return sha;
}
public void setSha(String sha) {
this.sha = sha;
}
public CommitMeta url(String url) {
this.url = url;
return this;
}
/**
* Get url
*
* @return url
*/
@Schema(description = "")
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CommitMeta commitMeta = (CommitMeta) o;
return Objects.equals(this.created, commitMeta.created)
&& Objects.equals(this.sha, commitMeta.sha)
&& Objects.equals(this.url, commitMeta.url);
}
@Override
public int hashCode() {
return Objects.hash(created, sha, url);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CommitMeta {\n");
sb.append(" created: ").append(toIndentedString(created)).append("\n");
sb.append(" sha: ").append(toIndentedString(sha)).append("\n");
sb.append(" url: ").append(toIndentedString(url)).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,277 @@
/*
* 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.Date;
import java.util.Objects;
/** CommitStatus holds a single status of a single Commit */
@Schema(description = "CommitStatus holds a single status of a single Commit")
public class CommitStatus implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("context")
private String context = null;
@SerializedName("created_at")
private Date createdAt = null;
@SerializedName("creator")
private User creator = null;
@SerializedName("description")
private String description = null;
@SerializedName("id")
private Long id = null;
@SerializedName("status")
private String status = null;
@SerializedName("target_url")
private String targetUrl = null;
@SerializedName("updated_at")
private Date updatedAt = null;
@SerializedName("url")
private String url = null;
public CommitStatus context(String context) {
this.context = context;
return this;
}
/**
* Get context
*
* @return context
*/
@Schema(description = "")
public String getContext() {
return context;
}
public void setContext(String context) {
this.context = context;
}
public CommitStatus 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 CommitStatus creator(User creator) {
this.creator = creator;
return this;
}
/**
* Get creator
*
* @return creator
*/
@Schema(description = "")
public User getCreator() {
return creator;
}
public void setCreator(User creator) {
this.creator = creator;
}
public CommitStatus description(String description) {
this.description = description;
return this;
}
/**
* Get description
*
* @return description
*/
@Schema(description = "")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public CommitStatus id(Long id) {
this.id = id;
return this;
}
/**
* Get id
*
* @return id
*/
@Schema(description = "")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public CommitStatus status(String status) {
this.status = status;
return this;
}
/**
* Get status
*
* @return status
*/
@Schema(description = "")
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public CommitStatus targetUrl(String targetUrl) {
this.targetUrl = targetUrl;
return this;
}
/**
* Get targetUrl
*
* @return targetUrl
*/
@Schema(description = "")
public String getTargetUrl() {
return targetUrl;
}
public void setTargetUrl(String targetUrl) {
this.targetUrl = targetUrl;
}
public CommitStatus 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;
}
public CommitStatus url(String url) {
this.url = url;
return this;
}
/**
* Get url
*
* @return url
*/
@Schema(description = "")
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CommitStatus commitStatus = (CommitStatus) o;
return Objects.equals(this.context, commitStatus.context)
&& Objects.equals(this.createdAt, commitStatus.createdAt)
&& Objects.equals(this.creator, commitStatus.creator)
&& Objects.equals(this.description, commitStatus.description)
&& Objects.equals(this.id, commitStatus.id)
&& Objects.equals(this.status, commitStatus.status)
&& Objects.equals(this.targetUrl, commitStatus.targetUrl)
&& Objects.equals(this.updatedAt, commitStatus.updatedAt)
&& Objects.equals(this.url, commitStatus.url);
}
@Override
public int hashCode() {
return Objects.hash(
context, createdAt, creator, description, id, status, targetUrl, updatedAt, url);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CommitStatus {\n");
sb.append(" context: ").append(toIndentedString(context)).append("\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" creator: ").append(toIndentedString(creator)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" targetUrl: ").append(toIndentedString(targetUrl)).append("\n");
sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
sb.append(" url: ").append(toIndentedString(url)).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,130 @@
/*
* 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;
/** CommitUser */
public class CommitUser implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("date")
private String date = null;
@SerializedName("email")
private String email = null;
@SerializedName("name")
private String name = null;
public CommitUser date(String date) {
this.date = date;
return this;
}
/**
* Get date
*
* @return date
*/
@Schema(description = "")
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public CommitUser email(String email) {
this.email = email;
return this;
}
/**
* Get email
*
* @return email
*/
@Schema(description = "")
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public CommitUser name(String name) {
this.name = name;
return this;
}
/**
* Get name
*
* @return name
*/
@Schema(description = "")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CommitUser commitUser = (CommitUser) o;
return Objects.equals(this.date, commitUser.date)
&& Objects.equals(this.email, commitUser.email)
&& Objects.equals(this.name, commitUser.name);
}
@Override
public int hashCode() {
return Objects.hash(date, email, name);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CommitUser {\n");
sb.append(" date: ").append(toIndentedString(date)).append("\n");
sb.append(" email: ").append(toIndentedString(email)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).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,418 @@
/*
* 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;
/**
* ContentsResponse contains information about a repo&#x27;s entry&#x27;s (dir, file, symlink,
* submodule) metadata and content
*/
@Schema(
description =
"ContentsResponse contains information about a repo's entry's (dir, file, symlink,"
+ " submodule) metadata and content")
public class ContentsResponse implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("_links")
private FileLinksResponse _links = null;
@SerializedName("content")
private String content = null;
@SerializedName("download_url")
private String downloadUrl = null;
@SerializedName("encoding")
private String encoding = null;
@SerializedName("git_url")
private String gitUrl = null;
@SerializedName("html_url")
private String htmlUrl = null;
@SerializedName("name")
private String name = null;
@SerializedName("path")
private String path = null;
@SerializedName("sha")
private String sha = null;
@SerializedName("size")
private Long size = null;
@SerializedName("submodule_git_url")
private String submoduleGitUrl = null;
@SerializedName("target")
private String target = null;
@SerializedName("type")
private String type = null;
@SerializedName("url")
private String url = null;
public ContentsResponse _links(FileLinksResponse _links) {
this._links = _links;
return this;
}
/**
* Get _links
*
* @return _links
*/
@Schema(description = "")
public FileLinksResponse getLinks() {
return _links;
}
public void setLinks(FileLinksResponse _links) {
this._links = _links;
}
public ContentsResponse content(String content) {
this.content = content;
return this;
}
/**
* &#x60;content&#x60; is populated when &#x60;type&#x60; is &#x60;file&#x60;, otherwise null
*
* @return content
*/
@Schema(description = "`content` is populated when `type` is `file`, otherwise null")
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public ContentsResponse downloadUrl(String downloadUrl) {
this.downloadUrl = downloadUrl;
return this;
}
/**
* Get downloadUrl
*
* @return downloadUrl
*/
@Schema(description = "")
public String getDownloadUrl() {
return downloadUrl;
}
public void setDownloadUrl(String downloadUrl) {
this.downloadUrl = downloadUrl;
}
public ContentsResponse encoding(String encoding) {
this.encoding = encoding;
return this;
}
/**
* &#x60;encoding&#x60; is populated when &#x60;type&#x60; is &#x60;file&#x60;, otherwise null
*
* @return encoding
*/
@Schema(description = "`encoding` is populated when `type` is `file`, otherwise null")
public String getEncoding() {
return encoding;
}
public void setEncoding(String encoding) {
this.encoding = encoding;
}
public ContentsResponse gitUrl(String gitUrl) {
this.gitUrl = gitUrl;
return this;
}
/**
* Get gitUrl
*
* @return gitUrl
*/
@Schema(description = "")
public String getGitUrl() {
return gitUrl;
}
public void setGitUrl(String gitUrl) {
this.gitUrl = gitUrl;
}
public ContentsResponse htmlUrl(String htmlUrl) {
this.htmlUrl = htmlUrl;
return this;
}
/**
* Get htmlUrl
*
* @return htmlUrl
*/
@Schema(description = "")
public String getHtmlUrl() {
return htmlUrl;
}
public void setHtmlUrl(String htmlUrl) {
this.htmlUrl = htmlUrl;
}
public ContentsResponse name(String name) {
this.name = name;
return this;
}
/**
* Get name
*
* @return name
*/
@Schema(description = "")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public ContentsResponse path(String path) {
this.path = path;
return this;
}
/**
* Get path
*
* @return path
*/
@Schema(description = "")
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
public ContentsResponse sha(String sha) {
this.sha = sha;
return this;
}
/**
* Get sha
*
* @return sha
*/
@Schema(description = "")
public String getSha() {
return sha;
}
public void setSha(String sha) {
this.sha = sha;
}
public ContentsResponse size(Long size) {
this.size = size;
return this;
}
/**
* Get size
*
* @return size
*/
@Schema(description = "")
public Long getSize() {
return size;
}
public void setSize(Long size) {
this.size = size;
}
public ContentsResponse submoduleGitUrl(String submoduleGitUrl) {
this.submoduleGitUrl = submoduleGitUrl;
return this;
}
/**
* &#x60;submodule_git_url&#x60; is populated when &#x60;type&#x60; is &#x60;submodule&#x60;,
* otherwise null
*
* @return submoduleGitUrl
*/
@Schema(
description = "`submodule_git_url` is populated when `type` is `submodule`, otherwise null")
public String getSubmoduleGitUrl() {
return submoduleGitUrl;
}
public void setSubmoduleGitUrl(String submoduleGitUrl) {
this.submoduleGitUrl = submoduleGitUrl;
}
public ContentsResponse target(String target) {
this.target = target;
return this;
}
/**
* &#x60;target&#x60; is populated when &#x60;type&#x60; is &#x60;symlink&#x60;, otherwise null
*
* @return target
*/
@Schema(description = "`target` is populated when `type` is `symlink`, otherwise null")
public String getTarget() {
return target;
}
public void setTarget(String target) {
this.target = target;
}
public ContentsResponse type(String type) {
this.type = type;
return this;
}
/**
* &#x60;type&#x60; will be &#x60;file&#x60;, &#x60;dir&#x60;, &#x60;symlink&#x60;, or
* &#x60;submodule&#x60;
*
* @return type
*/
@Schema(description = "`type` will be `file`, `dir`, `symlink`, or `submodule`")
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public ContentsResponse url(String url) {
this.url = url;
return this;
}
/**
* Get url
*
* @return url
*/
@Schema(description = "")
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ContentsResponse contentsResponse = (ContentsResponse) o;
return Objects.equals(this._links, contentsResponse._links)
&& Objects.equals(this.content, contentsResponse.content)
&& Objects.equals(this.downloadUrl, contentsResponse.downloadUrl)
&& Objects.equals(this.encoding, contentsResponse.encoding)
&& Objects.equals(this.gitUrl, contentsResponse.gitUrl)
&& Objects.equals(this.htmlUrl, contentsResponse.htmlUrl)
&& Objects.equals(this.name, contentsResponse.name)
&& Objects.equals(this.path, contentsResponse.path)
&& Objects.equals(this.sha, contentsResponse.sha)
&& Objects.equals(this.size, contentsResponse.size)
&& Objects.equals(this.submoduleGitUrl, contentsResponse.submoduleGitUrl)
&& Objects.equals(this.target, contentsResponse.target)
&& Objects.equals(this.type, contentsResponse.type)
&& Objects.equals(this.url, contentsResponse.url);
}
@Override
public int hashCode() {
return Objects.hash(
_links,
content,
downloadUrl,
encoding,
gitUrl,
htmlUrl,
name,
path,
sha,
size,
submoduleGitUrl,
target,
type,
url);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ContentsResponse {\n");
sb.append(" _links: ").append(toIndentedString(_links)).append("\n");
sb.append(" content: ").append(toIndentedString(content)).append("\n");
sb.append(" downloadUrl: ").append(toIndentedString(downloadUrl)).append("\n");
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(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" path: ").append(toIndentedString(path)).append("\n");
sb.append(" sha: ").append(toIndentedString(sha)).append("\n");
sb.append(" size: ").append(toIndentedString(size)).append("\n");
sb.append(" submoduleGitUrl: ").append(toIndentedString(submoduleGitUrl)).append("\n");
sb.append(" target: ").append(toIndentedString(target)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" url: ").append(toIndentedString(url)).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,83 @@
/*
* 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;
/** CreateAccessTokenOption options when create access token */
@Schema(description = "CreateAccessTokenOption options when create access token")
public class CreateAccessTokenOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("name")
private String name = null;
public CreateAccessTokenOption name(String name) {
this.name = name;
return this;
}
/**
* Get name
*
* @return name
*/
@Schema(description = "")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateAccessTokenOption createAccessTokenOption = (CreateAccessTokenOption) o;
return Objects.equals(this.name, createAccessTokenOption.name);
}
@Override
public int hashCode() {
return Objects.hash(name);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateAccessTokenOption {\n");
sb.append(" name: ").append(toIndentedString(name)).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,728 @@
/*
* 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.ArrayList;
import java.util.List;
import java.util.Objects;
/** CreateBranchProtectionOption options for creating a branch protection */
@Schema(description = "CreateBranchProtectionOption options for creating a branch protection")
public class CreateBranchProtectionOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("approvals_whitelist_teams")
private List<String> approvalsWhitelistTeams = null;
@SerializedName("approvals_whitelist_username")
private List<String> approvalsWhitelistUsername = null;
@SerializedName("block_on_official_review_requests")
private Boolean blockOnOfficialReviewRequests = null;
@SerializedName("block_on_outdated_branch")
private Boolean blockOnOutdatedBranch = null;
@SerializedName("block_on_rejected_reviews")
private Boolean blockOnRejectedReviews = null;
@SerializedName("branch_name")
private String branchName = null;
@SerializedName("dismiss_stale_approvals")
private Boolean dismissStaleApprovals = null;
@SerializedName("enable_approvals_whitelist")
private Boolean enableApprovalsWhitelist = null;
@SerializedName("enable_merge_whitelist")
private Boolean enableMergeWhitelist = null;
@SerializedName("enable_push")
private Boolean enablePush = null;
@SerializedName("enable_push_whitelist")
private Boolean enablePushWhitelist = null;
@SerializedName("enable_status_check")
private Boolean enableStatusCheck = null;
@SerializedName("merge_whitelist_teams")
private List<String> mergeWhitelistTeams = null;
@SerializedName("merge_whitelist_usernames")
private List<String> mergeWhitelistUsernames = null;
@SerializedName("protected_file_patterns")
private String protectedFilePatterns = null;
@SerializedName("push_whitelist_deploy_keys")
private Boolean pushWhitelistDeployKeys = null;
@SerializedName("push_whitelist_teams")
private List<String> pushWhitelistTeams = null;
@SerializedName("push_whitelist_usernames")
private List<String> pushWhitelistUsernames = null;
@SerializedName("require_signed_commits")
private Boolean requireSignedCommits = null;
@SerializedName("required_approvals")
private Long requiredApprovals = null;
@SerializedName("status_check_contexts")
private List<String> statusCheckContexts = null;
@SerializedName("unprotected_file_patterns")
private String unprotectedFilePatterns = null;
public CreateBranchProtectionOption approvalsWhitelistTeams(
List<String> approvalsWhitelistTeams) {
this.approvalsWhitelistTeams = approvalsWhitelistTeams;
return this;
}
public CreateBranchProtectionOption addApprovalsWhitelistTeamsItem(
String approvalsWhitelistTeamsItem) {
if (this.approvalsWhitelistTeams == null) {
this.approvalsWhitelistTeams = new ArrayList<>();
}
this.approvalsWhitelistTeams.add(approvalsWhitelistTeamsItem);
return this;
}
/**
* Get approvalsWhitelistTeams
*
* @return approvalsWhitelistTeams
*/
@Schema(description = "")
public List<String> getApprovalsWhitelistTeams() {
return approvalsWhitelistTeams;
}
public void setApprovalsWhitelistTeams(List<String> approvalsWhitelistTeams) {
this.approvalsWhitelistTeams = approvalsWhitelistTeams;
}
public CreateBranchProtectionOption approvalsWhitelistUsername(
List<String> approvalsWhitelistUsername) {
this.approvalsWhitelistUsername = approvalsWhitelistUsername;
return this;
}
public CreateBranchProtectionOption addApprovalsWhitelistUsernameItem(
String approvalsWhitelistUsernameItem) {
if (this.approvalsWhitelistUsername == null) {
this.approvalsWhitelistUsername = new ArrayList<>();
}
this.approvalsWhitelistUsername.add(approvalsWhitelistUsernameItem);
return this;
}
/**
* Get approvalsWhitelistUsername
*
* @return approvalsWhitelistUsername
*/
@Schema(description = "")
public List<String> getApprovalsWhitelistUsername() {
return approvalsWhitelistUsername;
}
public void setApprovalsWhitelistUsername(List<String> approvalsWhitelistUsername) {
this.approvalsWhitelistUsername = approvalsWhitelistUsername;
}
public CreateBranchProtectionOption blockOnOfficialReviewRequests(
Boolean blockOnOfficialReviewRequests) {
this.blockOnOfficialReviewRequests = blockOnOfficialReviewRequests;
return this;
}
/**
* Get blockOnOfficialReviewRequests
*
* @return blockOnOfficialReviewRequests
*/
@Schema(description = "")
public Boolean isBlockOnOfficialReviewRequests() {
return blockOnOfficialReviewRequests;
}
public void setBlockOnOfficialReviewRequests(Boolean blockOnOfficialReviewRequests) {
this.blockOnOfficialReviewRequests = blockOnOfficialReviewRequests;
}
public CreateBranchProtectionOption blockOnOutdatedBranch(Boolean blockOnOutdatedBranch) {
this.blockOnOutdatedBranch = blockOnOutdatedBranch;
return this;
}
/**
* Get blockOnOutdatedBranch
*
* @return blockOnOutdatedBranch
*/
@Schema(description = "")
public Boolean isBlockOnOutdatedBranch() {
return blockOnOutdatedBranch;
}
public void setBlockOnOutdatedBranch(Boolean blockOnOutdatedBranch) {
this.blockOnOutdatedBranch = blockOnOutdatedBranch;
}
public CreateBranchProtectionOption blockOnRejectedReviews(Boolean blockOnRejectedReviews) {
this.blockOnRejectedReviews = blockOnRejectedReviews;
return this;
}
/**
* Get blockOnRejectedReviews
*
* @return blockOnRejectedReviews
*/
@Schema(description = "")
public Boolean isBlockOnRejectedReviews() {
return blockOnRejectedReviews;
}
public void setBlockOnRejectedReviews(Boolean blockOnRejectedReviews) {
this.blockOnRejectedReviews = blockOnRejectedReviews;
}
public CreateBranchProtectionOption branchName(String branchName) {
this.branchName = branchName;
return this;
}
/**
* Get branchName
*
* @return branchName
*/
@Schema(description = "")
public String getBranchName() {
return branchName;
}
public void setBranchName(String branchName) {
this.branchName = branchName;
}
public CreateBranchProtectionOption dismissStaleApprovals(Boolean dismissStaleApprovals) {
this.dismissStaleApprovals = dismissStaleApprovals;
return this;
}
/**
* Get dismissStaleApprovals
*
* @return dismissStaleApprovals
*/
@Schema(description = "")
public Boolean isDismissStaleApprovals() {
return dismissStaleApprovals;
}
public void setDismissStaleApprovals(Boolean dismissStaleApprovals) {
this.dismissStaleApprovals = dismissStaleApprovals;
}
public CreateBranchProtectionOption enableApprovalsWhitelist(Boolean enableApprovalsWhitelist) {
this.enableApprovalsWhitelist = enableApprovalsWhitelist;
return this;
}
/**
* Get enableApprovalsWhitelist
*
* @return enableApprovalsWhitelist
*/
@Schema(description = "")
public Boolean isEnableApprovalsWhitelist() {
return enableApprovalsWhitelist;
}
public void setEnableApprovalsWhitelist(Boolean enableApprovalsWhitelist) {
this.enableApprovalsWhitelist = enableApprovalsWhitelist;
}
public CreateBranchProtectionOption enableMergeWhitelist(Boolean enableMergeWhitelist) {
this.enableMergeWhitelist = enableMergeWhitelist;
return this;
}
/**
* Get enableMergeWhitelist
*
* @return enableMergeWhitelist
*/
@Schema(description = "")
public Boolean isEnableMergeWhitelist() {
return enableMergeWhitelist;
}
public void setEnableMergeWhitelist(Boolean enableMergeWhitelist) {
this.enableMergeWhitelist = enableMergeWhitelist;
}
public CreateBranchProtectionOption enablePush(Boolean enablePush) {
this.enablePush = enablePush;
return this;
}
/**
* Get enablePush
*
* @return enablePush
*/
@Schema(description = "")
public Boolean isEnablePush() {
return enablePush;
}
public void setEnablePush(Boolean enablePush) {
this.enablePush = enablePush;
}
public CreateBranchProtectionOption enablePushWhitelist(Boolean enablePushWhitelist) {
this.enablePushWhitelist = enablePushWhitelist;
return this;
}
/**
* Get enablePushWhitelist
*
* @return enablePushWhitelist
*/
@Schema(description = "")
public Boolean isEnablePushWhitelist() {
return enablePushWhitelist;
}
public void setEnablePushWhitelist(Boolean enablePushWhitelist) {
this.enablePushWhitelist = enablePushWhitelist;
}
public CreateBranchProtectionOption enableStatusCheck(Boolean enableStatusCheck) {
this.enableStatusCheck = enableStatusCheck;
return this;
}
/**
* Get enableStatusCheck
*
* @return enableStatusCheck
*/
@Schema(description = "")
public Boolean isEnableStatusCheck() {
return enableStatusCheck;
}
public void setEnableStatusCheck(Boolean enableStatusCheck) {
this.enableStatusCheck = enableStatusCheck;
}
public CreateBranchProtectionOption mergeWhitelistTeams(List<String> mergeWhitelistTeams) {
this.mergeWhitelistTeams = mergeWhitelistTeams;
return this;
}
public CreateBranchProtectionOption addMergeWhitelistTeamsItem(String mergeWhitelistTeamsItem) {
if (this.mergeWhitelistTeams == null) {
this.mergeWhitelistTeams = new ArrayList<>();
}
this.mergeWhitelistTeams.add(mergeWhitelistTeamsItem);
return this;
}
/**
* Get mergeWhitelistTeams
*
* @return mergeWhitelistTeams
*/
@Schema(description = "")
public List<String> getMergeWhitelistTeams() {
return mergeWhitelistTeams;
}
public void setMergeWhitelistTeams(List<String> mergeWhitelistTeams) {
this.mergeWhitelistTeams = mergeWhitelistTeams;
}
public CreateBranchProtectionOption mergeWhitelistUsernames(
List<String> mergeWhitelistUsernames) {
this.mergeWhitelistUsernames = mergeWhitelistUsernames;
return this;
}
public CreateBranchProtectionOption addMergeWhitelistUsernamesItem(
String mergeWhitelistUsernamesItem) {
if (this.mergeWhitelistUsernames == null) {
this.mergeWhitelistUsernames = new ArrayList<>();
}
this.mergeWhitelistUsernames.add(mergeWhitelistUsernamesItem);
return this;
}
/**
* Get mergeWhitelistUsernames
*
* @return mergeWhitelistUsernames
*/
@Schema(description = "")
public List<String> getMergeWhitelistUsernames() {
return mergeWhitelistUsernames;
}
public void setMergeWhitelistUsernames(List<String> mergeWhitelistUsernames) {
this.mergeWhitelistUsernames = mergeWhitelistUsernames;
}
public CreateBranchProtectionOption protectedFilePatterns(String protectedFilePatterns) {
this.protectedFilePatterns = protectedFilePatterns;
return this;
}
/**
* Get protectedFilePatterns
*
* @return protectedFilePatterns
*/
@Schema(description = "")
public String getProtectedFilePatterns() {
return protectedFilePatterns;
}
public void setProtectedFilePatterns(String protectedFilePatterns) {
this.protectedFilePatterns = protectedFilePatterns;
}
public CreateBranchProtectionOption pushWhitelistDeployKeys(Boolean pushWhitelistDeployKeys) {
this.pushWhitelistDeployKeys = pushWhitelistDeployKeys;
return this;
}
/**
* Get pushWhitelistDeployKeys
*
* @return pushWhitelistDeployKeys
*/
@Schema(description = "")
public Boolean isPushWhitelistDeployKeys() {
return pushWhitelistDeployKeys;
}
public void setPushWhitelistDeployKeys(Boolean pushWhitelistDeployKeys) {
this.pushWhitelistDeployKeys = pushWhitelistDeployKeys;
}
public CreateBranchProtectionOption pushWhitelistTeams(List<String> pushWhitelistTeams) {
this.pushWhitelistTeams = pushWhitelistTeams;
return this;
}
public CreateBranchProtectionOption addPushWhitelistTeamsItem(String pushWhitelistTeamsItem) {
if (this.pushWhitelistTeams == null) {
this.pushWhitelistTeams = new ArrayList<>();
}
this.pushWhitelistTeams.add(pushWhitelistTeamsItem);
return this;
}
/**
* Get pushWhitelistTeams
*
* @return pushWhitelistTeams
*/
@Schema(description = "")
public List<String> getPushWhitelistTeams() {
return pushWhitelistTeams;
}
public void setPushWhitelistTeams(List<String> pushWhitelistTeams) {
this.pushWhitelistTeams = pushWhitelistTeams;
}
public CreateBranchProtectionOption pushWhitelistUsernames(List<String> pushWhitelistUsernames) {
this.pushWhitelistUsernames = pushWhitelistUsernames;
return this;
}
public CreateBranchProtectionOption addPushWhitelistUsernamesItem(
String pushWhitelistUsernamesItem) {
if (this.pushWhitelistUsernames == null) {
this.pushWhitelistUsernames = new ArrayList<>();
}
this.pushWhitelistUsernames.add(pushWhitelistUsernamesItem);
return this;
}
/**
* Get pushWhitelistUsernames
*
* @return pushWhitelistUsernames
*/
@Schema(description = "")
public List<String> getPushWhitelistUsernames() {
return pushWhitelistUsernames;
}
public void setPushWhitelistUsernames(List<String> pushWhitelistUsernames) {
this.pushWhitelistUsernames = pushWhitelistUsernames;
}
public CreateBranchProtectionOption requireSignedCommits(Boolean requireSignedCommits) {
this.requireSignedCommits = requireSignedCommits;
return this;
}
/**
* Get requireSignedCommits
*
* @return requireSignedCommits
*/
@Schema(description = "")
public Boolean isRequireSignedCommits() {
return requireSignedCommits;
}
public void setRequireSignedCommits(Boolean requireSignedCommits) {
this.requireSignedCommits = requireSignedCommits;
}
public CreateBranchProtectionOption requiredApprovals(Long requiredApprovals) {
this.requiredApprovals = requiredApprovals;
return this;
}
/**
* Get requiredApprovals
*
* @return requiredApprovals
*/
@Schema(description = "")
public Long getRequiredApprovals() {
return requiredApprovals;
}
public void setRequiredApprovals(Long requiredApprovals) {
this.requiredApprovals = requiredApprovals;
}
public CreateBranchProtectionOption statusCheckContexts(List<String> statusCheckContexts) {
this.statusCheckContexts = statusCheckContexts;
return this;
}
public CreateBranchProtectionOption addStatusCheckContextsItem(String statusCheckContextsItem) {
if (this.statusCheckContexts == null) {
this.statusCheckContexts = new ArrayList<>();
}
this.statusCheckContexts.add(statusCheckContextsItem);
return this;
}
/**
* Get statusCheckContexts
*
* @return statusCheckContexts
*/
@Schema(description = "")
public List<String> getStatusCheckContexts() {
return statusCheckContexts;
}
public void setStatusCheckContexts(List<String> statusCheckContexts) {
this.statusCheckContexts = statusCheckContexts;
}
public CreateBranchProtectionOption unprotectedFilePatterns(String unprotectedFilePatterns) {
this.unprotectedFilePatterns = unprotectedFilePatterns;
return this;
}
/**
* Get unprotectedFilePatterns
*
* @return unprotectedFilePatterns
*/
@Schema(description = "")
public String getUnprotectedFilePatterns() {
return unprotectedFilePatterns;
}
public void setUnprotectedFilePatterns(String unprotectedFilePatterns) {
this.unprotectedFilePatterns = unprotectedFilePatterns;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateBranchProtectionOption createBranchProtectionOption = (CreateBranchProtectionOption) o;
return Objects.equals(
this.approvalsWhitelistTeams, createBranchProtectionOption.approvalsWhitelistTeams)
&& Objects.equals(
this.approvalsWhitelistUsername,
createBranchProtectionOption.approvalsWhitelistUsername)
&& Objects.equals(
this.blockOnOfficialReviewRequests,
createBranchProtectionOption.blockOnOfficialReviewRequests)
&& Objects.equals(
this.blockOnOutdatedBranch, createBranchProtectionOption.blockOnOutdatedBranch)
&& Objects.equals(
this.blockOnRejectedReviews, createBranchProtectionOption.blockOnRejectedReviews)
&& Objects.equals(this.branchName, createBranchProtectionOption.branchName)
&& Objects.equals(
this.dismissStaleApprovals, createBranchProtectionOption.dismissStaleApprovals)
&& Objects.equals(
this.enableApprovalsWhitelist, createBranchProtectionOption.enableApprovalsWhitelist)
&& Objects.equals(
this.enableMergeWhitelist, createBranchProtectionOption.enableMergeWhitelist)
&& Objects.equals(this.enablePush, createBranchProtectionOption.enablePush)
&& Objects.equals(
this.enablePushWhitelist, createBranchProtectionOption.enablePushWhitelist)
&& Objects.equals(this.enableStatusCheck, createBranchProtectionOption.enableStatusCheck)
&& Objects.equals(
this.mergeWhitelistTeams, createBranchProtectionOption.mergeWhitelistTeams)
&& Objects.equals(
this.mergeWhitelistUsernames, createBranchProtectionOption.mergeWhitelistUsernames)
&& Objects.equals(
this.protectedFilePatterns, createBranchProtectionOption.protectedFilePatterns)
&& Objects.equals(
this.pushWhitelistDeployKeys, createBranchProtectionOption.pushWhitelistDeployKeys)
&& Objects.equals(this.pushWhitelistTeams, createBranchProtectionOption.pushWhitelistTeams)
&& Objects.equals(
this.pushWhitelistUsernames, createBranchProtectionOption.pushWhitelistUsernames)
&& Objects.equals(
this.requireSignedCommits, createBranchProtectionOption.requireSignedCommits)
&& Objects.equals(this.requiredApprovals, createBranchProtectionOption.requiredApprovals)
&& Objects.equals(
this.statusCheckContexts, createBranchProtectionOption.statusCheckContexts)
&& Objects.equals(
this.unprotectedFilePatterns, createBranchProtectionOption.unprotectedFilePatterns);
}
@Override
public int hashCode() {
return Objects.hash(
approvalsWhitelistTeams,
approvalsWhitelistUsername,
blockOnOfficialReviewRequests,
blockOnOutdatedBranch,
blockOnRejectedReviews,
branchName,
dismissStaleApprovals,
enableApprovalsWhitelist,
enableMergeWhitelist,
enablePush,
enablePushWhitelist,
enableStatusCheck,
mergeWhitelistTeams,
mergeWhitelistUsernames,
protectedFilePatterns,
pushWhitelistDeployKeys,
pushWhitelistTeams,
pushWhitelistUsernames,
requireSignedCommits,
requiredApprovals,
statusCheckContexts,
unprotectedFilePatterns);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateBranchProtectionOption {\n");
sb.append(" approvalsWhitelistTeams: ")
.append(toIndentedString(approvalsWhitelistTeams))
.append("\n");
sb.append(" approvalsWhitelistUsername: ")
.append(toIndentedString(approvalsWhitelistUsername))
.append("\n");
sb.append(" blockOnOfficialReviewRequests: ")
.append(toIndentedString(blockOnOfficialReviewRequests))
.append("\n");
sb.append(" blockOnOutdatedBranch: ")
.append(toIndentedString(blockOnOutdatedBranch))
.append("\n");
sb.append(" blockOnRejectedReviews: ")
.append(toIndentedString(blockOnRejectedReviews))
.append("\n");
sb.append(" branchName: ").append(toIndentedString(branchName)).append("\n");
sb.append(" dismissStaleApprovals: ")
.append(toIndentedString(dismissStaleApprovals))
.append("\n");
sb.append(" enableApprovalsWhitelist: ")
.append(toIndentedString(enableApprovalsWhitelist))
.append("\n");
sb.append(" enableMergeWhitelist: ")
.append(toIndentedString(enableMergeWhitelist))
.append("\n");
sb.append(" enablePush: ").append(toIndentedString(enablePush)).append("\n");
sb.append(" enablePushWhitelist: ")
.append(toIndentedString(enablePushWhitelist))
.append("\n");
sb.append(" enableStatusCheck: ").append(toIndentedString(enableStatusCheck)).append("\n");
sb.append(" mergeWhitelistTeams: ")
.append(toIndentedString(mergeWhitelistTeams))
.append("\n");
sb.append(" mergeWhitelistUsernames: ")
.append(toIndentedString(mergeWhitelistUsernames))
.append("\n");
sb.append(" protectedFilePatterns: ")
.append(toIndentedString(protectedFilePatterns))
.append("\n");
sb.append(" pushWhitelistDeployKeys: ")
.append(toIndentedString(pushWhitelistDeployKeys))
.append("\n");
sb.append(" pushWhitelistTeams: ").append(toIndentedString(pushWhitelistTeams)).append("\n");
sb.append(" pushWhitelistUsernames: ")
.append(toIndentedString(pushWhitelistUsernames))
.append("\n");
sb.append(" requireSignedCommits: ")
.append(toIndentedString(requireSignedCommits))
.append("\n");
sb.append(" requiredApprovals: ").append(toIndentedString(requiredApprovals)).append("\n");
sb.append(" statusCheckContexts: ")
.append(toIndentedString(statusCheckContexts))
.append("\n");
sb.append(" unprotectedFilePatterns: ")
.append(toIndentedString(unprotectedFilePatterns))
.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,107 @@
/*
* 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;
/** CreateBranchRepoOption options when creating a branch in a repository */
@Schema(description = "CreateBranchRepoOption options when creating a branch in a repository")
public class CreateBranchRepoOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("new_branch_name")
private String newBranchName = null;
@SerializedName("old_branch_name")
private String oldBranchName = null;
public CreateBranchRepoOption newBranchName(String newBranchName) {
this.newBranchName = newBranchName;
return this;
}
/**
* Name of the branch to create
*
* @return newBranchName
*/
@Schema(required = true, description = "Name of the branch to create")
public String getNewBranchName() {
return newBranchName;
}
public void setNewBranchName(String newBranchName) {
this.newBranchName = newBranchName;
}
public CreateBranchRepoOption oldBranchName(String oldBranchName) {
this.oldBranchName = oldBranchName;
return this;
}
/**
* Name of the old branch to create from
*
* @return oldBranchName
*/
@Schema(description = "Name of the old branch to create from")
public String getOldBranchName() {
return oldBranchName;
}
public void setOldBranchName(String oldBranchName) {
this.oldBranchName = oldBranchName;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateBranchRepoOption createBranchRepoOption = (CreateBranchRepoOption) o;
return Objects.equals(this.newBranchName, createBranchRepoOption.newBranchName)
&& Objects.equals(this.oldBranchName, createBranchRepoOption.oldBranchName);
}
@Override
public int hashCode() {
return Objects.hash(newBranchName, oldBranchName);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateBranchRepoOption {\n");
sb.append(" newBranchName: ").append(toIndentedString(newBranchName)).append("\n");
sb.append(" oldBranchName: ").append(toIndentedString(oldBranchName)).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,93 @@
/*
* 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.ArrayList;
import java.util.List;
import java.util.Objects;
/** CreateEmailOption options when creating email addresses */
@Schema(description = "CreateEmailOption options when creating email addresses")
public class CreateEmailOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("emails")
private List<String> emails = null;
public CreateEmailOption emails(List<String> emails) {
this.emails = emails;
return this;
}
public CreateEmailOption addEmailsItem(String emailsItem) {
if (this.emails == null) {
this.emails = new ArrayList<>();
}
this.emails.add(emailsItem);
return this;
}
/**
* email addresses to add
*
* @return emails
*/
@Schema(description = "email addresses to add")
public List<String> getEmails() {
return emails;
}
public void setEmails(List<String> emails) {
this.emails = emails;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateEmailOption createEmailOption = (CreateEmailOption) o;
return Objects.equals(this.emails, createEmailOption.emails);
}
@Override
public int hashCode() {
return Objects.hash(emails);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateEmailOption {\n");
sb.append(" emails: ").append(toIndentedString(emails)).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,268 @@
/*
* 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;
/**
* CreateFileOptions options for creating files Note: &#x60;author&#x60; and &#x60;committer&#x60;
* are optional (if only one is given, it will be used for the other, otherwise the authenticated
* user will be used)
*/
@Schema(
description =
"CreateFileOptions options for creating files Note: `author` and `committer` are optional"
+ " (if only one is given, it will be used for the other, otherwise the authenticated"
+ " user will be used)")
public class CreateFileOptions implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("author")
private Identity author = null;
@SerializedName("branch")
private String branch = null;
@SerializedName("committer")
private Identity committer = null;
@SerializedName("content")
private String content = null;
@SerializedName("dates")
private CommitDateOptions dates = null;
@SerializedName("message")
private String message = null;
@SerializedName("new_branch")
private String newBranch = null;
@SerializedName("signoff")
private Boolean signoff = null;
public CreateFileOptions author(Identity author) {
this.author = author;
return this;
}
/**
* Get author
*
* @return author
*/
@Schema(description = "")
public Identity getAuthor() {
return author;
}
public void setAuthor(Identity author) {
this.author = author;
}
public CreateFileOptions branch(String branch) {
this.branch = branch;
return this;
}
/**
* branch (optional) to base this file from. if not given, the default branch is used
*
* @return branch
*/
@Schema(
description =
"branch (optional) to base this file from. if not given, the default branch is used")
public String getBranch() {
return branch;
}
public void setBranch(String branch) {
this.branch = branch;
}
public CreateFileOptions committer(Identity committer) {
this.committer = committer;
return this;
}
/**
* Get committer
*
* @return committer
*/
@Schema(description = "")
public Identity getCommitter() {
return committer;
}
public void setCommitter(Identity committer) {
this.committer = committer;
}
public CreateFileOptions content(String content) {
this.content = content;
return this;
}
/**
* content must be base64 encoded
*
* @return content
*/
@Schema(required = true, description = "content must be base64 encoded")
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public CreateFileOptions dates(CommitDateOptions dates) {
this.dates = dates;
return this;
}
/**
* Get dates
*
* @return dates
*/
@Schema(description = "")
public CommitDateOptions getDates() {
return dates;
}
public void setDates(CommitDateOptions dates) {
this.dates = dates;
}
public CreateFileOptions message(String message) {
this.message = message;
return this;
}
/**
* message (optional) for the commit of this file. if not supplied, a default message will be used
*
* @return message
*/
@Schema(
description =
"message (optional) for the commit of this file. if not supplied, a default message will"
+ " be used")
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public CreateFileOptions newBranch(String newBranch) {
this.newBranch = newBranch;
return this;
}
/**
* new_branch (optional) will make a new branch from &#x60;branch&#x60; before creating the file
*
* @return newBranch
*/
@Schema(
description =
"new_branch (optional) will make a new branch from `branch` before creating the file")
public String getNewBranch() {
return newBranch;
}
public void setNewBranch(String newBranch) {
this.newBranch = newBranch;
}
public CreateFileOptions signoff(Boolean signoff) {
this.signoff = signoff;
return this;
}
/**
* Add a Signed-off-by trailer by the committer at the end of the commit log message.
*
* @return signoff
*/
@Schema(
description =
"Add a Signed-off-by trailer by the committer at the end of the commit log message.")
public Boolean isSignoff() {
return signoff;
}
public void setSignoff(Boolean signoff) {
this.signoff = signoff;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateFileOptions createFileOptions = (CreateFileOptions) o;
return Objects.equals(this.author, createFileOptions.author)
&& Objects.equals(this.branch, createFileOptions.branch)
&& Objects.equals(this.committer, createFileOptions.committer)
&& Objects.equals(this.content, createFileOptions.content)
&& Objects.equals(this.dates, createFileOptions.dates)
&& Objects.equals(this.message, createFileOptions.message)
&& Objects.equals(this.newBranch, createFileOptions.newBranch)
&& Objects.equals(this.signoff, createFileOptions.signoff);
}
@Override
public int hashCode() {
return Objects.hash(author, branch, committer, content, dates, message, newBranch, signoff);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateFileOptions {\n");
sb.append(" author: ").append(toIndentedString(author)).append("\n");
sb.append(" branch: ").append(toIndentedString(branch)).append("\n");
sb.append(" committer: ").append(toIndentedString(committer)).append("\n");
sb.append(" content: ").append(toIndentedString(content)).append("\n");
sb.append(" dates: ").append(toIndentedString(dates)).append("\n");
sb.append(" message: ").append(toIndentedString(message)).append("\n");
sb.append(" newBranch: ").append(toIndentedString(newBranch)).append("\n");
sb.append(" signoff: ").append(toIndentedString(signoff)).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,107 @@
/*
* 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;
/** CreateForkOption options for creating a fork */
@Schema(description = "CreateForkOption options for creating a fork")
public class CreateForkOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("name")
private String name = null;
@SerializedName("organization")
private String organization = null;
public CreateForkOption name(String name) {
this.name = name;
return this;
}
/**
* name of the forked repository
*
* @return name
*/
@Schema(description = "name of the forked repository")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public CreateForkOption organization(String organization) {
this.organization = organization;
return this;
}
/**
* organization name, if forking into an organization
*
* @return organization
*/
@Schema(description = "organization name, if forking into an organization")
public String getOrganization() {
return organization;
}
public void setOrganization(String organization) {
this.organization = organization;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateForkOption createForkOption = (CreateForkOption) o;
return Objects.equals(this.name, createForkOption.name)
&& Objects.equals(this.organization, createForkOption.organization);
}
@Override
public int hashCode() {
return Objects.hash(name, organization);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateForkOption {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" organization: ").append(toIndentedString(organization)).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,107 @@
/*
* 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;
/** CreateGPGKeyOption options create user GPG key */
@Schema(description = "CreateGPGKeyOption options create user GPG key")
public class CreateGPGKeyOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("armored_public_key")
private String armoredPublicKey = null;
@SerializedName("armored_signature")
private String armoredSignature = null;
public CreateGPGKeyOption armoredPublicKey(String armoredPublicKey) {
this.armoredPublicKey = armoredPublicKey;
return this;
}
/**
* An armored GPG key to add
*
* @return armoredPublicKey
*/
@Schema(required = true, description = "An armored GPG key to add")
public String getArmoredPublicKey() {
return armoredPublicKey;
}
public void setArmoredPublicKey(String armoredPublicKey) {
this.armoredPublicKey = armoredPublicKey;
}
public CreateGPGKeyOption armoredSignature(String armoredSignature) {
this.armoredSignature = armoredSignature;
return this;
}
/**
* Get armoredSignature
*
* @return armoredSignature
*/
@Schema(description = "")
public String getArmoredSignature() {
return armoredSignature;
}
public void setArmoredSignature(String armoredSignature) {
this.armoredSignature = armoredSignature;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateGPGKeyOption createGPGKeyOption = (CreateGPGKeyOption) o;
return Objects.equals(this.armoredPublicKey, createGPGKeyOption.armoredPublicKey)
&& Objects.equals(this.armoredSignature, createGPGKeyOption.armoredSignature);
}
@Override
public int hashCode() {
return Objects.hash(armoredPublicKey, armoredSignature);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateGPGKeyOption {\n");
sb.append(" armoredPublicKey: ").append(toIndentedString(armoredPublicKey)).append("\n");
sb.append(" armoredSignature: ").append(toIndentedString(armoredSignature)).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,247 @@
/*
* 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.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;
import java.util.Objects;
/** CreateHookOption options when create a hook */
@Schema(description = "CreateHookOption options when create a hook")
public class CreateHookOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("active")
private Boolean active = false;
@SerializedName("branch_filter")
private String branchFilter = null;
@SerializedName("config")
private CreateHookOptionConfig config = null;
@SerializedName("events")
private List<String> events = null;
/** Gets or Sets type */
@JsonAdapter(TypeEnum.Adapter.class)
public enum TypeEnum {
DINGTALK("dingtalk"),
DISCORD("discord"),
GITEA("gitea"),
GOGS("gogs"),
MSTEAMS("msteams"),
SLACK("slack"),
TELEGRAM("telegram"),
FEISHU("feishu"),
WECHATWORK("wechatwork"),
PACKAGIST("packagist");
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 TypeEnum type = null;
public CreateHookOption active(Boolean active) {
this.active = active;
return this;
}
/**
* Get active
*
* @return active
*/
@Schema(description = "")
public Boolean isActive() {
return active;
}
public void setActive(Boolean active) {
this.active = active;
}
public CreateHookOption branchFilter(String branchFilter) {
this.branchFilter = branchFilter;
return this;
}
/**
* Get branchFilter
*
* @return branchFilter
*/
@Schema(description = "")
public String getBranchFilter() {
return branchFilter;
}
public void setBranchFilter(String branchFilter) {
this.branchFilter = branchFilter;
}
public CreateHookOption config(CreateHookOptionConfig config) {
this.config = config;
return this;
}
/**
* Get config
*
* @return config
*/
@Schema(required = true, description = "")
public CreateHookOptionConfig getConfig() {
return config;
}
public void setConfig(CreateHookOptionConfig config) {
this.config = config;
}
public CreateHookOption events(List<String> events) {
this.events = events;
return this;
}
public CreateHookOption addEventsItem(String eventsItem) {
if (this.events == null) {
this.events = new ArrayList<>();
}
this.events.add(eventsItem);
return this;
}
/**
* Get events
*
* @return events
*/
@Schema(description = "")
public List<String> getEvents() {
return events;
}
public void setEvents(List<String> events) {
this.events = events;
}
public CreateHookOption type(TypeEnum type) {
this.type = type;
return this;
}
/**
* Get type
*
* @return type
*/
@Schema(required = true, description = "")
public TypeEnum getType() {
return type;
}
public void setType(TypeEnum type) {
this.type = type;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateHookOption createHookOption = (CreateHookOption) o;
return Objects.equals(this.active, createHookOption.active)
&& Objects.equals(this.branchFilter, createHookOption.branchFilter)
&& Objects.equals(this.config, createHookOption.config)
&& Objects.equals(this.events, createHookOption.events)
&& Objects.equals(this.type, createHookOption.type);
}
@Override
public int hashCode() {
return Objects.hash(active, branchFilter, config, events, type);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateHookOption {\n");
sb.append(" active: ").append(toIndentedString(active)).append("\n");
sb.append(" branchFilter: ").append(toIndentedString(branchFilter)).append("\n");
sb.append(" config: ").append(toIndentedString(config)).append("\n");
sb.append(" events: ").append(toIndentedString(events)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).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,65 @@
/*
* 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 io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Objects;
/**
* CreateHookOptionConfig has all config options in it required are \&quot;content_type\&quot; and
* \&quot;url\&quot; Required
*/
@Schema(
description =
"CreateHookOptionConfig has all config options in it required are \"content_type\" and"
+ " \"url\" Required")
public class CreateHookOptionConfig extends HashMap<String, String> implements Serializable {
private static final long serialVersionUID = 1L;
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
return super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateHookOptionConfig {\n");
sb.append(" ").append(toIndentedString(super.toString())).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,83 @@
/*
* 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;
/** CreateIssueCommentOption options for creating a comment on an issue */
@Schema(description = "CreateIssueCommentOption options for creating a comment on an issue")
public class CreateIssueCommentOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("body")
private String body = null;
public CreateIssueCommentOption body(String body) {
this.body = body;
return this;
}
/**
* Get body
*
* @return body
*/
@Schema(required = true, description = "")
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateIssueCommentOption createIssueCommentOption = (CreateIssueCommentOption) o;
return Objects.equals(this.body, createIssueCommentOption.body);
}
@Override
public int hashCode() {
return Objects.hash(body);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateIssueCommentOption {\n");
sb.append(" body: ").append(toIndentedString(body)).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,294 @@
/*
* 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.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
/** CreateIssueOption options to create one issue */
@Schema(description = "CreateIssueOption options to create one issue")
public class CreateIssueOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("assignee")
private String assignee = null;
@SerializedName("assignees")
private List<String> assignees = null;
@SerializedName("body")
private String body = null;
@SerializedName("closed")
private Boolean closed = null;
@SerializedName("due_date")
private Date dueDate = null;
@SerializedName("labels")
private List<Long> labels = null;
@SerializedName("milestone")
private Long milestone = null;
@SerializedName("ref")
private String ref = null;
@SerializedName("title")
private String title = null;
public CreateIssueOption assignee(String assignee) {
this.assignee = assignee;
return this;
}
/**
* deprecated
*
* @return assignee
*/
@Schema(description = "deprecated")
public String getAssignee() {
return assignee;
}
public void setAssignee(String assignee) {
this.assignee = assignee;
}
public CreateIssueOption assignees(List<String> assignees) {
this.assignees = assignees;
return this;
}
public CreateIssueOption addAssigneesItem(String assigneesItem) {
if (this.assignees == null) {
this.assignees = new ArrayList<>();
}
this.assignees.add(assigneesItem);
return this;
}
/**
* Get assignees
*
* @return assignees
*/
@Schema(description = "")
public List<String> getAssignees() {
return assignees;
}
public void setAssignees(List<String> assignees) {
this.assignees = assignees;
}
public CreateIssueOption body(String body) {
this.body = body;
return this;
}
/**
* Get body
*
* @return body
*/
@Schema(description = "")
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
public CreateIssueOption closed(Boolean closed) {
this.closed = closed;
return this;
}
/**
* Get closed
*
* @return closed
*/
@Schema(description = "")
public Boolean isClosed() {
return closed;
}
public void setClosed(Boolean closed) {
this.closed = closed;
}
public CreateIssueOption dueDate(Date dueDate) {
this.dueDate = dueDate;
return this;
}
/**
* Get dueDate
*
* @return dueDate
*/
@Schema(description = "")
public Date getDueDate() {
return dueDate;
}
public void setDueDate(Date dueDate) {
this.dueDate = dueDate;
}
public CreateIssueOption labels(List<Long> labels) {
this.labels = labels;
return this;
}
public CreateIssueOption addLabelsItem(Long labelsItem) {
if (this.labels == null) {
this.labels = new ArrayList<>();
}
this.labels.add(labelsItem);
return this;
}
/**
* list of label ids
*
* @return labels
*/
@Schema(description = "list of label ids")
public List<Long> getLabels() {
return labels;
}
public void setLabels(List<Long> labels) {
this.labels = labels;
}
public CreateIssueOption milestone(Long milestone) {
this.milestone = milestone;
return this;
}
/**
* milestone id
*
* @return milestone
*/
@Schema(description = "milestone id")
public Long getMilestone() {
return milestone;
}
public void setMilestone(Long milestone) {
this.milestone = milestone;
}
public CreateIssueOption ref(String ref) {
this.ref = ref;
return this;
}
/**
* Get ref
*
* @return ref
*/
@Schema(description = "")
public String getRef() {
return ref;
}
public void setRef(String ref) {
this.ref = ref;
}
public CreateIssueOption title(String title) {
this.title = title;
return this;
}
/**
* Get title
*
* @return title
*/
@Schema(required = true, description = "")
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateIssueOption createIssueOption = (CreateIssueOption) o;
return Objects.equals(this.assignee, createIssueOption.assignee)
&& Objects.equals(this.assignees, createIssueOption.assignees)
&& Objects.equals(this.body, createIssueOption.body)
&& Objects.equals(this.closed, createIssueOption.closed)
&& Objects.equals(this.dueDate, createIssueOption.dueDate)
&& Objects.equals(this.labels, createIssueOption.labels)
&& Objects.equals(this.milestone, createIssueOption.milestone)
&& 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);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateIssueOption {\n");
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(" closed: ").append(toIndentedString(closed)).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");
sb.append(" ref: ").append(toIndentedString(ref)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).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,131 @@
/*
* 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;
/** CreateKeyOption options when creating a key */
@Schema(description = "CreateKeyOption options when creating a key")
public class CreateKeyOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("key")
private String key = null;
@SerializedName("read_only")
private Boolean readOnly = null;
@SerializedName("title")
private String title = null;
public CreateKeyOption key(String key) {
this.key = key;
return this;
}
/**
* An armored SSH key to add
*
* @return key
*/
@Schema(required = true, description = "An armored SSH key to add")
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public CreateKeyOption readOnly(Boolean readOnly) {
this.readOnly = readOnly;
return this;
}
/**
* Describe if the key has only read access or read/write
*
* @return readOnly
*/
@Schema(description = "Describe if the key has only read access or read/write")
public Boolean isReadOnly() {
return readOnly;
}
public void setReadOnly(Boolean readOnly) {
this.readOnly = readOnly;
}
public CreateKeyOption title(String title) {
this.title = title;
return this;
}
/**
* Title of the key to add
*
* @return title
*/
@Schema(required = true, description = "Title of the key to add")
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateKeyOption createKeyOption = (CreateKeyOption) o;
return Objects.equals(this.key, createKeyOption.key)
&& Objects.equals(this.readOnly, createKeyOption.readOnly)
&& Objects.equals(this.title, createKeyOption.title);
}
@Override
public int hashCode() {
return Objects.hash(key, readOnly, title);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateKeyOption {\n");
sb.append(" key: ").append(toIndentedString(key)).append("\n");
sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).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,131 @@
/*
* 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;
/** CreateLabelOption options for creating a label */
@Schema(description = "CreateLabelOption options for creating a label")
public class CreateLabelOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("color")
private String color = null;
@SerializedName("description")
private String description = null;
@SerializedName("name")
private String name = null;
public CreateLabelOption color(String color) {
this.color = color;
return this;
}
/**
* Get color
*
* @return color
*/
@Schema(example = "#00aabb", required = true, description = "")
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
public CreateLabelOption description(String description) {
this.description = description;
return this;
}
/**
* Get description
*
* @return description
*/
@Schema(description = "")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public CreateLabelOption name(String name) {
this.name = name;
return this;
}
/**
* Get name
*
* @return name
*/
@Schema(required = true, description = "")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateLabelOption createLabelOption = (CreateLabelOption) o;
return Objects.equals(this.color, createLabelOption.color)
&& Objects.equals(this.description, createLabelOption.description)
&& Objects.equals(this.name, createLabelOption.name);
}
@Override
public int hashCode() {
return Objects.hash(color, description, name);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateLabelOption {\n");
sb.append(" color: ").append(toIndentedString(color)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).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,206 @@
/*
* 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.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;
/** CreateMilestoneOption options for creating a milestone */
@Schema(description = "CreateMilestoneOption options for creating a milestone")
public class CreateMilestoneOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("description")
private String description = null;
@SerializedName("due_on")
private Date dueOn = 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 StateEnum state = null;
@SerializedName("title")
private String title = null;
public CreateMilestoneOption description(String description) {
this.description = description;
return this;
}
/**
* Get description
*
* @return description
*/
@Schema(description = "")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public CreateMilestoneOption dueOn(Date dueOn) {
this.dueOn = dueOn;
return this;
}
/**
* Get dueOn
*
* @return dueOn
*/
@Schema(description = "")
public Date getDueOn() {
return dueOn;
}
public void setDueOn(Date dueOn) {
this.dueOn = dueOn;
}
public CreateMilestoneOption state(StateEnum state) {
this.state = state;
return this;
}
/**
* Get state
*
* @return state
*/
@Schema(description = "")
public StateEnum getState() {
return state;
}
public void setState(StateEnum state) {
this.state = state;
}
public CreateMilestoneOption title(String title) {
this.title = title;
return this;
}
/**
* Get title
*
* @return title
*/
@Schema(description = "")
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateMilestoneOption createMilestoneOption = (CreateMilestoneOption) o;
return Objects.equals(this.description, createMilestoneOption.description)
&& Objects.equals(this.dueOn, createMilestoneOption.dueOn)
&& Objects.equals(this.state, createMilestoneOption.state)
&& Objects.equals(this.title, createMilestoneOption.title);
}
@Override
public int hashCode() {
return Objects.hash(description, dueOn, state, title);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateMilestoneOption {\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" dueOn: ").append(toIndentedString(dueOn)).append("\n");
sb.append(" state: ").append(toIndentedString(state)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).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,119 @@
/*
* 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.ArrayList;
import java.util.List;
import java.util.Objects;
/** CreateOAuth2ApplicationOptions holds options to create an oauth2 application */
@Schema(
description = "CreateOAuth2ApplicationOptions holds options to create an oauth2 application")
public class CreateOAuth2ApplicationOptions implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("name")
private String name = null;
@SerializedName("redirect_uris")
private List<String> redirectUris = null;
public CreateOAuth2ApplicationOptions name(String name) {
this.name = name;
return this;
}
/**
* Get name
*
* @return name
*/
@Schema(description = "")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public CreateOAuth2ApplicationOptions redirectUris(List<String> redirectUris) {
this.redirectUris = redirectUris;
return this;
}
public CreateOAuth2ApplicationOptions addRedirectUrisItem(String redirectUrisItem) {
if (this.redirectUris == null) {
this.redirectUris = new ArrayList<>();
}
this.redirectUris.add(redirectUrisItem);
return this;
}
/**
* Get redirectUris
*
* @return redirectUris
*/
@Schema(description = "")
public List<String> getRedirectUris() {
return redirectUris;
}
public void setRedirectUris(List<String> redirectUris) {
this.redirectUris = redirectUris;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateOAuth2ApplicationOptions createOAuth2ApplicationOptions =
(CreateOAuth2ApplicationOptions) o;
return Objects.equals(this.name, createOAuth2ApplicationOptions.name)
&& Objects.equals(this.redirectUris, createOAuth2ApplicationOptions.redirectUris);
}
@Override
public int hashCode() {
return Objects.hash(name, redirectUris);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateOAuth2ApplicationOptions {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" redirectUris: ").append(toIndentedString(redirectUris)).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,283 @@
/*
* 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.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;
/** CreateOrgOption options for creating an organization */
@Schema(description = "CreateOrgOption options for creating an organization")
public class CreateOrgOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("description")
private String description = null;
@SerializedName("full_name")
private String fullName = null;
@SerializedName("location")
private String location = null;
@SerializedName("repo_admin_change_team_access")
private Boolean repoAdminChangeTeamAccess = null;
@SerializedName("username")
private String username = null;
/**
* possible values are &#x60;public&#x60; (default), &#x60;limited&#x60; or &#x60;private&#x60;
*/
@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 VisibilityEnum visibility = null;
@SerializedName("website")
private String website = null;
public CreateOrgOption description(String description) {
this.description = description;
return this;
}
/**
* Get description
*
* @return description
*/
@Schema(description = "")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public CreateOrgOption fullName(String fullName) {
this.fullName = fullName;
return this;
}
/**
* Get fullName
*
* @return fullName
*/
@Schema(description = "")
public String getFullName() {
return fullName;
}
public void setFullName(String fullName) {
this.fullName = fullName;
}
public CreateOrgOption location(String location) {
this.location = location;
return this;
}
/**
* Get location
*
* @return location
*/
@Schema(description = "")
public String getLocation() {
return location;
}
public void setLocation(String location) {
this.location = location;
}
public CreateOrgOption repoAdminChangeTeamAccess(Boolean repoAdminChangeTeamAccess) {
this.repoAdminChangeTeamAccess = repoAdminChangeTeamAccess;
return this;
}
/**
* Get repoAdminChangeTeamAccess
*
* @return repoAdminChangeTeamAccess
*/
@Schema(description = "")
public Boolean isRepoAdminChangeTeamAccess() {
return repoAdminChangeTeamAccess;
}
public void setRepoAdminChangeTeamAccess(Boolean repoAdminChangeTeamAccess) {
this.repoAdminChangeTeamAccess = repoAdminChangeTeamAccess;
}
public CreateOrgOption username(String username) {
this.username = username;
return this;
}
/**
* Get username
*
* @return username
*/
@Schema(required = true, description = "")
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public CreateOrgOption visibility(VisibilityEnum visibility) {
this.visibility = visibility;
return this;
}
/**
* possible values are &#x60;public&#x60; (default), &#x60;limited&#x60; or &#x60;private&#x60;
*
* @return visibility
*/
@Schema(description = "possible values are `public` (default), `limited` or `private`")
public VisibilityEnum getVisibility() {
return visibility;
}
public void setVisibility(VisibilityEnum visibility) {
this.visibility = visibility;
}
public CreateOrgOption website(String website) {
this.website = website;
return this;
}
/**
* Get website
*
* @return website
*/
@Schema(description = "")
public String getWebsite() {
return website;
}
public void setWebsite(String website) {
this.website = website;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateOrgOption createOrgOption = (CreateOrgOption) o;
return Objects.equals(this.description, createOrgOption.description)
&& Objects.equals(this.fullName, createOrgOption.fullName)
&& Objects.equals(this.location, createOrgOption.location)
&& Objects.equals(this.repoAdminChangeTeamAccess, createOrgOption.repoAdminChangeTeamAccess)
&& Objects.equals(this.username, createOrgOption.username)
&& Objects.equals(this.visibility, createOrgOption.visibility)
&& Objects.equals(this.website, createOrgOption.website);
}
@Override
public int hashCode() {
return Objects.hash(
description, fullName, location, repoAdminChangeTeamAccess, username, visibility, website);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateOrgOption {\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n");
sb.append(" location: ").append(toIndentedString(location)).append("\n");
sb.append(" repoAdminChangeTeamAccess: ")
.append(toIndentedString(repoAdminChangeTeamAccess))
.append("\n");
sb.append(" username: ").append(toIndentedString(username)).append("\n");
sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n");
sb.append(" website: ").append(toIndentedString(website)).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,294 @@
/*
* 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.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
/** CreatePullRequestOption options when creating a pull request */
@Schema(description = "CreatePullRequestOption options when creating a pull request")
public class CreatePullRequestOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("assignee")
private String assignee = null;
@SerializedName("assignees")
private List<String> assignees = null;
@SerializedName("base")
private String base = null;
@SerializedName("body")
private String body = null;
@SerializedName("due_date")
private Date dueDate = null;
@SerializedName("head")
private String head = null;
@SerializedName("labels")
private List<Long> labels = null;
@SerializedName("milestone")
private Long milestone = null;
@SerializedName("title")
private String title = null;
public CreatePullRequestOption assignee(String assignee) {
this.assignee = assignee;
return this;
}
/**
* Get assignee
*
* @return assignee
*/
@Schema(description = "")
public String getAssignee() {
return assignee;
}
public void setAssignee(String assignee) {
this.assignee = assignee;
}
public CreatePullRequestOption assignees(List<String> assignees) {
this.assignees = assignees;
return this;
}
public CreatePullRequestOption addAssigneesItem(String assigneesItem) {
if (this.assignees == null) {
this.assignees = new ArrayList<>();
}
this.assignees.add(assigneesItem);
return this;
}
/**
* Get assignees
*
* @return assignees
*/
@Schema(description = "")
public List<String> getAssignees() {
return assignees;
}
public void setAssignees(List<String> assignees) {
this.assignees = assignees;
}
public CreatePullRequestOption base(String base) {
this.base = base;
return this;
}
/**
* Get base
*
* @return base
*/
@Schema(description = "")
public String getBase() {
return base;
}
public void setBase(String base) {
this.base = base;
}
public CreatePullRequestOption body(String body) {
this.body = body;
return this;
}
/**
* Get body
*
* @return body
*/
@Schema(description = "")
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
public CreatePullRequestOption dueDate(Date dueDate) {
this.dueDate = dueDate;
return this;
}
/**
* Get dueDate
*
* @return dueDate
*/
@Schema(description = "")
public Date getDueDate() {
return dueDate;
}
public void setDueDate(Date dueDate) {
this.dueDate = dueDate;
}
public CreatePullRequestOption head(String head) {
this.head = head;
return this;
}
/**
* Get head
*
* @return head
*/
@Schema(description = "")
public String getHead() {
return head;
}
public void setHead(String head) {
this.head = head;
}
public CreatePullRequestOption labels(List<Long> labels) {
this.labels = labels;
return this;
}
public CreatePullRequestOption addLabelsItem(Long labelsItem) {
if (this.labels == null) {
this.labels = new ArrayList<>();
}
this.labels.add(labelsItem);
return this;
}
/**
* Get labels
*
* @return labels
*/
@Schema(description = "")
public List<Long> getLabels() {
return labels;
}
public void setLabels(List<Long> labels) {
this.labels = labels;
}
public CreatePullRequestOption milestone(Long milestone) {
this.milestone = milestone;
return this;
}
/**
* Get milestone
*
* @return milestone
*/
@Schema(description = "")
public Long getMilestone() {
return milestone;
}
public void setMilestone(Long milestone) {
this.milestone = milestone;
}
public CreatePullRequestOption title(String title) {
this.title = title;
return this;
}
/**
* Get title
*
* @return title
*/
@Schema(description = "")
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreatePullRequestOption createPullRequestOption = (CreatePullRequestOption) o;
return Objects.equals(this.assignee, createPullRequestOption.assignee)
&& Objects.equals(this.assignees, createPullRequestOption.assignees)
&& Objects.equals(this.base, createPullRequestOption.base)
&& Objects.equals(this.body, createPullRequestOption.body)
&& Objects.equals(this.dueDate, createPullRequestOption.dueDate)
&& Objects.equals(this.head, createPullRequestOption.head)
&& Objects.equals(this.labels, createPullRequestOption.labels)
&& Objects.equals(this.milestone, createPullRequestOption.milestone)
&& Objects.equals(this.title, createPullRequestOption.title);
}
@Override
public int hashCode() {
return Objects.hash(assignee, assignees, base, body, dueDate, head, labels, milestone, title);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreatePullRequestOption {\n");
sb.append(" assignee: ").append(toIndentedString(assignee)).append("\n");
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(" dueDate: ").append(toIndentedString(dueDate)).append("\n");
sb.append(" head: ").append(toIndentedString(head)).append("\n");
sb.append(" labels: ").append(toIndentedString(labels)).append("\n");
sb.append(" milestone: ").append(toIndentedString(milestone)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).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,155 @@
/*
* 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;
/** CreatePullReviewComment represent a review comment for creation api */
@Schema(description = "CreatePullReviewComment represent a review comment for creation api")
public class CreatePullReviewComment implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("body")
private String body = null;
@SerializedName("new_position")
private Long newPosition = null;
@SerializedName("old_position")
private Long oldPosition = null;
@SerializedName("path")
private String path = null;
public CreatePullReviewComment body(String body) {
this.body = body;
return this;
}
/**
* Get body
*
* @return body
*/
@Schema(description = "")
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
public CreatePullReviewComment newPosition(Long newPosition) {
this.newPosition = newPosition;
return this;
}
/**
* if comment to new file line or 0
*
* @return newPosition
*/
@Schema(description = "if comment to new file line or 0")
public Long getNewPosition() {
return newPosition;
}
public void setNewPosition(Long newPosition) {
this.newPosition = newPosition;
}
public CreatePullReviewComment oldPosition(Long oldPosition) {
this.oldPosition = oldPosition;
return this;
}
/**
* if comment to old file line or 0
*
* @return oldPosition
*/
@Schema(description = "if comment to old file line or 0")
public Long getOldPosition() {
return oldPosition;
}
public void setOldPosition(Long oldPosition) {
this.oldPosition = oldPosition;
}
public CreatePullReviewComment path(String path) {
this.path = path;
return this;
}
/**
* the tree path
*
* @return path
*/
@Schema(description = "the tree path")
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreatePullReviewComment createPullReviewComment = (CreatePullReviewComment) o;
return Objects.equals(this.body, createPullReviewComment.body)
&& Objects.equals(this.newPosition, createPullReviewComment.newPosition)
&& Objects.equals(this.oldPosition, createPullReviewComment.oldPosition)
&& Objects.equals(this.path, createPullReviewComment.path);
}
@Override
public int hashCode() {
return Objects.hash(body, newPosition, oldPosition, path);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreatePullReviewComment {\n");
sb.append(" body: ").append(toIndentedString(body)).append("\n");
sb.append(" newPosition: ").append(toIndentedString(newPosition)).append("\n");
sb.append(" oldPosition: ").append(toIndentedString(oldPosition)).append("\n");
sb.append(" path: ").append(toIndentedString(path)).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,165 @@
/*
* 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.ArrayList;
import java.util.List;
import java.util.Objects;
/** CreatePullReviewOptions are options to create a pull review */
@Schema(description = "CreatePullReviewOptions are options to create a pull review")
public class CreatePullReviewOptions implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("body")
private String body = null;
@SerializedName("comments")
private List<CreatePullReviewComment> comments = null;
@SerializedName("commit_id")
private String commitId = null;
@SerializedName("event")
private String event = null;
public CreatePullReviewOptions body(String body) {
this.body = body;
return this;
}
/**
* Get body
*
* @return body
*/
@Schema(description = "")
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
public CreatePullReviewOptions comments(List<CreatePullReviewComment> comments) {
this.comments = comments;
return this;
}
public CreatePullReviewOptions addCommentsItem(CreatePullReviewComment commentsItem) {
if (this.comments == null) {
this.comments = new ArrayList<>();
}
this.comments.add(commentsItem);
return this;
}
/**
* Get comments
*
* @return comments
*/
@Schema(description = "")
public List<CreatePullReviewComment> getComments() {
return comments;
}
public void setComments(List<CreatePullReviewComment> comments) {
this.comments = comments;
}
public CreatePullReviewOptions commitId(String commitId) {
this.commitId = commitId;
return this;
}
/**
* Get commitId
*
* @return commitId
*/
@Schema(description = "")
public String getCommitId() {
return commitId;
}
public void setCommitId(String commitId) {
this.commitId = commitId;
}
public CreatePullReviewOptions event(String event) {
this.event = event;
return this;
}
/**
* Get event
*
* @return event
*/
@Schema(description = "")
public String getEvent() {
return event;
}
public void setEvent(String event) {
this.event = event;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreatePullReviewOptions createPullReviewOptions = (CreatePullReviewOptions) o;
return Objects.equals(this.body, createPullReviewOptions.body)
&& Objects.equals(this.comments, createPullReviewOptions.comments)
&& Objects.equals(this.commitId, createPullReviewOptions.commitId)
&& Objects.equals(this.event, createPullReviewOptions.event);
}
@Override
public int hashCode() {
return Objects.hash(body, comments, commitId, event);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreatePullReviewOptions {\n");
sb.append(" body: ").append(toIndentedString(body)).append("\n");
sb.append(" comments: ").append(toIndentedString(comments)).append("\n");
sb.append(" commitId: ").append(toIndentedString(commitId)).append("\n");
sb.append(" event: ").append(toIndentedString(event)).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,203 @@
/*
* 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;
/** CreateReleaseOption options when creating a release */
@Schema(description = "CreateReleaseOption options when creating a release")
public class CreateReleaseOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("body")
private String body = null;
@SerializedName("draft")
private Boolean draft = null;
@SerializedName("name")
private String name = null;
@SerializedName("prerelease")
private Boolean prerelease = null;
@SerializedName("tag_name")
private String tagName = null;
@SerializedName("target_commitish")
private String targetCommitish = null;
public CreateReleaseOption body(String body) {
this.body = body;
return this;
}
/**
* Get body
*
* @return body
*/
@Schema(description = "")
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
public CreateReleaseOption draft(Boolean draft) {
this.draft = draft;
return this;
}
/**
* Get draft
*
* @return draft
*/
@Schema(description = "")
public Boolean isDraft() {
return draft;
}
public void setDraft(Boolean draft) {
this.draft = draft;
}
public CreateReleaseOption name(String name) {
this.name = name;
return this;
}
/**
* Get name
*
* @return name
*/
@Schema(description = "")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public CreateReleaseOption prerelease(Boolean prerelease) {
this.prerelease = prerelease;
return this;
}
/**
* Get prerelease
*
* @return prerelease
*/
@Schema(description = "")
public Boolean isPrerelease() {
return prerelease;
}
public void setPrerelease(Boolean prerelease) {
this.prerelease = prerelease;
}
public CreateReleaseOption tagName(String tagName) {
this.tagName = tagName;
return this;
}
/**
* Get tagName
*
* @return tagName
*/
@Schema(required = true, description = "")
public String getTagName() {
return tagName;
}
public void setTagName(String tagName) {
this.tagName = tagName;
}
public CreateReleaseOption targetCommitish(String targetCommitish) {
this.targetCommitish = targetCommitish;
return this;
}
/**
* Get targetCommitish
*
* @return targetCommitish
*/
@Schema(description = "")
public String getTargetCommitish() {
return targetCommitish;
}
public void setTargetCommitish(String targetCommitish) {
this.targetCommitish = targetCommitish;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateReleaseOption createReleaseOption = (CreateReleaseOption) o;
return Objects.equals(this.body, createReleaseOption.body)
&& Objects.equals(this.draft, createReleaseOption.draft)
&& Objects.equals(this.name, createReleaseOption.name)
&& Objects.equals(this.prerelease, createReleaseOption.prerelease)
&& Objects.equals(this.tagName, createReleaseOption.tagName)
&& Objects.equals(this.targetCommitish, createReleaseOption.targetCommitish);
}
@Override
public int hashCode() {
return Objects.hash(body, draft, name, prerelease, tagName, targetCommitish);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateReleaseOption {\n");
sb.append(" body: ").append(toIndentedString(body)).append("\n");
sb.append(" draft: ").append(toIndentedString(draft)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" prerelease: ").append(toIndentedString(prerelease)).append("\n");
sb.append(" tagName: ").append(toIndentedString(tagName)).append("\n");
sb.append(" targetCommitish: ").append(toIndentedString(targetCommitish)).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,386 @@
/*
* 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.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;
/** CreateRepoOption options when creating repository */
@Schema(description = "CreateRepoOption options when creating repository")
public class CreateRepoOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("auto_init")
private Boolean autoInit = null;
@SerializedName("default_branch")
private String defaultBranch = null;
@SerializedName("description")
private String description = null;
@SerializedName("gitignores")
private String gitignores = null;
@SerializedName("issue_labels")
private String issueLabels = null;
@SerializedName("license")
private String license = null;
@SerializedName("name")
private String name = null;
@SerializedName("private")
private Boolean _private = null;
@SerializedName("readme")
private String readme = null;
@SerializedName("template")
private Boolean template = null;
/** TrustModel of the repository */
@JsonAdapter(TrustModelEnum.Adapter.class)
public enum TrustModelEnum {
DEFAULT("default"),
COLLABORATOR("collaborator"),
COMMITTER("committer"),
COLLABORATORCOMMITTER("collaboratorcommitter");
private String value;
TrustModelEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static TrustModelEnum fromValue(String input) {
for (TrustModelEnum b : TrustModelEnum.values()) {
if (b.value.equals(input)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter<TrustModelEnum> {
@Override
public void write(final JsonWriter jsonWriter, final TrustModelEnum enumeration)
throws IOException {
jsonWriter.value(String.valueOf(enumeration.getValue()));
}
@Override
public TrustModelEnum read(final JsonReader jsonReader) throws IOException {
Object value = jsonReader.nextString();
return TrustModelEnum.fromValue((String) (value));
}
}
}
@SerializedName("trust_model")
private TrustModelEnum trustModel = null;
public CreateRepoOption autoInit(Boolean autoInit) {
this.autoInit = autoInit;
return this;
}
/**
* Whether the repository should be auto-initialized?
*
* @return autoInit
*/
@Schema(description = "Whether the repository should be auto-initialized?")
public Boolean isAutoInit() {
return autoInit;
}
public void setAutoInit(Boolean autoInit) {
this.autoInit = autoInit;
}
public CreateRepoOption defaultBranch(String defaultBranch) {
this.defaultBranch = defaultBranch;
return this;
}
/**
* DefaultBranch of the repository (used when initializes and in template)
*
* @return defaultBranch
*/
@Schema(description = "DefaultBranch of the repository (used when initializes and in template)")
public String getDefaultBranch() {
return defaultBranch;
}
public void setDefaultBranch(String defaultBranch) {
this.defaultBranch = defaultBranch;
}
public CreateRepoOption description(String description) {
this.description = description;
return this;
}
/**
* Description of the repository to create
*
* @return description
*/
@Schema(description = "Description of the repository to create")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public CreateRepoOption gitignores(String gitignores) {
this.gitignores = gitignores;
return this;
}
/**
* Gitignores to use
*
* @return gitignores
*/
@Schema(description = "Gitignores to use")
public String getGitignores() {
return gitignores;
}
public void setGitignores(String gitignores) {
this.gitignores = gitignores;
}
public CreateRepoOption issueLabels(String issueLabels) {
this.issueLabels = issueLabels;
return this;
}
/**
* Label-Set to use
*
* @return issueLabels
*/
@Schema(description = "Label-Set to use")
public String getIssueLabels() {
return issueLabels;
}
public void setIssueLabels(String issueLabels) {
this.issueLabels = issueLabels;
}
public CreateRepoOption license(String license) {
this.license = license;
return this;
}
/**
* License to use
*
* @return license
*/
@Schema(description = "License to use")
public String getLicense() {
return license;
}
public void setLicense(String license) {
this.license = license;
}
public CreateRepoOption name(String name) {
this.name = name;
return this;
}
/**
* Name of the repository to create
*
* @return name
*/
@Schema(required = true, description = "Name of the repository to create")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public CreateRepoOption _private(Boolean _private) {
this._private = _private;
return this;
}
/**
* Whether the repository is private
*
* @return _private
*/
@Schema(description = "Whether the repository is private")
public Boolean isPrivate() {
return _private;
}
public void setPrivate(Boolean _private) {
this._private = _private;
}
public CreateRepoOption readme(String readme) {
this.readme = readme;
return this;
}
/**
* Readme of the repository to create
*
* @return readme
*/
@Schema(description = "Readme of the repository to create")
public String getReadme() {
return readme;
}
public void setReadme(String readme) {
this.readme = readme;
}
public CreateRepoOption template(Boolean template) {
this.template = template;
return this;
}
/**
* Whether the repository is template
*
* @return template
*/
@Schema(description = "Whether the repository is template")
public Boolean isTemplate() {
return template;
}
public void setTemplate(Boolean template) {
this.template = template;
}
public CreateRepoOption trustModel(TrustModelEnum trustModel) {
this.trustModel = trustModel;
return this;
}
/**
* TrustModel of the repository
*
* @return trustModel
*/
@Schema(description = "TrustModel of the repository")
public TrustModelEnum getTrustModel() {
return trustModel;
}
public void setTrustModel(TrustModelEnum trustModel) {
this.trustModel = trustModel;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateRepoOption createRepoOption = (CreateRepoOption) o;
return Objects.equals(this.autoInit, createRepoOption.autoInit)
&& Objects.equals(this.defaultBranch, createRepoOption.defaultBranch)
&& Objects.equals(this.description, createRepoOption.description)
&& Objects.equals(this.gitignores, createRepoOption.gitignores)
&& Objects.equals(this.issueLabels, createRepoOption.issueLabels)
&& Objects.equals(this.license, createRepoOption.license)
&& Objects.equals(this.name, createRepoOption.name)
&& Objects.equals(this._private, createRepoOption._private)
&& Objects.equals(this.readme, createRepoOption.readme)
&& Objects.equals(this.template, createRepoOption.template)
&& Objects.equals(this.trustModel, createRepoOption.trustModel);
}
@Override
public int hashCode() {
return Objects.hash(
autoInit,
defaultBranch,
description,
gitignores,
issueLabels,
license,
name,
_private,
readme,
template,
trustModel);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateRepoOption {\n");
sb.append(" autoInit: ").append(toIndentedString(autoInit)).append("\n");
sb.append(" defaultBranch: ").append(toIndentedString(defaultBranch)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" gitignores: ").append(toIndentedString(gitignores)).append("\n");
sb.append(" issueLabels: ").append(toIndentedString(issueLabels)).append("\n");
sb.append(" license: ").append(toIndentedString(license)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" _private: ").append(toIndentedString(_private)).append("\n");
sb.append(" readme: ").append(toIndentedString(readme)).append("\n");
sb.append(" template: ").append(toIndentedString(template)).append("\n");
sb.append(" trustModel: ").append(toIndentedString(trustModel)).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,157 @@
/*
* 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;
/** CreateStatusOption holds the information needed to create a new CommitStatus for a Commit */
@Schema(
description =
"CreateStatusOption holds the information needed to create a new CommitStatus for a Commit")
public class CreateStatusOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("context")
private String context = null;
@SerializedName("description")
private String description = null;
@SerializedName("state")
private String state = null;
@SerializedName("target_url")
private String targetUrl = null;
public CreateStatusOption context(String context) {
this.context = context;
return this;
}
/**
* Get context
*
* @return context
*/
@Schema(description = "")
public String getContext() {
return context;
}
public void setContext(String context) {
this.context = context;
}
public CreateStatusOption description(String description) {
this.description = description;
return this;
}
/**
* Get description
*
* @return description
*/
@Schema(description = "")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public CreateStatusOption state(String state) {
this.state = state;
return this;
}
/**
* Get state
*
* @return state
*/
@Schema(description = "")
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public CreateStatusOption targetUrl(String targetUrl) {
this.targetUrl = targetUrl;
return this;
}
/**
* Get targetUrl
*
* @return targetUrl
*/
@Schema(description = "")
public String getTargetUrl() {
return targetUrl;
}
public void setTargetUrl(String targetUrl) {
this.targetUrl = targetUrl;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateStatusOption createStatusOption = (CreateStatusOption) o;
return Objects.equals(this.context, createStatusOption.context)
&& Objects.equals(this.description, createStatusOption.description)
&& Objects.equals(this.state, createStatusOption.state)
&& Objects.equals(this.targetUrl, createStatusOption.targetUrl);
}
@Override
public int hashCode() {
return Objects.hash(context, description, state, targetUrl);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateStatusOption {\n");
sb.append(" context: ").append(toIndentedString(context)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" state: ").append(toIndentedString(state)).append("\n");
sb.append(" targetUrl: ").append(toIndentedString(targetUrl)).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,131 @@
/*
* 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;
/** CreateTagOption options when creating a tag */
@Schema(description = "CreateTagOption options when creating a tag")
public class CreateTagOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("message")
private String message = null;
@SerializedName("tag_name")
private String tagName = null;
@SerializedName("target")
private String target = null;
public CreateTagOption message(String message) {
this.message = message;
return this;
}
/**
* Get message
*
* @return message
*/
@Schema(description = "")
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public CreateTagOption tagName(String tagName) {
this.tagName = tagName;
return this;
}
/**
* Get tagName
*
* @return tagName
*/
@Schema(required = true, description = "")
public String getTagName() {
return tagName;
}
public void setTagName(String tagName) {
this.tagName = tagName;
}
public CreateTagOption target(String target) {
this.target = target;
return this;
}
/**
* Get target
*
* @return target
*/
@Schema(description = "")
public String getTarget() {
return target;
}
public void setTarget(String target) {
this.target = target;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateTagOption createTagOption = (CreateTagOption) o;
return Objects.equals(this.message, createTagOption.message)
&& Objects.equals(this.tagName, createTagOption.tagName)
&& Objects.equals(this.target, createTagOption.target);
}
@Override
public int hashCode() {
return Objects.hash(message, tagName, target);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateTagOption {\n");
sb.append(" message: ").append(toIndentedString(message)).append("\n");
sb.append(" tagName: ").append(toIndentedString(tagName)).append("\n");
sb.append(" target: ").append(toIndentedString(target)).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,307 @@
/*
* 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.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;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/** CreateTeamOption options for creating a team */
@Schema(description = "CreateTeamOption options for creating a team")
public class CreateTeamOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("can_create_org_repo")
private Boolean canCreateOrgRepo = null;
@SerializedName("description")
private String description = null;
@SerializedName("includes_all_repositories")
private Boolean includesAllRepositories = null;
@SerializedName("name")
private String name = null;
/** Gets or Sets permission */
@JsonAdapter(PermissionEnum.Adapter.class)
public enum PermissionEnum {
READ("read"),
WRITE("write"),
ADMIN("admin");
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 PermissionEnum permission = null;
@SerializedName("units")
private List<String> units = null;
@SerializedName("units_map")
private Map<String, String> unitsMap = null;
public CreateTeamOption canCreateOrgRepo(Boolean canCreateOrgRepo) {
this.canCreateOrgRepo = canCreateOrgRepo;
return this;
}
/**
* Get canCreateOrgRepo
*
* @return canCreateOrgRepo
*/
@Schema(description = "")
public Boolean isCanCreateOrgRepo() {
return canCreateOrgRepo;
}
public void setCanCreateOrgRepo(Boolean canCreateOrgRepo) {
this.canCreateOrgRepo = canCreateOrgRepo;
}
public CreateTeamOption description(String description) {
this.description = description;
return this;
}
/**
* Get description
*
* @return description
*/
@Schema(description = "")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public CreateTeamOption includesAllRepositories(Boolean includesAllRepositories) {
this.includesAllRepositories = includesAllRepositories;
return this;
}
/**
* Get includesAllRepositories
*
* @return includesAllRepositories
*/
@Schema(description = "")
public Boolean isIncludesAllRepositories() {
return includesAllRepositories;
}
public void setIncludesAllRepositories(Boolean includesAllRepositories) {
this.includesAllRepositories = includesAllRepositories;
}
public CreateTeamOption name(String name) {
this.name = name;
return this;
}
/**
* Get name
*
* @return name
*/
@Schema(required = true, description = "")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public CreateTeamOption permission(PermissionEnum permission) {
this.permission = permission;
return this;
}
/**
* Get permission
*
* @return permission
*/
@Schema(description = "")
public PermissionEnum getPermission() {
return permission;
}
public void setPermission(PermissionEnum permission) {
this.permission = permission;
}
public CreateTeamOption units(List<String> units) {
this.units = units;
return this;
}
public CreateTeamOption addUnitsItem(String unitsItem) {
if (this.units == null) {
this.units = new ArrayList<>();
}
this.units.add(unitsItem);
return this;
}
/**
* Get units
*
* @return units
*/
@Schema(
example =
"[\"repo.code\",\"repo.issues\",\"repo.ext_issues\",\"repo.wiki\",\"repo.pulls\",\"repo.releases\",\"repo.projects\",\"repo.ext_wiki\"]",
description = "")
public List<String> getUnits() {
return units;
}
public void setUnits(List<String> units) {
this.units = units;
}
public CreateTeamOption unitsMap(Map<String, String> unitsMap) {
this.unitsMap = unitsMap;
return this;
}
public CreateTeamOption putUnitsMapItem(String key, String unitsMapItem) {
if (this.unitsMap == null) {
this.unitsMap = new HashMap<>();
}
this.unitsMap.put(key, unitsMapItem);
return this;
}
/**
* Get unitsMap
*
* @return unitsMap
*/
@Schema(
example =
"{\"repo.code\":\"read\",\"repo.issues\":\"write\",\"repo.ext_issues\":\"none\",\"repo.wiki\":\"admin\",\"repo.pulls\":\"owner\",\"repo.releases\":\"none\",\"repo.projects\":\"none\",\"repo.ext_wiki\":\"none\"]",
description = "")
public Map<String, String> getUnitsMap() {
return unitsMap;
}
public void setUnitsMap(Map<String, String> unitsMap) {
this.unitsMap = unitsMap;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateTeamOption createTeamOption = (CreateTeamOption) o;
return Objects.equals(this.canCreateOrgRepo, createTeamOption.canCreateOrgRepo)
&& Objects.equals(this.description, createTeamOption.description)
&& Objects.equals(this.includesAllRepositories, createTeamOption.includesAllRepositories)
&& Objects.equals(this.name, createTeamOption.name)
&& Objects.equals(this.permission, createTeamOption.permission)
&& Objects.equals(this.units, createTeamOption.units)
&& Objects.equals(this.unitsMap, createTeamOption.unitsMap);
}
@Override
public int hashCode() {
return Objects.hash(
canCreateOrgRepo, description, includesAllRepositories, name, permission, units, unitsMap);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateTeamOption {\n");
sb.append(" canCreateOrgRepo: ").append(toIndentedString(canCreateOrgRepo)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" includesAllRepositories: ")
.append(toIndentedString(includesAllRepositories))
.append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" permission: ").append(toIndentedString(permission)).append("\n");
sb.append(" units: ").append(toIndentedString(units)).append("\n");
sb.append(" unitsMap: ").append(toIndentedString(unitsMap)).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,284 @@
/*
* 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;
/** CreateUserOption create user options */
@Schema(description = "CreateUserOption create user options")
public class CreateUserOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("email")
private String email = null;
@SerializedName("full_name")
private String fullName = null;
@SerializedName("login_name")
private String loginName = null;
@SerializedName("must_change_password")
private Boolean mustChangePassword = null;
@SerializedName("password")
private String password = null;
@SerializedName("send_notify")
private Boolean sendNotify = null;
@SerializedName("source_id")
private Long sourceId = null;
@SerializedName("username")
private String username = null;
@SerializedName("visibility")
private String visibility = null;
public CreateUserOption email(String email) {
this.email = email;
return this;
}
/**
* Get email
*
* @return email
*/
@Schema(required = true, description = "")
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public CreateUserOption fullName(String fullName) {
this.fullName = fullName;
return this;
}
/**
* Get fullName
*
* @return fullName
*/
@Schema(description = "")
public String getFullName() {
return fullName;
}
public void setFullName(String fullName) {
this.fullName = fullName;
}
public CreateUserOption loginName(String loginName) {
this.loginName = loginName;
return this;
}
/**
* Get loginName
*
* @return loginName
*/
@Schema(description = "")
public String getLoginName() {
return loginName;
}
public void setLoginName(String loginName) {
this.loginName = loginName;
}
public CreateUserOption mustChangePassword(Boolean mustChangePassword) {
this.mustChangePassword = mustChangePassword;
return this;
}
/**
* Get mustChangePassword
*
* @return mustChangePassword
*/
@Schema(description = "")
public Boolean isMustChangePassword() {
return mustChangePassword;
}
public void setMustChangePassword(Boolean mustChangePassword) {
this.mustChangePassword = mustChangePassword;
}
public CreateUserOption password(String password) {
this.password = password;
return this;
}
/**
* Get password
*
* @return password
*/
@Schema(required = true, description = "")
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public CreateUserOption sendNotify(Boolean sendNotify) {
this.sendNotify = sendNotify;
return this;
}
/**
* Get sendNotify
*
* @return sendNotify
*/
@Schema(description = "")
public Boolean isSendNotify() {
return sendNotify;
}
public void setSendNotify(Boolean sendNotify) {
this.sendNotify = sendNotify;
}
public CreateUserOption sourceId(Long sourceId) {
this.sourceId = sourceId;
return this;
}
/**
* Get sourceId
*
* @return sourceId
*/
@Schema(description = "")
public Long getSourceId() {
return sourceId;
}
public void setSourceId(Long sourceId) {
this.sourceId = sourceId;
}
public CreateUserOption username(String username) {
this.username = username;
return this;
}
/**
* Get username
*
* @return username
*/
@Schema(required = true, description = "")
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public CreateUserOption visibility(String visibility) {
this.visibility = visibility;
return this;
}
/**
* Get visibility
*
* @return visibility
*/
@Schema(description = "")
public String getVisibility() {
return visibility;
}
public void setVisibility(String visibility) {
this.visibility = visibility;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateUserOption createUserOption = (CreateUserOption) o;
return Objects.equals(this.email, createUserOption.email)
&& Objects.equals(this.fullName, createUserOption.fullName)
&& Objects.equals(this.loginName, createUserOption.loginName)
&& Objects.equals(this.mustChangePassword, createUserOption.mustChangePassword)
&& Objects.equals(this.password, createUserOption.password)
&& Objects.equals(this.sendNotify, createUserOption.sendNotify)
&& Objects.equals(this.sourceId, createUserOption.sourceId)
&& Objects.equals(this.username, createUserOption.username)
&& Objects.equals(this.visibility, createUserOption.visibility);
}
@Override
public int hashCode() {
return Objects.hash(
email,
fullName,
loginName,
mustChangePassword,
password,
sendNotify,
sourceId,
username,
visibility);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateUserOption {\n");
sb.append(" email: ").append(toIndentedString(email)).append("\n");
sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n");
sb.append(" loginName: ").append(toIndentedString(loginName)).append("\n");
sb.append(" mustChangePassword: ").append(toIndentedString(mustChangePassword)).append("\n");
sb.append(" password: ").append(toIndentedString(password)).append("\n");
sb.append(" sendNotify: ").append(toIndentedString(sendNotify)).append("\n");
sb.append(" sourceId: ").append(toIndentedString(sourceId)).append("\n");
sb.append(" username: ").append(toIndentedString(username)).append("\n");
sb.append(" visibility: ").append(toIndentedString(visibility)).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,131 @@
/*
* 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;
/** CreateWikiPageOptions form for creating wiki */
@Schema(description = "CreateWikiPageOptions form for creating wiki")
public class CreateWikiPageOptions implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("content_base64")
private String contentBase64 = null;
@SerializedName("message")
private String message = null;
@SerializedName("title")
private String title = null;
public CreateWikiPageOptions contentBase64(String contentBase64) {
this.contentBase64 = contentBase64;
return this;
}
/**
* content must be base64 encoded
*
* @return contentBase64
*/
@Schema(description = "content must be base64 encoded")
public String getContentBase64() {
return contentBase64;
}
public void setContentBase64(String contentBase64) {
this.contentBase64 = contentBase64;
}
public CreateWikiPageOptions message(String message) {
this.message = message;
return this;
}
/**
* optional commit message summarizing the change
*
* @return message
*/
@Schema(description = "optional commit message summarizing the change")
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public CreateWikiPageOptions title(String title) {
this.title = title;
return this;
}
/**
* page title. leave empty to keep unchanged
*
* @return title
*/
@Schema(description = "page title. leave empty to keep unchanged")
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateWikiPageOptions createWikiPageOptions = (CreateWikiPageOptions) o;
return Objects.equals(this.contentBase64, createWikiPageOptions.contentBase64)
&& Objects.equals(this.message, createWikiPageOptions.message)
&& Objects.equals(this.title, createWikiPageOptions.title);
}
@Override
public int hashCode() {
return Objects.hash(contentBase64, message, title);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateWikiPageOptions {\n");
sb.append(" contentBase64: ").append(toIndentedString(contentBase64)).append("\n");
sb.append(" message: ").append(toIndentedString(message)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).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,180 @@
/*
* 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.Date;
import java.util.Objects;
/** Cron represents a Cron task */
@Schema(description = "Cron represents a Cron task")
public class Cron implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("exec_times")
private Long execTimes = null;
@SerializedName("name")
private String name = null;
@SerializedName("next")
private Date next = null;
@SerializedName("prev")
private Date prev = null;
@SerializedName("schedule")
private String schedule = null;
public Cron execTimes(Long execTimes) {
this.execTimes = execTimes;
return this;
}
/**
* Get execTimes
*
* @return execTimes
*/
@Schema(description = "")
public Long getExecTimes() {
return execTimes;
}
public void setExecTimes(Long execTimes) {
this.execTimes = execTimes;
}
public Cron name(String name) {
this.name = name;
return this;
}
/**
* Get name
*
* @return name
*/
@Schema(description = "")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Cron next(Date next) {
this.next = next;
return this;
}
/**
* Get next
*
* @return next
*/
@Schema(description = "")
public Date getNext() {
return next;
}
public void setNext(Date next) {
this.next = next;
}
public Cron prev(Date prev) {
this.prev = prev;
return this;
}
/**
* Get prev
*
* @return prev
*/
@Schema(description = "")
public Date getPrev() {
return prev;
}
public void setPrev(Date prev) {
this.prev = prev;
}
public Cron schedule(String schedule) {
this.schedule = schedule;
return this;
}
/**
* Get schedule
*
* @return schedule
*/
@Schema(description = "")
public String getSchedule() {
return schedule;
}
public void setSchedule(String schedule) {
this.schedule = schedule;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Cron cron = (Cron) o;
return Objects.equals(this.execTimes, cron.execTimes)
&& Objects.equals(this.name, cron.name)
&& Objects.equals(this.next, cron.next)
&& Objects.equals(this.prev, cron.prev)
&& Objects.equals(this.schedule, cron.schedule);
}
@Override
public int hashCode() {
return Objects.hash(execTimes, name, next, prev, schedule);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Cron {\n");
sb.append(" execTimes: ").append(toIndentedString(execTimes)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" next: ").append(toIndentedString(next)).append("\n");
sb.append(" prev: ").append(toIndentedString(prev)).append("\n");
sb.append(" schedule: ").append(toIndentedString(schedule)).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,93 @@
/*
* 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.ArrayList;
import java.util.List;
import java.util.Objects;
/** DeleteEmailOption options when deleting email addresses */
@Schema(description = "DeleteEmailOption options when deleting email addresses")
public class DeleteEmailOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("emails")
private List<String> emails = null;
public DeleteEmailOption emails(List<String> emails) {
this.emails = emails;
return this;
}
public DeleteEmailOption addEmailsItem(String emailsItem) {
if (this.emails == null) {
this.emails = new ArrayList<>();
}
this.emails.add(emailsItem);
return this;
}
/**
* email addresses to delete
*
* @return emails
*/
@Schema(description = "email addresses to delete")
public List<String> getEmails() {
return emails;
}
public void setEmails(List<String> emails) {
this.emails = emails;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DeleteEmailOption deleteEmailOption = (DeleteEmailOption) o;
return Objects.equals(this.emails, deleteEmailOption.emails);
}
@Override
public int hashCode() {
return Objects.hash(emails);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DeleteEmailOption {\n");
sb.append(" emails: ").append(toIndentedString(emails)).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,268 @@
/*
* 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;
/**
* DeleteFileOptions options for deleting files (used for other File structs below) Note:
* &#x60;author&#x60; and &#x60;committer&#x60; are optional (if only one is given, it will be used
* for the other, otherwise the authenticated user will be used)
*/
@Schema(
description =
"DeleteFileOptions options for deleting files (used for other File structs below) Note:"
+ " `author` and `committer` are optional (if only one is given, it will be used for"
+ " the other, otherwise the authenticated user will be used)")
public class DeleteFileOptions implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("author")
private Identity author = null;
@SerializedName("branch")
private String branch = null;
@SerializedName("committer")
private Identity committer = null;
@SerializedName("dates")
private CommitDateOptions dates = null;
@SerializedName("message")
private String message = null;
@SerializedName("new_branch")
private String newBranch = null;
@SerializedName("sha")
private String sha = null;
@SerializedName("signoff")
private Boolean signoff = null;
public DeleteFileOptions author(Identity author) {
this.author = author;
return this;
}
/**
* Get author
*
* @return author
*/
@Schema(description = "")
public Identity getAuthor() {
return author;
}
public void setAuthor(Identity author) {
this.author = author;
}
public DeleteFileOptions branch(String branch) {
this.branch = branch;
return this;
}
/**
* branch (optional) to base this file from. if not given, the default branch is used
*
* @return branch
*/
@Schema(
description =
"branch (optional) to base this file from. if not given, the default branch is used")
public String getBranch() {
return branch;
}
public void setBranch(String branch) {
this.branch = branch;
}
public DeleteFileOptions committer(Identity committer) {
this.committer = committer;
return this;
}
/**
* Get committer
*
* @return committer
*/
@Schema(description = "")
public Identity getCommitter() {
return committer;
}
public void setCommitter(Identity committer) {
this.committer = committer;
}
public DeleteFileOptions dates(CommitDateOptions dates) {
this.dates = dates;
return this;
}
/**
* Get dates
*
* @return dates
*/
@Schema(description = "")
public CommitDateOptions getDates() {
return dates;
}
public void setDates(CommitDateOptions dates) {
this.dates = dates;
}
public DeleteFileOptions message(String message) {
this.message = message;
return this;
}
/**
* message (optional) for the commit of this file. if not supplied, a default message will be used
*
* @return message
*/
@Schema(
description =
"message (optional) for the commit of this file. if not supplied, a default message will"
+ " be used")
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public DeleteFileOptions newBranch(String newBranch) {
this.newBranch = newBranch;
return this;
}
/**
* new_branch (optional) will make a new branch from &#x60;branch&#x60; before creating the file
*
* @return newBranch
*/
@Schema(
description =
"new_branch (optional) will make a new branch from `branch` before creating the file")
public String getNewBranch() {
return newBranch;
}
public void setNewBranch(String newBranch) {
this.newBranch = newBranch;
}
public DeleteFileOptions sha(String sha) {
this.sha = sha;
return this;
}
/**
* sha is the SHA for the file that already exists
*
* @return sha
*/
@Schema(required = true, description = "sha is the SHA for the file that already exists")
public String getSha() {
return sha;
}
public void setSha(String sha) {
this.sha = sha;
}
public DeleteFileOptions signoff(Boolean signoff) {
this.signoff = signoff;
return this;
}
/**
* Add a Signed-off-by trailer by the committer at the end of the commit log message.
*
* @return signoff
*/
@Schema(
description =
"Add a Signed-off-by trailer by the committer at the end of the commit log message.")
public Boolean isSignoff() {
return signoff;
}
public void setSignoff(Boolean signoff) {
this.signoff = signoff;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DeleteFileOptions deleteFileOptions = (DeleteFileOptions) o;
return Objects.equals(this.author, deleteFileOptions.author)
&& Objects.equals(this.branch, deleteFileOptions.branch)
&& Objects.equals(this.committer, deleteFileOptions.committer)
&& Objects.equals(this.dates, deleteFileOptions.dates)
&& Objects.equals(this.message, deleteFileOptions.message)
&& Objects.equals(this.newBranch, deleteFileOptions.newBranch)
&& Objects.equals(this.sha, deleteFileOptions.sha)
&& Objects.equals(this.signoff, deleteFileOptions.signoff);
}
@Override
public int hashCode() {
return Objects.hash(author, branch, committer, dates, message, newBranch, sha, signoff);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DeleteFileOptions {\n");
sb.append(" author: ").append(toIndentedString(author)).append("\n");
sb.append(" branch: ").append(toIndentedString(branch)).append("\n");
sb.append(" committer: ").append(toIndentedString(committer)).append("\n");
sb.append(" dates: ").append(toIndentedString(dates)).append("\n");
sb.append(" message: ").append(toIndentedString(message)).append("\n");
sb.append(" newBranch: ").append(toIndentedString(newBranch)).append("\n");
sb.append(" sha: ").append(toIndentedString(sha)).append("\n");
sb.append(" signoff: ").append(toIndentedString(signoff)).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,276 @@
/*
* 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.Date;
import java.util.Objects;
/** DeployKey a deploy key */
@Schema(description = "DeployKey a deploy key")
public class DeployKey implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("created_at")
private Date createdAt = null;
@SerializedName("fingerprint")
private String fingerprint = null;
@SerializedName("id")
private Long id = null;
@SerializedName("key")
private String key = null;
@SerializedName("key_id")
private Long keyId = null;
@SerializedName("read_only")
private Boolean readOnly = null;
@SerializedName("repository")
private Repository repository = null;
@SerializedName("title")
private String title = null;
@SerializedName("url")
private String url = null;
public DeployKey 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 DeployKey fingerprint(String fingerprint) {
this.fingerprint = fingerprint;
return this;
}
/**
* Get fingerprint
*
* @return fingerprint
*/
@Schema(description = "")
public String getFingerprint() {
return fingerprint;
}
public void setFingerprint(String fingerprint) {
this.fingerprint = fingerprint;
}
public DeployKey id(Long id) {
this.id = id;
return this;
}
/**
* Get id
*
* @return id
*/
@Schema(description = "")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public DeployKey key(String key) {
this.key = key;
return this;
}
/**
* Get key
*
* @return key
*/
@Schema(description = "")
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public DeployKey keyId(Long keyId) {
this.keyId = keyId;
return this;
}
/**
* Get keyId
*
* @return keyId
*/
@Schema(description = "")
public Long getKeyId() {
return keyId;
}
public void setKeyId(Long keyId) {
this.keyId = keyId;
}
public DeployKey readOnly(Boolean readOnly) {
this.readOnly = readOnly;
return this;
}
/**
* Get readOnly
*
* @return readOnly
*/
@Schema(description = "")
public Boolean isReadOnly() {
return readOnly;
}
public void setReadOnly(Boolean readOnly) {
this.readOnly = readOnly;
}
public DeployKey repository(Repository repository) {
this.repository = repository;
return this;
}
/**
* Get repository
*
* @return repository
*/
@Schema(description = "")
public Repository getRepository() {
return repository;
}
public void setRepository(Repository repository) {
this.repository = repository;
}
public DeployKey title(String title) {
this.title = title;
return this;
}
/**
* Get title
*
* @return title
*/
@Schema(description = "")
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public DeployKey url(String url) {
this.url = url;
return this;
}
/**
* Get url
*
* @return url
*/
@Schema(description = "")
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DeployKey deployKey = (DeployKey) o;
return Objects.equals(this.createdAt, deployKey.createdAt)
&& Objects.equals(this.fingerprint, deployKey.fingerprint)
&& Objects.equals(this.id, deployKey.id)
&& Objects.equals(this.key, deployKey.key)
&& Objects.equals(this.keyId, deployKey.keyId)
&& Objects.equals(this.readOnly, deployKey.readOnly)
&& Objects.equals(this.repository, deployKey.repository)
&& Objects.equals(this.title, deployKey.title)
&& Objects.equals(this.url, deployKey.url);
}
@Override
public int hashCode() {
return Objects.hash(createdAt, fingerprint, id, key, keyId, readOnly, repository, title, url);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DeployKey {\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" fingerprint: ").append(toIndentedString(fingerprint)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" key: ").append(toIndentedString(key)).append("\n");
sb.append(" keyId: ").append(toIndentedString(keyId)).append("\n");
sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n");
sb.append(" repository: ").append(toIndentedString(repository)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" url: ").append(toIndentedString(url)).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,83 @@
/*
* 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;
/** DismissPullReviewOptions are options to dismiss a pull review */
@Schema(description = "DismissPullReviewOptions are options to dismiss a pull review")
public class DismissPullReviewOptions implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("message")
private String message = null;
public DismissPullReviewOptions message(String message) {
this.message = message;
return this;
}
/**
* Get message
*
* @return message
*/
@Schema(description = "")
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DismissPullReviewOptions dismissPullReviewOptions = (DismissPullReviewOptions) o;
return Objects.equals(this.message, dismissPullReviewOptions.message);
}
@Override
public int hashCode() {
return Objects.hash(message);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DismissPullReviewOptions {\n");
sb.append(" message: ").append(toIndentedString(message)).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,83 @@
/*
* 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;
/** EditAttachmentOptions options for editing attachments */
@Schema(description = "EditAttachmentOptions options for editing attachments")
public class EditAttachmentOptions implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("name")
private String name = null;
public EditAttachmentOptions name(String name) {
this.name = name;
return this;
}
/**
* Get name
*
* @return name
*/
@Schema(description = "")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EditAttachmentOptions editAttachmentOptions = (EditAttachmentOptions) o;
return Objects.equals(this.name, editAttachmentOptions.name);
}
@Override
public int hashCode() {
return Objects.hash(name);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EditAttachmentOptions {\n");
sb.append(" name: ").append(toIndentedString(name)).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,697 @@
/*
* 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.ArrayList;
import java.util.List;
import java.util.Objects;
/** EditBranchProtectionOption options for editing a branch protection */
@Schema(description = "EditBranchProtectionOption options for editing a branch protection")
public class EditBranchProtectionOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("approvals_whitelist_teams")
private List<String> approvalsWhitelistTeams = null;
@SerializedName("approvals_whitelist_username")
private List<String> approvalsWhitelistUsername = null;
@SerializedName("block_on_official_review_requests")
private Boolean blockOnOfficialReviewRequests = null;
@SerializedName("block_on_outdated_branch")
private Boolean blockOnOutdatedBranch = null;
@SerializedName("block_on_rejected_reviews")
private Boolean blockOnRejectedReviews = null;
@SerializedName("dismiss_stale_approvals")
private Boolean dismissStaleApprovals = null;
@SerializedName("enable_approvals_whitelist")
private Boolean enableApprovalsWhitelist = null;
@SerializedName("enable_merge_whitelist")
private Boolean enableMergeWhitelist = null;
@SerializedName("enable_push")
private Boolean enablePush = null;
@SerializedName("enable_push_whitelist")
private Boolean enablePushWhitelist = null;
@SerializedName("enable_status_check")
private Boolean enableStatusCheck = null;
@SerializedName("merge_whitelist_teams")
private List<String> mergeWhitelistTeams = null;
@SerializedName("merge_whitelist_usernames")
private List<String> mergeWhitelistUsernames = null;
@SerializedName("protected_file_patterns")
private String protectedFilePatterns = null;
@SerializedName("push_whitelist_deploy_keys")
private Boolean pushWhitelistDeployKeys = null;
@SerializedName("push_whitelist_teams")
private List<String> pushWhitelistTeams = null;
@SerializedName("push_whitelist_usernames")
private List<String> pushWhitelistUsernames = null;
@SerializedName("require_signed_commits")
private Boolean requireSignedCommits = null;
@SerializedName("required_approvals")
private Long requiredApprovals = null;
@SerializedName("status_check_contexts")
private List<String> statusCheckContexts = null;
@SerializedName("unprotected_file_patterns")
private String unprotectedFilePatterns = null;
public EditBranchProtectionOption approvalsWhitelistTeams(List<String> approvalsWhitelistTeams) {
this.approvalsWhitelistTeams = approvalsWhitelistTeams;
return this;
}
public EditBranchProtectionOption addApprovalsWhitelistTeamsItem(
String approvalsWhitelistTeamsItem) {
if (this.approvalsWhitelistTeams == null) {
this.approvalsWhitelistTeams = new ArrayList<>();
}
this.approvalsWhitelistTeams.add(approvalsWhitelistTeamsItem);
return this;
}
/**
* Get approvalsWhitelistTeams
*
* @return approvalsWhitelistTeams
*/
@Schema(description = "")
public List<String> getApprovalsWhitelistTeams() {
return approvalsWhitelistTeams;
}
public void setApprovalsWhitelistTeams(List<String> approvalsWhitelistTeams) {
this.approvalsWhitelistTeams = approvalsWhitelistTeams;
}
public EditBranchProtectionOption approvalsWhitelistUsername(
List<String> approvalsWhitelistUsername) {
this.approvalsWhitelistUsername = approvalsWhitelistUsername;
return this;
}
public EditBranchProtectionOption addApprovalsWhitelistUsernameItem(
String approvalsWhitelistUsernameItem) {
if (this.approvalsWhitelistUsername == null) {
this.approvalsWhitelistUsername = new ArrayList<>();
}
this.approvalsWhitelistUsername.add(approvalsWhitelistUsernameItem);
return this;
}
/**
* Get approvalsWhitelistUsername
*
* @return approvalsWhitelistUsername
*/
@Schema(description = "")
public List<String> getApprovalsWhitelistUsername() {
return approvalsWhitelistUsername;
}
public void setApprovalsWhitelistUsername(List<String> approvalsWhitelistUsername) {
this.approvalsWhitelistUsername = approvalsWhitelistUsername;
}
public EditBranchProtectionOption blockOnOfficialReviewRequests(
Boolean blockOnOfficialReviewRequests) {
this.blockOnOfficialReviewRequests = blockOnOfficialReviewRequests;
return this;
}
/**
* Get blockOnOfficialReviewRequests
*
* @return blockOnOfficialReviewRequests
*/
@Schema(description = "")
public Boolean isBlockOnOfficialReviewRequests() {
return blockOnOfficialReviewRequests;
}
public void setBlockOnOfficialReviewRequests(Boolean blockOnOfficialReviewRequests) {
this.blockOnOfficialReviewRequests = blockOnOfficialReviewRequests;
}
public EditBranchProtectionOption blockOnOutdatedBranch(Boolean blockOnOutdatedBranch) {
this.blockOnOutdatedBranch = blockOnOutdatedBranch;
return this;
}
/**
* Get blockOnOutdatedBranch
*
* @return blockOnOutdatedBranch
*/
@Schema(description = "")
public Boolean isBlockOnOutdatedBranch() {
return blockOnOutdatedBranch;
}
public void setBlockOnOutdatedBranch(Boolean blockOnOutdatedBranch) {
this.blockOnOutdatedBranch = blockOnOutdatedBranch;
}
public EditBranchProtectionOption blockOnRejectedReviews(Boolean blockOnRejectedReviews) {
this.blockOnRejectedReviews = blockOnRejectedReviews;
return this;
}
/**
* Get blockOnRejectedReviews
*
* @return blockOnRejectedReviews
*/
@Schema(description = "")
public Boolean isBlockOnRejectedReviews() {
return blockOnRejectedReviews;
}
public void setBlockOnRejectedReviews(Boolean blockOnRejectedReviews) {
this.blockOnRejectedReviews = blockOnRejectedReviews;
}
public EditBranchProtectionOption dismissStaleApprovals(Boolean dismissStaleApprovals) {
this.dismissStaleApprovals = dismissStaleApprovals;
return this;
}
/**
* Get dismissStaleApprovals
*
* @return dismissStaleApprovals
*/
@Schema(description = "")
public Boolean isDismissStaleApprovals() {
return dismissStaleApprovals;
}
public void setDismissStaleApprovals(Boolean dismissStaleApprovals) {
this.dismissStaleApprovals = dismissStaleApprovals;
}
public EditBranchProtectionOption enableApprovalsWhitelist(Boolean enableApprovalsWhitelist) {
this.enableApprovalsWhitelist = enableApprovalsWhitelist;
return this;
}
/**
* Get enableApprovalsWhitelist
*
* @return enableApprovalsWhitelist
*/
@Schema(description = "")
public Boolean isEnableApprovalsWhitelist() {
return enableApprovalsWhitelist;
}
public void setEnableApprovalsWhitelist(Boolean enableApprovalsWhitelist) {
this.enableApprovalsWhitelist = enableApprovalsWhitelist;
}
public EditBranchProtectionOption enableMergeWhitelist(Boolean enableMergeWhitelist) {
this.enableMergeWhitelist = enableMergeWhitelist;
return this;
}
/**
* Get enableMergeWhitelist
*
* @return enableMergeWhitelist
*/
@Schema(description = "")
public Boolean isEnableMergeWhitelist() {
return enableMergeWhitelist;
}
public void setEnableMergeWhitelist(Boolean enableMergeWhitelist) {
this.enableMergeWhitelist = enableMergeWhitelist;
}
public EditBranchProtectionOption enablePush(Boolean enablePush) {
this.enablePush = enablePush;
return this;
}
/**
* Get enablePush
*
* @return enablePush
*/
@Schema(description = "")
public Boolean isEnablePush() {
return enablePush;
}
public void setEnablePush(Boolean enablePush) {
this.enablePush = enablePush;
}
public EditBranchProtectionOption enablePushWhitelist(Boolean enablePushWhitelist) {
this.enablePushWhitelist = enablePushWhitelist;
return this;
}
/**
* Get enablePushWhitelist
*
* @return enablePushWhitelist
*/
@Schema(description = "")
public Boolean isEnablePushWhitelist() {
return enablePushWhitelist;
}
public void setEnablePushWhitelist(Boolean enablePushWhitelist) {
this.enablePushWhitelist = enablePushWhitelist;
}
public EditBranchProtectionOption enableStatusCheck(Boolean enableStatusCheck) {
this.enableStatusCheck = enableStatusCheck;
return this;
}
/**
* Get enableStatusCheck
*
* @return enableStatusCheck
*/
@Schema(description = "")
public Boolean isEnableStatusCheck() {
return enableStatusCheck;
}
public void setEnableStatusCheck(Boolean enableStatusCheck) {
this.enableStatusCheck = enableStatusCheck;
}
public EditBranchProtectionOption mergeWhitelistTeams(List<String> mergeWhitelistTeams) {
this.mergeWhitelistTeams = mergeWhitelistTeams;
return this;
}
public EditBranchProtectionOption addMergeWhitelistTeamsItem(String mergeWhitelistTeamsItem) {
if (this.mergeWhitelistTeams == null) {
this.mergeWhitelistTeams = new ArrayList<>();
}
this.mergeWhitelistTeams.add(mergeWhitelistTeamsItem);
return this;
}
/**
* Get mergeWhitelistTeams
*
* @return mergeWhitelistTeams
*/
@Schema(description = "")
public List<String> getMergeWhitelistTeams() {
return mergeWhitelistTeams;
}
public void setMergeWhitelistTeams(List<String> mergeWhitelistTeams) {
this.mergeWhitelistTeams = mergeWhitelistTeams;
}
public EditBranchProtectionOption mergeWhitelistUsernames(List<String> mergeWhitelistUsernames) {
this.mergeWhitelistUsernames = mergeWhitelistUsernames;
return this;
}
public EditBranchProtectionOption addMergeWhitelistUsernamesItem(
String mergeWhitelistUsernamesItem) {
if (this.mergeWhitelistUsernames == null) {
this.mergeWhitelistUsernames = new ArrayList<>();
}
this.mergeWhitelistUsernames.add(mergeWhitelistUsernamesItem);
return this;
}
/**
* Get mergeWhitelistUsernames
*
* @return mergeWhitelistUsernames
*/
@Schema(description = "")
public List<String> getMergeWhitelistUsernames() {
return mergeWhitelistUsernames;
}
public void setMergeWhitelistUsernames(List<String> mergeWhitelistUsernames) {
this.mergeWhitelistUsernames = mergeWhitelistUsernames;
}
public EditBranchProtectionOption protectedFilePatterns(String protectedFilePatterns) {
this.protectedFilePatterns = protectedFilePatterns;
return this;
}
/**
* Get protectedFilePatterns
*
* @return protectedFilePatterns
*/
@Schema(description = "")
public String getProtectedFilePatterns() {
return protectedFilePatterns;
}
public void setProtectedFilePatterns(String protectedFilePatterns) {
this.protectedFilePatterns = protectedFilePatterns;
}
public EditBranchProtectionOption pushWhitelistDeployKeys(Boolean pushWhitelistDeployKeys) {
this.pushWhitelistDeployKeys = pushWhitelistDeployKeys;
return this;
}
/**
* Get pushWhitelistDeployKeys
*
* @return pushWhitelistDeployKeys
*/
@Schema(description = "")
public Boolean isPushWhitelistDeployKeys() {
return pushWhitelistDeployKeys;
}
public void setPushWhitelistDeployKeys(Boolean pushWhitelistDeployKeys) {
this.pushWhitelistDeployKeys = pushWhitelistDeployKeys;
}
public EditBranchProtectionOption pushWhitelistTeams(List<String> pushWhitelistTeams) {
this.pushWhitelistTeams = pushWhitelistTeams;
return this;
}
public EditBranchProtectionOption addPushWhitelistTeamsItem(String pushWhitelistTeamsItem) {
if (this.pushWhitelistTeams == null) {
this.pushWhitelistTeams = new ArrayList<>();
}
this.pushWhitelistTeams.add(pushWhitelistTeamsItem);
return this;
}
/**
* Get pushWhitelistTeams
*
* @return pushWhitelistTeams
*/
@Schema(description = "")
public List<String> getPushWhitelistTeams() {
return pushWhitelistTeams;
}
public void setPushWhitelistTeams(List<String> pushWhitelistTeams) {
this.pushWhitelistTeams = pushWhitelistTeams;
}
public EditBranchProtectionOption pushWhitelistUsernames(List<String> pushWhitelistUsernames) {
this.pushWhitelistUsernames = pushWhitelistUsernames;
return this;
}
public EditBranchProtectionOption addPushWhitelistUsernamesItem(
String pushWhitelistUsernamesItem) {
if (this.pushWhitelistUsernames == null) {
this.pushWhitelistUsernames = new ArrayList<>();
}
this.pushWhitelistUsernames.add(pushWhitelistUsernamesItem);
return this;
}
/**
* Get pushWhitelistUsernames
*
* @return pushWhitelistUsernames
*/
@Schema(description = "")
public List<String> getPushWhitelistUsernames() {
return pushWhitelistUsernames;
}
public void setPushWhitelistUsernames(List<String> pushWhitelistUsernames) {
this.pushWhitelistUsernames = pushWhitelistUsernames;
}
public EditBranchProtectionOption requireSignedCommits(Boolean requireSignedCommits) {
this.requireSignedCommits = requireSignedCommits;
return this;
}
/**
* Get requireSignedCommits
*
* @return requireSignedCommits
*/
@Schema(description = "")
public Boolean isRequireSignedCommits() {
return requireSignedCommits;
}
public void setRequireSignedCommits(Boolean requireSignedCommits) {
this.requireSignedCommits = requireSignedCommits;
}
public EditBranchProtectionOption requiredApprovals(Long requiredApprovals) {
this.requiredApprovals = requiredApprovals;
return this;
}
/**
* Get requiredApprovals
*
* @return requiredApprovals
*/
@Schema(description = "")
public Long getRequiredApprovals() {
return requiredApprovals;
}
public void setRequiredApprovals(Long requiredApprovals) {
this.requiredApprovals = requiredApprovals;
}
public EditBranchProtectionOption statusCheckContexts(List<String> statusCheckContexts) {
this.statusCheckContexts = statusCheckContexts;
return this;
}
public EditBranchProtectionOption addStatusCheckContextsItem(String statusCheckContextsItem) {
if (this.statusCheckContexts == null) {
this.statusCheckContexts = new ArrayList<>();
}
this.statusCheckContexts.add(statusCheckContextsItem);
return this;
}
/**
* Get statusCheckContexts
*
* @return statusCheckContexts
*/
@Schema(description = "")
public List<String> getStatusCheckContexts() {
return statusCheckContexts;
}
public void setStatusCheckContexts(List<String> statusCheckContexts) {
this.statusCheckContexts = statusCheckContexts;
}
public EditBranchProtectionOption unprotectedFilePatterns(String unprotectedFilePatterns) {
this.unprotectedFilePatterns = unprotectedFilePatterns;
return this;
}
/**
* Get unprotectedFilePatterns
*
* @return unprotectedFilePatterns
*/
@Schema(description = "")
public String getUnprotectedFilePatterns() {
return unprotectedFilePatterns;
}
public void setUnprotectedFilePatterns(String unprotectedFilePatterns) {
this.unprotectedFilePatterns = unprotectedFilePatterns;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EditBranchProtectionOption editBranchProtectionOption = (EditBranchProtectionOption) o;
return Objects.equals(
this.approvalsWhitelistTeams, editBranchProtectionOption.approvalsWhitelistTeams)
&& Objects.equals(
this.approvalsWhitelistUsername, editBranchProtectionOption.approvalsWhitelistUsername)
&& Objects.equals(
this.blockOnOfficialReviewRequests,
editBranchProtectionOption.blockOnOfficialReviewRequests)
&& Objects.equals(
this.blockOnOutdatedBranch, editBranchProtectionOption.blockOnOutdatedBranch)
&& Objects.equals(
this.blockOnRejectedReviews, editBranchProtectionOption.blockOnRejectedReviews)
&& Objects.equals(
this.dismissStaleApprovals, editBranchProtectionOption.dismissStaleApprovals)
&& Objects.equals(
this.enableApprovalsWhitelist, editBranchProtectionOption.enableApprovalsWhitelist)
&& Objects.equals(
this.enableMergeWhitelist, editBranchProtectionOption.enableMergeWhitelist)
&& Objects.equals(this.enablePush, editBranchProtectionOption.enablePush)
&& Objects.equals(this.enablePushWhitelist, editBranchProtectionOption.enablePushWhitelist)
&& Objects.equals(this.enableStatusCheck, editBranchProtectionOption.enableStatusCheck)
&& Objects.equals(this.mergeWhitelistTeams, editBranchProtectionOption.mergeWhitelistTeams)
&& Objects.equals(
this.mergeWhitelistUsernames, editBranchProtectionOption.mergeWhitelistUsernames)
&& Objects.equals(
this.protectedFilePatterns, editBranchProtectionOption.protectedFilePatterns)
&& Objects.equals(
this.pushWhitelistDeployKeys, editBranchProtectionOption.pushWhitelistDeployKeys)
&& Objects.equals(this.pushWhitelistTeams, editBranchProtectionOption.pushWhitelistTeams)
&& Objects.equals(
this.pushWhitelistUsernames, editBranchProtectionOption.pushWhitelistUsernames)
&& Objects.equals(
this.requireSignedCommits, editBranchProtectionOption.requireSignedCommits)
&& Objects.equals(this.requiredApprovals, editBranchProtectionOption.requiredApprovals)
&& Objects.equals(this.statusCheckContexts, editBranchProtectionOption.statusCheckContexts)
&& Objects.equals(
this.unprotectedFilePatterns, editBranchProtectionOption.unprotectedFilePatterns);
}
@Override
public int hashCode() {
return Objects.hash(
approvalsWhitelistTeams,
approvalsWhitelistUsername,
blockOnOfficialReviewRequests,
blockOnOutdatedBranch,
blockOnRejectedReviews,
dismissStaleApprovals,
enableApprovalsWhitelist,
enableMergeWhitelist,
enablePush,
enablePushWhitelist,
enableStatusCheck,
mergeWhitelistTeams,
mergeWhitelistUsernames,
protectedFilePatterns,
pushWhitelistDeployKeys,
pushWhitelistTeams,
pushWhitelistUsernames,
requireSignedCommits,
requiredApprovals,
statusCheckContexts,
unprotectedFilePatterns);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EditBranchProtectionOption {\n");
sb.append(" approvalsWhitelistTeams: ")
.append(toIndentedString(approvalsWhitelistTeams))
.append("\n");
sb.append(" approvalsWhitelistUsername: ")
.append(toIndentedString(approvalsWhitelistUsername))
.append("\n");
sb.append(" blockOnOfficialReviewRequests: ")
.append(toIndentedString(blockOnOfficialReviewRequests))
.append("\n");
sb.append(" blockOnOutdatedBranch: ")
.append(toIndentedString(blockOnOutdatedBranch))
.append("\n");
sb.append(" blockOnRejectedReviews: ")
.append(toIndentedString(blockOnRejectedReviews))
.append("\n");
sb.append(" dismissStaleApprovals: ")
.append(toIndentedString(dismissStaleApprovals))
.append("\n");
sb.append(" enableApprovalsWhitelist: ")
.append(toIndentedString(enableApprovalsWhitelist))
.append("\n");
sb.append(" enableMergeWhitelist: ")
.append(toIndentedString(enableMergeWhitelist))
.append("\n");
sb.append(" enablePush: ").append(toIndentedString(enablePush)).append("\n");
sb.append(" enablePushWhitelist: ")
.append(toIndentedString(enablePushWhitelist))
.append("\n");
sb.append(" enableStatusCheck: ").append(toIndentedString(enableStatusCheck)).append("\n");
sb.append(" mergeWhitelistTeams: ")
.append(toIndentedString(mergeWhitelistTeams))
.append("\n");
sb.append(" mergeWhitelistUsernames: ")
.append(toIndentedString(mergeWhitelistUsernames))
.append("\n");
sb.append(" protectedFilePatterns: ")
.append(toIndentedString(protectedFilePatterns))
.append("\n");
sb.append(" pushWhitelistDeployKeys: ")
.append(toIndentedString(pushWhitelistDeployKeys))
.append("\n");
sb.append(" pushWhitelistTeams: ").append(toIndentedString(pushWhitelistTeams)).append("\n");
sb.append(" pushWhitelistUsernames: ")
.append(toIndentedString(pushWhitelistUsernames))
.append("\n");
sb.append(" requireSignedCommits: ")
.append(toIndentedString(requireSignedCommits))
.append("\n");
sb.append(" requiredApprovals: ").append(toIndentedString(requiredApprovals)).append("\n");
sb.append(" statusCheckContexts: ")
.append(toIndentedString(statusCheckContexts))
.append("\n");
sb.append(" unprotectedFilePatterns: ")
.append(toIndentedString(unprotectedFilePatterns))
.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,84 @@
/*
* 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.Date;
import java.util.Objects;
/** EditDeadlineOption options for creating a deadline */
@Schema(description = "EditDeadlineOption options for creating a deadline")
public class EditDeadlineOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("due_date")
private Date dueDate = null;
public EditDeadlineOption dueDate(Date dueDate) {
this.dueDate = dueDate;
return this;
}
/**
* Get dueDate
*
* @return dueDate
*/
@Schema(required = true, description = "")
public Date getDueDate() {
return dueDate;
}
public void setDueDate(Date dueDate) {
this.dueDate = dueDate;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EditDeadlineOption editDeadlineOption = (EditDeadlineOption) o;
return Objects.equals(this.dueDate, editDeadlineOption.dueDate);
}
@Override
public int hashCode() {
return Objects.hash(dueDate);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EditDeadlineOption {\n");
sb.append(" dueDate: ").append(toIndentedString(dueDate)).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,83 @@
/*
* 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;
/** EditGitHookOption options when modifying one Git hook */
@Schema(description = "EditGitHookOption options when modifying one Git hook")
public class EditGitHookOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("content")
private String content = null;
public EditGitHookOption content(String content) {
this.content = content;
return this;
}
/**
* Get content
*
* @return content
*/
@Schema(description = "")
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EditGitHookOption editGitHookOption = (EditGitHookOption) o;
return Objects.equals(this.content, editGitHookOption.content);
}
@Override
public int hashCode() {
return Objects.hash(content);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EditGitHookOption {\n");
sb.append(" content: ").append(toIndentedString(content)).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,175 @@
/*
* 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.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/** EditHookOption options when modify one hook */
@Schema(description = "EditHookOption options when modify one hook")
public class EditHookOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("active")
private Boolean active = null;
@SerializedName("branch_filter")
private String branchFilter = null;
@SerializedName("config")
private Map<String, String> config = null;
@SerializedName("events")
private List<String> events = null;
public EditHookOption active(Boolean active) {
this.active = active;
return this;
}
/**
* Get active
*
* @return active
*/
@Schema(description = "")
public Boolean isActive() {
return active;
}
public void setActive(Boolean active) {
this.active = active;
}
public EditHookOption branchFilter(String branchFilter) {
this.branchFilter = branchFilter;
return this;
}
/**
* Get branchFilter
*
* @return branchFilter
*/
@Schema(description = "")
public String getBranchFilter() {
return branchFilter;
}
public void setBranchFilter(String branchFilter) {
this.branchFilter = branchFilter;
}
public EditHookOption config(Map<String, String> config) {
this.config = config;
return this;
}
public EditHookOption putConfigItem(String key, String configItem) {
if (this.config == null) {
this.config = new HashMap<>();
}
this.config.put(key, configItem);
return this;
}
/**
* Get config
*
* @return config
*/
@Schema(description = "")
public Map<String, String> getConfig() {
return config;
}
public void setConfig(Map<String, String> config) {
this.config = config;
}
public EditHookOption events(List<String> events) {
this.events = events;
return this;
}
public EditHookOption addEventsItem(String eventsItem) {
if (this.events == null) {
this.events = new ArrayList<>();
}
this.events.add(eventsItem);
return this;
}
/**
* Get events
*
* @return events
*/
@Schema(description = "")
public List<String> getEvents() {
return events;
}
public void setEvents(List<String> events) {
this.events = events;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EditHookOption editHookOption = (EditHookOption) o;
return Objects.equals(this.active, editHookOption.active)
&& Objects.equals(this.branchFilter, editHookOption.branchFilter)
&& Objects.equals(this.config, editHookOption.config)
&& Objects.equals(this.events, editHookOption.events);
}
@Override
public int hashCode() {
return Objects.hash(active, branchFilter, config, events);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EditHookOption {\n");
sb.append(" active: ").append(toIndentedString(active)).append("\n");
sb.append(" branchFilter: ").append(toIndentedString(branchFilter)).append("\n");
sb.append(" config: ").append(toIndentedString(config)).append("\n");
sb.append(" events: ").append(toIndentedString(events)).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,83 @@
/*
* 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;
/** EditIssueCommentOption options for editing a comment */
@Schema(description = "EditIssueCommentOption options for editing a comment")
public class EditIssueCommentOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("body")
private String body = null;
public EditIssueCommentOption body(String body) {
this.body = body;
return this;
}
/**
* Get body
*
* @return body
*/
@Schema(required = true, description = "")
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EditIssueCommentOption editIssueCommentOption = (EditIssueCommentOption) o;
return Objects.equals(this.body, editIssueCommentOption.body);
}
@Override
public int hashCode() {
return Objects.hash(body);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EditIssueCommentOption {\n");
sb.append(" body: ").append(toIndentedString(body)).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,287 @@
/*
* 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.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
/** EditIssueOption options for editing an issue */
@Schema(description = "EditIssueOption options for editing an issue")
public class EditIssueOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("assignee")
private String assignee = null;
@SerializedName("assignees")
private List<String> assignees = null;
@SerializedName("body")
private String body = null;
@SerializedName("due_date")
private Date dueDate = null;
@SerializedName("milestone")
private Long milestone = null;
@SerializedName("ref")
private String ref = null;
@SerializedName("state")
private String state = null;
@SerializedName("title")
private String title = null;
@SerializedName("unset_due_date")
private Boolean unsetDueDate = null;
public EditIssueOption assignee(String assignee) {
this.assignee = assignee;
return this;
}
/**
* deprecated
*
* @return assignee
*/
@Schema(description = "deprecated")
public String getAssignee() {
return assignee;
}
public void setAssignee(String assignee) {
this.assignee = assignee;
}
public EditIssueOption assignees(List<String> assignees) {
this.assignees = assignees;
return this;
}
public EditIssueOption addAssigneesItem(String assigneesItem) {
if (this.assignees == null) {
this.assignees = new ArrayList<>();
}
this.assignees.add(assigneesItem);
return this;
}
/**
* Get assignees
*
* @return assignees
*/
@Schema(description = "")
public List<String> getAssignees() {
return assignees;
}
public void setAssignees(List<String> assignees) {
this.assignees = assignees;
}
public EditIssueOption body(String body) {
this.body = body;
return this;
}
/**
* Get body
*
* @return body
*/
@Schema(description = "")
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
public EditIssueOption dueDate(Date dueDate) {
this.dueDate = dueDate;
return this;
}
/**
* Get dueDate
*
* @return dueDate
*/
@Schema(description = "")
public Date getDueDate() {
return dueDate;
}
public void setDueDate(Date dueDate) {
this.dueDate = dueDate;
}
public EditIssueOption milestone(Long milestone) {
this.milestone = milestone;
return this;
}
/**
* Get milestone
*
* @return milestone
*/
@Schema(description = "")
public Long getMilestone() {
return milestone;
}
public void setMilestone(Long milestone) {
this.milestone = milestone;
}
public EditIssueOption ref(String ref) {
this.ref = ref;
return this;
}
/**
* Get ref
*
* @return ref
*/
@Schema(description = "")
public String getRef() {
return ref;
}
public void setRef(String ref) {
this.ref = ref;
}
public EditIssueOption state(String state) {
this.state = state;
return this;
}
/**
* Get state
*
* @return state
*/
@Schema(description = "")
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public EditIssueOption title(String title) {
this.title = title;
return this;
}
/**
* Get title
*
* @return title
*/
@Schema(description = "")
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public EditIssueOption unsetDueDate(Boolean unsetDueDate) {
this.unsetDueDate = unsetDueDate;
return this;
}
/**
* Get unsetDueDate
*
* @return unsetDueDate
*/
@Schema(description = "")
public Boolean isUnsetDueDate() {
return unsetDueDate;
}
public void setUnsetDueDate(Boolean unsetDueDate) {
this.unsetDueDate = unsetDueDate;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EditIssueOption editIssueOption = (EditIssueOption) o;
return Objects.equals(this.assignee, editIssueOption.assignee)
&& Objects.equals(this.assignees, editIssueOption.assignees)
&& Objects.equals(this.body, editIssueOption.body)
&& Objects.equals(this.dueDate, editIssueOption.dueDate)
&& Objects.equals(this.milestone, editIssueOption.milestone)
&& Objects.equals(this.ref, editIssueOption.ref)
&& Objects.equals(this.state, editIssueOption.state)
&& Objects.equals(this.title, editIssueOption.title)
&& Objects.equals(this.unsetDueDate, editIssueOption.unsetDueDate);
}
@Override
public int hashCode() {
return Objects.hash(
assignee, assignees, body, dueDate, milestone, ref, state, title, unsetDueDate);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EditIssueOption {\n");
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(" dueDate: ").append(toIndentedString(dueDate)).append("\n");
sb.append(" milestone: ").append(toIndentedString(milestone)).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");
sb.append(" unsetDueDate: ").append(toIndentedString(unsetDueDate)).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,131 @@
/*
* 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;
/** EditLabelOption options for editing a label */
@Schema(description = "EditLabelOption options for editing a label")
public class EditLabelOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("color")
private String color = null;
@SerializedName("description")
private String description = null;
@SerializedName("name")
private String name = null;
public EditLabelOption color(String color) {
this.color = color;
return this;
}
/**
* Get color
*
* @return color
*/
@Schema(description = "")
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
public EditLabelOption description(String description) {
this.description = description;
return this;
}
/**
* Get description
*
* @return description
*/
@Schema(description = "")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public EditLabelOption name(String name) {
this.name = name;
return this;
}
/**
* Get name
*
* @return name
*/
@Schema(description = "")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EditLabelOption editLabelOption = (EditLabelOption) o;
return Objects.equals(this.color, editLabelOption.color)
&& Objects.equals(this.description, editLabelOption.description)
&& Objects.equals(this.name, editLabelOption.name);
}
@Override
public int hashCode() {
return Objects.hash(color, description, name);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EditLabelOption {\n");
sb.append(" color: ").append(toIndentedString(color)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).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,156 @@
/*
* 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.Date;
import java.util.Objects;
/** EditMilestoneOption options for editing a milestone */
@Schema(description = "EditMilestoneOption options for editing a milestone")
public class EditMilestoneOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("description")
private String description = null;
@SerializedName("due_on")
private Date dueOn = null;
@SerializedName("state")
private String state = null;
@SerializedName("title")
private String title = null;
public EditMilestoneOption description(String description) {
this.description = description;
return this;
}
/**
* Get description
*
* @return description
*/
@Schema(description = "")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public EditMilestoneOption dueOn(Date dueOn) {
this.dueOn = dueOn;
return this;
}
/**
* Get dueOn
*
* @return dueOn
*/
@Schema(description = "")
public Date getDueOn() {
return dueOn;
}
public void setDueOn(Date dueOn) {
this.dueOn = dueOn;
}
public EditMilestoneOption state(String state) {
this.state = state;
return this;
}
/**
* Get state
*
* @return state
*/
@Schema(description = "")
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public EditMilestoneOption title(String title) {
this.title = title;
return this;
}
/**
* Get title
*
* @return title
*/
@Schema(description = "")
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EditMilestoneOption editMilestoneOption = (EditMilestoneOption) o;
return Objects.equals(this.description, editMilestoneOption.description)
&& Objects.equals(this.dueOn, editMilestoneOption.dueOn)
&& Objects.equals(this.state, editMilestoneOption.state)
&& Objects.equals(this.title, editMilestoneOption.title);
}
@Override
public int hashCode() {
return Objects.hash(description, dueOn, state, title);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EditMilestoneOption {\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" dueOn: ").append(toIndentedString(dueOn)).append("\n");
sb.append(" state: ").append(toIndentedString(state)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).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,257 @@
/*
* 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.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;
/** EditOrgOption options for editing an organization */
@Schema(description = "EditOrgOption options for editing an organization")
public class EditOrgOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("description")
private String description = null;
@SerializedName("full_name")
private String fullName = null;
@SerializedName("location")
private String location = null;
@SerializedName("repo_admin_change_team_access")
private Boolean repoAdminChangeTeamAccess = null;
/** possible values are &#x60;public&#x60;, &#x60;limited&#x60; or &#x60;private&#x60; */
@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 VisibilityEnum visibility = null;
@SerializedName("website")
private String website = null;
public EditOrgOption description(String description) {
this.description = description;
return this;
}
/**
* Get description
*
* @return description
*/
@Schema(description = "")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public EditOrgOption fullName(String fullName) {
this.fullName = fullName;
return this;
}
/**
* Get fullName
*
* @return fullName
*/
@Schema(description = "")
public String getFullName() {
return fullName;
}
public void setFullName(String fullName) {
this.fullName = fullName;
}
public EditOrgOption location(String location) {
this.location = location;
return this;
}
/**
* Get location
*
* @return location
*/
@Schema(description = "")
public String getLocation() {
return location;
}
public void setLocation(String location) {
this.location = location;
}
public EditOrgOption repoAdminChangeTeamAccess(Boolean repoAdminChangeTeamAccess) {
this.repoAdminChangeTeamAccess = repoAdminChangeTeamAccess;
return this;
}
/**
* Get repoAdminChangeTeamAccess
*
* @return repoAdminChangeTeamAccess
*/
@Schema(description = "")
public Boolean isRepoAdminChangeTeamAccess() {
return repoAdminChangeTeamAccess;
}
public void setRepoAdminChangeTeamAccess(Boolean repoAdminChangeTeamAccess) {
this.repoAdminChangeTeamAccess = repoAdminChangeTeamAccess;
}
public EditOrgOption visibility(VisibilityEnum visibility) {
this.visibility = visibility;
return this;
}
/**
* possible values are &#x60;public&#x60;, &#x60;limited&#x60; or &#x60;private&#x60;
*
* @return visibility
*/
@Schema(description = "possible values are `public`, `limited` or `private`")
public VisibilityEnum getVisibility() {
return visibility;
}
public void setVisibility(VisibilityEnum visibility) {
this.visibility = visibility;
}
public EditOrgOption website(String website) {
this.website = website;
return this;
}
/**
* Get website
*
* @return website
*/
@Schema(description = "")
public String getWebsite() {
return website;
}
public void setWebsite(String website) {
this.website = website;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EditOrgOption editOrgOption = (EditOrgOption) o;
return Objects.equals(this.description, editOrgOption.description)
&& Objects.equals(this.fullName, editOrgOption.fullName)
&& Objects.equals(this.location, editOrgOption.location)
&& Objects.equals(this.repoAdminChangeTeamAccess, editOrgOption.repoAdminChangeTeamAccess)
&& Objects.equals(this.visibility, editOrgOption.visibility)
&& Objects.equals(this.website, editOrgOption.website);
}
@Override
public int hashCode() {
return Objects.hash(
description, fullName, location, repoAdminChangeTeamAccess, visibility, website);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EditOrgOption {\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n");
sb.append(" location: ").append(toIndentedString(location)).append("\n");
sb.append(" repoAdminChangeTeamAccess: ")
.append(toIndentedString(repoAdminChangeTeamAccess))
.append("\n");
sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n");
sb.append(" website: ").append(toIndentedString(website)).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,319 @@
/*
* 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.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
/** EditPullRequestOption options when modify pull request */
@Schema(description = "EditPullRequestOption options when modify pull request")
public class EditPullRequestOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("assignee")
private String assignee = null;
@SerializedName("assignees")
private List<String> assignees = null;
@SerializedName("base")
private String base = null;
@SerializedName("body")
private String body = null;
@SerializedName("due_date")
private Date dueDate = null;
@SerializedName("labels")
private List<Long> labels = null;
@SerializedName("milestone")
private Long milestone = null;
@SerializedName("state")
private String state = null;
@SerializedName("title")
private String title = null;
@SerializedName("unset_due_date")
private Boolean unsetDueDate = null;
public EditPullRequestOption assignee(String assignee) {
this.assignee = assignee;
return this;
}
/**
* Get assignee
*
* @return assignee
*/
@Schema(description = "")
public String getAssignee() {
return assignee;
}
public void setAssignee(String assignee) {
this.assignee = assignee;
}
public EditPullRequestOption assignees(List<String> assignees) {
this.assignees = assignees;
return this;
}
public EditPullRequestOption addAssigneesItem(String assigneesItem) {
if (this.assignees == null) {
this.assignees = new ArrayList<>();
}
this.assignees.add(assigneesItem);
return this;
}
/**
* Get assignees
*
* @return assignees
*/
@Schema(description = "")
public List<String> getAssignees() {
return assignees;
}
public void setAssignees(List<String> assignees) {
this.assignees = assignees;
}
public EditPullRequestOption base(String base) {
this.base = base;
return this;
}
/**
* Get base
*
* @return base
*/
@Schema(description = "")
public String getBase() {
return base;
}
public void setBase(String base) {
this.base = base;
}
public EditPullRequestOption body(String body) {
this.body = body;
return this;
}
/**
* Get body
*
* @return body
*/
@Schema(description = "")
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
public EditPullRequestOption dueDate(Date dueDate) {
this.dueDate = dueDate;
return this;
}
/**
* Get dueDate
*
* @return dueDate
*/
@Schema(description = "")
public Date getDueDate() {
return dueDate;
}
public void setDueDate(Date dueDate) {
this.dueDate = dueDate;
}
public EditPullRequestOption labels(List<Long> labels) {
this.labels = labels;
return this;
}
public EditPullRequestOption addLabelsItem(Long labelsItem) {
if (this.labels == null) {
this.labels = new ArrayList<>();
}
this.labels.add(labelsItem);
return this;
}
/**
* Get labels
*
* @return labels
*/
@Schema(description = "")
public List<Long> getLabels() {
return labels;
}
public void setLabels(List<Long> labels) {
this.labels = labels;
}
public EditPullRequestOption milestone(Long milestone) {
this.milestone = milestone;
return this;
}
/**
* Get milestone
*
* @return milestone
*/
@Schema(description = "")
public Long getMilestone() {
return milestone;
}
public void setMilestone(Long milestone) {
this.milestone = milestone;
}
public EditPullRequestOption state(String state) {
this.state = state;
return this;
}
/**
* Get state
*
* @return state
*/
@Schema(description = "")
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public EditPullRequestOption title(String title) {
this.title = title;
return this;
}
/**
* Get title
*
* @return title
*/
@Schema(description = "")
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public EditPullRequestOption unsetDueDate(Boolean unsetDueDate) {
this.unsetDueDate = unsetDueDate;
return this;
}
/**
* Get unsetDueDate
*
* @return unsetDueDate
*/
@Schema(description = "")
public Boolean isUnsetDueDate() {
return unsetDueDate;
}
public void setUnsetDueDate(Boolean unsetDueDate) {
this.unsetDueDate = unsetDueDate;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EditPullRequestOption editPullRequestOption = (EditPullRequestOption) o;
return Objects.equals(this.assignee, editPullRequestOption.assignee)
&& Objects.equals(this.assignees, editPullRequestOption.assignees)
&& Objects.equals(this.base, editPullRequestOption.base)
&& Objects.equals(this.body, editPullRequestOption.body)
&& Objects.equals(this.dueDate, editPullRequestOption.dueDate)
&& Objects.equals(this.labels, editPullRequestOption.labels)
&& Objects.equals(this.milestone, editPullRequestOption.milestone)
&& Objects.equals(this.state, editPullRequestOption.state)
&& Objects.equals(this.title, editPullRequestOption.title)
&& Objects.equals(this.unsetDueDate, editPullRequestOption.unsetDueDate);
}
@Override
public int hashCode() {
return Objects.hash(
assignee, assignees, base, body, dueDate, labels, milestone, state, title, unsetDueDate);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EditPullRequestOption {\n");
sb.append(" assignee: ").append(toIndentedString(assignee)).append("\n");
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(" dueDate: ").append(toIndentedString(dueDate)).append("\n");
sb.append(" labels: ").append(toIndentedString(labels)).append("\n");
sb.append(" milestone: ").append(toIndentedString(milestone)).append("\n");
sb.append(" state: ").append(toIndentedString(state)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" unsetDueDate: ").append(toIndentedString(unsetDueDate)).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,83 @@
/*
* 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;
/** EditReactionOption contain the reaction type */
@Schema(description = "EditReactionOption contain the reaction type")
public class EditReactionOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("content")
private String content = null;
public EditReactionOption content(String content) {
this.content = content;
return this;
}
/**
* Get content
*
* @return content
*/
@Schema(description = "")
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EditReactionOption editReactionOption = (EditReactionOption) o;
return Objects.equals(this.content, editReactionOption.content);
}
@Override
public int hashCode() {
return Objects.hash(content);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EditReactionOption {\n");
sb.append(" content: ").append(toIndentedString(content)).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,203 @@
/*
* 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;
/** EditReleaseOption options when editing a release */
@Schema(description = "EditReleaseOption options when editing a release")
public class EditReleaseOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("body")
private String body = null;
@SerializedName("draft")
private Boolean draft = null;
@SerializedName("name")
private String name = null;
@SerializedName("prerelease")
private Boolean prerelease = null;
@SerializedName("tag_name")
private String tagName = null;
@SerializedName("target_commitish")
private String targetCommitish = null;
public EditReleaseOption body(String body) {
this.body = body;
return this;
}
/**
* Get body
*
* @return body
*/
@Schema(description = "")
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
public EditReleaseOption draft(Boolean draft) {
this.draft = draft;
return this;
}
/**
* Get draft
*
* @return draft
*/
@Schema(description = "")
public Boolean isDraft() {
return draft;
}
public void setDraft(Boolean draft) {
this.draft = draft;
}
public EditReleaseOption name(String name) {
this.name = name;
return this;
}
/**
* Get name
*
* @return name
*/
@Schema(description = "")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public EditReleaseOption prerelease(Boolean prerelease) {
this.prerelease = prerelease;
return this;
}
/**
* Get prerelease
*
* @return prerelease
*/
@Schema(description = "")
public Boolean isPrerelease() {
return prerelease;
}
public void setPrerelease(Boolean prerelease) {
this.prerelease = prerelease;
}
public EditReleaseOption tagName(String tagName) {
this.tagName = tagName;
return this;
}
/**
* Get tagName
*
* @return tagName
*/
@Schema(description = "")
public String getTagName() {
return tagName;
}
public void setTagName(String tagName) {
this.tagName = tagName;
}
public EditReleaseOption targetCommitish(String targetCommitish) {
this.targetCommitish = targetCommitish;
return this;
}
/**
* Get targetCommitish
*
* @return targetCommitish
*/
@Schema(description = "")
public String getTargetCommitish() {
return targetCommitish;
}
public void setTargetCommitish(String targetCommitish) {
this.targetCommitish = targetCommitish;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EditReleaseOption editReleaseOption = (EditReleaseOption) o;
return Objects.equals(this.body, editReleaseOption.body)
&& Objects.equals(this.draft, editReleaseOption.draft)
&& Objects.equals(this.name, editReleaseOption.name)
&& Objects.equals(this.prerelease, editReleaseOption.prerelease)
&& Objects.equals(this.tagName, editReleaseOption.tagName)
&& Objects.equals(this.targetCommitish, editReleaseOption.targetCommitish);
}
@Override
public int hashCode() {
return Objects.hash(body, draft, name, prerelease, tagName, targetCommitish);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EditReleaseOption {\n");
sb.append(" body: ").append(toIndentedString(body)).append("\n");
sb.append(" draft: ").append(toIndentedString(draft)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" prerelease: ").append(toIndentedString(prerelease)).append("\n");
sb.append(" tagName: ").append(toIndentedString(tagName)).append("\n");
sb.append(" targetCommitish: ").append(toIndentedString(targetCommitish)).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,750 @@
/*
* 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;
/** EditRepoOption options when editing a repository&#x27;s properties */
@Schema(description = "EditRepoOption options when editing a repository's properties")
public class EditRepoOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("allow_manual_merge")
private Boolean allowManualMerge = null;
@SerializedName("allow_merge_commits")
private Boolean allowMergeCommits = null;
@SerializedName("allow_rebase")
private Boolean allowRebase = null;
@SerializedName("allow_rebase_explicit")
private Boolean allowRebaseExplicit = null;
@SerializedName("allow_rebase_update")
private Boolean allowRebaseUpdate = null;
@SerializedName("allow_squash_merge")
private Boolean allowSquashMerge = null;
@SerializedName("archived")
private Boolean archived = null;
@SerializedName("autodetect_manual_merge")
private Boolean autodetectManualMerge = null;
@SerializedName("default_branch")
private String defaultBranch = null;
@SerializedName("default_delete_branch_after_merge")
private Boolean defaultDeleteBranchAfterMerge = null;
@SerializedName("default_merge_style")
private String defaultMergeStyle = null;
@SerializedName("description")
private String description = null;
@SerializedName("external_tracker")
private ExternalTracker externalTracker = null;
@SerializedName("external_wiki")
private ExternalWiki externalWiki = null;
@SerializedName("has_issues")
private Boolean hasIssues = null;
@SerializedName("has_projects")
private Boolean hasProjects = null;
@SerializedName("has_pull_requests")
private Boolean hasPullRequests = null;
@SerializedName("has_wiki")
private Boolean hasWiki = null;
@SerializedName("ignore_whitespace_conflicts")
private Boolean ignoreWhitespaceConflicts = null;
@SerializedName("internal_tracker")
private InternalTracker internalTracker = null;
@SerializedName("mirror_interval")
private String mirrorInterval = null;
@SerializedName("name")
private String name = null;
@SerializedName("private")
private Boolean _private = null;
@SerializedName("template")
private Boolean template = null;
@SerializedName("website")
private String website = null;
public EditRepoOption allowManualMerge(Boolean allowManualMerge) {
this.allowManualMerge = allowManualMerge;
return this;
}
/**
* either &#x60;true&#x60; to allow mark pr as merged manually, or &#x60;false&#x60; to prevent
* it. &#x60;has_pull_requests&#x60; must be &#x60;true&#x60;.
*
* @return allowManualMerge
*/
@Schema(
description =
"either `true` to allow mark pr as merged manually, or `false` to prevent it."
+ " `has_pull_requests` must be `true`.")
public Boolean isAllowManualMerge() {
return allowManualMerge;
}
public void setAllowManualMerge(Boolean allowManualMerge) {
this.allowManualMerge = allowManualMerge;
}
public EditRepoOption allowMergeCommits(Boolean allowMergeCommits) {
this.allowMergeCommits = allowMergeCommits;
return this;
}
/**
* either &#x60;true&#x60; to allow merging pull requests with a merge commit, or
* &#x60;false&#x60; to prevent merging pull requests with merge commits.
* &#x60;has_pull_requests&#x60; must be &#x60;true&#x60;.
*
* @return allowMergeCommits
*/
@Schema(
description =
"either `true` to allow merging pull requests with a merge commit, or `false` to prevent"
+ " merging pull requests with merge commits. `has_pull_requests` must be `true`.")
public Boolean isAllowMergeCommits() {
return allowMergeCommits;
}
public void setAllowMergeCommits(Boolean allowMergeCommits) {
this.allowMergeCommits = allowMergeCommits;
}
public EditRepoOption allowRebase(Boolean allowRebase) {
this.allowRebase = allowRebase;
return this;
}
/**
* either &#x60;true&#x60; to allow rebase-merging pull requests, or &#x60;false&#x60; to prevent
* rebase-merging. &#x60;has_pull_requests&#x60; must be &#x60;true&#x60;.
*
* @return allowRebase
*/
@Schema(
description =
"either `true` to allow rebase-merging pull requests, or `false` to prevent"
+ " rebase-merging. `has_pull_requests` must be `true`.")
public Boolean isAllowRebase() {
return allowRebase;
}
public void setAllowRebase(Boolean allowRebase) {
this.allowRebase = allowRebase;
}
public EditRepoOption allowRebaseExplicit(Boolean allowRebaseExplicit) {
this.allowRebaseExplicit = allowRebaseExplicit;
return this;
}
/**
* either &#x60;true&#x60; to allow rebase with explicit merge commits (--no-ff), or
* &#x60;false&#x60; to prevent rebase with explicit merge commits. &#x60;has_pull_requests&#x60;
* must be &#x60;true&#x60;.
*
* @return allowRebaseExplicit
*/
@Schema(
description =
"either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to"
+ " prevent rebase with explicit merge commits. `has_pull_requests` must be `true`.")
public Boolean isAllowRebaseExplicit() {
return allowRebaseExplicit;
}
public void setAllowRebaseExplicit(Boolean allowRebaseExplicit) {
this.allowRebaseExplicit = allowRebaseExplicit;
}
public EditRepoOption allowRebaseUpdate(Boolean allowRebaseUpdate) {
this.allowRebaseUpdate = allowRebaseUpdate;
return this;
}
/**
* either &#x60;true&#x60; to allow updating pull request branch by rebase, or &#x60;false&#x60;
* to prevent it. &#x60;has_pull_requests&#x60; must be &#x60;true&#x60;.
*
* @return allowRebaseUpdate
*/
@Schema(
description =
"either `true` to allow updating pull request branch by rebase, or `false` to prevent it."
+ " `has_pull_requests` must be `true`.")
public Boolean isAllowRebaseUpdate() {
return allowRebaseUpdate;
}
public void setAllowRebaseUpdate(Boolean allowRebaseUpdate) {
this.allowRebaseUpdate = allowRebaseUpdate;
}
public EditRepoOption allowSquashMerge(Boolean allowSquashMerge) {
this.allowSquashMerge = allowSquashMerge;
return this;
}
/**
* either &#x60;true&#x60; to allow squash-merging pull requests, or &#x60;false&#x60; to prevent
* squash-merging. &#x60;has_pull_requests&#x60; must be &#x60;true&#x60;.
*
* @return allowSquashMerge
*/
@Schema(
description =
"either `true` to allow squash-merging pull requests, or `false` to prevent"
+ " squash-merging. `has_pull_requests` must be `true`.")
public Boolean isAllowSquashMerge() {
return allowSquashMerge;
}
public void setAllowSquashMerge(Boolean allowSquashMerge) {
this.allowSquashMerge = allowSquashMerge;
}
public EditRepoOption archived(Boolean archived) {
this.archived = archived;
return this;
}
/**
* set to &#x60;true&#x60; to archive this repository.
*
* @return archived
*/
@Schema(description = "set to `true` to archive this repository.")
public Boolean isArchived() {
return archived;
}
public void setArchived(Boolean archived) {
this.archived = archived;
}
public EditRepoOption autodetectManualMerge(Boolean autodetectManualMerge) {
this.autodetectManualMerge = autodetectManualMerge;
return this;
}
/**
* either &#x60;true&#x60; to enable AutodetectManualMerge, or &#x60;false&#x60; to prevent it.
* &#x60;has_pull_requests&#x60; must be &#x60;true&#x60;, Note: In some special cases,
* misjudgments can occur.
*
* @return autodetectManualMerge
*/
@Schema(
description =
"either `true` to enable AutodetectManualMerge, or `false` to prevent it."
+ " `has_pull_requests` must be `true`, Note: In some special cases, misjudgments can"
+ " occur.")
public Boolean isAutodetectManualMerge() {
return autodetectManualMerge;
}
public void setAutodetectManualMerge(Boolean autodetectManualMerge) {
this.autodetectManualMerge = autodetectManualMerge;
}
public EditRepoOption defaultBranch(String defaultBranch) {
this.defaultBranch = defaultBranch;
return this;
}
/**
* sets the default branch for this repository.
*
* @return defaultBranch
*/
@Schema(description = "sets the default branch for this repository.")
public String getDefaultBranch() {
return defaultBranch;
}
public void setDefaultBranch(String defaultBranch) {
this.defaultBranch = defaultBranch;
}
public EditRepoOption defaultDeleteBranchAfterMerge(Boolean defaultDeleteBranchAfterMerge) {
this.defaultDeleteBranchAfterMerge = defaultDeleteBranchAfterMerge;
return this;
}
/**
* set to &#x60;true&#x60; to delete pr branch after merge by default
*
* @return defaultDeleteBranchAfterMerge
*/
@Schema(description = "set to `true` to delete pr branch after merge by default")
public Boolean isDefaultDeleteBranchAfterMerge() {
return defaultDeleteBranchAfterMerge;
}
public void setDefaultDeleteBranchAfterMerge(Boolean defaultDeleteBranchAfterMerge) {
this.defaultDeleteBranchAfterMerge = defaultDeleteBranchAfterMerge;
}
public EditRepoOption defaultMergeStyle(String defaultMergeStyle) {
this.defaultMergeStyle = defaultMergeStyle;
return this;
}
/**
* set to a merge style to be used by this repository: \&quot;merge\&quot;, \&quot;rebase\&quot;,
* \&quot;rebase-merge\&quot;, or \&quot;squash\&quot;. &#x60;has_pull_requests&#x60; must be
* &#x60;true&#x60;.
*
* @return defaultMergeStyle
*/
@Schema(
description =
"set to a merge style to be used by this repository: \"merge\", \"rebase\","
+ " \"rebase-merge\", or \"squash\". `has_pull_requests` must be `true`.")
public String getDefaultMergeStyle() {
return defaultMergeStyle;
}
public void setDefaultMergeStyle(String defaultMergeStyle) {
this.defaultMergeStyle = defaultMergeStyle;
}
public EditRepoOption description(String description) {
this.description = description;
return this;
}
/**
* a short description of the repository.
*
* @return description
*/
@Schema(description = "a short description of the repository.")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public EditRepoOption externalTracker(ExternalTracker externalTracker) {
this.externalTracker = externalTracker;
return this;
}
/**
* Get externalTracker
*
* @return externalTracker
*/
@Schema(description = "")
public ExternalTracker getExternalTracker() {
return externalTracker;
}
public void setExternalTracker(ExternalTracker externalTracker) {
this.externalTracker = externalTracker;
}
public EditRepoOption externalWiki(ExternalWiki externalWiki) {
this.externalWiki = externalWiki;
return this;
}
/**
* Get externalWiki
*
* @return externalWiki
*/
@Schema(description = "")
public ExternalWiki getExternalWiki() {
return externalWiki;
}
public void setExternalWiki(ExternalWiki externalWiki) {
this.externalWiki = externalWiki;
}
public EditRepoOption hasIssues(Boolean hasIssues) {
this.hasIssues = hasIssues;
return this;
}
/**
* either &#x60;true&#x60; to enable issues for this repository or &#x60;false&#x60; to disable
* them.
*
* @return hasIssues
*/
@Schema(
description =
"either `true` to enable issues for this repository or `false` to disable them.")
public Boolean isHasIssues() {
return hasIssues;
}
public void setHasIssues(Boolean hasIssues) {
this.hasIssues = hasIssues;
}
public EditRepoOption hasProjects(Boolean hasProjects) {
this.hasProjects = hasProjects;
return this;
}
/**
* either &#x60;true&#x60; to enable project unit, or &#x60;false&#x60; to disable them.
*
* @return hasProjects
*/
@Schema(description = "either `true` to enable project unit, or `false` to disable them.")
public Boolean isHasProjects() {
return hasProjects;
}
public void setHasProjects(Boolean hasProjects) {
this.hasProjects = hasProjects;
}
public EditRepoOption hasPullRequests(Boolean hasPullRequests) {
this.hasPullRequests = hasPullRequests;
return this;
}
/**
* either &#x60;true&#x60; to allow pull requests, or &#x60;false&#x60; to prevent pull request.
*
* @return hasPullRequests
*/
@Schema(description = "either `true` to allow pull requests, or `false` to prevent pull request.")
public Boolean isHasPullRequests() {
return hasPullRequests;
}
public void setHasPullRequests(Boolean hasPullRequests) {
this.hasPullRequests = hasPullRequests;
}
public EditRepoOption hasWiki(Boolean hasWiki) {
this.hasWiki = hasWiki;
return this;
}
/**
* either &#x60;true&#x60; to enable the wiki for this repository or &#x60;false&#x60; to disable
* it.
*
* @return hasWiki
*/
@Schema(
description =
"either `true` to enable the wiki for this repository or `false` to disable it.")
public Boolean isHasWiki() {
return hasWiki;
}
public void setHasWiki(Boolean hasWiki) {
this.hasWiki = hasWiki;
}
public EditRepoOption ignoreWhitespaceConflicts(Boolean ignoreWhitespaceConflicts) {
this.ignoreWhitespaceConflicts = ignoreWhitespaceConflicts;
return this;
}
/**
* either &#x60;true&#x60; to ignore whitespace for conflicts, or &#x60;false&#x60; to not ignore
* whitespace. &#x60;has_pull_requests&#x60; must be &#x60;true&#x60;.
*
* @return ignoreWhitespaceConflicts
*/
@Schema(
description =
"either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace."
+ " `has_pull_requests` must be `true`.")
public Boolean isIgnoreWhitespaceConflicts() {
return ignoreWhitespaceConflicts;
}
public void setIgnoreWhitespaceConflicts(Boolean ignoreWhitespaceConflicts) {
this.ignoreWhitespaceConflicts = ignoreWhitespaceConflicts;
}
public EditRepoOption internalTracker(InternalTracker internalTracker) {
this.internalTracker = internalTracker;
return this;
}
/**
* Get internalTracker
*
* @return internalTracker
*/
@Schema(description = "")
public InternalTracker getInternalTracker() {
return internalTracker;
}
public void setInternalTracker(InternalTracker internalTracker) {
this.internalTracker = internalTracker;
}
public EditRepoOption mirrorInterval(String mirrorInterval) {
this.mirrorInterval = mirrorInterval;
return this;
}
/**
* set to a string like &#x60;8h30m0s&#x60; to set the mirror interval time
*
* @return mirrorInterval
*/
@Schema(description = "set to a string like `8h30m0s` to set the mirror interval time")
public String getMirrorInterval() {
return mirrorInterval;
}
public void setMirrorInterval(String mirrorInterval) {
this.mirrorInterval = mirrorInterval;
}
public EditRepoOption name(String name) {
this.name = name;
return this;
}
/**
* name of the repository
*
* @return name
*/
@Schema(description = "name of the repository")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public EditRepoOption _private(Boolean _private) {
this._private = _private;
return this;
}
/**
* either &#x60;true&#x60; to make the repository private or &#x60;false&#x60; to make it public.
* Note: you will get a 422 error if the organization restricts changing repository visibility to
* organization owners and a non-owner tries to change the value of private.
*
* @return _private
*/
@Schema(
description =
"either `true` to make the repository private or `false` to make it public. Note: you"
+ " will get a 422 error if the organization restricts changing repository visibility"
+ " to organization owners and a non-owner tries to change the value of private.")
public Boolean isPrivate() {
return _private;
}
public void setPrivate(Boolean _private) {
this._private = _private;
}
public EditRepoOption template(Boolean template) {
this.template = template;
return this;
}
/**
* either &#x60;true&#x60; to make this repository a template or &#x60;false&#x60; to make it a
* normal repository
*
* @return template
*/
@Schema(
description =
"either `true` to make this repository a template or `false` to make it a normal"
+ " repository")
public Boolean isTemplate() {
return template;
}
public void setTemplate(Boolean template) {
this.template = template;
}
public EditRepoOption website(String website) {
this.website = website;
return this;
}
/**
* a URL with more information about the repository.
*
* @return website
*/
@Schema(description = "a URL with more information about the repository.")
public String getWebsite() {
return website;
}
public void setWebsite(String website) {
this.website = website;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EditRepoOption editRepoOption = (EditRepoOption) o;
return Objects.equals(this.allowManualMerge, editRepoOption.allowManualMerge)
&& Objects.equals(this.allowMergeCommits, editRepoOption.allowMergeCommits)
&& Objects.equals(this.allowRebase, editRepoOption.allowRebase)
&& Objects.equals(this.allowRebaseExplicit, editRepoOption.allowRebaseExplicit)
&& Objects.equals(this.allowRebaseUpdate, editRepoOption.allowRebaseUpdate)
&& Objects.equals(this.allowSquashMerge, editRepoOption.allowSquashMerge)
&& Objects.equals(this.archived, editRepoOption.archived)
&& Objects.equals(this.autodetectManualMerge, editRepoOption.autodetectManualMerge)
&& Objects.equals(this.defaultBranch, editRepoOption.defaultBranch)
&& Objects.equals(
this.defaultDeleteBranchAfterMerge, editRepoOption.defaultDeleteBranchAfterMerge)
&& Objects.equals(this.defaultMergeStyle, editRepoOption.defaultMergeStyle)
&& Objects.equals(this.description, editRepoOption.description)
&& Objects.equals(this.externalTracker, editRepoOption.externalTracker)
&& Objects.equals(this.externalWiki, editRepoOption.externalWiki)
&& Objects.equals(this.hasIssues, editRepoOption.hasIssues)
&& Objects.equals(this.hasProjects, editRepoOption.hasProjects)
&& Objects.equals(this.hasPullRequests, editRepoOption.hasPullRequests)
&& Objects.equals(this.hasWiki, editRepoOption.hasWiki)
&& Objects.equals(this.ignoreWhitespaceConflicts, editRepoOption.ignoreWhitespaceConflicts)
&& Objects.equals(this.internalTracker, editRepoOption.internalTracker)
&& Objects.equals(this.mirrorInterval, editRepoOption.mirrorInterval)
&& Objects.equals(this.name, editRepoOption.name)
&& Objects.equals(this._private, editRepoOption._private)
&& Objects.equals(this.template, editRepoOption.template)
&& Objects.equals(this.website, editRepoOption.website);
}
@Override
public int hashCode() {
return Objects.hash(
allowManualMerge,
allowMergeCommits,
allowRebase,
allowRebaseExplicit,
allowRebaseUpdate,
allowSquashMerge,
archived,
autodetectManualMerge,
defaultBranch,
defaultDeleteBranchAfterMerge,
defaultMergeStyle,
description,
externalTracker,
externalWiki,
hasIssues,
hasProjects,
hasPullRequests,
hasWiki,
ignoreWhitespaceConflicts,
internalTracker,
mirrorInterval,
name,
_private,
template,
website);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EditRepoOption {\n");
sb.append(" allowManualMerge: ").append(toIndentedString(allowManualMerge)).append("\n");
sb.append(" allowMergeCommits: ").append(toIndentedString(allowMergeCommits)).append("\n");
sb.append(" allowRebase: ").append(toIndentedString(allowRebase)).append("\n");
sb.append(" allowRebaseExplicit: ")
.append(toIndentedString(allowRebaseExplicit))
.append("\n");
sb.append(" allowRebaseUpdate: ").append(toIndentedString(allowRebaseUpdate)).append("\n");
sb.append(" allowSquashMerge: ").append(toIndentedString(allowSquashMerge)).append("\n");
sb.append(" archived: ").append(toIndentedString(archived)).append("\n");
sb.append(" autodetectManualMerge: ")
.append(toIndentedString(autodetectManualMerge))
.append("\n");
sb.append(" defaultBranch: ").append(toIndentedString(defaultBranch)).append("\n");
sb.append(" defaultDeleteBranchAfterMerge: ")
.append(toIndentedString(defaultDeleteBranchAfterMerge))
.append("\n");
sb.append(" defaultMergeStyle: ").append(toIndentedString(defaultMergeStyle)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" externalTracker: ").append(toIndentedString(externalTracker)).append("\n");
sb.append(" externalWiki: ").append(toIndentedString(externalWiki)).append("\n");
sb.append(" hasIssues: ").append(toIndentedString(hasIssues)).append("\n");
sb.append(" hasProjects: ").append(toIndentedString(hasProjects)).append("\n");
sb.append(" hasPullRequests: ").append(toIndentedString(hasPullRequests)).append("\n");
sb.append(" hasWiki: ").append(toIndentedString(hasWiki)).append("\n");
sb.append(" ignoreWhitespaceConflicts: ")
.append(toIndentedString(ignoreWhitespaceConflicts))
.append("\n");
sb.append(" internalTracker: ").append(toIndentedString(internalTracker)).append("\n");
sb.append(" mirrorInterval: ").append(toIndentedString(mirrorInterval)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" _private: ").append(toIndentedString(_private)).append("\n");
sb.append(" template: ").append(toIndentedString(template)).append("\n");
sb.append(" website: ").append(toIndentedString(website)).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,307 @@
/*
* 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.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;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/** EditTeamOption options for editing a team */
@Schema(description = "EditTeamOption options for editing a team")
public class EditTeamOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("can_create_org_repo")
private Boolean canCreateOrgRepo = null;
@SerializedName("description")
private String description = null;
@SerializedName("includes_all_repositories")
private Boolean includesAllRepositories = null;
@SerializedName("name")
private String name = null;
/** Gets or Sets permission */
@JsonAdapter(PermissionEnum.Adapter.class)
public enum PermissionEnum {
READ("read"),
WRITE("write"),
ADMIN("admin");
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 PermissionEnum permission = null;
@SerializedName("units")
private List<String> units = null;
@SerializedName("units_map")
private Map<String, String> unitsMap = null;
public EditTeamOption canCreateOrgRepo(Boolean canCreateOrgRepo) {
this.canCreateOrgRepo = canCreateOrgRepo;
return this;
}
/**
* Get canCreateOrgRepo
*
* @return canCreateOrgRepo
*/
@Schema(description = "")
public Boolean isCanCreateOrgRepo() {
return canCreateOrgRepo;
}
public void setCanCreateOrgRepo(Boolean canCreateOrgRepo) {
this.canCreateOrgRepo = canCreateOrgRepo;
}
public EditTeamOption description(String description) {
this.description = description;
return this;
}
/**
* Get description
*
* @return description
*/
@Schema(description = "")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public EditTeamOption includesAllRepositories(Boolean includesAllRepositories) {
this.includesAllRepositories = includesAllRepositories;
return this;
}
/**
* Get includesAllRepositories
*
* @return includesAllRepositories
*/
@Schema(description = "")
public Boolean isIncludesAllRepositories() {
return includesAllRepositories;
}
public void setIncludesAllRepositories(Boolean includesAllRepositories) {
this.includesAllRepositories = includesAllRepositories;
}
public EditTeamOption name(String name) {
this.name = name;
return this;
}
/**
* Get name
*
* @return name
*/
@Schema(required = true, description = "")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public EditTeamOption permission(PermissionEnum permission) {
this.permission = permission;
return this;
}
/**
* Get permission
*
* @return permission
*/
@Schema(description = "")
public PermissionEnum getPermission() {
return permission;
}
public void setPermission(PermissionEnum permission) {
this.permission = permission;
}
public EditTeamOption units(List<String> units) {
this.units = units;
return this;
}
public EditTeamOption addUnitsItem(String unitsItem) {
if (this.units == null) {
this.units = new ArrayList<>();
}
this.units.add(unitsItem);
return this;
}
/**
* Get units
*
* @return units
*/
@Schema(
example =
"[\"repo.code\",\"repo.issues\",\"repo.ext_issues\",\"repo.wiki\",\"repo.pulls\",\"repo.releases\",\"repo.projects\",\"repo.ext_wiki\"]",
description = "")
public List<String> getUnits() {
return units;
}
public void setUnits(List<String> units) {
this.units = units;
}
public EditTeamOption unitsMap(Map<String, String> unitsMap) {
this.unitsMap = unitsMap;
return this;
}
public EditTeamOption putUnitsMapItem(String key, String unitsMapItem) {
if (this.unitsMap == null) {
this.unitsMap = new HashMap<>();
}
this.unitsMap.put(key, unitsMapItem);
return this;
}
/**
* Get unitsMap
*
* @return unitsMap
*/
@Schema(
example =
"{\"repo.code\":\"read\",\"repo.issues\":\"write\",\"repo.ext_issues\":\"none\",\"repo.wiki\":\"admin\",\"repo.pulls\":\"owner\",\"repo.releases\":\"none\",\"repo.projects\":\"none\",\"repo.ext_wiki\":\"none\"]",
description = "")
public Map<String, String> getUnitsMap() {
return unitsMap;
}
public void setUnitsMap(Map<String, String> unitsMap) {
this.unitsMap = unitsMap;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EditTeamOption editTeamOption = (EditTeamOption) o;
return Objects.equals(this.canCreateOrgRepo, editTeamOption.canCreateOrgRepo)
&& Objects.equals(this.description, editTeamOption.description)
&& Objects.equals(this.includesAllRepositories, editTeamOption.includesAllRepositories)
&& Objects.equals(this.name, editTeamOption.name)
&& Objects.equals(this.permission, editTeamOption.permission)
&& Objects.equals(this.units, editTeamOption.units)
&& Objects.equals(this.unitsMap, editTeamOption.unitsMap);
}
@Override
public int hashCode() {
return Objects.hash(
canCreateOrgRepo, description, includesAllRepositories, name, permission, units, unitsMap);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EditTeamOption {\n");
sb.append(" canCreateOrgRepo: ").append(toIndentedString(canCreateOrgRepo)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" includesAllRepositories: ")
.append(toIndentedString(includesAllRepositories))
.append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" permission: ").append(toIndentedString(permission)).append("\n");
sb.append(" units: ").append(toIndentedString(units)).append("\n");
sb.append(" unitsMap: ").append(toIndentedString(unitsMap)).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,511 @@
/*
* 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;
/** EditUserOption edit user options */
@Schema(description = "EditUserOption edit user options")
public class EditUserOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("active")
private Boolean active = null;
@SerializedName("admin")
private Boolean admin = null;
@SerializedName("allow_create_organization")
private Boolean allowCreateOrganization = null;
@SerializedName("allow_git_hook")
private Boolean allowGitHook = null;
@SerializedName("allow_import_local")
private Boolean allowImportLocal = null;
@SerializedName("description")
private String description = null;
@SerializedName("email")
private String email = null;
@SerializedName("full_name")
private String fullName = null;
@SerializedName("location")
private String location = null;
@SerializedName("login_name")
private String loginName = null;
@SerializedName("max_repo_creation")
private Long maxRepoCreation = null;
@SerializedName("must_change_password")
private Boolean mustChangePassword = null;
@SerializedName("password")
private String password = null;
@SerializedName("prohibit_login")
private Boolean prohibitLogin = null;
@SerializedName("restricted")
private Boolean restricted = null;
@SerializedName("source_id")
private Long sourceId = null;
@SerializedName("visibility")
private String visibility = null;
@SerializedName("website")
private String website = null;
public EditUserOption active(Boolean active) {
this.active = active;
return this;
}
/**
* Get active
*
* @return active
*/
@Schema(description = "")
public Boolean isActive() {
return active;
}
public void setActive(Boolean active) {
this.active = active;
}
public EditUserOption admin(Boolean admin) {
this.admin = admin;
return this;
}
/**
* Get admin
*
* @return admin
*/
@Schema(description = "")
public Boolean isAdmin() {
return admin;
}
public void setAdmin(Boolean admin) {
this.admin = admin;
}
public EditUserOption allowCreateOrganization(Boolean allowCreateOrganization) {
this.allowCreateOrganization = allowCreateOrganization;
return this;
}
/**
* Get allowCreateOrganization
*
* @return allowCreateOrganization
*/
@Schema(description = "")
public Boolean isAllowCreateOrganization() {
return allowCreateOrganization;
}
public void setAllowCreateOrganization(Boolean allowCreateOrganization) {
this.allowCreateOrganization = allowCreateOrganization;
}
public EditUserOption allowGitHook(Boolean allowGitHook) {
this.allowGitHook = allowGitHook;
return this;
}
/**
* Get allowGitHook
*
* @return allowGitHook
*/
@Schema(description = "")
public Boolean isAllowGitHook() {
return allowGitHook;
}
public void setAllowGitHook(Boolean allowGitHook) {
this.allowGitHook = allowGitHook;
}
public EditUserOption allowImportLocal(Boolean allowImportLocal) {
this.allowImportLocal = allowImportLocal;
return this;
}
/**
* Get allowImportLocal
*
* @return allowImportLocal
*/
@Schema(description = "")
public Boolean isAllowImportLocal() {
return allowImportLocal;
}
public void setAllowImportLocal(Boolean allowImportLocal) {
this.allowImportLocal = allowImportLocal;
}
public EditUserOption description(String description) {
this.description = description;
return this;
}
/**
* Get description
*
* @return description
*/
@Schema(description = "")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public EditUserOption email(String email) {
this.email = email;
return this;
}
/**
* Get email
*
* @return email
*/
@Schema(description = "")
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public EditUserOption fullName(String fullName) {
this.fullName = fullName;
return this;
}
/**
* Get fullName
*
* @return fullName
*/
@Schema(description = "")
public String getFullName() {
return fullName;
}
public void setFullName(String fullName) {
this.fullName = fullName;
}
public EditUserOption location(String location) {
this.location = location;
return this;
}
/**
* Get location
*
* @return location
*/
@Schema(description = "")
public String getLocation() {
return location;
}
public void setLocation(String location) {
this.location = location;
}
public EditUserOption loginName(String loginName) {
this.loginName = loginName;
return this;
}
/**
* Get loginName
*
* @return loginName
*/
@Schema(required = true, description = "")
public String getLoginName() {
return loginName;
}
public void setLoginName(String loginName) {
this.loginName = loginName;
}
public EditUserOption maxRepoCreation(Long maxRepoCreation) {
this.maxRepoCreation = maxRepoCreation;
return this;
}
/**
* Get maxRepoCreation
*
* @return maxRepoCreation
*/
@Schema(description = "")
public Long getMaxRepoCreation() {
return maxRepoCreation;
}
public void setMaxRepoCreation(Long maxRepoCreation) {
this.maxRepoCreation = maxRepoCreation;
}
public EditUserOption mustChangePassword(Boolean mustChangePassword) {
this.mustChangePassword = mustChangePassword;
return this;
}
/**
* Get mustChangePassword
*
* @return mustChangePassword
*/
@Schema(description = "")
public Boolean isMustChangePassword() {
return mustChangePassword;
}
public void setMustChangePassword(Boolean mustChangePassword) {
this.mustChangePassword = mustChangePassword;
}
public EditUserOption password(String password) {
this.password = password;
return this;
}
/**
* Get password
*
* @return password
*/
@Schema(description = "")
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public EditUserOption prohibitLogin(Boolean prohibitLogin) {
this.prohibitLogin = prohibitLogin;
return this;
}
/**
* Get prohibitLogin
*
* @return prohibitLogin
*/
@Schema(description = "")
public Boolean isProhibitLogin() {
return prohibitLogin;
}
public void setProhibitLogin(Boolean prohibitLogin) {
this.prohibitLogin = prohibitLogin;
}
public EditUserOption restricted(Boolean restricted) {
this.restricted = restricted;
return this;
}
/**
* Get restricted
*
* @return restricted
*/
@Schema(description = "")
public Boolean isRestricted() {
return restricted;
}
public void setRestricted(Boolean restricted) {
this.restricted = restricted;
}
public EditUserOption sourceId(Long sourceId) {
this.sourceId = sourceId;
return this;
}
/**
* Get sourceId
*
* @return sourceId
*/
@Schema(required = true, description = "")
public Long getSourceId() {
return sourceId;
}
public void setSourceId(Long sourceId) {
this.sourceId = sourceId;
}
public EditUserOption visibility(String visibility) {
this.visibility = visibility;
return this;
}
/**
* Get visibility
*
* @return visibility
*/
@Schema(description = "")
public String getVisibility() {
return visibility;
}
public void setVisibility(String visibility) {
this.visibility = visibility;
}
public EditUserOption website(String website) {
this.website = website;
return this;
}
/**
* Get website
*
* @return website
*/
@Schema(description = "")
public String getWebsite() {
return website;
}
public void setWebsite(String website) {
this.website = website;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EditUserOption editUserOption = (EditUserOption) o;
return Objects.equals(this.active, editUserOption.active)
&& Objects.equals(this.admin, editUserOption.admin)
&& Objects.equals(this.allowCreateOrganization, editUserOption.allowCreateOrganization)
&& Objects.equals(this.allowGitHook, editUserOption.allowGitHook)
&& Objects.equals(this.allowImportLocal, editUserOption.allowImportLocal)
&& Objects.equals(this.description, editUserOption.description)
&& Objects.equals(this.email, editUserOption.email)
&& Objects.equals(this.fullName, editUserOption.fullName)
&& Objects.equals(this.location, editUserOption.location)
&& Objects.equals(this.loginName, editUserOption.loginName)
&& Objects.equals(this.maxRepoCreation, editUserOption.maxRepoCreation)
&& Objects.equals(this.mustChangePassword, editUserOption.mustChangePassword)
&& Objects.equals(this.password, editUserOption.password)
&& Objects.equals(this.prohibitLogin, editUserOption.prohibitLogin)
&& Objects.equals(this.restricted, editUserOption.restricted)
&& Objects.equals(this.sourceId, editUserOption.sourceId)
&& Objects.equals(this.visibility, editUserOption.visibility)
&& Objects.equals(this.website, editUserOption.website);
}
@Override
public int hashCode() {
return Objects.hash(
active,
admin,
allowCreateOrganization,
allowGitHook,
allowImportLocal,
description,
email,
fullName,
location,
loginName,
maxRepoCreation,
mustChangePassword,
password,
prohibitLogin,
restricted,
sourceId,
visibility,
website);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EditUserOption {\n");
sb.append(" active: ").append(toIndentedString(active)).append("\n");
sb.append(" admin: ").append(toIndentedString(admin)).append("\n");
sb.append(" allowCreateOrganization: ")
.append(toIndentedString(allowCreateOrganization))
.append("\n");
sb.append(" allowGitHook: ").append(toIndentedString(allowGitHook)).append("\n");
sb.append(" allowImportLocal: ").append(toIndentedString(allowImportLocal)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" email: ").append(toIndentedString(email)).append("\n");
sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n");
sb.append(" location: ").append(toIndentedString(location)).append("\n");
sb.append(" loginName: ").append(toIndentedString(loginName)).append("\n");
sb.append(" maxRepoCreation: ").append(toIndentedString(maxRepoCreation)).append("\n");
sb.append(" mustChangePassword: ").append(toIndentedString(mustChangePassword)).append("\n");
sb.append(" password: ").append(toIndentedString(password)).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(" visibility: ").append(toIndentedString(visibility)).append("\n");
sb.append(" website: ").append(toIndentedString(website)).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,131 @@
/*
* 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;
/** Email an email address belonging to a user */
@Schema(description = "Email an email address belonging to a user")
public class Email implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("email")
private String email = null;
@SerializedName("primary")
private Boolean primary = null;
@SerializedName("verified")
private Boolean verified = null;
public Email email(String email) {
this.email = email;
return this;
}
/**
* Get email
*
* @return email
*/
@Schema(description = "")
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public Email primary(Boolean primary) {
this.primary = primary;
return this;
}
/**
* Get primary
*
* @return primary
*/
@Schema(description = "")
public Boolean isPrimary() {
return primary;
}
public void setPrimary(Boolean primary) {
this.primary = primary;
}
public Email verified(Boolean verified) {
this.verified = verified;
return this;
}
/**
* Get verified
*
* @return verified
*/
@Schema(description = "")
public Boolean isVerified() {
return verified;
}
public void setVerified(Boolean verified) {
this.verified = verified;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Email email = (Email) o;
return Objects.equals(this.email, email.email)
&& Objects.equals(this.primary, email.primary)
&& Objects.equals(this.verified, email.verified);
}
@Override
public int hashCode() {
return Objects.hash(email, primary, verified);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Email {\n");
sb.append(" email: ").append(toIndentedString(email)).append("\n");
sb.append(" primary: ").append(toIndentedString(primary)).append("\n");
sb.append(" verified: ").append(toIndentedString(verified)).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,139 @@
/*
* 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;
/** ExternalTracker represents settings for external tracker */
@Schema(description = "ExternalTracker represents settings for external tracker")
public class ExternalTracker implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("external_tracker_format")
private String externalTrackerFormat = null;
@SerializedName("external_tracker_style")
private String externalTrackerStyle = null;
@SerializedName("external_tracker_url")
private String externalTrackerUrl = null;
public ExternalTracker externalTrackerFormat(String externalTrackerFormat) {
this.externalTrackerFormat = externalTrackerFormat;
return this;
}
/**
* External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the
* username, repository name and issue index.
*
* @return externalTrackerFormat
*/
@Schema(
description =
"External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for"
+ " the username, repository name and issue index.")
public String getExternalTrackerFormat() {
return externalTrackerFormat;
}
public void setExternalTrackerFormat(String externalTrackerFormat) {
this.externalTrackerFormat = externalTrackerFormat;
}
public ExternalTracker externalTrackerStyle(String externalTrackerStyle) {
this.externalTrackerStyle = externalTrackerStyle;
return this;
}
/**
* External Issue Tracker Number Format, either &#x60;numeric&#x60; or &#x60;alphanumeric&#x60;
*
* @return externalTrackerStyle
*/
@Schema(description = "External Issue Tracker Number Format, either `numeric` or `alphanumeric`")
public String getExternalTrackerStyle() {
return externalTrackerStyle;
}
public void setExternalTrackerStyle(String externalTrackerStyle) {
this.externalTrackerStyle = externalTrackerStyle;
}
public ExternalTracker externalTrackerUrl(String externalTrackerUrl) {
this.externalTrackerUrl = externalTrackerUrl;
return this;
}
/**
* URL of external issue tracker.
*
* @return externalTrackerUrl
*/
@Schema(description = "URL of external issue tracker.")
public String getExternalTrackerUrl() {
return externalTrackerUrl;
}
public void setExternalTrackerUrl(String externalTrackerUrl) {
this.externalTrackerUrl = externalTrackerUrl;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ExternalTracker externalTracker = (ExternalTracker) o;
return Objects.equals(this.externalTrackerFormat, externalTracker.externalTrackerFormat)
&& Objects.equals(this.externalTrackerStyle, externalTracker.externalTrackerStyle)
&& Objects.equals(this.externalTrackerUrl, externalTracker.externalTrackerUrl);
}
@Override
public int hashCode() {
return Objects.hash(externalTrackerFormat, externalTrackerStyle, externalTrackerUrl);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ExternalTracker {\n");
sb.append(" externalTrackerFormat: ")
.append(toIndentedString(externalTrackerFormat))
.append("\n");
sb.append(" externalTrackerStyle: ")
.append(toIndentedString(externalTrackerStyle))
.append("\n");
sb.append(" externalTrackerUrl: ").append(toIndentedString(externalTrackerUrl)).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,83 @@
/*
* 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;
/** ExternalWiki represents setting for external wiki */
@Schema(description = "ExternalWiki represents setting for external wiki")
public class ExternalWiki implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("external_wiki_url")
private String externalWikiUrl = null;
public ExternalWiki externalWikiUrl(String externalWikiUrl) {
this.externalWikiUrl = externalWikiUrl;
return this;
}
/**
* URL of external wiki.
*
* @return externalWikiUrl
*/
@Schema(description = "URL of external wiki.")
public String getExternalWikiUrl() {
return externalWikiUrl;
}
public void setExternalWikiUrl(String externalWikiUrl) {
this.externalWikiUrl = externalWikiUrl;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ExternalWiki externalWiki = (ExternalWiki) o;
return Objects.equals(this.externalWikiUrl, externalWiki.externalWikiUrl);
}
@Override
public int hashCode() {
return Objects.hash(externalWikiUrl);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ExternalWiki {\n");
sb.append(" externalWikiUrl: ").append(toIndentedString(externalWikiUrl)).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,285 @@
/*
* 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.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
/** FileCommitResponse */
public class FileCommitResponse implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("author")
private CommitUser author = null;
@SerializedName("committer")
private CommitUser committer = null;
@SerializedName("created")
private Date created = null;
@SerializedName("html_url")
private String htmlUrl = null;
@SerializedName("message")
private String message = null;
@SerializedName("parents")
private List<CommitMeta> parents = null;
@SerializedName("sha")
private String sha = null;
@SerializedName("tree")
private CommitMeta tree = null;
@SerializedName("url")
private String url = null;
public FileCommitResponse author(CommitUser author) {
this.author = author;
return this;
}
/**
* Get author
*
* @return author
*/
@Schema(description = "")
public CommitUser getAuthor() {
return author;
}
public void setAuthor(CommitUser author) {
this.author = author;
}
public FileCommitResponse committer(CommitUser committer) {
this.committer = committer;
return this;
}
/**
* Get committer
*
* @return committer
*/
@Schema(description = "")
public CommitUser getCommitter() {
return committer;
}
public void setCommitter(CommitUser committer) {
this.committer = committer;
}
public FileCommitResponse created(Date created) {
this.created = created;
return this;
}
/**
* Get created
*
* @return created
*/
@Schema(description = "")
public Date getCreated() {
return created;
}
public void setCreated(Date created) {
this.created = created;
}
public FileCommitResponse htmlUrl(String htmlUrl) {
this.htmlUrl = htmlUrl;
return this;
}
/**
* Get htmlUrl
*
* @return htmlUrl
*/
@Schema(description = "")
public String getHtmlUrl() {
return htmlUrl;
}
public void setHtmlUrl(String htmlUrl) {
this.htmlUrl = htmlUrl;
}
public FileCommitResponse message(String message) {
this.message = message;
return this;
}
/**
* Get message
*
* @return message
*/
@Schema(description = "")
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public FileCommitResponse parents(List<CommitMeta> parents) {
this.parents = parents;
return this;
}
public FileCommitResponse addParentsItem(CommitMeta parentsItem) {
if (this.parents == null) {
this.parents = new ArrayList<>();
}
this.parents.add(parentsItem);
return this;
}
/**
* Get parents
*
* @return parents
*/
@Schema(description = "")
public List<CommitMeta> getParents() {
return parents;
}
public void setParents(List<CommitMeta> parents) {
this.parents = parents;
}
public FileCommitResponse sha(String sha) {
this.sha = sha;
return this;
}
/**
* Get sha
*
* @return sha
*/
@Schema(description = "")
public String getSha() {
return sha;
}
public void setSha(String sha) {
this.sha = sha;
}
public FileCommitResponse tree(CommitMeta tree) {
this.tree = tree;
return this;
}
/**
* Get tree
*
* @return tree
*/
@Schema(description = "")
public CommitMeta getTree() {
return tree;
}
public void setTree(CommitMeta tree) {
this.tree = tree;
}
public FileCommitResponse url(String url) {
this.url = url;
return this;
}
/**
* Get url
*
* @return url
*/
@Schema(description = "")
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
FileCommitResponse fileCommitResponse = (FileCommitResponse) o;
return Objects.equals(this.author, fileCommitResponse.author)
&& Objects.equals(this.committer, fileCommitResponse.committer)
&& Objects.equals(this.created, fileCommitResponse.created)
&& Objects.equals(this.htmlUrl, fileCommitResponse.htmlUrl)
&& Objects.equals(this.message, fileCommitResponse.message)
&& Objects.equals(this.parents, fileCommitResponse.parents)
&& Objects.equals(this.sha, fileCommitResponse.sha)
&& Objects.equals(this.tree, fileCommitResponse.tree)
&& Objects.equals(this.url, fileCommitResponse.url);
}
@Override
public int hashCode() {
return Objects.hash(author, committer, created, htmlUrl, message, parents, sha, tree, url);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class FileCommitResponse {\n");
sb.append(" author: ").append(toIndentedString(author)).append("\n");
sb.append(" committer: ").append(toIndentedString(committer)).append("\n");
sb.append(" created: ").append(toIndentedString(created)).append("\n");
sb.append(" htmlUrl: ").append(toIndentedString(htmlUrl)).append("\n");
sb.append(" message: ").append(toIndentedString(message)).append("\n");
sb.append(" parents: ").append(toIndentedString(parents)).append("\n");
sb.append(" sha: ").append(toIndentedString(sha)).append("\n");
sb.append(" tree: ").append(toIndentedString(tree)).append("\n");
sb.append(" url: ").append(toIndentedString(url)).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,132 @@
/*
* 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;
/** FileDeleteResponse contains information about a repo&#x27;s file that was deleted */
@Schema(
description = "FileDeleteResponse contains information about a repo's file that was deleted")
public class FileDeleteResponse implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("commit")
private FileCommitResponse commit = null;
@SerializedName("content")
private Object content = null;
@SerializedName("verification")
private PayloadCommitVerification verification = null;
public FileDeleteResponse commit(FileCommitResponse commit) {
this.commit = commit;
return this;
}
/**
* Get commit
*
* @return commit
*/
@Schema(description = "")
public FileCommitResponse getCommit() {
return commit;
}
public void setCommit(FileCommitResponse commit) {
this.commit = commit;
}
public FileDeleteResponse content(Object content) {
this.content = content;
return this;
}
/**
* Get content
*
* @return content
*/
@Schema(description = "")
public Object getContent() {
return content;
}
public void setContent(Object content) {
this.content = content;
}
public FileDeleteResponse verification(PayloadCommitVerification verification) {
this.verification = verification;
return this;
}
/**
* Get verification
*
* @return verification
*/
@Schema(description = "")
public PayloadCommitVerification getVerification() {
return verification;
}
public void setVerification(PayloadCommitVerification verification) {
this.verification = verification;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
FileDeleteResponse fileDeleteResponse = (FileDeleteResponse) o;
return Objects.equals(this.commit, fileDeleteResponse.commit)
&& Objects.equals(this.content, fileDeleteResponse.content)
&& Objects.equals(this.verification, fileDeleteResponse.verification);
}
@Override
public int hashCode() {
return Objects.hash(commit, content, verification);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class FileDeleteResponse {\n");
sb.append(" commit: ").append(toIndentedString(commit)).append("\n");
sb.append(" content: ").append(toIndentedString(content)).append("\n");
sb.append(" verification: ").append(toIndentedString(verification)).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,131 @@
/*
* 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;
/** FileLinksResponse contains the links for a repo&#x27;s file */
@Schema(description = "FileLinksResponse contains the links for a repo's file")
public class FileLinksResponse implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("git")
private String git = null;
@SerializedName("html")
private String html = null;
@SerializedName("self")
private String self = null;
public FileLinksResponse git(String git) {
this.git = git;
return this;
}
/**
* Get git
*
* @return git
*/
@Schema(description = "")
public String getGit() {
return git;
}
public void setGit(String git) {
this.git = git;
}
public FileLinksResponse html(String html) {
this.html = html;
return this;
}
/**
* Get html
*
* @return html
*/
@Schema(description = "")
public String getHtml() {
return html;
}
public void setHtml(String html) {
this.html = html;
}
public FileLinksResponse self(String self) {
this.self = self;
return this;
}
/**
* Get self
*
* @return self
*/
@Schema(description = "")
public String getSelf() {
return self;
}
public void setSelf(String self) {
this.self = self;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
FileLinksResponse fileLinksResponse = (FileLinksResponse) o;
return Objects.equals(this.git, fileLinksResponse.git)
&& Objects.equals(this.html, fileLinksResponse.html)
&& Objects.equals(this.self, fileLinksResponse.self);
}
@Override
public int hashCode() {
return Objects.hash(git, html, self);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class FileLinksResponse {\n");
sb.append(" git: ").append(toIndentedString(git)).append("\n");
sb.append(" html: ").append(toIndentedString(html)).append("\n");
sb.append(" self: ").append(toIndentedString(self)).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,131 @@
/*
* 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;
/** FileResponse contains information about a repo&#x27;s file */
@Schema(description = "FileResponse contains information about a repo's file")
public class FileResponse implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("commit")
private FileCommitResponse commit = null;
@SerializedName("content")
private ContentsResponse content = null;
@SerializedName("verification")
private PayloadCommitVerification verification = null;
public FileResponse commit(FileCommitResponse commit) {
this.commit = commit;
return this;
}
/**
* Get commit
*
* @return commit
*/
@Schema(description = "")
public FileCommitResponse getCommit() {
return commit;
}
public void setCommit(FileCommitResponse commit) {
this.commit = commit;
}
public FileResponse content(ContentsResponse content) {
this.content = content;
return this;
}
/**
* Get content
*
* @return content
*/
@Schema(description = "")
public ContentsResponse getContent() {
return content;
}
public void setContent(ContentsResponse content) {
this.content = content;
}
public FileResponse verification(PayloadCommitVerification verification) {
this.verification = verification;
return this;
}
/**
* Get verification
*
* @return verification
*/
@Schema(description = "")
public PayloadCommitVerification getVerification() {
return verification;
}
public void setVerification(PayloadCommitVerification verification) {
this.verification = verification;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
FileResponse fileResponse = (FileResponse) o;
return Objects.equals(this.commit, fileResponse.commit)
&& Objects.equals(this.content, fileResponse.content)
&& Objects.equals(this.verification, fileResponse.verification);
}
@Override
public int hashCode() {
return Objects.hash(commit, content, verification);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class FileResponse {\n");
sb.append(" commit: ").append(toIndentedString(commit)).append("\n");
sb.append(" content: ").append(toIndentedString(content)).append("\n");
sb.append(" verification: ").append(toIndentedString(verification)).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,403 @@
/*
* 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.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
/** GPGKey a user GPG key to sign commit and tag in repository */
@Schema(description = "GPGKey a user GPG key to sign commit and tag in repository")
public class GPGKey implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("can_certify")
private Boolean canCertify = null;
@SerializedName("can_encrypt_comms")
private Boolean canEncryptComms = null;
@SerializedName("can_encrypt_storage")
private Boolean canEncryptStorage = null;
@SerializedName("can_sign")
private Boolean canSign = null;
@SerializedName("created_at")
private Date createdAt = null;
@SerializedName("emails")
private List<GPGKeyEmail> emails = null;
@SerializedName("expires_at")
private Date expiresAt = null;
@SerializedName("id")
private Long id = null;
@SerializedName("key_id")
private String keyId = null;
@SerializedName("primary_key_id")
private String primaryKeyId = null;
@SerializedName("public_key")
private String publicKey = null;
@SerializedName("subkeys")
private List<GPGKey> subkeys = null;
@SerializedName("verified")
private Boolean verified = null;
public GPGKey canCertify(Boolean canCertify) {
this.canCertify = canCertify;
return this;
}
/**
* Get canCertify
*
* @return canCertify
*/
@Schema(description = "")
public Boolean isCanCertify() {
return canCertify;
}
public void setCanCertify(Boolean canCertify) {
this.canCertify = canCertify;
}
public GPGKey canEncryptComms(Boolean canEncryptComms) {
this.canEncryptComms = canEncryptComms;
return this;
}
/**
* Get canEncryptComms
*
* @return canEncryptComms
*/
@Schema(description = "")
public Boolean isCanEncryptComms() {
return canEncryptComms;
}
public void setCanEncryptComms(Boolean canEncryptComms) {
this.canEncryptComms = canEncryptComms;
}
public GPGKey canEncryptStorage(Boolean canEncryptStorage) {
this.canEncryptStorage = canEncryptStorage;
return this;
}
/**
* Get canEncryptStorage
*
* @return canEncryptStorage
*/
@Schema(description = "")
public Boolean isCanEncryptStorage() {
return canEncryptStorage;
}
public void setCanEncryptStorage(Boolean canEncryptStorage) {
this.canEncryptStorage = canEncryptStorage;
}
public GPGKey canSign(Boolean canSign) {
this.canSign = canSign;
return this;
}
/**
* Get canSign
*
* @return canSign
*/
@Schema(description = "")
public Boolean isCanSign() {
return canSign;
}
public void setCanSign(Boolean canSign) {
this.canSign = canSign;
}
public GPGKey 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 GPGKey emails(List<GPGKeyEmail> emails) {
this.emails = emails;
return this;
}
public GPGKey addEmailsItem(GPGKeyEmail emailsItem) {
if (this.emails == null) {
this.emails = new ArrayList<>();
}
this.emails.add(emailsItem);
return this;
}
/**
* Get emails
*
* @return emails
*/
@Schema(description = "")
public List<GPGKeyEmail> getEmails() {
return emails;
}
public void setEmails(List<GPGKeyEmail> emails) {
this.emails = emails;
}
public GPGKey expiresAt(Date expiresAt) {
this.expiresAt = expiresAt;
return this;
}
/**
* Get expiresAt
*
* @return expiresAt
*/
@Schema(description = "")
public Date getExpiresAt() {
return expiresAt;
}
public void setExpiresAt(Date expiresAt) {
this.expiresAt = expiresAt;
}
public GPGKey id(Long id) {
this.id = id;
return this;
}
/**
* Get id
*
* @return id
*/
@Schema(description = "")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public GPGKey keyId(String keyId) {
this.keyId = keyId;
return this;
}
/**
* Get keyId
*
* @return keyId
*/
@Schema(description = "")
public String getKeyId() {
return keyId;
}
public void setKeyId(String keyId) {
this.keyId = keyId;
}
public GPGKey primaryKeyId(String primaryKeyId) {
this.primaryKeyId = primaryKeyId;
return this;
}
/**
* Get primaryKeyId
*
* @return primaryKeyId
*/
@Schema(description = "")
public String getPrimaryKeyId() {
return primaryKeyId;
}
public void setPrimaryKeyId(String primaryKeyId) {
this.primaryKeyId = primaryKeyId;
}
public GPGKey publicKey(String publicKey) {
this.publicKey = publicKey;
return this;
}
/**
* Get publicKey
*
* @return publicKey
*/
@Schema(description = "")
public String getPublicKey() {
return publicKey;
}
public void setPublicKey(String publicKey) {
this.publicKey = publicKey;
}
public GPGKey subkeys(List<GPGKey> subkeys) {
this.subkeys = subkeys;
return this;
}
public GPGKey addSubkeysItem(GPGKey subkeysItem) {
if (this.subkeys == null) {
this.subkeys = new ArrayList<>();
}
this.subkeys.add(subkeysItem);
return this;
}
/**
* Get subkeys
*
* @return subkeys
*/
@Schema(description = "")
public List<GPGKey> getSubkeys() {
return subkeys;
}
public void setSubkeys(List<GPGKey> subkeys) {
this.subkeys = subkeys;
}
public GPGKey verified(Boolean verified) {
this.verified = verified;
return this;
}
/**
* Get verified
*
* @return verified
*/
@Schema(description = "")
public Boolean isVerified() {
return verified;
}
public void setVerified(Boolean verified) {
this.verified = verified;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GPGKey gpGKey = (GPGKey) o;
return Objects.equals(this.canCertify, gpGKey.canCertify)
&& Objects.equals(this.canEncryptComms, gpGKey.canEncryptComms)
&& Objects.equals(this.canEncryptStorage, gpGKey.canEncryptStorage)
&& Objects.equals(this.canSign, gpGKey.canSign)
&& Objects.equals(this.createdAt, gpGKey.createdAt)
&& Objects.equals(this.emails, gpGKey.emails)
&& Objects.equals(this.expiresAt, gpGKey.expiresAt)
&& Objects.equals(this.id, gpGKey.id)
&& Objects.equals(this.keyId, gpGKey.keyId)
&& Objects.equals(this.primaryKeyId, gpGKey.primaryKeyId)
&& Objects.equals(this.publicKey, gpGKey.publicKey)
&& Objects.equals(this.subkeys, gpGKey.subkeys)
&& Objects.equals(this.verified, gpGKey.verified);
}
@Override
public int hashCode() {
return Objects.hash(
canCertify,
canEncryptComms,
canEncryptStorage,
canSign,
createdAt,
emails,
expiresAt,
id,
keyId,
primaryKeyId,
publicKey,
subkeys,
verified);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class GPGKey {\n");
sb.append(" canCertify: ").append(toIndentedString(canCertify)).append("\n");
sb.append(" canEncryptComms: ").append(toIndentedString(canEncryptComms)).append("\n");
sb.append(" canEncryptStorage: ").append(toIndentedString(canEncryptStorage)).append("\n");
sb.append(" canSign: ").append(toIndentedString(canSign)).append("\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" emails: ").append(toIndentedString(emails)).append("\n");
sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" keyId: ").append(toIndentedString(keyId)).append("\n");
sb.append(" primaryKeyId: ").append(toIndentedString(primaryKeyId)).append("\n");
sb.append(" publicKey: ").append(toIndentedString(publicKey)).append("\n");
sb.append(" subkeys: ").append(toIndentedString(subkeys)).append("\n");
sb.append(" verified: ").append(toIndentedString(verified)).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,107 @@
/*
* 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;
/** GPGKeyEmail an email attached to a GPGKey */
@Schema(description = "GPGKeyEmail an email attached to a GPGKey")
public class GPGKeyEmail implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("email")
private String email = null;
@SerializedName("verified")
private Boolean verified = null;
public GPGKeyEmail email(String email) {
this.email = email;
return this;
}
/**
* Get email
*
* @return email
*/
@Schema(description = "")
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public GPGKeyEmail verified(Boolean verified) {
this.verified = verified;
return this;
}
/**
* Get verified
*
* @return verified
*/
@Schema(description = "")
public Boolean isVerified() {
return verified;
}
public void setVerified(Boolean verified) {
this.verified = verified;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GPGKeyEmail gpGKeyEmail = (GPGKeyEmail) o;
return Objects.equals(this.email, gpGKeyEmail.email)
&& Objects.equals(this.verified, gpGKeyEmail.verified);
}
@Override
public int hashCode() {
return Objects.hash(email, verified);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class GPGKeyEmail {\n");
sb.append(" email: ").append(toIndentedString(email)).append("\n");
sb.append(" verified: ").append(toIndentedString(verified)).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,158 @@
/*
* 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;
/** GeneralAPISettings contains global api settings exposed by it */
@Schema(description = "GeneralAPISettings contains global api settings exposed by it")
public class GeneralAPISettings implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("default_git_trees_per_page")
private Long defaultGitTreesPerPage = null;
@SerializedName("default_max_blob_size")
private Long defaultMaxBlobSize = null;
@SerializedName("default_paging_num")
private Long defaultPagingNum = null;
@SerializedName("max_response_items")
private Long maxResponseItems = null;
public GeneralAPISettings defaultGitTreesPerPage(Long defaultGitTreesPerPage) {
this.defaultGitTreesPerPage = defaultGitTreesPerPage;
return this;
}
/**
* Get defaultGitTreesPerPage
*
* @return defaultGitTreesPerPage
*/
@Schema(description = "")
public Long getDefaultGitTreesPerPage() {
return defaultGitTreesPerPage;
}
public void setDefaultGitTreesPerPage(Long defaultGitTreesPerPage) {
this.defaultGitTreesPerPage = defaultGitTreesPerPage;
}
public GeneralAPISettings defaultMaxBlobSize(Long defaultMaxBlobSize) {
this.defaultMaxBlobSize = defaultMaxBlobSize;
return this;
}
/**
* Get defaultMaxBlobSize
*
* @return defaultMaxBlobSize
*/
@Schema(description = "")
public Long getDefaultMaxBlobSize() {
return defaultMaxBlobSize;
}
public void setDefaultMaxBlobSize(Long defaultMaxBlobSize) {
this.defaultMaxBlobSize = defaultMaxBlobSize;
}
public GeneralAPISettings defaultPagingNum(Long defaultPagingNum) {
this.defaultPagingNum = defaultPagingNum;
return this;
}
/**
* Get defaultPagingNum
*
* @return defaultPagingNum
*/
@Schema(description = "")
public Long getDefaultPagingNum() {
return defaultPagingNum;
}
public void setDefaultPagingNum(Long defaultPagingNum) {
this.defaultPagingNum = defaultPagingNum;
}
public GeneralAPISettings maxResponseItems(Long maxResponseItems) {
this.maxResponseItems = maxResponseItems;
return this;
}
/**
* Get maxResponseItems
*
* @return maxResponseItems
*/
@Schema(description = "")
public Long getMaxResponseItems() {
return maxResponseItems;
}
public void setMaxResponseItems(Long maxResponseItems) {
this.maxResponseItems = maxResponseItems;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GeneralAPISettings generalAPISettings = (GeneralAPISettings) o;
return Objects.equals(this.defaultGitTreesPerPage, generalAPISettings.defaultGitTreesPerPage)
&& Objects.equals(this.defaultMaxBlobSize, generalAPISettings.defaultMaxBlobSize)
&& Objects.equals(this.defaultPagingNum, generalAPISettings.defaultPagingNum)
&& Objects.equals(this.maxResponseItems, generalAPISettings.maxResponseItems);
}
@Override
public int hashCode() {
return Objects.hash(
defaultGitTreesPerPage, defaultMaxBlobSize, defaultPagingNum, maxResponseItems);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class GeneralAPISettings {\n");
sb.append(" defaultGitTreesPerPage: ")
.append(toIndentedString(defaultGitTreesPerPage))
.append("\n");
sb.append(" defaultMaxBlobSize: ").append(toIndentedString(defaultMaxBlobSize)).append("\n");
sb.append(" defaultPagingNum: ").append(toIndentedString(defaultPagingNum)).append("\n");
sb.append(" maxResponseItems: ").append(toIndentedString(maxResponseItems)).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,156 @@
/*
* 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;
/** GeneralAttachmentSettings contains global Attachment settings exposed by API */
@Schema(
description = "GeneralAttachmentSettings contains global Attachment settings exposed by API")
public class GeneralAttachmentSettings implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("allowed_types")
private String allowedTypes = null;
@SerializedName("enabled")
private Boolean enabled = null;
@SerializedName("max_files")
private Long maxFiles = null;
@SerializedName("max_size")
private Long maxSize = null;
public GeneralAttachmentSettings allowedTypes(String allowedTypes) {
this.allowedTypes = allowedTypes;
return this;
}
/**
* Get allowedTypes
*
* @return allowedTypes
*/
@Schema(description = "")
public String getAllowedTypes() {
return allowedTypes;
}
public void setAllowedTypes(String allowedTypes) {
this.allowedTypes = allowedTypes;
}
public GeneralAttachmentSettings enabled(Boolean enabled) {
this.enabled = enabled;
return this;
}
/**
* Get enabled
*
* @return enabled
*/
@Schema(description = "")
public Boolean isEnabled() {
return enabled;
}
public void setEnabled(Boolean enabled) {
this.enabled = enabled;
}
public GeneralAttachmentSettings maxFiles(Long maxFiles) {
this.maxFiles = maxFiles;
return this;
}
/**
* Get maxFiles
*
* @return maxFiles
*/
@Schema(description = "")
public Long getMaxFiles() {
return maxFiles;
}
public void setMaxFiles(Long maxFiles) {
this.maxFiles = maxFiles;
}
public GeneralAttachmentSettings maxSize(Long maxSize) {
this.maxSize = maxSize;
return this;
}
/**
* Get maxSize
*
* @return maxSize
*/
@Schema(description = "")
public Long getMaxSize() {
return maxSize;
}
public void setMaxSize(Long maxSize) {
this.maxSize = maxSize;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GeneralAttachmentSettings generalAttachmentSettings = (GeneralAttachmentSettings) o;
return Objects.equals(this.allowedTypes, generalAttachmentSettings.allowedTypes)
&& Objects.equals(this.enabled, generalAttachmentSettings.enabled)
&& Objects.equals(this.maxFiles, generalAttachmentSettings.maxFiles)
&& Objects.equals(this.maxSize, generalAttachmentSettings.maxSize);
}
@Override
public int hashCode() {
return Objects.hash(allowedTypes, enabled, maxFiles, maxSize);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class GeneralAttachmentSettings {\n");
sb.append(" allowedTypes: ").append(toIndentedString(allowedTypes)).append("\n");
sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n");
sb.append(" maxFiles: ").append(toIndentedString(maxFiles)).append("\n");
sb.append(" maxSize: ").append(toIndentedString(maxSize)).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,211 @@
/*
* 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;
/** GeneralRepoSettings contains global repository settings exposed by API */
@Schema(description = "GeneralRepoSettings contains global repository settings exposed by API")
public class GeneralRepoSettings implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("http_git_disabled")
private Boolean httpGitDisabled = null;
@SerializedName("lfs_disabled")
private Boolean lfsDisabled = null;
@SerializedName("migrations_disabled")
private Boolean migrationsDisabled = null;
@SerializedName("mirrors_disabled")
private Boolean mirrorsDisabled = null;
@SerializedName("stars_disabled")
private Boolean starsDisabled = null;
@SerializedName("time_tracking_disabled")
private Boolean timeTrackingDisabled = null;
public GeneralRepoSettings httpGitDisabled(Boolean httpGitDisabled) {
this.httpGitDisabled = httpGitDisabled;
return this;
}
/**
* Get httpGitDisabled
*
* @return httpGitDisabled
*/
@Schema(description = "")
public Boolean isHttpGitDisabled() {
return httpGitDisabled;
}
public void setHttpGitDisabled(Boolean httpGitDisabled) {
this.httpGitDisabled = httpGitDisabled;
}
public GeneralRepoSettings lfsDisabled(Boolean lfsDisabled) {
this.lfsDisabled = lfsDisabled;
return this;
}
/**
* Get lfsDisabled
*
* @return lfsDisabled
*/
@Schema(description = "")
public Boolean isLfsDisabled() {
return lfsDisabled;
}
public void setLfsDisabled(Boolean lfsDisabled) {
this.lfsDisabled = lfsDisabled;
}
public GeneralRepoSettings migrationsDisabled(Boolean migrationsDisabled) {
this.migrationsDisabled = migrationsDisabled;
return this;
}
/**
* Get migrationsDisabled
*
* @return migrationsDisabled
*/
@Schema(description = "")
public Boolean isMigrationsDisabled() {
return migrationsDisabled;
}
public void setMigrationsDisabled(Boolean migrationsDisabled) {
this.migrationsDisabled = migrationsDisabled;
}
public GeneralRepoSettings mirrorsDisabled(Boolean mirrorsDisabled) {
this.mirrorsDisabled = mirrorsDisabled;
return this;
}
/**
* Get mirrorsDisabled
*
* @return mirrorsDisabled
*/
@Schema(description = "")
public Boolean isMirrorsDisabled() {
return mirrorsDisabled;
}
public void setMirrorsDisabled(Boolean mirrorsDisabled) {
this.mirrorsDisabled = mirrorsDisabled;
}
public GeneralRepoSettings starsDisabled(Boolean starsDisabled) {
this.starsDisabled = starsDisabled;
return this;
}
/**
* Get starsDisabled
*
* @return starsDisabled
*/
@Schema(description = "")
public Boolean isStarsDisabled() {
return starsDisabled;
}
public void setStarsDisabled(Boolean starsDisabled) {
this.starsDisabled = starsDisabled;
}
public GeneralRepoSettings timeTrackingDisabled(Boolean timeTrackingDisabled) {
this.timeTrackingDisabled = timeTrackingDisabled;
return this;
}
/**
* Get timeTrackingDisabled
*
* @return timeTrackingDisabled
*/
@Schema(description = "")
public Boolean isTimeTrackingDisabled() {
return timeTrackingDisabled;
}
public void setTimeTrackingDisabled(Boolean timeTrackingDisabled) {
this.timeTrackingDisabled = timeTrackingDisabled;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GeneralRepoSettings generalRepoSettings = (GeneralRepoSettings) o;
return Objects.equals(this.httpGitDisabled, generalRepoSettings.httpGitDisabled)
&& Objects.equals(this.lfsDisabled, generalRepoSettings.lfsDisabled)
&& Objects.equals(this.migrationsDisabled, generalRepoSettings.migrationsDisabled)
&& Objects.equals(this.mirrorsDisabled, generalRepoSettings.mirrorsDisabled)
&& Objects.equals(this.starsDisabled, generalRepoSettings.starsDisabled)
&& Objects.equals(this.timeTrackingDisabled, generalRepoSettings.timeTrackingDisabled);
}
@Override
public int hashCode() {
return Objects.hash(
httpGitDisabled,
lfsDisabled,
migrationsDisabled,
mirrorsDisabled,
starsDisabled,
timeTrackingDisabled);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class GeneralRepoSettings {\n");
sb.append(" httpGitDisabled: ").append(toIndentedString(httpGitDisabled)).append("\n");
sb.append(" lfsDisabled: ").append(toIndentedString(lfsDisabled)).append("\n");
sb.append(" migrationsDisabled: ").append(toIndentedString(migrationsDisabled)).append("\n");
sb.append(" mirrorsDisabled: ").append(toIndentedString(mirrorsDisabled)).append("\n");
sb.append(" starsDisabled: ").append(toIndentedString(starsDisabled)).append("\n");
sb.append(" timeTrackingDisabled: ")
.append(toIndentedString(timeTrackingDisabled))
.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,149 @@
/*
* 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.ArrayList;
import java.util.List;
import java.util.Objects;
/** GeneralUISettings contains global ui settings exposed by API */
@Schema(description = "GeneralUISettings contains global ui settings exposed by API")
public class GeneralUISettings implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("allowed_reactions")
private List<String> allowedReactions = null;
@SerializedName("custom_emojis")
private List<String> customEmojis = null;
@SerializedName("default_theme")
private String defaultTheme = null;
public GeneralUISettings allowedReactions(List<String> allowedReactions) {
this.allowedReactions = allowedReactions;
return this;
}
public GeneralUISettings addAllowedReactionsItem(String allowedReactionsItem) {
if (this.allowedReactions == null) {
this.allowedReactions = new ArrayList<>();
}
this.allowedReactions.add(allowedReactionsItem);
return this;
}
/**
* Get allowedReactions
*
* @return allowedReactions
*/
@Schema(description = "")
public List<String> getAllowedReactions() {
return allowedReactions;
}
public void setAllowedReactions(List<String> allowedReactions) {
this.allowedReactions = allowedReactions;
}
public GeneralUISettings customEmojis(List<String> customEmojis) {
this.customEmojis = customEmojis;
return this;
}
public GeneralUISettings addCustomEmojisItem(String customEmojisItem) {
if (this.customEmojis == null) {
this.customEmojis = new ArrayList<>();
}
this.customEmojis.add(customEmojisItem);
return this;
}
/**
* Get customEmojis
*
* @return customEmojis
*/
@Schema(description = "")
public List<String> getCustomEmojis() {
return customEmojis;
}
public void setCustomEmojis(List<String> customEmojis) {
this.customEmojis = customEmojis;
}
public GeneralUISettings defaultTheme(String defaultTheme) {
this.defaultTheme = defaultTheme;
return this;
}
/**
* Get defaultTheme
*
* @return defaultTheme
*/
@Schema(description = "")
public String getDefaultTheme() {
return defaultTheme;
}
public void setDefaultTheme(String defaultTheme) {
this.defaultTheme = defaultTheme;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GeneralUISettings generalUISettings = (GeneralUISettings) o;
return Objects.equals(this.allowedReactions, generalUISettings.allowedReactions)
&& Objects.equals(this.customEmojis, generalUISettings.customEmojis)
&& Objects.equals(this.defaultTheme, generalUISettings.defaultTheme);
}
@Override
public int hashCode() {
return Objects.hash(allowedReactions, customEmojis, defaultTheme);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class GeneralUISettings {\n");
sb.append(" allowedReactions: ").append(toIndentedString(allowedReactions)).append("\n");
sb.append(" customEmojis: ").append(toIndentedString(customEmojis)).append("\n");
sb.append(" defaultTheme: ").append(toIndentedString(defaultTheme)).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 ");
}
}

Some files were not shown because too many files have changed in this diff Show More