diff --git a/docs/Commit.md b/docs/Commit.md index 9f5043a..44ce268 100644 --- a/docs/Commit.md +++ b/docs/Commit.md @@ -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] diff --git a/docs/CommitStats.md b/docs/CommitStats.md new file mode 100644 index 0000000..d285960 --- /dev/null +++ b/docs/CommitStats.md @@ -0,0 +1,8 @@ +# CommitStats + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**additions** | **Long** | | [optional] +**deletions** | **Long** | | [optional] +**total** | **Long** | | [optional] diff --git a/docs/ModelPackage.md b/docs/ModelPackage.md new file mode 100644 index 0000000..9b19d30 --- /dev/null +++ b/docs/ModelPackage.md @@ -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] diff --git a/docs/PackageApi.md b/docs/PackageApi.md new file mode 100644 index 0000000..7b878fa --- /dev/null +++ b/docs/PackageApi.md @@ -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 + + +# **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 + + +# **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 + + +# **listPackageFiles** +> List<PackageFile> 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 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<PackageFile>**](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 + + +# **listPackages** +> List<ModelPackage> 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 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<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 + diff --git a/docs/PackageFile.md b/docs/PackageFile.md new file mode 100644 index 0000000..7355084 --- /dev/null +++ b/docs/PackageFile.md @@ -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] diff --git a/docs/RepoCommit.md b/docs/RepoCommit.md index e095628..9db5c35 100644 --- a/docs/RepoCommit.md +++ b/docs/RepoCommit.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes **message** | **String** | | [optional] **tree** | [**CommitMeta**](CommitMeta.md) | | [optional] **url** | **String** | | [optional] +**verification** | [**PayloadCommitVerification**](PayloadCommitVerification.md) | | [optional] diff --git a/src/main/java/org/gitnex/tea4j/v2/apis/PackageApi.java b/src/main/java/org/gitnex/tea4j/v2/apis/PackageApi.java new file mode 100644 index 0000000..f303b34 --- /dev/null +++ b/src/main/java/org/gitnex/tea4j/v2/apis/PackageApi.java @@ -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<Void> + */ + @DELETE("packages/{owner}/{type}/{name}/{version}") + Call 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<ModelPackage> + */ + @GET("packages/{owner}/{type}/{name}/{version}") + Call 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<List<PackageFile>> + */ + @GET("packages/{owner}/{type}/{name}/{version}/files") + Call> 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<List<ModelPackage>> + */ + @GET("packages/{owner}") + Call> 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); +} diff --git a/src/main/java/org/gitnex/tea4j/v2/models/Commit.java b/src/main/java/org/gitnex/tea4j/v2/models/Commit.java index d30f3fe..04a81bf 100644 --- a/src/main/java/org/gitnex/tea4j/v2/models/Commit.java +++ b/src/main/java/org/gitnex/tea4j/v2/models/Commit.java @@ -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(); diff --git a/src/main/java/org/gitnex/tea4j/v2/models/CommitStats.java b/src/main/java/org/gitnex/tea4j/v2/models/CommitStats.java new file mode 100644 index 0000000..fdc5382 --- /dev/null +++ b/src/main/java/org/gitnex/tea4j/v2/models/CommitStats.java @@ -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 "); + } +} diff --git a/src/main/java/org/gitnex/tea4j/v2/models/ModelPackage.java b/src/main/java/org/gitnex/tea4j/v2/models/ModelPackage.java new file mode 100644 index 0000000..43aa28d --- /dev/null +++ b/src/main/java/org/gitnex/tea4j/v2/models/ModelPackage.java @@ -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 "); + } +} diff --git a/src/main/java/org/gitnex/tea4j/v2/models/PackageFile.java b/src/main/java/org/gitnex/tea4j/v2/models/PackageFile.java new file mode 100644 index 0000000..33b066c --- /dev/null +++ b/src/main/java/org/gitnex/tea4j/v2/models/PackageFile.java @@ -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 "); + } +} diff --git a/src/main/java/org/gitnex/tea4j/v2/models/RepoCommit.java b/src/main/java/org/gitnex/tea4j/v2/models/RepoCommit.java index 6ad0564..402b0fb 100644 --- a/src/main/java/org/gitnex/tea4j/v2/models/RepoCommit.java +++ b/src/main/java/org/gitnex/tea4j/v2/models/RepoCommit.java @@ -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(); }