mirror of
https://github.com/Tribufu/TribufuJava
synced 2026-08-10 21:31:06 +00:00
Release v1.3.0
This commit is contained in:
parent
46eec14060
commit
05878c3e24
73 changed files with 10656 additions and 4822 deletions
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* Tribufu API
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
@ -19,9 +19,12 @@ import com.google.gson.annotations.JsonAdapter;
|
|||
import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.tribufu.generated.models.PackageRelease;
|
||||
import java.io.IOException;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
|
|
@ -50,7 +53,7 @@ import com.tribufu.generated.JSON;
|
|||
/**
|
||||
* ModelPackage
|
||||
*/
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T22:04:46.763378600-03:00[America/Sao_Paulo]", comments = "Generator version: 7.12.0")
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-12-27T09:52:38.593392400-03:00[America/Sao_Paulo]", comments = "Generator version: 7.12.0")
|
||||
public class ModelPackage {
|
||||
public static final String SERIALIZED_NAME_ID = "id";
|
||||
@SerializedName(SERIALIZED_NAME_ID)
|
||||
|
|
@ -67,30 +70,25 @@ public class ModelPackage {
|
|||
@javax.annotation.Nullable
|
||||
private String description;
|
||||
|
||||
public static final String SERIALIZED_NAME_IMAGE_URL = "image_url";
|
||||
@SerializedName(SERIALIZED_NAME_IMAGE_URL)
|
||||
@javax.annotation.Nullable
|
||||
private String imageUrl;
|
||||
|
||||
public static final String SERIALIZED_NAME_AUTHOR_ID = "author_id";
|
||||
@SerializedName(SERIALIZED_NAME_AUTHOR_ID)
|
||||
@javax.annotation.Nullable
|
||||
private String authorId;
|
||||
|
||||
public static final String SERIALIZED_NAME_VERSION = "version";
|
||||
@SerializedName(SERIALIZED_NAME_VERSION)
|
||||
public static final String SERIALIZED_NAME_IMAGE_URL = "image_url";
|
||||
@SerializedName(SERIALIZED_NAME_IMAGE_URL)
|
||||
@javax.annotation.Nullable
|
||||
private String version;
|
||||
private String imageUrl;
|
||||
|
||||
public static final String SERIALIZED_NAME_FILE_URL = "file_url";
|
||||
@SerializedName(SERIALIZED_NAME_FILE_URL)
|
||||
public static final String SERIALIZED_NAME_APPLICATION_ID = "application_id";
|
||||
@SerializedName(SERIALIZED_NAME_APPLICATION_ID)
|
||||
@javax.annotation.Nullable
|
||||
private String fileUrl;
|
||||
private String applicationId;
|
||||
|
||||
public static final String SERIALIZED_NAME_RAW_SIZE = "raw_size";
|
||||
@SerializedName(SERIALIZED_NAME_RAW_SIZE)
|
||||
public static final String SERIALIZED_NAME_CATEGORY_ID = "category_id";
|
||||
@SerializedName(SERIALIZED_NAME_CATEGORY_ID)
|
||||
@javax.annotation.Nullable
|
||||
private Double rawSize;
|
||||
private String categoryId;
|
||||
|
||||
public static final String SERIALIZED_NAME_DOWNLOAD_COUNT = "download_count";
|
||||
@SerializedName(SERIALIZED_NAME_DOWNLOAD_COUNT)
|
||||
|
|
@ -102,6 +100,11 @@ public class ModelPackage {
|
|||
@javax.annotation.Nullable
|
||||
private OffsetDateTime lastDownload;
|
||||
|
||||
public static final String SERIALIZED_NAME_RELEASES = "releases";
|
||||
@SerializedName(SERIALIZED_NAME_RELEASES)
|
||||
@javax.annotation.Nullable
|
||||
private List<PackageRelease> releases;
|
||||
|
||||
public static final String SERIALIZED_NAME_CREATED = "created";
|
||||
@SerializedName(SERIALIZED_NAME_CREATED)
|
||||
@javax.annotation.Nullable
|
||||
|
|
@ -172,25 +175,6 @@ public class ModelPackage {
|
|||
}
|
||||
|
||||
|
||||
public ModelPackage imageUrl(@javax.annotation.Nullable String imageUrl) {
|
||||
this.imageUrl = imageUrl;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get imageUrl
|
||||
* @return imageUrl
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getImageUrl() {
|
||||
return imageUrl;
|
||||
}
|
||||
|
||||
public void setImageUrl(@javax.annotation.Nullable String imageUrl) {
|
||||
this.imageUrl = imageUrl;
|
||||
}
|
||||
|
||||
|
||||
public ModelPackage authorId(@javax.annotation.Nullable String authorId) {
|
||||
this.authorId = authorId;
|
||||
return this;
|
||||
|
|
@ -210,60 +194,60 @@ public class ModelPackage {
|
|||
}
|
||||
|
||||
|
||||
public ModelPackage version(@javax.annotation.Nullable String version) {
|
||||
this.version = version;
|
||||
public ModelPackage imageUrl(@javax.annotation.Nullable String imageUrl) {
|
||||
this.imageUrl = imageUrl;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get version
|
||||
* @return version
|
||||
* Get imageUrl
|
||||
* @return imageUrl
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getVersion() {
|
||||
return version;
|
||||
public String getImageUrl() {
|
||||
return imageUrl;
|
||||
}
|
||||
|
||||
public void setVersion(@javax.annotation.Nullable String version) {
|
||||
this.version = version;
|
||||
public void setImageUrl(@javax.annotation.Nullable String imageUrl) {
|
||||
this.imageUrl = imageUrl;
|
||||
}
|
||||
|
||||
|
||||
public ModelPackage fileUrl(@javax.annotation.Nullable String fileUrl) {
|
||||
this.fileUrl = fileUrl;
|
||||
public ModelPackage applicationId(@javax.annotation.Nullable String applicationId) {
|
||||
this.applicationId = applicationId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get fileUrl
|
||||
* @return fileUrl
|
||||
* Get applicationId
|
||||
* @return applicationId
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getFileUrl() {
|
||||
return fileUrl;
|
||||
public String getApplicationId() {
|
||||
return applicationId;
|
||||
}
|
||||
|
||||
public void setFileUrl(@javax.annotation.Nullable String fileUrl) {
|
||||
this.fileUrl = fileUrl;
|
||||
public void setApplicationId(@javax.annotation.Nullable String applicationId) {
|
||||
this.applicationId = applicationId;
|
||||
}
|
||||
|
||||
|
||||
public ModelPackage rawSize(@javax.annotation.Nullable Double rawSize) {
|
||||
this.rawSize = rawSize;
|
||||
public ModelPackage categoryId(@javax.annotation.Nullable String categoryId) {
|
||||
this.categoryId = categoryId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get rawSize
|
||||
* @return rawSize
|
||||
* Get categoryId
|
||||
* @return categoryId
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Double getRawSize() {
|
||||
return rawSize;
|
||||
public String getCategoryId() {
|
||||
return categoryId;
|
||||
}
|
||||
|
||||
public void setRawSize(@javax.annotation.Nullable Double rawSize) {
|
||||
this.rawSize = rawSize;
|
||||
public void setCategoryId(@javax.annotation.Nullable String categoryId) {
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -305,6 +289,33 @@ public class ModelPackage {
|
|||
}
|
||||
|
||||
|
||||
public ModelPackage releases(@javax.annotation.Nullable List<PackageRelease> releases) {
|
||||
this.releases = releases;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ModelPackage addReleasesItem(PackageRelease releasesItem) {
|
||||
if (this.releases == null) {
|
||||
this.releases = new ArrayList<>();
|
||||
}
|
||||
this.releases.add(releasesItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get releases
|
||||
* @return releases
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public List<PackageRelease> getReleases() {
|
||||
return releases;
|
||||
}
|
||||
|
||||
public void setReleases(@javax.annotation.Nullable List<PackageRelease> releases) {
|
||||
this.releases = releases;
|
||||
}
|
||||
|
||||
|
||||
public ModelPackage created(@javax.annotation.Nullable OffsetDateTime created) {
|
||||
this.created = created;
|
||||
return this;
|
||||
|
|
@ -356,13 +367,13 @@ public class ModelPackage {
|
|||
return Objects.equals(this.id, _package.id) &&
|
||||
Objects.equals(this.name, _package.name) &&
|
||||
Objects.equals(this.description, _package.description) &&
|
||||
Objects.equals(this.imageUrl, _package.imageUrl) &&
|
||||
Objects.equals(this.authorId, _package.authorId) &&
|
||||
Objects.equals(this.version, _package.version) &&
|
||||
Objects.equals(this.fileUrl, _package.fileUrl) &&
|
||||
Objects.equals(this.rawSize, _package.rawSize) &&
|
||||
Objects.equals(this.imageUrl, _package.imageUrl) &&
|
||||
Objects.equals(this.applicationId, _package.applicationId) &&
|
||||
Objects.equals(this.categoryId, _package.categoryId) &&
|
||||
Objects.equals(this.downloadCount, _package.downloadCount) &&
|
||||
Objects.equals(this.lastDownload, _package.lastDownload) &&
|
||||
Objects.equals(this.releases, _package.releases) &&
|
||||
Objects.equals(this.created, _package.created) &&
|
||||
Objects.equals(this.updated, _package.updated);
|
||||
}
|
||||
|
|
@ -373,7 +384,7 @@ public class ModelPackage {
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id, name, description, imageUrl, authorId, version, fileUrl, rawSize, downloadCount, lastDownload, created, updated);
|
||||
return Objects.hash(id, name, description, authorId, imageUrl, applicationId, categoryId, downloadCount, lastDownload, releases, created, updated);
|
||||
}
|
||||
|
||||
private static <T> int hashCodeNullable(JsonNullable<T> a) {
|
||||
|
|
@ -390,13 +401,13 @@ public class ModelPackage {
|
|||
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" description: ").append(toIndentedString(description)).append("\n");
|
||||
sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n");
|
||||
sb.append(" authorId: ").append(toIndentedString(authorId)).append("\n");
|
||||
sb.append(" version: ").append(toIndentedString(version)).append("\n");
|
||||
sb.append(" fileUrl: ").append(toIndentedString(fileUrl)).append("\n");
|
||||
sb.append(" rawSize: ").append(toIndentedString(rawSize)).append("\n");
|
||||
sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n");
|
||||
sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n");
|
||||
sb.append(" categoryId: ").append(toIndentedString(categoryId)).append("\n");
|
||||
sb.append(" downloadCount: ").append(toIndentedString(downloadCount)).append("\n");
|
||||
sb.append(" lastDownload: ").append(toIndentedString(lastDownload)).append("\n");
|
||||
sb.append(" releases: ").append(toIndentedString(releases)).append("\n");
|
||||
sb.append(" created: ").append(toIndentedString(created)).append("\n");
|
||||
sb.append(" updated: ").append(toIndentedString(updated)).append("\n");
|
||||
sb.append("}");
|
||||
|
|
@ -424,18 +435,20 @@ public class ModelPackage {
|
|||
openapiFields.add("id");
|
||||
openapiFields.add("name");
|
||||
openapiFields.add("description");
|
||||
openapiFields.add("image_url");
|
||||
openapiFields.add("author_id");
|
||||
openapiFields.add("version");
|
||||
openapiFields.add("file_url");
|
||||
openapiFields.add("raw_size");
|
||||
openapiFields.add("image_url");
|
||||
openapiFields.add("application_id");
|
||||
openapiFields.add("category_id");
|
||||
openapiFields.add("download_count");
|
||||
openapiFields.add("last_download");
|
||||
openapiFields.add("releases");
|
||||
openapiFields.add("created");
|
||||
openapiFields.add("updated");
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("name");
|
||||
openapiRequiredFields.add("image_url");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -458,6 +471,13 @@ public class ModelPackage {
|
|||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ModelPackage` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
// check to make sure all required properties/fields are present in the JSON string
|
||||
for (String requiredField : ModelPackage.openapiRequiredFields) {
|
||||
if (jsonElement.getAsJsonObject().get(requiredField) == null) {
|
||||
throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString()));
|
||||
}
|
||||
}
|
||||
JsonObject jsonObj = jsonElement.getAsJsonObject();
|
||||
if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString()));
|
||||
|
|
@ -468,17 +488,31 @@ public class ModelPackage {
|
|||
if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString()));
|
||||
}
|
||||
if ((jsonObj.get("image_url") != null && !jsonObj.get("image_url").isJsonNull()) && !jsonObj.get("image_url").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `image_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("image_url").toString()));
|
||||
}
|
||||
if ((jsonObj.get("author_id") != null && !jsonObj.get("author_id").isJsonNull()) && !jsonObj.get("author_id").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `author_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("author_id").toString()));
|
||||
}
|
||||
if ((jsonObj.get("version") != null && !jsonObj.get("version").isJsonNull()) && !jsonObj.get("version").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `version` to be a primitive type in the JSON string but got `%s`", jsonObj.get("version").toString()));
|
||||
if ((jsonObj.get("image_url") != null && !jsonObj.get("image_url").isJsonNull()) && !jsonObj.get("image_url").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `image_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("image_url").toString()));
|
||||
}
|
||||
if ((jsonObj.get("file_url") != null && !jsonObj.get("file_url").isJsonNull()) && !jsonObj.get("file_url").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `file_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("file_url").toString()));
|
||||
if ((jsonObj.get("application_id") != null && !jsonObj.get("application_id").isJsonNull()) && !jsonObj.get("application_id").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `application_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("application_id").toString()));
|
||||
}
|
||||
if ((jsonObj.get("category_id") != null && !jsonObj.get("category_id").isJsonNull()) && !jsonObj.get("category_id").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `category_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category_id").toString()));
|
||||
}
|
||||
if (jsonObj.get("releases") != null && !jsonObj.get("releases").isJsonNull()) {
|
||||
JsonArray jsonArrayreleases = jsonObj.getAsJsonArray("releases");
|
||||
if (jsonArrayreleases != null) {
|
||||
// ensure the json data is an array
|
||||
if (!jsonObj.get("releases").isJsonArray()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `releases` to be an array in the JSON string but got `%s`", jsonObj.get("releases").toString()));
|
||||
}
|
||||
|
||||
// validate the optional field `releases` (array)
|
||||
for (int i = 0; i < jsonArrayreleases.size(); i++) {
|
||||
PackageRelease.validateJsonElement(jsonArrayreleases.get(i));
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue