Synchronizing API and documentation updates

This commit is contained in:
gitnexbot
2022-04-06 14:48:29 +00:00
parent ae10f5dfc8
commit 4cd6803f8f
12 changed files with 1158 additions and 3 deletions
+1
View File
@@ -11,4 +11,5 @@ Name | Type | Description | Notes
**htmlUrl** | **String** | | [optional]
**parents** | [**List<CommitMeta>**](CommitMeta.md) | | [optional]
**sha** | **String** | | [optional]
**stats** | [**CommitStats**](CommitStats.md) | | [optional]
**url** | **String** | | [optional]
+8
View File
@@ -0,0 +1,8 @@
# CommitStats
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**additions** | **Long** | | [optional]
**deletions** | **Long** | | [optional]
**total** | **Long** | | [optional]
+13
View File
@@ -0,0 +1,13 @@
# ModelPackage
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**createdAt** | [**Date**](Date.md) | | [optional]
**creator** | [**User**](User.md) | | [optional]
**id** | **Long** | | [optional]
**name** | **String** | | [optional]
**owner** | [**User**](User.md) | | [optional]
**repository** | [**Repository**](Repository.md) | | [optional]
**type** | **String** | | [optional]
**version** | **String** | | [optional]
+385
View File
@@ -0,0 +1,385 @@
# PackageApi
All URIs are relative to *http://{{AppSubUrl | JSEscape | Safe}}/api/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
[**deletePackage**](PackageApi.md#deletePackage) | **DELETE** packages/{owner}/{type}/{name}/{version} | Delete a package
[**getPackage**](PackageApi.md#getPackage) | **GET** packages/{owner}/{type}/{name}/{version} | Gets a package
[**listPackageFiles**](PackageApi.md#listPackageFiles) | **GET** packages/{owner}/{type}/{name}/{version}/files | Gets all files of a package
[**listPackages**](PackageApi.md#listPackages) | **GET** packages/{owner} | Gets all packages of an owner
<a name="deletePackage"></a>
# **deletePackage**
> Void deletePackage(owner, type, name, version)
Delete a package
### Example
```java
// Import classes:
//import org.gitnex.tea4j.v2.ApiClient;
//import org.gitnex.tea4j.v2.ApiException;
//import org.gitnex.tea4j.v2.Configuration;
//import org.gitnex.tea4j.v2.auth.*;
//import org.gitnex.tea4j.v2.apis.PackageApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: AccessToken
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
AccessToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AccessToken.setApiKeyPrefix("Token");
// Configure API key authorization: AuthorizationHeaderToken
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: BasicAuth
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
BasicAuth.setUsername("YOUR USERNAME");
BasicAuth.setPassword("YOUR PASSWORD");
// Configure API key authorization: SudoHeader
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
SudoHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SudoHeader.setApiKeyPrefix("Token");
// Configure API key authorization: SudoParam
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
SudoParam.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SudoParam.setApiKeyPrefix("Token");
// Configure API key authorization: TOTPHeader
ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader");
TOTPHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TOTPHeader.setApiKeyPrefix("Token");
// Configure API key authorization: Token
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
Token.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Token.setApiKeyPrefix("Token");
PackageApi apiInstance = new PackageApi();
String owner = "owner_example"; // String | owner of the package
String type = "type_example"; // String | type of the package
String name = "name_example"; // String | name of the package
String version = "version_example"; // String | version of the package
try {
Void result = apiInstance.deletePackage(owner, type, name, version);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PackageApi#deletePackage");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**owner** | **String**| owner of the package |
**type** | **String**| type of the package |
**name** | **String**| name of the package |
**version** | **String**| version of the package |
### Return type
[**Void**](.md)
### Authorization
[AccessToken](../README.md#AccessToken)[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)[BasicAuth](../README.md#BasicAuth)[SudoHeader](../README.md#SudoHeader)[SudoParam](../README.md#SudoParam)[TOTPHeader](../README.md#TOTPHeader)[Token](../README.md#Token)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
<a name="getPackage"></a>
# **getPackage**
> ModelPackage getPackage(owner, type, name, version)
Gets a package
### Example
```java
// Import classes:
//import org.gitnex.tea4j.v2.ApiClient;
//import org.gitnex.tea4j.v2.ApiException;
//import org.gitnex.tea4j.v2.Configuration;
//import org.gitnex.tea4j.v2.auth.*;
//import org.gitnex.tea4j.v2.apis.PackageApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: AccessToken
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
AccessToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AccessToken.setApiKeyPrefix("Token");
// Configure API key authorization: AuthorizationHeaderToken
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: BasicAuth
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
BasicAuth.setUsername("YOUR USERNAME");
BasicAuth.setPassword("YOUR PASSWORD");
// Configure API key authorization: SudoHeader
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
SudoHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SudoHeader.setApiKeyPrefix("Token");
// Configure API key authorization: SudoParam
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
SudoParam.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SudoParam.setApiKeyPrefix("Token");
// Configure API key authorization: TOTPHeader
ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader");
TOTPHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TOTPHeader.setApiKeyPrefix("Token");
// Configure API key authorization: Token
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
Token.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Token.setApiKeyPrefix("Token");
PackageApi apiInstance = new PackageApi();
String owner = "owner_example"; // String | owner of the package
String type = "type_example"; // String | type of the package
String name = "name_example"; // String | name of the package
String version = "version_example"; // String | version of the package
try {
ModelPackage result = apiInstance.getPackage(owner, type, name, version);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PackageApi#getPackage");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**owner** | **String**| owner of the package |
**type** | **String**| type of the package |
**name** | **String**| name of the package |
**version** | **String**| version of the package |
### Return type
[**ModelPackage**](ModelPackage.md)
### Authorization
[AccessToken](../README.md#AccessToken)[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)[BasicAuth](../README.md#BasicAuth)[SudoHeader](../README.md#SudoHeader)[SudoParam](../README.md#SudoParam)[TOTPHeader](../README.md#TOTPHeader)[Token](../README.md#Token)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
<a name="listPackageFiles"></a>
# **listPackageFiles**
> List&lt;PackageFile&gt; listPackageFiles(owner, type, name, version)
Gets all files of a package
### Example
```java
// Import classes:
//import org.gitnex.tea4j.v2.ApiClient;
//import org.gitnex.tea4j.v2.ApiException;
//import org.gitnex.tea4j.v2.Configuration;
//import org.gitnex.tea4j.v2.auth.*;
//import org.gitnex.tea4j.v2.apis.PackageApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: AccessToken
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
AccessToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AccessToken.setApiKeyPrefix("Token");
// Configure API key authorization: AuthorizationHeaderToken
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: BasicAuth
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
BasicAuth.setUsername("YOUR USERNAME");
BasicAuth.setPassword("YOUR PASSWORD");
// Configure API key authorization: SudoHeader
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
SudoHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SudoHeader.setApiKeyPrefix("Token");
// Configure API key authorization: SudoParam
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
SudoParam.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SudoParam.setApiKeyPrefix("Token");
// Configure API key authorization: TOTPHeader
ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader");
TOTPHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TOTPHeader.setApiKeyPrefix("Token");
// Configure API key authorization: Token
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
Token.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Token.setApiKeyPrefix("Token");
PackageApi apiInstance = new PackageApi();
String owner = "owner_example"; // String | owner of the package
String type = "type_example"; // String | type of the package
String name = "name_example"; // String | name of the package
String version = "version_example"; // String | version of the package
try {
List<PackageFile> result = apiInstance.listPackageFiles(owner, type, name, version);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PackageApi#listPackageFiles");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**owner** | **String**| owner of the package |
**type** | **String**| type of the package |
**name** | **String**| name of the package |
**version** | **String**| version of the package |
### Return type
[**List&lt;PackageFile&gt;**](PackageFile.md)
### Authorization
[AccessToken](../README.md#AccessToken)[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)[BasicAuth](../README.md#BasicAuth)[SudoHeader](../README.md#SudoHeader)[SudoParam](../README.md#SudoParam)[TOTPHeader](../README.md#TOTPHeader)[Token](../README.md#Token)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
<a name="listPackages"></a>
# **listPackages**
> List&lt;ModelPackage&gt; listPackages(owner, page, limit, type, q)
Gets all packages of an owner
### Example
```java
// Import classes:
//import org.gitnex.tea4j.v2.ApiClient;
//import org.gitnex.tea4j.v2.ApiException;
//import org.gitnex.tea4j.v2.Configuration;
//import org.gitnex.tea4j.v2.auth.*;
//import org.gitnex.tea4j.v2.apis.PackageApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: AccessToken
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
AccessToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AccessToken.setApiKeyPrefix("Token");
// Configure API key authorization: AuthorizationHeaderToken
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: BasicAuth
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
BasicAuth.setUsername("YOUR USERNAME");
BasicAuth.setPassword("YOUR PASSWORD");
// Configure API key authorization: SudoHeader
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
SudoHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SudoHeader.setApiKeyPrefix("Token");
// Configure API key authorization: SudoParam
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
SudoParam.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SudoParam.setApiKeyPrefix("Token");
// Configure API key authorization: TOTPHeader
ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader");
TOTPHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TOTPHeader.setApiKeyPrefix("Token");
// Configure API key authorization: Token
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
Token.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Token.setApiKeyPrefix("Token");
PackageApi apiInstance = new PackageApi();
String owner = "owner_example"; // String | owner of the packages
Integer page = 56; // Integer | page number of results to return (1-based)
Integer limit = 56; // Integer | page size of results
String type = "type_example"; // String | package type filter
String q = "q_example"; // String | name filter
try {
List<ModelPackage> result = apiInstance.listPackages(owner, page, limit, type, q);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PackageApi#listPackages");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**owner** | **String**| owner of the packages |
**page** | **Integer**| page number of results to return (1-based) | [optional]
**limit** | **Integer**| page size of results | [optional]
**type** | **String**| package type filter | [optional] [enum: composer, conan, generic, maven, npm, nuget, pypi, rubygems]
**q** | **String**| name filter | [optional]
### Return type
[**List&lt;ModelPackage&gt;**](ModelPackage.md)
### Authorization
[AccessToken](../README.md#AccessToken)[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)[BasicAuth](../README.md#BasicAuth)[SudoHeader](../README.md#SudoHeader)[SudoParam](../README.md#SudoParam)[TOTPHeader](../README.md#TOTPHeader)[Token](../README.md#Token)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
+12
View File
@@ -0,0 +1,12 @@
# PackageFile
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**size** | **Long** | | [optional]
**id** | **Long** | | [optional]
**md5** | **String** | | [optional]
**name** | **String** | | [optional]
**sha1** | **String** | | [optional]
**sha256** | **String** | | [optional]
**sha512** | **String** | | [optional]
+1
View File
@@ -8,3 +8,4 @@ Name | Type | Description | Notes
**message** | **String** | | [optional]
**tree** | [**CommitMeta**](CommitMeta.md) | | [optional]
**url** | **String** | | [optional]
**verification** | [**PayloadCommitVerification**](PayloadCommitVerification.md) | | [optional]
@@ -0,0 +1,76 @@
package org.gitnex.tea4j.v2.apis;
import java.util.List;
import org.gitnex.tea4j.v2.CollectionFormats.*;
import org.gitnex.tea4j.v2.models.ModelPackage;
import org.gitnex.tea4j.v2.models.PackageFile;
import retrofit2.Call;
import retrofit2.http.*;
public interface PackageApi {
/**
* Delete a package
*
* @param owner owner of the package (required)
* @param type type of the package (required)
* @param name name of the package (required)
* @param version version of the package (required)
* @return Call&lt;Void&gt;
*/
@DELETE("packages/{owner}/{type}/{name}/{version}")
Call<Void> deletePackage(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("type") String type,
@retrofit2.http.Path("name") String name,
@retrofit2.http.Path("version") String version);
/**
* Gets a package
*
* @param owner owner of the package (required)
* @param type type of the package (required)
* @param name name of the package (required)
* @param version version of the package (required)
* @return Call&lt;ModelPackage&gt;
*/
@GET("packages/{owner}/{type}/{name}/{version}")
Call<ModelPackage> getPackage(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("type") String type,
@retrofit2.http.Path("name") String name,
@retrofit2.http.Path("version") String version);
/**
* Gets all files of a package
*
* @param owner owner of the package (required)
* @param type type of the package (required)
* @param name name of the package (required)
* @param version version of the package (required)
* @return Call&lt;List&lt;PackageFile&gt;&gt;
*/
@GET("packages/{owner}/{type}/{name}/{version}/files")
Call<List<PackageFile>> listPackageFiles(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("type") String type,
@retrofit2.http.Path("name") String name,
@retrofit2.http.Path("version") String version);
/**
* Gets all packages of an owner
*
* @param owner owner of the packages (required)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @param type package type filter (optional)
* @param q name filter (optional)
* @return Call&lt;List&lt;ModelPackage&gt;&gt;
*/
@GET("packages/{owner}")
Call<List<ModelPackage>> listPackages(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit,
@retrofit2.http.Query("type") String type,
@retrofit2.http.Query("q") String q);
}
@@ -48,6 +48,9 @@ public class Commit implements Serializable {
@SerializedName("sha")
private String sha = null;
@SerializedName("stats")
private CommitStats stats = null;
@SerializedName("url")
private String url = null;
@@ -219,6 +222,25 @@ public class Commit implements Serializable {
this.sha = sha;
}
public Commit stats(CommitStats stats) {
this.stats = stats;
return this;
}
/**
* Get stats
*
* @return stats
*/
@Schema(description = "")
public CommitStats getStats() {
return stats;
}
public void setStats(CommitStats stats) {
this.stats = stats;
}
public Commit url(String url) {
this.url = url;
return this;
@@ -255,12 +277,14 @@ public class Commit implements Serializable {
&& Objects.equals(this.htmlUrl, commit.htmlUrl)
&& Objects.equals(this.parents, commit.parents)
&& Objects.equals(this.sha, commit.sha)
&& Objects.equals(this.stats, commit.stats)
&& Objects.equals(this.url, commit.url);
}
@Override
public int hashCode() {
return Objects.hash(author, commit, committer, created, files, htmlUrl, parents, sha, url);
return Objects.hash(
author, commit, committer, created, files, htmlUrl, parents, sha, stats, url);
}
@Override
@@ -276,6 +300,7 @@ public class Commit implements Serializable {
sb.append(" htmlUrl: ").append(toIndentedString(htmlUrl)).append("\n");
sb.append(" parents: ").append(toIndentedString(parents)).append("\n");
sb.append(" sha: ").append(toIndentedString(sha)).append("\n");
sb.append(" stats: ").append(toIndentedString(stats)).append("\n");
sb.append(" url: ").append(toIndentedString(url)).append("\n");
sb.append("}");
return sb.toString();
@@ -0,0 +1,131 @@
/*
* Gitea API.
* This documentation describes the Gitea API.
*
* OpenAPI spec version: {{AppVer | JSEscape | Safe}}
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package org.gitnex.tea4j.v2.models;
import com.google.gson.annotations.SerializedName;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Objects;
/** CommitStats is statistics for a RepoCommit */
@Schema(description = "CommitStats is statistics for a RepoCommit")
public class CommitStats implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("additions")
private Long additions = null;
@SerializedName("deletions")
private Long deletions = null;
@SerializedName("total")
private Long total = null;
public CommitStats additions(Long additions) {
this.additions = additions;
return this;
}
/**
* Get additions
*
* @return additions
*/
@Schema(description = "")
public Long getAdditions() {
return additions;
}
public void setAdditions(Long additions) {
this.additions = additions;
}
public CommitStats deletions(Long deletions) {
this.deletions = deletions;
return this;
}
/**
* Get deletions
*
* @return deletions
*/
@Schema(description = "")
public Long getDeletions() {
return deletions;
}
public void setDeletions(Long deletions) {
this.deletions = deletions;
}
public CommitStats total(Long total) {
this.total = total;
return this;
}
/**
* Get total
*
* @return total
*/
@Schema(description = "")
public Long getTotal() {
return total;
}
public void setTotal(Long total) {
this.total = total;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CommitStats commitStats = (CommitStats) o;
return Objects.equals(this.additions, commitStats.additions)
&& Objects.equals(this.deletions, commitStats.deletions)
&& Objects.equals(this.total, commitStats.total);
}
@Override
public int hashCode() {
return Objects.hash(additions, deletions, total);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CommitStats {\n");
sb.append(" additions: ").append(toIndentedString(additions)).append("\n");
sb.append(" deletions: ").append(toIndentedString(deletions)).append("\n");
sb.append(" total: ").append(toIndentedString(total)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
@@ -0,0 +1,252 @@
/*
* Gitea API.
* This documentation describes the Gitea API.
*
* OpenAPI spec version: {{AppVer | JSEscape | Safe}}
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package org.gitnex.tea4j.v2.models;
import com.google.gson.annotations.SerializedName;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;
/** Package represents a package */
@Schema(description = "Package represents a package")
public class ModelPackage implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("created_at")
private Date createdAt = null;
@SerializedName("creator")
private User creator = null;
@SerializedName("id")
private Long id = null;
@SerializedName("name")
private String name = null;
@SerializedName("owner")
private User owner = null;
@SerializedName("repository")
private Repository repository = null;
@SerializedName("type")
private String type = null;
@SerializedName("version")
private String version = null;
public ModelPackage createdAt(Date createdAt) {
this.createdAt = createdAt;
return this;
}
/**
* Get createdAt
*
* @return createdAt
*/
@Schema(description = "")
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public ModelPackage creator(User creator) {
this.creator = creator;
return this;
}
/**
* Get creator
*
* @return creator
*/
@Schema(description = "")
public User getCreator() {
return creator;
}
public void setCreator(User creator) {
this.creator = creator;
}
public ModelPackage id(Long id) {
this.id = id;
return this;
}
/**
* Get id
*
* @return id
*/
@Schema(description = "")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public ModelPackage name(String name) {
this.name = name;
return this;
}
/**
* Get name
*
* @return name
*/
@Schema(description = "")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public ModelPackage owner(User owner) {
this.owner = owner;
return this;
}
/**
* Get owner
*
* @return owner
*/
@Schema(description = "")
public User getOwner() {
return owner;
}
public void setOwner(User owner) {
this.owner = owner;
}
public ModelPackage repository(Repository repository) {
this.repository = repository;
return this;
}
/**
* Get repository
*
* @return repository
*/
@Schema(description = "")
public Repository getRepository() {
return repository;
}
public void setRepository(Repository repository) {
this.repository = repository;
}
public ModelPackage type(String type) {
this.type = type;
return this;
}
/**
* Get type
*
* @return type
*/
@Schema(description = "")
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public ModelPackage version(String version) {
this.version = version;
return this;
}
/**
* Get version
*
* @return version
*/
@Schema(description = "")
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ModelPackage _package = (ModelPackage) o;
return Objects.equals(this.createdAt, _package.createdAt)
&& Objects.equals(this.creator, _package.creator)
&& Objects.equals(this.id, _package.id)
&& Objects.equals(this.name, _package.name)
&& Objects.equals(this.owner, _package.owner)
&& Objects.equals(this.repository, _package.repository)
&& Objects.equals(this.type, _package.type)
&& Objects.equals(this.version, _package.version);
}
@Override
public int hashCode() {
return Objects.hash(createdAt, creator, id, name, owner, repository, type, version);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ModelPackage {\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" creator: ").append(toIndentedString(creator)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" owner: ").append(toIndentedString(owner)).append("\n");
sb.append(" repository: ").append(toIndentedString(repository)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" version: ").append(toIndentedString(version)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
@@ -0,0 +1,227 @@
/*
* Gitea API.
* This documentation describes the Gitea API.
*
* OpenAPI spec version: {{AppVer | JSEscape | Safe}}
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package org.gitnex.tea4j.v2.models;
import com.google.gson.annotations.SerializedName;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Objects;
/** PackageFile represents a package file */
@Schema(description = "PackageFile represents a package file")
public class PackageFile implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("Size")
private Long size = null;
@SerializedName("id")
private Long id = null;
@SerializedName("md5")
private String md5 = null;
@SerializedName("name")
private String name = null;
@SerializedName("sha1")
private String sha1 = null;
@SerializedName("sha256")
private String sha256 = null;
@SerializedName("sha512")
private String sha512 = null;
public PackageFile size(Long size) {
this.size = size;
return this;
}
/**
* Get size
*
* @return size
*/
@Schema(description = "")
public Long getSize() {
return size;
}
public void setSize(Long size) {
this.size = size;
}
public PackageFile id(Long id) {
this.id = id;
return this;
}
/**
* Get id
*
* @return id
*/
@Schema(description = "")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public PackageFile md5(String md5) {
this.md5 = md5;
return this;
}
/**
* Get md5
*
* @return md5
*/
@Schema(description = "")
public String getMd5() {
return md5;
}
public void setMd5(String md5) {
this.md5 = md5;
}
public PackageFile name(String name) {
this.name = name;
return this;
}
/**
* Get name
*
* @return name
*/
@Schema(description = "")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public PackageFile sha1(String sha1) {
this.sha1 = sha1;
return this;
}
/**
* Get sha1
*
* @return sha1
*/
@Schema(description = "")
public String getSha1() {
return sha1;
}
public void setSha1(String sha1) {
this.sha1 = sha1;
}
public PackageFile sha256(String sha256) {
this.sha256 = sha256;
return this;
}
/**
* Get sha256
*
* @return sha256
*/
@Schema(description = "")
public String getSha256() {
return sha256;
}
public void setSha256(String sha256) {
this.sha256 = sha256;
}
public PackageFile sha512(String sha512) {
this.sha512 = sha512;
return this;
}
/**
* Get sha512
*
* @return sha512
*/
@Schema(description = "")
public String getSha512() {
return sha512;
}
public void setSha512(String sha512) {
this.sha512 = sha512;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
PackageFile packageFile = (PackageFile) o;
return Objects.equals(this.size, packageFile.size)
&& Objects.equals(this.id, packageFile.id)
&& Objects.equals(this.md5, packageFile.md5)
&& Objects.equals(this.name, packageFile.name)
&& Objects.equals(this.sha1, packageFile.sha1)
&& Objects.equals(this.sha256, packageFile.sha256)
&& Objects.equals(this.sha512, packageFile.sha512);
}
@Override
public int hashCode() {
return Objects.hash(size, id, md5, name, sha1, sha256, sha512);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class PackageFile {\n");
sb.append(" size: ").append(toIndentedString(size)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" md5: ").append(toIndentedString(md5)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" sha1: ").append(toIndentedString(sha1)).append("\n");
sb.append(" sha256: ").append(toIndentedString(sha256)).append("\n");
sb.append(" sha512: ").append(toIndentedString(sha512)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
@@ -36,6 +36,9 @@ public class RepoCommit implements Serializable {
@SerializedName("url")
private String url = null;
@SerializedName("verification")
private PayloadCommitVerification verification = null;
public RepoCommit author(CommitUser author) {
this.author = author;
return this;
@@ -131,6 +134,25 @@ public class RepoCommit implements Serializable {
this.url = url;
}
public RepoCommit verification(PayloadCommitVerification verification) {
this.verification = verification;
return this;
}
/**
* Get verification
*
* @return verification
*/
@Schema(description = "")
public PayloadCommitVerification getVerification() {
return verification;
}
public void setVerification(PayloadCommitVerification verification) {
this.verification = verification;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -144,12 +166,13 @@ public class RepoCommit implements Serializable {
&& Objects.equals(this.committer, repoCommit.committer)
&& Objects.equals(this.message, repoCommit.message)
&& Objects.equals(this.tree, repoCommit.tree)
&& Objects.equals(this.url, repoCommit.url);
&& Objects.equals(this.url, repoCommit.url)
&& Objects.equals(this.verification, repoCommit.verification);
}
@Override
public int hashCode() {
return Objects.hash(author, committer, message, tree, url);
return Objects.hash(author, committer, message, tree, url, verification);
}
@Override
@@ -162,6 +185,7 @@ public class RepoCommit implements Serializable {
sb.append(" message: ").append(toIndentedString(message)).append("\n");
sb.append(" tree: ").append(toIndentedString(tree)).append("\n");
sb.append(" url: ").append(toIndentedString(url)).append("\n");
sb.append(" verification: ").append(toIndentedString(verification)).append("\n");
sb.append("}");
return sb.toString();
}