> getHeaders() {
53 | return headers;
54 | }
55 |
56 | public T getData() {
57 | return data;
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/Configuration.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.16.0-SNAPSHOT
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea;
15 |
16 |
17 | public class Configuration {
18 | private static ApiClient defaultApiClient = new ApiClient();
19 |
20 | /**
21 | * Get the default API client, which would be used when creating API
22 | * instances without providing an API client.
23 | *
24 | * @return Default API client
25 | */
26 | public static ApiClient getDefaultApiClient() {
27 | return defaultApiClient;
28 | }
29 |
30 | /**
31 | * Set the default API client, which would be used when creating API
32 | * instances without providing an API client.
33 | *
34 | * @param apiClient API client
35 | */
36 | public static void setDefaultApiClient(ApiClient apiClient) {
37 | defaultApiClient = apiClient;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/GzipRequestInterceptor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.16.0-SNAPSHOT
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea;
15 |
16 | import com.squareup.okhttp.*;
17 | import okio.Buffer;
18 | import okio.BufferedSink;
19 | import okio.GzipSink;
20 | import okio.Okio;
21 |
22 | import java.io.IOException;
23 |
24 | /**
25 | * Encodes request bodies using gzip.
26 | *
27 | * Taken from https://github.com/square/okhttp/issues/350
28 | */
29 | class GzipRequestInterceptor implements Interceptor {
30 | @Override public Response intercept(Chain chain) throws IOException {
31 | Request originalRequest = chain.request();
32 | if (originalRequest.body() == null || originalRequest.header("Content-Encoding") != null) {
33 | return chain.proceed(originalRequest);
34 | }
35 |
36 | Request compressedRequest = originalRequest.newBuilder()
37 | .header("Content-Encoding", "gzip")
38 | .method(originalRequest.method(), forceContentLength(gzip(originalRequest.body())))
39 | .build();
40 | return chain.proceed(compressedRequest);
41 | }
42 |
43 | private RequestBody forceContentLength(final RequestBody requestBody) throws IOException {
44 | final Buffer buffer = new Buffer();
45 | requestBody.writeTo(buffer);
46 | return new RequestBody() {
47 | @Override
48 | public MediaType contentType() {
49 | return requestBody.contentType();
50 | }
51 |
52 | @Override
53 | public long contentLength() {
54 | return buffer.size();
55 | }
56 |
57 | @Override
58 | public void writeTo(BufferedSink sink) throws IOException {
59 | sink.write(buffer.snapshot());
60 | }
61 | };
62 | }
63 |
64 | private RequestBody gzip(final RequestBody body) {
65 | return new RequestBody() {
66 | @Override public MediaType contentType() {
67 | return body.contentType();
68 | }
69 |
70 | @Override public long contentLength() {
71 | return -1; // We don't know the compressed length in advance!
72 | }
73 |
74 | @Override public void writeTo(BufferedSink sink) throws IOException {
75 | BufferedSink gzipSink = Okio.buffer(new GzipSink(sink));
76 | body.writeTo(gzipSink);
77 | gzipSink.close();
78 | }
79 | };
80 | }
81 | }
--------------------------------------------------------------------------------
/src/main/java/io/gitea/Pair.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.16.0-SNAPSHOT
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea;
15 |
16 |
17 | public class Pair {
18 | private String name = "";
19 | private String value = "";
20 |
21 | public Pair (String name, String value) {
22 | setName(name);
23 | setValue(value);
24 | }
25 |
26 | private void setName(String name) {
27 | if (!isValidString(name)) return;
28 |
29 | this.name = name;
30 | }
31 |
32 | private void setValue(String value) {
33 | if (!isValidString(value)) return;
34 |
35 | this.value = value;
36 | }
37 |
38 | public String getName() {
39 | return this.name;
40 | }
41 |
42 | public String getValue() {
43 | return this.value;
44 | }
45 |
46 | private boolean isValidString(String arg) {
47 | if (arg == null) return false;
48 | if (arg.trim().isEmpty()) return false;
49 |
50 | return true;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/ProgressRequestBody.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.16.0-SNAPSHOT
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea;
15 |
16 | import com.squareup.okhttp.MediaType;
17 | import com.squareup.okhttp.RequestBody;
18 |
19 | import java.io.IOException;
20 |
21 | import okio.Buffer;
22 | import okio.BufferedSink;
23 | import okio.ForwardingSink;
24 | import okio.Okio;
25 | import okio.Sink;
26 |
27 | public class ProgressRequestBody extends RequestBody {
28 |
29 | public interface ProgressRequestListener {
30 | void onRequestProgress(long bytesWritten, long contentLength, boolean done);
31 | }
32 |
33 | private final RequestBody requestBody;
34 |
35 | private final ProgressRequestListener progressListener;
36 |
37 | public ProgressRequestBody(RequestBody requestBody, ProgressRequestListener progressListener) {
38 | this.requestBody = requestBody;
39 | this.progressListener = progressListener;
40 | }
41 |
42 | @Override
43 | public MediaType contentType() {
44 | return requestBody.contentType();
45 | }
46 |
47 | @Override
48 | public long contentLength() throws IOException {
49 | return requestBody.contentLength();
50 | }
51 |
52 | @Override
53 | public void writeTo(BufferedSink sink) throws IOException {
54 | BufferedSink bufferedSink = Okio.buffer(sink(sink));
55 | requestBody.writeTo(bufferedSink);
56 | bufferedSink.flush();
57 | }
58 |
59 | private Sink sink(Sink sink) {
60 | return new ForwardingSink(sink) {
61 |
62 | long bytesWritten = 0L;
63 | long contentLength = 0L;
64 |
65 | @Override
66 | public void write(Buffer source, long byteCount) throws IOException {
67 | super.write(source, byteCount);
68 | if (contentLength == 0) {
69 | contentLength = contentLength();
70 | }
71 |
72 | bytesWritten += byteCount;
73 | progressListener.onRequestProgress(bytesWritten, contentLength, bytesWritten == contentLength);
74 | }
75 | };
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/ProgressResponseBody.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.16.0-SNAPSHOT
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea;
15 |
16 | import com.squareup.okhttp.MediaType;
17 | import com.squareup.okhttp.ResponseBody;
18 |
19 | import java.io.IOException;
20 |
21 | import okio.Buffer;
22 | import okio.BufferedSource;
23 | import okio.ForwardingSource;
24 | import okio.Okio;
25 | import okio.Source;
26 |
27 | public class ProgressResponseBody extends ResponseBody {
28 |
29 | public interface ProgressListener {
30 | void update(long bytesRead, long contentLength, boolean done);
31 | }
32 |
33 | private final ResponseBody responseBody;
34 | private final ProgressListener progressListener;
35 | private BufferedSource bufferedSource;
36 |
37 | public ProgressResponseBody(ResponseBody responseBody, ProgressListener progressListener) {
38 | this.responseBody = responseBody;
39 | this.progressListener = progressListener;
40 | }
41 |
42 | @Override
43 | public MediaType contentType() {
44 | return responseBody.contentType();
45 | }
46 |
47 | @Override
48 | public long contentLength() throws IOException {
49 | return responseBody.contentLength();
50 | }
51 |
52 | @Override
53 | public BufferedSource source() throws IOException {
54 | if (bufferedSource == null) {
55 | bufferedSource = Okio.buffer(source(responseBody.source()));
56 | }
57 | return bufferedSource;
58 | }
59 |
60 | private Source source(Source source) {
61 | return new ForwardingSource(source) {
62 | long totalBytesRead = 0L;
63 |
64 | @Override
65 | public long read(Buffer sink, long byteCount) throws IOException {
66 | long bytesRead = super.read(sink, byteCount);
67 | // read() returns the number of bytes read, or -1 if this source is exhausted.
68 | totalBytesRead += bytesRead != -1 ? bytesRead : 0;
69 | progressListener.update(totalBytesRead, responseBody.contentLength(), bytesRead == -1);
70 | return bytesRead;
71 | }
72 | };
73 | }
74 | }
75 |
76 |
77 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/StringUtil.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.16.0-SNAPSHOT
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea;
15 |
16 |
17 | public class StringUtil {
18 | /**
19 | * Check if the given array contains the given value (with case-insensitive comparison).
20 | *
21 | * @param array The array
22 | * @param value The value to search
23 | * @return true if the array contains the value
24 | */
25 | public static boolean containsIgnoreCase(String[] array, String value) {
26 | for (String str : array) {
27 | if (value == null && str == null) return true;
28 | if (value != null && value.equalsIgnoreCase(str)) return true;
29 | }
30 | return false;
31 | }
32 |
33 | /**
34 | * Join an array of strings with the given separator.
35 | *
36 | * Note: This might be replaced by utility method from commons-lang or guava someday
37 | * if one of those libraries is added as dependency.
38 | *
39 | *
40 | * @param array The array of strings
41 | * @param separator The separator
42 | * @return the resulting string
43 | */
44 | public static String join(String[] array, String separator) {
45 | int len = array.length;
46 | if (len == 0) return "";
47 |
48 | StringBuilder out = new StringBuilder();
49 | out.append(array[0]);
50 | for (int i = 1; i < len; i++) {
51 | out.append(separator).append(array[i]);
52 | }
53 | return out.toString();
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/auth/ApiKeyAuth.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.16.0-SNAPSHOT
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.auth;
15 |
16 | import io.gitea.Pair;
17 |
18 | import java.util.Map;
19 | import java.util.List;
20 |
21 |
22 | public class ApiKeyAuth implements Authentication {
23 | private final String location;
24 | private final String paramName;
25 |
26 | private String apiKey;
27 | private String apiKeyPrefix;
28 |
29 | public ApiKeyAuth(String location, String paramName) {
30 | this.location = location;
31 | this.paramName = paramName;
32 | }
33 |
34 | public String getLocation() {
35 | return location;
36 | }
37 |
38 | public String getParamName() {
39 | return paramName;
40 | }
41 |
42 | public String getApiKey() {
43 | return apiKey;
44 | }
45 |
46 | public void setApiKey(String apiKey) {
47 | this.apiKey = apiKey;
48 | }
49 |
50 | public String getApiKeyPrefix() {
51 | return apiKeyPrefix;
52 | }
53 |
54 | public void setApiKeyPrefix(String apiKeyPrefix) {
55 | this.apiKeyPrefix = apiKeyPrefix;
56 | }
57 |
58 | @Override
59 | public void applyToParams(List queryParams, Map headerParams) {
60 | if (apiKey == null) {
61 | return;
62 | }
63 | String value;
64 | if (apiKeyPrefix != null) {
65 | value = apiKeyPrefix + " " + apiKey;
66 | } else {
67 | value = apiKey;
68 | }
69 | if ("query".equals(location)) {
70 | queryParams.add(new Pair(paramName, value));
71 | } else if ("header".equals(location)) {
72 | headerParams.put(paramName, value);
73 | }
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/auth/Authentication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.16.0-SNAPSHOT
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.auth;
15 |
16 | import io.gitea.Pair;
17 |
18 | import java.util.Map;
19 | import java.util.List;
20 |
21 | public interface Authentication {
22 | /**
23 | * Apply authentication settings to header and query params.
24 | *
25 | * @param queryParams List of query parameters
26 | * @param headerParams Map of header parameters
27 | */
28 | void applyToParams(List queryParams, Map headerParams);
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/auth/HttpBasicAuth.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.16.0-SNAPSHOT
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.auth;
15 |
16 | import io.gitea.Pair;
17 |
18 | import com.squareup.okhttp.Credentials;
19 |
20 | import java.util.Map;
21 | import java.util.List;
22 |
23 | import java.io.UnsupportedEncodingException;
24 |
25 | public class HttpBasicAuth implements Authentication {
26 | private String username;
27 | private String password;
28 |
29 | public String getUsername() {
30 | return username;
31 | }
32 |
33 | public void setUsername(String username) {
34 | this.username = username;
35 | }
36 |
37 | public String getPassword() {
38 | return password;
39 | }
40 |
41 | public void setPassword(String password) {
42 | this.password = password;
43 | }
44 |
45 | @Override
46 | public void applyToParams(List queryParams, Map headerParams) {
47 | if (username == null && password == null) {
48 | return;
49 | }
50 | headerParams.put("Authorization", Credentials.basic(
51 | username == null ? "" : username,
52 | password == null ? "" : password));
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/auth/OAuth.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.16.0-SNAPSHOT
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.auth;
15 |
16 | import io.gitea.Pair;
17 |
18 | import java.util.Map;
19 | import java.util.List;
20 |
21 |
22 | public class OAuth implements Authentication {
23 | private String accessToken;
24 |
25 | public String getAccessToken() {
26 | return accessToken;
27 | }
28 |
29 | public void setAccessToken(String accessToken) {
30 | this.accessToken = accessToken;
31 | }
32 |
33 | @Override
34 | public void applyToParams(List queryParams, Map headerParams) {
35 | if (accessToken != null) {
36 | headerParams.put("Authorization", "Bearer " + accessToken);
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/auth/OAuthFlow.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.16.0-SNAPSHOT
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.auth;
15 |
16 | public enum OAuthFlow {
17 | accessCode, implicit, password, application
18 | }
19 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/model/APIError.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.18.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 |
27 | /**
28 | * APIError is an api error with a message
29 | */
30 | @ApiModel(description = "APIError is an api error with a message")
31 |
32 | public class APIError {
33 | @SerializedName("message")
34 | private String message = null;
35 |
36 | @SerializedName("url")
37 | private String url = null;
38 |
39 | public APIError message(String message) {
40 | this.message = message;
41 | return this;
42 | }
43 |
44 | /**
45 | * Get message
46 | * @return message
47 | **/
48 | @ApiModelProperty(value = "")
49 | public String getMessage() {
50 | return message;
51 | }
52 |
53 | public void setMessage(String message) {
54 | this.message = message;
55 | }
56 |
57 | public APIError url(String url) {
58 | this.url = url;
59 | return this;
60 | }
61 |
62 | /**
63 | * Get url
64 | * @return url
65 | **/
66 | @ApiModelProperty(value = "")
67 | public String getUrl() {
68 | return url;
69 | }
70 |
71 | public void setUrl(String url) {
72 | this.url = url;
73 | }
74 |
75 |
76 | @Override
77 | public boolean equals(java.lang.Object o) {
78 | if (this == o) {
79 | return true;
80 | }
81 | if (o == null || getClass() != o.getClass()) {
82 | return false;
83 | }
84 | APIError apIError = (APIError) o;
85 | return Objects.equals(this.message, apIError.message) &&
86 | Objects.equals(this.url, apIError.url);
87 | }
88 |
89 | @Override
90 | public int hashCode() {
91 | return Objects.hash(message, url);
92 | }
93 |
94 |
95 | @Override
96 | public String toString() {
97 | StringBuilder sb = new StringBuilder();
98 | sb.append("class APIError {\n");
99 |
100 | sb.append(" message: ").append(toIndentedString(message)).append("\n");
101 | sb.append(" url: ").append(toIndentedString(url)).append("\n");
102 | sb.append("}");
103 | return sb.toString();
104 | }
105 |
106 | /**
107 | * Convert the given object to string with each line indented by 4 spaces
108 | * (except the first line).
109 | */
110 | private String toIndentedString(java.lang.Object o) {
111 | if (o == null) {
112 | return "null";
113 | }
114 | return o.toString().replace("\n", "\n ");
115 | }
116 |
117 | }
118 |
119 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/model/ActivityPub.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.18.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 |
27 | /**
28 | * ActivityPub type
29 | */
30 | @ApiModel(description = "ActivityPub type")
31 |
32 | public class ActivityPub {
33 | @SerializedName("@context")
34 | private String context = null;
35 |
36 | public ActivityPub context(String context) {
37 | this.context = context;
38 | return this;
39 | }
40 |
41 | /**
42 | * Get context
43 | * @return context
44 | **/
45 | @ApiModelProperty(value = "")
46 | public String getContext() {
47 | return context;
48 | }
49 |
50 | public void setContext(String context) {
51 | this.context = context;
52 | }
53 |
54 |
55 | @Override
56 | public boolean equals(java.lang.Object o) {
57 | if (this == o) {
58 | return true;
59 | }
60 | if (o == null || getClass() != o.getClass()) {
61 | return false;
62 | }
63 | ActivityPub activityPub = (ActivityPub) o;
64 | return Objects.equals(this.context, activityPub.context);
65 | }
66 |
67 | @Override
68 | public int hashCode() {
69 | return Objects.hash(context);
70 | }
71 |
72 |
73 | @Override
74 | public String toString() {
75 | StringBuilder sb = new StringBuilder();
76 | sb.append("class ActivityPub {\n");
77 |
78 | sb.append(" context: ").append(toIndentedString(context)).append("\n");
79 | sb.append("}");
80 | return sb.toString();
81 | }
82 |
83 | /**
84 | * Convert the given object to string with each line indented by 4 spaces
85 | * (except the first line).
86 | */
87 | private String toIndentedString(java.lang.Object o) {
88 | if (o == null) {
89 | return "null";
90 | }
91 | return o.toString().replace("\n", "\n ");
92 | }
93 |
94 | }
95 |
96 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/model/AddCollaboratorOption.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.18.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 |
27 | /**
28 | * AddCollaboratorOption options when adding a user as a collaborator of a repository
29 | */
30 | @ApiModel(description = "AddCollaboratorOption options when adding a user as a collaborator of a repository")
31 |
32 | public class AddCollaboratorOption {
33 | @SerializedName("permission")
34 | private String permission = null;
35 |
36 | public AddCollaboratorOption permission(String permission) {
37 | this.permission = permission;
38 | return this;
39 | }
40 |
41 | /**
42 | * Get permission
43 | * @return permission
44 | **/
45 | @ApiModelProperty(value = "")
46 | public String getPermission() {
47 | return permission;
48 | }
49 |
50 | public void setPermission(String permission) {
51 | this.permission = permission;
52 | }
53 |
54 |
55 | @Override
56 | public boolean equals(java.lang.Object o) {
57 | if (this == o) {
58 | return true;
59 | }
60 | if (o == null || getClass() != o.getClass()) {
61 | return false;
62 | }
63 | AddCollaboratorOption addCollaboratorOption = (AddCollaboratorOption) o;
64 | return Objects.equals(this.permission, addCollaboratorOption.permission);
65 | }
66 |
67 | @Override
68 | public int hashCode() {
69 | return Objects.hash(permission);
70 | }
71 |
72 |
73 | @Override
74 | public String toString() {
75 | StringBuilder sb = new StringBuilder();
76 | sb.append("class AddCollaboratorOption {\n");
77 |
78 | sb.append(" permission: ").append(toIndentedString(permission)).append("\n");
79 | sb.append("}");
80 | return sb.toString();
81 | }
82 |
83 | /**
84 | * Convert the given object to string with each line indented by 4 spaces
85 | * (except the first line).
86 | */
87 | private String toIndentedString(java.lang.Object o) {
88 | if (o == null) {
89 | return "null";
90 | }
91 | return o.toString().replace("\n", "\n ");
92 | }
93 |
94 | }
95 |
96 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/model/CommitAffectedFiles.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.18.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 |
27 | /**
28 | * CommitAffectedFiles store information about files affected by the commit
29 | */
30 | @ApiModel(description = "CommitAffectedFiles store information about files affected by the commit")
31 |
32 | public class CommitAffectedFiles {
33 | @SerializedName("filename")
34 | private String filename = null;
35 |
36 | public CommitAffectedFiles filename(String filename) {
37 | this.filename = filename;
38 | return this;
39 | }
40 |
41 | /**
42 | * Get filename
43 | * @return filename
44 | **/
45 | @ApiModelProperty(value = "")
46 | public String getFilename() {
47 | return filename;
48 | }
49 |
50 | public void setFilename(String filename) {
51 | this.filename = filename;
52 | }
53 |
54 |
55 | @Override
56 | public boolean equals(java.lang.Object o) {
57 | if (this == o) {
58 | return true;
59 | }
60 | if (o == null || getClass() != o.getClass()) {
61 | return false;
62 | }
63 | CommitAffectedFiles commitAffectedFiles = (CommitAffectedFiles) o;
64 | return Objects.equals(this.filename, commitAffectedFiles.filename);
65 | }
66 |
67 | @Override
68 | public int hashCode() {
69 | return Objects.hash(filename);
70 | }
71 |
72 |
73 | @Override
74 | public String toString() {
75 | StringBuilder sb = new StringBuilder();
76 | sb.append("class CommitAffectedFiles {\n");
77 |
78 | sb.append(" filename: ").append(toIndentedString(filename)).append("\n");
79 | sb.append("}");
80 | return sb.toString();
81 | }
82 |
83 | /**
84 | * Convert the given object to string with each line indented by 4 spaces
85 | * (except the first line).
86 | */
87 | private String toIndentedString(java.lang.Object o) {
88 | if (o == null) {
89 | return "null";
90 | }
91 | return o.toString().replace("\n", "\n ");
92 | }
93 |
94 | }
95 |
96 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/model/CreateAccessTokenOption.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.18.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 |
27 | /**
28 | * CreateAccessTokenOption options when create access token
29 | */
30 | @ApiModel(description = "CreateAccessTokenOption options when create access token")
31 |
32 | public class CreateAccessTokenOption {
33 | @SerializedName("name")
34 | private String name = null;
35 |
36 | public CreateAccessTokenOption name(String name) {
37 | this.name = name;
38 | return this;
39 | }
40 |
41 | /**
42 | * Get name
43 | * @return name
44 | **/
45 | @ApiModelProperty(value = "")
46 | public String getName() {
47 | return name;
48 | }
49 |
50 | public void setName(String name) {
51 | this.name = name;
52 | }
53 |
54 |
55 | @Override
56 | public boolean equals(java.lang.Object o) {
57 | if (this == o) {
58 | return true;
59 | }
60 | if (o == null || getClass() != o.getClass()) {
61 | return false;
62 | }
63 | CreateAccessTokenOption createAccessTokenOption = (CreateAccessTokenOption) o;
64 | return Objects.equals(this.name, createAccessTokenOption.name);
65 | }
66 |
67 | @Override
68 | public int hashCode() {
69 | return Objects.hash(name);
70 | }
71 |
72 |
73 | @Override
74 | public String toString() {
75 | StringBuilder sb = new StringBuilder();
76 | sb.append("class CreateAccessTokenOption {\n");
77 |
78 | sb.append(" name: ").append(toIndentedString(name)).append("\n");
79 | sb.append("}");
80 | return sb.toString();
81 | }
82 |
83 | /**
84 | * Convert the given object to string with each line indented by 4 spaces
85 | * (except the first line).
86 | */
87 | private String toIndentedString(java.lang.Object o) {
88 | if (o == null) {
89 | return "null";
90 | }
91 | return o.toString().replace("\n", "\n ");
92 | }
93 |
94 | }
95 |
96 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/model/CreateEmailOption.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.18.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 | import java.util.ArrayList;
27 | import java.util.List;
28 |
29 | /**
30 | * CreateEmailOption options when creating email addresses
31 | */
32 | @ApiModel(description = "CreateEmailOption options when creating email addresses")
33 |
34 | public class CreateEmailOption {
35 | @SerializedName("emails")
36 | private List emails = null;
37 |
38 | public CreateEmailOption emails(List emails) {
39 | this.emails = emails;
40 | return this;
41 | }
42 |
43 | public CreateEmailOption addEmailsItem(String emailsItem) {
44 | if (this.emails == null) {
45 | this.emails = new ArrayList();
46 | }
47 | this.emails.add(emailsItem);
48 | return this;
49 | }
50 |
51 | /**
52 | * email addresses to add
53 | * @return emails
54 | **/
55 | @ApiModelProperty(value = "email addresses to add")
56 | public List getEmails() {
57 | return emails;
58 | }
59 |
60 | public void setEmails(List emails) {
61 | this.emails = emails;
62 | }
63 |
64 |
65 | @Override
66 | public boolean equals(java.lang.Object o) {
67 | if (this == o) {
68 | return true;
69 | }
70 | if (o == null || getClass() != o.getClass()) {
71 | return false;
72 | }
73 | CreateEmailOption createEmailOption = (CreateEmailOption) o;
74 | return Objects.equals(this.emails, createEmailOption.emails);
75 | }
76 |
77 | @Override
78 | public int hashCode() {
79 | return Objects.hash(emails);
80 | }
81 |
82 |
83 | @Override
84 | public String toString() {
85 | StringBuilder sb = new StringBuilder();
86 | sb.append("class CreateEmailOption {\n");
87 |
88 | sb.append(" emails: ").append(toIndentedString(emails)).append("\n");
89 | sb.append("}");
90 | return sb.toString();
91 | }
92 |
93 | /**
94 | * Convert the given object to string with each line indented by 4 spaces
95 | * (except the first line).
96 | */
97 | private String toIndentedString(java.lang.Object o) {
98 | if (o == null) {
99 | return "null";
100 | }
101 | return o.toString().replace("\n", "\n ");
102 | }
103 |
104 | }
105 |
106 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/model/CreateHookOptionConfig.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.18.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import io.swagger.annotations.ApiModel;
19 | import java.util.HashMap;
20 | import java.util.Map;
21 |
22 | /**
23 | * CreateHookOptionConfig has all config options in it required are \"content_type\" and \"url\" Required
24 | */
25 | @ApiModel(description = "CreateHookOptionConfig has all config options in it required are \"content_type\" and \"url\" Required")
26 |
27 | public class CreateHookOptionConfig extends HashMap {
28 |
29 | @Override
30 | public boolean equals(java.lang.Object o) {
31 | if (this == o) {
32 | return true;
33 | }
34 | if (o == null || getClass() != o.getClass()) {
35 | return false;
36 | }
37 | return super.equals(o);
38 | }
39 |
40 | @Override
41 | public int hashCode() {
42 | return Objects.hash(super.hashCode());
43 | }
44 |
45 |
46 | @Override
47 | public String toString() {
48 | StringBuilder sb = new StringBuilder();
49 | sb.append("class CreateHookOptionConfig {\n");
50 | sb.append(" ").append(toIndentedString(super.toString())).append("\n");
51 | sb.append("}");
52 | return sb.toString();
53 | }
54 |
55 | /**
56 | * Convert the given object to string with each line indented by 4 spaces
57 | * (except the first line).
58 | */
59 | private String toIndentedString(java.lang.Object o) {
60 | if (o == null) {
61 | return "null";
62 | }
63 | return o.toString().replace("\n", "\n ");
64 | }
65 |
66 | }
67 |
68 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/model/CreateIssueCommentOption.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.18.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 |
27 | /**
28 | * CreateIssueCommentOption options for creating a comment on an issue
29 | */
30 | @ApiModel(description = "CreateIssueCommentOption options for creating a comment on an issue")
31 |
32 | public class CreateIssueCommentOption {
33 | @SerializedName("body")
34 | private String body = null;
35 |
36 | public CreateIssueCommentOption body(String body) {
37 | this.body = body;
38 | return this;
39 | }
40 |
41 | /**
42 | * Get body
43 | * @return body
44 | **/
45 | @ApiModelProperty(required = true, value = "")
46 | public String getBody() {
47 | return body;
48 | }
49 |
50 | public void setBody(String body) {
51 | this.body = body;
52 | }
53 |
54 |
55 | @Override
56 | public boolean equals(java.lang.Object o) {
57 | if (this == o) {
58 | return true;
59 | }
60 | if (o == null || getClass() != o.getClass()) {
61 | return false;
62 | }
63 | CreateIssueCommentOption createIssueCommentOption = (CreateIssueCommentOption) o;
64 | return Objects.equals(this.body, createIssueCommentOption.body);
65 | }
66 |
67 | @Override
68 | public int hashCode() {
69 | return Objects.hash(body);
70 | }
71 |
72 |
73 | @Override
74 | public String toString() {
75 | StringBuilder sb = new StringBuilder();
76 | sb.append("class CreateIssueCommentOption {\n");
77 |
78 | sb.append(" body: ").append(toIndentedString(body)).append("\n");
79 | sb.append("}");
80 | return sb.toString();
81 | }
82 |
83 | /**
84 | * Convert the given object to string with each line indented by 4 spaces
85 | * (except the first line).
86 | */
87 | private String toIndentedString(java.lang.Object o) {
88 | if (o == null) {
89 | return "null";
90 | }
91 | return o.toString().replace("\n", "\n ");
92 | }
93 |
94 | }
95 |
96 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/model/DeleteEmailOption.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.18.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 | import java.util.ArrayList;
27 | import java.util.List;
28 |
29 | /**
30 | * DeleteEmailOption options when deleting email addresses
31 | */
32 | @ApiModel(description = "DeleteEmailOption options when deleting email addresses")
33 |
34 | public class DeleteEmailOption {
35 | @SerializedName("emails")
36 | private List emails = null;
37 |
38 | public DeleteEmailOption emails(List emails) {
39 | this.emails = emails;
40 | return this;
41 | }
42 |
43 | public DeleteEmailOption addEmailsItem(String emailsItem) {
44 | if (this.emails == null) {
45 | this.emails = new ArrayList();
46 | }
47 | this.emails.add(emailsItem);
48 | return this;
49 | }
50 |
51 | /**
52 | * email addresses to delete
53 | * @return emails
54 | **/
55 | @ApiModelProperty(value = "email addresses to delete")
56 | public List getEmails() {
57 | return emails;
58 | }
59 |
60 | public void setEmails(List emails) {
61 | this.emails = emails;
62 | }
63 |
64 |
65 | @Override
66 | public boolean equals(java.lang.Object o) {
67 | if (this == o) {
68 | return true;
69 | }
70 | if (o == null || getClass() != o.getClass()) {
71 | return false;
72 | }
73 | DeleteEmailOption deleteEmailOption = (DeleteEmailOption) o;
74 | return Objects.equals(this.emails, deleteEmailOption.emails);
75 | }
76 |
77 | @Override
78 | public int hashCode() {
79 | return Objects.hash(emails);
80 | }
81 |
82 |
83 | @Override
84 | public String toString() {
85 | StringBuilder sb = new StringBuilder();
86 | sb.append("class DeleteEmailOption {\n");
87 |
88 | sb.append(" emails: ").append(toIndentedString(emails)).append("\n");
89 | sb.append("}");
90 | return sb.toString();
91 | }
92 |
93 | /**
94 | * Convert the given object to string with each line indented by 4 spaces
95 | * (except the first line).
96 | */
97 | private String toIndentedString(java.lang.Object o) {
98 | if (o == null) {
99 | return "null";
100 | }
101 | return o.toString().replace("\n", "\n ");
102 | }
103 |
104 | }
105 |
106 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/model/EditAttachmentOptions.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.18.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 |
27 | /**
28 | * EditAttachmentOptions options for editing attachments
29 | */
30 | @ApiModel(description = "EditAttachmentOptions options for editing attachments")
31 |
32 | public class EditAttachmentOptions {
33 | @SerializedName("name")
34 | private String name = null;
35 |
36 | public EditAttachmentOptions name(String name) {
37 | this.name = name;
38 | return this;
39 | }
40 |
41 | /**
42 | * Get name
43 | * @return name
44 | **/
45 | @ApiModelProperty(value = "")
46 | public String getName() {
47 | return name;
48 | }
49 |
50 | public void setName(String name) {
51 | this.name = name;
52 | }
53 |
54 |
55 | @Override
56 | public boolean equals(java.lang.Object o) {
57 | if (this == o) {
58 | return true;
59 | }
60 | if (o == null || getClass() != o.getClass()) {
61 | return false;
62 | }
63 | EditAttachmentOptions editAttachmentOptions = (EditAttachmentOptions) o;
64 | return Objects.equals(this.name, editAttachmentOptions.name);
65 | }
66 |
67 | @Override
68 | public int hashCode() {
69 | return Objects.hash(name);
70 | }
71 |
72 |
73 | @Override
74 | public String toString() {
75 | StringBuilder sb = new StringBuilder();
76 | sb.append("class EditAttachmentOptions {\n");
77 |
78 | sb.append(" name: ").append(toIndentedString(name)).append("\n");
79 | sb.append("}");
80 | return sb.toString();
81 | }
82 |
83 | /**
84 | * Convert the given object to string with each line indented by 4 spaces
85 | * (except the first line).
86 | */
87 | private String toIndentedString(java.lang.Object o) {
88 | if (o == null) {
89 | return "null";
90 | }
91 | return o.toString().replace("\n", "\n ");
92 | }
93 |
94 | }
95 |
96 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/model/EditDeadlineOption.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.18.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 | import org.threeten.bp.OffsetDateTime;
27 |
28 | /**
29 | * EditDeadlineOption options for creating a deadline
30 | */
31 | @ApiModel(description = "EditDeadlineOption options for creating a deadline")
32 |
33 | public class EditDeadlineOption {
34 | @SerializedName("due_date")
35 | private OffsetDateTime dueDate = null;
36 |
37 | public EditDeadlineOption dueDate(OffsetDateTime dueDate) {
38 | this.dueDate = dueDate;
39 | return this;
40 | }
41 |
42 | /**
43 | * Get dueDate
44 | * @return dueDate
45 | **/
46 | @ApiModelProperty(required = true, value = "")
47 | public OffsetDateTime getDueDate() {
48 | return dueDate;
49 | }
50 |
51 | public void setDueDate(OffsetDateTime dueDate) {
52 | this.dueDate = dueDate;
53 | }
54 |
55 |
56 | @Override
57 | public boolean equals(java.lang.Object o) {
58 | if (this == o) {
59 | return true;
60 | }
61 | if (o == null || getClass() != o.getClass()) {
62 | return false;
63 | }
64 | EditDeadlineOption editDeadlineOption = (EditDeadlineOption) o;
65 | return Objects.equals(this.dueDate, editDeadlineOption.dueDate);
66 | }
67 |
68 | @Override
69 | public int hashCode() {
70 | return Objects.hash(dueDate);
71 | }
72 |
73 |
74 | @Override
75 | public String toString() {
76 | StringBuilder sb = new StringBuilder();
77 | sb.append("class EditDeadlineOption {\n");
78 |
79 | sb.append(" dueDate: ").append(toIndentedString(dueDate)).append("\n");
80 | sb.append("}");
81 | return sb.toString();
82 | }
83 |
84 | /**
85 | * Convert the given object to string with each line indented by 4 spaces
86 | * (except the first line).
87 | */
88 | private String toIndentedString(java.lang.Object o) {
89 | if (o == null) {
90 | return "null";
91 | }
92 | return o.toString().replace("\n", "\n ");
93 | }
94 |
95 | }
96 |
97 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/model/EditGitHookOption.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.18.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 |
27 | /**
28 | * EditGitHookOption options when modifying one Git hook
29 | */
30 | @ApiModel(description = "EditGitHookOption options when modifying one Git hook")
31 |
32 | public class EditGitHookOption {
33 | @SerializedName("content")
34 | private String content = null;
35 |
36 | public EditGitHookOption content(String content) {
37 | this.content = content;
38 | return this;
39 | }
40 |
41 | /**
42 | * Get content
43 | * @return content
44 | **/
45 | @ApiModelProperty(value = "")
46 | public String getContent() {
47 | return content;
48 | }
49 |
50 | public void setContent(String content) {
51 | this.content = content;
52 | }
53 |
54 |
55 | @Override
56 | public boolean equals(java.lang.Object o) {
57 | if (this == o) {
58 | return true;
59 | }
60 | if (o == null || getClass() != o.getClass()) {
61 | return false;
62 | }
63 | EditGitHookOption editGitHookOption = (EditGitHookOption) o;
64 | return Objects.equals(this.content, editGitHookOption.content);
65 | }
66 |
67 | @Override
68 | public int hashCode() {
69 | return Objects.hash(content);
70 | }
71 |
72 |
73 | @Override
74 | public String toString() {
75 | StringBuilder sb = new StringBuilder();
76 | sb.append("class EditGitHookOption {\n");
77 |
78 | sb.append(" content: ").append(toIndentedString(content)).append("\n");
79 | sb.append("}");
80 | return sb.toString();
81 | }
82 |
83 | /**
84 | * Convert the given object to string with each line indented by 4 spaces
85 | * (except the first line).
86 | */
87 | private String toIndentedString(java.lang.Object o) {
88 | if (o == null) {
89 | return "null";
90 | }
91 | return o.toString().replace("\n", "\n ");
92 | }
93 |
94 | }
95 |
96 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/model/EditIssueCommentOption.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.18.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 |
27 | /**
28 | * EditIssueCommentOption options for editing a comment
29 | */
30 | @ApiModel(description = "EditIssueCommentOption options for editing a comment")
31 |
32 | public class EditIssueCommentOption {
33 | @SerializedName("body")
34 | private String body = null;
35 |
36 | public EditIssueCommentOption body(String body) {
37 | this.body = body;
38 | return this;
39 | }
40 |
41 | /**
42 | * Get body
43 | * @return body
44 | **/
45 | @ApiModelProperty(required = true, value = "")
46 | public String getBody() {
47 | return body;
48 | }
49 |
50 | public void setBody(String body) {
51 | this.body = body;
52 | }
53 |
54 |
55 | @Override
56 | public boolean equals(java.lang.Object o) {
57 | if (this == o) {
58 | return true;
59 | }
60 | if (o == null || getClass() != o.getClass()) {
61 | return false;
62 | }
63 | EditIssueCommentOption editIssueCommentOption = (EditIssueCommentOption) o;
64 | return Objects.equals(this.body, editIssueCommentOption.body);
65 | }
66 |
67 | @Override
68 | public int hashCode() {
69 | return Objects.hash(body);
70 | }
71 |
72 |
73 | @Override
74 | public String toString() {
75 | StringBuilder sb = new StringBuilder();
76 | sb.append("class EditIssueCommentOption {\n");
77 |
78 | sb.append(" body: ").append(toIndentedString(body)).append("\n");
79 | sb.append("}");
80 | return sb.toString();
81 | }
82 |
83 | /**
84 | * Convert the given object to string with each line indented by 4 spaces
85 | * (except the first line).
86 | */
87 | private String toIndentedString(java.lang.Object o) {
88 | if (o == null) {
89 | return "null";
90 | }
91 | return o.toString().replace("\n", "\n ");
92 | }
93 |
94 | }
95 |
96 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/model/EditReactionOption.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.18.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 |
27 | /**
28 | * EditReactionOption contain the reaction type
29 | */
30 | @ApiModel(description = "EditReactionOption contain the reaction type")
31 |
32 | public class EditReactionOption {
33 | @SerializedName("content")
34 | private String content = null;
35 |
36 | public EditReactionOption content(String content) {
37 | this.content = content;
38 | return this;
39 | }
40 |
41 | /**
42 | * Get content
43 | * @return content
44 | **/
45 | @ApiModelProperty(value = "")
46 | public String getContent() {
47 | return content;
48 | }
49 |
50 | public void setContent(String content) {
51 | this.content = content;
52 | }
53 |
54 |
55 | @Override
56 | public boolean equals(java.lang.Object o) {
57 | if (this == o) {
58 | return true;
59 | }
60 | if (o == null || getClass() != o.getClass()) {
61 | return false;
62 | }
63 | EditReactionOption editReactionOption = (EditReactionOption) o;
64 | return Objects.equals(this.content, editReactionOption.content);
65 | }
66 |
67 | @Override
68 | public int hashCode() {
69 | return Objects.hash(content);
70 | }
71 |
72 |
73 | @Override
74 | public String toString() {
75 | StringBuilder sb = new StringBuilder();
76 | sb.append("class EditReactionOption {\n");
77 |
78 | sb.append(" content: ").append(toIndentedString(content)).append("\n");
79 | sb.append("}");
80 | return sb.toString();
81 | }
82 |
83 | /**
84 | * Convert the given object to string with each line indented by 4 spaces
85 | * (except the first line).
86 | */
87 | private String toIndentedString(java.lang.Object o) {
88 | if (o == null) {
89 | return "null";
90 | }
91 | return o.toString().replace("\n", "\n ");
92 | }
93 |
94 | }
95 |
96 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/model/ExternalWiki.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.18.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 |
27 | /**
28 | * ExternalWiki represents setting for external wiki
29 | */
30 | @ApiModel(description = "ExternalWiki represents setting for external wiki")
31 |
32 | public class ExternalWiki {
33 | @SerializedName("external_wiki_url")
34 | private String externalWikiUrl = null;
35 |
36 | public ExternalWiki externalWikiUrl(String externalWikiUrl) {
37 | this.externalWikiUrl = externalWikiUrl;
38 | return this;
39 | }
40 |
41 | /**
42 | * URL of external wiki.
43 | * @return externalWikiUrl
44 | **/
45 | @ApiModelProperty(value = "URL of external wiki.")
46 | public String getExternalWikiUrl() {
47 | return externalWikiUrl;
48 | }
49 |
50 | public void setExternalWikiUrl(String externalWikiUrl) {
51 | this.externalWikiUrl = externalWikiUrl;
52 | }
53 |
54 |
55 | @Override
56 | public boolean equals(java.lang.Object o) {
57 | if (this == o) {
58 | return true;
59 | }
60 | if (o == null || getClass() != o.getClass()) {
61 | return false;
62 | }
63 | ExternalWiki externalWiki = (ExternalWiki) o;
64 | return Objects.equals(this.externalWikiUrl, externalWiki.externalWikiUrl);
65 | }
66 |
67 | @Override
68 | public int hashCode() {
69 | return Objects.hash(externalWikiUrl);
70 | }
71 |
72 |
73 | @Override
74 | public String toString() {
75 | StringBuilder sb = new StringBuilder();
76 | sb.append("class ExternalWiki {\n");
77 |
78 | sb.append(" externalWikiUrl: ").append(toIndentedString(externalWikiUrl)).append("\n");
79 | sb.append("}");
80 | return sb.toString();
81 | }
82 |
83 | /**
84 | * Convert the given object to string with each line indented by 4 spaces
85 | * (except the first line).
86 | */
87 | private String toIndentedString(java.lang.Object o) {
88 | if (o == null) {
89 | return "null";
90 | }
91 | return o.toString().replace("\n", "\n ");
92 | }
93 |
94 | }
95 |
96 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/model/Identity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.18.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 |
27 | /**
28 | * Identity for a person's identity like an author or committer
29 | */
30 | @ApiModel(description = "Identity for a person's identity like an author or committer")
31 |
32 | public class Identity {
33 | @SerializedName("email")
34 | private String email = null;
35 |
36 | @SerializedName("name")
37 | private String name = null;
38 |
39 | public Identity email(String email) {
40 | this.email = email;
41 | return this;
42 | }
43 |
44 | /**
45 | * Get email
46 | * @return email
47 | **/
48 | @ApiModelProperty(value = "")
49 | public String getEmail() {
50 | return email;
51 | }
52 |
53 | public void setEmail(String email) {
54 | this.email = email;
55 | }
56 |
57 | public Identity name(String name) {
58 | this.name = name;
59 | return this;
60 | }
61 |
62 | /**
63 | * Get name
64 | * @return name
65 | **/
66 | @ApiModelProperty(value = "")
67 | public String getName() {
68 | return name;
69 | }
70 |
71 | public void setName(String name) {
72 | this.name = name;
73 | }
74 |
75 |
76 | @Override
77 | public boolean equals(java.lang.Object o) {
78 | if (this == o) {
79 | return true;
80 | }
81 | if (o == null || getClass() != o.getClass()) {
82 | return false;
83 | }
84 | Identity identity = (Identity) o;
85 | return Objects.equals(this.email, identity.email) &&
86 | Objects.equals(this.name, identity.name);
87 | }
88 |
89 | @Override
90 | public int hashCode() {
91 | return Objects.hash(email, name);
92 | }
93 |
94 |
95 | @Override
96 | public String toString() {
97 | StringBuilder sb = new StringBuilder();
98 | sb.append("class Identity {\n");
99 |
100 | sb.append(" email: ").append(toIndentedString(email)).append("\n");
101 | sb.append(" name: ").append(toIndentedString(name)).append("\n");
102 | sb.append("}");
103 | return sb.toString();
104 | }
105 |
106 | /**
107 | * Convert the given object to string with each line indented by 4 spaces
108 | * (except the first line).
109 | */
110 | private String toIndentedString(java.lang.Object o) {
111 | if (o == null) {
112 | return "null";
113 | }
114 | return o.toString().replace("\n", "\n ");
115 | }
116 |
117 | }
118 |
119 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/model/IssueDeadline.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.18.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 | import org.threeten.bp.OffsetDateTime;
27 |
28 | /**
29 | * IssueDeadline represents an issue deadline
30 | */
31 | @ApiModel(description = "IssueDeadline represents an issue deadline")
32 |
33 | public class IssueDeadline {
34 | @SerializedName("due_date")
35 | private OffsetDateTime dueDate = null;
36 |
37 | public IssueDeadline dueDate(OffsetDateTime dueDate) {
38 | this.dueDate = dueDate;
39 | return this;
40 | }
41 |
42 | /**
43 | * Get dueDate
44 | * @return dueDate
45 | **/
46 | @ApiModelProperty(value = "")
47 | public OffsetDateTime getDueDate() {
48 | return dueDate;
49 | }
50 |
51 | public void setDueDate(OffsetDateTime dueDate) {
52 | this.dueDate = dueDate;
53 | }
54 |
55 |
56 | @Override
57 | public boolean equals(java.lang.Object o) {
58 | if (this == o) {
59 | return true;
60 | }
61 | if (o == null || getClass() != o.getClass()) {
62 | return false;
63 | }
64 | IssueDeadline issueDeadline = (IssueDeadline) o;
65 | return Objects.equals(this.dueDate, issueDeadline.dueDate);
66 | }
67 |
68 | @Override
69 | public int hashCode() {
70 | return Objects.hash(dueDate);
71 | }
72 |
73 |
74 | @Override
75 | public String toString() {
76 | StringBuilder sb = new StringBuilder();
77 | sb.append("class IssueDeadline {\n");
78 |
79 | sb.append(" dueDate: ").append(toIndentedString(dueDate)).append("\n");
80 | sb.append("}");
81 | return sb.toString();
82 | }
83 |
84 | /**
85 | * Convert the given object to string with each line indented by 4 spaces
86 | * (except the first line).
87 | */
88 | private String toIndentedString(java.lang.Object o) {
89 | if (o == null) {
90 | return "null";
91 | }
92 | return o.toString().replace("\n", "\n ");
93 | }
94 |
95 | }
96 |
97 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/model/IssueLabelsOption.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.18.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 | import java.util.ArrayList;
27 | import java.util.List;
28 |
29 | /**
30 | * IssueLabelsOption a collection of labels
31 | */
32 | @ApiModel(description = "IssueLabelsOption a collection of labels")
33 |
34 | public class IssueLabelsOption {
35 | @SerializedName("labels")
36 | private List labels = null;
37 |
38 | public IssueLabelsOption labels(List labels) {
39 | this.labels = labels;
40 | return this;
41 | }
42 |
43 | public IssueLabelsOption addLabelsItem(Long labelsItem) {
44 | if (this.labels == null) {
45 | this.labels = new ArrayList();
46 | }
47 | this.labels.add(labelsItem);
48 | return this;
49 | }
50 |
51 | /**
52 | * list of label IDs
53 | * @return labels
54 | **/
55 | @ApiModelProperty(value = "list of label IDs")
56 | public List getLabels() {
57 | return labels;
58 | }
59 |
60 | public void setLabels(List labels) {
61 | this.labels = labels;
62 | }
63 |
64 |
65 | @Override
66 | public boolean equals(java.lang.Object o) {
67 | if (this == o) {
68 | return true;
69 | }
70 | if (o == null || getClass() != o.getClass()) {
71 | return false;
72 | }
73 | IssueLabelsOption issueLabelsOption = (IssueLabelsOption) o;
74 | return Objects.equals(this.labels, issueLabelsOption.labels);
75 | }
76 |
77 | @Override
78 | public int hashCode() {
79 | return Objects.hash(labels);
80 | }
81 |
82 |
83 | @Override
84 | public String toString() {
85 | StringBuilder sb = new StringBuilder();
86 | sb.append("class IssueLabelsOption {\n");
87 |
88 | sb.append(" labels: ").append(toIndentedString(labels)).append("\n");
89 | sb.append("}");
90 | return sb.toString();
91 | }
92 |
93 | /**
94 | * Convert the given object to string with each line indented by 4 spaces
95 | * (except the first line).
96 | */
97 | private String toIndentedString(java.lang.Object o) {
98 | if (o == null) {
99 | return "null";
100 | }
101 | return o.toString().replace("\n", "\n ");
102 | }
103 |
104 | }
105 |
106 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/model/IssueTemplateLabels.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.18.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import java.util.ArrayList;
19 | import java.util.List;
20 |
21 | /**
22 | * IssueTemplateLabels
23 | */
24 |
25 | public class IssueTemplateLabels extends ArrayList {
26 |
27 | @Override
28 | public boolean equals(java.lang.Object o) {
29 | if (this == o) {
30 | return true;
31 | }
32 | if (o == null || getClass() != o.getClass()) {
33 | return false;
34 | }
35 | return super.equals(o);
36 | }
37 |
38 | @Override
39 | public int hashCode() {
40 | return Objects.hash(super.hashCode());
41 | }
42 |
43 |
44 | @Override
45 | public String toString() {
46 | StringBuilder sb = new StringBuilder();
47 | sb.append("class IssueTemplateLabels {\n");
48 | sb.append(" ").append(toIndentedString(super.toString())).append("\n");
49 | sb.append("}");
50 | return sb.toString();
51 | }
52 |
53 | /**
54 | * Convert the given object to string with each line indented by 4 spaces
55 | * (except the first line).
56 | */
57 | private String toIndentedString(java.lang.Object o) {
58 | if (o == null) {
59 | return "null";
60 | }
61 | return o.toString().replace("\n", "\n ");
62 | }
63 |
64 | }
65 |
66 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/model/Note.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.18.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.gitea.model.Commit;
24 | import io.swagger.annotations.ApiModel;
25 | import io.swagger.annotations.ApiModelProperty;
26 | import java.io.IOException;
27 |
28 | /**
29 | * Note contains information related to a git note
30 | */
31 | @ApiModel(description = "Note contains information related to a git note")
32 |
33 | public class Note {
34 | @SerializedName("commit")
35 | private Commit commit = null;
36 |
37 | @SerializedName("message")
38 | private String message = null;
39 |
40 | public Note commit(Commit commit) {
41 | this.commit = commit;
42 | return this;
43 | }
44 |
45 | /**
46 | * Get commit
47 | * @return commit
48 | **/
49 | @ApiModelProperty(value = "")
50 | public Commit getCommit() {
51 | return commit;
52 | }
53 |
54 | public void setCommit(Commit commit) {
55 | this.commit = commit;
56 | }
57 |
58 | public Note message(String message) {
59 | this.message = message;
60 | return this;
61 | }
62 |
63 | /**
64 | * Get message
65 | * @return message
66 | **/
67 | @ApiModelProperty(value = "")
68 | public String getMessage() {
69 | return message;
70 | }
71 |
72 | public void setMessage(String message) {
73 | this.message = message;
74 | }
75 |
76 |
77 | @Override
78 | public boolean equals(java.lang.Object o) {
79 | if (this == o) {
80 | return true;
81 | }
82 | if (o == null || getClass() != o.getClass()) {
83 | return false;
84 | }
85 | Note note = (Note) o;
86 | return Objects.equals(this.commit, note.commit) &&
87 | Objects.equals(this.message, note.message);
88 | }
89 |
90 | @Override
91 | public int hashCode() {
92 | return Objects.hash(commit, message);
93 | }
94 |
95 |
96 | @Override
97 | public String toString() {
98 | StringBuilder sb = new StringBuilder();
99 | sb.append("class Note {\n");
100 |
101 | sb.append(" commit: ").append(toIndentedString(commit)).append("\n");
102 | sb.append(" message: ").append(toIndentedString(message)).append("\n");
103 | sb.append("}");
104 | return sb.toString();
105 | }
106 |
107 | /**
108 | * Convert the given object to string with each line indented by 4 spaces
109 | * (except the first line).
110 | */
111 | private String toIndentedString(java.lang.Object o) {
112 | if (o == null) {
113 | return "null";
114 | }
115 | return o.toString().replace("\n", "\n ");
116 | }
117 |
118 | }
119 |
120 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/model/NotificationCount.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.18.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 |
27 | /**
28 | * NotificationCount number of unread notifications
29 | */
30 | @ApiModel(description = "NotificationCount number of unread notifications")
31 |
32 | public class NotificationCount {
33 | @SerializedName("new")
34 | private Long _new = null;
35 |
36 | public NotificationCount _new(Long _new) {
37 | this._new = _new;
38 | return this;
39 | }
40 |
41 | /**
42 | * Get _new
43 | * @return _new
44 | **/
45 | @ApiModelProperty(value = "")
46 | public Long getNew() {
47 | return _new;
48 | }
49 |
50 | public void setNew(Long _new) {
51 | this._new = _new;
52 | }
53 |
54 |
55 | @Override
56 | public boolean equals(java.lang.Object o) {
57 | if (this == o) {
58 | return true;
59 | }
60 | if (o == null || getClass() != o.getClass()) {
61 | return false;
62 | }
63 | NotificationCount notificationCount = (NotificationCount) o;
64 | return Objects.equals(this._new, notificationCount._new);
65 | }
66 |
67 | @Override
68 | public int hashCode() {
69 | return Objects.hash(_new);
70 | }
71 |
72 |
73 | @Override
74 | public String toString() {
75 | StringBuilder sb = new StringBuilder();
76 | sb.append("class NotificationCount {\n");
77 |
78 | sb.append(" _new: ").append(toIndentedString(_new)).append("\n");
79 | sb.append("}");
80 | return sb.toString();
81 | }
82 |
83 | /**
84 | * Convert the given object to string with each line indented by 4 spaces
85 | * (except the first line).
86 | */
87 | private String toIndentedString(java.lang.Object o) {
88 | if (o == null) {
89 | return "null";
90 | }
91 | return o.toString().replace("\n", "\n ");
92 | }
93 |
94 | }
95 |
96 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/model/RepoTopicOptions.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.18.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 | import java.util.ArrayList;
27 | import java.util.List;
28 |
29 | /**
30 | * RepoTopicOptions a collection of repo topic names
31 | */
32 | @ApiModel(description = "RepoTopicOptions a collection of repo topic names")
33 |
34 | public class RepoTopicOptions {
35 | @SerializedName("topics")
36 | private List topics = null;
37 |
38 | public RepoTopicOptions topics(List topics) {
39 | this.topics = topics;
40 | return this;
41 | }
42 |
43 | public RepoTopicOptions addTopicsItem(String topicsItem) {
44 | if (this.topics == null) {
45 | this.topics = new ArrayList();
46 | }
47 | this.topics.add(topicsItem);
48 | return this;
49 | }
50 |
51 | /**
52 | * list of topic names
53 | * @return topics
54 | **/
55 | @ApiModelProperty(value = "list of topic names")
56 | public List getTopics() {
57 | return topics;
58 | }
59 |
60 | public void setTopics(List topics) {
61 | this.topics = topics;
62 | }
63 |
64 |
65 | @Override
66 | public boolean equals(java.lang.Object o) {
67 | if (this == o) {
68 | return true;
69 | }
70 | if (o == null || getClass() != o.getClass()) {
71 | return false;
72 | }
73 | RepoTopicOptions repoTopicOptions = (RepoTopicOptions) o;
74 | return Objects.equals(this.topics, repoTopicOptions.topics);
75 | }
76 |
77 | @Override
78 | public int hashCode() {
79 | return Objects.hash(topics);
80 | }
81 |
82 |
83 | @Override
84 | public String toString() {
85 | StringBuilder sb = new StringBuilder();
86 | sb.append("class RepoTopicOptions {\n");
87 |
88 | sb.append(" topics: ").append(toIndentedString(topics)).append("\n");
89 | sb.append("}");
90 | return sb.toString();
91 | }
92 |
93 | /**
94 | * Convert the given object to string with each line indented by 4 spaces
95 | * (except the first line).
96 | */
97 | private String toIndentedString(java.lang.Object o) {
98 | if (o == null) {
99 | return "null";
100 | }
101 | return o.toString().replace("\n", "\n ");
102 | }
103 |
104 | }
105 |
106 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/model/ServerVersion.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.18.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 |
27 | /**
28 | * ServerVersion wraps the version of the server
29 | */
30 | @ApiModel(description = "ServerVersion wraps the version of the server")
31 |
32 | public class ServerVersion {
33 | @SerializedName("version")
34 | private String version = null;
35 |
36 | public ServerVersion version(String version) {
37 | this.version = version;
38 | return this;
39 | }
40 |
41 | /**
42 | * Get version
43 | * @return version
44 | **/
45 | @ApiModelProperty(value = "")
46 | public String getVersion() {
47 | return version;
48 | }
49 |
50 | public void setVersion(String version) {
51 | this.version = version;
52 | }
53 |
54 |
55 | @Override
56 | public boolean equals(java.lang.Object o) {
57 | if (this == o) {
58 | return true;
59 | }
60 | if (o == null || getClass() != o.getClass()) {
61 | return false;
62 | }
63 | ServerVersion serverVersion = (ServerVersion) o;
64 | return Objects.equals(this.version, serverVersion.version);
65 | }
66 |
67 | @Override
68 | public int hashCode() {
69 | return Objects.hash(version);
70 | }
71 |
72 |
73 | @Override
74 | public String toString() {
75 | StringBuilder sb = new StringBuilder();
76 | sb.append("class ServerVersion {\n");
77 |
78 | sb.append(" version: ").append(toIndentedString(version)).append("\n");
79 | sb.append("}");
80 | return sb.toString();
81 | }
82 |
83 | /**
84 | * Convert the given object to string with each line indented by 4 spaces
85 | * (except the first line).
86 | */
87 | private String toIndentedString(java.lang.Object o) {
88 | if (o == null) {
89 | return "null";
90 | }
91 | return o.toString().replace("\n", "\n ");
92 | }
93 |
94 | }
95 |
96 |
--------------------------------------------------------------------------------
/src/main/java/io/gitea/model/TopicName.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.18.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Arrays;
18 | import com.google.gson.TypeAdapter;
19 | import com.google.gson.annotations.JsonAdapter;
20 | import com.google.gson.annotations.SerializedName;
21 | import com.google.gson.stream.JsonReader;
22 | import com.google.gson.stream.JsonWriter;
23 | import io.swagger.annotations.ApiModel;
24 | import io.swagger.annotations.ApiModelProperty;
25 | import java.io.IOException;
26 | import java.util.ArrayList;
27 | import java.util.List;
28 |
29 | /**
30 | * TopicName a list of repo topic names
31 | */
32 | @ApiModel(description = "TopicName a list of repo topic names")
33 |
34 | public class TopicName {
35 | @SerializedName("topics")
36 | private List topics = null;
37 |
38 | public TopicName topics(List topics) {
39 | this.topics = topics;
40 | return this;
41 | }
42 |
43 | public TopicName addTopicsItem(String topicsItem) {
44 | if (this.topics == null) {
45 | this.topics = new ArrayList();
46 | }
47 | this.topics.add(topicsItem);
48 | return this;
49 | }
50 |
51 | /**
52 | * Get topics
53 | * @return topics
54 | **/
55 | @ApiModelProperty(value = "")
56 | public List getTopics() {
57 | return topics;
58 | }
59 |
60 | public void setTopics(List topics) {
61 | this.topics = topics;
62 | }
63 |
64 |
65 | @Override
66 | public boolean equals(java.lang.Object o) {
67 | if (this == o) {
68 | return true;
69 | }
70 | if (o == null || getClass() != o.getClass()) {
71 | return false;
72 | }
73 | TopicName topicName = (TopicName) o;
74 | return Objects.equals(this.topics, topicName.topics);
75 | }
76 |
77 | @Override
78 | public int hashCode() {
79 | return Objects.hash(topics);
80 | }
81 |
82 |
83 | @Override
84 | public String toString() {
85 | StringBuilder sb = new StringBuilder();
86 | sb.append("class TopicName {\n");
87 |
88 | sb.append(" topics: ").append(toIndentedString(topics)).append("\n");
89 | sb.append("}");
90 | return sb.toString();
91 | }
92 |
93 | /**
94 | * Convert the given object to string with each line indented by 4 spaces
95 | * (except the first line).
96 | */
97 | private String toIndentedString(java.lang.Object o) {
98 | if (o == null) {
99 | return "null";
100 | }
101 | return o.toString().replace("\n", "\n ");
102 | }
103 |
104 | }
105 |
106 |
--------------------------------------------------------------------------------
/src/test/java/io/gitea/api/ActivitypubApiTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.18.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.api;
15 |
16 | import io.gitea.ApiException;
17 | import io.gitea.model.ActivityPub;
18 | import org.junit.Test;
19 | import org.junit.Ignore;
20 |
21 | import java.util.ArrayList;
22 | import java.util.HashMap;
23 | import java.util.List;
24 | import java.util.Map;
25 |
26 | /**
27 | * API tests for ActivitypubApi
28 | */
29 | @Ignore
30 | public class ActivitypubApiTest {
31 |
32 | private final ActivitypubApi api = new ActivitypubApi();
33 |
34 |
35 | /**
36 | * Returns the Person actor for a user
37 | *
38 | *
39 | *
40 | * @throws ApiException
41 | * if the Api call fails
42 | */
43 | @Test
44 | public void activitypubPersonTest() throws ApiException {
45 | String username = null;
46 | ActivityPub response = api.activitypubPerson(username);
47 |
48 | // TODO: test validations
49 | }
50 |
51 | /**
52 | * Send to the inbox
53 | *
54 | *
55 | *
56 | * @throws ApiException
57 | * if the Api call fails
58 | */
59 | @Test
60 | public void activitypubPersonInboxTest() throws ApiException {
61 | String username = null;
62 | api.activitypubPersonInbox(username);
63 |
64 | // TODO: test validations
65 | }
66 |
67 | }
68 |
--------------------------------------------------------------------------------
/src/test/java/io/gitea/api/MiscellaneousApiTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.18.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.api;
15 |
16 | import io.gitea.ApiException;
17 | import io.gitea.model.MarkdownOption;
18 | import io.gitea.model.NodeInfo;
19 | import io.gitea.model.ServerVersion;
20 | import org.junit.Test;
21 | import org.junit.Ignore;
22 |
23 | import java.util.ArrayList;
24 | import java.util.HashMap;
25 | import java.util.List;
26 | import java.util.Map;
27 |
28 | /**
29 | * API tests for MiscellaneousApi
30 | */
31 | @Ignore
32 | public class MiscellaneousApiTest {
33 |
34 | private final MiscellaneousApi api = new MiscellaneousApi();
35 |
36 |
37 | /**
38 | * Returns the nodeinfo of the Gitea application
39 | *
40 | *
41 | *
42 | * @throws ApiException
43 | * if the Api call fails
44 | */
45 | @Test
46 | public void getNodeInfoTest() throws ApiException {
47 | NodeInfo response = api.getNodeInfo();
48 |
49 | // TODO: test validations
50 | }
51 |
52 | /**
53 | * Get default signing-key.gpg
54 | *
55 | *
56 | *
57 | * @throws ApiException
58 | * if the Api call fails
59 | */
60 | @Test
61 | public void getSigningKeyTest() throws ApiException {
62 | String response = api.getSigningKey();
63 |
64 | // TODO: test validations
65 | }
66 |
67 | /**
68 | * Returns the version of the Gitea application
69 | *
70 | *
71 | *
72 | * @throws ApiException
73 | * if the Api call fails
74 | */
75 | @Test
76 | public void getVersionTest() throws ApiException {
77 | ServerVersion response = api.getVersion();
78 |
79 | // TODO: test validations
80 | }
81 |
82 | /**
83 | * Render a markdown document as HTML
84 | *
85 | *
86 | *
87 | * @throws ApiException
88 | * if the Api call fails
89 | */
90 | @Test
91 | public void renderMarkdownTest() throws ApiException {
92 | MarkdownOption body = null;
93 | String response = api.renderMarkdown(body);
94 |
95 | // TODO: test validations
96 | }
97 |
98 | /**
99 | * Render raw markdown as HTML
100 | *
101 | *
102 | *
103 | * @throws ApiException
104 | * if the Api call fails
105 | */
106 | @Test
107 | public void renderMarkdownRawTest() throws ApiException {
108 | String body = null;
109 | String response = api.renderMarkdownRaw(body);
110 |
111 | // TODO: test validations
112 | }
113 |
114 | }
115 |
--------------------------------------------------------------------------------
/src/test/java/io/gitea/api/PackageApiTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.18.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.api;
15 |
16 | import io.gitea.ApiException;
17 | import io.gitea.model.ModelPackage;
18 | import io.gitea.model.PackageFile;
19 | import org.junit.Test;
20 | import org.junit.Ignore;
21 |
22 | import java.util.ArrayList;
23 | import java.util.HashMap;
24 | import java.util.List;
25 | import java.util.Map;
26 |
27 | /**
28 | * API tests for PackageApi
29 | */
30 | @Ignore
31 | public class PackageApiTest {
32 |
33 | private final PackageApi api = new PackageApi();
34 |
35 |
36 | /**
37 | * Delete a package
38 | *
39 | *
40 | *
41 | * @throws ApiException
42 | * if the Api call fails
43 | */
44 | @Test
45 | public void deletePackageTest() throws ApiException {
46 | String owner = null;
47 | String type = null;
48 | String name = null;
49 | String version = null;
50 | api.deletePackage(owner, type, name, version);
51 |
52 | // TODO: test validations
53 | }
54 |
55 | /**
56 | * Gets a package
57 | *
58 | *
59 | *
60 | * @throws ApiException
61 | * if the Api call fails
62 | */
63 | @Test
64 | public void getPackageTest() throws ApiException {
65 | String owner = null;
66 | String type = null;
67 | String name = null;
68 | String version = null;
69 | ModelPackage response = api.getPackage(owner, type, name, version);
70 |
71 | // TODO: test validations
72 | }
73 |
74 | /**
75 | * Gets all files of a package
76 | *
77 | *
78 | *
79 | * @throws ApiException
80 | * if the Api call fails
81 | */
82 | @Test
83 | public void listPackageFilesTest() throws ApiException {
84 | String owner = null;
85 | String type = null;
86 | String name = null;
87 | String version = null;
88 | List response = api.listPackageFiles(owner, type, name, version);
89 |
90 | // TODO: test validations
91 | }
92 |
93 | /**
94 | * Gets all packages of an owner
95 | *
96 | *
97 | *
98 | * @throws ApiException
99 | * if the Api call fails
100 | */
101 | @Test
102 | public void listPackagesTest() throws ApiException {
103 | String owner = null;
104 | Integer page = null;
105 | Integer limit = null;
106 | String type = null;
107 | String q = null;
108 | List response = api.listPackages(owner, page, limit, type, q);
109 |
110 | // TODO: test validations
111 | }
112 |
113 | }
114 |
--------------------------------------------------------------------------------
/src/test/java/io/gitea/api/SettingsApiTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Gitea API.
3 | * This documentation describes the Gitea API.
4 | *
5 | * OpenAPI spec version: 1.18.0
6 | *
7 | *
8 | * NOTE: This class is auto generated by the swagger code generator program.
9 | * https://github.com/swagger-api/swagger-codegen.git
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package io.gitea.api;
15 |
16 | import io.gitea.ApiException;
17 | import io.gitea.model.GeneralAPISettings;
18 | import io.gitea.model.GeneralAttachmentSettings;
19 | import io.gitea.model.GeneralRepoSettings;
20 | import io.gitea.model.GeneralUISettings;
21 | import org.junit.Test;
22 | import org.junit.Ignore;
23 |
24 | import java.util.ArrayList;
25 | import java.util.HashMap;
26 | import java.util.List;
27 | import java.util.Map;
28 |
29 | /**
30 | * API tests for SettingsApi
31 | */
32 | @Ignore
33 | public class SettingsApiTest {
34 |
35 | private final SettingsApi api = new SettingsApi();
36 |
37 |
38 | /**
39 | * Get instance's global settings for api
40 | *
41 | *
42 | *
43 | * @throws ApiException
44 | * if the Api call fails
45 | */
46 | @Test
47 | public void getGeneralAPISettingsTest() throws ApiException {
48 | GeneralAPISettings response = api.getGeneralAPISettings();
49 |
50 | // TODO: test validations
51 | }
52 |
53 | /**
54 | * Get instance's global settings for Attachment
55 | *
56 | *
57 | *
58 | * @throws ApiException
59 | * if the Api call fails
60 | */
61 | @Test
62 | public void getGeneralAttachmentSettingsTest() throws ApiException {
63 | GeneralAttachmentSettings response = api.getGeneralAttachmentSettings();
64 |
65 | // TODO: test validations
66 | }
67 |
68 | /**
69 | * Get instance's global settings for repositories
70 | *
71 | *
72 | *
73 | * @throws ApiException
74 | * if the Api call fails
75 | */
76 | @Test
77 | public void getGeneralRepositorySettingsTest() throws ApiException {
78 | GeneralRepoSettings response = api.getGeneralRepositorySettings();
79 |
80 | // TODO: test validations
81 | }
82 |
83 | /**
84 | * Get instance's global settings for ui
85 | *
86 | *
87 | *
88 | * @throws ApiException
89 | * if the Api call fails
90 | */
91 | @Test
92 | public void getGeneralUISettingsTest() throws ApiException {
93 | GeneralUISettings response = api.getGeneralUISettings();
94 |
95 | // TODO: test validations
96 | }
97 |
98 | }
99 |
--------------------------------------------------------------------------------